[llvm-dev] x86 instructions EFLAGS in TableGen

Antonin Reitz via llvm-dev llvm-dev at lists.llvm.org
Mon Jun 24 19:58:49 PDT 2019


Here is one question regarding the LLVM TableGen:

Which file in the llvm/lib/Target/X86 folder describes how the bits in 
the EFLAGS register are modified by the x86 instructions? For example, 
in the "X86InstrInfo.td" file, lines 2134-2135, it says:

let SchedRW = [WriteALU], Defs = [EFLAGS], Uses = [EFLAGS] in {
def CLC : I<0xF8, RawFrm, (outs), (ins), "clc", []>;

So it says the Defs of CLC is EFLAGS, but actually the CLC instruction 
only clears the "CF" flag in the EFLAGS register and has nothing to do 
with the other bits of EFLAGS. So which files in this folder describes 
the fact that CLC only modifies the CF bit?

Thank you in advance,
Antonin Reitz

More information about the llvm-dev mailing list