zeroshade commented on issue #983: URL: https://github.com/apache/arrow-go/issues/983#issuecomment-5589253405
@nsrip-dd picked up your breadcrumbs in #1300 — thanks, the `-ffixed` approach worked out even better than expected. With `-ffixed-x18 -ffixed-x27 -ffixed-x28` plus `-fomit-frame-pointer` (and without `-mstackrealign`, which forces a frame), clang 21 emits `unpack32_neon` as a leaf with zero stack usage, so there is no frame setup left to strip at all: constants go through `VMOVQ` pseudo-instructions and every branch is a real Go branch, leaving nothing SP-related hidden in `WORD`s. Rather than the c2goasm path, the PR adds a small `_lib/neon2goasm.py` that converts the compiled object directly and hard-rejects any instruction touching SP or a reserved register, wired to `make bit_packing_neon_arm64.s`. I verified instruction-for-instruction equivalence against the ELF object, your `BenchmarkUnpack32` repro now profiles with full caller chains and no longer crashes under `CGO_ENABLED=0`, and throughput improved ~27% from the newer codegen. `unpack_bool_neon_arm64.s` still has one `WORD`-encoded `stp` with SP writeback — same pattern, much smaller; follow-up material. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
