Lattice Mico32 port

Jon Beniston
Tue Oct 6 18:11:00 GMT 2009


Attached is an updated LM32 patch that hopefully addresses Richard's last
comments, with the following exceptions. 

>> Index: gcc/config/lm32/sfp-machine.h
>> Index: gcc/config/lm32/crti.S
>> Index: gcc/config/lm32/lib1funcs.S
>> Index: gcc/config/lm32/crtn.S
>> Index: gcc/config/lm32/arithmetic.c
>> Index: gcc/config/lm32/t-fprules-softfp
>> Index: gcc/config/lm32/t-lm32
>Can you move these to libgcc?

I've moved all of these except for the softfp files, as I'm not sure how
that should be made to work.

> I strongly suggest that
> you make the hi/lo relocation pair use a signed low-part. 
> All that said, fixing this is not a requirement.

That's a good suggestion, thanks, but I'd like to add that later, if that's



2009-10-06  Jon Beniston <>

        * config.gcc: Add lm32 elf and uclinux targets.
        * config/lm32: New directory.
        * config/lm32/lm32.c: New file.
        * config/lm32/lm32.h: New file.
        * config/lm32/ New file.
        * config/lm32/lm32.opt: New file.
        * config/lm32/lm32-protos.h: New file.
        * config/lm32/ New file.
        * config/lm32/ New file.
        * config/lm32/sfp-machine.h: New file.
        * config/lm32/t-fprules-softfp: New file.
        * config/lm32/uclinux-elf.h: New file.
        * doc/invoke.texi: Document lm32 options. 
        * doc/contrib.texi: Document lm32 porter.
        * doc/install.texi: Document lm32 targets.

2009-10-06  Jon Beniston <>

        * lib/target-supports.exp (check_profiling_available): lm32 target 
          doesn't support profiling.
        * gcc.dg/20020312-2.c: Add lm32 support.
        * g++.dg/other/packed1.C: Expect to fail on lm32.        
        * g++.old-deja/g++.jason/thunk3.C: Likewise.                 

2009-10-06  Jon Beniston <>

        * Add lm32 targets.
        * config/lm32: New directory.
        * config/lm32/libgcc_lm32.h: New file.
        * config/lm32/_mulsi3.c: New file.
        * config/lm32/_udivmodsi4.c: New file.
        * config/lm32/_divsi3.c: New file.
        * config/lm32/_modsi3.c: New file.
        * config/lm32/_udivsi3.c: New file.
        * config/lm32/_umodsi3.c: New file.
        * config/lm32/_lshrsi3.S: New file.
        * config/lm32/_ashrsi3.S: New file.
        * config/lm32/_ashlsi3.S: New file.
        * config/lm32/crti.S: New file.
        * config/lm32/crtn.S: New file.
        * config/lm32/t-lm32: New file.
        * config/lm32/t-elf: New file.
        * config/lm32/t-uclinux: New file.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lm32.patch.091006
Type: application/octet-stream
Size: 131120 bytes
Desc: not available
URL: <>

More information about the Gcc mailing list