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

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

Issue 1593313010: Revert of [turbofan] Implement rounding of floats on x64 and ia32 without sse4.1. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/x64/macro-assembler-x64.h ('k') | test/cctest/compiler/value-helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index 66264f40081b646874f556b709075e2891181625..132439b8291283fb84c891d25ef9191a723570f3 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -998,46 +998,6 @@
vcvttss2siq(dst, src);
} else {
cvttss2siq(dst, src);
- }
-}
-
-
-void MacroAssembler::Cvtss2siq(Register dst, XMMRegister src) {
- if (CpuFeatures::IsSupported(AVX)) {
- CpuFeatureScope scope(this, AVX);
- vcvtss2siq(dst, src);
- } else {
- cvtss2siq(dst, src);
- }
-}
-
-
-void MacroAssembler::Cvtss2siq(Register dst, const Operand& src) {
- if (CpuFeatures::IsSupported(AVX)) {
- CpuFeatureScope scope(this, AVX);
- vcvtss2siq(dst, src);
- } else {
- cvtss2siq(dst, src);
- }
-}
-
-
-void MacroAssembler::Cvtsd2siq(Register dst, XMMRegister src) {
- if (CpuFeatures::IsSupported(AVX)) {
- CpuFeatureScope scope(this, AVX);
- vcvtsd2siq(dst, src);
- } else {
- cvtsd2siq(dst, src);
- }
-}
-
-
-void MacroAssembler::Cvtsd2siq(Register dst, const Operand& src) {
- if (CpuFeatures::IsSupported(AVX)) {
- CpuFeatureScope scope(this, AVX);
- vcvtsd2siq(dst, src);
- } else {
- cvtsd2siq(dst, src);
}
}
@@ -2856,53 +2816,6 @@
}
-void MacroAssembler::Roundss(XMMRegister dst, XMMRegister src, Register tmp,
- RoundingMode mode) {
- if (CpuFeatures::IsSupported(SSE4_1)) {
- CpuFeatureScope scope(this, SSE4_1);
- Roundss(dst, src, mode);
- } else {
- {
- // Set the right rounding mode.
- subq(rsp, Immediate(kPointerSize * 2));
- stmxcsr(Operand(rsp, 0));
- movl(tmp, Operand(rsp, 0));
- andl(tmp, Immediate(0xffff9fff));
- orl(tmp, Immediate(mode << 13));
- movl(Operand(rsp, kPointerSize), tmp);
- ldmxcsr(Operand(rsp, kPointerSize));
- }
-
- // Do rounding by conversion to int64.
- Cvtss2siq(tmp, src);
-
- Label done;
- Label out_of_range;
- cmpq(tmp, Immediate(1));
- // If the conversion results in INT64_MIN, then the input is outside
- // int64 range, and due to the limited precision of float32 this means
- // that the input must have been an integer already. We are therefore
- // done already.
- j(overflow, &out_of_range);
- // Rounding is done by converting the value back to float.
- Cvtqsi2ss(dst, tmp);
- if (!dst.is(src)) {
- jmp(&done);
- }
-
- bind(&out_of_range);
- if (!dst.is(src)) {
- movss(dst, src);
- }
-
- bind(&done);
- // Restore the original rounding mode.
- ldmxcsr(Operand(rsp, 0));
- addq(rsp, Immediate(kPointerSize * 2));
- }
-}
-
-
void MacroAssembler::Roundsd(XMMRegister dst, XMMRegister src,
RoundingMode mode) {
if (CpuFeatures::IsSupported(AVX)) {
@@ -2910,53 +2823,6 @@
vroundsd(dst, dst, src, mode);
} else {
roundsd(dst, src, mode);
- }
-}
-
-
-void MacroAssembler::Roundsd(XMMRegister dst, XMMRegister src, Register tmp,
- RoundingMode mode) {
- if (CpuFeatures::IsSupported(SSE4_1)) {
- CpuFeatureScope scope(this, SSE4_1);
- Roundsd(dst, src, mode);
- } else {
- {
- // Set the right rounding mode.
- subq(rsp, Immediate(kPointerSize * 2));
- stmxcsr(Operand(rsp, 0));
- movl(tmp, Operand(rsp, 0));
- andl(tmp, Immediate(0xffff9fff));
- orl(tmp, Immediate(mode << 13));
- movl(Operand(rsp, kPointerSize), tmp);
- ldmxcsr(Operand(rsp, kPointerSize));
- }
-
- // Do rounding by conversion to int64.
- Cvtsd2siq(tmp, src);
-
- Label out_of_range;
- Label done;
- cmpq(tmp, Immediate(1));
- // If the conversion results in INT64_MIN, then the input is outside
- // int64 range, and due to the limited precision of float64 this means
- // that the input must have been an integer already. We are therefore
- // done already.
- j(overflow, &out_of_range);
- // Rounding is done by converting the value back to float.
- Cvtqsi2sd(dst, tmp);
- if (!dst.is(src)) {
- jmp(&done);
- }
-
- bind(&out_of_range);
- if (!dst.is(src)) {
- movsd(dst, src);
- }
-
- bind(&done);
- // Restore the original rounding mode.
- ldmxcsr(Operand(rsp, 0));
- addq(rsp, Immediate(kPointerSize * 2));
}
}
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/compiler/value-helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698