Message ID | 87r5k6kenj.fsf@firetop.home |
---|---|
State | New |
Headers | show |
Hi Richard, Thank you for reviewing this patch. I've started to work through the issues that you've mentioned. I will be posting updated patches over the coming days. Catherine Richard Sandiford wrote: > Try to avoid the micromips attribute and use more generic ones if you can. > It's better to extend the existing attributes like move_type where possible, > and introduce new ones otherwise. E.g.: > > @@ -979,6 +988,7 @@ (define_insn "*add<mode>3" > <d>addu\t%0,%1,%2 > <d>addiu\t%0,%1,%2" > [(set_attr "type" "arith") > + (set_attr "micromips_type" "add") > (set_attr "mode" "<MODE>")]) > > (define_insn "*add<mode>3_mips16" > > either split "arith" into "add,sub" or add a new attribute > (alu_type?) that automatically implies (set_attr "type" "arith") > for "add" and "sub". I realise the first one requires a fair > few changes to existing code (and would consequently be better > as a separate lead-up patch), but that's how these things get done: > keep types together while there is no use in splitting them, then > split then when we find a need. Same with the "logical" ops. BTW: > > @@ -2639,6 +2651,8 @@ (define_insn "*ior<mode>3" > or\t%0,%1,%2 > ori\t%0,%1,%x2" > [(set_attr "type" "logical") > + (set_attr "micromips_type" "logical_and") > + (set_attr "micromips_type" "logical_or") > (set_attr "mode" "<MODE>")]) > > (define_insn "*ior<mode>3_mips16" > > first line is misplaced. >
Index: config/mips/mips16.S =================================================================== --- config/mips/mips16.S (revision 160766) +++ config/mips/mips16.S (working copy) @@ -21,6 +21,10 @@ a copy of the GCC Runtime Library Except see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ +#ifdef __mips_micromips + /* DO NOTHING */ +#else + /* This file contains mips16 floating point support functions. These functions are called by mips16 code to handle floating point when -msoft-float is not used. They accept the arguments and return @@ -707,3 +712,4 @@ CALL_STUB_RET (__mips16_call_stub_dc_10, #endif #endif /* !__mips_single_float */ #endif +#endif /* __mips_micromips */