Re: [go-nuts] Re: What's the maximum array length?

2022-10-30 Thread eric...@arm.com
rious how you view your reply as >>> being more clear than mine. :-) >>> >>> >>>> On Fri, Oct 28, 2022 at 8:57 PM tapi...@gmail.com >>>> wrote: >>>> >>>>> The max array length is math.MaxInt. "[math.MaxIn

[go-nuts] What's the maximum array length?

2022-10-27 Thread eric...@arm.com
The spec says that " The length is part of the array's type; it must evaluate to a non-negative constant representable by a value of type int. ", so on a 64-bit environment, I assume that the maximum array length

[go-nuts] noinline is 25% faster than inline on apple m1 ?

2022-07-22 Thread eric...@arm.com
For this piece of code, two test functions are the same, but one is inlined, the other is not. However the inlined version is about 25% slower than the no inlined version on apple m1 chip. Why is it? The code is here https://go.dev/play/p/0NkLMtTZtv4 -- You received this message because you

Re: [go-nuts] Why doesn't Go use atomic.LoadInt32() in sync.Mutex.lockSlow()?

2022-04-01 Thread eric...@arm.com
Why is it not safe to read here? The real write operation is done through CAS, assuming the read value is out of date, then the CAS operation will fail. 在2022年4月2日星期六 UTC+8 11:41:00 写道: > On Fri, Apr 1, 2022 at 8:31 PM 机智的小小帅 wrote: > > > > Hi,all. I'm reading the source code of sync package

[go-nuts] Re: gollvm compilation issue

2022-02-08 Thread eric...@arm.com
I just filed a patch for this issue, see https://go-review.googlesource.com/c/gollvm/+/384394 在2022年2月9日星期三 UTC+8 14:57:08 写道: > I tried to build gollvm with the latest llvm, but it failed with several > compilation errors, such as the one below. Using llvm-13.0.0 resulted in > compilation

[go-nuts] Re: Writing SIMD ASM

2022-01-20 Thread eric...@arm.com
> I see there's an existing issue to add a bunch of Neon floating point instructions: > https://github.com/golang/go/issues/41092 > > I actually spent a while having a go at adding the instructions myself, but couldn't figure it out. > > I also see that there is also a proposal and a MR to

Re: [go-nuts] How to verify whether gollvm is picked

2021-06-28 Thread eric...@arm.com
I don't know why you can't see 'gccgo' or 'gollvm', on my machine, For main Go, $ go version go version go1.16.2 linux/arm64 For gccgo, $ go version go version go1.14.2 gccgo (GCC) 11.0.0 20200603 (experimental) linux/arm64 For gollvm, $ go version go version go1.16.5 gollvm LLVM 13.0.0git

[go-nuts] Failed to install golang.org/x/tools

2021-02-01 Thread eric...@arm.com
Os: ubuntu 18.04 Arch: arm64 linux go version: go1.15.7 What did I do: $ go get -u golang.org/x/tools/... package mvdan.cc/gofumpt/format: unrecognized import path "mvdan.cc/gofumpt/format": reading https://mvdan.cc/gofumpt/format?go-get=1: 404 Not Found But with the tip version of Go, I can

Re: [go-nuts] Re: Register spilling size

2020-11-04 Thread eric...@arm.com
/42386 > On Wednesday, November 4, 2020 at 5:51:03 AM UTC-8 jesper.lou...@gmail.com > wrote: > >> On Wed, Nov 4, 2020 at 9:36 AM eric...@arm.com wrote: >> >>> I got it, the code is here >>> https://github.com/golang/go/blob/633f9e206045176a12c301eb2c249c1c1d9a5

[go-nuts] Re: Register spilling size

2020-11-04 Thread eric...@arm.com
ot;.q+32(SP), DX >> 0x002f 00047 (tmp1.go:5) MOVWLZX (DX), BX >> 0x0032 00050 (tmp1.go:5) MOVW BX, "".y+4(SP) >> 0x0037 00055 (tmp1.go:6) CALL "".g(SB) >> 0x003c 00060 (tmp1.go:7) MOVWLZX "".y+4(SP), AX >> 0x0041 00065 (tmp1.go:7) MOVQ &quo

[go-nuts] Re: Register spilling size

2020-11-03 Thread eric...@arm.com
MOVWLZX (DX), BX > 0x0032 00050 (tmp1.go:5) MOVW BX, "".y+4(SP) > 0x0037 00055 (tmp1.go:6) CALL "".g(SB) > 0x003c 00060 (tmp1.go:7) MOVWLZX "".y+4(SP), AX > 0x0041 00065 (tmp1.go:7) MOVQ "".p+24(SP), CX > 0x0046 00070 (tmp1.go:7) MOVW AX, (CX) &

[go-nuts] Register spilling size

2020-11-02 Thread eric...@arm.com
Hi, Can someone tell me why does OpStoreReg of type int16, int32, etc. occupy 8 bytes on the stack? And where is this handled ? Thanks. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails

[go-nuts] Re: What's the basic block layout algorithm ?

2020-07-21 Thread eric...@arm.com
; register allocation. It helps a linear-scan allocator to have blocks > connected by high-likelihood edges be adjacent. But that layout is > independently useful to avoid branch instructions, and non-linear-scan > allocators probably like that layout also. > > On Tuesday, July 21, 2020

[go-nuts] What's the basic block layout algorithm ?

2020-07-21 Thread eric...@arm.com
Hi, I was looking at the layout pass recently, but I didn't find any documents about it. I would like to ask what algorithm is used for this pass? There is not much code for this pass, but if there is some documentation, it will be more convenient to understand it. The layout pass has