From: Konrad Eisele <kon...@gaisler.com>
Date: Tue,  1 Nov 2011 10:22:13 +0100

> Use -Aleon to enable binutils sparc-leon architecture. The leon-arch
> binutils GAS has umul/smul and casa enabled.
> 
> Signed-off-by: Konrad Eisele <kon...@gaisler.com>

You can't just add new assembler options that are only right now
being added to binutils.

Instead, you have to add a test to make sure that the binutils being
used alongside gcc actually supports the new option, and only pass it
in if so.  And subsequently, you cannot emit instructions that require
the -Aleon option unless this support is present too.

This is exactly what we had to do for VIS 3.0, FMAF, and HPC instructions
on Niagara3.

Look at the "FMAF, HPC, and VIS 3.0 instructions"
gcc_GAS_CHECK_FEATURE code in gcc/configure.ac for how to do such a
test.

Then once you have that, you can conditionlize instruction emission as
well based upon whether the feature CPP define is set or not.

Reply via email to