This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

question about the rtx code


Hello everyone,

I've got a question about pseudoregisters in the rtx code. If a value is 
put in a pseudoregister just before a function call, is it still there 
after the call or does it have to be saved on the stack somehow (how?), 
i e does it get clobbered ? The reason I'm asking is that I'm trying to 
insert calls at certain places in the rtx insn chain and I want to save 
some values first. When I use pseudoregisters for saving/restoring the 
value, the code is gone in the assemblercode generated; I thought it 
might be because the pseudoregisters gets clobbered by the call and the 
save/restore code therefore is dead.

I've also tried doing it by inserting the call as an ordinary insn 
(*not* a call_insn), hoping I wouldn't clobber any registers that way. 
Unfortunately the save/restore code still gets removed, possibly because 
the saved hard register *doesn't* get clobbered, making the save/restore 
code superfluous. Actually I'd prefer doing it this way of doing it, 
since I can then tailor the function I'm calling, i e its register 
usage, after my own needs. If I do it like this, how can I clobber the 
registers used by the function I'm calling?

I should probably mention that I've tried doing this both during rtx 
generation and immediately after the chain has been generated, i e 
before any of the other passes that manipulate the rtx code.


I'd appreciate any help I can get.

=0)

/Per



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]