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

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

Issue 2161513002: [x64] add Absps/d and Negps/d macro (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add Abspd and Negpd, and move constants to external reference 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/x64/macro-assembler-x64.h ('k') | test/cctest/test-disasm-x64.cc » ('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 f797237af523ab64e50017ee9393e40166a84365..c95f8aeb84b75238b66d80b8bec8aa18aed6e252 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -2754,6 +2754,23 @@ void MacroAssembler::Movapd(XMMRegister dst, XMMRegister src) {
}
}
+void MacroAssembler::Movupd(XMMRegister dst, const Operand& src) {
+ if (CpuFeatures::IsSupported(AVX)) {
+ CpuFeatureScope scope(this, AVX);
+ vmovupd(dst, src);
+ } else {
+ movupd(dst, src);
+ }
+}
+
+void MacroAssembler::Movupd(const Operand& dst, XMMRegister src) {
+ if (CpuFeatures::IsSupported(AVX)) {
+ CpuFeatureScope scope(this, AVX);
+ vmovupd(dst, src);
+ } else {
+ movupd(dst, src);
+ }
+}
void MacroAssembler::Movsd(XMMRegister dst, XMMRegister src) {
if (CpuFeatures::IsSupported(AVX)) {
@@ -2973,6 +2990,27 @@ void MacroAssembler::Ucomisd(XMMRegister src1, const Operand& src2) {
}
}
+// ----------------------------------------------------------------------------
+
+void MacroAssembler::Absps(XMMRegister dst) {
+ Andps(dst,
+ ExternalOperand(ExternalReference::address_of_float_abs_constant()));
+}
+
+void MacroAssembler::Negps(XMMRegister dst) {
+ Xorps(dst,
+ ExternalOperand(ExternalReference::address_of_float_neg_constant()));
+}
+
+void MacroAssembler::Abspd(XMMRegister dst) {
+ Andps(dst,
+ ExternalOperand(ExternalReference::address_of_double_abs_constant()));
+}
+
+void MacroAssembler::Negpd(XMMRegister dst) {
+ Xorps(dst,
+ ExternalOperand(ExternalReference::address_of_double_neg_constant()));
+}
void MacroAssembler::Cmp(Register dst, Handle<Object> source) {
AllowDeferredHandleDereference smi_check;
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/test-disasm-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698