1f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch// Copyright 2012 the V8 project authors. All rights reserved.
2f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch// Use of this source code is governed by a BSD-style license that can be
3f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch// found in the LICENSE file.
4f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch
5f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch#ifndef V8_SSE_INSTR_H_
6f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch#define V8_SSE_INSTR_H_
7f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch
8f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch#define SSE2_INSTRUCTION_LIST(V) \
9f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(packsswb, 66, 0F, 63)        \
10f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(packssdw, 66, 0F, 6B)        \
11f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(packuswb, 66, 0F, 67)        \
12f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(paddb, 66, 0F, FC)           \
13f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(paddw, 66, 0F, FD)           \
14f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(paddd, 66, 0F, FE)           \
15f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(paddsb, 66, 0F, EC)          \
16f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(paddsw, 66, 0F, ED)          \
17f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(paddusb, 66, 0F, DC)         \
18f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(paddusw, 66, 0F, DD)         \
19f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pcmpeqb, 66, 0F, 74)         \
20f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pcmpeqw, 66, 0F, 75)         \
21f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pcmpeqd, 66, 0F, 76)         \
22f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pcmpgtb, 66, 0F, 64)         \
23f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pcmpgtw, 66, 0F, 65)         \
24f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pcmpgtd, 66, 0F, 66)         \
25f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pmaxsw, 66, 0F, EE)          \
26f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pmaxub, 66, 0F, DE)          \
27f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pminsw, 66, 0F, EA)          \
28f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pminub, 66, 0F, DA)          \
29f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pmullw, 66, 0F, D5)          \
30f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pmuludq, 66, 0F, F4)         \
31f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(psllw, 66, 0F, F1)           \
32f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pslld, 66, 0F, F2)           \
33f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(psraw, 66, 0F, E1)           \
34f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(psrad, 66, 0F, E2)           \
35f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(psrlw, 66, 0F, D1)           \
36f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(psrld, 66, 0F, D2)           \
37f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(psubb, 66, 0F, F8)           \
38f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(psubw, 66, 0F, F9)           \
39f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(psubd, 66, 0F, FA)           \
40f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(psubsb, 66, 0F, E8)          \
41f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(psubsw, 66, 0F, E9)          \
42f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(psubusb, 66, 0F, D8)         \
43f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(psubusw, 66, 0F, D9)         \
44f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pxor, 66, 0F, EF)            \
45f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(cvtps2dq, 66, 0F, 5B)
46f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch
47f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch#define SSSE3_INSTRUCTION_LIST(V) \
48f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pabsb, 66, 0F, 38, 1C)        \
49f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pabsw, 66, 0F, 38, 1D)        \
50f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pabsd, 66, 0F, 38, 1E)        \
51f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pshufb, 66, 0F, 38, 00)       \
52f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(psignb, 66, 0F, 38, 08)       \
53f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(psignw, 66, 0F, 38, 09)       \
54f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(psignd, 66, 0F, 38, 0A)
55f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch
56f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch#define SSE4_INSTRUCTION_LIST(V) \
57f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(packusdw, 66, 0F, 38, 2B)    \
58f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pminsb, 66, 0F, 38, 38)      \
59f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pminsd, 66, 0F, 38, 39)      \
60f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pminuw, 66, 0F, 38, 3A)      \
61f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pminud, 66, 0F, 38, 3B)      \
62f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pmaxsb, 66, 0F, 38, 3C)      \
63f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pmaxsd, 66, 0F, 38, 3D)      \
64f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pmaxuw, 66, 0F, 38, 3E)      \
65f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pmaxud, 66, 0F, 38, 3F)      \
66f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(pmulld, 66, 0F, 38, 40)      \
67f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch  V(ptest, 66, 0F, 38, 17)
68f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch
69f3b273f5e6ffd2f6ba1c18a27a17db41dfb113c3Ben Murdoch#endif  // V8_SSE_INSTR_H_
70