[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[m32r-elf] Error: bad instruction when using shigh and low macroswith ab
From: |
Kazuhiro Inaoka |
Subject: |
[m32r-elf] Error: bad instruction when using shigh and low macroswith absolute immediate. |
Date: |
Tue, 24 Jun 2003 12:13:19 +0900 |
Hello
binutils-2.13.1 Released.
I get following Error when using shigh and low macros
with absolute immediate.
Kazuhiro Inaoka
m32r-elf-as -o test.o test.s
test.s: Assembler messages:
test.s:11: Error: bad instruction `seth r0,#shigh(SYM0)'
test.s:14: Error: bad instruction `seth r0,#shigh(SYM0)'
test.s:15: Error: bad instruction `add3 r0,r0,#low(SYM0)'
test.s:17: Error: bad instruction `seth r0,#shigh(SYM0)'
test.s:18: Error: bad instruction `ld r0,@(low(SYM0),r0)'
test.s:25: Error: bad instruction `add3 r0,r0,#low(SYM0)'
test.s:28: Error: bad instruction `ld r0,@(low(SYM0),r0)'
test.s:36: Error: bad instruction `add3 r0,r0,#low(SYM1)'
test.s:39: Error: bad instruction `ld r0,@(low(SYM1),r0)'
test.s:56: Error: bad instruction `add3 r0,r0,#low(SYM1)'
test.s:59: Error: bad instruction `ld r0,@(low(SYM1),r0)'
+++++++++ Test case +++++++++
.equ SYM0,0xFFFF8000
.equ SYM1,0x10008000
.equ SYM2,0x10007FFF
; (Bug case 1) shigh() 0xFFFF0000 will be added 0x10000 => 0x100000000
; (Bug case 2) shigh(),low() 0x8000 will be used signed 16bit => 0xFFFF8000
.section .text
; shigh(),low() with minus value symbol
shigh_low_minus:
seth r0,#shigh(SYM0) ; (Bug case 1)
or3 r0,r0,#low(SYM0) ; But it's not normal use.
seth r0,#shigh(SYM0) ; (Bug case 1)
add3 r0,r0,#low(SYM0) ; (Bug case 2)
seth r0,#shigh(SYM0) ; (Bug case 1)
ld r0,@(low(SYM0),r0) ; (Bug case 2)
high_low_minus:
seth r0,#high(SYM0)
or3 r0,r0,#low(SYM0) ; But it's not normal use.
seth r0,#high(SYM0) ; But it's not normal use.
add3 r0,r0,#low(SYM0) ; (Bug case 2)
seth r0,#high(SYM0) ; But it's not normal use.
ld r0,@(low(SYM0),r0) ; (Bug case 2)
; shigh(),low()
shigh_low:
seth r0,#shigh(SYM1)
or3 r0,r0,#low(SYM1) ; But it's not normal use.
seth r0,#shigh(SYM1)
add3 r0,r0,#low(SYM1) ; (Bug case 2)
seth r0,#shigh(SYM1)
ld r0,@(low(SYM1),r0) ; (Bug case 2)
seth r0,#shigh(SYM2)
or3 r0,r0,#low(SYM2) ; But it's not normal use.
seth r0,#shigh(SYM2)
add3 r0,r0,#low(SYM2)
seth r0,#shigh(SYM2)
ld r0,@(low(SYM2),r0)
; high(),low()
high_low:
seth r0,#high(SYM1)
or3 r0,r0,#low(SYM1)
seth r0,#high(SYM1) ; But it's not normal use.
add3 r0,r0,#low(SYM1) ; (Bug case 2)
seth r0,#high(SYM1) ; But it's not normal use.
ld r0,@(low(SYM1),r0) ; (Bug case 2)
seth r0,#high(SYM2)
or3 r0,r0,#low(SYM2) ;
seth r0,#high(SYM2)
add3 r0,r0,#low(SYM2) ; But it's not normal use.
seth r0,#high(SYM2)
ld r0,@(low(SYM2),r0) ; But it's not normal use.
.end
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [m32r-elf] Error: bad instruction when using shigh and low macroswith absolute immediate.,
Kazuhiro Inaoka <=