Hi,
[email protected] sent me the following bug report today:
========================================================
Hi Andreas,
I'm not sure what to do next about this one?? I'm sending it to you as it
occurred using MSPGCC windows installer 2002-09-22 (8.88MB). Is this a
fundamental GCC issue?
Sincerely,
Robert Rath
This is the error message from the compiler
src/user.c: In function `UI_SaveStoredData':
src/user.c:780: unrecognizable insn:
(insn 304 220 41 (set (cc0)
(compare:QI (reg/v:QI 14 r14 [24])
(const_int 128 [0x80]))) -1 (nil)
(nil))
src/user.c:780: Internal compiler error in insn_default_length, at
insn-attrtab.c:671
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
This is the offending code ( pre-processed )
static unsigned char UI_SaveStoredData(void)
{
UBYTE *DataPtr = (UBYTE*)0x01000;
UBYTE i;
UBYTE Value;
UBYTE outcome = 1;
;
if (USER_DisplayMode == 0)
{
Value = UI_PreviousMode;
}
else
{
Value = USER_DisplayMode;
}
i = 4;
while ( ( DataPtr[i] != 255) && (i < 128 ))
{
i += 4;
}
if (i < (128 - 4))
{
i += 4;
{ __asm__ __volatile__("dint"::); FCTL3 = 0x0A500 + 0x00;
while ( FCTL3 & 0x01 ); FCTL1 = 0x0A500 + 0x40; *&DataPtr[i+0] = Value;
while ( FCTL3 & 0x01 ); FCTL1 = 0x0A500; FCTL3 = 0x0A500 + 0x10; __asm__
__volatile__("eint"::); };
{ __asm__ __volatile__("dint"::); FCTL3 = 0x0A500 + 0x00;
while ( FCTL3 & 0x01 ); FCTL1 = 0x0A500 + 0x40; *&DataPtr[i+1] =
USER_SetpointHeat; while ( FCTL3 & 0x01 ); FCTL1 = 0x0A500; FCTL3 = 0x0A500
+ 0x10; __asm__ __volatile__("eint"::); };
{ __asm__ __volatile__("dint"::); FCTL3 = 0x0A500 + 0x00;
while ( FCTL3 & 0x01 ); FCTL1 = 0x0A500 + 0x40; *&DataPtr[i+2] =
USER_SetpointCool; while ( FCTL3 & 0x01 ); FCTL1 = 0x0A500; FCTL3 = 0x0A500
+ 0x10; __asm__ __volatile__("eint"::); };
outcome = 0;
}
return(outcome);
}
This code has the test in the while loop changed from 128 to 127 and the
code builds ok.
static unsigned char UI_SaveStoredData(void)
{
UBYTE *DataPtr = (UBYTE*)0x01000;
UBYTE i;
UBYTE Value;
UBYTE outcome = 1;
;
if (USER_DisplayMode == 0)
{
Value = UI_PreviousMode;
}
else
{
Value = USER_DisplayMode;
}
i = 4;
while ( ( DataPtr[i] != 255) && (i < (128 -1) ))
{
i += 4;
}
if (i < (128 - 4))
{
i += 4;
{ __asm__ __volatile__("dint"::); FCTL3 = 0x0A500 + 0x00;
while ( FCTL3 & 0x01 ); FCTL1 = 0x0A500 + 0x40; *&DataPtr[i+0] = Value;
while ( FCTL3 & 0x01 ); FCTL1 = 0x0A500; FCTL3 = 0x0A500 + 0x10; __asm__
__volatile__("eint"::); };
{ __asm__ __volatile__("dint"::); FCTL3 = 0x0A500 + 0x00;
while ( FCTL3 & 0x01 ); FCTL1 = 0x0A500 + 0x40; *&DataPtr[i+1] =
USER_SetpointHeat; while ( FCTL3 & 0x01 ); FCTL1 = 0x0A500; FCTL3 = 0x0A500
+ 0x10; __asm__ __volatile__("eint"::); };
{ __asm__ __volatile__("dint"::); FCTL3 = 0x0A500 + 0x00;
while ( FCTL3 & 0x01 ); FCTL1 = 0x0A500 + 0x40; *&DataPtr[i+2] =
USER_SetpointCool; while ( FCTL3 & 0x01 ); FCTL1 = 0x0A500; FCTL3 = 0x0A500
+ 0x10; __asm__ __volatile__("eint"::); };
outcome = 0;
}
return(outcome);
}