Quick compiler: minor cleanup
Remove dead software floating point support.
Move a common function from target specific to target independent.
Change-Id: Iaf793857f7e0faae02c672b9f1d45a0658143a51
diff --git a/src/compiler/codegen/arm/assemble_arm.cc b/src/compiler/codegen/arm/assemble_arm.cc
index 93c979b..27544d8 100644
--- a/src/compiler/codegen/arm/assemble_arm.cc
+++ b/src/compiler/codegen/arm/assemble_arm.cc
@@ -1366,32 +1366,4 @@
return EncodingMap[lir->opcode].size;
}
-/*
- * Target-dependent offset assignment.
- */
-int ArmCodegen::AssignInsnOffsets(CompilationUnit* cu)
-{
- LIR* arm_lir;
- int offset = 0;
-
- for (arm_lir = cu->first_lir_insn; arm_lir != NULL; arm_lir = NEXT_LIR(arm_lir)) {
- arm_lir->offset = offset;
- if (arm_lir->opcode >= 0) {
- if (!arm_lir->flags.is_nop) {
- offset += arm_lir->flags.size;
- }
- } else if (arm_lir->opcode == kPseudoPseudoAlign4) {
- if (offset & 0x2) {
- offset += 2;
- arm_lir->operands[0] = 1;
- } else {
- arm_lir->operands[0] = 0;
- }
- }
- /* Pseudo opcodes don't consume space */
- }
-
- return offset;
-}
-
} // namespace art
diff --git a/src/compiler/codegen/arm/codegen_arm.h b/src/compiler/codegen/arm/codegen_arm.h
index 4737d8c..f085a19 100644
--- a/src/compiler/codegen/arm/codegen_arm.h
+++ b/src/compiler/codegen/arm/codegen_arm.h
@@ -83,7 +83,6 @@
virtual void SetupTargetResourceMasks(CompilationUnit* cu, LIR* lir);
virtual const char* GetTargetInstFmt(int opcode);
virtual const char* GetTargetInstName(int opcode);
- virtual int AssignInsnOffsets(CompilationUnit* cu);
virtual std::string BuildInsnString(const char* fmt, LIR* lir, unsigned char* base_addr);
virtual uint64_t GetPCUseDefEncoding();
virtual uint64_t GetTargetInstFlags(int opcode);
diff --git a/src/compiler/codegen/arm/fp_arm.cc b/src/compiler/codegen/arm/fp_arm.cc
index a9ea916..5e0e73d 100644
--- a/src/compiler/codegen/arm/fp_arm.cc
+++ b/src/compiler/codegen/arm/fp_arm.cc
@@ -50,9 +50,14 @@
break;
case Instruction::REM_FLOAT_2ADDR:
case Instruction::REM_FLOAT:
- case Instruction::NEG_FLOAT: {
- return GenArithOpFloatPortable(cu, opcode, rl_dest, rl_src1, rl_src2);
- }
+ FlushAllRegs(cu); // Send everything to home location
+ CallRuntimeHelperRegLocationRegLocation(cu, ENTRYPOINT_OFFSET(pFmodf), rl_src1, rl_src2, false);
+ rl_result = GetReturn(cu, true);
+ StoreValue(cu, rl_dest, rl_result);
+ return false;
+ case Instruction::NEG_FLOAT:
+ GenNegFloat(cu, rl_dest, rl_src1);
+ return false;
default:
return true;
}
@@ -89,9 +94,14 @@
break;
case Instruction::REM_DOUBLE_2ADDR:
case Instruction::REM_DOUBLE:
- case Instruction::NEG_DOUBLE: {
- return GenArithOpDoublePortable(cu, opcode, rl_dest, rl_src1, rl_src2);
- }
+ FlushAllRegs(cu); // Send everything to home location
+ CallRuntimeHelperRegLocationRegLocation(cu, ENTRYPOINT_OFFSET(pFmod), rl_src1, rl_src2, false);
+ rl_result = GetReturnWide(cu, true);
+ StoreValueWide(cu, rl_dest, rl_result);
+ return false;
+ case Instruction::NEG_DOUBLE:
+ GenNegDouble(cu, rl_dest, rl_src1);
+ return false;
default:
return true;
}
@@ -136,10 +146,13 @@
op = kThumb2VcvtDI;
break;
case Instruction::LONG_TO_DOUBLE:
+ return GenConversionCall(cu, ENTRYPOINT_OFFSET(pL2d), rl_dest, rl_src);
case Instruction::FLOAT_TO_LONG:
+ return GenConversionCall(cu, ENTRYPOINT_OFFSET(pF2l), rl_dest, rl_src);
case Instruction::LONG_TO_FLOAT:
+ return GenConversionCall(cu, ENTRYPOINT_OFFSET(pL2f), rl_dest, rl_src);
case Instruction::DOUBLE_TO_LONG:
- return GenConversionPortable(cu, opcode, rl_dest, rl_src);
+ return GenConversionCall(cu, ENTRYPOINT_OFFSET(pD2l), rl_dest, rl_src);
default:
return true;
}
diff --git a/src/compiler/codegen/codegen.h b/src/compiler/codegen/codegen.h
index 9bc306d..9dfa609 100644
--- a/src/compiler/codegen/codegen.h
+++ b/src/compiler/codegen/codegen.h
@@ -153,12 +153,6 @@
RegLocation rl_src1, RegLocation rl_src2);
bool GenConversionCall(CompilationUnit* cu, int func_offset, RegLocation rl_dest,
RegLocation rl_src);
- bool GenArithOpFloatPortable(CompilationUnit* cu, Instruction::Code opcode, RegLocation rl_dest,
- RegLocation rl_src1, RegLocation rl_src2);
- bool GenArithOpDoublePortable(CompilationUnit* cu, Instruction::Code opcode, RegLocation rl_dest,
- RegLocation rl_src1, RegLocation rl_src2);
- bool GenConversionPortable(CompilationUnit* cu, Instruction::Code opcode, RegLocation rl_dest,
- RegLocation rl_src);
void GenSuspendTest(CompilationUnit* cu, int opt_flags);
void GenSuspendTestAndBranch(CompilationUnit* cu, int opt_flags, LIR* target);
@@ -294,7 +288,6 @@
virtual void SetupTargetResourceMasks(CompilationUnit* cu, LIR* lir) = 0;
virtual const char* GetTargetInstFmt(int opcode) = 0;
virtual const char* GetTargetInstName(int opcode) = 0;
- virtual int AssignInsnOffsets(CompilationUnit* cu) = 0;
virtual std::string BuildInsnString(const char* fmt, LIR* lir, unsigned char* base_addr) = 0;
virtual uint64_t GetPCUseDefEncoding() = 0;
virtual uint64_t GetTargetInstFlags(int opcode) = 0;
diff --git a/src/compiler/codegen/codegen_util.cc b/src/compiler/codegen/codegen_util.cc
index cf69ff9..11ab9c0 100644
--- a/src/compiler/codegen/codegen_util.cc
+++ b/src/compiler/codegen/codegen_util.cc
@@ -863,14 +863,39 @@
return offset;
}
+// LIR offset assignment.
+static int AssignInsnOffsets(CompilationUnit* cu)
+{
+ LIR* lir;
+ int offset = 0;
+
+ for (lir = cu->first_lir_insn; lir != NULL; lir = NEXT_LIR(lir)) {
+ lir->offset = offset;
+ if (lir->opcode >= 0) {
+ if (!lir->flags.is_nop) {
+ offset += lir->flags.size;
+ }
+ } else if (lir->opcode == kPseudoPseudoAlign4) {
+ if (offset & 0x2) {
+ offset += 2;
+ lir->operands[0] = 1;
+ } else {
+ lir->operands[0] = 0;
+ }
+ }
+ /* Pseudo opcodes don't consume space */
+ }
+
+ return offset;
+}
+
/*
* Walk the compilation unit and assign offsets to instructions
* and literals and compute the total size of the compiled unit.
*/
static void AssignOffsets(CompilationUnit* cu)
{
- Codegen* cg = cu->cg.get();
- int offset = cg->AssignInsnOffsets(cu);
+ int offset = AssignInsnOffsets(cu);
/* Const values have to be word aligned */
offset = (offset + 3) & ~3;
@@ -1056,5 +1081,4 @@
return res;
}
-}
- // namespace art
+} // namespace art
diff --git a/src/compiler/codegen/gen_common.cc b/src/compiler/codegen/gen_common.cc
index 8605b80..db99a30 100644
--- a/src/compiler/codegen/gen_common.cc
+++ b/src/compiler/codegen/gen_common.cc
@@ -1924,131 +1924,6 @@
return false;
}
-bool Codegen::GenArithOpFloatPortable(CompilationUnit* cu, Instruction::Code opcode,
- RegLocation rl_dest, RegLocation rl_src1,
- RegLocation rl_src2)
-{
- RegLocation rl_result;
- int func_offset;
-
- switch (opcode) {
- case Instruction::ADD_FLOAT_2ADDR:
- case Instruction::ADD_FLOAT:
- func_offset = ENTRYPOINT_OFFSET(pFadd);
- break;
- case Instruction::SUB_FLOAT_2ADDR:
- case Instruction::SUB_FLOAT:
- func_offset = ENTRYPOINT_OFFSET(pFsub);
- break;
- case Instruction::DIV_FLOAT_2ADDR:
- case Instruction::DIV_FLOAT:
- func_offset = ENTRYPOINT_OFFSET(pFdiv);
- break;
- case Instruction::MUL_FLOAT_2ADDR:
- case Instruction::MUL_FLOAT:
- func_offset = ENTRYPOINT_OFFSET(pFmul);
- break;
- case Instruction::REM_FLOAT_2ADDR:
- case Instruction::REM_FLOAT:
- func_offset = ENTRYPOINT_OFFSET(pFmodf);
- break;
- case Instruction::NEG_FLOAT: {
- GenNegFloat(cu, rl_dest, rl_src1);
- return false;
- }
- default:
- return true;
- }
- FlushAllRegs(cu); /* Send everything to home location */
- CallRuntimeHelperRegLocationRegLocation(cu, func_offset, rl_src1, rl_src2, false);
- rl_result = GetReturn(cu, true);
- StoreValue(cu, rl_dest, rl_result);
- return false;
-}
-
-bool Codegen::GenArithOpDoublePortable(CompilationUnit* cu, Instruction::Code opcode,
- RegLocation rl_dest, RegLocation rl_src1,
- RegLocation rl_src2)
-{
- RegLocation rl_result;
- int func_offset;
-
- switch (opcode) {
- case Instruction::ADD_DOUBLE_2ADDR:
- case Instruction::ADD_DOUBLE:
- func_offset = ENTRYPOINT_OFFSET(pDadd);
- break;
- case Instruction::SUB_DOUBLE_2ADDR:
- case Instruction::SUB_DOUBLE:
- func_offset = ENTRYPOINT_OFFSET(pDsub);
- break;
- case Instruction::DIV_DOUBLE_2ADDR:
- case Instruction::DIV_DOUBLE:
- func_offset = ENTRYPOINT_OFFSET(pDdiv);
- break;
- case Instruction::MUL_DOUBLE_2ADDR:
- case Instruction::MUL_DOUBLE:
- func_offset = ENTRYPOINT_OFFSET(pDmul);
- break;
- case Instruction::REM_DOUBLE_2ADDR:
- case Instruction::REM_DOUBLE:
- func_offset = ENTRYPOINT_OFFSET(pFmod);
- break;
- case Instruction::NEG_DOUBLE: {
- GenNegDouble(cu, rl_dest, rl_src1);
- return false;
- }
- default:
- return true;
- }
- FlushAllRegs(cu); /* Send everything to home location */
- CallRuntimeHelperRegLocationRegLocation(cu, func_offset, rl_src1, rl_src2, false);
- rl_result = GetReturnWide(cu, true);
- StoreValueWide(cu, rl_dest, rl_result);
- return false;
-}
-
-bool Codegen::GenConversionPortable(CompilationUnit* cu, Instruction::Code opcode,
- RegLocation rl_dest, RegLocation rl_src)
-{
-
- switch (opcode) {
- case Instruction::INT_TO_FLOAT:
- return GenConversionCall(cu, ENTRYPOINT_OFFSET(pI2f),
- rl_dest, rl_src);
- case Instruction::FLOAT_TO_INT:
- return GenConversionCall(cu, ENTRYPOINT_OFFSET(pF2iz),
- rl_dest, rl_src);
- case Instruction::DOUBLE_TO_FLOAT:
- return GenConversionCall(cu, ENTRYPOINT_OFFSET(pD2f),
- rl_dest, rl_src);
- case Instruction::FLOAT_TO_DOUBLE:
- return GenConversionCall(cu, ENTRYPOINT_OFFSET(pF2d),
- rl_dest, rl_src);
- case Instruction::INT_TO_DOUBLE:
- return GenConversionCall(cu, ENTRYPOINT_OFFSET(pI2d),
- rl_dest, rl_src);
- case Instruction::DOUBLE_TO_INT:
- return GenConversionCall(cu, ENTRYPOINT_OFFSET(pD2iz),
- rl_dest, rl_src);
- case Instruction::FLOAT_TO_LONG:
- return GenConversionCall(cu, ENTRYPOINT_OFFSET(pF2l),
- rl_dest, rl_src);
- case Instruction::LONG_TO_FLOAT:
- return GenConversionCall(cu, ENTRYPOINT_OFFSET(pL2f),
- rl_dest, rl_src);
- case Instruction::DOUBLE_TO_LONG:
- return GenConversionCall(cu, ENTRYPOINT_OFFSET(pD2l),
- rl_dest, rl_src);
- case Instruction::LONG_TO_DOUBLE:
- return GenConversionCall(cu, ENTRYPOINT_OFFSET(pL2d),
- rl_dest, rl_src);
- default:
- return true;
- }
- return false;
-}
-
/* Check if we need to check for pending suspend request */
void Codegen::GenSuspendTest(CompilationUnit* cu, int opt_flags)
{
diff --git a/src/compiler/codegen/mips/assemble_mips.cc b/src/compiler/codegen/mips/assemble_mips.cc
index 4574a42..c0ed3b6 100644
--- a/src/compiler/codegen/mips/assemble_mips.cc
+++ b/src/compiler/codegen/mips/assemble_mips.cc
@@ -712,33 +712,5 @@
{
return EncodingMap[lir->opcode].size;
}
-/*
- * Target-dependent offset assignment.
- * independent.
- */
-int MipsCodegen::AssignInsnOffsets(CompilationUnit* cu)
-{
- LIR* mips_lir;
- int offset = 0;
-
- for (mips_lir = cu->first_lir_insn; mips_lir != NULL; mips_lir = NEXT_LIR(mips_lir)) {
- mips_lir->offset = offset;
- if (mips_lir->opcode >= 0) {
- if (!mips_lir->flags.is_nop) {
- offset += mips_lir->flags.size;
- }
- } else if (mips_lir->opcode == kPseudoPseudoAlign4) {
- if (offset & 0x2) {
- offset += 2;
- mips_lir->operands[0] = 1;
- } else {
- mips_lir->operands[0] = 0;
- }
- }
- /* Pseudo opcodes don't consume space */
- }
-
- return offset;
-}
} // namespace art
diff --git a/src/compiler/codegen/mips/codegen_mips.h b/src/compiler/codegen/mips/codegen_mips.h
index b0ecfce..aaa03c0 100644
--- a/src/compiler/codegen/mips/codegen_mips.h
+++ b/src/compiler/codegen/mips/codegen_mips.h
@@ -83,7 +83,6 @@
virtual void SetupTargetResourceMasks(CompilationUnit* cu, LIR* lir);
virtual const char* GetTargetInstFmt(int opcode);
virtual const char* GetTargetInstName(int opcode);
- virtual int AssignInsnOffsets(CompilationUnit* cu);
virtual std::string BuildInsnString(const char* fmt, LIR* lir, unsigned char* base_addr);
virtual uint64_t GetPCUseDefEncoding();
virtual uint64_t GetTargetInstFlags(int opcode);
diff --git a/src/compiler/codegen/mips/fp_mips.cc b/src/compiler/codegen/mips/fp_mips.cc
index efc4f80..e718c5c 100644
--- a/src/compiler/codegen/mips/fp_mips.cc
+++ b/src/compiler/codegen/mips/fp_mips.cc
@@ -49,11 +49,14 @@
case Instruction::MUL_FLOAT:
op = kMipsFmuls;
break;
- case Instruction::REM_FLOAT_2ADDR:
- case Instruction::REM_FLOAT:
- case Instruction::NEG_FLOAT: {
- return GenArithOpFloatPortable(cu, opcode, rl_dest, rl_src1, rl_src2);
- }
+ FlushAllRegs(cu); // Send everything to home location
+ CallRuntimeHelperRegLocationRegLocation(cu, ENTRYPOINT_OFFSET(pFmodf), rl_src1, rl_src2, false);
+ rl_result = GetReturn(cu, true);
+ StoreValue(cu, rl_dest, rl_result);
+ return false;
+ case Instruction::NEG_FLOAT:
+ GenNegFloat(cu, rl_dest, rl_src1);
+ return false;
default:
return true;
}
@@ -91,9 +94,14 @@
break;
case Instruction::REM_DOUBLE_2ADDR:
case Instruction::REM_DOUBLE:
- case Instruction::NEG_DOUBLE: {
- return GenArithOpDoublePortable(cu, opcode, rl_dest, rl_src1, rl_src2);
- }
+ FlushAllRegs(cu); // Send everything to home location
+ CallRuntimeHelperRegLocationRegLocation(cu, ENTRYPOINT_OFFSET(pFmod), rl_src1, rl_src2, false);
+ rl_result = GetReturnWide(cu, true);
+ StoreValueWide(cu, rl_dest, rl_result);
+ return false;
+ case Instruction::NEG_DOUBLE:
+ GenNegDouble(cu, rl_dest, rl_src1);
+ return false;
default:
return true;
}
@@ -130,12 +138,17 @@
op = kMipsFcvtdw;
break;
case Instruction::FLOAT_TO_INT:
+ return GenConversionCall(cu, ENTRYPOINT_OFFSET(pF2iz), rl_dest, rl_src);
case Instruction::DOUBLE_TO_INT:
+ return GenConversionCall(cu, ENTRYPOINT_OFFSET(pD2iz), rl_dest, rl_src);
case Instruction::LONG_TO_DOUBLE:
+ return GenConversionCall(cu, ENTRYPOINT_OFFSET(pL2d), rl_dest, rl_src);
case Instruction::FLOAT_TO_LONG:
+ return GenConversionCall(cu, ENTRYPOINT_OFFSET(pF2l), rl_dest, rl_src);
case Instruction::LONG_TO_FLOAT:
+ return GenConversionCall(cu, ENTRYPOINT_OFFSET(pL2f), rl_dest, rl_src);
case Instruction::DOUBLE_TO_LONG:
- return GenConversionPortable(cu, opcode, rl_dest, rl_src);
+ return GenConversionCall(cu, ENTRYPOINT_OFFSET(pD2l), rl_dest, rl_src);
default:
return true;
}
diff --git a/src/compiler/codegen/x86/assemble_x86.cc b/src/compiler/codegen/x86/assemble_x86.cc
index 1e04e18..2b33090 100644
--- a/src/compiler/codegen/x86/assemble_x86.cc
+++ b/src/compiler/codegen/x86/assemble_x86.cc
@@ -1417,33 +1417,4 @@
return res;
}
-/*
- * Target-dependent offset assignment.
- * independent.
- */
-int X86Codegen::AssignInsnOffsets(CompilationUnit* cu)
-{
- LIR* x86_lir;
- int offset = 0;
-
- for (x86_lir = cu->first_lir_insn; x86_lir != NULL; x86_lir = NEXT_LIR(x86_lir)) {
- x86_lir->offset = offset;
- if (x86_lir->opcode >= 0) {
- if (!x86_lir->flags.is_nop) {
- offset += x86_lir->flags.size;
- }
- } else if (x86_lir->opcode == kPseudoPseudoAlign4) {
- if (offset & 0x2) {
- offset += 2;
- x86_lir->operands[0] = 1;
- } else {
- x86_lir->operands[0] = 0;
- }
- }
- /* Pseudo opcodes don't consume space */
- }
-
- return offset;
-}
-
} // namespace art
diff --git a/src/compiler/codegen/x86/codegen_x86.h b/src/compiler/codegen/x86/codegen_x86.h
index 2a01d9a..dba4953 100644
--- a/src/compiler/codegen/x86/codegen_x86.h
+++ b/src/compiler/codegen/x86/codegen_x86.h
@@ -83,7 +83,6 @@
virtual void SetupTargetResourceMasks(CompilationUnit* cu, LIR* lir);
virtual const char* GetTargetInstFmt(int opcode);
virtual const char* GetTargetInstName(int opcode);
- virtual int AssignInsnOffsets(CompilationUnit* cu);
virtual std::string BuildInsnString(const char* fmt, LIR* lir, unsigned char* base_addr);
virtual uint64_t GetPCUseDefEncoding();
virtual uint64_t GetTargetInstFlags(int opcode);
diff --git a/src/compiler/codegen/x86/fp_x86.cc b/src/compiler/codegen/x86/fp_x86.cc
index 14f8b92..78c737d 100644
--- a/src/compiler/codegen/x86/fp_x86.cc
+++ b/src/compiler/codegen/x86/fp_x86.cc
@@ -47,10 +47,16 @@
case Instruction::MUL_FLOAT:
op = kX86MulssRR;
break;
- case Instruction::NEG_FLOAT:
case Instruction::REM_FLOAT_2ADDR:
case Instruction::REM_FLOAT:
- return GenArithOpFloatPortable(cu, opcode, rl_dest, rl_src1, rl_src2);
+ FlushAllRegs(cu); // Send everything to home location
+ CallRuntimeHelperRegLocationRegLocation(cu, ENTRYPOINT_OFFSET(pFmodf), rl_src1, rl_src2, false);
+ rl_result = GetReturn(cu, true);
+ StoreValue(cu, rl_dest, rl_result);
+ return false;
+ case Instruction::NEG_FLOAT:
+ GenNegFloat(cu, rl_dest, rl_src1);
+ return false;
default:
return true;
}
@@ -93,10 +99,16 @@
case Instruction::MUL_DOUBLE:
op = kX86MulsdRR;
break;
- case Instruction::NEG_DOUBLE:
case Instruction::REM_DOUBLE_2ADDR:
case Instruction::REM_DOUBLE:
- return GenArithOpDoublePortable(cu, opcode, rl_dest, rl_src1, rl_src2);
+ FlushAllRegs(cu); // Send everything to home location
+ CallRuntimeHelperRegLocationRegLocation(cu, ENTRYPOINT_OFFSET(pFmod), rl_src1, rl_src2, false);
+ rl_result = GetReturnWide(cu, true);
+ StoreValueWide(cu, rl_dest, rl_result);
+ return false;
+ case Instruction::NEG_DOUBLE:
+ GenNegDouble(cu, rl_dest, rl_src1);
+ return false;
default:
return true;
}
@@ -186,11 +198,14 @@
return false;
}
case Instruction::LONG_TO_DOUBLE:
+ return GenConversionCall(cu, ENTRYPOINT_OFFSET(pL2d), rl_dest, rl_src);
case Instruction::LONG_TO_FLOAT:
// TODO: inline by using memory as a 64-bit source. Be careful about promoted registers.
+ return GenConversionCall(cu, ENTRYPOINT_OFFSET(pL2f), rl_dest, rl_src);
case Instruction::FLOAT_TO_LONG:
+ return GenConversionCall(cu, ENTRYPOINT_OFFSET(pF2l), rl_dest, rl_src);
case Instruction::DOUBLE_TO_LONG:
- return GenConversionPortable(cu, opcode, rl_dest, rl_src);
+ return GenConversionCall(cu, ENTRYPOINT_OFFSET(pD2l), rl_dest, rl_src);
default:
return true;
}
diff --git a/src/oat/runtime/arm/oat_support_entrypoints_arm.cc b/src/oat/runtime/arm/oat_support_entrypoints_arm.cc
index e363cbe..f30ce24 100644
--- a/src/oat/runtime/arm/oat_support_entrypoints_arm.cc
+++ b/src/oat/runtime/arm/oat_support_entrypoints_arm.cc
@@ -86,27 +86,15 @@
extern int32_t CmplFloat(float a, float b);
// Math conversions.
-extern "C" float __aeabi_i2f(int32_t op1); // INT_TO_FLOAT
extern "C" int32_t __aeabi_f2iz(float op1); // FLOAT_TO_INT
-extern "C" float __aeabi_d2f(double op1); // DOUBLE_TO_FLOAT
-extern "C" double __aeabi_f2d(float op1); // FLOAT_TO_DOUBLE
-extern "C" double __aeabi_i2d(int32_t op1); // INT_TO_DOUBLE
extern "C" int32_t __aeabi_d2iz(double op1); // DOUBLE_TO_INT
extern "C" float __aeabi_l2f(int64_t op1); // LONG_TO_FLOAT
extern "C" double __aeabi_l2d(int64_t op1); // LONG_TO_DOUBLE
// Single-precision FP arithmetics.
-extern "C" float __aeabi_fadd(float a, float b); // ADD_FLOAT[_2ADDR]
-extern "C" float __aeabi_fsub(float a, float b); // SUB_FLOAT[_2ADDR]
-extern "C" float __aeabi_fdiv(float a, float b); // DIV_FLOAT[_2ADDR]
-extern "C" float __aeabi_fmul(float a, float b); // MUL_FLOAT[_2ADDR]
extern "C" float fmodf(float a, float b); // REM_FLOAT[_2ADDR]
// Double-precision FP arithmetics.
-extern "C" double __aeabi_dadd(double a, double b); // ADD_DOUBLE[_2ADDR]
-extern "C" double __aeabi_dsub(double a, double b); // SUB_DOUBLE[_2ADDR]
-extern "C" double __aeabi_ddiv(double a, double b); // DIV_DOUBLE[_2ADDR]
-extern "C" double __aeabi_dmul(double a, double b); // MUL_DOUBLE[_2ADDR]
extern "C" double fmod(double a, double b); // REM_DOUBLE[_2ADDR]
// Integer arithmetics.
@@ -213,22 +201,10 @@
points->pCmpgFloat = CmpgFloat;
points->pCmplDouble = CmplDouble;
points->pCmplFloat = CmplFloat;
- points->pDadd = __aeabi_dadd;
- points->pDdiv = __aeabi_ddiv;
- points->pDmul = __aeabi_dmul;
- points->pDsub = __aeabi_dsub;
- points->pF2d = __aeabi_f2d;
points->pFmod = fmod;
points->pSqrt = sqrt;
- points->pI2d = __aeabi_i2d;
points->pL2d = __aeabi_l2d;
- points->pD2f = __aeabi_d2f;
- points->pFadd = __aeabi_fadd;
- points->pFdiv = __aeabi_fdiv;
points->pFmodf = fmodf;
- points->pFmul = __aeabi_fmul;
- points->pFsub = __aeabi_fsub;
- points->pI2f = __aeabi_i2f;
points->pL2f = __aeabi_l2f;
points->pD2iz = __aeabi_d2iz;
points->pF2iz = __aeabi_f2iz;
diff --git a/src/oat/runtime/mips/oat_support_entrypoints_mips.cc b/src/oat/runtime/mips/oat_support_entrypoints_mips.cc
index 9327955..ec41be9 100644
--- a/src/oat/runtime/mips/oat_support_entrypoints_mips.cc
+++ b/src/oat/runtime/mips/oat_support_entrypoints_mips.cc
@@ -89,11 +89,7 @@
extern "C" int64_t artLdivmodFromCode(int64_t a, int64_t b);
// Math conversions.
-extern "C" float __floatsisf(int op1); // INT_TO_FLOAT
extern "C" int32_t __fixsfsi(float op1); // FLOAT_TO_INT
-extern "C" float __truncdfsf2(double op1); // DOUBLE_TO_FLOAT
-extern "C" double __extendsfdf2(float op1); // FLOAT_TO_DOUBLE
-extern "C" double __floatsidf(int op1); // INT_TO_DOUBLE
extern "C" int32_t __fixdfsi(double op1); // DOUBLE_TO_INT
extern "C" float __floatdisf(int64_t op1); // LONG_TO_FLOAT
extern "C" double __floatdidf(int64_t op1); // LONG_TO_DOUBLE
@@ -101,17 +97,9 @@
extern "C" int64_t __fixdfdi(double op1); // DOUBLE_TO_LONG
// Single-precision FP arithmetics.
-extern "C" float __addsf3(float a, float b); // ADD_FLOAT[_2ADDR]
-extern "C" float __subsf3(float a, float b); // SUB_FLOAT[_2ADDR]
-extern "C" float __divsf3(float a, float b); // DIV_FLOAT[_2ADDR]
-extern "C" float __mulsf3(float a, float b); // MUL_FLOAT[_2ADDR]
extern "C" float fmodf(float a, float b); // REM_FLOAT[_2ADDR]
// Double-precision FP arithmetics.
-extern "C" double __adddf3(double a, double b); // ADD_DOUBLE[_2ADDR]
-extern "C" double __subdf3(double a, double b); // SUB_DOUBLE[_2ADDR]
-extern "C" double __divdf3(double a, double b); // DIV_DOUBLE[_2ADDR]
-extern "C" double __muldf3(double a, double b); // MUL_DOUBLE[_2ADDR]
extern "C" double fmod(double a, double b); // REM_DOUBLE[_2ADDR]
// Long long arithmetics - REM_LONG[_2ADDR] and DIV_LONG[_2ADDR]
@@ -215,21 +203,9 @@
points->pCmpgFloat = CmpgFloat;
points->pCmplDouble = CmplDouble;
points->pCmplFloat = CmplFloat;
- points->pDadd = __adddf3;
- points->pDdiv = __subdf3;
- points->pDmul = __muldf3;
- points->pDsub = __subdf3;
- points->pF2d = __extendsfdf2;
points->pFmod = fmod;
- points->pI2d = __floatsidf;
points->pL2d = __floatdidf;
- points->pD2f = __truncdfsf2;
- points->pFadd = __addsf3;
- points->pFdiv = __divsf3;
points->pFmodf = fmodf;
- points->pFmul = __mulsf3;
- points->pFsub = __subsf3;
- points->pI2f = __floatsisf;
points->pL2f = __floatdisf;
points->pD2iz = __fixdfsi;
points->pF2iz = __fixsfsi;
diff --git a/src/oat/runtime/oat_support_entrypoints.h b/src/oat/runtime/oat_support_entrypoints.h
index e63e1fd..62a7206 100644
--- a/src/oat/runtime/oat_support_entrypoints.h
+++ b/src/oat/runtime/oat_support_entrypoints.h
@@ -93,22 +93,10 @@
int32_t (*pCmpgFloat)(float, float);
int32_t (*pCmplDouble)(double, double);
int32_t (*pCmplFloat)(float, float);
- double (*pDadd)(double, double);
- double (*pDdiv)(double, double);
- double (*pDmul)(double, double);
- double (*pDsub)(double, double);
- double (*pF2d)(float);
double (*pFmod)(double, double);
double (*pSqrt)(double);
- double (*pI2d)(int);
double (*pL2d)(int64_t);
- float (*pD2f)(double);
- float (*pFadd)(float, float);
- float (*pFdiv)(float, float);
float (*pFmodf)(float, float);
- float (*pFmul)(float, float);
- float (*pFsub)(float, float);
- float (*pI2f)(int32_t);
float (*pL2f)(int64_t);
int32_t (*pD2iz)(double);
int32_t (*pF2iz)(float);
diff --git a/src/oat/runtime/x86/oat_support_entrypoints_x86.cc b/src/oat/runtime/x86/oat_support_entrypoints_x86.cc
index c2236d7..9b32b8b 100644
--- a/src/oat/runtime/x86/oat_support_entrypoints_x86.cc
+++ b/src/oat/runtime/x86/oat_support_entrypoints_x86.cc
@@ -184,21 +184,9 @@
//points->pCmpgFloat = NULL; // Not needed on x86.
//points->pCmplDouble = NULL; // Not needed on x86.
//points->pCmplFloat = NULL; // Not needed on x86.
- //points->pDadd = NULL; // Not needed on x86.
- //points->pDdiv = NULL; // Not needed on x86.
- //points->pDmul = NULL; // Not needed on x86.
- //points->pDsub = NULL; // Not needed on x86.
- //points->pF2d = NULL;
points->pFmod = art_fmod_from_code;
- //points->pI2d = NULL;
points->pL2d = art_l2d_from_code;
- //points->pD2f = NULL;
- //points->pFadd = NULL; // Not needed on x86.
- //points->pFdiv = NULL; // Not needed on x86.
points->pFmodf = art_fmodf_from_code;
- //points->pFmul = NULL; // Not needed on x86.
- //points->pFsub = NULL; // Not needed on x86.
- //points->pI2f = NULL;
points->pL2f = art_l2f_from_code;
//points->pD2iz = NULL; // Not needed on x86.
//points->pF2iz = NULL; // Not needed on x86.
diff --git a/src/thread.cc b/src/thread.cc
index ca57f8a..c51d45f 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -1581,22 +1581,10 @@
ENTRY_POINT_INFO(pCmpgFloat),
ENTRY_POINT_INFO(pCmplDouble),
ENTRY_POINT_INFO(pCmplFloat),
- ENTRY_POINT_INFO(pDadd),
- ENTRY_POINT_INFO(pDdiv),
- ENTRY_POINT_INFO(pDmul),
- ENTRY_POINT_INFO(pDsub),
- ENTRY_POINT_INFO(pF2d),
ENTRY_POINT_INFO(pFmod),
ENTRY_POINT_INFO(pSqrt),
- ENTRY_POINT_INFO(pI2d),
ENTRY_POINT_INFO(pL2d),
- ENTRY_POINT_INFO(pD2f),
- ENTRY_POINT_INFO(pFadd),
- ENTRY_POINT_INFO(pFdiv),
ENTRY_POINT_INFO(pFmodf),
- ENTRY_POINT_INFO(pFmul),
- ENTRY_POINT_INFO(pFsub),
- ENTRY_POINT_INFO(pI2f),
ENTRY_POINT_INFO(pL2f),
ENTRY_POINT_INFO(pD2iz),
ENTRY_POINT_INFO(pF2iz),