Bug 869539 - Eliminate padding in x64 Operand and add missing const. r=sstangl
authorDan Gohman <sunfish@google.com>
Tue, 07 May 2013 11:52:37 -0700
changeset 142111 1d3f27629c2840ca44233e3c8c011a494ff84847
parent 142110 74568f858c7cd6eedf2cb5336bf3b34b2da7e03b
child 142112 8eeb6c056fdb0f82e4d66ff0df835c4b1ab70164
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssstangl
bugs869539
milestone23.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 869539 - Eliminate padding in x64 Operand and add missing const. r=sstangl
js/src/ion/x64/Assembler-x64.h
--- a/js/src/ion/x64/Assembler-x64.h
+++ b/js/src/ion/x64/Assembler-x64.h
@@ -175,18 +175,18 @@ class Operand
         REG_DISP,
         FPREG,
         SCALE
     };
 
     Kind kind_ : 3;
     int32_t base_ : 5;
     Scale scale_ : 3;
+    int32_t index_ : 5;
     int32_t disp_;
-    int32_t index_ : 5;
 
   public:
     explicit Operand(Register reg)
       : kind_(REG),
         base_(reg.code())
     { }
     explicit Operand(FloatRegister reg)
       : kind_(FPREG),
@@ -196,38 +196,38 @@ class Operand
       : kind_(REG_DISP),
         base_(address.base.code()),
         disp_(address.offset)
     { }
     explicit Operand(const BaseIndex &address)
       : kind_(SCALE),
         base_(address.base.code()),
         scale_(address.scale),
-        disp_(address.offset),
-        index_(address.index.code())
+        index_(address.index.code()),
+        disp_(address.offset)
     { }
     Operand(Register base, Register index, Scale scale, int32_t disp = 0)
       : kind_(SCALE),
         base_(base.code()),
         scale_(scale),
-        disp_(disp),
-        index_(index.code())
+        index_(index.code()),
+        disp_(disp)
     { }
     Operand(Register reg, int32_t disp)
       : kind_(REG_DISP),
         base_(reg.code()),
         disp_(disp)
     { }
 
-    Address toAddress() {
+    Address toAddress() const {
         JS_ASSERT(kind() == REG_DISP);
         return Address(Register::FromCode(base()), disp());
     }
 
-    BaseIndex toBaseIndex() {
+    BaseIndex toBaseIndex() const {
         JS_ASSERT(kind() == SCALE);
         return BaseIndex(Register::FromCode(base()), Register::FromCode(index()), scale(), disp());
     }
 
     Kind kind() const {
         return kind_;
     }
     Register::Code reg() const {