Index: src/ppc/macro-assembler-ppc.cc |
diff --git a/src/ppc/macro-assembler-ppc.cc b/src/ppc/macro-assembler-ppc.cc |
index 38e0009090ff2da3ae63fdb01987ea6c971c335b..05f244a7b9facb747931c9c2fda0f06efb0b9fd4 100644 |
--- a/src/ppc/macro-assembler-ppc.cc |
+++ b/src/ppc/macro-assembler-ppc.cc |
@@ -3749,6 +3749,25 @@ void MacroAssembler::MovDoubleToInt64( |
} |
+void MacroAssembler::MovIntToFloat(DoubleRegister dst, Register src) { |
+ subi(sp, sp, Operand(kFloatSize)); |
+ stw(src, MemOperand(sp, 0)); |
+ nop(GROUP_ENDING_NOP); // LHS/RAW optimization |
+ lfs(dst, MemOperand(sp, 0)); |
+ addi(sp, sp, Operand(kFloatSize)); |
+} |
+ |
+ |
+void MacroAssembler::MovFloatToInt(Register dst, DoubleRegister src) { |
+ subi(sp, sp, Operand(kFloatSize)); |
+ frsp(src, src); |
+ stfs(src, MemOperand(sp, 0)); |
+ nop(GROUP_ENDING_NOP); // LHS/RAW optimization |
+ lwz(dst, MemOperand(sp, 0)); |
+ addi(sp, sp, Operand(kFloatSize)); |
+} |
+ |
+ |
void MacroAssembler::Add(Register dst, Register src, intptr_t value, |
Register scratch) { |
if (is_int16(value)) { |