1// Copyright (c) 2008 The Regents of The University of Michigan
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met: redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer;
8// redistributions in binary form must reproduce the above copyright
9// notice, this list of conditions and the following disclaimer in the
10// documentation and/or other materials provided with the distribution;
11// neither the name of the copyright holders nor the names of its
12// contributors may be used to endorse or promote products derived from
13// this software without specific prior written permission.
14//
15// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26//
27// Authors: Gabe Black
28
29////////////////////////////////////////////////////////////////////
30//
31// Decode the three byte opcodes with the 0f38 prefix.
32//
33'X86ISA::ThreeByte0F38Opcode': decode LEGACY_OP {
34    format WarnUnimpl {
35        1: decode OPCODE_OP {
36            0x00: pshufb_Vdq_Wdq();
37            0x01: phaddw_Vdq_Wdq();
38            0x02: phaddd_Vdq_Wdq();
39            0x03: phaddsw_Vdq_Wdq();
40            0x04: pmaddubsw_Vdq_Wdq();
41            0x05: phsubw_Vdq_Wdq();
42            0x06: phsubd_Vdq_Wdq();
43            0x07: phsubsw_Vdq_Wdq();
44            0x08: psignb_Vdq_Wdq();
45            0x09: psignw_Vdq_Wdq();
46            0x0A: psignd_Vdq_Wdq();
47            0x0B: pmulhrsw_Vdq_Wdq();
48            0x10: pblendvb_Vdq_Wdq();
49            0x14: blendvps_Vdq_Wdq();
50            0x15: blendvpd_Vdq_Wdq();
51            0x17: ptest_Vdq_Wdq();
52            0x1C: pabsb_Vdq_Wdq();
53            0x1D: pabsw_Vdq_Wdq();
54            0x1E: pabsd_Vdq_Wdq();
55            0x20: pmovsxbw_Vdq_Udq_or_Mq();
56            0x21: pmovsxbd_Vdq_Udq_or_Md();
57            0x22: pmovsxbq_Vdq_Udq_or_Mw();
58            0x23: pmovsxwd_Vdq_Udq_or_Mq();
59            0x24: pmovsxwq_Vdq_Udq_or_Md();
60            0x25: pmovsxdq_Vdq_Udq_or_Mq();
61            0x28: pmuldq_Vdq_Wdq();
62            0x29: pcmpeqq_Vdq_Wdq();
63            0x2A: movntdqa_Vdq_Mdq();
64            0x2B: packusdw_Vdq_Wdq();
65            0x30: pmovzxbw_Vdq_Udq_or_Mq();
66            0x31: pmovzxbd_Vdq_Udq_or_Md();
67            0x32: pmovzxbq_Vdq_Udq_or_Mw();
68            0x33: pmovzxwd_Vdq_Udq_or_Mq();
69            0x34: pmovzxwq_Vdq_Udq_or_Md();
70            0x35: pmovzxdq_Vdq_Udq_or_Mq();
71            0x37: pcmpgtq_Vdq_Wdq();
72            0x38: pminsb_Vdq_Wdq();
73            0x39: pminsd_Vdq_Wdq();
74            0x3A: pminuw_Vdq_Wdq();
75            0x3B: pminud_Vdq_Wdq();
76            0x3C: pmaxsb_Vdq_Wdq();
77            0x3D: pmaxsd_Vdq_Wdq();
78            0x3E: pmaxuw_Vdq_Wdq();
79            0x3F: pmaxud_Vdq_Wdq();
80            0x40: pmulld_Vdq_Wdq();
81            0x41: phminposuw_Vdq_Wdq();
82            default: Inst::UD2();
83        }
84        default: decode LEGACY_REPNE {
85            1: decode OPCODE_OP {
86                0xF0: crc32_Gd_Eb();
87                0xF1: crc32_Gd_Ev();
88                default: Inst::UD2();
89            }
90            default: decode OPCODE_OP {
91                0x00: pshufb_Pq_Qq();
92                0x01: phaddw_Pq_Qq();
93                0x02: phaddd_Pq_Qq();
94                0x03: phaddsw_Pq_Qq();
95                0x04: pmaddubsw_Pq_Qq();
96                0x05: phsubw_Pq_Qq();
97                0x06: phsubd_Pq_Qq();
98                0x07: phsubsw_Pq_Qq();
99                0x08: psignb_Pq_Qq();
100                0x09: psignw_Pq_Qq();
101                0x0A: psignd_Pq_Qq();
102                0x0B: pmulhrsw_Pq_Qq();
103                0x1C: pabsb_Pq_Qq();
104                0x1D: pabsw_Pq_Qq();
105                0x1E: pabsd_Pq_Qq();
106                default: Inst::UD2();
107            }
108        }
109    }
110}
111