Port-m68k archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: MVME177 panic: pmap_enter_ptpage (PR #45915 on 6.x)
martin@ wrote:
> This might be a bit overengeneered, but you could create arg-count specific
> macros and create the functions with cpp:
>
> #define DEFCALL_A2(CALLNO) \
> static inline int CALL_##CALLNO(void *arg0, void *arg1) \
> { \
> int ret; \
> __asm volatile ("movel %0, %%sp@-; movel %0,%%sp@-;" \
> "trap #15; .short " #CALLNO ";" \
> "movew %%sr,%0" \
> : "=d" (ret) \
> : "r" (arg0), "r" (arg1) \
> :); \
> return ret; \
> }
Well, this seems a bit scaring for readers
and hard to recognize API of MVMEPROMs...
And I'm not sure if all MVMPROM functions that require two args
take pointers or not.
I'd like to change MVME_ARG2() macro to take two args and
keep changes in outstr.c (and outln.c) minimum (for pullups):
---
#define MVMEPROM_ARG2(arg1, arg2) \
__asm volatile ("movel %0,%%d0"; \
"movel %1,%%d1"; \
"movel %%d0,%%sp@-"; \
"movel %%d1,%%sp@-" \
:: "r" (arg0), "r" (arg1) \
: "%d0", "%d1"
---
or
---
#define MVMEPROM_ARG2(arg1, arg2) \
__asm volatile ("movel %0,%%sp@(-4)"; \
"movel %1,%%sp@(-8)"; \
"subql #8,%%sp" \
:: "r" (arg0), "r" (arg1)
---
or so (though untested).
Any other suggestions?
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index