On Fri, 21 Nov 2008, Bernd Roesch wrote:
> >> OS4 MUI seem always put args on stack, so here is code optimal.
> >
> > Mmmh... put args on the stack where? In hooks arguments are not passed in
> > the stack but in registers. Please take a look into SystemV ABI.
>
> I see here that OS4 use no register to variable code and no hook entry func
> as MOS and 68k need.
No. OS4 is using SystemV ABI for CallPktHook(). That is, all parameters
are passed as SystemV ABI defines it: in registers r3, r4 and r5.
In MorphOS it is the same if you are using HookEnty which translates M68k
ABI call into SystemV ABI call.
If you have MorphOS SDK please take a look into
Documentation/Articles/Porting/PowerOpenAPI.txt and
Documentation/Articles/Porting/MorphOS.txt
They cover everything you ever needed to know about PowerPC (and MorphOS).
> #else /* !__MORPHOS__ */
> #define MakeHook(hookname, funcname) struct Hook hookname = {{NULL, NULL},
> \
> (HOOKFUNC)funcname, NULL, NULL}
>
> So my guess DoMethod DoSupermethod put too vars on stack on OS4.
It does not except method/attribute list which is of course constructed in
ram.
> But this is for 68k not possible, because DoMethod is inline and no OS
> Function that can change later, and there are lots of classes here without
> source and of course MUI cant rebuild to use new DoMethod funcs, to
> replace.
Why should you replace DoMethod() in existing applications? It works. What
does not work right is inlining DoMethod() call in new code. But you can
use DoMethod() and DoMethodA() from amiga.lib instead. It could be even
faster than inlining DoMethodA() in your code.
> >> Please take a look at this code and let me know what you think about it.
> >
> > This
> >
> > #elif __mc68000__
> >
> > does not look good. Is there better?
>
> I dont know better maybe you ?
> This define is always set on 68k compiler and SDI( and gcc(see file
> gcc/longlong.h) i see use it to detect big or little endian.
I dont think it works with VBCC.
#elif __mc68000__ || __M68K__
could work better.
> and here in SDL Code
I dont think SDL knows anything about VBCC. Or any other Amiga compiler
like SAS/C.
> here is code of GCC extendet define for target amigaos.I dont know if MOS or
> OS4 use such defines.I can also add a new define to detect AOS68k better if
> somebody like.
>
> builtin_define_std ("amiga"); \
> builtin_define_std ("amigaos"); \
> builtin_define_std ("AMIGA"); \
> builtin_define_std ("MCH_AMIGA"); \
MorphOS GCC defines AMIGA and MORPHOS. Out of interest what is MCH_AMIGA?
Ilkka
--
http://www.morphos-team.net
------------------------------------
Visit http://www.amiga.dk/tumult for MUI-related
information, especially about MUI custom classes.Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MUI/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/MUI/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/