From b6ddb5fe5d3f2223d524e45bf5cdbdde0e5b241f Mon Sep 17 00:00:00 2001 From: Julien Brianceau Date: Tue, 10 Jun 2014 09:42:31 +0200 Subject: [mips] Add floating point absolute support in JavaScriptCore. Change-Id: I8b03fb0380fa444a6da239d8ddb19bdbe6b3d061 Reviewed-by: Allan Sandfeld Jensen --- Source/JavaScriptCore/assembler/MIPSAssembler.h | 5 +++++ Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'Source/JavaScriptCore') diff --git a/Source/JavaScriptCore/assembler/MIPSAssembler.h b/Source/JavaScriptCore/assembler/MIPSAssembler.h index 5f7b9b21a..03ef23ba7 100644 --- a/Source/JavaScriptCore/assembler/MIPSAssembler.h +++ b/Source/JavaScriptCore/assembler/MIPSAssembler.h @@ -529,6 +529,11 @@ public: emitInst(0x46200004 | (fd << OP_SH_FD) | (fs << OP_SH_FS)); } + void absd(FPRegisterID fd, FPRegisterID fs) + { + emitInst(0x46200005 | (fd << OP_SH_FD) | (fs << OP_SH_FS)); + } + void movd(FPRegisterID fd, FPRegisterID fs) { emitInst(0x46200006 | (fd << OP_SH_FD) | (fs << OP_SH_FS)); diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h b/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h index 8f96517ca..669021965 100644 --- a/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h +++ b/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h @@ -621,9 +621,9 @@ public: m_assembler.sqrtd(dst, src); } - void absDouble(FPRegisterID, FPRegisterID) + void absDouble(FPRegisterID src, FPRegisterID dst) { - RELEASE_ASSERT_NOT_REACHED(); + m_assembler.absd(dst, src); } ConvertibleLoadLabel convertibleLoadPtr(Address address, RegisterID dest) @@ -1188,7 +1188,15 @@ public: return false; #endif } - static bool supportsFloatingPointAbs() { return false; } + + static bool supportsFloatingPointAbs() + { +#if WTF_MIPS_DOUBLE_FLOAT + return true; +#else + return false; +#endif + } // Stack manipulation operations: // -- cgit v1.2.1