aboutsummaryrefslogtreecommitdiff
path: root/test/asmhdr.dir
AgeCommit message (Collapse)Author
2022-01-10cmd/compile: use exact constant in go_asm.hIan Lance Taylor
Fixes #50523 Change-Id: Idab1b44d106250e9301d90ee6571f0ea51242dd9 Reviewed-on: https://go-review.googlesource.com/c/go/+/377074 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Liz Fong-Jones <lizf@honeycomb.io> Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com> Trust: Emmanuel Odeke <emmanuel@orijtech.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
2021-10-30cmd/compile: emit sensible go_asm.h consts for big intsAustin Clements
Currently, the compiler will emit any const that doesn't fit in an int64 to go_asm.h like #define const_stackPreempt constant.intVal{val:(*big.Int)(0xc000c06c40)} This happens because dumpasmhdr formats the constant.Value using the verb "%#v". Since constant.Value doesn't implement the GoString() method, this just prints the Go-syntax representation of the value. This happens to work for small integer constants, which go/constant represents directly as an int64, but not for integer constants that don't fit in an int64, which go/constant represents as a big.Int. Make these constants usable by changing the formatting verb to "%v", which will call the String() method, giving a reasonable result in all cases. Change-Id: I365eeb88c8acfc43ff377cc873432269bde3f541 Reviewed-on: https://go-review.googlesource.com/c/go/+/359954 Trust: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>