<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">btw... quick question:&nbsp;ReentrantFFIPlugin will obsolete I32ABI?&nbsp;<div><br></div><div>Cheers,</div><div>Esteban<br><div><br><div><div>El 27/12/2010, a las 4:46p.m., Eliot Miranda escribió:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Igor,<div><br></div><div>&nbsp;&nbsp; &nbsp;that's all legacy. &nbsp;The Cog sources require only ReentrantFFIPlugin (at least on x86). &nbsp;As far as other processors I've written ReentrantFFIPlugin to allow straight-forward porting to other platforms. &nbsp;I can consult if anyone is motivated to try and port to PowerPC, ARM etc. &nbsp;The essential idea is to use C's alloca to allocate the space for the outgoing arguments on the stack and hence do all the marshalling in C. &nbsp;Passing register arguments is done by explicitly passing the register args, leavign the rest to be passed on teh stack throguh the alloca'ed space.</div>
<div><br></div><div>In short, all that assembler support code is obsolete.<br><br></div><div>best</div><div>Eliot</div><div><br><div class="gmail_quote">On Mon, Dec 27, 2010 at 7:20 AM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Hi,<br>
I am trying to figure out, how to build FFI plugin on macs for cog vm.<br>
<br>
the platforms/Mac\ OS/plugins/SqueakFFIPrims contains following files:<br>
<br>
<br>
Info-SqueakFFIPlugin__Upgraded_.plist<br>
SqueakFFI.xcodeproj.zip<br>
SqueakFFIPrims.proj.xml<br>
ppc-darwin-Carbon-UI.c<br>
ppc-darwin-asm-MacIntel.S<br>
ppc-global.h<br>
resources<br>
sqMacFFI.s<br>
sqMacFFIPPC.c<br>
sqMacIntel-Win32.c<br>
x86-sysv-MacIntel.c<br>
x86-sysv-asm-MacIntel.S<br>
<br>
<br>
something tells me that i don't need to compile ppc* files, because<br>
Cog doesn't works on that arch anyways..<br>
so, i tried to use<br>
sqMacIntel-Win32.c<br>
<br>
and failed.. then tried to use<br>
<br>
x86-sysv-MacIntel.c<br>
<br>
and it fails to compile with same error(s):<br>
<br>
/platforms/Mac OS/plugins/SqueakFFIPrims/x86-sysv-MacIntel.c:127:<br>
error: ‘FFICallTypeCDecl’ undeclared (first use in this function)<br>
/platforms/Mac OS/plugins/SqueakFFIPrims/x86-sysv-MacIntel.c:128:<br>
error: ‘FFICallTypeApi’ undeclared (first use in this function)<br>
<br>
These constants are defined only in FFIConstants shared pool.. and<br>
somehow they should be made available to<br>
these .c files..<br>
But our beloved VMMaker's code generator don't generating headers<br>
which can be included by other .c files,<br>
and all class var constants are just printed inside a body of<br>
generated .c file , like SqueakFFIPrims.c<br>
which means that these constants should be defined externally manually<br>
somewhere.<br>
<br>
So, it seems like &nbsp;FFI is broken for Mac+Cog.<br>
<br>
P.S. Eliot's default .xcodeproj for FFI plugin are not builds because<br>
its not including one of the files above, which making a build<br>
complete (otherwise you got undefined symbols).<br>
<br>
Please shed a light, if FFI for Mac + Cog were in working state at<br>
some day? Or i doing something completely wrong?<br>
<br>
Of course i can disable it from build and forget about it, since we<br>
have new stuff coming (of course if Santa decide that we were good<br>
boys),<br>
but still..<br>
<font color="#888888"><br>
--<br>
Best regards,<br>
Igor Stasenko AKA sig.<br>
</font></blockquote></div><br></div>
</blockquote></div><br></div></div></body></html>