Bug 1593736 - Rename ArgType_Double to ArgType_Float64. r=lth
authorRyan Hunt <rhunt@eqrion.net>
Wed, 13 Nov 2019 14:43:56 +0000
changeset 501749 2475e9e1ea77d8ddeeaf8e9918d360c8f03ec8bb
parent 501748 23218bed721cdac05991d943fc4443a03cfc4cbd
child 501750 5b224b8fe0140093a967e223c2539b3e7669ecff
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
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 - Rename ArgType_Double to ArgType_Float64. r=lth Also shuffle constants and add a comment for clarity. Differential Revision: https://phabricator.services.mozilla.com/D52178
js/src/jit/IonTypes.h
js/src/jit/MacroAssembler-inl.h
js/src/jit/MacroAssembler.h
js/src/wasm/WasmBuiltins.cpp
--- a/js/src/jit/IonTypes.h
+++ b/js/src/jit/IonTypes.h
@@ -708,21 +708,26 @@ static inline MIRType ScalarTypeToMIRTyp
 
 // Make sure registers are not modified between an instruction and
 // its OsiPoint.
 #  define CHECK_OSIPOINT_REGISTERS 1
 
 #endif  // DEBUG
 
 enum ABIArgType {
+  // A pointer sized integer
   ArgType_General = 0x1,
-  ArgType_Double = 0x2,
-  ArgType_Float32 = 0x3,
-  ArgType_Int32 = 0x4,
-  ArgType_Int64 = 0x5,
+  // A 32-bit integer
+  ArgType_Int32 = 0x2,
+  // A 64-bit integer
+  ArgType_Int64 = 0x3,
+  // A 32-bit floating point number
+  ArgType_Float32 = 0x4,
+  // A 64-bit floating point number
+  ArgType_Float64 = 0x5,
 
   RetType_Shift = 0x0,
   ArgType_Shift = 0x3,
   ArgType_Mask = 0x7
 };
 
 namespace detail {
 
@@ -749,92 +754,93 @@ enum ABIFunctionType {
   Args_General4 = Args_General3 | (ArgType_General << (ArgType_Shift * 4)),
   Args_General5 = Args_General4 | (ArgType_General << (ArgType_Shift * 5)),
   Args_General6 = Args_General5 | (ArgType_General << (ArgType_Shift * 6)),
   Args_General7 = Args_General6 | (ArgType_General << (ArgType_Shift * 7)),
   Args_General8 = Args_General7 | (ArgType_General << (ArgType_Shift * 8)),
 
   // int64 f(double)
   Args_Int64_Double =
-      (ArgType_Int64 << RetType_Shift) | (ArgType_Double << ArgType_Shift),
+      (ArgType_Int64 << RetType_Shift) | (ArgType_Float64 << ArgType_Shift),
 
   // double f()
-  Args_Double_None = ArgType_Double << RetType_Shift,
+  Args_Double_None = ArgType_Float64 << RetType_Shift,
 
   // int f(double)
-  Args_Int_Double = Args_General0 | (ArgType_Double << ArgType_Shift),
+  Args_Int_Double = Args_General0 | (ArgType_Float64 << ArgType_Shift),
 
   // int f(float32)
   Args_Int_Float32 = Args_General0 | (ArgType_Float32 << ArgType_Shift),
 
   // float f(float)
   Args_Float32_Float32 =
       (ArgType_Float32 << RetType_Shift) | (ArgType_Float32 << ArgType_Shift),
 
   // float f(int, int)
   Args_Float32_IntInt = (ArgType_Float32 << RetType_Shift) |
                         (ArgType_General << (ArgType_Shift * 1)) |
                         (ArgType_General << (ArgType_Shift * 2)),
 
   // double f(double)
-  Args_Double_Double = Args_Double_None | (ArgType_Double << ArgType_Shift),
+  Args_Double_Double = Args_Double_None | (ArgType_Float64 << ArgType_Shift),
 
   // double f(int)
   Args_Double_Int = Args_Double_None | (ArgType_General << ArgType_Shift),
 
   // double f(int, int)
   Args_Double_IntInt =
       Args_Double_Int | (ArgType_General << (ArgType_Shift * 2)),
 
   // double f(double, int)
   Args_Double_DoubleInt = Args_Double_None |
                           (ArgType_General << (ArgType_Shift * 1)) |
-                          (ArgType_Double << (ArgType_Shift * 2)),
+                          (ArgType_Float64 << (ArgType_Shift * 2)),
 
   // double f(double, double)
   Args_Double_DoubleDouble =
-      Args_Double_Double | (ArgType_Double << (ArgType_Shift * 2)),
+      Args_Double_Double | (ArgType_Float64 << (ArgType_Shift * 2)),
 
   // float f(float, float)
   Args_Float32_Float32Float32 =
       Args_Float32_Float32 | (ArgType_Float32 << (ArgType_Shift * 2)),
 
   // double f(int, double)
   Args_Double_IntDouble = Args_Double_None |
-                          (ArgType_Double << (ArgType_Shift * 1)) |
+                          (ArgType_Float64 << (ArgType_Shift * 1)) |
                           (ArgType_General << (ArgType_Shift * 2)),
 
   // int f(int, double)
-  Args_Int_IntDouble = Args_General0 | (ArgType_Double << (ArgType_Shift * 1)) |
+  Args_Int_IntDouble = Args_General0 |
+                       (ArgType_Float64 << (ArgType_Shift * 1)) |
                        (ArgType_General << (ArgType_Shift * 2)),
 
   // int f(double, int)
   Args_Int_DoubleInt = Args_General0 |
                        (ArgType_General << (ArgType_Shift * 1)) |
-                       (ArgType_Double << (ArgType_Shift * 2)),
+                       (ArgType_Float64 << (ArgType_Shift * 2)),
 
   // double f(double, double, double)
   Args_Double_DoubleDoubleDouble =
-      Args_Double_DoubleDouble | (ArgType_Double << (ArgType_Shift * 3)),
+      Args_Double_DoubleDouble | (ArgType_Float64 << (ArgType_Shift * 3)),
 
   // double f(double, double, double, double)
   Args_Double_DoubleDoubleDoubleDouble =
-      Args_Double_DoubleDoubleDouble | (ArgType_Double << (ArgType_Shift * 4)),
+      Args_Double_DoubleDoubleDouble | (ArgType_Float64 << (ArgType_Shift * 4)),
 
   // int f(double, int, int)
   Args_Int_DoubleIntInt = Args_General0 |
                           (ArgType_General << (ArgType_Shift * 1)) |
                           (ArgType_General << (ArgType_Shift * 2)) |
-                          (ArgType_Double << (ArgType_Shift * 3)),
+                          (ArgType_Float64 << (ArgType_Shift * 3)),
 
   // int f(int, double, int, int)
   Args_Int_IntDoubleIntInt = Args_General0 |
                              (ArgType_General << (ArgType_Shift * 1)) |
                              (ArgType_General << (ArgType_Shift * 2)) |
-                             (ArgType_Double << (ArgType_Shift * 3)) |
+                             (ArgType_Float64 << (ArgType_Shift * 3)) |
                              (ArgType_General << (ArgType_Shift * 4)),
 
   Args_Int_GeneralGeneralGeneralInt64 =
       Args_General0 | (ArgType_General << (ArgType_Shift * 1)) |
       (ArgType_General << (ArgType_Shift * 2)) |
       (ArgType_General << (ArgType_Shift * 3)) |
       (ArgType_Int64 << (ArgType_Shift * 4)),
 
--- a/js/src/jit/MacroAssembler-inl.h
+++ b/js/src/jit/MacroAssembler-inl.h
@@ -111,17 +111,17 @@ void MacroAssembler::callWithABI(const A
 void MacroAssembler::appendSignatureType(MoveOp::Type type) {
 #ifdef JS_SIMULATOR
   signature_ <<= ArgType_Shift;
   switch (type) {
     case MoveOp::GENERAL:
       signature_ |= ArgType_General;
       break;
     case MoveOp::DOUBLE:
-      signature_ |= ArgType_Double;
+      signature_ |= ArgType_Float64;
       break;
     case MoveOp::FLOAT32:
       signature_ |= ArgType_Float32;
       break;
     default:
       MOZ_CRASH("Invalid argument type");
   }
 #endif
--- a/js/src/jit/MacroAssembler.h
+++ b/js/src/jit/MacroAssembler.h
@@ -3329,17 +3329,17 @@ static inline size_t StackDecrementForCa
 }
 
 static inline MIRType ToMIRType(MIRType t) { return t; }
 
 static inline MIRType ToMIRType(ABIArgType argType) {
   switch (argType) {
     case ArgType_General:
       return MIRType::Pointer;
-    case ArgType_Double:
+    case ArgType_Float64:
       return MIRType::Double;
     case ArgType_Float32:
       return MIRType::Float32;
     case ArgType_Int32:
       return MIRType::Int32;
     case ArgType_Int64:
       return MIRType::Int64;
     default:
--- a/js/src/wasm/WasmBuiltins.cpp
+++ b/js/src/wasm/WasmBuiltins.cpp
@@ -244,17 +244,17 @@ ABIArgType ToABIType(MIRType type) {
     case MIRType::Int64:
       return ArgType_Int64;
     case MIRType::Pointer:
     case MIRType::RefOrNull:
       return ArgType_General;
     case MIRType::Float32:
       return ArgType_Float32;
     case MIRType::Double:
-      return ArgType_Double;
+      return ArgType_Float64;
     default:
       MOZ_CRASH("unexpected type");
   }
 }
 
 ABIFunctionType ToABIType(const SymbolicAddressSignature& sig) {
   MOZ_ASSERT_IF(sig.failureMode != FailureMode::Infallible,
                 ToABIType(sig.failureMode) == ToABIType(sig.retType));
@@ -1398,33 +1398,33 @@ static Maybe<ABIFunctionType> ToBuiltinA
   }
 
   uint32_t abiType;
   switch (funcType.ret().ref().code()) {
     case ValType::F32:
       abiType = ArgType_Float32 << RetType_Shift;
       break;
     case ValType::F64:
-      abiType = ArgType_Double << RetType_Shift;
+      abiType = ArgType_Float64 << RetType_Shift;
       break;
     default:
       return Nothing();
   }
 
   if ((args.length() + 1) > (sizeof(uint32_t) * 8 / ArgType_Shift)) {
     return Nothing();
   }
 
   for (size_t i = 0; i < args.length(); i++) {
     switch (args[i].code()) {
       case ValType::F32:
         abiType |= (ArgType_Float32 << (ArgType_Shift * (i + 1)));
         break;
       case ValType::F64:
-        abiType |= (ArgType_Double << (ArgType_Shift * (i + 1)));
+        abiType |= (ArgType_Float64 << (ArgType_Shift * (i + 1)));
         break;
       default:
         return Nothing();
     }
   }
 
   return Some(ABIFunctionType(abiType));
 }