math: add sqrt_arm.s and sqrtGoC.go as fallback to soft fp emulation
5a: add SQRTF and SQRTD
5l: add ASQRTF and ASQRTD
Use ARMv7 VFP VSQRT instruction to speed up math.Sqrt
> and then you'll have to change 5l to > automatically load math.a the same ...
13 years, 6 months ago
(2011-06-03 01:42:10 UTC)
#3
> and then you'll have to change 5l to
> automatically load math.a the same way
> that it does runtime.a.
This is new. Supporting both ARM5,ARM6, ARMv7, ARMv7_neon are going to
be messy. Soft fp only applicable to GOARM=5 anyway. So I would like
to add one more env, GOARCH_VER to pkg/math/Makefile:
OFILES=\
$(OFILES_$(GOARCH)$(GOARCH_VER))
So we can have below rule only build when GOARCH_VER=v7
OFILES_armv7=\
fabs_arm.$O\
sqrt_arm.$O\
The neon support for math sin/cos etc., then can use GOARCH_VER=v7_neon.
> http://codereview.appspot.com/4551082/
Please ignore this. I'm new to CL, not aware the 'hg mail' at the
first time. Please take another look at
http://codereview.appspot.com/4548085/, Sorry for the confusion.
fango
> This is new. Supporting both ARM5,ARM6, ARMv7, ARMv7_neon are going to > be messy. ...
13 years, 6 months ago
(2011-06-03 01:52:58 UTC)
#4
> This is new. Supporting both ARM5,ARM6, ARMv7, ARMv7_neon are going to
> be messy. Soft fp only applicable to GOARM=5 anyway. So I would like
> to add one more env, GOARCH_VER to pkg/math/Makefile:
I don't want to add a new variable. Right now you can compile
everything with GOARCH=arm and you only need the GOARM
value during the call to 5l. The libraries are all the same and
don't need to be built separately for different ARMs. I don't mind
if the software floating point generates calls to the math library
though.
There are really only two ARMs we are supporting:
old, using software floating point (we call it GOARM=5)
and new, using VFP floating point (we call it not setting GOARM).
All the fine gradations in the middle I am happy to ignore.
Russ
On 2011/06/03 06:30:44, Fango wrote: > Hello mailto:rsc@golang.org (cc: mailto:golang-dev@googlegroups.com), > > Please take another ...
13 years, 6 months ago
(2011-06-03 06:36:10 UTC)
#7
On 2011/06/03 06:30:44, Fango wrote:
> Hello mailto:rsc@golang.org (cc: mailto:golang-dev@googlegroups.com),
>
> Please take another look.
So sorry. hg change 4551082 did not add all files I changed. Have to manually
track and add them.
I don't have a ARM5 board, so just GOARM=5 to output arm5, and measured a big
diff in timing.
time ./5.out
PASS
real 0m0.047s
user 0m0.023s
sys 0m0.016s
time ./arm5
PASS
real 0m0.395s
user 0m0.391s
sys 0m0.000s
Hi Howard, You can use hg file 4551082 file1 file2 file3 to add files to ...
13 years, 6 months ago
(2011-06-03 06:46:15 UTC)
#8
Hi Howard,
You can use
hg file 4551082 file1 file2 file3
to add files to an exist CL
Cheers
Dave
On Fri, Jun 3, 2011 at 4:36 PM, <fan.howard@gmail.com> wrote:
> On 2011/06/03 06:30:44, Fango wrote:
>>
>> Hello mailto:rsc@golang.org (cc: mailto:golang-dev@googlegroups.com),
>
>> Please take another look.
>
> So sorry. hg change 4551082 did not add all files I changed. Have to
> manually track and add them.
>
> I don't have a ARM5 board, so just GOARM=5 to output arm5, and measured
> a big diff in timing.
>
> time ./5.out
> PASS
>
> real 0m0.047s
> user 0m0.023s
> sys 0m0.016s
>
>
> time ./arm5
> PASS
>
> real 0m0.395s
> user 0m0.391s
> sys 0m0.000s
>
>
> http://codereview.appspot.com/4551082/
>
On 2011/06/03 01:52:58, rsc wrote: > > This is new. Supporting both ARM5,ARM6, ARMv7, ARMv7_neon ...
13 years, 6 months ago
(2011-06-03 08:20:28 UTC)
#9
On 2011/06/03 01:52:58, rsc wrote:
> > This is new. Supporting both ARM5,ARM6, ARMv7, ARMv7_neon are going to
> > be messy. Soft fp only applicable to GOARM=5 anyway. So I would like
> > to add one more env, GOARCH_VER to pkg/math/Makefile:
>
> I don't want to add a new variable. Right now you can compile
> everything with GOARCH=arm and you only need the GOARM
> value during the call to 5l. The libraries are all the same and
> don't need to be built separately for different ARMs. I don't mind
> if the software floating point generates calls to the math library
> though.
>
> There are really only two ARMs we are supporting:
> old, using software floating point (we call it GOARM=5)
> and new, using VFP floating point (we call it not setting GOARM).
> All the fine gradations in the middle I am happy to ignore.
Yes, but it's not only old/new. Sometimes is the FPU powered down
to save the battery or the SoC manufacturer doesn't even bother
to put the FPU core on the chip.
The android NDK similarly targets the user-space for
"soft" FP (armv5te) and "hard" FP (armv7-a).
So without the FPU there would be in Go always an opt-in for
GOARM=5 and that's fine (at least for me).
For some reason I can't get run even a GOARM=5 binary on an ARMv6
without a FPU. This should be supported, no?
Martin
> All the fine gradations in the middle I am happy to ignore. If I ...
13 years, 6 months ago
(2011-06-03 08:51:36 UTC)
#10
> All the fine gradations in the middle I am happy to ignore.
If I guessed right, Russ would like Go to support only ARM5 and ARMv7+Neon, not
anything in between. Those quirk ARMv7 (Tegra 2 etc.,) would hopefully fade out
quickly, like 286.
> For some reason I can't get run even a GOARM=5 binary on an ARMv6 ...
13 years, 6 months ago
(2011-06-03 15:19:45 UTC)
#11
> For some reason I can't get run even a GOARM=5 binary on an ARMv6
> without a FPU. This should be supported, no?
Running a GOARM=5 binary on an ARMv6 should work.
Russ
The new code looks fine but if you view the diffs, you've undone a bunch ...
13 years, 6 months ago
(2011-06-07 19:10:54 UTC)
#13
The new code looks fine but if you view the diffs,
you've undone a bunch of other changes that I made.
Could you please read through the diffs and revert
the ones that are not part of your sqrt change?
Thanks.
Russ
Sorry I don't quite get what you mean. So I did a 'hg sync' and ...
13 years, 6 months ago
(2011-06-08 00:25:13 UTC)
#15
Sorry I don't quite get what you mean. So I did a 'hg sync' and merge, then `hg
mail 4551082` to confirm that is your intention. But that causes a comping
error:
/home/go/go/src/cmd/5l/asm.c:381:4: error: implicit declaration of function
'asmelfsym32'
Sorry, switching from vim did byte me. Anyway, I did a hg update default and ...
13 years, 6 months ago
(2011-06-08 01:18:17 UTC)
#19
Sorry, switching from vim did byte me. Anyway, I did a hg update default and
manual patched the changes I made on SQRTF/D. Please take another look. Thanks.
Issue 4551082: code review 4551082: math: add sqrt_arm.s and sqrtGoC.go as fallback to soft...
Created 13 years, 6 months ago by fango
Modified 13 years, 6 months ago
Reviewers:
Base URL:
Comments: 3