@@ -400,6 +400,8 @@ def CPUID : I<0xA2, RawFrm, (outs), (ins), "cpuid", []>, TB;
400
400
def INVD : I<0x08, RawFrm, (outs), (ins), "invd", []>, TB;
401
401
def WBINVD : I<0x09, RawFrm, (outs), (ins), "wbinvd", []>, TB;
402
402
403
+ //===----------------------------------------------------------------------===//
404
+ // XSAVE instructions
403
405
let Defs = [RDX, RAX], Uses = [RCX] in
404
406
def XGETBV : I<0x01, MRM_D0, (outs), (ins), "xgetbv", []>, TB;
405
407
@@ -442,3 +444,24 @@ let Defs = [RAX, RSI, RDI], Uses = [RAX, RSI, RDI] in {
442
444
}
443
445
let Defs = [RAX, RDX, RSI], Uses = [RAX, RSI] in
444
446
def MONTMUL : I<0xc0, RawFrm, (outs), (ins), "montmul", []>, A6;
447
+
448
+ //===----------------------------------------------------------------------===//
449
+ // FS/GS Base Instructions
450
+ let Predicates = [In64BitMode] in {
451
+ def RDFSBASE : I<0xAE, MRM0r, (outs GR32:$dst), (ins),
452
+ "rdfsbase{l}\t$dst", []>, TB, XS;
453
+ def RDFSBASE64 : RI<0xAE, MRM0r, (outs GR64:$dst), (ins),
454
+ "rdfsbase{q}\t$dst", []>, TB, XS;
455
+ def RDGSBASE : I<0xAE, MRM1r, (outs GR32:$dst), (ins),
456
+ "rdgsbase{l}\t$dst", []>, TB, XS;
457
+ def RDGSBASE64 : RI<0xAE, MRM1r, (outs GR64:$dst), (ins),
458
+ "rdgsbase{q}\t$dst", []>, TB, XS;
459
+ def WRFSBASE : I<0xAE, MRM2r, (outs), (ins GR32:$dst),
460
+ "wrfsbase{l}\t$dst", []>, TB, XS;
461
+ def WRFSBASE64 : RI<0xAE, MRM2r, (outs), (ins GR64:$dst),
462
+ "wrfsbase{q}\t$dst", []>, TB, XS;
463
+ def WRGSBASE : I<0xAE, MRM3r, (outs), (ins GR32:$dst),
464
+ "wrgsbase{l}\t$dst", []>, TB, XS;
465
+ def WRGSBASE64 : RI<0xAE, MRM3r, (outs), (ins GR64:$dst),
466
+ "wrgsbase{q}\t$dst", []>, TB, XS;
467
+ }
0 commit comments