Hi Ian,

Could you please share some code pointers or documents about how 'go' 
functions calling 'c' functions is implemented,
I'm looking into the following function 
at gofrontend/libgo/go/bytes/bytes.go:102, where c-function IndexByte in 
bytealg.c/bytealg.c:90
is called but with wrong argument bindings, the issue is sort of expected 
as a bunch of changes on arm are not in place now.
Thanks a lot. 
    
// IndexByte returns the index of the first instance of c in b, or -1 if c 
is not present in b.
func IndexByte(b []byte, c byte) int {
return bytealg.IndexByte(b, c)
}


On Tuesday, July 16, 2019 at 5:40:24 AM UTC+8, Ian Lance Taylor wrote:
>
> On Mon, Jul 15, 2019 at 7:39 AM Xiangdong Ji <xiang...@gmail.com 
> <javascript:>> wrote: 
> > 
> > I am trying to build gollvm on ARM with a few experimental changes, 
> looks like some ARM Neon intrinsics in 
> > libgo/runtime/aeshash.c are not supported by GCC 7/8, wo

 

> ndering if it could be solved by any additional compile 
> > options, or should the latest gcc-9 or clang be used? 
>
> The arm64 support in aeshash.c was added in GCC 9.  In general there 
> is no expectation that the files in GCC 9 can be compiled by earlier 
> versions of GCC.  Many times it will work, but not always, and this 
> may be a case where it fails (I haven't checked).  It's not feasible 
> for us to ensure that files distributed with GCC 9 can be compiled by 
> earlier versions of GCC. 
>
> In any case, if your goal is to build GoLLVM, then you should be 
> compiling this file with clang.  And it sounds like you can do that. 
> So there doesn't seem to be much reason to compile it with GCC.  I 
> understand that you are having trouble building GoLLVM, but it's not 
> clear to me why building this file with GCC rather than clang will 
> help with that. 
>
> Ian 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/954aea89-c6ad-422a-9599-47336f0bec53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to