From 90e4b0486b9e2470bacb0685b087ce5e61823abb Mon Sep 17 00:00:00 2001 From: Luke Wagner Date: Thu, 19 Sep 2013 15:11:12 -0500 Subject: [PATCH] Bug 900669 - convert some more ARM-only void* uses into ImmPtr (r=mjrosenb) --HG-- extra : rebase_source : 8aa8548cece906325de356656e37af5812057c8d --- js/src/jit/arm/MacroAssembler-arm.cpp | 10 +++++----- js/src/jit/arm/MacroAssembler-arm.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/js/src/jit/arm/MacroAssembler-arm.cpp b/js/src/jit/arm/MacroAssembler-arm.cpp index 5b2efefde84..ec94db989e7 100644 --- a/js/src/jit/arm/MacroAssembler-arm.cpp +++ b/js/src/jit/arm/MacroAssembler-arm.cpp @@ -376,8 +376,8 @@ NextInst(Instruction *i) } void -MacroAssemblerARM::ma_movPatchable(Imm32 imm_, Register dest, - Assembler::Condition c, RelocStyle rs, Instruction *i) +MacroAssemblerARM::ma_movPatchable(Imm32 imm_, Register dest, Assembler::Condition c, + RelocStyle rs, Instruction *i) { int32_t imm = imm_.value; if (i) { @@ -3292,7 +3292,7 @@ MacroAssemblerARM::ma_callIonHalfPush(const Register r) } void -MacroAssemblerARM::ma_call(void *dest) +MacroAssemblerARM::ma_call(ImmPtr dest) { RelocStyle rs; if (hasMOVWT()) @@ -3300,7 +3300,7 @@ MacroAssemblerARM::ma_call(void *dest) else rs = L_LDR; - ma_movPatchable(Imm32((uint32_t) dest), CallReg, Always, rs); + ma_movPatchable(dest, CallReg, Always, rs); as_blx(CallReg); } @@ -3561,7 +3561,7 @@ MacroAssemblerARMCompat::callWithABI(void *fun, Result result) { uint32_t stackAdjust; callWithABIPre(&stackAdjust); - ma_call(fun); + ma_call(ImmPtr(fun)); callWithABIPost(stackAdjust, result); } diff --git a/js/src/jit/arm/MacroAssembler-arm.h b/js/src/jit/arm/MacroAssembler-arm.h index f008266fc1f..a181b540ab8 100644 --- a/js/src/jit/arm/MacroAssembler-arm.h +++ b/js/src/jit/arm/MacroAssembler-arm.h @@ -374,7 +374,7 @@ class MacroAssemblerARM : public Assembler // calls an ion function, assuming that the stack is currently not 8 byte aligned void ma_callIonHalfPush(const Register reg); - void ma_call(void *dest); + void ma_call(ImmPtr dest); // Float registers can only be loaded/stored in continuous runs // when using vstm/vldm. @@ -542,7 +542,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM void call(ImmPtr imm) { BufferOffset bo = m_buffer.nextOffset(); addPendingJump(bo, imm, Relocation::HARDCODED); - ma_call(imm.value); + ma_call(imm); } void call(IonCode *c) { BufferOffset bo = m_buffer.nextOffset(); @@ -553,7 +553,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM else rs = L_LDR; - ma_movPatchable(Imm32((int) c->raw()), ScratchRegister, Always, rs); + ma_movPatchable(ImmPtr(c->raw()), ScratchRegister, Always, rs); ma_callIonHalfPush(ScratchRegister); } void branch(IonCode *c) { @@ -565,7 +565,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM else rs = L_LDR; - ma_movPatchable(Imm32((int) c->raw()), ScratchRegister, Always, rs); + ma_movPatchable(ImmPtr(c->raw()), ScratchRegister, Always, rs); ma_bx(ScratchRegister); } void branch(const Register reg) {