You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alternatively, there's not a lot of explicit "MOVW $-N(Rx), Ry" instructions in the ARM assembly, and the only compiler generated ones I've found are from cmd/internal/obj/arm's stacksplit function, so it's feasible to just change them all to use explicit SUB instructions instead.
Changing just stacksplit to use ASUB instead of AMOVW shaves ~5kB of text off cmd/go:
text data bss dec hex filename
6666309 103960 85812 6856081 689d91 go.after
6671670 103960 85812 6861442 68b282 go.before
The text was updated successfully, but these errors were encountered:
Currently, cmd/internal/obj/arm optimizes this instruction in sys_linux_arm.s:
into this ADD instruction:
but misses an opportunity to optimize this move:
into a SUB instruction:
Alternatively, there's not a lot of explicit "MOVW $-N(Rx), Ry" instructions in the ARM assembly, and the only compiler generated ones I've found are from cmd/internal/obj/arm's stacksplit function, so it's feasible to just change them all to use explicit SUB instructions instead.
Changing just stacksplit to use ASUB instead of AMOVW shaves ~5kB of text off cmd/go:
The text was updated successfully, but these errors were encountered: