FW: wrong code generation in newlib 1.1.14 PPC ?!

Sriharsha sriharsha.v@redpinesignals.com
Thu Jan 12 10:44:00 GMT 2006


Hi Frank,
    .long   0x7C89209e      
Is this an opcode at all in the first place? I know nothing about your 
processor, but we've never had such an issue with a gcc port done on our 
processor (which is a new kid in the game).
Looks like the compiler is trying to store a Long value in the code 
space (for some strange reason, that is beyond my knowledge). Can you 
hack, exactly which function of newlib is causing this code.... (which 
newlib functions did you use in this function that generated this code)?

I may not help you out of this (but ofcourse there are other genious 
people here who'll help you out), but I am just wanting to know more of 
the problem and whats causing it.

Thanks,
Sriharsha.

Frank Juergen-r58616 wrote:

>No no,
>
>after the compilation I get code like this 
>
>.
>.
>.
>cmpwr cr7,r5,0
>cmpwr cr6,r9,0
>addi	r3,r1,8
>.long	0x7C89209e		<-- looks like an unown opcode , this address produce the crash
>li	r3,-2
>.
>.
>.
>
>I dig in the assembler code and found many other values like this one. But all of them are only in the function which are deliverd by newlib. The code which was written by me looks good ... I now this sounds strange but this is the situation. If you has this problem in general I would say oh this is a problem of the compiler (finally the compiler produce the opcodes) but why are only the newlib part buggy ??
>
>	Juergen Frank
>
>
>
>
>
>-----Original Message-----
>From: Sriharsha [mailto:sriharsha.v@redpinesignals.com] 
>Sent: Donnerstag, 12. Januar 2006 11:33
>To: newlib@sources.redhat.com
>Cc: Frank Juergen-r58616
>Subject: Re: FW: wrong code generation in newlib 1.1.14 PPC ?!
>
>Just for understanding, do you mean to say that the compiler is generating two different codes for a same function, one present in newlib and the other is the one you've written? This is strange !! One thing that I might consider looking at is optimization switch used to compile both the versions. Is everything (being used for compilation) the same at command-line?
>
>Sriharsha.
>
>Frank Juergen-r58616 wrote:
>
>  
>
>>Hi !!
>>
>>I generate my own version of gcc and newlib for the PowerPC. 
>>
>>If I compile and link my program it looks good, but if I execute the code it crashes !! Ok I debug and find out that the compiler generate wrong opcodes but I compile and create everything with the same cpu option ( mcpu=603e ). So what kind of problem is this ... has anyone else similar effects ?
>>
>>I see this problem only in the newlib functions not in my own program code ?!
>>
>>   thank you for your help
>> 
>>
>>    
>>



More information about the Newlib mailing list