[LLVMdev] X86 instruction encoding

Chris Lattner clattner at apple.com
Sat Mar 19 11:43:30 PDT 2011


On Mar 19, 2011, at 8:06 AM, Bin Zeng wrote:

> Hi all,
> 
> Just a quick question about the X86 instruction naming convention in 
> LLVM. Most instruction names in LLVM are self-explanatory. Some are a 
> little confusing. What is the difference between instruction MULSSrr and 
> MULSSrr_Int? What does the suffix '_Int' stand for?

"_Int" stands for "intrinsic", because the pattern matches an intrinsic instead of normal nodes.

That said, this is old and bad.  These instructions should be replaced with Pat<> patterns, to avoid duplicating the encoding an other information about the pattern.

> Are these 
> instructions exchangeable: "ST_F64m", "ST_FP64m", 

No, these generate different mnemonics (fst vs fstp) the difference is that the "p" version pops the floating point stack.

> "ST_Fp64m" "ST_FpP64m32"? Any direction will be appreciated. Thanks a lot in advance.

These ones are related to register classes.  The later one does a 32-bit store of a "64-bit floating point register".  This is a modeling artifact of how we represent the floating point stack registers.

-Chris





More information about the llvm-dev mailing list