Hello khr@golang.org, minux@golang.org, rsc@golang.org (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
10 years, 8 months ago
(2014-08-21 07:05:23 UTC)
#1
10 years, 8 months ago
(2014-08-22 01:43:52 UTC)
#4
https://codereview.appspot.com/126490043/diff/40002/src/pkg/runtime/vlrt_arm.go
File src/pkg/runtime/vlrt_arm.go (right):
https://codereview.appspot.com/126490043/diff/40002/src/pkg/runtime/vlrt_arm....
src/pkg/runtime/vlrt_arm.go:81: yhi = dvl.hi /* causes something awful */
On 2014/08/21 17:06:22, khr wrote:
> I don't understand this translation. It used to do a C float->int conversion,
> now it just grabs half of the float representation. They can't be equivalent,
> can they?
You are correct, this was wrong. I was worried that float64 -> uint32 would
cause recursion into this or some other helper, but it looks like I was wrong.
PTAL.
I'd suggest we consolidate all this into vlrt.go rather than vlrt_arm.go. the {uint,float}64to{float,uint}64 functions are ...
10 years, 8 months ago
(2014-08-22 02:19:01 UTC)
#5
I'd suggest we consolidate all this into vlrt.go
rather than vlrt_arm.go.
the {uint,float}64to{float,uint}64 functions are only
used by 5g, but it won't do any harm to always have
it. The linker will do the right job.
e.g. if/when we add support for FPU-less MIPS32,
we will need to rename the file and add build tags,
because the name is already properly namespaced,
it makes sense to put into a generic vlrt.go, and
if we care about compilation speed (which I highly
doubt we will), we can apply build tags as needed.
Yup. I can do that, it is obvious in retrospect. Wrt, the translation of _d2v, ...
10 years, 8 months ago
(2014-08-22 02:21:21 UTC)
#6
Yup. I can do that, it is obvious in retrospect.
Wrt, the translation of _d2v, does that look sane now?
On 22 Aug 2014 12:19, <minux@golang.org> wrote:
> I'd suggest we consolidate all this into vlrt.go
> rather than vlrt_arm.go.
>
> the {uint,float}64to{float,uint}64 functions are only
> used by 5g, but it won't do any harm to always have
> it. The linker will do the right job.
>
> e.g. if/when we add support for FPU-less MIPS32,
> we will need to rename the file and add build tags,
> because the name is already properly namespaced,
> it makes sense to put into a generic vlrt.go, and
> if we care about compilation speed (which I highly
> doubt we will), we can apply build tags as needed.
>
> https://codereview.appspot.com/126490043/
>
https://codereview.appspot.com/126490043/diff/70001/src/pkg/runtime/vlrt_arm.go File src/pkg/runtime/vlrt_arm.go (right): https://codereview.appspot.com/126490043/diff/70001/src/pkg/runtime/vlrt_arm.go#newcode31 src/pkg/runtime/vlrt_arm.go:31: lo, hi uint32 the definition is not big-endian-safe, could ...
10 years, 8 months ago
(2014-08-22 02:39:48 UTC)
#7
PTAL. vlrt_arm.go renamed to vlrt.go with a build tag, as this file is not based ...
10 years, 8 months ago
(2014-08-22 05:17:56 UTC)
#8
PTAL.
vlrt_arm.go renamed to vlrt.go with a build tag, as this file is not based on
the inferno code I have not hg copied it.
Minux, I agree _d2v is not endian safe.
As Josh is also working in this area I'd like to land what is in this proposal
now to avoid blocking him, then tackle the TODO as a followup CL along with
other cleanups to make the function more idiomatic.
In the Go compilers (in contrast to the C compilers) I believe we always emit ...
10 years, 8 months ago
(2014-08-22 14:47:59 UTC)
#9
In the Go compilers (in contrast to the C compilers) I believe we always emit
machine code for 64-bit bit operations (shift, add, etc). So the type vlong
struct should not be necessary.
The problem in the C compilers was that all the 64-bit math, even shift and mask
and such, was calling library routines, so the library routines themselves could
not make use of 64-bit numbers.
In this case I think you can replace all the references to vlong with the real
uint64.
*** Submitted as https://code.google.com/p/go/source/detail?r=a12bd7115455 *** runtime: convert float64toint64, float64touint64 to Go This is a very ...
10 years, 8 months ago
(2014-08-23 23:38:51 UTC)
#14
Issue 126490043: code review 126490043: runtime: convert float64toint64, float64touint64 to Go
(Closed)
Created 10 years, 8 months ago by dave_cheney.net
Modified 10 years, 8 months ago
Reviewers:
Base URL:
Comments: 5