Bug 1343149: Add handling for movups opcode; r?dmajor draft
authorCarl Corcoran <carlco@gmail.com>
Thu, 25 May 2017 22:52:16 +0200
changeset 584753 54ad360a5bac01479b1128bacd7d0406bd6524c0
parent 582730 5bc1c758ab57c1885dceab4e7837e58af27b998c
child 630509 d95b922fef8b2131db0cbdf3635a1dff78e5c8cd
push id60875
push userbmo:ccorcoran@mozilla.com
push dateThu, 25 May 2017 23:53:47 +0000
reviewersdmajor
bugs1343149
milestone55.0a1
Bug 1343149: Add handling for movups opcode; r?dmajor MozReview-Commit-ID: 3fDrr2FkfD
xpcom/build/nsWindowsDllInterceptor.h
--- 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;