[go-nuts] Slice conversion function not working on big endian platform

2024-05-08 Thread 'Srinivas Pokala' via golang-nuts
Hello gopher's, I have simple go program which convert slice of one type to slice of other type using go generics for handling all the supported types. Below is the code snippest for this: package main import "fmt" import "unsafe" type slice struct { ptr unsafe.Pointer len int

Re: [go-nuts] code optimization bug in s390x (Go 1.21.4) ?

2023-11-29 Thread 'Srinivas Pokala' via golang-nuts
Thank's for the findings. We verified the same issue on linux/s390x for go 1.21.4 and also the issue is not reproducing in the go1.20.11. >From our initial findings of disassembled data, we are seeing an additional instruction getting emitted i.e. SLLG instruction on go1.21.4. This instructio

[go-nuts] How to print address of structure's member using gdb

2023-04-12 Thread 'Srinivas Pokala' via golang-nuts
Hi All, How to print content of structure's one of member using gdb if we have address of structure. Ex: type Sar struct { name string clp uintptr number int } var x uintptr let's say x pointing to address of structure sar, How to print member data clp in gdb. I tried (gdb) print (*Sar)(un