Freescale Semiconductor SC140 Core Assembly Syntax with an Isap, Working with One Isap

Models: SC140

1 760
Download 760 pages 48.94 Kb
Page 243
Image 243

Core Assembly Syntax with an ISAP

6.7 Core Assembly Syntax with an ISAP

This section describes aspects of the core assembly syntax, supported by the software tools, that relate to the presence of an ISAP and to ISAP assembly instructions.

6.7.1 Identification of ISAP instructions

ISAP specific commands are included in brackets: {}, for example:

add d0,d1,d2 {...ISAP instructions..}

The instructions outside the brackets are core instructions, while the instructions inside the brackets are ISAP instructions. The mnemonics used for the ISAP instructions are defined by the ISAP architect, and assembled by an assembler extension module that is modularly linked with the standard core assembler. ISAP instructions can be combined in one bracket pair or could be split in two pairs with different predication, for example:

IFT {ISAP instruction} add d0,d1,d2 IFF {ISAP instruction}

See more details on predication of ISAP instructions in Section 6.7.3, “Conditional Execution.”

When using an ISAP, the core assembler should be informed which ISAP is to be used so that it can verify that it is using the correct assembler extension. The core assembler supports two methods to do this: Setting a default ISAP name, and prefixing the ISAP brackets with the ISAP name.

6.7.1.1 Working with One ISAP

When working with a single ISAP, we recommend defining a default ISAP name. An assembly directive is used to do this. The following syntax is used:

ISAP_ID_default “ISAP_ID1”

...

{.. ISAP instructions .. }

The assembler directive “ISAP_ID_default” defines the default ISAP name (in this case) to be

“ISAP_ID1”. The specific ISAP designation is to be determined by the ISAP architect. Until set to another value, the core assembler will assume this ISAP ID string for any ISAP instructions that are not prefixed by an explicit ID string.

This method is preferred when a single ISAP is used in an assembly code section. In this way the overhead of prefixing every ISAP instruction is avoided.

Example 6-4. Single ISAP coding

A VLES that uses an implicit ISAP ID string:

nop {tsteq k0} abs d0

In this example, three parallel instructions are used:

1st - nop = a core instruction

2nd - {tsteq k0} = a fictional ISAP instruction (for illustration purposes only), written in the syntax of the appropriate ISAP.

SC140 DSP Core Reference Manual

6-63

Page 243
Image 243
Freescale Semiconductor SC140 specifications Core Assembly Syntax with an Isap, Identification of Isap instructions