This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] m32r-*-as bad instruction 'seth r0, #shigh(0xffff8000)'
- From: Kazuhiro Inaoka <inaoka dot kazuhiro at renesas dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: "binutils at sources dot redhat dot com" <binutils at sources dot redhat dot com>, "cgen at sources dot redhat dot com" <cgen at sources dot redhat dot com>
- Date: Mon, 29 Mar 2004 17:47:13 +0900
- Subject: [PATCH] m32r-*-as bad instruction 'seth r0, #shigh(0xffff8000)'
Hello,
This is a patch to fix the following bug.
Command line:
m32r-linux-as -o tt.o tt.s
or
m32r-elf-as -o tt.o tt.s
pattern is:
.section .text
seth r0, #shigh(0xffff8000)
.end
Error log is:
tt.s: Assembler messages:
tt.s:2: Error: bad instruction 'seth r0,#shigh(0xffff8000)'
Please commit it and regenerate opcodes/m32r-asm.c.
Regards,
Kazuhiro Inaoka
ChangeLog:
2004-03-29 Kazuhiro Inaoka < inaoka dot kazuhiro at renesas dot com >
* cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
Index: m32r.opc
===================================================================
RCS file: /cvs/src/src/cpu/m32r.opc,v
retrieving revision 1.2
diff -c -r1.2 m32r.opc
*** m32r.opc 23 Feb 2004 16:46:46 -0000 1.2
--- m32r.opc 29 Mar 2004 08:09:53 -0000
***************
*** 153,159 ****
++*strp;
if (errmsg == NULL
&& result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
! value = (value >> 16) + (value & 0x8000 ? 1 : 0);
*valuep = value;
return errmsg;
}
--- 153,162 ----
++*strp;
if (errmsg == NULL
&& result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
! {
! value = value + (value & 0x8000 ? 0x10000 : 0);
! value >>= 16;
! }
*valuep = value;
return errmsg;
}