Backed out changeset 454706720bbc (bug 888493) for build bustage

CLOSED TREE
This commit is contained in:
Phil Ringnalda 2013-07-04 13:06:07 -07:00
parent 922e268c2b
commit af1c32b2a0
4 changed files with 195 additions and 188 deletions

View File

@ -27,44 +27,44 @@ namespace ion {
// clearer than bl r14). HOWEVER, this register can
// easily be a gpr when it is not busy holding the return
// address.
static MOZ_CONSTEXPR_VAR Register r0 = { Registers::r0 };
static MOZ_CONSTEXPR_VAR Register r1 = { Registers::r1 };
static MOZ_CONSTEXPR_VAR Register r2 = { Registers::r2 };
static MOZ_CONSTEXPR_VAR Register r3 = { Registers::r3 };
static MOZ_CONSTEXPR_VAR Register r4 = { Registers::r4 };
static MOZ_CONSTEXPR_VAR Register r5 = { Registers::r5 };
static MOZ_CONSTEXPR_VAR Register r6 = { Registers::r6 };
static MOZ_CONSTEXPR_VAR Register r7 = { Registers::r7 };
static MOZ_CONSTEXPR_VAR Register r8 = { Registers::r8 };
static MOZ_CONSTEXPR_VAR Register r9 = { Registers::r9 };
static MOZ_CONSTEXPR_VAR Register r10 = { Registers::r10 };
static MOZ_CONSTEXPR_VAR Register r11 = { Registers::r11 };
static MOZ_CONSTEXPR_VAR Register r12 = { Registers::ip };
static MOZ_CONSTEXPR_VAR Register ip = { Registers::ip };
static MOZ_CONSTEXPR_VAR Register sp = { Registers::sp };
static MOZ_CONSTEXPR_VAR Register r14 = { Registers::lr };
static MOZ_CONSTEXPR_VAR Register lr = { Registers::lr };
static MOZ_CONSTEXPR_VAR Register pc = { Registers::pc };
static const MOZ_CONSTEXPR Register r0 = { Registers::r0 };
static const MOZ_CONSTEXPR Register r1 = { Registers::r1 };
static const MOZ_CONSTEXPR Register r2 = { Registers::r2 };
static const MOZ_CONSTEXPR Register r3 = { Registers::r3 };
static const MOZ_CONSTEXPR Register r4 = { Registers::r4 };
static const MOZ_CONSTEXPR Register r5 = { Registers::r5 };
static const MOZ_CONSTEXPR Register r6 = { Registers::r6 };
static const MOZ_CONSTEXPR Register r7 = { Registers::r7 };
static const MOZ_CONSTEXPR Register r8 = { Registers::r8 };
static const MOZ_CONSTEXPR Register r9 = { Registers::r9 };
static const MOZ_CONSTEXPR Register r10 = { Registers::r10 };
static const MOZ_CONSTEXPR Register r11 = { Registers::r11 };
static const MOZ_CONSTEXPR Register r12 = { Registers::ip };
static const MOZ_CONSTEXPR Register ip = { Registers::ip };
static const MOZ_CONSTEXPR Register sp = { Registers::sp };
static const MOZ_CONSTEXPR Register r14 = { Registers::lr };
static const MOZ_CONSTEXPR Register lr = { Registers::lr };
static const MOZ_CONSTEXPR Register pc = { Registers::pc };
static MOZ_CONSTEXPR_VAR Register ScratchRegister = {Registers::ip};
static const MOZ_CONSTEXPR Register ScratchRegister = {Registers::ip};
static MOZ_CONSTEXPR_VAR Register OsrFrameReg = r3;
static MOZ_CONSTEXPR_VAR Register ArgumentsRectifierReg = r8;
static MOZ_CONSTEXPR_VAR Register CallTempReg0 = r5;
static MOZ_CONSTEXPR_VAR Register CallTempReg1 = r6;
static MOZ_CONSTEXPR_VAR Register CallTempReg2 = r7;
static MOZ_CONSTEXPR_VAR Register CallTempReg3 = r8;
static MOZ_CONSTEXPR_VAR Register CallTempReg4 = r0;
static MOZ_CONSTEXPR_VAR Register CallTempReg5 = r1;
static MOZ_CONSTEXPR_VAR Register CallTempReg6 = r2;
static const MOZ_CONSTEXPR Register OsrFrameReg = r3;
static const MOZ_CONSTEXPR Register ArgumentsRectifierReg = r8;
static const MOZ_CONSTEXPR Register CallTempReg0 = r5;
static const MOZ_CONSTEXPR Register CallTempReg1 = r6;
static const MOZ_CONSTEXPR Register CallTempReg2 = r7;
static const MOZ_CONSTEXPR Register CallTempReg3 = r8;
static const MOZ_CONSTEXPR Register CallTempReg4 = r0;
static const MOZ_CONSTEXPR Register CallTempReg5 = r1;
static const MOZ_CONSTEXPR Register CallTempReg6 = r2;
static MOZ_CONSTEXPR_VAR Register IntArgReg0 = r0;
static MOZ_CONSTEXPR_VAR Register IntArgReg1 = r1;
static MOZ_CONSTEXPR_VAR Register IntArgReg2 = r2;
static MOZ_CONSTEXPR_VAR Register IntArgReg3 = r3;
static MOZ_CONSTEXPR_VAR Register GlobalReg = r10;
static MOZ_CONSTEXPR_VAR Register HeapReg = r11;
static MOZ_CONSTEXPR_VAR Register CallTempNonArgRegs[] = { r5, r6, r7, r8 };
static const MOZ_CONSTEXPR Register IntArgReg0 = r0;
static const MOZ_CONSTEXPR Register IntArgReg1 = r1;
static const MOZ_CONSTEXPR Register IntArgReg2 = r2;
static const MOZ_CONSTEXPR Register IntArgReg3 = r3;
static const MOZ_CONSTEXPR Register GlobalReg = r10;
static const MOZ_CONSTEXPR Register HeapReg = r11;
static const MOZ_CONSTEXPR Register CallTempNonArgRegs[] = { r5, r6, r7, r8 };
static const uint32_t NumCallTempNonArgRegs =
mozilla::ArrayLength(CallTempNonArgRegs);
class ABIArgGenerator
@ -88,37 +88,37 @@ class ABIArgGenerator
};
static MOZ_CONSTEXPR_VAR Register PreBarrierReg = r1;
static const MOZ_CONSTEXPR Register PreBarrierReg = r1;
static MOZ_CONSTEXPR_VAR Register InvalidReg = { Registers::invalid_reg };
static MOZ_CONSTEXPR_VAR FloatRegister InvalidFloatReg = { FloatRegisters::invalid_freg };
static const MOZ_CONSTEXPR Register InvalidReg = { Registers::invalid_reg };
static const MOZ_CONSTEXPR FloatRegister InvalidFloatReg = { FloatRegisters::invalid_freg };
static MOZ_CONSTEXPR_VAR Register JSReturnReg_Type = r3;
static MOZ_CONSTEXPR_VAR Register JSReturnReg_Data = r2;
static MOZ_CONSTEXPR_VAR Register StackPointer = sp;
static MOZ_CONSTEXPR_VAR Register FramePointer = InvalidReg;
static MOZ_CONSTEXPR_VAR Register ReturnReg = r0;
static MOZ_CONSTEXPR_VAR FloatRegister ReturnFloatReg = { FloatRegisters::d0 };
static MOZ_CONSTEXPR_VAR FloatRegister ScratchFloatReg = { FloatRegisters::d1 };
static const MOZ_CONSTEXPR Register JSReturnReg_Type = r3;
static const MOZ_CONSTEXPR Register JSReturnReg_Data = r2;
static const MOZ_CONSTEXPR Register StackPointer = sp;
static const MOZ_CONSTEXPR Register FramePointer = InvalidReg;
static const MOZ_CONSTEXPR Register ReturnReg = r0;
static const MOZ_CONSTEXPR FloatRegister ReturnFloatReg = { FloatRegisters::d0 };
static const MOZ_CONSTEXPR FloatRegister ScratchFloatReg = { FloatRegisters::d1 };
static MOZ_CONSTEXPR_VAR FloatRegister NANReg = { FloatRegisters::d15 };
static const MOZ_CONSTEXPR FloatRegister NANReg = { FloatRegisters::d15 };
static MOZ_CONSTEXPR_VAR FloatRegister d0 = {FloatRegisters::d0};
static MOZ_CONSTEXPR_VAR FloatRegister d1 = {FloatRegisters::d1};
static MOZ_CONSTEXPR_VAR FloatRegister d2 = {FloatRegisters::d2};
static MOZ_CONSTEXPR_VAR FloatRegister d3 = {FloatRegisters::d3};
static MOZ_CONSTEXPR_VAR FloatRegister d4 = {FloatRegisters::d4};
static MOZ_CONSTEXPR_VAR FloatRegister d5 = {FloatRegisters::d5};
static MOZ_CONSTEXPR_VAR FloatRegister d6 = {FloatRegisters::d6};
static MOZ_CONSTEXPR_VAR FloatRegister d7 = {FloatRegisters::d7};
static MOZ_CONSTEXPR_VAR FloatRegister d8 = {FloatRegisters::d8};
static MOZ_CONSTEXPR_VAR FloatRegister d9 = {FloatRegisters::d9};
static MOZ_CONSTEXPR_VAR FloatRegister d10 = {FloatRegisters::d10};
static MOZ_CONSTEXPR_VAR FloatRegister d11 = {FloatRegisters::d11};
static MOZ_CONSTEXPR_VAR FloatRegister d12 = {FloatRegisters::d12};
static MOZ_CONSTEXPR_VAR FloatRegister d13 = {FloatRegisters::d13};
static MOZ_CONSTEXPR_VAR FloatRegister d14 = {FloatRegisters::d14};
static MOZ_CONSTEXPR_VAR FloatRegister d15 = {FloatRegisters::d15};
static const MOZ_CONSTEXPR FloatRegister d0 = {FloatRegisters::d0};
static const MOZ_CONSTEXPR FloatRegister d1 = {FloatRegisters::d1};
static const MOZ_CONSTEXPR FloatRegister d2 = {FloatRegisters::d2};
static const MOZ_CONSTEXPR FloatRegister d3 = {FloatRegisters::d3};
static const MOZ_CONSTEXPR FloatRegister d4 = {FloatRegisters::d4};
static const MOZ_CONSTEXPR FloatRegister d5 = {FloatRegisters::d5};
static const MOZ_CONSTEXPR FloatRegister d6 = {FloatRegisters::d6};
static const MOZ_CONSTEXPR FloatRegister d7 = {FloatRegisters::d7};
static const MOZ_CONSTEXPR FloatRegister d8 = {FloatRegisters::d8};
static const MOZ_CONSTEXPR FloatRegister d9 = {FloatRegisters::d9};
static const MOZ_CONSTEXPR FloatRegister d10 = {FloatRegisters::d10};
static const MOZ_CONSTEXPR FloatRegister d11 = {FloatRegisters::d11};
static const MOZ_CONSTEXPR FloatRegister d12 = {FloatRegisters::d12};
static const MOZ_CONSTEXPR FloatRegister d13 = {FloatRegisters::d13};
static const MOZ_CONSTEXPR FloatRegister d14 = {FloatRegisters::d14};
static const MOZ_CONSTEXPR FloatRegister d15 = {FloatRegisters::d15};
// For maximal awesomeness, 8 should be sufficent.
// ldrd/strd (dual-register load/store) operate in a single cycle

View File

@ -15,39 +15,39 @@
namespace js {
namespace ion {
static MOZ_CONSTEXPR_VAR Register rax = { JSC::X86Registers::eax };
static MOZ_CONSTEXPR_VAR Register rbx = { JSC::X86Registers::ebx };
static MOZ_CONSTEXPR_VAR Register rcx = { JSC::X86Registers::ecx };
static MOZ_CONSTEXPR_VAR Register rdx = { JSC::X86Registers::edx };
static MOZ_CONSTEXPR_VAR Register rsi = { JSC::X86Registers::esi };
static MOZ_CONSTEXPR_VAR Register rdi = { JSC::X86Registers::edi };
static MOZ_CONSTEXPR_VAR Register rbp = { JSC::X86Registers::ebp };
static MOZ_CONSTEXPR_VAR Register r8 = { JSC::X86Registers::r8 };
static MOZ_CONSTEXPR_VAR Register r9 = { JSC::X86Registers::r9 };
static MOZ_CONSTEXPR_VAR Register r10 = { JSC::X86Registers::r10 };
static MOZ_CONSTEXPR_VAR Register r11 = { JSC::X86Registers::r11 };
static MOZ_CONSTEXPR_VAR Register r12 = { JSC::X86Registers::r12 };
static MOZ_CONSTEXPR_VAR Register r13 = { JSC::X86Registers::r13 };
static MOZ_CONSTEXPR_VAR Register r14 = { JSC::X86Registers::r14 };
static MOZ_CONSTEXPR_VAR Register r15 = { JSC::X86Registers::r15 };
static MOZ_CONSTEXPR_VAR Register rsp = { JSC::X86Registers::esp };
static const MOZ_CONSTEXPR Register rax = { JSC::X86Registers::eax };
static const MOZ_CONSTEXPR Register rbx = { JSC::X86Registers::ebx };
static const MOZ_CONSTEXPR Register rcx = { JSC::X86Registers::ecx };
static const MOZ_CONSTEXPR Register rdx = { JSC::X86Registers::edx };
static const MOZ_CONSTEXPR Register rsi = { JSC::X86Registers::esi };
static const MOZ_CONSTEXPR Register rdi = { JSC::X86Registers::edi };
static const MOZ_CONSTEXPR Register rbp = { JSC::X86Registers::ebp };
static const MOZ_CONSTEXPR Register r8 = { JSC::X86Registers::r8 };
static const MOZ_CONSTEXPR Register r9 = { JSC::X86Registers::r9 };
static const MOZ_CONSTEXPR Register r10 = { JSC::X86Registers::r10 };
static const MOZ_CONSTEXPR Register r11 = { JSC::X86Registers::r11 };
static const MOZ_CONSTEXPR Register r12 = { JSC::X86Registers::r12 };
static const MOZ_CONSTEXPR Register r13 = { JSC::X86Registers::r13 };
static const MOZ_CONSTEXPR Register r14 = { JSC::X86Registers::r14 };
static const MOZ_CONSTEXPR Register r15 = { JSC::X86Registers::r15 };
static const MOZ_CONSTEXPR Register rsp = { JSC::X86Registers::esp };
static MOZ_CONSTEXPR_VAR FloatRegister xmm0 = { JSC::X86Registers::xmm0 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm1 = { JSC::X86Registers::xmm1 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm2 = { JSC::X86Registers::xmm2 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm3 = { JSC::X86Registers::xmm3 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm4 = { JSC::X86Registers::xmm4 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm5 = { JSC::X86Registers::xmm5 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm6 = { JSC::X86Registers::xmm6 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm7 = { JSC::X86Registers::xmm7 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm8 = { JSC::X86Registers::xmm8 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm9 = { JSC::X86Registers::xmm9 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm10 = { JSC::X86Registers::xmm10 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm11 = { JSC::X86Registers::xmm11 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm12 = { JSC::X86Registers::xmm12 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm13 = { JSC::X86Registers::xmm13 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm14 = { JSC::X86Registers::xmm14 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm15 = { JSC::X86Registers::xmm15 };
static const MOZ_CONSTEXPR FloatRegister xmm0 = { JSC::X86Registers::xmm0 };
static const MOZ_CONSTEXPR FloatRegister xmm1 = { JSC::X86Registers::xmm1 };
static const MOZ_CONSTEXPR FloatRegister xmm2 = { JSC::X86Registers::xmm2 };
static const MOZ_CONSTEXPR FloatRegister xmm3 = { JSC::X86Registers::xmm3 };
static const MOZ_CONSTEXPR FloatRegister xmm4 = { JSC::X86Registers::xmm4 };
static const MOZ_CONSTEXPR FloatRegister xmm5 = { JSC::X86Registers::xmm5 };
static const MOZ_CONSTEXPR FloatRegister xmm6 = { JSC::X86Registers::xmm6 };
static const MOZ_CONSTEXPR FloatRegister xmm7 = { JSC::X86Registers::xmm7 };
static const MOZ_CONSTEXPR FloatRegister xmm8 = { JSC::X86Registers::xmm8 };
static const MOZ_CONSTEXPR FloatRegister xmm9 = { JSC::X86Registers::xmm9 };
static const MOZ_CONSTEXPR FloatRegister xmm10 = { JSC::X86Registers::xmm10 };
static const MOZ_CONSTEXPR FloatRegister xmm11 = { JSC::X86Registers::xmm11 };
static const MOZ_CONSTEXPR FloatRegister xmm12 = { JSC::X86Registers::xmm12 };
static const MOZ_CONSTEXPR FloatRegister xmm13 = { JSC::X86Registers::xmm13 };
static const MOZ_CONSTEXPR FloatRegister xmm14 = { JSC::X86Registers::xmm14 };
static const MOZ_CONSTEXPR FloatRegister xmm15 = { JSC::X86Registers::xmm15 };
// X86-common synonyms.
static const Register eax = rax;
@ -59,74 +59,74 @@ static const Register edi = rdi;
static const Register ebp = rbp;
static const Register esp = rsp;
static MOZ_CONSTEXPR_VAR Register InvalidReg = { JSC::X86Registers::invalid_reg };
static MOZ_CONSTEXPR_VAR FloatRegister InvalidFloatReg = { JSC::X86Registers::invalid_xmm };
static const MOZ_CONSTEXPR Register InvalidReg = { JSC::X86Registers::invalid_reg };
static const MOZ_CONSTEXPR FloatRegister InvalidFloatReg = { JSC::X86Registers::invalid_xmm };
static const Register StackPointer = rsp;
static const Register FramePointer = rbp;
static MOZ_CONSTEXPR_VAR Register JSReturnReg = rcx;
static const MOZ_CONSTEXPR Register JSReturnReg = rcx;
// Avoid, except for assertions.
static MOZ_CONSTEXPR_VAR Register JSReturnReg_Type = JSReturnReg;
static MOZ_CONSTEXPR_VAR Register JSReturnReg_Data = JSReturnReg;
static const MOZ_CONSTEXPR Register JSReturnReg_Type = JSReturnReg;
static const MOZ_CONSTEXPR Register JSReturnReg_Data = JSReturnReg;
static MOZ_CONSTEXPR_VAR Register ReturnReg = rax;
static MOZ_CONSTEXPR_VAR Register ScratchReg = r11;
static MOZ_CONSTEXPR_VAR Register HeapReg = r15;
static MOZ_CONSTEXPR_VAR FloatRegister ReturnFloatReg = xmm0;
static MOZ_CONSTEXPR_VAR FloatRegister ScratchFloatReg = xmm15;
static const MOZ_CONSTEXPR Register ReturnReg = rax;
static const MOZ_CONSTEXPR Register ScratchReg = r11;
static const MOZ_CONSTEXPR Register HeapReg = r15;
static const MOZ_CONSTEXPR FloatRegister ReturnFloatReg = xmm0;
static const MOZ_CONSTEXPR FloatRegister ScratchFloatReg = xmm15;
static MOZ_CONSTEXPR_VAR Register ArgumentsRectifierReg = r8;
static MOZ_CONSTEXPR_VAR Register CallTempReg0 = rax;
static MOZ_CONSTEXPR_VAR Register CallTempReg1 = rdi;
static MOZ_CONSTEXPR_VAR Register CallTempReg2 = rbx;
static MOZ_CONSTEXPR_VAR Register CallTempReg3 = rcx;
static MOZ_CONSTEXPR_VAR Register CallTempReg4 = rsi;
static MOZ_CONSTEXPR_VAR Register CallTempReg5 = rdx;
static MOZ_CONSTEXPR_VAR Register CallTempReg6 = rbp;
static const MOZ_CONSTEXPR Register ArgumentsRectifierReg = r8;
static const MOZ_CONSTEXPR Register CallTempReg0 = rax;
static const MOZ_CONSTEXPR Register CallTempReg1 = rdi;
static const MOZ_CONSTEXPR Register CallTempReg2 = rbx;
static const MOZ_CONSTEXPR Register CallTempReg3 = rcx;
static const MOZ_CONSTEXPR Register CallTempReg4 = rsi;
static const MOZ_CONSTEXPR Register CallTempReg5 = rdx;
static const MOZ_CONSTEXPR Register CallTempReg6 = rbp;
// Different argument registers for WIN64
#if defined(_WIN64)
static MOZ_CONSTEXPR_VAR Register IntArgReg0 = rcx;
static MOZ_CONSTEXPR_VAR Register IntArgReg1 = rdx;
static MOZ_CONSTEXPR_VAR Register IntArgReg2 = r8;
static MOZ_CONSTEXPR_VAR Register IntArgReg3 = r9;
static MOZ_CONSTEXPR_VAR uint32_t NumIntArgRegs = 4;
static MOZ_CONSTEXPR_VAR Register IntArgRegs[NumIntArgRegs] = { rcx, rdx, r8, r9 };
static const MOZ_CONSTEXPR Register IntArgReg0 = rcx;
static const MOZ_CONSTEXPR Register IntArgReg1 = rdx;
static const MOZ_CONSTEXPR Register IntArgReg2 = r8;
static const MOZ_CONSTEXPR Register IntArgReg3 = r9;
static const MOZ_CONSTEXPR uint32_t NumIntArgRegs = 4;
static const MOZ_CONSTEXPR Register IntArgRegs[NumIntArgRegs] = { rcx, rdx, r8, r9 };
static MOZ_CONSTEXPR_VAR Register CallTempNonArgRegs[] = { rax, rdi, rbx, rsi };
static const MOZ_CONSTEXPR Register CallTempNonArgRegs[] = { rax, rdi, rbx, rsi };
static const uint32_t NumCallTempNonArgRegs =
mozilla::ArrayLength(CallTempNonArgRegs);
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg0 = xmm0;
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg1 = xmm1;
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg2 = xmm2;
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg3 = xmm3;
static const MOZ_CONSTEXPR FloatRegister FloatArgReg0 = xmm0;
static const MOZ_CONSTEXPR FloatRegister FloatArgReg1 = xmm1;
static const MOZ_CONSTEXPR FloatRegister FloatArgReg2 = xmm2;
static const MOZ_CONSTEXPR FloatRegister FloatArgReg3 = xmm3;
static const uint32_t NumFloatArgRegs = 4;
static const FloatRegister FloatArgRegs[NumFloatArgRegs] = { xmm0, xmm1, xmm2, xmm3 };
#else
static MOZ_CONSTEXPR_VAR Register IntArgReg0 = rdi;
static MOZ_CONSTEXPR_VAR Register IntArgReg1 = rsi;
static MOZ_CONSTEXPR_VAR Register IntArgReg2 = rdx;
static MOZ_CONSTEXPR_VAR Register IntArgReg3 = rcx;
static MOZ_CONSTEXPR_VAR Register IntArgReg4 = r8;
static MOZ_CONSTEXPR_VAR Register IntArgReg5 = r9;
static MOZ_CONSTEXPR_VAR uint32_t NumIntArgRegs = 6;
static MOZ_CONSTEXPR_VAR Register IntArgRegs[NumIntArgRegs] = { rdi, rsi, rdx, rcx, r8, r9 };
static const MOZ_CONSTEXPR Register IntArgReg0 = rdi;
static const MOZ_CONSTEXPR Register IntArgReg1 = rsi;
static const MOZ_CONSTEXPR Register IntArgReg2 = rdx;
static const MOZ_CONSTEXPR Register IntArgReg3 = rcx;
static const MOZ_CONSTEXPR Register IntArgReg4 = r8;
static const MOZ_CONSTEXPR Register IntArgReg5 = r9;
static const MOZ_CONSTEXPR uint32_t NumIntArgRegs = 6;
static const MOZ_CONSTEXPR Register IntArgRegs[NumIntArgRegs] = { rdi, rsi, rdx, rcx, r8, r9 };
static MOZ_CONSTEXPR_VAR Register CallTempNonArgRegs[] = { rax, rbx };
static const MOZ_CONSTEXPR Register CallTempNonArgRegs[] = { rax, rbx };
static const uint32_t NumCallTempNonArgRegs =
mozilla::ArrayLength(CallTempNonArgRegs);
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg0 = xmm0;
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg1 = xmm1;
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg2 = xmm2;
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg3 = xmm3;
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg4 = xmm4;
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg5 = xmm5;
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg6 = xmm6;
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg7 = xmm7;
static MOZ_CONSTEXPR_VAR uint32_t NumFloatArgRegs = 8;
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgRegs[NumFloatArgRegs] = { xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7 };
static const MOZ_CONSTEXPR FloatRegister FloatArgReg0 = xmm0;
static const MOZ_CONSTEXPR FloatRegister FloatArgReg1 = xmm1;
static const MOZ_CONSTEXPR FloatRegister FloatArgReg2 = xmm2;
static const MOZ_CONSTEXPR FloatRegister FloatArgReg3 = xmm3;
static const MOZ_CONSTEXPR FloatRegister FloatArgReg4 = xmm4;
static const MOZ_CONSTEXPR FloatRegister FloatArgReg5 = xmm5;
static const MOZ_CONSTEXPR FloatRegister FloatArgReg6 = xmm6;
static const MOZ_CONSTEXPR FloatRegister FloatArgReg7 = xmm7;
static const MOZ_CONSTEXPR uint32_t NumFloatArgRegs = 8;
static const MOZ_CONSTEXPR FloatRegister FloatArgRegs[NumFloatArgRegs] = { xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7 };
#endif
class ABIArgGenerator
@ -152,9 +152,9 @@ class ABIArgGenerator
static const Register NonVolatileReg;
};
static MOZ_CONSTEXPR_VAR Register OsrFrameReg = IntArgReg3;
static const MOZ_CONSTEXPR Register OsrFrameReg = IntArgReg3;
static MOZ_CONSTEXPR_VAR Register PreBarrierReg = rdx;
static const MOZ_CONSTEXPR Register PreBarrierReg = rdx;
// GCC stack is aligned on 16 bytes, but we don't maintain the invariant in
// jitted code.
@ -265,7 +265,7 @@ namespace js {
namespace ion {
// Return operand from a JS -> JS call.
static MOZ_CONSTEXPR_VAR ValueOperand JSReturnOperand = ValueOperand(JSReturnReg);
static const MOZ_CONSTEXPR ValueOperand JSReturnOperand = ValueOperand(JSReturnReg);
class Assembler : public AssemblerX86Shared
{

View File

@ -18,46 +18,46 @@
namespace js {
namespace ion {
static MOZ_CONSTEXPR_VAR Register eax = { JSC::X86Registers::eax };
static MOZ_CONSTEXPR_VAR Register ecx = { JSC::X86Registers::ecx };
static MOZ_CONSTEXPR_VAR Register edx = { JSC::X86Registers::edx };
static MOZ_CONSTEXPR_VAR Register ebx = { JSC::X86Registers::ebx };
static MOZ_CONSTEXPR_VAR Register esp = { JSC::X86Registers::esp };
static MOZ_CONSTEXPR_VAR Register ebp = { JSC::X86Registers::ebp };
static MOZ_CONSTEXPR_VAR Register esi = { JSC::X86Registers::esi };
static MOZ_CONSTEXPR_VAR Register edi = { JSC::X86Registers::edi };
static const MOZ_CONSTEXPR Register eax = { JSC::X86Registers::eax };
static const MOZ_CONSTEXPR Register ecx = { JSC::X86Registers::ecx };
static const MOZ_CONSTEXPR Register edx = { JSC::X86Registers::edx };
static const MOZ_CONSTEXPR Register ebx = { JSC::X86Registers::ebx };
static const MOZ_CONSTEXPR Register esp = { JSC::X86Registers::esp };
static const MOZ_CONSTEXPR Register ebp = { JSC::X86Registers::ebp };
static const MOZ_CONSTEXPR Register esi = { JSC::X86Registers::esi };
static const MOZ_CONSTEXPR Register edi = { JSC::X86Registers::edi };
static MOZ_CONSTEXPR_VAR FloatRegister xmm0 = { JSC::X86Registers::xmm0 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm1 = { JSC::X86Registers::xmm1 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm2 = { JSC::X86Registers::xmm2 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm3 = { JSC::X86Registers::xmm3 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm4 = { JSC::X86Registers::xmm4 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm5 = { JSC::X86Registers::xmm5 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm6 = { JSC::X86Registers::xmm6 };
static MOZ_CONSTEXPR_VAR FloatRegister xmm7 = { JSC::X86Registers::xmm7 };
static const MOZ_CONSTEXPR FloatRegister xmm0 = { JSC::X86Registers::xmm0 };
static const MOZ_CONSTEXPR FloatRegister xmm1 = { JSC::X86Registers::xmm1 };
static const MOZ_CONSTEXPR FloatRegister xmm2 = { JSC::X86Registers::xmm2 };
static const MOZ_CONSTEXPR FloatRegister xmm3 = { JSC::X86Registers::xmm3 };
static const MOZ_CONSTEXPR FloatRegister xmm4 = { JSC::X86Registers::xmm4 };
static const MOZ_CONSTEXPR FloatRegister xmm5 = { JSC::X86Registers::xmm5 };
static const MOZ_CONSTEXPR FloatRegister xmm6 = { JSC::X86Registers::xmm6 };
static const MOZ_CONSTEXPR FloatRegister xmm7 = { JSC::X86Registers::xmm7 };
static MOZ_CONSTEXPR_VAR Register InvalidReg = { JSC::X86Registers::invalid_reg };
static MOZ_CONSTEXPR_VAR FloatRegister InvalidFloatReg = { JSC::X86Registers::invalid_xmm };
static const MOZ_CONSTEXPR Register InvalidReg = { JSC::X86Registers::invalid_reg };
static const MOZ_CONSTEXPR FloatRegister InvalidFloatReg = { JSC::X86Registers::invalid_xmm };
static MOZ_CONSTEXPR_VAR Register JSReturnReg_Type = ecx;
static MOZ_CONSTEXPR_VAR Register JSReturnReg_Data = edx;
static MOZ_CONSTEXPR_VAR Register StackPointer = esp;
static MOZ_CONSTEXPR_VAR Register FramePointer = ebp;
static MOZ_CONSTEXPR_VAR Register ReturnReg = eax;
static MOZ_CONSTEXPR_VAR FloatRegister ReturnFloatReg = xmm0;
static MOZ_CONSTEXPR_VAR FloatRegister ScratchFloatReg = xmm7;
static const MOZ_CONSTEXPR Register JSReturnReg_Type = ecx;
static const MOZ_CONSTEXPR Register JSReturnReg_Data = edx;
static const MOZ_CONSTEXPR Register StackPointer = esp;
static const MOZ_CONSTEXPR Register FramePointer = ebp;
static const MOZ_CONSTEXPR Register ReturnReg = eax;
static const MOZ_CONSTEXPR FloatRegister ReturnFloatReg = xmm0;
static const MOZ_CONSTEXPR FloatRegister ScratchFloatReg = xmm7;
static MOZ_CONSTEXPR_VAR Register ArgumentsRectifierReg = esi;
static MOZ_CONSTEXPR_VAR Register CallTempReg0 = edi;
static MOZ_CONSTEXPR_VAR Register CallTempReg1 = eax;
static MOZ_CONSTEXPR_VAR Register CallTempReg2 = ebx;
static MOZ_CONSTEXPR_VAR Register CallTempReg3 = ecx;
static MOZ_CONSTEXPR_VAR Register CallTempReg4 = esi;
static MOZ_CONSTEXPR_VAR Register CallTempReg5 = edx;
static MOZ_CONSTEXPR_VAR Register CallTempReg6 = ebp;
static const MOZ_CONSTEXPR Register ArgumentsRectifierReg = esi;
static const MOZ_CONSTEXPR Register CallTempReg0 = edi;
static const MOZ_CONSTEXPR Register CallTempReg1 = eax;
static const MOZ_CONSTEXPR Register CallTempReg2 = ebx;
static const MOZ_CONSTEXPR Register CallTempReg3 = ecx;
static const MOZ_CONSTEXPR Register CallTempReg4 = esi;
static const MOZ_CONSTEXPR Register CallTempReg5 = edx;
static const MOZ_CONSTEXPR Register CallTempReg6 = ebp;
// We have no arg regs, so our NonArgRegs are just our CallTempReg*
static MOZ_CONSTEXPR_VAR Register CallTempNonArgRegs[] = { edi, eax, ebx, ecx, esi, edx };
static const MOZ_CONSTEXPR Register CallTempNonArgRegs[] = { edi, eax, ebx, ecx, esi, edx };
static const uint32_t NumCallTempNonArgRegs =
mozilla::ArrayLength(CallTempNonArgRegs);
@ -78,8 +78,8 @@ class ABIArgGenerator
static const Register NonVolatileReg;
};
static MOZ_CONSTEXPR_VAR Register OsrFrameReg = edx;
static MOZ_CONSTEXPR_VAR Register PreBarrierReg = edx;
static const MOZ_CONSTEXPR Register OsrFrameReg = edx;
static const MOZ_CONSTEXPR Register PreBarrierReg = edx;
// GCC stack is aligned on 16 bytes, but we don't maintain the invariant in
// jitted code.

View File

@ -117,18 +117,11 @@
* The MOZ_CONSTEXPR specifier declares that a C++11 compiler can evaluate a
* function at compile time. A constexpr function cannot examine any values
* except its arguments and can have no side effects except its return value.
* The MOZ_CONSTEXPR_VAR specifier tells a C++11 compiler that a variable's
* value may be computed at compile time. It should be prefered to just
* marking variables as MOZ_CONSTEXPR because if the compiler does not support
* constexpr it will fall back to making the variable const, and some compilers
* do not accept variables being marked both const and constexpr.
*/
#ifdef MOZ_HAVE_CXX11_CONSTEXPR
# define MOZ_CONSTEXPR constexpr
# define MOZ_CONSTEXPR_VAR constexpr
#else
# define MOZ_CONSTEXPR /* no support */
# define MOZ_CONSTEXPR_VAR const
#endif
/*
@ -411,6 +404,20 @@
# define MOZ_NONHEAP_CLASS /* nothing */
#endif /* MOZ_CLANG_PLUGIN */
/*
* MOZ_THIS_IN_INITIALIZER_LIST is used to avoid a warning when we know that
* it's safe to use 'this' in an initializer list.
*/
#ifdef _MSC_VER
# define MOZ_THIS_IN_INITIALIZER_LIST() \
__pragma(warning(push)) \
__pragma(warning(disable:4355)) \
this \
__pragma(warning(pop))
#else
# define MOZ_THIS_IN_INITIALIZER_LIST() this
#endif
#endif /* __cplusplus */
#endif /* mozilla_Attributes_h_ */