This chapter documents the backend for the Atari Jaguar GPU/DSP RISC processor.

@section Legal

    This module is copyright in 2014 by Frank Wille.

    This archive may be redistributed without modifications and used
    for non-commercial purposes.

    Distributing modified versions and commercial usage needs my written
    consent.

    Certain modules may fall under additional copyrights.


@section Additional options for this module

This module provides the following additional options:

@table @option
    @item -big
        Output big-endian code and data (default).

    @item -little
        Output little-endian code and data.

    @item -many
        Generate code for GPU or DSP RISC. All instructions are accepted
        (default).

    @item -mdsp
    @itemx -mjerry
        Generate code for the DSP RISC (part of Jerry).

    @item -mgpu
    @itemx -mtom
        Generate code for the GPU RISC (part of Tom).

@end table


@section General

This backend accepts RISC instructions for the GPU or DSP in Atari's
Jaguar custom chip set according to the "Jaguar Technical Reference Manual
for Tom & Jerry", Revision 8. Documentation bugs were fixed by using
various sources on the net.

The target address type is 64bit.

Default alignment for instructions is 2 bytes.
Data is aligned to its natural alignment by default.


@section Optimizations

This backend performs the following optimizations and translations for
the GPU/DSP RISC instruction set:

@itemize @minus

@item @code{load (Rn+0),Rm} is optimized to @code{load (Rn),Rm}.

@item @code{store Rn,(Rm+0)} is optimized to @code{store Rn,(Rm)}.

@end itemize


@section Known Problems

    Some known problems of this module at the moment:

@itemize @minus

@item Encoding of @code{MOVEI} instruction in little-endian mode is unkown.
@item The developer has to provide the necessary @code{NOP} instructions
      after jumps, or @code{OR} instructions to work around hardware bugs,
      himself.

@end itemize

@section Error Messages

This module has the following error messages:

@itemize @minus

@item 2001: data size %d not supported
@item 2002: value from %ld to %ld required

@end itemize
