[MIPS][LS2][3/5] Miscellaneous instructions

Maxim Kuvyrkov maxim@codesourcery.com
Sun Jun 8 19:59:00 GMT 2008


Richard Sandiford wrote:

...

>> ;; This mode macro allows :ANYF_MIPS5_LS2 to be used wherever
>> ;; a scalar or Loongson2 vector floating-point mode is allowed.
>> (define_mode_macro ANYF_MIPS5_LS2
>>   [(SF "TARGET_HARD_FLOAT")
>>    (DF "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT")
>>    (V2SF "TARGET_PAIRED_SINGLE_FLOAT_MIPS5_LS2")])
>>
>> Hence the instructions from MIPS5 ISA, which happen to be supported by 
>> Loongson2, are declared with ANYF_MIPS5_LS2 mode_iterator.  I don't like 
>> this, but can't figure out alternative way to name / describe these 
>> instructions.
> 
> I'd prefer to keep TARGET_PAIRED_SINGLE_FLOAT for the cases that
> are common between Loongson and non-Loongson mode (i.e. the cases in
> which .ps is available in some form).  Then add new ISA_HAS_FOO
> macros for each class of instruction that Loongson doesn't have.
> E.g.
> 
>     ISA_HAS_PXX_PS
> 
> for PUU.PS & co.
> 
> Feel free to run a list of ISA_HAS_* macros by me before testing.

How does the following patch look?  Now the patch disables certain .ps 
instruction when compiling for Loongson and uses everything else (in 
contrast, previous version enabled instruction that Loongson does 
support and disabled everything else).

I also noticed that the previous version of the patch didn't enable 
[n]madd3/msub3 instructions and fixed that in this one.

--
Maxim
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fsf-ls2ef-3-insns.ChangeLog
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080608/90752b40/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fsf-ls2ef-3-insns.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080608/90752b40/attachment-0001.ksh>


More information about the Gcc-patches mailing list