llvm.org GIT mirror llvm / 23306de
Add support for encoding the HLE XACQUIRE and XRELEASE prefixes. For decoding, keep the current behavior of always decoding these as their REP versions. In the future, this could be improved to recognize the cases where these behave as XACQUIRE and XRELEASE and decode them as such. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184207 91177308-0d34-0410-b5e6-96231b3b80d8 Stefanus Du Toit 7 years ago
3 changed file(s) with 22 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
3636 def XABORT : Ii8<0xc6, MRM_F8, (outs), (ins i8imm:$imm),
3737 "xabort\t$imm",
3838 [(int_x86_xabort imm:$imm)]>, Requires<[HasRTM]>;
39
40 // HLE prefixes
41
42 def XACQUIRE_PREFIX : I<0xF2, RawFrm, (outs), (ins), "xacquire", []>, Requires<[HasHLE]>;
43
44 def XRELEASE_PREFIX : I<0xF3, RawFrm, (outs), (ins), "xrelease", []>, Requires<[HasHLE]>;
45
0 // RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
1
2 // CHECK: xacquire
3 // CHECK: [0xf2]
4 xacquire
5
6 // CHECK: xrelease
7 // CHECK: [0xf3]
8 xrelease
460460 Name == "VMOVQs64rr")
461461 return FILTER_WEAK;
462462
463 // XACQUIRE and XRELEASE reuse REPNE and REP respectively.
464 // For now, just prefer the REP versions.
465 if (Name == "XACQUIRE_PREFIX" ||
466 Name == "XRELEASE_PREFIX")
467 return FILTER_WEAK;
468
463469 if (HasFROperands && Name.find("MOV") != Name.npos &&
464470 ((Name.find("2") != Name.npos && Name.find("32") == Name.npos) ||
465471 (Name.find("to") != Name.npos)))