HARD_REGNO_CALL_PART_CLOBBERED problems
Unruh, Erwin
Erwin.Unruh@fujitsu-siemens.com
Fri Feb 22 05:07:00 GMT 2002
Hello,
I am working on a new port and need to use the define
HARD_REGNO_CALL_PART_CLOBBERED. Some of the registers are not saved in their
full length.
Having a close look at the current implementation of that macro I did find an
error. I contacted Michael Hayes and he confirmed that. He found a testcase
which does not work correctly on the C4X.
After some more analysis and some thought I realized there is a design problem.
The compiler does know that not all registers can have any mode. It is not aware
that some registers can be both call-clobbered and call-saved depending on mode.
I think I need another register attribute parallel to call_used_regs. It is true
when the register is mentioned in HARD_REGNO_CALL_PART_CLOBBERED. Then I am
going to check all usages of call_used_regs and call_used_reg_set to see whether
I need to check this new attribute.
I have two questions now:
1. Is anybody else working with that macro? I have found it only in C4X.
2. Is my approach the right one?
Erwin
Erwin Unruh, Fujitsu Siemens Computers, C/C++ compiler group
More information about the Gcc
mailing list