[Bug target/82150] Produces a branch prefetch which causes a hang
david.welch at netronome dot com
gcc-bugzilla@gcc.gnu.org
Tue Sep 12 11:38:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82150
--- Comment #3 from david.welch at netronome dot com ---
The problem exists as well with ldr pc,[something]. I have not dug through gcc
but did some compilation experiments, not nearly enough to be 100% sure, but
for switch statements the code generated always appears to do a comparison
(perhaps after a subtract or other modification, an ldrls pc,[], then an
unconditional branch to deal with the last item (or a default). If that is
always the rule that is safe. And for a function table, an array of function
pointers, it did the math using gprs and then a mov lr,pc ; bx rn.
an
ldr pc,[]
literal pool data
will cause this undesired prefetch.
More information about the Gcc-bugs
mailing list