ASM help needed... (on x86/windows/gcc)
Lloyd Dupont
lloyd@nova-mind.com
Fri May 20 00:12:00 GMT 2005
I want to do a binding to ObjectiveC
Basically I need to implement a function like
retval_t objc_msg_send(id obj, SEL sel, ...);
which would forward its call (same arguments, including the unidentified ...
(va_list)) to an other function know by pointer which would be looked up
from the 1st 2 parameters. the return value should be forwarded too!!
I was thinking to something as below (a simple jump!), but I'm not sure:
1. it will work (maye the puch/pop will overwrite fct?! my ASM is ten years
old...)
2. of the syntax
pseudo code to be corrected (for x86/windows/gcc):
return_t objc_msg_send(id obj, SEL sel, ...)
{
asm pushall;
void (*)() fct = lookup(obj, sel);
asm popall;
asm longjmp fct;
}
Note to those knowing a bit of ObjC:
No, this function is absolutely not implemented on GNUstep, although it
could be found on NeXT and MacOSX, tss....
More information about the Gcc
mailing list