This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]