This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


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

Fw: Bug Report


 
-----Original Message-----
From: Robert Vogl <development.mondial@aon.at>
To: crossgcc@cygnus.com <crossgcc@cygnus.com>
Date: Wednesday, October 13, 1999 5:19 PM
Subject: Bug Report

Hello
 
 
I have a serios problem using float variables in an application with the H8/300H.
 
(1) If I define a global float variable var1 and initialize it, the float variable var1is correctly defined and correctly initialized.
 
(2) But if I define a global float variable var2 without initializing it, and assign a constant value later to it (for example 1,5) the variable var2 has not got the right value.
 
 
What I dedected:
 
In (1) the constant value is fetch from the segment data.
 
In (2) the constant value is fetch from the segment rodata. (I have not defined the segment rodata in my linkfile and dont know whats the use of it!).  The segment rodata starts at 0x00268008 as you can see in the file main.x.
But the command to assign the constant to var2 is :
 
    mov.l @.LC0:16,er2   (as you can see in the Listfile xx.lst)
 
and thats wrong because with this command you can reach only the lower 16 bits of the right address.
 
The right command should be
    mov.l @.LC0:24,er2
 
So its possible to reach the address 0x00268008.
 
Maybe I have used wrong compiler or linker switches, but I have studdied the manuel for a long time and cant find any solution. Now I have really reached a point where I need a little help.
 
In the attachment you can find:
C Source         filemain.c
Makefile          makefile
Linkfile            mondial.lnk
Objektfile         main.x
Listfile             xx.lst
 
   
 I have used the following versions of compiler and linker:
 
GNU C version 2.7-97r1a (h8300-hms)
GNU ld version 2.7-97r1a (with BFD 2.7-97r1a)
 
 
Please answer back to development.mondial@aon.at
 
 
greetings
 
Robert Vogl
 

main.c

Main.x

mondial.lnk

xx.lst

makefile

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

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