or1k.h
12.3 KB
-
or1k: Fix issue with set_got clobbering LR (r9) · fd631eb5
When compiling glibc we found that the GOT register was being allocated r9 when the instruction was still set_got_tmp. That is a problem because r9 is the Link Register (LR) in OpenRISC which is used/clobbered in set_got. We cannot use r9 as the GOT register. Also, we cannot simply say set_got_tmp clobbers r9 as this is the reason for having the temporary set_got_tmp. Fix by using a register class constraint that does not allow r9 during register allocation. gcc/ChangeLog: * config/or1k/constraints.md (t): New constraint. * config/or1k/or1k.h (GOT_REGS): New register class. * config/or1k/or1k.md (set_got_tmp, set_got): Use t contraint. From-SVN: r275242
Stafford Horne committed