diff options
author | Russ Cox <rsc@golang.org> | 2009-08-24 16:15:21 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-08-24 16:15:21 -0700 |
commit | f4dc57372297bb1301f744e390a578540448240f (patch) | |
tree | a65fa19b965ad5b4c2a0bacc21bb06f03a8bdd95 /src/cmd/cc/lexbody | |
parent | 52b2c5d91b902d0a90d489b3759eb4edaead3709 (diff) | |
download | go-f4dc57372297bb1301f744e390a578540448240f.tar.gz |
first attempt at real FFI support.
in a .6 file, an export line
//ffi T localfib remotefib remote.so
means the dynamic linker should initialize
localfib, always a pointer, to the address of
remotefib, either text (T) or data (D) after
loading remote.so.
the C compiler will generate an export section
when given the pragmas
#pragma package fib
#pragma ffi T localfib remotefib remote.so
needing #pragma package is a bit of a kludge
and hopefully could go away later.
this is just the 6 tool chain support.
other architectures will happen once 6 settles down.
code using this to do FFI is in a later CL.
R=r
DELTA=161 (141 added, 14 deleted, 6 changed)
OCL=33783
CL=33795
Diffstat (limited to 'src/cmd/cc/lexbody')
-rw-r--r-- | src/cmd/cc/lexbody | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cmd/cc/lexbody b/src/cmd/cc/lexbody index 33734c722..1c979a0f1 100644 --- a/src/cmd/cc/lexbody +++ b/src/cmd/cc/lexbody @@ -47,6 +47,20 @@ pragvararg(void) } void +pragffi(void) +{ + while(getnsc() != '\n') + ; +} + +void +pragpackage(void) +{ + while(getnsc() != '\n') + ; +} + +void pragfpround(void) { while(getnsc() != '\n') |