1
0
mirror of https://github.com/golang/go synced 2024-11-21 14:34:41 -07:00
The Go programming language
Go to file
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
doc doc/codewalk: Share Memory By Communicating 2010-06-30 16:56:30 +10:00
include Fix *l/*c -V flag segfault 2010-02-08 11:53:27 -08:00
lib codereview: allow multiple email addresses in CONTRIBUTORS 2010-06-30 23:34:11 -07:00
misc godashboard: add Projects page 2010-06-23 15:27:51 +01:00
pkg more description 2009-10-15 23:08:46 -07:00
src 6l: implement MOVLQZX as "mov", not "movsxd" 2010-07-01 12:18:35 -07:00
test test: override gcc bug when preparing complex divide tables 2010-06-30 23:34:27 -07:00
.hgignore .hgignore: ignore doc/htmlgen 2010-06-09 21:39:40 -07:00
.hgtags release.2010-06-21 tag 2010-06-21 23:22:14 +01:00
AUTHORS A+C: add Gustavo Niemeyer (individual CLA) 2010-06-30 23:31:41 -07:00
CONTRIBUTORS A+C: add Gustavo Niemeyer (individual CLA) 2010-06-30 23:31:41 -07:00
favicon.ico add a favicon plus a couple of hi-res versions of gordon 2009-10-26 10:13:07 -07:00
LICENSE Add an explicit patent grant to the Go license. 2010-01-25 15:39:32 -08:00
README add a README file, so that if someone finds a 2009-11-08 09:57:37 -08:00

This is the source code repository for the Go programming language.  

For documentation about how to install and use Go,
visit http://golang.org/ or load doc/install.html in your web browser.

After installing Go, you can view a nicely formatted
doc/install.html by running godoc --http=:6060
and then visiting http://localhost:6060/doc/install.html.

Unless otherwise noted, the Go source files are distributed
under the BSD-style license found in the LICENSE file.