summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/float_go.cgo
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-06-30 20:01:41 -0700
committerRuss Cox <rsc@golang.org>2009-06-30 20:01:41 -0700
commitaf736458bb44f892c35adf0533161fda7e452ae3 (patch)
treec7cbc676c8a071162daeb4524e9b14a2345c3b33 /src/pkg/runtime/float_go.cgo
parent8d2eb65d5f613f22e78f20e0ac0f2d7fa4528910 (diff)
downloadgolang-af736458bb44f892c35adf0533161fda7e452ae3.tar.gz
in preparation for changing 6g's behavior to
align the output args separately from the input args, change cgo2c to insert the necessary padding when the two arg lists are concatenated in the c translation. for example, there is a runtime func indexstring(s string, i int32) (b byte) right now in 6g those arguments are aligned in one struct with s at offset 0, i at 16, and b at 20. soon the b byte will be in its own struct and structs are 8 aligned, so it will be b at 24. right now cgo2c generates: void indexstring(string s, int32 i, byte b) this CL makes it generate, in --6g mode: void indexstring(string s, int32 i, uint32, byte b) this is valid 6c input, although not valid gcc input. (the code is being generated for 6c only anyway.) also, allow C code to be mixed in among the Go funcs. every instance of the token `func' is expected to start a new go func. R=iant DELTA=145 (118 added, 0 deleted, 27 changed) OCL=30949 CL=30963
Diffstat (limited to 'src/pkg/runtime/float_go.cgo')
0 files changed, 0 insertions, 0 deletions