Bug 1343149: Add handling for movups opcode; r?dmajor
MozReview-Commit-ID: 3fDrr2FkfD
--- a/xpcom/build/nsWindowsDllInterceptor.h
+++ b/xpcom/build/nsWindowsDllInterceptor.h
@@ -861,16 +861,28 @@ protected:
COPY_CODES(3);
} else {
MOZ_ASSERT_UNREACHABLE("Unrecognized opcode sequence");
return;
}
} else if (origBytes[nOrigBytes] == 0x05) {
// syscall
COPY_CODES(1);
+ } else if (origBytes[nOrigBytes] == 0x10 ||
+ origBytes[nOrigBytes] == 0x11) {
+ // SSE: movups xmm, xmm/m128
+ // movups xmm/m128, xmm
+ COPY_CODES(1);
+ int nModRmSibBytes = CountModRmSib(&origBytes[nOrigBytes]);
+ if (nModRmSibBytes < 0) {
+ MOZ_ASSERT_UNREACHABLE("Unrecognized opcode sequence");
+ return;
+ } else {
+ COPY_CODES(nModRmSibBytes);
+ }
} else if (origBytes[nOrigBytes] == 0x84) {
// je rel32
JumpPatch jump(nTrampBytes - 1, // overwrite the 0x0f we copied above
(intptr_t)(origBytes + nOrigBytes + 5 +
*(reinterpret_cast<int32_t*>(origBytes + nOrigBytes + 1))),
JumpType::Je);
nTrampBytes = jump.GenerateJump(tramp);
nOrigBytes += 5;