[llvm] [LLVM][X86] Add EFLAGS Defs for VERR/VERW instructions (PR #81824)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 14 21:54:39 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-x86
Author: riChar (ri-char)
<details>
<summary>Changes</summary>
VERR/VERW instructions will define ZF flag.
![image](https://github.com/llvm/llvm-project/assets/17962023/c8a4f8de-bf2e-431b-a0b4-a161e06ff951)
---
Full diff: https://github.com/llvm/llvm-project/pull/81824.diff
1 Files Affected:
- (modified) llvm/lib/Target/X86/X86InstrSystem.td (+2)
``````````diff
diff --git a/llvm/lib/Target/X86/X86InstrSystem.td b/llvm/lib/Target/X86/X86InstrSystem.td
index 24a334d38f9261..d051047ae46548 100644
--- a/llvm/lib/Target/X86/X86InstrSystem.td
+++ b/llvm/lib/Target/X86/X86InstrSystem.td
@@ -366,12 +366,14 @@ def LGS32rm : I<0xb5, MRMSrcMem, (outs GR32:$dst), (ins opaquemem:$src),
def LGS64rm : RI<0xb5, MRMSrcMem, (outs GR64:$dst), (ins opaquemem:$src),
"lgs{q}\t{$src, $dst|$dst, $src}", []>, TB;
+let Defs = [EFLAGS] in {
def VERRr : I<0x00, MRM4r, (outs), (ins GR16:$seg), "verr\t$seg", []>, TB;
def VERWr : I<0x00, MRM5r, (outs), (ins GR16:$seg), "verw\t$seg", []>, TB;
let mayLoad = 1 in {
def VERRm : I<0x00, MRM4m, (outs), (ins i16mem:$seg), "verr\t$seg", []>, TB;
def VERWm : I<0x00, MRM5m, (outs), (ins i16mem:$seg), "verw\t$seg", []>, TB;
}
+} // Defs EFLAGS
} // SchedRW
//===----------------------------------------------------------------------===//
``````````
</details>
https://github.com/llvm/llvm-project/pull/81824
More information about the llvm-commits
mailing list