-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/compile: asm for results says (SP) not (FP) #19458
Comments
I believe this is related to https://go-review.googlesource.com/c/37255/. |
Yes, probably 37255. I changed the disassembler to print the real base register if it is provided. For the example, the SSA is:
The reason for 37255 is that if the associated symbol is a PPARAM we always printed FP even though the base register was something bad, like CX. So the assembly looked ok and the code was actually bad. We should probably fix |
CL https://golang.org/cl/37971 mentions this issue. |
CL https://golang.org/cl/38156 mentions this issue. |
Note that the result is described as
y+16(SP)
instead ofy+16(FP)
. The use of SP instead of FP is not semantically meaningful in the pseudo-assembly of the -S output (in that output, both use offsets relative to the real hardware SP), but the distinction may matter inside the compiler. I wonder if there are any bugs lurking due to the confusion that causes SP to be printed instead of FP.Worth checking.
/cc @mdempsky @randall77
The text was updated successfully, but these errors were encountered: