-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[X86][AsmParser] Improve rel8 validation #126073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
24d86a4
78af857
d60fbb3
886f28a
c925803
d3bc8a7
76e171f
c215b2c
11f4124
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -94,14 +94,14 @@ let isBranch = 1, isTerminator = 1, hasSideEffects = 0, SchedRW = [WriteJump] in | |
| // 32-bit mode, the address size prefix is jcxz and the unprefixed version is | ||
| // jecxz. | ||
| let Uses = [CX] in | ||
| def JCXZ : Ii8PCRel<0xE3, RawFrm, (outs), (ins brtarget8:$dst), | ||
| def JCXZ : Ii8PCRel<0xE3, RawFrm, (outs), (ins i8imm_brtarget:$dst), | ||
| "jcxz\t$dst", []>, AdSize16, Requires<[Not64BitMode]>; | ||
| let Uses = [ECX] in | ||
| def JECXZ : Ii8PCRel<0xE3, RawFrm, (outs), (ins brtarget8:$dst), | ||
| def JECXZ : Ii8PCRel<0xE3, RawFrm, (outs), (ins i8imm_brtarget:$dst), | ||
| "jecxz\t$dst", []>, AdSize32; | ||
|
|
||
| let Uses = [RCX] in | ||
| def JRCXZ : Ii8PCRel<0xE3, RawFrm, (outs), (ins brtarget8:$dst), | ||
| def JRCXZ : Ii8PCRel<0xE3, RawFrm, (outs), (ins i8imm_brtarget:$dst), | ||
| "jrcxz\t$dst", []>, AdSize64, Requires<[In64BitMode]>; | ||
| } | ||
|
|
||
|
|
@@ -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", []>; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not entirely related, but the LOOP defs needs some cleanup #60208
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting. But yes, I think it's not quite related. Also #61722 and #60208 should be solved in one move. We need to distinguish |
||
| } | ||
|
|
||
| //===----------------------------------------------------------------------===// | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (auto *CE= dyn_cast<MCConstantExpr>(getMemDisp()))There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Done.