mirror of
https://github.com/golang/go
synced 2024-11-26 21:01:31 -07:00
656f0888b7
Previously, softfloat mode does not work with register ABI, mainly because the compiler doesn't know how to pass floating point arguments and results. According to the ABI it should be passed in FP registers, but there isn't any in softfloat mode. This CL makes it work. When softfloat is used, we define the ABI as having 0 floating point registers (because there aren't any). The integer registers are unchanged. So floating point arguments and results are passed in memory. Another option is to pass (the bit representation of) floating point values in integer registers. But this complicates things because it'd need to reorder integer argument registers. Change-Id: Ibecbeccb658c10a868fa7f2dcf75138f719cc809 Reviewed-on: https://go-review.googlesource.com/c/go/+/327274 Trust: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
18 lines
400 B
Go
18 lines
400 B
Go
// compile -N -d=softfloat
|
|
|
|
// Copyright 2018 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// Issue 26163: dead store generated in late opt messes
|
|
// up store chain calculation.
|
|
|
|
package p
|
|
|
|
var i int
|
|
var A = ([]*int{})[i]
|
|
|
|
var F func(float64, complex128) int
|
|
var C chan complex128
|
|
var B = F(1, 1+(<-C))
|