Bug for V850 cross compiler, in address splitting for instr. MOVHI-MOVEA

Gianluca Moro glctr@abc.it
Tue Nov 17 10:15:00 GMT 1998


BUG REPORT: 
	egcs-1.0
        output by v850-gcc --version: egcs-2.90.21 971202 (egcs-1.00
release)
	cross compiler for NEC-V850
	Management of address by MOVHI-MOVEA


I have the following situation, generated by a C code "aus =
&acq_info[0]",
where aus is a pointer to s atructure, and acq_info is a vector of
structures:

	...
(gdb) disass my_function
Dump of assembler code for function my_function:
        ...
0x105350 <my_function+20>:	movhi	19, r0, r10
0x105354 <my_function+24>:	movea	32584, r10, r28
        ...
(gdb) p aus        ;; here the code has just been executed
$25 = (ACQ_INFO *) 0x137f48
(gdb) p &acq_info
$26 = (ACQ_INFO (*)[20]) 0x127f48
	...

The high part of the address is incremented by 1 
with respect of its true value.
It seems to me that it's a problem related to the
MOVEA sign-extension management.
probably it's an error in the carry management while
separating the 32 bit address in low and high part.

The compilation command line is

v850-gcc -O2 -Wall -pipe -msda=16 -g -mnested-interrupts 
	-mcheck-stack -I. -I/home/giammy/biomedin/include 
	-I/home/giammy/biomedin/include/v850   -c 
	-o admanage-lib.o admanage-lib.c

I have the same error if I do not use the option -O2

Regards
Gianluca Moro

-- 

 +-----------------------------------------------------+
 | Biomedin s.r.l               Phone  +39-049-8751644 |
 | P.za Insurrezione, 1         Fax    +39-049-8754240 |
 | I-35137 Padova, ITALY        e-mail    glctr@abc.it |
 +-----------------------------------------------------+



More information about the Gcc-bugs mailing list