aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/x86/ssa.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/x86/ssa.go')
-rw-r--r--src/cmd/compile/internal/x86/ssa.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/cmd/compile/internal/x86/ssa.go b/src/cmd/compile/internal/x86/ssa.go
index c21ac32297..fbf76d0c5e 100644
--- a/src/cmd/compile/internal/x86/ssa.go
+++ b/src/cmd/compile/internal/x86/ssa.go
@@ -42,10 +42,11 @@ func ssaMarkMoves(s *gc.SSAGenState, b *ssa.Block) {
// loadByType returns the load instruction of the given type.
func loadByType(t *types.Type) obj.As {
// Avoid partial register write
- if !t.IsFloat() && t.Size() <= 2 {
- if t.Size() == 1 {
+ if !t.IsFloat() {
+ switch t.Size() {
+ case 1:
return x86.AMOVBLZX
- } else {
+ case 2:
return x86.AMOVWLZX
}
}
@@ -852,8 +853,6 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
if gc.Debug_checknil != 0 && v.Pos.Line() > 1 { // v.Pos.Line()==1 in generated wrappers
gc.Warnl(v.Pos, "generated nil check")
}
- case ssa.Op386FCHS:
- v.Fatalf("FCHS in non-387 mode")
case ssa.OpClobber:
p := s.Prog(x86.AMOVL)
p.From.Type = obj.TYPE_CONST