4.4.2. LDC

This function is called when an LDC instruction is recognized for a coprocessor.

Syntax


unsigned LDC(void *handleint type, ARMword instr, ARMword *data)

where:

handle

is the handle from ARMulif_InstallCoprocessorV5.

type

is the type of coprocessor access. This can be oneof:

ARMul_CP_FIRST

indicates that this is the first time the coprocessor model has been called for this instruction.

ARMul_CP_BUSY

indicates that this is a subsequent call, after the first call was busy-waited.

ARMul_CP_INTERRUPT

warns the coprocessor that the ARM is about to service an interrupt, so the coprocessor must discard the current instruction. Usually, the instruction will be retried later, in which case the type will be reset to ARMul_CP_FIRST.

ARMul_CP_TRANSFER

indicates that the ARM is about to perform the load.

ARMul_CP_DATA

indicates that valid data is included in data.

instr

the current opcode.

data

is a pointer to the data being loaded to the coprocessor from memory.

Return

The function must return one of:

  • ARMul_CP_INC, to request more data from the core (only in response to ARMul_CP_FIRST, ARMul_CP_BUSY, or ARMul_CP_DATA)

  • ARMul_CP_DONE, to indicate that the coprocessor operation is complete (only in response to ARMul_CP_DATA)

  • ARMul_CP_BUSY, to indicate that the coprocessor is busy (only in response to ARMul_CP_FIRST or ARMul_CP_BUSY)

  • ARMul_CP_CANT, to indicate that the instruction is not supported, or the specified register cannot be accessed (only in response to ARMul_CP_FIRST or ARMul_CP_BUSY).

  • ARMUL_CP_LAST, to indicate that the next load is the last in the sequence. This is only needed for ARM9.

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI0058D
Non-Confidential