ARC Dependent Features
**********************

Options
=======

-marc[5|6|7|8]
     This option selects the core processor variant. Using -marc is the same as -marc5, which is also the default.

     arc5
          Base instruction set.

     arc6
          Jump-and-link (jl) instruction. No requirement of an instruction between setting flags and conditional jump. For example:

                 mov.f r0,r1
                 beq   foo

     arc7
          Break (brk) and sleep (sleep) instructions.

     arc8
          Software interrupt (swi) instruction.

     Note: the .option directive can to be used to select a core variant from within assembly code.

-EB
     This option specifies that the output generated by the assembler should be marked as being encoded for a big-endian processor.

-EL
     This option specifies that the output generated by the assembler should be marked as being encoded for a little-endian processor - this is the default.

Syntax
======

Special Characters
------------------

*TODO*

Register Names
--------------

*TODO*

Floating Point
==============

The ARC core does not currently have hardware floating point support. Software floating point support is provided by GCC and uses IEEE floating-point numbers.

ARC Machine Directives
======================

The ARC version of AS supports the following additional machine directives:

.2byte EXPRESSIONS
     *TODO*

.3byte EXPRESSIONS
     *TODO*

.4byte EXPRESSIONS
     *TODO*

.extAuxRegister NAME,ADDRESS,MODE
     *TODO*

            .extAuxRegister mulhi,0x12,w

.extCondCode SUFFIX,VALUE
     *TODO*

            .extCondCode is_busy,0x14

.extCoreRegister NAME,REGNUM,MODE,SHORTCUT
     *TODO*

            .extCoreRegister mlo,57,r,can_shortcut

.extInstruction NAME,OPCODE,SUBOPCODE,SUFFIXCLASS,SYNTAXCLASS
     *TODO*

            .extInstruction mul64,0x14,0x0,SUFFIX_COND,SYNTAX_3OP|OP1_MUST_BE_IMM

.half EXPRESSIONS
     *TODO*

.long EXPRESSIONS
     *TODO*

.option ARC|ARC5|ARC6|ARC7|ARC8
     The .option directive must be followed by the desired core version. Again arc is an alias for arc5.

     Note: the .option directive overrides the command line option -marc; a warning is emitted when the version is not consistent between the two - even for the implicit default core version (arc5).

.short EXPRESSIONS
     *TODO*

.word EXPRESSIONS
     *TODO*

Opcodes
=======

For information on the ARC instruction set, see ARC Programmers Reference Manual, ARC Cores Ltd.