Repository navigation
Treat data definitions in the middle of functions as "strong" - #2792
Conversation
Things like ARM jump tables put important data inline within a function. Such
data should be treated as a "strong" reference (e.g. a root use). For example:
```
sub r3, r0, #65
cmp r3, #19
ldrls pc, [pc, r3, asl #2]
b .L7
.word .L8
.word .L7
.word .L6
.word .L7
....etc...
.L7: some things
.L8: some other things
```
Without this change, the `.L8` label would be dropped as unused. But it's implicitly used
by the sequence of `.word`s in the middle of the function.
Closes #2788
partouf
left a comment
There was a problem hiding this comment.
Can you remove the .binary testresults, those aren't needed for this
|
I think I'm missing something - since we changed to use acceptance tests there's no way to not include binary tests: each permutation of "comments only", "comments and labels", "directives and comments" etc is always tested. This is a mixed blessing: I didn't look too hard to keep old behaviour as it was a little ad hoc at the time anyway, and I'm sure some permutations weren't being well tested. Or did I misunderstand? Sorry, coffee still being drunk here :) |
oh maybe I remember using the rewrite of the tests to only do binary when it's actually an objdump, nevermind then, will remove them in a later PR when tests are changed |
|
Sounds great. Can you OK the change if it's ok now? I'm trying to do the PR thing a bit more properly now :) |
* Treat data definitions in the middle of functions as "strong"
Things like ARM jump tables put important data inline within a function. Such
data should be treated as a "strong" reference (e.g. a root use). For example:
```
sub r3, r0, #65
cmp r3, #19
ldrls pc, [pc, r3, asl #2]
b .L7
.word .L8
.word .L7
.word .L6
.word .L7
....etc...
.L7: some things
.L8: some other things
```
Without this change, the `.L8` label would be dropped as unused. But it's implicitly used
by the sequence of `.word`s in the middle of the function.
Closes #2788
* Keep curly bracket style of existing if-else block
Co-authored-by: RabsRincon <[email protected]>
Things like ARM jump tables put important data inline within a function. Such
data should be treated as a "strong" reference (e.g. a root use). For example:
Without this change, the
.L8label would be dropped as unused. But it's implicitly usedby the sequence of
.words in the middle of the function.Closes #2788