#787 closed defect (fixed)

M68k _VBR declared incorrectly

Reported by: Chris Johns Owned by: Joel Sherrill
Priority: highest Milestone: 2
Component: score Version: 4.7
Severity: critical Keywords:
Cc: bugs@… Blocked By:
Blocking:

Description

I am seeing a problem with the _VBR decl on the Coldfire with 4.7 and gcc 4.1.0. I have traced the problem to this change:

2005-05-03 Joel Sherrill <joel@…>

  • rtems/score/cpu.h: Change definition of _VBR to a simple pointer.
  • rtems/score/m68k.h: Remove use of _Coldfire_VBR.

The 4.6 with gcc 3.3.1 I get:

0012445c <_CPU_ISR_install_raw_handler>:
_CPU_ISR_install_raw_handler():

12445c: 4e56 0000 linkw %fp,#0
124460: 41ee 0008 lea %fp@(8),%a0
124464: 2010 movel %a0@,%d0
124466: 222e 000c movel %fp@(12),%d1
12446a: 2268 0008 moveal %a0@(8),%a1
12446e: 41f9 0000 0000 lea 0 <_VBR>,%a0

correct

124474: 22b0 0c00 movel %a0@(00000000,%d0:l:4),%a1@
124478: 2181 0c00 movel %d1,%a0@(00000000,%d0:l:4)
12447c: 4e5e unlk %fp
12447e: 4e75 rts

and with 4.7 and gcc 4.1.0 I get:

00150814 <_CPU_ISR_install_raw_handler>:
_CPU_ISR_install_raw_handler():

150814: 4e56 0000 linkw %fp,#0
150818: 206e 0008 moveal %fp@(8),%a0
15081c: 2279 0000 0000 moveal 0 <_VBR>,%a1

wrong

150822: 41f1 8c00 lea %a1@(00000000,%a0:l:4),%a0
150826: 226e 0010 moveal %fp@(16),%a1
15082a: 2290 movel %a0@,%a1@
15082c: 20ae 000c movel %fp@(12),%a0@
150830: 4e5e unlk %fp
150832: 4e75 rts

Reverting the change I get:

001507d4 <_CPU_ISR_install_raw_handler>:
_CPU_ISR_install_raw_handler():

1507d4: 4e56 0000 linkw %fp,#0
1507d8: 202e 0008 movel %fp@(8),%d0
1507dc: e588 lsll #2,%d0
1507de: 2240 moveal %d0,%a1
1507e0: d3fc 0000 0000 addal #0,%a1

correct

1507e6: 206e 0010 moveal %fp@(16),%a0
1507ea: 2091 movel %a1@,%a0@
1507ec: 22ae 000c movel %fp@(12),%a1@
1507f0: 4e5e unlk %fp
1507f2: 4e75 rts

which looks better and lets my applications run.

Release:
4.7 CVS

Environment:
Coldfire (5272).

How-To-Repeat:
Catch an interrupt.

Change History (1)

comment:1 Changed on 05/20/05 at 18:28:36 by Joel Sherrill

Status: assignedclosed

State-Changed-From-To: open->closed
State-Changed-Why: Suggested fix applied.

Note: See TracTickets for help on using tickets.