forked from OSchip/llvm-project
[X86] Modify LOOP*, HLT control flow attributes
Add missing control flow attributes: - LOOP*: isBranch, isTerminator - HLT: isTerminator This helps downstream disassemblers (such as BOLT) reconstruct the control flow graph more accurately. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D102297
This commit is contained in:
parent
7f7e4aed21
commit
884bc6a6ed
|
@ -206,7 +206,7 @@ let isBranch = 1, isTerminator = 1, isBarrier = 1, isIndirectBranch = 1 in {
|
|||
}
|
||||
|
||||
// Loop instructions
|
||||
let SchedRW = [WriteJump] in {
|
||||
let isBranch = 1, isTerminator = 1, SchedRW = [WriteJump] in {
|
||||
def LOOP : Ii8PCRel<0xE2, RawFrm, (outs), (ins brtarget8:$dst), "loop\t$dst", []>;
|
||||
def LOOPE : Ii8PCRel<0xE1, RawFrm, (outs), (ins brtarget8:$dst), "loope\t$dst", []>;
|
||||
def LOOPNE : Ii8PCRel<0xE0, RawFrm, (outs), (ins brtarget8:$dst), "loopne\t$dst", []>;
|
||||
|
|
|
@ -39,7 +39,8 @@ let mayLoad = 1, mayStore = 0, hasSideEffects = 1, isTrap = 1 in {
|
|||
"ud1{q} {$src2, $src1|$src1, $src2}", []>, TB;
|
||||
}
|
||||
|
||||
def HLT : I<0xF4, RawFrm, (outs), (ins), "hlt", []>;
|
||||
let isTerminator = 1 in
|
||||
def HLT : I<0xF4, RawFrm, (outs), (ins), "hlt", []>;
|
||||
def RSM : I<0xAA, RawFrm, (outs), (ins), "rsm", []>, TB;
|
||||
|
||||
// Interrupt and SysCall Instructions.
|
||||
|
|
Loading…
Reference in New Issue