This is the mail archive of the 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]



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 Unruh, Fujitsu Siemens Computers, C/C++ compiler group

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