This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
SH assembler would crash on `mov.w r0, @(#, gbr)'
- To: binutils at sources dot redhat dot com
- Subject: SH assembler would crash on `mov.w r0, @(#, gbr)'
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 01 Nov 2000 14:58:25 -0200
- Organization: GCC Team, Red Hat
It would crash in resolve_symbol_value() (!!!), with `Case value 35
unexpected'. Here's a patch that fixes this bug. Ok to install?
Index: opcodes/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* sh-opc.h: The operand of `mov.w r0, (<disp>,GBR)' is IMM1, not 0.
Index: opcodes/sh-opc.h
===================================================================
RCS file: /cvs/src/src/opcodes/sh-opc.h,v
retrieving revision 1.7
diff -u -p -r1.7 sh-opc.h
--- opcodes/sh-opc.h 2000/04/05 21:43:26 1.7
+++ opcodes/sh-opc.h 2000/10/31 07:59:14
@@ -400,7 +400,7 @@ sh_opcode_info sh_table[] = {
/* 10000001mmmmi4*2 mov.w R0,@(<disp>,<REG_M>)*/{"mov.w",{A_R0,A_DISP_REG_M},{HEX_8,HEX_1,REG_M,IMM1_4BY2}, arch_sh1_up},
-/* 11000001i8*2.... mov.w R0,@(<disp>,GBR)*/{"mov.w",{A_R0,A_DISP_GBR},{HEX_C,HEX_1,IMM0_8BY2}, arch_sh1_up},
+/* 11000001i8*2.... mov.w R0,@(<disp>,GBR)*/{"mov.w",{A_R0,A_DISP_GBR},{HEX_C,HEX_1,IMM1_8BY2}, arch_sh1_up},
/* 11000111i8p4.... mova @(<disp>,PC),R0*/{"mova",{A_DISP_PC,A_R0},{HEX_C,HEX_7,PCRELIMM_8BY4}, arch_sh1_up},
/* 0000nnnn11000011 movca.l R0,@<REG_N> */{"movca.l",{A_R0,A_IND_N},{HEX_0,REG_N,HEX_C,HEX_3}, arch_sh4_up},
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me