[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Coldfire code
Am 24.08.2015, 17:40 Uhr, schrieb Thorsten Otto:
Unfortunately, as Andreas stated, no.
Then it might make sense (at least for not so time-critical routines) to
just use the coldfire instructions also for m68k. Unless insructions are
used that only exist on coldfire, the code should work on both
processors. That would safe a lot of those ifdefs.
I wouldn't want sub-optimal code that also needs more space just because
people have trouble with preprocessor-directives. MiNT should still run on
a 4MB ST (what it it does - somehow).
To satisfy the #ifdef-dislikers I'd rather suggest to define macros for
all the problematic instructions like:
#ifdef __mcoldfire_
#define DBRA(d,t) \
subq.l #1,d \
bpl.s t
#else
#define DBRA(d,t) dbra.w d,t
#endif
and then write
DBRA(d7,loop)
in the actual code for example.
-Helmut