[nios2] [4/7] Support new R2 instructions

Sandra Loosemore sandra@codesourcery.com
Tue Jul 14 23:29:00 GMT 2015


This patch adds GCC support for the bulk of the new R2 instructions --
everything except the new CDX load/store multiple instructions (part
5) and the instructions that are only emitted by new builtins (part
7).

CDX adds a group of 16-bit instructions similar to existing 32-bit
instructions, but with restrictions on which registers can be used,
smaller constant ranges, and the like to achieve the compression.
These instructions have an explicit ".n" suffix in the assembly
language syntax, rather than the encoding being selected automatically
by the assembler.  Instead of adding new insns with a "TARGET_HAS_CDX"
condition, or using the "enabled" attribute to control new
alternatives to the existing insn patterns, Chung-Lin came up with the
clever idea of moving the decision-making to the computation of the
"length" attribute in nios2_cdx_narrow_form_p.  Then
nios2_print_operand maps "%." onto ".n" or not depending on the
length.

Committed as 225796.

-Sandra

-------------- next part --------------
A non-text attachment was scrubbed...
Name: r2-4.log
Type: text/x-log
Size: 3661 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150714/be10799b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: r2-4.patch
Type: text/x-patch
Size: 56315 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150714/be10799b/attachment-0001.bin>


More information about the Gcc-patches mailing list