Hi All, I am a beginner of gcc.
My goal of modifying gcc is to maintain two stacks. One is accessed by rbp, the other is accessed by rsp. rsp is only used by call/ret. All other accesses (e.g., access parameters, access local variables) to stack are via rbp. For easy implementation, I would use flags "-fomit-frame-pointer -ffixed-rbp" to compile the target program, which prevents gcc using rbp. And in the RTL level, I will replace all rsp with rbp (I may also change push/pop into mov instructions). My question is how to iterate all registers used in insns in rtl level, and replace all rsp with rbp. Thanks, Ken