Chromium Code Reviews| Index: src/ia32/assembler-ia32.h |
| diff --git a/src/ia32/assembler-ia32.h b/src/ia32/assembler-ia32.h |
| index 7ca50786922306522dcbaf1b655081d56c1dceee..7f011a9e6f2020329c89516d2b1aaabb80d5f489 100644 |
| --- a/src/ia32/assembler-ia32.h |
| +++ b/src/ia32/assembler-ia32.h |
| @@ -40,6 +40,7 @@ |
| #include <deque> |
| #include "src/assembler.h" |
| +#include "src/ia32/sse-instr.h" |
| #include "src/isolate.h" |
| #include "src/utils.h" |
| @@ -980,6 +981,19 @@ class Assembler : public AssemblerBase { |
| void divps(XMMRegister dst, XMMRegister src) { divps(dst, Operand(src)); } |
| // SSE2 instructions |
| + void sse2_instr(XMMRegister dst, const Operand& src, byte prefix, byte escape, |
| + byte opcode); |
|
bbudge
2017/02/15 16:00:12
This should probably be either private, or even be
bbudge
2017/02/15 16:07:31
Looking at the implementation, this has to be a cl
Jing
2017/02/16 05:11:17
Done.
|
| +#define DECLARE_SSE2_INSTRUCTION(instruction, prefix, escape, opcode) \ |
| + void instruction(XMMRegister dst, XMMRegister src) { \ |
| + instruction(dst, Operand(src)); \ |
| + } \ |
| + void instruction(XMMRegister dst, const Operand& src) { \ |
| + sse2_instr(dst, src, 0x##prefix, 0x##escape, 0x##opcode); \ |
| + } |
| + |
| + SSE2_INSTRUCTION_LIST(DECLARE_SSE2_INSTRUCTION) |
|
bbudge
2017/02/15 16:00:12
I think it would be more readable if SSE2_INSTRUCT
Jing
2017/02/16 05:11:17
I ported the header file from x64 and planned to e
bbudge
2017/02/17 00:44:40
I think it's more consistent with V8 style to inli
Jing
2017/02/17 03:51:35
Done.
Jing
2017/02/20 15:28:13
Sorry, I recover the separate header file again, b
bbudge
2017/02/22 21:51:09
OK, I see the precedent in x64.
|
| +#undef DECLARE_SSE2_INSTRUCTION |
| + |
| void cvttss2si(Register dst, const Operand& src); |
| void cvttss2si(Register dst, XMMRegister src) { |
| cvttss2si(dst, Operand(src)); |