
162
Evaluating and Programming the 29K RISC Family
This chapter deals with aspects of assembly level programming. There are some
differences between 29K family members, particularly in the area of on–chip periph-
erals for microcontrollers. The chapter does not go into details peculiar to individual
family members; for that it is best to study the processor User’s Manual.
The material covered is relevant to all 29K family members.
3.1
INSTRUCTION SET
The Am29000 microprocessor implements 112 instructions. All hardware im-
plemented instructions execute in a single–cycle, except for IRET, IRETINV,
LOADM and STOREM. Instruction format was discussed in section 1.11. All
instructions have a fixed 32–bit format, with an 8–bit opcode field and 3, 8–bit, oper-
and fields. Field–C specifies the result operand register (DEST), field–A and field–B
supply the source operands (SRCA and SRCB). Most instructions operate on data
held in global or local registers, and there are no complex addressing modes sup-
ported. Field–B, or field–B and field–A combined, can be used to provide 8–bit or
16–bit immediate data for instructions. Access to external memory can only be per-
formed with the LOAD[M] and STORE[M] instructions. There are a number of
instructions, mostly used by operating system code, for accessing the processor spe-
cial registers.
The following sections deal with the different instruction classes. Some of the
instructions described are not directly supported by all members of the 29K family.
In particular, many of the floating–point instructions are only directly executed by
the Am29050 processor. If an instruction is not directly supported by the processor
hardware, then a trap is generated during instruction execution. In this case, the oper-
ating system uses
trapware
to implement the instruction’s operation in software.
Emulating nonimplemented instructions in software means some instruction execu-
tion speeds are reduced, but the instruction set is compatible across all family mem-
bers.
3.1.1 Integer Arithmetic
The Integer Arithmetic instructions perform add, subtract, multiply, and divide
operations on word–length (32–bit) integers. All instructions in this class set the
ALU Status Register. The integer arithmetic instructions are shown Tables 3–1 and
3–2.
The MULTIPLU, MULTIPLY, DIVIDE, and DIVIDU instructions are not im-
plemented directly on most 29K family members, but are supported by traps. To de-
termine if your processor directly supports these instructions, check with the proces-
sor User’s Manual or the tables in Chapter 1. The Am29050 microprocessor supports
the multiply instructions directly but not the divide instructions.