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

Unified Diff: src/ia32/assembler-ia32.cc

Issue 2747103002: [ia32] Add minps/maxps and AVX v_ps/v_pd for add/sub/mul/div/min/max (Closed)
Patch Set: Created 3 years, 9 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/assembler-ia32.h ('k') | src/ia32/disasm-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/assembler-ia32.cc
diff --git a/src/ia32/assembler-ia32.cc b/src/ia32/assembler-ia32.cc
index 4dcf50ff8534c70917ace65c617778b32e55b25d..4da15342c2b8c17b21502f1742546fcf451f4164 100644
--- a/src/ia32/assembler-ia32.cc
+++ b/src/ia32/assembler-ia32.cc
@@ -2261,6 +2261,19 @@ void Assembler::divps(XMMRegister dst, const Operand& src) {
emit_sse_operand(dst, src);
}
+void Assembler::minps(XMMRegister dst, const Operand& src) {
+ EnsureSpace ensure_space(this);
+ EMIT(0x0F);
+ EMIT(0x5D);
+ emit_sse_operand(dst, src);
+}
+
+void Assembler::maxps(XMMRegister dst, const Operand& src) {
+ EnsureSpace ensure_space(this);
+ EMIT(0x0F);
+ EMIT(0x5F);
+ emit_sse_operand(dst, src);
+}
void Assembler::sqrtsd(XMMRegister dst, const Operand& src) {
EnsureSpace ensure_space(this);
@@ -2759,41 +2772,25 @@ void Assembler::vfmass(byte op, XMMRegister dst, XMMRegister src1,
void Assembler::vsd(byte op, XMMRegister dst, XMMRegister src1,
const Operand& src2) {
- DCHECK(IsEnabled(AVX));
- EnsureSpace ensure_space(this);
- emit_vex_prefix(src1, kLIG, kF2, k0F, kWIG);
- EMIT(op);
- emit_sse_operand(dst, src2);
+ vinstr(op, dst, src1, src2, kF2, k0F, kWIG);
}
void Assembler::vss(byte op, XMMRegister dst, XMMRegister src1,
const Operand& src2) {
- DCHECK(IsEnabled(AVX));
- EnsureSpace ensure_space(this);
- emit_vex_prefix(src1, kLIG, kF3, k0F, kWIG);
- EMIT(op);
- emit_sse_operand(dst, src2);
+ vinstr(op, dst, src1, src2, kF3, k0F, kWIG);
}
void Assembler::vps(byte op, XMMRegister dst, XMMRegister src1,
const Operand& src2) {
- DCHECK(IsEnabled(AVX));
- EnsureSpace ensure_space(this);
- emit_vex_prefix(src1, kL128, kNone, k0F, kWIG);
- EMIT(op);
- emit_sse_operand(dst, src2);
+ vinstr(op, dst, src1, src2, kNone, k0F, kWIG);
}
void Assembler::vpd(byte op, XMMRegister dst, XMMRegister src1,
const Operand& src2) {
- DCHECK(IsEnabled(AVX));
- EnsureSpace ensure_space(this);
- emit_vex_prefix(src1, kL128, k66, k0F, kWIG);
- EMIT(op);
- emit_sse_operand(dst, src2);
+ vinstr(op, dst, src1, src2, k66, k0F, kWIG);
}
void Assembler::vpsllw(XMMRegister dst, XMMRegister src, int8_t imm8) {
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | src/ia32/disasm-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698