[llvm] [X86][AsmParser] Improve rel8 validation (PR #126073)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 27 01:33:38 PST 2025
================
@@ -193,9 +193,12 @@ def JMPABS64i : Ii64<0xA1, RawFrm, (outs), (ins i64imm:$dst), "jmpabs\t$dst", []
// Loop instructions
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", []>;
+ def LOOP : Ii8PCRel<0xE2, RawFrm, (outs), (ins i8imm_brtarget:$dst),
+ "loop\t$dst", []>;
+ def LOOPE : Ii8PCRel<0xE1, RawFrm, (outs), (ins i8imm_brtarget:$dst),
+ "loope\t$dst", []>;
+ def LOOPNE : Ii8PCRel<0xE0, RawFrm, (outs), (ins i8imm_brtarget:$dst),
+ "loopne\t$dst", []>;
----------------
RKSimon wrote:
Not entirely related, but the LOOP defs needs some cleanup https://github.com/llvm/llvm-project/issues/60208
https://github.com/llvm/llvm-project/pull/126073
More information about the llvm-commits
mailing list