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

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

Issue 1408983002: [x64] Make use of vxorpd when AVX is enabled. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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') | no next file » | 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 da6f29726754680299d1ddc4a61bb7a913ccca3b..25a7c9af1a21a71df84c0081987385725baa93d6 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -793,7 +793,7 @@ void MacroAssembler::Cvtlsi2sd(XMMRegister dst, Register src) {
vxorpd(dst, dst, dst);
vcvtlsi2sd(dst, dst, src);
} else {
- xorps(dst, dst);
+ xorpd(dst, dst);
cvtlsi2sd(dst, src);
}
}
@@ -805,7 +805,7 @@ void MacroAssembler::Cvtlsi2sd(XMMRegister dst, const Operand& src) {
vxorpd(dst, dst, dst);
vcvtlsi2sd(dst, dst, src);
} else {
- xorps(dst, dst);
+ xorpd(dst, dst);
cvtlsi2sd(dst, src);
}
}
@@ -2405,7 +2405,7 @@ void MacroAssembler::Move(const Operand& dst, Handle<Object> source) {
void MacroAssembler::Move(XMMRegister dst, uint32_t src) {
if (src == 0) {
- xorps(dst, dst);
+ Xorpd(dst, dst);
} else {
unsigned pop = base::bits::CountPopulation32(src);
DCHECK_NE(0u, pop);
@@ -2421,7 +2421,7 @@ void MacroAssembler::Move(XMMRegister dst, uint32_t src) {
void MacroAssembler::Move(XMMRegister dst, uint64_t src) {
if (src == 0) {
- xorps(dst, dst);
+ Xorpd(dst, dst);
} else {
unsigned nlz = base::bits::CountLeadingZeros64(src);
unsigned ntz = base::bits::CountTrailingZeros64(src);
@@ -2539,6 +2539,16 @@ void MacroAssembler::Movq(Register dst, XMMRegister src) {
}
+void MacroAssembler::Xorpd(XMMRegister dst, XMMRegister src) {
+ if (CpuFeatures::IsSupported(AVX)) {
+ CpuFeatureScope scope(this, AVX);
+ vxorpd(dst, dst, src);
+ } else {
+ xorpd(dst, src);
+ }
+}
+
+
void MacroAssembler::Cmp(Register dst, Handle<Object> source) {
AllowDeferredHandleDereference smi_check;
if (source->IsSmi()) {
@@ -3214,7 +3224,7 @@ void MacroAssembler::ClampDoubleToUint8(XMMRegister input_reg,
Register result_reg) {
Label done;
Label conv_failure;
- xorps(temp_xmm_reg, temp_xmm_reg);
+ Xorpd(temp_xmm_reg, temp_xmm_reg);
cvtsd2si(result_reg, input_reg);
testl(result_reg, Immediate(0xFFFFFF00));
j(zero, &done, Label::kNear);
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698