Bug 1593736 - Give ArgType_General pointer semantics in Wasm builtin code. r=lth
authorRyan Hunt <rhunt@eqrion.net>
Wed, 13 Nov 2019 14:43:43 +0000
changeset 501748 23218bed721cdac05991d943fc4443a03cfc4cbd
parent 501747 b73d74bcafda125ebc57dcd59fb3dd00cacfed8c
child 501749 2475e9e1ea77d8ddeeaf8e9918d360c8f03ec8bb
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslth
bugs1593736, 1591047
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1593736 - Give ArgType_General pointer semantics in Wasm builtin code. r=lth After examining bug 1591047, I believe we should have added an Int32 type instead of changing the semantics of ArgType_General to be Int32. The reason is that the existing code assumes ArgType_General is pointer sized, and changing this is scary for all the existing uses. (e.g. simulator, MacroAssembler::appendSignatureType) * Adds ArgType_Int32 * Changes ArgType_General -> ArgType_Int32, ArgType_Pointer -> ArgType_General for ABIFunctionTypes introduced in bug 1591047 (which are only used for Wasm instance calls). * ToMirType(ArgType_General) -> MIRType::Pointer (should only affect wasm) * ToMirType(ArgType_Int32) -> MIRType::Int32 (should only affect wasm) Differential Revision: https://phabricator.services.mozilla.com/D52177
js/src/jit/IonTypes.h
js/src/jit/MacroAssembler.h
js/src/jit/arm/Simulator-arm.cpp
js/src/jit/arm64/vixl/MozSimulator-vixl.cpp
js/src/wasm/WasmBuiltins.cpp
--- a/js/src/jit/IonTypes.h
+++ b/js/src/jit/IonTypes.h
@@ -711,18 +711,18 @@ static inline MIRType ScalarTypeToMIRTyp
 #  define CHECK_OSIPOINT_REGISTERS 1
 
 #endif  // DEBUG
 
 enum ABIArgType {
   ArgType_General = 0x1,
   ArgType_Double = 0x2,
   ArgType_Float32 = 0x3,
-  ArgType_Int64 = 0x4,
-  ArgType_Pointer = 0x5,
+  ArgType_Int32 = 0x4,
+  ArgType_Int64 = 0x5,
 
   RetType_Shift = 0x0,
   ArgType_Shift = 0x3,
   ArgType_Mask = 0x7
 };
 
 namespace detail {
 
@@ -839,62 +839,58 @@ enum ABIFunctionType {
       (ArgType_Int64 << (ArgType_Shift * 4)),
 
   Args_Int_GeneralGeneralInt64Int64 = Args_General0 |
                                       (ArgType_General << (ArgType_Shift * 1)) |
                                       (ArgType_General << (ArgType_Shift * 2)) |
                                       (ArgType_Int64 << (ArgType_Shift * 3)) |
                                       (ArgType_Int64 << (ArgType_Shift * 4)),
 
-  Args_General_Pointer =
-      detail::MakeABIFunctionType(ArgType_General, {ArgType_Pointer}),
-  Args_General_PointerGeneral = detail::MakeABIFunctionType(
-      ArgType_General, {ArgType_Pointer, ArgType_General}),
-  Args_General_PointerGeneralGeneral = detail::MakeABIFunctionType(
-      ArgType_General, {ArgType_Pointer, ArgType_General, ArgType_General}),
-  Args_General_PointerGeneralGeneralGeneralGeneral =
-      detail::MakeABIFunctionType(
-          ArgType_General, {ArgType_Pointer, ArgType_General, ArgType_General,
-                            ArgType_General, ArgType_General}),
-  Args_General_PointerGeneralGeneralGeneralGeneralGeneral =
-      detail::MakeABIFunctionType(
-          ArgType_General, {ArgType_Pointer, ArgType_General, ArgType_General,
-                            ArgType_General, ArgType_General, ArgType_General}),
-  Args_General_PointerGeneralGeneralGeneralPointer =
-      detail::MakeABIFunctionType(
-          ArgType_General, {ArgType_Pointer, ArgType_General, ArgType_General,
-                            ArgType_General, ArgType_Pointer}),
-  Args_General_PointerGeneralGeneralInt64 = detail::MakeABIFunctionType(
-      ArgType_General,
-      {ArgType_Pointer, ArgType_General, ArgType_General, ArgType_Int64}),
-  Args_General_PointerGeneralGeneralPointer = detail::MakeABIFunctionType(
+  Args_Int32_General =
+      detail::MakeABIFunctionType(ArgType_Int32, {ArgType_General}),
+  Args_Int32_GeneralInt32 = detail::MakeABIFunctionType(
+      ArgType_Int32, {ArgType_General, ArgType_Int32}),
+  Args_Int32_GeneralInt32Int32 = detail::MakeABIFunctionType(
+      ArgType_Int32, {ArgType_General, ArgType_Int32, ArgType_Int32}),
+  Args_Int32_GeneralInt32Int32Int32Int32 = detail::MakeABIFunctionType(
+      ArgType_Int32, {ArgType_General, ArgType_Int32, ArgType_Int32,
+                      ArgType_Int32, ArgType_Int32}),
+  Args_Int32_GeneralInt32Int32Int32Int32Int32 = detail::MakeABIFunctionType(
+      ArgType_Int32, {ArgType_General, ArgType_Int32, ArgType_Int32,
+                      ArgType_Int32, ArgType_Int32, ArgType_Int32}),
+  Args_Int32_GeneralInt32Int32Int32General = detail::MakeABIFunctionType(
+      ArgType_Int32, {ArgType_General, ArgType_Int32, ArgType_Int32,
+                      ArgType_Int32, ArgType_General}),
+  Args_Int32_GeneralInt32Int32Int64 = detail::MakeABIFunctionType(
+      ArgType_Int32,
+      {ArgType_General, ArgType_Int32, ArgType_Int32, ArgType_Int64}),
+  Args_Int32_GeneralInt32Int32General = detail::MakeABIFunctionType(
+      ArgType_Int32,
+      {ArgType_General, ArgType_Int32, ArgType_Int32, ArgType_General}),
+  Args_Int32_GeneralInt32Int64Int64 = detail::MakeABIFunctionType(
+      ArgType_Int32,
+      {ArgType_General, ArgType_Int32, ArgType_Int64, ArgType_Int64}),
+  Args_Int32_GeneralInt32GeneralInt32 = detail::MakeABIFunctionType(
+      ArgType_Int32,
+      {ArgType_General, ArgType_Int32, ArgType_General, ArgType_Int32}),
+  Args_Int32_GeneralInt32GeneralInt32Int32 = detail::MakeABIFunctionType(
+      ArgType_Int32, {ArgType_General, ArgType_Int32, ArgType_General,
+                      ArgType_Int32, ArgType_Int32}),
+  Args_Int32_GeneralGeneral = detail::MakeABIFunctionType(
+      ArgType_Int32, {ArgType_General, ArgType_General}),
+  Args_Int32_GeneralGeneralInt32Int32 = detail::MakeABIFunctionType(
+      ArgType_Int32,
+      {ArgType_General, ArgType_General, ArgType_Int32, ArgType_Int32}),
+  Args_General_GeneralInt32 = detail::MakeABIFunctionType(
+      ArgType_General, {ArgType_General, ArgType_Int32}),
+  Args_General_GeneralInt32Int32 = detail::MakeABIFunctionType(
+      ArgType_General, {ArgType_General, ArgType_Int32, ArgType_Int32}),
+  Args_General_GeneralInt32Int32General = detail::MakeABIFunctionType(
       ArgType_General,
-      {ArgType_Pointer, ArgType_General, ArgType_General, ArgType_Pointer}),
-  Args_General_PointerGeneralInt64Int64 = detail::MakeABIFunctionType(
-      ArgType_General,
-      {ArgType_Pointer, ArgType_General, ArgType_Int64, ArgType_Int64}),
-  Args_General_PointerGeneralPointerGeneral = detail::MakeABIFunctionType(
-      ArgType_General,
-      {ArgType_Pointer, ArgType_General, ArgType_Pointer, ArgType_General}),
-  Args_General_PointerGeneralPointerGeneralGeneral =
-      detail::MakeABIFunctionType(
-          ArgType_General, {ArgType_Pointer, ArgType_General, ArgType_Pointer,
-                            ArgType_General, ArgType_General}),
-  Args_General_PointerPointer = detail::MakeABIFunctionType(
-      ArgType_General, {ArgType_Pointer, ArgType_Pointer}),
-  Args_General_PointerPointerGeneralGeneral = detail::MakeABIFunctionType(
-      ArgType_General,
-      {ArgType_Pointer, ArgType_Pointer, ArgType_General, ArgType_General}),
-  Args_Pointer_PointerGeneral = detail::MakeABIFunctionType(
-      ArgType_Pointer, {ArgType_Pointer, ArgType_General}),
-  Args_Pointer_PointerGeneralGeneral = detail::MakeABIFunctionType(
-      ArgType_Pointer, {ArgType_Pointer, ArgType_General, ArgType_General}),
-  Args_Pointer_PointerGeneralGeneralPointer = detail::MakeABIFunctionType(
-      ArgType_Pointer,
-      {ArgType_Pointer, ArgType_General, ArgType_General, ArgType_Pointer}),
+      {ArgType_General, ArgType_Int32, ArgType_Int32, ArgType_General}),
 };
 
 static constexpr ABIFunctionType MakeABIFunctionType(
     ABIArgType ret, std::initializer_list<ABIArgType> args) {
   return ABIFunctionType(detail::MakeABIFunctionType(ret, args));
 }
 
 enum class BarrierKind : uint32_t {
--- a/js/src/jit/MacroAssembler.h
+++ b/js/src/jit/MacroAssembler.h
@@ -3328,25 +3328,25 @@ static inline size_t StackDecrementForCa
          ComputeByteAlignment(bytesAlreadyPushed + bytesToPush, alignment);
 }
 
 static inline MIRType ToMIRType(MIRType t) { return t; }
 
 static inline MIRType ToMIRType(ABIArgType argType) {
   switch (argType) {
     case ArgType_General:
-      return MIRType::Int32;
+      return MIRType::Pointer;
     case ArgType_Double:
       return MIRType::Double;
     case ArgType_Float32:
       return MIRType::Float32;
+    case ArgType_Int32:
+      return MIRType::Int32;
     case ArgType_Int64:
       return MIRType::Int64;
-    case ArgType_Pointer:
-      return MIRType::Pointer;
     default:
       break;
   }
   MOZ_CRASH("unexpected argType");
 }
 
 template <class VecT>
 class ABIArgIter {
--- a/js/src/jit/arm/Simulator-arm.cpp
+++ b/js/src/jit/arm/Simulator-arm.cpp
@@ -2349,54 +2349,44 @@ typedef int32_t (*Prototype_Int_DoubleIn
 
 typedef double (*Prototype_Double_DoubleDoubleDouble)(double arg0, double arg1,
                                                       double arg2);
 typedef double (*Prototype_Double_DoubleDoubleDoubleDouble)(double arg0,
                                                             double arg1,
                                                             double arg2,
                                                             double arg3);
 
-typedef int32_t (*Prototype_General_Pointer)(int32_t);
-typedef int32_t (*Prototype_General_PointerGeneral)(int32_t, int32_t);
-typedef int32_t (*Prototype_General_PointerGeneralGeneral)(int32_t, int32_t,
-                                                           int32_t);
-typedef int32_t (*Prototype_General_PointerGeneralGeneralGeneralGeneral)(
-    int32_t, int32_t, int32_t, int32_t, int32_t);
-typedef int32_t (*Prototype_General_PointerGeneralGeneralGeneralGeneralGeneral)(
+typedef int32_t (*Prototype_Int32_General)(int32_t);
+typedef int32_t (*Prototype_Int32_GeneralInt32)(int32_t, int32_t);
+typedef int32_t (*Prototype_Int32_GeneralInt32Int32)(int32_t, int32_t, int32_t);
+typedef int32_t (*Prototype_Int32_GeneralInt32Int32Int32Int32)(int32_t, int32_t,
+                                                               int32_t, int32_t,
+                                                               int32_t);
+typedef int32_t (*Prototype_Int32_GeneralInt32Int32Int32Int32Int32)(
     int32_t, int32_t, int32_t, int32_t, int32_t, int32_t);
-typedef int32_t (*Prototype_General_PointerGeneralGeneralGeneralPointer)(
+typedef int32_t (*Prototype_Int32_GeneralInt32Int32Int32General)(
     int32_t, int32_t, int32_t, int32_t, int32_t);
-typedef int32_t (*Prototype_General_PointerGeneralGeneralInt64)(int32_t,
-                                                                int32_t,
-                                                                int32_t,
-                                                                int64_t);
-typedef int32_t (*Prototype_General_PointerGeneralGeneralPointer)(int32_t,
-                                                                  int32_t,
-                                                                  int32_t,
-                                                                  int32_t);
-typedef int32_t (*Prototype_General_PointerGeneralInt64Int64)(int32_t, int32_t,
-                                                              int64_t, int64_t);
-typedef int32_t (*Prototype_General_PointerGeneralPointerGeneral)(int32_t,
-                                                                  int32_t,
-                                                                  int32_t,
-                                                                  int32_t);
-typedef int32_t (*Prototype_General_PointerGeneralPointerGeneralGeneral)(
+typedef int32_t (*Prototype_Int32_GeneralInt32Int32Int64)(int32_t, int32_t,
+                                                          int32_t, int64_t);
+typedef int32_t (*Prototype_Int32_GeneralInt32Int32General)(int32_t, int32_t,
+                                                            int32_t, int32_t);
+typedef int32_t (*Prototype_Int32_GeneralInt32Int64Int64)(int32_t, int32_t,
+                                                          int64_t, int64_t);
+typedef int32_t (*Prototype_Int32_GeneralInt32GeneralInt32)(int32_t, int32_t,
+                                                            int32_t, int32_t);
+typedef int32_t (*Prototype_Int32_GeneralInt32GeneralInt32Int32)(
     int32_t, int32_t, int32_t, int32_t, int32_t);
-typedef int32_t (*Prototype_General_PointerPointer)(int32_t, int32_t);
-typedef int32_t (*Prototype_General_PointerPointerGeneralGeneral)(int32_t,
-                                                                  int32_t,
-                                                                  int32_t,
-                                                                  int32_t);
-typedef int32_t (*Prototype_Pointer_PointerGeneral)(int32_t, int32_t);
-typedef int32_t (*Prototype_Pointer_PointerGeneralGeneral)(int32_t, int32_t,
-                                                           int32_t);
-typedef int32_t (*Prototype_Pointer_PointerGeneralGeneralPointer)(int32_t,
-                                                                  int32_t,
-                                                                  int32_t,
-                                                                  int32_t);
+typedef int32_t (*Prototype_Int32_GeneralGeneral)(int32_t, int32_t);
+typedef int32_t (*Prototype_Int32_GeneralGeneralInt32Int32)(int32_t, int32_t,
+                                                            int32_t, int32_t);
+typedef int32_t (*Prototype_General_GeneralInt32)(int32_t, int32_t);
+typedef int32_t (*Prototype_General_GeneralInt32Int32)(int32_t, int32_t,
+                                                       int32_t);
+typedef int32_t (*Prototype_General_GeneralInt32Int32General)(int32_t, int32_t,
+                                                              int32_t, int32_t);
 
 // Fill the volatile registers with scratch values.
 //
 // Some of the ABI calls assume that the float registers are not scratched,
 // even though the ABI defines them as volatile - a performance
 // optimization. These are all calls passing operands in integer registers,
 // so for now the simulator does not scratch any float registers for these
 // calls. Should try to narrow it further in future.
@@ -2788,155 +2778,149 @@ void Simulator::softwareInterrupt(SimIns
               reinterpret_cast<Prototype_Double_DoubleDoubleDoubleDouble>(
                   external);
           double dresult = target(dval0, dval1, dval2, dval3);
           scratchVolatileRegisters(/* scratchFloat = true */);
           setCallResultDouble(dresult);
           break;
         }
 
-        case Args_General_Pointer: {
-          Prototype_General_Pointer target =
-              reinterpret_cast<Prototype_General_Pointer>(external);
+        case Args_Int32_General: {
+          Prototype_Int32_General target =
+              reinterpret_cast<Prototype_Int32_General>(external);
           int64_t result = target(arg0);
           scratchVolatileRegisters(/* scratchFloat = true */);
           setCallResult(result);
           break;
         }
-        case Args_General_PointerGeneral: {
-          Prototype_General_PointerGeneral target =
-              reinterpret_cast<Prototype_General_PointerGeneral>(external);
+        case Args_Int32_GeneralInt32: {
+          Prototype_Int32_GeneralInt32 target =
+              reinterpret_cast<Prototype_Int32_GeneralInt32>(external);
           int64_t result = target(arg0, arg1);
           scratchVolatileRegisters(/* scratchFloat = true */);
           setCallResult(result);
           break;
         }
-        case Args_General_PointerGeneralGeneral: {
-          Prototype_General_PointerGeneralGeneral target =
-              reinterpret_cast<Prototype_General_PointerGeneralGeneral>(
-                  external);
+        case Args_Int32_GeneralInt32Int32: {
+          Prototype_Int32_GeneralInt32Int32 target =
+              reinterpret_cast<Prototype_Int32_GeneralInt32Int32>(external);
           int64_t result = target(arg0, arg1, arg2);
           scratchVolatileRegisters(/* scratchFloat = true */);
           setCallResult(result);
           break;
         }
-        case Args_General_PointerGeneralGeneralGeneralGeneral: {
-          Prototype_General_PointerGeneralGeneralGeneralGeneral target =
-              reinterpret_cast<
-                  Prototype_General_PointerGeneralGeneralGeneralGeneral>(
+        case Args_Int32_GeneralInt32Int32Int32Int32: {
+          Prototype_Int32_GeneralInt32Int32Int32Int32 target =
+              reinterpret_cast<Prototype_Int32_GeneralInt32Int32Int32Int32>(
                   external);
           int64_t result = target(arg0, arg1, arg2, arg3, arg4);
           scratchVolatileRegisters(/* scratchFloat = true */);
           setCallResult(result);
           break;
         }
-        case Args_General_PointerGeneralGeneralGeneralGeneralGeneral: {
-          Prototype_General_PointerGeneralGeneralGeneralGeneralGeneral target =
+        case Args_Int32_GeneralInt32Int32Int32Int32Int32: {
+          Prototype_Int32_GeneralInt32Int32Int32Int32Int32 target =
               reinterpret_cast<
-                  Prototype_General_PointerGeneralGeneralGeneralGeneralGeneral>(
-                  external);
+                  Prototype_Int32_GeneralInt32Int32Int32Int32Int32>(external);
           int64_t result = target(arg0, arg1, arg2, arg3, arg4, arg5);
           scratchVolatileRegisters(/* scratchFloat = true */);
           setCallResult(result);
           break;
         }
-        case Args_General_PointerGeneralGeneralGeneralPointer: {
-          Prototype_General_PointerGeneralGeneralGeneralPointer target =
-              reinterpret_cast<
-                  Prototype_General_PointerGeneralGeneralGeneralPointer>(
+        case Args_Int32_GeneralInt32Int32Int32General: {
+          Prototype_Int32_GeneralInt32Int32Int32General target =
+              reinterpret_cast<Prototype_Int32_GeneralInt32Int32Int32General>(
                   external);
           int64_t result = target(arg0, arg1, arg2, arg3, arg4);
           scratchVolatileRegisters(/* scratchFloat = true */);
           setCallResult(result);
           break;
         }
-        case Args_General_PointerGeneralGeneralInt64: {
-          Prototype_General_PointerGeneralGeneralInt64 target =
-              reinterpret_cast<Prototype_General_PointerGeneralGeneralInt64>(
+        case Args_Int32_GeneralInt32Int32Int64: {
+          Prototype_Int32_GeneralInt32Int32Int64 target =
+              reinterpret_cast<Prototype_Int32_GeneralInt32Int32Int64>(
                   external);
           int64_t result = target(arg0, arg1, arg2, MakeInt64(arg3, arg4));
           scratchVolatileRegisters(/* scratchFloat = true */);
           setCallResult(result);
           break;
         }
-        case Args_General_PointerGeneralGeneralPointer: {
-          Prototype_General_PointerGeneralGeneralPointer target =
-              reinterpret_cast<Prototype_General_PointerGeneralGeneralPointer>(
+        case Args_Int32_GeneralInt32Int32General: {
+          Prototype_Int32_GeneralInt32Int32General target =
+              reinterpret_cast<Prototype_Int32_GeneralInt32Int32General>(
                   external);
           int64_t result = target(arg0, arg1, arg2, arg3);
           scratchVolatileRegisters(/* scratchFloat = true */);
           setCallResult(result);
           break;
         }
-        case Args_General_PointerGeneralInt64Int64: {
-          Prototype_General_PointerGeneralInt64Int64 target =
-              reinterpret_cast<Prototype_General_PointerGeneralInt64Int64>(
+        case Args_Int32_GeneralInt32Int64Int64: {
+          Prototype_Int32_GeneralInt32Int64Int64 target =
+              reinterpret_cast<Prototype_Int32_GeneralInt32Int64Int64>(
                   external);
           int64_t result =
               target(arg0, arg1, MakeInt64(arg2, arg3), MakeInt64(arg4, arg5));
           scratchVolatileRegisters(/* scratchFloat = true */);
           setCallResult(result);
           break;
         }
-        case Args_General_PointerGeneralPointerGeneral: {
-          Prototype_General_PointerGeneralPointerGeneral target =
-              reinterpret_cast<Prototype_General_PointerGeneralPointerGeneral>(
+        case Args_Int32_GeneralInt32GeneralInt32: {
+          Prototype_Int32_GeneralInt32GeneralInt32 target =
+              reinterpret_cast<Prototype_Int32_GeneralInt32GeneralInt32>(
                   external);
           int64_t result = target(arg0, arg1, arg2, arg3);
           scratchVolatileRegisters(/* scratchFloat = true */);
           setCallResult(result);
           break;
         }
-        case Args_General_PointerGeneralPointerGeneralGeneral: {
-          Prototype_General_PointerGeneralPointerGeneralGeneral target =
-              reinterpret_cast<
-                  Prototype_General_PointerGeneralPointerGeneralGeneral>(
+        case Args_Int32_GeneralInt32GeneralInt32Int32: {
+          Prototype_Int32_GeneralInt32GeneralInt32Int32 target =
+              reinterpret_cast<Prototype_Int32_GeneralInt32GeneralInt32Int32>(
                   external);
           int64_t result = target(arg0, arg1, arg2, arg3, arg4);
           scratchVolatileRegisters(/* scratchFloat = true */);
           setCallResult(result);
           break;
         }
-        case Args_General_PointerPointer: {
-          Prototype_General_PointerPointer target =
-              reinterpret_cast<Prototype_General_PointerPointer>(external);
+        case Args_Int32_GeneralGeneral: {
+          Prototype_Int32_GeneralGeneral target =
+              reinterpret_cast<Prototype_Int32_GeneralGeneral>(external);
           int64_t result = target(arg0, arg1);
           scratchVolatileRegisters(/* scratchFloat = true */);
           setCallResult(result);
           break;
         }
-        case Args_General_PointerPointerGeneralGeneral: {
-          Prototype_General_PointerPointerGeneralGeneral target =
-              reinterpret_cast<Prototype_General_PointerPointerGeneralGeneral>(
+        case Args_Int32_GeneralGeneralInt32Int32: {
+          Prototype_Int32_GeneralGeneralInt32Int32 target =
+              reinterpret_cast<Prototype_Int32_GeneralGeneralInt32Int32>(
                   external);
           int64_t result = target(arg0, arg1, arg2, arg3);
           scratchVolatileRegisters(/* scratchFloat = true */);
           setCallResult(result);
           break;
         }
-        case Args_Pointer_PointerGeneral: {
-          Prototype_Pointer_PointerGeneral target =
-              reinterpret_cast<Prototype_Pointer_PointerGeneral>(external);
+        case Args_General_GeneralInt32: {
+          Prototype_General_GeneralInt32 target =
+              reinterpret_cast<Prototype_General_GeneralInt32>(external);
           int64_t result = target(arg0, arg1);
           scratchVolatileRegisters(/* scratchFloat = true */);
           setCallResult(result);
           break;
         }
-        case Args_Pointer_PointerGeneralGeneral: {
-          Prototype_Pointer_PointerGeneralGeneral target =
-              reinterpret_cast<Prototype_Pointer_PointerGeneralGeneral>(
-                  external);
+        case Args_General_GeneralInt32Int32: {
+          Prototype_General_GeneralInt32Int32 target =
+              reinterpret_cast<Prototype_General_GeneralInt32Int32>(external);
           int64_t result = target(arg0, arg1, arg2);
           scratchVolatileRegisters(/* scratchFloat = true */);
           setCallResult(result);
           break;
         }
-        case Args_Pointer_PointerGeneralGeneralPointer: {
-          Prototype_Pointer_PointerGeneralGeneralPointer target =
-              reinterpret_cast<Prototype_Pointer_PointerGeneralGeneralPointer>(
+        case Args_General_GeneralInt32Int32General: {
+          Prototype_General_GeneralInt32Int32General target =
+              reinterpret_cast<Prototype_General_GeneralInt32Int32General>(
                   external);
           int64_t result = target(arg0, arg1, arg2, arg3);
           scratchVolatileRegisters(/* scratchFloat = true */);
           setCallResult(result);
           break;
         }
 
         default:
--- a/js/src/jit/arm64/vixl/MozSimulator-vixl.cpp
+++ b/js/src/jit/arm64/vixl/MozSimulator-vixl.cpp
@@ -489,32 +489,69 @@ typedef double (*Prototype_Double_Double
 typedef double (*Prototype_Double_Int)(int64_t arg0);
 typedef double (*Prototype_Double_DoubleInt)(double arg0, int64_t arg1);
 typedef double (*Prototype_Double_IntDouble)(int64_t arg0, double arg1);
 typedef double (*Prototype_Double_DoubleDouble)(double arg0, double arg1);
 typedef double (*Prototype_Double_DoubleDoubleDouble)(double arg0, double arg1, double arg2);
 typedef double (*Prototype_Double_DoubleDoubleDoubleDouble)(double arg0, double arg1,
                                                             double arg2, double arg3);
 
-typedef int64_t (*Prototype_General_Pointer)(int64_t);
-typedef int64_t (*Prototype_General_PointerGeneral)(int64_t, int64_t);
-typedef int64_t (*Prototype_General_PointerGeneralGeneral)(int64_t, int64_t, int64_t);
-typedef int64_t (*Prototype_General_PointerGeneralGeneralGeneralGeneral)(int64_t, int64_t, int64_t, int64_t, int64_t);
-typedef int64_t (*Prototype_General_PointerGeneralGeneralGeneralGeneralGeneral)(int64_t, int64_t, int64_t, int64_t, int64_t, int64_t);
-typedef int64_t (*Prototype_General_PointerGeneralGeneralGeneralPointer)(int64_t, int64_t, int64_t, int64_t, int64_t);
-typedef int64_t (*Prototype_General_PointerGeneralGeneralInt64)(int64_t, int64_t, int64_t, int64_t);
-typedef int64_t (*Prototype_General_PointerGeneralGeneralPointer)(int64_t, int64_t, int64_t, int64_t);
-typedef int64_t (*Prototype_General_PointerGeneralInt64Int64)(int64_t, int64_t, int64_t, int64_t);
-typedef int64_t (*Prototype_General_PointerGeneralPointerGeneral)(int64_t, int64_t, int64_t, int64_t);
-typedef int64_t (*Prototype_General_PointerGeneralPointerGeneralGeneral)(int64_t, int64_t, int64_t, int64_t, int64_t);
-typedef int64_t (*Prototype_General_PointerPointer)(int64_t, int64_t);
-typedef int64_t (*Prototype_General_PointerPointerGeneralGeneral)(int64_t, int64_t, int64_t, int64_t);
-typedef int64_t (*Prototype_Pointer_PointerGeneral)(int64_t, int64_t);
-typedef int64_t (*Prototype_Pointer_PointerGeneralGeneral)(int64_t, int64_t, int64_t);
-typedef int64_t (*Prototype_Pointer_PointerGeneralGeneralPointer)(int64_t, int64_t, int64_t, int64_t);
+typedef int32_t (*Prototype_Int32_General)(int64_t);
+typedef int32_t (*Prototype_Int32_GeneralInt32)(int64_t, int32_t);
+typedef int32_t (*Prototype_Int32_GeneralInt32Int32)(int64_t, int32_t, int32_t);
+typedef int32_t (*Prototype_Int32_GeneralInt32Int32Int32Int32)(int64_t,
+                                                               int32_t,
+                                                               int32_t,
+                                                               int32_t,
+                                                               int32_t);
+typedef int32_t (*Prototype_Int32_GeneralInt32Int32Int32Int32Int32)(int64_t,
+                                                                    int32_t,
+                                                                    int32_t,
+                                                                    int32_t,
+                                                                    int32_t,
+                                                                    int32_t);
+typedef int32_t (*Prototype_Int32_GeneralInt32Int32Int32General)(int64_t,
+                                                                 int32_t,
+                                                                 int32_t,
+                                                                 int32_t,
+                                                                 int64_t);
+typedef int32_t (*Prototype_Int32_GeneralInt32Int32Int64)(int64_t,
+                                                          int32_t,
+                                                          int32_t,
+                                                          int64_t);
+typedef int32_t (*Prototype_Int32_GeneralInt32Int32General)(int64_t,
+                                                            int32_t,
+                                                            int32_t,
+                                                            int64_t);
+typedef int32_t (*Prototype_Int32_GeneralInt32Int64Int64)(int64_t,
+                                                          int32_t,
+                                                          int64_t,
+                                                          int64_t);
+typedef int32_t (*Prototype_Int32_GeneralInt32GeneralInt32)(int64_t,
+                                                            int32_t,
+                                                            int64_t,
+                                                            int32_t);
+typedef int32_t (*Prototype_Int32_GeneralInt32GeneralInt32Int32)(int64_t,
+                                                                 int32_t,
+                                                                 int64_t,
+                                                                 int32_t,
+                                                                 int32_t);
+typedef int32_t (*Prototype_Int32_GeneralGeneral)(int64_t, int64_t);
+typedef int32_t (*Prototype_Int32_GeneralGeneralInt32Int32)(int64_t,
+                                                            int64_t,
+                                                            int32_t,
+                                                            int32_t);
+typedef int64_t (*Prototype_General_GeneralInt32)(int64_t, int32_t);
+typedef int64_t (*Prototype_General_GeneralInt32Int32)(int64_t,
+                                                       int32_t,
+                                                       int32_t);
+typedef int64_t (*Prototype_General_GeneralInt32Int32General)(int64_t,
+                                                              int32_t,
+                                                              int32_t,
+                                                              int64_t);
 
 // Simulator support for callWithABI().
 void
 Simulator::VisitCallRedirection(const Instruction* instr)
 {
   VIXL_ASSERT(instr->Mask(ExceptionMask) == SVC);
   VIXL_ASSERT(instr->ImmException() == kCallRtRedirected);
 
@@ -701,93 +738,113 @@ Simulator::VisitCallRedirection(const In
     }
 
     case js::jit::Args_Double_IntDouble: {
       double ret = reinterpret_cast<Prototype_Double_IntDouble>(nativeFn)(x0, d0);
       setFP64Result(ret);
       break;
     }
 
-    case js::jit::Args_General_Pointer: {
-      int64_t ret = reinterpret_cast<Prototype_General_Pointer>(nativeFn)(x0);
-      setGPR64Result(ret);
+    case js::jit::Args_Int32_General: {
+      int32_t ret = reinterpret_cast<Prototype_Int32_General>(nativeFn)(x0);
+      setGPR32Result(ret);
+      break;
+    }
+    case js::jit::Args_Int32_GeneralInt32: {
+      int32_t ret =
+          reinterpret_cast<Prototype_Int32_GeneralInt32>(nativeFn)(x0, x1);
+      setGPR32Result(ret);
+      break;
+    }
+    case js::jit::Args_Int32_GeneralInt32Int32: {
+      int32_t ret = reinterpret_cast<Prototype_Int32_GeneralInt32Int32>(
+          nativeFn)(x0, x1, x2);
+      setGPR32Result(ret);
       break;
     }
-    case js::jit::Args_General_PointerGeneral: {
-      int64_t ret = reinterpret_cast<Prototype_General_PointerGeneral>(nativeFn)(x0, x1);
-      setGPR64Result(ret);
+    case js::jit::Args_Int32_GeneralInt32Int32Int32Int32: {
+      int32_t ret =
+          reinterpret_cast<Prototype_Int32_GeneralInt32Int32Int32Int32>(
+              nativeFn)(x0, x1, x2, x3, x4);
+      setGPR32Result(ret);
       break;
     }
-    case js::jit::Args_General_PointerGeneralGeneral: {
-      int64_t ret = reinterpret_cast<Prototype_General_PointerGeneralGeneral>(nativeFn)(x0, x1, x2);
-      setGPR64Result(ret);
+    case js::jit::Args_Int32_GeneralInt32Int32Int32Int32Int32: {
+      int32_t ret =
+          reinterpret_cast<Prototype_Int32_GeneralInt32Int32Int32Int32Int32>(
+              nativeFn)(x0, x1, x2, x3, x4, x5);
+      setGPR32Result(ret);
+      break;
+    }
+    case js::jit::Args_Int32_GeneralInt32Int32Int32General: {
+      int32_t ret =
+          reinterpret_cast<Prototype_Int32_GeneralInt32Int32Int32General>(
+              nativeFn)(x0, x1, x2, x3, x4);
+      setGPR32Result(ret);
       break;
     }
-    case js::jit::Args_General_PointerGeneralGeneralGeneralGeneral: {
-      int64_t ret = reinterpret_cast<Prototype_General_PointerGeneralGeneralGeneralGeneral>(nativeFn)(x0, x1, x2, x3, x4);
-      setGPR64Result(ret);
+    case js::jit::Args_Int32_GeneralInt32Int32Int64: {
+      int32_t ret = reinterpret_cast<Prototype_Int32_GeneralInt32Int32Int64>(
+          nativeFn)(x0, x1, x2, x3);
+      setGPR32Result(ret);
+      break;
+    }
+    case js::jit::Args_Int32_GeneralInt32Int32General: {
+      int32_t ret = reinterpret_cast<Prototype_Int32_GeneralInt32Int32General>(
+          nativeFn)(x0, x1, x2, x3);
+      setGPR32Result(ret);
+      break;
+    }
+    case js::jit::Args_Int32_GeneralInt32Int64Int64: {
+      int32_t ret = reinterpret_cast<Prototype_Int32_GeneralInt32Int64Int64>(
+          nativeFn)(x0, x1, x2, x3);
+      setGPR32Result(ret);
       break;
     }
-    case js::jit::Args_General_PointerGeneralGeneralGeneralGeneralGeneral: {
-      int64_t ret = reinterpret_cast<Prototype_General_PointerGeneralGeneralGeneralGeneralGeneral>(nativeFn)(x0, x1, x2, x3, x4, x5);
-      setGPR64Result(ret);
+    case js::jit::Args_Int32_GeneralInt32GeneralInt32: {
+      int32_t ret = reinterpret_cast<Prototype_Int32_GeneralInt32GeneralInt32>(
+          nativeFn)(x0, x1, x2, x3);
+      setGPR32Result(ret);
+      break;
+    }
+    case js::jit::Args_Int32_GeneralInt32GeneralInt32Int32: {
+      int32_t ret =
+          reinterpret_cast<Prototype_Int32_GeneralInt32GeneralInt32Int32>(
+              nativeFn)(x0, x1, x2, x3, x4);
+      setGPR32Result(ret);
       break;
     }
-    case js::jit::Args_General_PointerGeneralGeneralGeneralPointer: {
-      int64_t ret = reinterpret_cast<Prototype_General_PointerGeneralGeneralGeneralPointer>(nativeFn)(x0, x1, x2, x3, x4);
-      setGPR64Result(ret);
+    case js::jit::Args_Int32_GeneralGeneral: {
+      int32_t ret =
+          reinterpret_cast<Prototype_Int32_GeneralGeneral>(nativeFn)(x0, x1);
+      setGPR32Result(ret);
       break;
     }
-    case js::jit::Args_General_PointerGeneralGeneralInt64: {
-      int64_t ret = reinterpret_cast<Prototype_General_PointerGeneralGeneralInt64>(nativeFn)(x0, x1, x2, x3);
+    case js::jit::Args_Int32_GeneralGeneralInt32Int32: {
+      int32_t ret = reinterpret_cast<Prototype_Int32_GeneralGeneralInt32Int32>(
+          nativeFn)(x0, x1, x2, x3);
+      setGPR32Result(ret);
+      break;
+    }
+    case js::jit::Args_General_GeneralInt32: {
+      int64_t ret =
+          reinterpret_cast<Prototype_General_GeneralInt32>(nativeFn)(x0, x1);
       setGPR64Result(ret);
       break;
     }
-    case js::jit::Args_General_PointerGeneralGeneralPointer: {
-      int64_t ret = reinterpret_cast<Prototype_General_PointerGeneralGeneralPointer>(nativeFn)(x0, x1, x2, x3);
-      setGPR64Result(ret);
-      break;
-    }
-    case js::jit::Args_General_PointerGeneralInt64Int64: {
-      int64_t ret = reinterpret_cast<Prototype_General_PointerGeneralInt64Int64>(nativeFn)(x0, x1, x2, x3);
-      setGPR64Result(ret);
-      break;
-    }
-    case js::jit::Args_General_PointerGeneralPointerGeneral: {
-      int64_t ret = reinterpret_cast<Prototype_General_PointerGeneralPointerGeneral>(nativeFn)(x0, x1, x2, x3);
-      setGPR64Result(ret);
-      break;
-    }
-    case js::jit::Args_General_PointerGeneralPointerGeneralGeneral: {
-      int64_t ret = reinterpret_cast<Prototype_General_PointerGeneralPointerGeneralGeneral>(nativeFn)(x0, x1, x2, x3, x4);
+    case js::jit::Args_General_GeneralInt32Int32: {
+      int64_t ret = reinterpret_cast<Prototype_General_GeneralInt32Int32>(
+          nativeFn)(x0, x1, x2);
       setGPR64Result(ret);
       break;
     }
-    case js::jit::Args_General_PointerPointer: {
-      int64_t ret = reinterpret_cast<Prototype_General_PointerPointer>(nativeFn)(x0, x1);
-      setGPR64Result(ret);
-      break;
-    }
-    case js::jit::Args_General_PointerPointerGeneralGeneral: {
-      int64_t ret = reinterpret_cast<Prototype_General_PointerPointerGeneralGeneral>(nativeFn)(x0, x1, x2, x3);
-      setGPR64Result(ret);
-      break;
-    }
-    case js::jit::Args_Pointer_PointerGeneral: {
-      int64_t ret = reinterpret_cast<Prototype_Pointer_PointerGeneral>(nativeFn)(x0, x1);
-      setGPR64Result(ret);
-      break;
-    }
-    case js::jit::Args_Pointer_PointerGeneralGeneral: {
-      int64_t ret = reinterpret_cast<Prototype_Pointer_PointerGeneralGeneral>(nativeFn)(x0, x1, x2);
-      setGPR64Result(ret);
-      break;
-    }
-    case js::jit::Args_Pointer_PointerGeneralGeneralPointer: {
-      int64_t ret = reinterpret_cast<Prototype_Pointer_PointerGeneralGeneralPointer>(nativeFn)(x0, x1, x2, x3);
+    case js::jit::Args_General_GeneralInt32Int32General: {
+      int64_t ret =
+          reinterpret_cast<Prototype_General_GeneralInt32Int32General>(
+              nativeFn)(x0, x1, x2, x3);
       setGPR64Result(ret);
       break;
     }
 
     default:
       MOZ_CRASH("Unknown function type.");
   }
 
--- a/js/src/wasm/WasmBuiltins.cpp
+++ b/js/src/wasm/WasmBuiltins.cpp
@@ -222,35 +222,35 @@ const SymbolicAddressSignature SASigStru
 #undef _Infallible
 #undef _FailOnNegI32
 #undef _FailOnNullPtr
 
 #ifdef DEBUG
 ABIArgType ToABIType(FailureMode mode) {
   switch (mode) {
     case FailureMode::FailOnNegI32:
-      return ArgType_General;
+      return ArgType_Int32;
     case FailureMode::FailOnNullPtr:
     case FailureMode::FailOnInvalidRef:
-      return ArgType_Pointer;
+      return ArgType_General;
     default:
       MOZ_CRASH("unexpected failure mode");
   }
 }
 
 ABIArgType ToABIType(MIRType type) {
   switch (type) {
     case MIRType::None:
     case MIRType::Int32:
-      return ArgType_General;
+      return ArgType_Int32;
     case MIRType::Int64:
       return ArgType_Int64;
     case MIRType::Pointer:
     case MIRType::RefOrNull:
-      return ArgType_Pointer;
+      return ArgType_General;
     case MIRType::Float32:
       return ArgType_Float32;
     case MIRType::Double:
       return ArgType_Double;
     default:
       MOZ_CRASH("unexpected type");
   }
 }
@@ -715,43 +715,43 @@ void* wasm::AddressOf(SymbolicAddress im
     case SymbolicAddress::HandleTrap:
       *abiType = Args_General0;
       return FuncCast(WasmHandleTrap, *abiType);
     case SymbolicAddress::ReportInt64JSCall:
       *abiType = Args_General0;
       return FuncCast(WasmReportInt64JSCall, *abiType);
     case SymbolicAddress::CallImport_Void:
       *abiType = MakeABIFunctionType(
-          ArgType_General,
-          {ArgType_Pointer, ArgType_General, ArgType_General, ArgType_Pointer});
+          ArgType_Int32,
+          {ArgType_General, ArgType_Int32, ArgType_Int32, ArgType_General});
       return FuncCast(Instance::callImport_void, *abiType);
     case SymbolicAddress::CallImport_I32:
       *abiType = MakeABIFunctionType(
-          ArgType_General,
-          {ArgType_Pointer, ArgType_General, ArgType_General, ArgType_Pointer});
+          ArgType_Int32,
+          {ArgType_General, ArgType_Int32, ArgType_Int32, ArgType_General});
       return FuncCast(Instance::callImport_i32, *abiType);
     case SymbolicAddress::CallImport_I64:
       *abiType = MakeABIFunctionType(
-          ArgType_General,
-          {ArgType_Pointer, ArgType_General, ArgType_General, ArgType_Pointer});
+          ArgType_Int32,
+          {ArgType_General, ArgType_Int32, ArgType_Int32, ArgType_General});
       return FuncCast(Instance::callImport_i64, *abiType);
     case SymbolicAddress::CallImport_F64:
       *abiType = MakeABIFunctionType(
-          ArgType_General,
-          {ArgType_Pointer, ArgType_General, ArgType_General, ArgType_Pointer});
+          ArgType_Int32,
+          {ArgType_General, ArgType_Int32, ArgType_Int32, ArgType_General});
       return FuncCast(Instance::callImport_f64, *abiType);
     case SymbolicAddress::CallImport_FuncRef:
       *abiType = MakeABIFunctionType(
-          ArgType_General,
-          {ArgType_Pointer, ArgType_General, ArgType_General, ArgType_Pointer});
+          ArgType_Int32,
+          {ArgType_General, ArgType_Int32, ArgType_Int32, ArgType_General});
       return FuncCast(Instance::callImport_funcref, *abiType);
     case SymbolicAddress::CallImport_AnyRef:
       *abiType = MakeABIFunctionType(
-          ArgType_General,
-          {ArgType_Pointer, ArgType_General, ArgType_General, ArgType_Pointer});
+          ArgType_Int32,
+          {ArgType_General, ArgType_Int32, ArgType_Int32, ArgType_General});
       return FuncCast(Instance::callImport_anyref, *abiType);
     case SymbolicAddress::CoerceInPlace_ToInt32:
       *abiType = Args_General1;
       return FuncCast(CoerceInPlace_ToInt32, *abiType);
     case SymbolicAddress::CoerceInPlace_ToNumber:
       *abiType = Args_General1;
       return FuncCast(CoerceInPlace_ToNumber, *abiType);
     case SymbolicAddress::CoerceInPlace_JitEntry:
@@ -858,145 +858,145 @@ void* wasm::AddressOf(SymbolicAddress im
     case SymbolicAddress::PowD:
       *abiType = Args_Double_DoubleDouble;
       return FuncCast(ecmaPow, *abiType);
     case SymbolicAddress::ATan2D:
       *abiType = Args_Double_DoubleDouble;
       return FuncCast(ecmaAtan2, *abiType);
 
     case SymbolicAddress::MemoryGrow:
-      *abiType = MakeABIFunctionType(ArgType_General,
-                                     {ArgType_Pointer, ArgType_General});
+      *abiType =
+          MakeABIFunctionType(ArgType_Int32, {ArgType_General, ArgType_Int32});
       MOZ_ASSERT(*abiType == ToABIType(SASigMemoryGrow));
       return FuncCast(Instance::memoryGrow_i32, *abiType);
     case SymbolicAddress::MemorySize:
-      *abiType = MakeABIFunctionType(ArgType_General, {ArgType_Pointer});
+      *abiType = MakeABIFunctionType(ArgType_Int32, {ArgType_General});
       MOZ_ASSERT(*abiType == ToABIType(SASigMemorySize));
       return FuncCast(Instance::memorySize_i32, *abiType);
     case SymbolicAddress::WaitI32:
       *abiType = MakeABIFunctionType(
-          ArgType_General,
-          {ArgType_Pointer, ArgType_General, ArgType_General, ArgType_Int64});
+          ArgType_Int32,
+          {ArgType_General, ArgType_Int32, ArgType_Int32, ArgType_Int64});
       MOZ_ASSERT(*abiType == ToABIType(SASigWaitI32));
       return FuncCast(Instance::wait_i32, *abiType);
     case SymbolicAddress::WaitI64:
       *abiType = MakeABIFunctionType(
-          ArgType_General,
-          {ArgType_Pointer, ArgType_General, ArgType_Int64, ArgType_Int64});
+          ArgType_Int32,
+          {ArgType_General, ArgType_Int32, ArgType_Int64, ArgType_Int64});
       MOZ_ASSERT(*abiType == ToABIType(SASigWaitI64));
       return FuncCast(Instance::wait_i64, *abiType);
     case SymbolicAddress::Wake:
       *abiType = MakeABIFunctionType(
-          ArgType_General, {ArgType_Pointer, ArgType_General, ArgType_General});
+          ArgType_Int32, {ArgType_General, ArgType_Int32, ArgType_Int32});
       MOZ_ASSERT(*abiType == ToABIType(SASigWake));
       return FuncCast(Instance::wake, *abiType);
     case SymbolicAddress::MemCopy:
       *abiType = MakeABIFunctionType(
-          ArgType_General, {ArgType_Pointer, ArgType_General, ArgType_General,
-                            ArgType_General, ArgType_Pointer});
+          ArgType_Int32, {ArgType_General, ArgType_Int32, ArgType_Int32,
+                          ArgType_Int32, ArgType_General});
       MOZ_ASSERT(*abiType == ToABIType(SASigMemCopy));
       return FuncCast(Instance::memCopy, *abiType);
     case SymbolicAddress::MemCopyShared:
       *abiType = MakeABIFunctionType(
-          ArgType_General, {ArgType_Pointer, ArgType_General, ArgType_General,
-                            ArgType_General, ArgType_Pointer});
+          ArgType_Int32, {ArgType_General, ArgType_Int32, ArgType_Int32,
+                          ArgType_Int32, ArgType_General});
       MOZ_ASSERT(*abiType == ToABIType(SASigMemCopyShared));
       return FuncCast(Instance::memCopyShared, *abiType);
     case SymbolicAddress::DataDrop:
-      *abiType = MakeABIFunctionType(ArgType_General,
-                                     {ArgType_Pointer, ArgType_General});
+      *abiType =
+          MakeABIFunctionType(ArgType_Int32, {ArgType_General, ArgType_Int32});
       MOZ_ASSERT(*abiType == ToABIType(SASigDataDrop));
       return FuncCast(Instance::dataDrop, *abiType);
     case SymbolicAddress::MemFill:
       *abiType = MakeABIFunctionType(
-          ArgType_General, {ArgType_Pointer, ArgType_General, ArgType_General,
-                            ArgType_General, ArgType_Pointer});
+          ArgType_Int32, {ArgType_General, ArgType_Int32, ArgType_Int32,
+                          ArgType_Int32, ArgType_General});
       MOZ_ASSERT(*abiType == ToABIType(SASigMemFill));
       return FuncCast(Instance::memFill, *abiType);
     case SymbolicAddress::MemFillShared:
       *abiType = MakeABIFunctionType(
-          ArgType_General, {ArgType_Pointer, ArgType_General, ArgType_General,
-                            ArgType_General, ArgType_Pointer});
+          ArgType_Int32, {ArgType_General, ArgType_Int32, ArgType_Int32,
+                          ArgType_Int32, ArgType_General});
       MOZ_ASSERT(*abiType == ToABIType(SASigMemFillShared));
       return FuncCast(Instance::memFillShared, *abiType);
     case SymbolicAddress::MemInit:
       *abiType = MakeABIFunctionType(
-          ArgType_General, {ArgType_Pointer, ArgType_General, ArgType_General,
-                            ArgType_General, ArgType_General});
+          ArgType_Int32, {ArgType_General, ArgType_Int32, ArgType_Int32,
+                          ArgType_Int32, ArgType_Int32});
       MOZ_ASSERT(*abiType == ToABIType(SASigMemInit));
       return FuncCast(Instance::memInit, *abiType);
     case SymbolicAddress::TableCopy:
       *abiType = MakeABIFunctionType(
-          ArgType_General, {ArgType_Pointer, ArgType_General, ArgType_General,
-                            ArgType_General, ArgType_General, ArgType_General});
+          ArgType_Int32, {ArgType_General, ArgType_Int32, ArgType_Int32,
+                          ArgType_Int32, ArgType_Int32, ArgType_Int32});
       MOZ_ASSERT(*abiType == ToABIType(SASigTableCopy));
       return FuncCast(Instance::tableCopy, *abiType);
     case SymbolicAddress::ElemDrop:
-      *abiType = MakeABIFunctionType(ArgType_General,
-                                     {ArgType_Pointer, ArgType_General});
+      *abiType =
+          MakeABIFunctionType(ArgType_Int32, {ArgType_General, ArgType_Int32});
       MOZ_ASSERT(*abiType == ToABIType(SASigElemDrop));
       return FuncCast(Instance::elemDrop, *abiType);
     case SymbolicAddress::TableFill:
       *abiType = MakeABIFunctionType(
-          ArgType_General, {ArgType_Pointer, ArgType_General, ArgType_Pointer,
-                            ArgType_General, ArgType_General});
+          ArgType_Int32, {ArgType_General, ArgType_Int32, ArgType_General,
+                          ArgType_Int32, ArgType_Int32});
       MOZ_ASSERT(*abiType == ToABIType(SASigTableFill));
       return FuncCast(Instance::tableFill, *abiType);
     case SymbolicAddress::TableInit:
       *abiType = MakeABIFunctionType(
-          ArgType_General, {ArgType_Pointer, ArgType_General, ArgType_General,
-                            ArgType_General, ArgType_General, ArgType_General});
+          ArgType_Int32, {ArgType_General, ArgType_Int32, ArgType_Int32,
+                          ArgType_Int32, ArgType_Int32, ArgType_Int32});
       MOZ_ASSERT(*abiType == ToABIType(SASigTableInit));
       return FuncCast(Instance::tableInit, *abiType);
     case SymbolicAddress::TableGet:
       *abiType = MakeABIFunctionType(
-          ArgType_Pointer, {ArgType_Pointer, ArgType_General, ArgType_General});
+          ArgType_General, {ArgType_General, ArgType_Int32, ArgType_Int32});
       MOZ_ASSERT(*abiType == ToABIType(SASigTableGet));
       return FuncCast(Instance::tableGet, *abiType);
     case SymbolicAddress::TableGrow:
       *abiType = MakeABIFunctionType(
-          ArgType_General,
-          {ArgType_Pointer, ArgType_Pointer, ArgType_General, ArgType_General});
+          ArgType_Int32,
+          {ArgType_General, ArgType_General, ArgType_Int32, ArgType_Int32});
       MOZ_ASSERT(*abiType == ToABIType(SASigTableGrow));
       return FuncCast(Instance::tableGrow, *abiType);
     case SymbolicAddress::TableSet:
       *abiType = MakeABIFunctionType(
-          ArgType_General,
-          {ArgType_Pointer, ArgType_General, ArgType_Pointer, ArgType_General});
+          ArgType_Int32,
+          {ArgType_General, ArgType_Int32, ArgType_General, ArgType_Int32});
       MOZ_ASSERT(*abiType == ToABIType(SASigTableSet));
       return FuncCast(Instance::tableSet, *abiType);
     case SymbolicAddress::TableSize:
-      *abiType = MakeABIFunctionType(ArgType_General,
-                                     {ArgType_Pointer, ArgType_General});
+      *abiType =
+          MakeABIFunctionType(ArgType_Int32, {ArgType_General, ArgType_Int32});
       MOZ_ASSERT(*abiType == ToABIType(SASigTableSize));
       return FuncCast(Instance::tableSize, *abiType);
     case SymbolicAddress::FuncRef:
-      *abiType = MakeABIFunctionType(ArgType_Pointer,
-                                     {ArgType_Pointer, ArgType_General});
+      *abiType = MakeABIFunctionType(ArgType_General,
+                                     {ArgType_General, ArgType_Int32});
       MOZ_ASSERT(*abiType == ToABIType(SASigFuncRef));
       return FuncCast(Instance::funcRef, *abiType);
     case SymbolicAddress::PostBarrier:
-      *abiType = MakeABIFunctionType(ArgType_General,
-                                     {ArgType_Pointer, ArgType_Pointer});
+      *abiType = MakeABIFunctionType(ArgType_Int32,
+                                     {ArgType_General, ArgType_General});
       MOZ_ASSERT(*abiType == ToABIType(SASigPostBarrier));
       return FuncCast(Instance::postBarrier, *abiType);
     case SymbolicAddress::PostBarrierFiltering:
-      *abiType = MakeABIFunctionType(ArgType_General,
-                                     {ArgType_Pointer, ArgType_Pointer});
+      *abiType = MakeABIFunctionType(ArgType_Int32,
+                                     {ArgType_General, ArgType_General});
       MOZ_ASSERT(*abiType == ToABIType(SASigPostBarrierFiltering));
       return FuncCast(Instance::postBarrierFiltering, *abiType);
     case SymbolicAddress::StructNew:
-      *abiType = MakeABIFunctionType(ArgType_Pointer,
-                                     {ArgType_Pointer, ArgType_General});
+      *abiType = MakeABIFunctionType(ArgType_General,
+                                     {ArgType_General, ArgType_Int32});
       MOZ_ASSERT(*abiType == ToABIType(SASigStructNew));
       return FuncCast(Instance::structNew, *abiType);
     case SymbolicAddress::StructNarrow:
       *abiType = MakeABIFunctionType(
-          ArgType_Pointer,
-          {ArgType_Pointer, ArgType_General, ArgType_General, ArgType_Pointer});
+          ArgType_General,
+          {ArgType_General, ArgType_Int32, ArgType_Int32, ArgType_General});
       MOZ_ASSERT(*abiType == ToABIType(SASigStructNarrow));
       return FuncCast(Instance::structNarrow, *abiType);
 
 #if defined(JS_CODEGEN_MIPS32)
     case SymbolicAddress::js_jit_gAtomic64Lock:
       return &js::jit::gAtomic64Lock;
 #endif
 #ifdef WASM_CODEGEN_DEBUG