This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
ASM help needed... (on x86/windows/gcc)
- From: "Lloyd Dupont" <lloyd at nova-mind dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Fri, 20 May 2005 09:08:44 +1000
- Subject: ASM help needed... (on x86/windows/gcc)
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....