On Mon, 2012-01-30 at 04:05 +1000, Julius Baxter wrote: 
> Hi all,
> 
> I'm tinkering with CGEN and the tool chain and have come across
> something I think should be fixed in GCC.
> 
> It looks like instructions which have immediate values that are
> sign-extended, but interpreted as unsigned, GCC sometimes likes to
> emit them as negative decimals. The assembler CGEN gives us doesn't
> like this.
> 
> I'm of the opinion that CGEN is right and GCC shouldn't be relying on
> this "feature" of the old assembler.
> 
> For example, I'm getting this when building our libgcc:
> 
>   $ make all-target-libgcc
>   ...
>   make[2]: Entering directory
> `/localhome/jules/scratch/oc-gnu-src/gnu-src/bd-elf/or1k-elf/libgcc'
>   ...
>   /localhome/jules/scratch/oc-gnu-src/gnu-src/bd-elf/./gcc/xgcc \
>   ...
>   -c ../../../unisrc/libgcc/../gcc/libgcc2.c
> 
>   /tmp/ccckCYjB.s: Assembler messages:
>   /tmp/ccckCYjB.s:120: Error: operand out of range (0xfffffffe not
> between 0 and 0xffff) `l.sfgtui r4,-2'
> 
> Am I right in thinking we should make GCC spit out "l.sfgtui
> r4,0xfffe" here instead?
> 
> I have a feeling a better definition of the "I" immediate in our GCC
> port would be better, but I'm not sure where/how that could be done.
> I've had a poke around the constraints.md file, but I've not got the
> foggiest idea how I get what I want in there.
> 
> Can anyone point me in the right direction?

I've copied Joern Rennecke who knows most about this stuff. I'm all for
making stuff more consistent

HTH,


Jeremy

-- 
Tel:      +44 (1590) 610184
Cell:     +44 (7970) 676050
SkypeID: jeremybennett
Email:   [email protected]
Web:     www.embecosm.com

_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc

Reply via email to