1
0
mirror of https://github.com/golang/go synced 2024-11-12 06:30:21 -07:00

[dev.ssa] cmd/compile: Use movups for xmm->xmm mov

Movups is 1 byte smaller than movapd that we currently use.

Change-Id: I22f771f066529352722a28543535ec43497cb9c5
Reviewed-on: https://go-review.googlesource.com/19938
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Ilya Tocar 2016-02-26 16:48:16 +03:00 committed by David Chase
parent 8107b0012f
commit 1b1d0a9a80

View File

@ -4999,7 +4999,9 @@ func moveByType(t ssa.Type) int {
if t.IsFloat() { if t.IsFloat() {
// Moving the whole sse2 register is faster // Moving the whole sse2 register is faster
// than moving just the correct low portion of it. // than moving just the correct low portion of it.
return x86.AMOVAPD // There is no xmm->xmm move with 1 byte opcode,
// so use movups, which has 2 byte opcode.
return x86.AMOVUPS
} else { } else {
switch t.Size() { switch t.Size() {
case 1: case 1: