[SPARC64] Preserve registers used during optimization transforms#1528
[SPARC64] Preserve registers used during optimization transforms#1528rui314 merged 2 commits intorui314:mainfrom
Conversation
|
To elaborate more, I'm observing that GCC could emit something like this: With the call instruction intact, this is not a problem since Unfortunately I still don't know how to intentionally trigger this lowering. |
rd of TLS *_ADD relocations during optimization
|
Just noticed something. GCC might insert uses of %o0 in between R_SPARC_TLS_LDM_ADD and the corresponding R_SPARC_TLS_LDM_CALL. |
GCC might decide to put the result of the operation in another register, so remove hardcodings of %o0 as the destination register (`rd` field).
|
Is this ready to review? I think this change looks at least harmless. |
Yes, but one question: I've made another commit to remove hardcoded register usage, should I submit it as part of this PR or should I make another PR for it? |
The compiler might place the two values on different registers, so don't modify them during transforms.
rd of TLS *_ADD relocations during optimizationrd of TLS *_ADD relocations during optimization
rd of TLS *_ADD relocations during optimization|
Okay I think it should be ready for review now. |
|
Thanks. Regarding the code review process, I’m not too concerned about it because this is after all just a small project. I’ll commit follow-up patches if necessary, so no worries. |
GCC might decide to put the result of the operation in another register, so remove hardcodings of %o0 as the destination register (
rdfield) during the transform of those relocations.