public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] m32r-*-as bad instruction 'seth r0, #shigh(0xffff8000)'
@ 2004-03-29  8:48 Kazuhiro Inaoka
  2004-03-30  9:29 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: Kazuhiro Inaoka @ 2004-03-29  8:48 UTC (permalink / raw)
  To: Nick Clifton; +Cc: binutils, cgen

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]

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.



[-- Attachment #2: m32r.opc.patch --]
[-- Type: text/plain, Size: 780 bytes --]

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;
      }

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] m32r-*-as bad instruction 'seth r0, #shigh(0xffff8000)'
  2004-03-29  8:48 [PATCH] m32r-*-as bad instruction 'seth r0, #shigh(0xffff8000)' Kazuhiro Inaoka
@ 2004-03-30  9:29 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2004-03-30  9:29 UTC (permalink / raw)
  To: Kazuhiro Inaoka; +Cc: binutils, cgen

Hi Kazuhiro,

> 2004-03-29  Kazuhiro Inaoka < inaoka dot kazuhiro at renesas dot com >
>
> 	* cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.

Approved and applied.

Note - if you have the time, it would be a good idea if you could
generate a patch to add the test case for this bug to the m32r
specific part of the GAS testsuite.

Cheers
        Nick
        

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-03-30  9:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-29  8:48 [PATCH] m32r-*-as bad instruction 'seth r0, #shigh(0xffff8000)' Kazuhiro Inaoka
2004-03-30  9:29 ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).