Test initialisation of MUIA_List_AdjustWidth and MUIA_List_AdjustHeight, and
[AROS.git] / arch / .unmaintained / m68k-pp-native / loader / callback.h
blobbf0ead459acab8266d6b0ee2067b73f14e16eb13
1 #ifndef __CALLBACK_H__
2 #define __CALLBACK_H__
4 /* This is a workaround for a bug in the current version of gcc:
6 gcc assumes that no one will touch %a4 after it is set up in crt0.o.
7 This isn't true if a function is called as a callback by something
8 that wasn't compiled by gcc (like FrmCloseAllForms()). It may also
9 not be true if it is used as a callback by something in a different
10 shared library.
12 We really want a function attribute "callback" which will insert this
13 progloue and epilogoue automatically.
15 - Ian */
17 register void *reg_a4 asm("%a4");
19 #define CALLBACK_PROLOGUE \
20 void *save_a4 = reg_a4; asm("move.l %%a5,%%a4; sub.l #edata,%%a4" : :);
22 #define CALLBACK_EPILOGUE reg_a4 = save_a4;
24 #endif