4 divide-by-zero, 5 privilege violation, 6 trace exception – Freescale Semiconductor ColdFire MCF52210 User Manual

Page 63

Advertising
background image

ColdFire Core

MCF52211 ColdFire® Integrated Microcontroller Reference Manual, Rev. 2

Freescale Semiconductor

3-19

In the original M68000 ISA definition, lines A and F were effectively reserved for user-defined operations
(line A) and co-processor instructions (line F). Accordingly, there are two unique exception vectors
associated with illegal opwords in these two lines.

Any attempted execution of an illegal 16-bit opcode (except for line-A and line-F opcodes) generates an
illegal instruction exception (vector 4). Additionally, any attempted execution of any non-MAC line-A and
most line-F opcodes generate their unique exception types, vector numbers 10 and 11, respectively.
ColdFire cores do not provide illegal instruction detection on the extension words on any instruction,
including MOVEC.

3.3.4.4

Divide-By-Zero

Attempting to divide by zero causes an exception (vector 5, offset equal 0x014).

3.3.4.5

Privilege Violation

The attempted execution of a supervisor mode instruction while in user mode generates a privilege
violation exception. See ColdFire Programmer’s Reference Manual for a list of supervisor-mode
instructions.

There is one special case involving the HALT instruction. Normally, this opcode is a supervisor mode
instruction, but if the debug module's CSR[UHE] is set, then this instruction can be also be executed in
user mode for debugging purposes.

3.3.4.6

Trace Exception

To aid in program development, all ColdFire processors provide an instruction-by-instruction tracing
capability. While in trace mode, indicated by setting of the SR[T] bit, the completion of an instruction
execution (for all but the stop instruction) signals a trace exception. This functionality allows a debugger
to monitor program execution.

The stop instruction has the following effects:

1. The instruction before the stop executes and then generates a trace exception. In the exception stack

frame, the PC points to the stop opcode.

2. When the trace handler is exited, the stop instruction executes, loading the SR with the immediate

operand from the instruction.

0xA

MAC, Move 3-bit Quick (MOV3Q)

0xB

Compare (CMP), Exclusive-OR (EOR)

0xC

Logical AND (AND), Multiply Word (MUL)

0xD

Add (ADD), Add Extended (ADDX)

0xE

Arithmetic and logical shifts (ASL, ASR, LSL, LSR)

0xF

Cache Push (CPUSHL), Write DDATA (WDDATA), Write Debug (WDEBUG)

Table 3-8. ColdFire Opword Line Definition (continued)

Opword[Line]

Instruction Class

Advertising
This manual is related to the following products: