I will shortly begin committing a patch series to add GCC support for Nios II R2, a revision of the original Nios II instruction set. I previously wrote up some notes on the technical changes from R1 to R2 when I posted the corresponding binutils patches, here:
https://sourceware.org/ml/binutils/2015-07/msg00014.html The patch series is in 7 parts. Parts 1-3 add support for the R2 re-encodings of the base R1 instruction set. Parts 4-7 include support for generating the new R2-specific instructions. [1] Add -march=, -mbmx, -mcdx flags [2] Adjust for reduced offsets in R2 load/store IO insns [3] Correct nested function trampolines for R2 encodings [4] Support new R2 instructions [5] Support R2 CDX load/store multiple instructions [6] Update function prologues/epilogues for R2 CDX [7] Add new intrinsics The patches are self-contained enough build individually when applied in sequence, but I've only tested them together as a group. Locally, we have been building and testing three multilibs for nios2-elf: the default R1, plain R2, and R2 with CDX and BMX extensions enabled. For now we are leaving R1 as the only multilib being built by default. Presently there is no support for R2 on nios2-linux-gnu targets. This isn't a fundamental limitation of the architecture, we just don't have kernel or glibc/dynamic linker support yet. I've regression-tested the patches on the default R1 nios2-linux-gnu target to ensure they don't break anything, though. -Sandra