WebAssembly: don't just emit extended offset adds for patch
authorjfbastien@apple.com <jfbastien@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 May 2017 17:06:29 +0000 (17:06 +0000)
committerjfbastien@apple.com <jfbastien@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 May 2017 17:06:29 +0000 (17:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=171799

Reviewed by Mark Lam.

It isn't necessary to restrict.

* b3/air/AirLowerStackArgs.cpp:
(JSC::B3::Air::lowerStackArgs):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216430 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/b3/air/AirLowerStackArgs.cpp

index b884b06..4493b0e 100644 (file)
@@ -1,3 +1,15 @@
+2017-05-08  JF Bastien  <jfbastien@apple.com>
+
+        WebAssembly: don't just emit extended offset adds for patch
+        https://bugs.webkit.org/show_bug.cgi?id=171799
+
+        Reviewed by Mark Lam.
+
+        It isn't necessary to restrict.
+
+        * b3/air/AirLowerStackArgs.cpp:
+        (JSC::B3::Air::lowerStackArgs):
+
 2017-05-08  Mark Lam  <mark.lam@apple.com>
 
         Introduce ExceptionScope::assertNoException() and releaseAssertNoException().
index 07d0d78..f63bd41 100644 (file)
@@ -70,14 +70,13 @@ void lowerStackArgs(Code& code)
 
         for (unsigned instIndex = 0; instIndex < block->size(); ++instIndex) {
             Inst& inst = block->at(instIndex);
-            bool isPatch = inst.kind.opcode == Patch;
 
             inst.forEachArg(
                 [&] (Arg& arg, Arg::Role role, Bank, Width width) {
                     auto stackAddr = [&] (Value::OffsetType offsetFromFP) -> Arg {
                         int32_t offsetFromSP = offsetFromFP + code.frameSize();
 
-                        if (isPatch && inst.admitsExtendedOffsetAddr(arg)) {
+                        if (inst.admitsExtendedOffsetAddr(arg)) {
                             // Stackmaps and patchpoints expect addr inputs relative to SP or FP only. We might as well
                             // not even bother generating an addr with valid form for these opcodes since extended offset
                             // addr is always valid.