Share

GNU Dev Tools for the Hitachi H8/300[HS]

Tracker: Bugs

5 incorrect omit frame pointer - ID: 893595
Last Update: Tracker Item Submitted ( kimstik )

file bug.c:

extern int buff[];
void bug(void) __attribute__ ((interrupt_handler));
void bug(void) {
volatile int cnt=0;
buff[cnt]++;
}

>h8300-hms-gcc.exe -O2 -ms -S -fomit-frame-pointer bug.c

generated this code:

subs #4,er7
stm.l er2-er3,@-er7
sub.w r2,r2
mov.w r2,@(2,er7) ; <<-- er3 corrupts !!
mov.w @(2,er7),r2
exts.l er2
add.l er2,er2
add.l #_buff,er2
mov.w @er2,r3
adds #1,er3
mov.w r3,@er2
ldm.l @er7+,er2-er3
adds #4,er7
rte

>h8300-hms-gcc.exe -v
Reading specs from d:\gcc\bin\..\lib\gcc-lib\h8300-hms\3.3.1\specs
Configured with: ../gcc-3.3.1/configure --target=h8300-hms
--host=i586-mingw32 -
-build=i686-pc-linux-gnu --enable-languages=c,c++ --with-newlib
Thread model: single
gcc version 3.3.1


Konstantin ( kimstik ) - 2004-02-09 18:28

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.