MIPS: Fix loading Float64 constants in turbofan.
TEST=ctest/test-run-machops/RunFloat64SubImm1, RunFloat64SubImm2, RunFloat64MulImm, RunFloat64Compare BUG= R=paul.lind@imgtec.com Review URL: https://codereview.chromium.org/646923003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24536 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
9595c6104e
commit
8e092181ae
@ -23,7 +23,8 @@ namespace internal {
|
||||
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size)
|
||||
: Assembler(arg_isolate, buffer, size),
|
||||
generating_stub_(false),
|
||||
has_frame_(false) {
|
||||
has_frame_(false),
|
||||
has_double_zero_reg_set_(false) {
|
||||
if (isolate() != NULL) {
|
||||
code_object_ = Handle<Object>(isolate()->heap()->undefined_value(),
|
||||
isolate());
|
||||
@ -1530,10 +1531,9 @@ void MacroAssembler::Move(FPURegister dst, double imm) {
|
||||
static const DoubleRepresentation zero(0.0);
|
||||
DoubleRepresentation value_rep(imm);
|
||||
// Handle special values first.
|
||||
bool force_load = dst.is(kDoubleRegZero);
|
||||
if (value_rep == zero && !force_load) {
|
||||
if (value_rep == zero && has_double_zero_reg_set_) {
|
||||
mov_d(dst, kDoubleRegZero);
|
||||
} else if (value_rep == minus_zero && !force_load) {
|
||||
} else if (value_rep == minus_zero && has_double_zero_reg_set_) {
|
||||
neg_d(dst, kDoubleRegZero);
|
||||
} else {
|
||||
uint32_t lo, hi;
|
||||
@ -1554,6 +1554,7 @@ void MacroAssembler::Move(FPURegister dst, double imm) {
|
||||
} else {
|
||||
Mthc1(zero_reg, dst);
|
||||
}
|
||||
if (dst.is(kDoubleRegZero)) has_double_zero_reg_set_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1665,6 +1665,7 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
|
||||
|
||||
bool generating_stub_;
|
||||
bool has_frame_;
|
||||
bool has_double_zero_reg_set_;
|
||||
// This handle will be patched with the code object on installation.
|
||||
Handle<Object> code_object_;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user