LLVM Discussion Forums

A question about the return address in functions calling

hello, everyone,
I am a newbie of llvm. Currently I am trying to find out how llvm processes the return address for functions during calling on x86_64 platform. According to the calling convention, the return address for functions should be pushed on to the stack. And I’ve checked the calling convention (It’s X86CallingConv.td) and looks like in that td file, it just defined the rules to process the “return values” for functions, no rules have been defined for “return address” for functions there.

So, my question is where could I find the implementation for processing the return address for a function call? I am now looking through the X86FrameLowering.cpp but I am not sure whether it’s the right direction.

Thank you if anyone can provide any suggestions!