1
0
mirror of https://github.com/golang/go synced 2024-11-20 02:54:39 -07:00
go/src
Russ Cox bf10982739 6l: implement MOVLQZX as "mov", not "movsxd"
(Here, quoted strings are the official AMD names.)

The amd64 "movsxd" instruction, when invoked
with a 64-bit REX prefix, moves and sign extends
a 32-bit value from register or memory into a
64-bit register.  6.out.h spells this MOVLQSX.

6.out.h also includes MOVLQZX, the zero extending
version, which it implements as "movsxd" without
the REX prefix.  Without the REX prefix it's only sign
extending 32 bits to 32 bits (i.e., not doing anything
to the bits) and then storing in a 32-bit register.
Any write to a 32-bit register zeros the top half of the
corresponding 64-bit register, giving the advertised effect.
This particular implementation of the functionality is
non-standard, because an ordinary 32-bit "mov" would
do the same thing.

Because it is non-standard, it is often mishandled or
not handled by binary translation tools like valgrind.
Switching to the standard "mov" makes the binaries
work better with those tools.

It's probably useful in 6c and 6g to have an explicit
instruction, though, so that the intent of the size
change is clear.  Thus we leave the concept of MOVLQZX
and just implement it by the standard "mov" instead of
the non-standard 32-bit "movsxd".

Fixes #896.

R=ken2
CC=golang-dev
https://golang.org/cl/1733046
2010-07-01 12:18:35 -07:00
..
cmd 6l: implement MOVLQZX as "mov", not "movsxd" 2010-07-01 12:18:35 -07:00
lib9 rename GOOS=mingw to GOOS=windows 2010-04-29 23:45:14 -07:00
libbio Ports of lib9, libbio and libmach to Windows. 2009-11-30 11:53:11 -08:00
libcgo Correct _cgo_free when C ABI does not pass first arg on stack. 2010-05-30 22:22:47 -07:00
libmach libmach: skip __nl_symbol_ptr section on OS X 2010-05-24 14:30:51 -07:00
pkg cmath: correct IsNaN for argument cmplx(Inf, NaN) 2010-06-30 23:34:33 -07:00
all-arm.bash arm: toss make-arm.bash 2010-02-03 20:46:37 -08:00
all-nacl.bash nacl: another attempt at fixing build 2010-05-03 11:12:54 -07:00
all.bash build script tweaks 2010-03-31 19:48:33 -07:00
clean.bash add simple garbage collector benchmarks to dashboard 2010-02-09 13:33:00 -08:00
env.bash rename GOOS=mingw to GOOS=windows 2010-04-29 23:45:14 -07:00
Make.386
Make.amd64
Make.arm
make.bash build; allow MAKEFLAGS to be set outside the build scripts 2010-05-15 10:08:29 -07:00
Make.cmd Make.cmd: make 'all' the default target (was 'clean': BUG) 2010-03-19 16:33:27 -07:00
Make.common Factor the Makefiles to make writing outside Makefiles easier. 2010-03-19 15:14:46 -07:00
Make.conf Fix missing explicit GOBIN in src/pkg/Makefile. Clean up creation of 2010-01-06 07:47:56 -08:00
Make.pkg cgo: use slash-free relative paths for .so references 2010-06-30 23:31:27 -07:00
quietgcc.bash Build changes to support work on the BSDs. 2009-11-14 15:29:09 -08:00
run.bash run.bash: remove MAKEFLAGS=-j4 to prevent crashing on freebsd 2010-04-05 10:53:38 +10:00
sudo.bash go: makes it build for the case $GOROOT has whitespaces 2009-11-23 17:32:51 -08:00
version.bash version.bash: cope with ancient Mercurial 2010-03-16 18:45:06 -07:00