Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(923)

Unified Diff: src/s390/macro-assembler-s390.cc

Issue 2160573003: S390: Fix convertion from int32 to float32 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: more fix Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/s390/macro-assembler-s390.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/s390/macro-assembler-s390.cc
diff --git a/src/s390/macro-assembler-s390.cc b/src/s390/macro-assembler-s390.cc
index 55057e05a673c9461372af164019cdf4c60d1f99..852a1c5ae9c3971a78b161e1be46d6bc09c798a4 100644
--- a/src/s390/macro-assembler-s390.cc
+++ b/src/s390/macro-assembler-s390.cc
@@ -656,12 +656,12 @@ void MacroAssembler::ConvertUnsignedIntToDouble(Register src,
}
void MacroAssembler::ConvertIntToFloat(Register src, DoubleRegister dst) {
- cefbr(dst, src);
+ cefbr(Condition(4), dst, src);
}
void MacroAssembler::ConvertUnsignedIntToFloat(Register src,
DoubleRegister dst) {
- celfbr(Condition(0), Condition(0), dst, src);
+ celfbr(Condition(4), Condition(0), dst, src);
}
#if V8_TARGET_ARCH_S390X
@@ -760,7 +760,7 @@ void MacroAssembler::ConvertFloat32ToInt32(const DoubleRegister double_input,
m = Condition(5);
break;
case kRoundToNearest:
- UNIMPLEMENTED();
+ m = Condition(4);
break;
case kRoundToPlusInf:
m = Condition(6);
@@ -773,6 +773,10 @@ void MacroAssembler::ConvertFloat32ToInt32(const DoubleRegister double_input,
break;
}
cfebr(m, dst, double_input);
+ Label done;
+ b(Condition(0xe), &done, Label::kNear); // special case
+ LoadImmP(dst, Operand::Zero());
+ bind(&done);
ldgr(double_dst, dst);
}
@@ -798,6 +802,10 @@ void MacroAssembler::ConvertFloat32ToUnsignedInt32(
break;
}
clfebr(m, Condition(0), dst, double_input);
+ Label done;
+ b(Condition(0xe), &done, Label::kNear); // special case
+ LoadImmP(dst, Operand::Zero());
+ bind(&done);
ldgr(double_dst, dst);
}
« no previous file with comments | « src/s390/macro-assembler-s390.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698