@@ -187,6 +187,7 @@ const (
187
187
Zm_r_xm_nr
188
188
Zr_m_xm_nr
189
189
Zibm_r /* mmx1,mmx2/mem64,imm8 */
190
+ Zibr_m
190
191
Zmb_r
191
192
Zaut_r
192
193
Zo_m
@@ -219,6 +220,7 @@ const (
219
220
Pf2 = 0xf2 /* xmm escape 1: f2 0f */
220
221
Pf3 = 0xf3 /* xmm escape 2: f3 0f */
221
222
Pq3 = 0x67 /* xmm escape 3: 66 48 0f */
223
+ Pfw = 0xf4 /* Pf3 with Rex.w: f3 48 0f */
222
224
Pvex1 = 0xc5 /* 66.0f escape, vex encoding */
223
225
Pvex2 = 0xc6 /* f3.0f escape, vex encoding */
224
226
Pvex3 = 0xc7 /* 66.0f38 escape, vex encoding */
@@ -720,6 +722,10 @@ var yextrw = []ytab{
720
722
{Yu8 , Yxr , Yrl , Zibm_r , 2 },
721
723
}
722
724
725
+ var yextr = []ytab {
726
+ {Yu8 , Yxr , Ymm , Zibr_m , 3 },
727
+ }
728
+
723
729
var yinsrw = []ytab {
724
730
{Yu8 , Yml , Yxr , Zibm_r , 2 },
725
731
}
@@ -1162,6 +1168,9 @@ var optab =
1162
1168
{APCMPGTL , ymm , Py1 , [23 ]uint8 {0x66 , Pe , 0x66 }},
1163
1169
{APCMPGTW , ymm , Py1 , [23 ]uint8 {0x65 , Pe , 0x65 }},
1164
1170
{APEXTRW , yextrw , Pq , [23 ]uint8 {0xc5 , 00 }},
1171
+ {APEXTRB , yextr , Pq , [23 ]uint8 {0x3a , 0x14 , 00 }},
1172
+ {APEXTRD , yextr , Pq , [23 ]uint8 {0x3a , 0x16 , 00 }},
1173
+ {APEXTRQ , yextr , Pq3 , [23 ]uint8 {0x3a , 0x16 , 00 }},
1165
1174
{APF2IL , ymfp , Px , [23 ]uint8 {0x1d }},
1166
1175
{APF2IW , ymfp , Px , [23 ]uint8 {0x1c }},
1167
1176
{API2FL , ymfp , Px , [23 ]uint8 {0x0d }},
@@ -1183,6 +1192,7 @@ var optab =
1183
1192
{APFSUB , ymfp , Px , [23 ]uint8 {0x9a }},
1184
1193
{APFSUBR , ymfp , Px , [23 ]uint8 {0xaa }},
1185
1194
{APINSRW , yinsrw , Pq , [23 ]uint8 {0xc4 , 00 }},
1195
+ {APINSRB , yinsr , Pq , [23 ]uint8 {0x3a , 0x20 , 00 }},
1186
1196
{APINSRD , yinsr , Pq , [23 ]uint8 {0x3a , 0x22 , 00 }},
1187
1197
{APINSRQ , yinsr , Pq3 , [23 ]uint8 {0x3a , 0x22 , 00 }},
1188
1198
{APMADDWL , ymm , Py1 , [23 ]uint8 {0xf5 , Pe , 0xf5 }},
@@ -1198,6 +1208,7 @@ var optab =
1198
1208
{APMULULQ , ymm , Py1 , [23 ]uint8 {0xf4 , Pe , 0xf4 }},
1199
1209
{APOPAL , ynone , P32 , [23 ]uint8 {0x61 }},
1200
1210
{APOPAW , ynone , Pe , [23 ]uint8 {0x61 }},
1211
+ {APOPCNT , yml_rl , Pfw , [23 ]uint8 {0xb8 }},
1201
1212
{APOPFL , ynone , P32 , [23 ]uint8 {0x9d }},
1202
1213
{APOPFQ , ynone , Py , [23 ]uint8 {0x9d }},
1203
1214
{APOPFW , ynone , Pe , [23 ]uint8 {0x9d }},
@@ -1533,6 +1544,7 @@ var optab =
1533
1544
{AXABORT , yxabort , Px , [23 ]uint8 {0xc6 , 0xf8 }},
1534
1545
{AXEND , ynone , Px , [23 ]uint8 {0x0f , 01 , 0xd5 }},
1535
1546
{AXTEST , ynone , Px , [23 ]uint8 {0x0f , 01 , 0xd6 }},
1547
+ {AXGETBV , ynone , Pm , [23 ]uint8 {01 , 0xd0 }},
1536
1548
{obj .AUSEFIELD , ynop , Px , [23 ]uint8 {0 , 0 }},
1537
1549
{obj .ATYPE , nil , 0 , [23 ]uint8 {}},
1538
1550
{obj .AFUNCDATA , yfuncdata , Px , [23 ]uint8 {0 , 0 }},
@@ -3194,6 +3206,15 @@ func doasm(ctxt *obj.Link, p *obj.Prog) {
3194
3206
ctxt .Andptr [0 ] = Pm
3195
3207
ctxt .Andptr = ctxt .Andptr [1 :]
3196
3208
3209
+ case Pfw : /* first escape, Rex.w, and second escape */
3210
+ ctxt .Andptr [0 ] = Pf3
3211
+ ctxt .Andptr = ctxt .Andptr [1 :]
3212
+
3213
+ ctxt .Andptr [0 ] = Pw
3214
+ ctxt .Andptr = ctxt .Andptr [1 :]
3215
+ ctxt .Andptr [0 ] = Pm
3216
+ ctxt .Andptr = ctxt .Andptr [1 :]
3217
+
3197
3218
case Pm : /* opcode escape */
3198
3219
ctxt .Andptr [0 ] = Pm
3199
3220
ctxt .Andptr = ctxt .Andptr [1 :]
@@ -3343,7 +3364,7 @@ func doasm(ctxt *obj.Link, p *obj.Prog) {
3343
3364
ctxt .Andptr [0 ] = byte (op )
3344
3365
ctxt .Andptr = ctxt .Andptr [1 :]
3345
3366
3346
- case Zibm_r :
3367
+ case Zibm_r , Zibr_m :
3347
3368
for {
3348
3369
tmp1 := z
3349
3370
z ++
@@ -3354,7 +3375,11 @@ func doasm(ctxt *obj.Link, p *obj.Prog) {
3354
3375
ctxt .Andptr [0 ] = byte (op )
3355
3376
ctxt .Andptr = ctxt .Andptr [1 :]
3356
3377
}
3357
- asmand (ctxt , p , p .From3 , & p .To )
3378
+ if yt .zcase == Zibr_m {
3379
+ asmand (ctxt , p , & p .To , p .From3 )
3380
+ } else {
3381
+ asmand (ctxt , p , p .From3 , & p .To )
3382
+ }
3358
3383
ctxt .Andptr [0 ] = byte (p .From .Offset )
3359
3384
ctxt .Andptr = ctxt .Andptr [1 :]
3360
3385
0 commit comments