2013-03-27 21:51:07 +01:00
|
|
|
// AUTO-GENERATED by mkbuiltin; DO NOT EDIT
|
2009-10-15 23:10:49 -07:00
|
|
|
char *runtimeimport =
|
|
|
|
|
"package runtime\n"
|
2011-05-11 16:35:11 +02:00
|
|
|
"import runtime \"runtime\"\n"
|
2014-07-30 09:01:52 -07:00
|
|
|
"func @\"\".newobject (@\"\".typ·2 *byte) (? *any)\n"
|
2013-02-26 03:14:59 +08:00
|
|
|
"func @\"\".panicindex ()\n"
|
|
|
|
|
"func @\"\".panicslice ()\n"
|
all: merge NaCl branch (part 1)
See golang.org/s/go13nacl for design overview.
This CL is the mostly mechanical changes from rsc's Go 1.2 based NaCl branch, specifically 39cb35750369 to 500771b477cf from https://code.google.com/r/rsc-go13nacl. This CL does not include working NaCl support, there are probably two or three more large merges to come.
CL 15750044 is not included as it involves more invasive changes to the linker which will need to be merged separately.
The exact change lists included are
15050047: syscall: support for Native Client
15360044: syscall: unzip implementation for Native Client
15370044: syscall: Native Client SRPC implementation
15400047: cmd/dist, cmd/go, go/build, test: support for Native Client
15410048: runtime: support for Native Client
15410049: syscall: file descriptor table for Native Client
15410050: syscall: in-memory file system for Native Client
15440048: all: update +build lines for Native Client port
15540045: cmd/6g, cmd/8g, cmd/gc: support for Native Client
15570045: os: support for Native Client
15680044: crypto/..., hash/crc32, reflect, sync/atomic: support for amd64p32
15690044: net: support for Native Client
15690048: runtime: support for fake time like on Go Playground
15690051: build: disable various tests on Native Client
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/68150047
2014-02-25 09:47:42 -05:00
|
|
|
"func @\"\".panicdivide ()\n"
|
2013-02-26 03:14:59 +08:00
|
|
|
"func @\"\".throwreturn ()\n"
|
|
|
|
|
"func @\"\".throwinit ()\n"
|
|
|
|
|
"func @\"\".panicwrap (? string, ? string, ? string)\n"
|
2014-09-05 10:04:16 -04:00
|
|
|
"func @\"\".gopanic (? interface {})\n"
|
|
|
|
|
"func @\"\".gorecover (? *int32) (? interface {})\n"
|
2013-02-26 03:14:59 +08:00
|
|
|
"func @\"\".printbool (? bool)\n"
|
|
|
|
|
"func @\"\".printfloat (? float64)\n"
|
|
|
|
|
"func @\"\".printint (? int64)\n"
|
cmd/gc: allow runtime to define a hex integer type for printing
As part of the translation of the runtime, we need to rewrite
C printf calls to Go print calls. Consider this C printf:
runtime·printf("[signal %x code=%p addr=%p pc=%p]\n",
g->sig, g->sigcode0, g->sigcode1, g->sigpc);
Today the only way to write that in Go is:
print("[signal ")
printhex(uint64(g->sig))
print(" code=")
printhex(uint64(g->sigcode0))
print(" addr=")
printhex(uint64(g->sigcode1))
print(" pc=")
printhex(uint64(g->sigpc))
print("]\n")
(That's nearly exactly what runtime code looked like in C before
I added runtime·printf.)
This CL recognizes the unexported type runtime.hex as an integer
that should be printed in hexadecimal instead of decimal.
It's a little kludgy, but it's restricted to package runtime.
Other packages can define type hex with no effect at all.
Now we can translate that original printf as the more compact:
print("[signal ", hex(g->sig), " code=", hex(g->sigcode0),
" addr=", hex(g->sigcode1), " pc=", hex(g->sigpc), "]\n")
LGTM=r, iant
R=r, iant
CC=golang-codereviews
https://golang.org/cl/133220043
2014-08-29 13:22:17 -04:00
|
|
|
"func @\"\".printhex (? uint64)\n"
|
2013-02-26 03:14:59 +08:00
|
|
|
"func @\"\".printuint (? uint64)\n"
|
|
|
|
|
"func @\"\".printcomplex (? complex128)\n"
|
|
|
|
|
"func @\"\".printstring (? string)\n"
|
|
|
|
|
"func @\"\".printpointer (? any)\n"
|
|
|
|
|
"func @\"\".printiface (? any)\n"
|
|
|
|
|
"func @\"\".printeface (? any)\n"
|
|
|
|
|
"func @\"\".printslice (? any)\n"
|
|
|
|
|
"func @\"\".printnl ()\n"
|
|
|
|
|
"func @\"\".printsp ()\n"
|
2014-11-05 14:42:54 -05:00
|
|
|
"func @\"\".printlock ()\n"
|
|
|
|
|
"func @\"\".printunlock ()\n"
|
2015-01-21 17:37:59 +03:00
|
|
|
"func @\"\".concatstring2 (? *[32]byte, ? string, ? string) (? string)\n"
|
|
|
|
|
"func @\"\".concatstring3 (? *[32]byte, ? string, ? string, ? string) (? string)\n"
|
|
|
|
|
"func @\"\".concatstring4 (? *[32]byte, ? string, ? string, ? string, ? string) (? string)\n"
|
|
|
|
|
"func @\"\".concatstring5 (? *[32]byte, ? string, ? string, ? string, ? string, ? string) (? string)\n"
|
|
|
|
|
"func @\"\".concatstrings (? *[32]byte, ? []string) (? string)\n"
|
2013-02-26 03:14:59 +08:00
|
|
|
"func @\"\".cmpstring (? string, ? string) (? int)\n"
|
|
|
|
|
"func @\"\".eqstring (? string, ? string) (? bool)\n"
|
2015-01-28 08:42:20 +03:00
|
|
|
"func @\"\".intstring (? *[4]byte, ? int64) (? string)\n"
|
2015-01-21 17:37:59 +03:00
|
|
|
"func @\"\".slicebytetostring (? *[32]byte, ? []byte) (? string)\n"
|
2014-04-03 19:05:17 -04:00
|
|
|
"func @\"\".slicebytetostringtmp (? []byte) (? string)\n"
|
2015-01-30 09:14:13 +03:00
|
|
|
"func @\"\".slicerunetostring (? *[32]byte, ? []rune) (? string)\n"
|
|
|
|
|
"func @\"\".stringtoslicebyte (? *[32]byte, ? string) (? []byte)\n"
|
2015-02-03 20:50:58 +03:00
|
|
|
"func @\"\".stringtoslicebytetmp (? string) (? []byte)\n"
|
2015-01-30 09:14:13 +03:00
|
|
|
"func @\"\".stringtoslicerune (? *[32]rune, ? string) (? []rune)\n"
|
2013-02-26 03:14:59 +08:00
|
|
|
"func @\"\".stringiter (? string, ? int) (? int)\n"
|
|
|
|
|
"func @\"\".stringiter2 (? string, ? int) (@\"\".retk·1 int, @\"\".retv·2 rune)\n"
|
2014-07-31 12:43:40 -07:00
|
|
|
"func @\"\".slicecopy (@\"\".to·2 any, @\"\".fr·3 any, @\"\".wid·4 uintptr) (? int)\n"
|
2013-02-26 03:14:59 +08:00
|
|
|
"func @\"\".slicestringcopy (@\"\".to·2 any, @\"\".fr·3 any) (? int)\n"
|
|
|
|
|
"func @\"\".typ2Itab (@\"\".typ·2 *byte, @\"\".typ2·3 *byte, @\"\".cache·4 **byte) (@\"\".ret·1 *byte)\n"
|
|
|
|
|
"func @\"\".convI2E (@\"\".elem·2 any) (@\"\".ret·1 any)\n"
|
|
|
|
|
"func @\"\".convI2I (@\"\".typ·2 *byte, @\"\".elem·3 any) (@\"\".ret·1 any)\n"
|
2013-12-17 16:55:06 -08:00
|
|
|
"func @\"\".convT2E (@\"\".typ·2 *byte, @\"\".elem·3 *any) (@\"\".ret·1 any)\n"
|
|
|
|
|
"func @\"\".convT2I (@\"\".typ·2 *byte, @\"\".typ2·3 *byte, @\"\".cache·4 **byte, @\"\".elem·5 *any) (@\"\".ret·1 any)\n"
|
2014-12-29 16:15:05 -05:00
|
|
|
"func @\"\".assertE2E (@\"\".typ·1 *byte, @\"\".iface·2 any, @\"\".ret·3 *any)\n"
|
|
|
|
|
"func @\"\".assertE2E2 (@\"\".typ·2 *byte, @\"\".iface·3 any, @\"\".ret·4 *any) (? bool)\n"
|
|
|
|
|
"func @\"\".assertE2I (@\"\".typ·1 *byte, @\"\".iface·2 any, @\"\".ret·3 *any)\n"
|
|
|
|
|
"func @\"\".assertE2I2 (@\"\".typ·2 *byte, @\"\".iface·3 any, @\"\".ret·4 *any) (? bool)\n"
|
|
|
|
|
"func @\"\".assertE2T (@\"\".typ·1 *byte, @\"\".iface·2 any, @\"\".ret·3 *any)\n"
|
|
|
|
|
"func @\"\".assertE2T2 (@\"\".typ·2 *byte, @\"\".iface·3 any, @\"\".ret·4 *any) (? bool)\n"
|
|
|
|
|
"func @\"\".assertI2E (@\"\".typ·1 *byte, @\"\".iface·2 any, @\"\".ret·3 *any)\n"
|
|
|
|
|
"func @\"\".assertI2E2 (@\"\".typ·2 *byte, @\"\".iface·3 any, @\"\".ret·4 *any) (? bool)\n"
|
|
|
|
|
"func @\"\".assertI2I (@\"\".typ·1 *byte, @\"\".iface·2 any, @\"\".ret·3 *any)\n"
|
|
|
|
|
"func @\"\".assertI2I2 (@\"\".typ·2 *byte, @\"\".iface·3 any, @\"\".ret·4 *any) (? bool)\n"
|
|
|
|
|
"func @\"\".assertI2T (@\"\".typ·1 *byte, @\"\".iface·2 any, @\"\".ret·3 *any)\n"
|
|
|
|
|
"func @\"\".assertI2T2 (@\"\".typ·2 *byte, @\"\".iface·3 any, @\"\".ret·4 *any) (? bool)\n"
|
2013-02-26 03:14:59 +08:00
|
|
|
"func @\"\".ifaceeq (@\"\".i1·2 any, @\"\".i2·3 any) (@\"\".ret·1 bool)\n"
|
|
|
|
|
"func @\"\".efaceeq (@\"\".i1·2 any, @\"\".i2·3 any) (@\"\".ret·1 bool)\n"
|
|
|
|
|
"func @\"\".ifacethash (@\"\".i1·2 any) (@\"\".ret·1 uint32)\n"
|
|
|
|
|
"func @\"\".efacethash (@\"\".i1·2 any) (@\"\".ret·1 uint32)\n"
|
|
|
|
|
"func @\"\".makemap (@\"\".mapType·2 *byte, @\"\".hint·3 int64) (@\"\".hmap·1 map[any]any)\n"
|
2013-12-02 13:05:04 -08:00
|
|
|
"func @\"\".mapaccess1 (@\"\".mapType·2 *byte, @\"\".hmap·3 map[any]any, @\"\".key·4 *any) (@\"\".val·1 *any)\n"
|
2013-03-20 13:51:29 -07:00
|
|
|
"func @\"\".mapaccess1_fast32 (@\"\".mapType·2 *byte, @\"\".hmap·3 map[any]any, @\"\".key·4 any) (@\"\".val·1 *any)\n"
|
|
|
|
|
"func @\"\".mapaccess1_fast64 (@\"\".mapType·2 *byte, @\"\".hmap·3 map[any]any, @\"\".key·4 any) (@\"\".val·1 *any)\n"
|
|
|
|
|
"func @\"\".mapaccess1_faststr (@\"\".mapType·2 *byte, @\"\".hmap·3 map[any]any, @\"\".key·4 any) (@\"\".val·1 *any)\n"
|
2013-12-02 13:05:04 -08:00
|
|
|
"func @\"\".mapaccess2 (@\"\".mapType·3 *byte, @\"\".hmap·4 map[any]any, @\"\".key·5 *any) (@\"\".val·1 *any, @\"\".pres·2 bool)\n"
|
2013-03-20 13:51:29 -07:00
|
|
|
"func @\"\".mapaccess2_fast32 (@\"\".mapType·3 *byte, @\"\".hmap·4 map[any]any, @\"\".key·5 any) (@\"\".val·1 *any, @\"\".pres·2 bool)\n"
|
|
|
|
|
"func @\"\".mapaccess2_fast64 (@\"\".mapType·3 *byte, @\"\".hmap·4 map[any]any, @\"\".key·5 any) (@\"\".val·1 *any, @\"\".pres·2 bool)\n"
|
|
|
|
|
"func @\"\".mapaccess2_faststr (@\"\".mapType·3 *byte, @\"\".hmap·4 map[any]any, @\"\".key·5 any) (@\"\".val·1 *any, @\"\".pres·2 bool)\n"
|
2013-12-02 13:05:04 -08:00
|
|
|
"func @\"\".mapassign1 (@\"\".mapType·1 *byte, @\"\".hmap·2 map[any]any, @\"\".key·3 *any, @\"\".val·4 *any)\n"
|
2013-02-26 03:14:59 +08:00
|
|
|
"func @\"\".mapiterinit (@\"\".mapType·1 *byte, @\"\".hmap·2 map[any]any, @\"\".hiter·3 *any)\n"
|
2013-12-02 13:05:04 -08:00
|
|
|
"func @\"\".mapdelete (@\"\".mapType·1 *byte, @\"\".hmap·2 map[any]any, @\"\".key·3 *any)\n"
|
2013-02-26 03:14:59 +08:00
|
|
|
"func @\"\".mapiternext (@\"\".hiter·1 *any)\n"
|
|
|
|
|
"func @\"\".makechan (@\"\".chanType·2 *byte, @\"\".hint·3 int64) (@\"\".hchan·1 chan any)\n"
|
2014-01-17 14:48:45 -08:00
|
|
|
"func @\"\".chanrecv1 (@\"\".chanType·1 *byte, @\"\".hchan·2 <-chan any, @\"\".elem·3 *any)\n"
|
|
|
|
|
"func @\"\".chanrecv2 (@\"\".chanType·2 *byte, @\"\".hchan·3 <-chan any, @\"\".elem·4 *any) (? bool)\n"
|
|
|
|
|
"func @\"\".chansend1 (@\"\".chanType·1 *byte, @\"\".hchan·2 chan<- any, @\"\".elem·3 *any)\n"
|
2013-02-26 03:14:59 +08:00
|
|
|
"func @\"\".closechan (@\"\".hchan·1 any)\n"
|
2014-09-11 12:17:45 -04:00
|
|
|
"func @\"\".writebarrierptr (@\"\".dst·1 *any, @\"\".src·2 any)\n"
|
|
|
|
|
"func @\"\".writebarrierstring (@\"\".dst·1 *any, @\"\".src·2 any)\n"
|
|
|
|
|
"func @\"\".writebarrierslice (@\"\".dst·1 *any, @\"\".src·2 any)\n"
|
cmd/gc: add 2-, 3-, 4-word write barrier specializations
Assignments of 2-, 3-, and 4-word values were handled
by individual MOV instructions (and for scalars still are).
But if there are pointers involved, those assignments now
go through the write barrier routine. Before this CL, they
went to writebarrierfat, which calls memmove.
Memmove is too much overhead for these small
amounts of data.
Instead, call writebarrierfat{2,3,4}, which are specialized
for the specific amount of data being copied.
Today the write barrier does not care which words are
pointers, so size alone is enough to distinguish the cases.
If we keep these distinctions in Go 1.5 we will need to
expand them for all the pointer-vs-scalar possibilities,
so the current 3 functions will become 3+7+15 = 25,
still not a large burden (we deleted more morestack
functions than that when we dropped segmented stacks).
BenchmarkBinaryTree17 3250972583 3123910344 -3.91%
BenchmarkFannkuch11 3067605223 2964737839 -3.35%
BenchmarkFmtFprintfEmpty 101 96.0 -4.95%
BenchmarkFmtFprintfString 267 235 -11.99%
BenchmarkFmtFprintfInt 261 253 -3.07%
BenchmarkFmtFprintfIntInt 444 402 -9.46%
BenchmarkFmtFprintfPrefixedInt 374 346 -7.49%
BenchmarkFmtFprintfFloat 472 449 -4.87%
BenchmarkFmtManyArgs 1537 1476 -3.97%
BenchmarkGobDecode 13986528 12432985 -11.11%
BenchmarkGobEncode 13120323 12537420 -4.44%
BenchmarkGzip 451925758 437500578 -3.19%
BenchmarkGunzip 113267612 110053644 -2.84%
BenchmarkHTTPClientServer 103151 77100 -25.26%
BenchmarkJSONEncode 25002733 23435278 -6.27%
BenchmarkJSONDecode 94213717 82568789 -12.36%
BenchmarkMandelbrot200 4804246 4713070 -1.90%
BenchmarkGoParse 4646114 4379456 -5.74%
BenchmarkRegexpMatchEasy0_32 163 158 -3.07%
BenchmarkRegexpMatchEasy0_1K 433 391 -9.70%
BenchmarkRegexpMatchEasy1_32 154 138 -10.39%
BenchmarkRegexpMatchEasy1_1K 1481 1132 -23.57%
BenchmarkRegexpMatchMedium_32 282 270 -4.26%
BenchmarkRegexpMatchMedium_1K 92421 86149 -6.79%
BenchmarkRegexpMatchHard_32 5209 4718 -9.43%
BenchmarkRegexpMatchHard_1K 158141 147921 -6.46%
BenchmarkRevcomp 699818791 642222464 -8.23%
BenchmarkTemplate 132402383 108269713 -18.23%
BenchmarkTimeParse 509 478 -6.09%
BenchmarkTimeFormat 462 456 -1.30%
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/156200043
2014-10-14 16:31:09 -04:00
|
|
|
"func @\"\".writebarrieriface (@\"\".dst·1 *any, @\"\".src·2 any)\n"
|
2014-10-30 10:16:03 -04:00
|
|
|
"func @\"\".writebarrierfat01 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat10 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat11 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat001 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat010 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat011 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat100 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat101 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat110 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat111 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat0001 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat0010 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat0011 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat0100 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat0101 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat0110 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat0111 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat1000 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat1001 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat1010 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat1011 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat1100 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat1101 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat1110 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
|
|
|
|
"func @\"\".writebarrierfat1111 (@\"\".dst·1 *any, _ *byte, @\"\".src·3 any)\n"
|
2014-12-29 10:05:57 -05:00
|
|
|
"func @\"\".typedmemmove (@\"\".typ·1 *byte, @\"\".dst·2 *any, @\"\".src·3 *any)\n"
|
|
|
|
|
"func @\"\".typedslicecopy (@\"\".typ·2 *byte, @\"\".dst·3 any, @\"\".src·4 any) (? int)\n"
|
2014-01-17 14:48:45 -08:00
|
|
|
"func @\"\".selectnbsend (@\"\".chanType·2 *byte, @\"\".hchan·3 chan<- any, @\"\".elem·4 *any) (? bool)\n"
|
2013-02-26 03:14:59 +08:00
|
|
|
"func @\"\".selectnbrecv (@\"\".chanType·2 *byte, @\"\".elem·3 *any, @\"\".hchan·4 <-chan any) (? bool)\n"
|
|
|
|
|
"func @\"\".selectnbrecv2 (@\"\".chanType·2 *byte, @\"\".elem·3 *any, @\"\".received·4 *bool, @\"\".hchan·5 <-chan any) (? bool)\n"
|
2014-07-20 15:07:10 +04:00
|
|
|
"func @\"\".newselect (@\"\".sel·1 *byte, @\"\".selsize·2 int64, @\"\".size·3 int32)\n"
|
2013-02-26 03:14:59 +08:00
|
|
|
"func @\"\".selectsend (@\"\".sel·2 *byte, @\"\".hchan·3 chan<- any, @\"\".elem·4 *any) (@\"\".selected·1 bool)\n"
|
|
|
|
|
"func @\"\".selectrecv (@\"\".sel·2 *byte, @\"\".hchan·3 <-chan any, @\"\".elem·4 *any) (@\"\".selected·1 bool)\n"
|
|
|
|
|
"func @\"\".selectrecv2 (@\"\".sel·2 *byte, @\"\".hchan·3 <-chan any, @\"\".elem·4 *any, @\"\".received·5 *bool) (@\"\".selected·1 bool)\n"
|
|
|
|
|
"func @\"\".selectdefault (@\"\".sel·2 *byte) (@\"\".selected·1 bool)\n"
|
|
|
|
|
"func @\"\".selectgo (@\"\".sel·1 *byte)\n"
|
|
|
|
|
"func @\"\".block ()\n"
|
|
|
|
|
"func @\"\".makeslice (@\"\".typ·2 *byte, @\"\".nel·3 int64, @\"\".cap·4 int64) (@\"\".ary·1 []any)\n"
|
|
|
|
|
"func @\"\".growslice (@\"\".typ·2 *byte, @\"\".old·3 []any, @\"\".n·4 int64) (@\"\".ary·1 []any)\n"
|
2013-09-12 00:15:28 +02:00
|
|
|
"func @\"\".memmove (@\"\".to·1 *any, @\"\".frm·2 *any, @\"\".length·3 uintptr)\n"
|
2015-01-07 17:44:49 -08:00
|
|
|
"func @\"\".memclr (@\"\".ptr·1 *byte, @\"\".length·2 uintptr)\n"
|
cmd/gc: allow runtime to define a hex integer type for printing
As part of the translation of the runtime, we need to rewrite
C printf calls to Go print calls. Consider this C printf:
runtime·printf("[signal %x code=%p addr=%p pc=%p]\n",
g->sig, g->sigcode0, g->sigcode1, g->sigpc);
Today the only way to write that in Go is:
print("[signal ")
printhex(uint64(g->sig))
print(" code=")
printhex(uint64(g->sigcode0))
print(" addr=")
printhex(uint64(g->sigcode1))
print(" pc=")
printhex(uint64(g->sigpc))
print("]\n")
(That's nearly exactly what runtime code looked like in C before
I added runtime·printf.)
This CL recognizes the unexported type runtime.hex as an integer
that should be printed in hexadecimal instead of decimal.
It's a little kludgy, but it's restricted to package runtime.
Other packages can define type hex with no effect at all.
Now we can translate that original printf as the more compact:
print("[signal ", hex(g->sig), " code=", hex(g->sigcode0),
" addr=", hex(g->sigcode1), " pc=", hex(g->sigpc), "]\n")
LGTM=r, iant
R=r, iant
CC=golang-codereviews
https://golang.org/cl/133220043
2014-08-29 13:22:17 -04:00
|
|
|
"func @\"\".memequal (@\"\".x·2 *any, @\"\".y·3 *any, @\"\".size·4 uintptr) (? bool)\n"
|
2015-01-06 16:42:48 -08:00
|
|
|
"func @\"\".memequal8 (@\"\".x·2 *any, @\"\".y·3 *any) (? bool)\n"
|
|
|
|
|
"func @\"\".memequal16 (@\"\".x·2 *any, @\"\".y·3 *any) (? bool)\n"
|
|
|
|
|
"func @\"\".memequal32 (@\"\".x·2 *any, @\"\".y·3 *any) (? bool)\n"
|
|
|
|
|
"func @\"\".memequal64 (@\"\".x·2 *any, @\"\".y·3 *any) (? bool)\n"
|
|
|
|
|
"func @\"\".memequal128 (@\"\".x·2 *any, @\"\".y·3 *any) (? bool)\n"
|
2013-02-26 03:14:59 +08:00
|
|
|
"func @\"\".int64div (? int64, ? int64) (? int64)\n"
|
|
|
|
|
"func @\"\".uint64div (? uint64, ? uint64) (? uint64)\n"
|
|
|
|
|
"func @\"\".int64mod (? int64, ? int64) (? int64)\n"
|
|
|
|
|
"func @\"\".uint64mod (? uint64, ? uint64) (? uint64)\n"
|
|
|
|
|
"func @\"\".float64toint64 (? float64) (? int64)\n"
|
|
|
|
|
"func @\"\".float64touint64 (? float64) (? uint64)\n"
|
|
|
|
|
"func @\"\".int64tofloat64 (? int64) (? float64)\n"
|
|
|
|
|
"func @\"\".uint64tofloat64 (? uint64) (? float64)\n"
|
|
|
|
|
"func @\"\".complex128div (@\"\".num·2 complex128, @\"\".den·3 complex128) (@\"\".quo·1 complex128)\n"
|
|
|
|
|
"func @\"\".racefuncenter (? uintptr)\n"
|
|
|
|
|
"func @\"\".racefuncexit ()\n"
|
|
|
|
|
"func @\"\".raceread (? uintptr)\n"
|
|
|
|
|
"func @\"\".racewrite (? uintptr)\n"
|
2013-06-14 11:14:45 +02:00
|
|
|
"func @\"\".racereadrange (@\"\".addr·1 uintptr, @\"\".size·2 uintptr)\n"
|
|
|
|
|
"func @\"\".racewriterange (@\"\".addr·1 uintptr, @\"\".size·2 uintptr)\n"
|
2008-10-03 16:15:55 -07:00
|
|
|
"\n"
|
|
|
|
|
"$$\n";
|
2008-12-17 10:14:29 -08:00
|
|
|
char *unsafeimport =
|
2008-12-08 19:46:39 -08:00
|
|
|
"package unsafe\n"
|
2011-05-11 16:35:11 +02:00
|
|
|
"import runtime \"runtime\"\n"
|
2011-10-08 19:37:06 +02:00
|
|
|
"type @\"\".Pointer uintptr\n"
|
2013-02-26 03:14:59 +08:00
|
|
|
"func @\"\".Offsetof (? any) (? uintptr)\n"
|
|
|
|
|
"func @\"\".Sizeof (? any) (? uintptr)\n"
|
|
|
|
|
"func @\"\".Alignof (? any) (? uintptr)\n"
|
2008-12-08 19:46:39 -08:00
|
|
|
"\n"
|
|
|
|
|
"$$\n";
|