egcs-1.0.1 ColdFire (m5200) bug?
Parag Patel
parag@cgt.com
Tue Jan 20 15:36:00 GMT 1998
Hello. I'm not subscribed to this list (but am signed up for the
egcs-announce list) but thought I should report this problem.
I was trying out the latest egcs-1.0.1 release with the uC/OS real-time
OS for a Motorola Coldfire (68k-lite) SBC5206 evaluation board.
It seems to generate the right stuff most of the time, but this code
snippet selects a 68k move.b instruction combo that is illegal on the
Coldfire and rejected by gas. Naturally, the compile fails. The
instruction appears to be "move.b %d?,%a?" or some combination thereof
involving a move.b and a register for a local stack variable.
I can remove most any line from the function or from the struct and the
compile will succeed. Leaving the code as it is below, and the compile
fails. Changing the local var "i" below from a UBYTE to a UWORD or an
int makes it work, so there is a workaround.
-- Parag Patel <parag@cgt.com>
typedef unsigned char BOOLEAN;
typedef unsigned char UBYTE;
typedef unsigned int UWORD;
extern UBYTE OSLockNesting;
extern BOOLEAN OSRunning;
typedef struct os_tcb {
void *OSTCBStkPtr;
UBYTE OSTCBStat;
UBYTE OSTCBPrio;
UWORD OSTCBDly;
struct os_tcb *OSTCBNext;
struct os_tcb *OSTCBPrev;
} OS_TCB;
extern OS_TCB OSTCBTbl[];
extern OS_TCB *OSTCBPrioTbl[];
void OSInit(void *idle_task_stk, UBYTE maxtasks)
{
UBYTE i;
OSLockNesting = 0;
OSRunning = 0;
for (i = 0; i < 64; i++) {
OSTCBPrioTbl[i] = (OS_TCB *)0;
}
OSTCBTbl[maxtasks-1].OSTCBNext = (OS_TCB *)0;
}
More information about the Gcc-bugs
mailing list