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

Unified Diff: src/ia32/macro-assembler-ia32.h

Issue 2916093002: [ia32][wasm] Support AVX instructions for I32x4Splat/ReplaceLane/ExtractLane (Closed)
Patch Set: Created 3 years, 7 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/ia32/disasm-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/macro-assembler-ia32.h
diff --git a/src/ia32/macro-assembler-ia32.h b/src/ia32/macro-assembler-ia32.h
index e754a871286bbdeb027135a3ec09ad6496429733..0330c228787ad3af4b0d2b4a6b5e6d4b19fa401f 100644
--- a/src/ia32/macro-assembler-ia32.h
+++ b/src/ia32/macro-assembler-ia32.h
@@ -712,6 +712,29 @@ class MacroAssembler: public Assembler {
void PushReturnAddressFrom(Register src) { push(src); }
void PopReturnAddressTo(Register dst) { pop(dst); }
+// SSE/SSE2 instructions with AVX version.
+#define AVX_OP2_WITH_TYPE(macro_name, name, dst_type, src_type) \
+ void macro_name(dst_type dst, src_type src) { \
+ if (CpuFeatures::IsSupported(AVX)) { \
+ CpuFeatureScope scope(this, AVX); \
+ v##name(dst, src); \
+ } else { \
+ name(dst, src); \
+ } \
+ }
+
+ AVX_OP2_WITH_TYPE(Movd, movd, XMMRegister, Register)
+ AVX_OP2_WITH_TYPE(Movd, movd, XMMRegister, const Operand&)
+ AVX_OP2_WITH_TYPE(Movd, movd, Register, XMMRegister)
+ AVX_OP2_WITH_TYPE(Movd, movd, const Operand&, XMMRegister)
+
+#undef AVX_OP2_WITH_TYPE
+
+ void Pshufd(XMMRegister dst, XMMRegister src, uint8_t shuffle) {
+ Pshufd(dst, Operand(src), shuffle);
+ }
+ void Pshufd(XMMRegister dst, const Operand& src, uint8_t shuffle);
+
// Non-SSE2 instructions.
void Pextrd(Register dst, XMMRegister src, int8_t imm8);
void Pinsrd(XMMRegister dst, Register src, int8_t imm8,
« no previous file with comments | « src/ia32/disasm-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698