From de62538ee4268a761355c2cda2438600f8f57068 Mon Sep 17 00:00:00 2001 From: Jacob Bramley Date: Fri, 23 Jul 2010 10:41:19 +0100 Subject: [PATCH] [JAEGER] Build fix for ARM. [No bug] [r=me] --- js/src/assembler/assembler/ARMAssembler.h | 13 +++++++++++++ js/src/assembler/assembler/MacroAssemblerARM.h | 5 +++++ 2 files changed, 18 insertions(+) diff --git a/js/src/assembler/assembler/ARMAssembler.h b/js/src/assembler/assembler/ARMAssembler.h index 7bdfac9bdb70..4b99a2ed848d 100644 --- a/js/src/assembler/assembler/ARMAssembler.h +++ b/js/src/assembler/assembler/ARMAssembler.h @@ -54,6 +54,9 @@ # define FIXME_INSN_PRINTING ((void) 0) #endif +// TODO: We don't print the condition code in our JaegerSpew lines. Doing this +// is awkward whilst maintaining a consistent field width. + namespace JSC { typedef uint32_t ARMWord; @@ -177,6 +180,7 @@ namespace JSC { MVN = (0xf << 21), MUL = 0x00000090, MULL = 0x00c00090, + FCPYD = 0x0eb00b40, FADDD = 0x0e300b00, FNEGD = 0x0eb10b40, FDIVD = 0x0e800b00, @@ -505,6 +509,15 @@ namespace JSC { m_buffer.putInt(static_cast(cc) | MULL | RN(rdhi) | RD(rdlo) | RS(rn) | RM(rm)); } + void fcpyd_r(int dd, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + IPFX "%-15s %s, %s, %s\n", MAYBE_PAD, "vmov.f64", nameFpRegD(dd), nameFpRegD(dm)); + // TODO: emitInst doesn't work for VFP instructions, though it + // seems to work for current usage. + emitInst(static_cast(cc) | FCPYD, dd, dd, dm); + } + void faddd_r(int dd, int dn, int dm, Condition cc = AL) { js::JaegerSpew(js::JSpew_Insns, diff --git a/js/src/assembler/assembler/MacroAssemblerARM.h b/js/src/assembler/assembler/MacroAssemblerARM.h index 146c2b3c13a2..fd21c4c4e6da 100644 --- a/js/src/assembler/assembler/MacroAssemblerARM.h +++ b/js/src/assembler/assembler/MacroAssemblerARM.h @@ -854,6 +854,11 @@ public: return s_isVFPPresent; } + void moveDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fcpyd_r(dest, src); + } + void loadDouble(ImplicitAddress address, FPRegisterID dest) { m_assembler.doubleTransfer(true, dest, address.base, address.offset);