From 2f1b228f1e63566c081d955cc7c4a056f1c28154 Mon Sep 17 00:00:00 2001 From: Jeff Walden Date: Tue, 6 Jan 2015 16:20:28 -0600 Subject: [PATCH] Bug 1112769 - Followup to adjust (hopefully all) code not compiled on x86-64, determined by skimming prior patch and making corresponding changes to other architectures. r=bustage in a CLOSED TREE --- js/src/jit/arm/CodeGenerator-arm.cpp | 2 ++ js/src/jit/mips/CodeGenerator-mips.cpp | 2 ++ js/src/jit/x86/CodeGenerator-x86.cpp | 7 +++++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/js/src/jit/arm/CodeGenerator-arm.cpp b/js/src/jit/arm/CodeGenerator-arm.cpp index 364d4957f05..42e1969b80f 100644 --- a/js/src/jit/arm/CodeGenerator-arm.cpp +++ b/js/src/jit/arm/CodeGenerator-arm.cpp @@ -17,6 +17,7 @@ #include "jit/JitFrames.h" #include "jit/MIR.h" #include "jit/MIRGraph.h" +#include "js/Conversions.h" #include "vm/Shape.h" #include "vm/TraceLogging.h" @@ -30,6 +31,7 @@ using namespace js::jit; using mozilla::FloorLog2; using mozilla::NegativeInfinity; using JS::GenericNaN; +using JS::ToInt32; // shared CodeGeneratorARM::CodeGeneratorARM(MIRGenerator *gen, LIRGraph *graph, MacroAssembler *masm) diff --git a/js/src/jit/mips/CodeGenerator-mips.cpp b/js/src/jit/mips/CodeGenerator-mips.cpp index 911df69769f..7f1db3b42b8 100644 --- a/js/src/jit/mips/CodeGenerator-mips.cpp +++ b/js/src/jit/mips/CodeGenerator-mips.cpp @@ -17,6 +17,7 @@ #include "jit/JitFrames.h" #include "jit/MIR.h" #include "jit/MIRGraph.h" +#include "js/Conversions.h" #include "vm/Shape.h" #include "vm/TraceLogging.h" @@ -30,6 +31,7 @@ using namespace js::jit; using mozilla::FloorLog2; using mozilla::NegativeInfinity; using JS::GenericNaN; +using JS::ToInt32; // shared CodeGeneratorMIPS::CodeGeneratorMIPS(MIRGenerator *gen, LIRGraph *graph, MacroAssembler *masm) diff --git a/js/src/jit/x86/CodeGenerator-x86.cpp b/js/src/jit/x86/CodeGenerator-x86.cpp index 06270c823ac..78a3dfce952 100644 --- a/js/src/jit/x86/CodeGenerator-x86.cpp +++ b/js/src/jit/x86/CodeGenerator-x86.cpp @@ -6,6 +6,7 @@ #include "jit/x86/CodeGenerator-x86.h" +#include "mozilla/Casting.h" #include "mozilla/DebugOnly.h" #include "jsnum.h" @@ -13,6 +14,7 @@ #include "jit/IonCaches.h" #include "jit/MIR.h" #include "jit/MIRGraph.h" +#include "js/Conversions.h" #include "vm/Shape.h" #include "jsscriptinlines.h" @@ -23,6 +25,7 @@ using namespace js; using namespace js::jit; +using mozilla::BitwiseCast; using mozilla::DebugOnly; using mozilla::FloatingPoint; using JS::GenericNaN; @@ -880,7 +883,7 @@ CodeGeneratorX86::visitOutOfLineTruncate(OutOfLineTruncate *ool) if (gen->compilingAsmJS()) masm.callWithABI(AsmJSImm_ToInt32); else - masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, js::ToInt32)); + masm.callWithABI(BitwiseCast(JS::ToInt32)); masm.storeCallResult(output); restoreVolatile(output); @@ -972,7 +975,7 @@ CodeGeneratorX86::visitOutOfLineTruncateFloat32(OutOfLineTruncateFloat32 *ool) if (gen->compilingAsmJS()) masm.callWithABI(AsmJSImm_ToInt32); else - masm.callWithABI(JS_FUNC_TO_DATA_PTR(void *, js::ToInt32)); + masm.callWithABI(BitwiseCast(JS::ToInt32)); masm.storeCallResult(output); masm.pop(input);