-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Fix LTO & -O2 offset out of range #90865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
1ed5678
to
5ba0c64
Compare
|
This wouldn’t work for platform that can take only two input operands… Any suggestion on making the two function pointer less PC relative so it doesn’t exceed ldr offset? |
@swift-tk I haven't tried this but I think preloading the pointers in r4 r5 could work, something like :
and then
|
@wearyzen Thanks for the help, the compile seems to pass now. |
4878eae
to
106caf8
Compare
The arch.shared_interrupt.lto.speed compile fail on apollo5 platform. Remove ldr instruction and pass function pointer by register. Signed-off-by: Swift Tian <[email protected]>
|
The modified version works on apollo5 platform, but for some reason, qemu_cortex_m0/nrf51822 still tries to use r5 and r6 as input operands when they are in the clobber list.. Thus emits impossible operand constraints... Deleting them from clobber seems to do the trick for compile but failed twister tests. I think those entry point in r5 and r6 eventually gets lost. Using volatile keyword on register value wouldn't work as they gets optimized out.... |
Hi @swift-tk I tried to reproduce the error today with |
There was a workaround merged to main to allow us merge our blocked PRs, but it is not ideal. I think it is better to try solving it fundamentally. Please also see #90777 (comment) for the root cause. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #92569
The arch.shared_interrupt.lto.speed compile fail on apollo5 platform.
Remove ldr instruction and pass function pointer by input operand.
This PR could fix #90777.