4ad/go.arm64

liblink: misassemble `sub $8128, Rn`

minux opened this issue · 2 comments

This is so hard to debug.... When I first found it in rev minux@68fd173, I regret that I let it go and bite me again in the future where it's extremely hard to debug.

liblink assembles it as sub rn, rn, #1, lsl 12, which off-by-4032!

This should be reason test/recover.go is failing.

This bug can lead to all sorts of mysterious stack corruptions.

Not only that, CMP $8128, Rn is also misassembled in the same way.