Objdump bug for plain H8/300 target

Anil Paranjape AnilP1@KPITCummins.com
Tue Apr 6 06:08:00 GMT 2004


Hi,

I found a bug in objdump utility for plain H8/300 target.
I have used binutils snapshot dated 25 March 2004.

Following is test case,
*******************************************
int main
{	
	int a;
	a -= 2;
}
*******************************************

Build commands used are,
h8300-elf-gcc -nostartfiles test.c
h8300-elf-objdump -d --no-show-raw-insn a.out > a.dmp

Object dump file 
**************************************************************************************
a.out:     file format elf32-h8300
Disassembly of section .text:

00000100 <_main>:
 100:   6d f6             mov.w r6,@-r7
 102:   0d 76             mov.w r7,r6
 104:   1b 87             subs  #2,er7
 106:   6f 62 ff fe       mov.w @(0xfffe:16,r6),r2
 10a:   1b 82             subs  #2,er2
 10c:   6f e2 ff fe       mov.w r2,@(0xfffe:16,r6)
 110:   0d 20             mov.w r2,r0
 112:   0b 87             adds  #2,er7
 114:   6d 76             mov.w @r7+,r6
 116:   54 70             rts
**************************************************************************************

Register "er7" and "er2" are invalid registers in case of plain H8/300. 
This bug is observed only when instructions "adds" or "subs" are used.
It should be "r7" instead of "er7" and "r2" instead of "er2".

Regards,
Anil Paranjpe





More information about the Binutils mailing list