foss-for-synopsys-dwc-arc-processors/toolchain

Improve documentation of GCC options for ARCv3

Opened this issue · 0 comments

Currently we only have a table (https://foss-for-synopsys-dwc-arc-processors.github.io/experimental-documentation/2023.09/toolchain/target-options/#arcv3-toolchain) with mapping of -msimd, -mll64, -m128 to various -mcpu options.
But looking at real output of the GCC (at least the one from ARC 2023.09 release) we may see way more options:

$ module load arc_gnu/2023.09-elf-arc64
$ arc64-elf-gcc --target-help
The following options are target specific:
  -m128                       Enable wide data transfer support.
  -matomic=                   Enable atomic instructions: {0, 1, 2, 3}.
  -mbbit                      Generate BBITx instructions during combiner step.
  -mbitscan                   Enable NORM, NORMH, FFS, FLS, NORML, FFSL, and FLSL bitscan instructions.
  -mbrcc                      Generate BRcc instructions during combiner step.
  -mcmodel=                   Specify the code model.
  -mcode-density              Enable code-density instructions.
  -mcpu=                      -mcpu=CPU Generate code for specific ARCv3 CPU variant.
  -mdiv-rem                   Enable DIV-REM instructions.
  -mexperimental              Experimental option, to be removed.
  -mfpmov                     Reduce pressure on GPRs by using FPRs for memory operations like memcpy.
  -mfpu=                      Specify hardware FP model used.
  -mll64                      Enable double load/store instructions for arc64:32.
  -msimd                      Enable integer SIMD instructions.
  -munaligned-access          Enable unaligned accesse for packed data.
  -mvolatile-di               Enable uncached access for volatile memories.
  -mwide                      Enable wide floating point SIMD support.

  The code model option names for -mcmodel:
    large medium small

Assembler options
=================

Use "-Wa,OPTION" to pass "OPTION" to the assembler.

ARC64-specific assembler options:
  -mcpu=<cpu name>        assemble for CPU <cpu name>,one of:
                          hs6x, hs5x, hs68, hs58

And while above is already helpful, would be really nice to add the following information: