Reserved Registers

So, there exists registers which are reserved denoted by the Machine Register Info :: getReserved field. I am wondering if these registers are reserved or preserved?

I have come across a case where a reserved register was used. Namely it’s in “llvm\test\CodeGen\X86\2009-04-27-CoalescerAssert.ll” where the reserved register ESP (54) in block “bb98.fragment” on line 854. Is this use of a reserved register a mistake or not?

Thanks,
Jeff Kunkel

My mistake, the passes before this block created the instruction

ADJCALLSTACKDOWN32 12, %ESP<imp-def,dead>, %EFLAGS<imp-def,dead>, %ESP

which uses ESP.

  • Jeff