[PATCH, FT32] initial support

Jeff Law law@redhat.com
Wed Apr 29 07:41:00 GMT 2015


On 03/19/2015 09:28 AM, James Bowman wrote:
> Second ping.
> Also, have attached updated patchset for the current gcc. Thanks.
Thanks.  I don't see anything particularly worrisome from a correctness 
standpoint.  You may need to make minor updates to your .h file to cope 
with some of Trevor's work around eliminating conditionally compiled 
code.  Obviously the sooner we wrap up any lingering details the better 
since Trevor's work might be a bit of a moving target.

Similarly the work around changing the types of toplevel rtx structures 
to rtx_insn * from rtx may hit your .c and .md file in minor ways.  That 
work is also ongoing so will likely be a moving target as well. 
However, from a quick scan of ft32.c, I don't see much code that would 
likely be affected by those changes.

I didn't see any matching constraints in the md file, so you shouldn't 
be affected by the additional checking recently added to genrecog.

The change to the MAINTAINERS file will happen after you're approved by 
the steering committee as a maintainer.   For a new port like this it'd 
be silly to do anything other than have you as the maintainer, but we'll 
run through the usual procedure.

I assume you've got a copyright assignment on file with the FSF for this 
work?

I'm going to assume all the assembly code is correct :-)


Some minor notes:

You seem to have defined TRULY_NOOP_TRUNCATION twice.

Are shift counts truncated on the ft32?  You might want to define 
SHIFT_COUNT_TRUNCATED

Are you using LRA or reload?  The former is definitely preferred and for 
a simple target like this, I'd expect the transition to be very easy.

ft32.c should be following the GNU style conventions.  It's particularly 
bad in where it's placing the open/close braces.  We do

if (condition)
   {
     code
   }
else
   {
     more code
   }

But I see a lot of

if (condition) {
   code
} else {
   more code
}

Similarly you tend to have code like

if (cond1 &&
     cond2 &&
     cond3)

We write it as

if (cond1
     && cond2
     && cond3)

These seem minor, but a consistent convention really makes it easier 
when someone else has to fixup something in your port.  You can use 
"indent" to fix this stuff up quickly.


Jeff



More information about the Gcc-patches mailing list