[LLVMdev] What CCAssignToXXXWithShadow means? (original) (raw)

陳韋任 chenwj at iis.sinica.edu.tw
Fri Sep 23 03:47:24 PDT 2011


Hi, all

On the website, it says,

CCAssignToRegWithShadow <registerList, shadowList> — similar to CCAssignToReg, but with a shadow list of registers

I don't know when we should use CCAssignToRegWithShadow. Because I am not a architecture expert, please bear with my naive question. Take ARMCallingConv.td as an example,

CCIfType<[i32], CCIfAlign<"8", CCAssignToRegWithShadow<[R0, R2], [R0, R1]>>>

If we assign a value to R0(R2), then what happen to R0(R1)?

def RetCC_ARM_AAPCS_Common : CallingConv<[ CCIfType<[i32], CCAssignToReg<[R0, R1, R2, R3]>>, CCIfType<[i64], CCAssignToRegWithShadow<[R0, R2], [R1, R3]>> ]>;

Does it mean the samething as above? I searched the web and found the link below, http://www.heyrick.co.uk/assembler/regs.html

It says in some (ARM) processer modes, some register are shadowed. Does the word "shadow" mean the same thing?

Thanks!

Regards, chenwj

-- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667



More information about the llvm-dev mailing list