Vaibhav Shrimali <vaibhav.shrimali@xxxxxxxxx> writes: > I am performing this task in the prologue in the section where the > hard frame pointer is pushed on the stack. This is after register allocation, so you can not use force_reg. > If not, please tell me how and where can I allocate the register and > then use my code accordingly. You have to figure out a hard register to use. It should be safe to use any call used register in the prologue, as long as it is not being used for anything else in the prologue. If you want this to be generally useful, watch out for the regparm attribute. The prologue code is full of examples of using registers; read it and understand what it is doing. Ian