Name |
Last commit
|
Last update |
---|---|---|
.. | ||
gofrontend | ||
ChangeLog | ||
Make-lang.in | ||
README.gcc | ||
config-lang.in | ||
gccgo.texi | ||
go-backend.c | ||
go-c.h | ||
go-gcc.cc | ||
go-lang.c | ||
go-linemap.cc | ||
go-location.h | ||
go-sha1.cc | ||
go-system.h | ||
gospec.c | ||
lang-specs.h | ||
lang.opt |
The runtime functions runtime.getcallerpc and runtime.getcallersp are intended to be efficient ways to get the return and frame address of the caller (that is, the caller of runtime.getcallerpc). In the C code that is implemented by simply using C macros: This patch essentially implements those macros in the Go code. It would be nice if we could just use //extern for this, but it doesn't work because the runtime code passes the right argument. Of course we could change the runtime code, but these are common enough that I'd prefer to avoid the difference from the gc version of the runtime code. This patch corrects the existing declaration of __builtin_return_address to use uint32, rather than uint, for the parameter type. The builtin functions take the C type "unsigned int", which for the targets we use corresponds to the Go type uint32. Not that it should matter, really. Reviewed-on: https://go-review.googlesource.com/29653 From-SVN: r240382
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
gofrontend | Loading commit data... | |
ChangeLog | Loading commit data... | |
Make-lang.in | Loading commit data... | |
README.gcc | Loading commit data... | |
config-lang.in | Loading commit data... | |
gccgo.texi | Loading commit data... | |
go-backend.c | Loading commit data... | |
go-c.h | Loading commit data... | |
go-gcc.cc | Loading commit data... | |
go-lang.c | Loading commit data... | |
go-linemap.cc | Loading commit data... | |
go-location.h | Loading commit data... | |
go-sha1.cc | Loading commit data... | |
go-system.h | Loading commit data... | |
gospec.c | Loading commit data... | |
lang-specs.h | Loading commit data... | |
lang.opt | Loading commit data... |