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/internal/gc: ssa.go contains some Intel-flavored idioms (and maybe an error) #15492
Comments
That should be Trunc32to8. We could just use all 32-bit operations on amd64, no reason to use the byte instructions. |
Related (alternative fix): #15245 |
Thanks @randall77 and @josharian. As we may have alternative fix, I leave it unchanged on amd64 for now, except Trunc64to8 -> Trunc32to8. |
CL https://golang.org/cl/22653 mentions this issue. |
CL https://golang.org/cl/22855 mentions this issue. |
…Barrier check Use 32-bit load for writeBarrier check on all architectures. Padding added to runtime structure. Updates #15365, #15492. Change-Id: I5d3dadf8609923fe0fe4fcb384a418b7b9624998 Reviewed-on: https://go-review.googlesource.com/22855 Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
I believe this is fixed. On all archs we now use 32-bit operations. |
Cherry spotted this, came to me for a sanity check. In insertWBmove and insertWBstore this code appears:
Note the 32-bit-load followed by a Trunc64to8 -- as far as we know, not a bug, but not quite what was intended. The Intel flavoring is the wide load followed by truncate; on other platforms a load byte is going to work just fine because they lack the partial-register craziness.
Since this is in writebarrier code, we actually care.
The text was updated successfully, but these errors were encountered: