Chapter 4 Optimization

Optimization of data transfer, arithmetic, logical, bit manipulation and user-defined instructions

For data transfer, arithmetic, logical, bit manipulation, and user-defined instructions, the assembler uses the shortest instruction available for expressing the specified immediate data, memory address, or dis- placement data. The user thus obtains optimal code size without having to worry about instruction vari- ants.

The following table shows the possibilities for optimizing data transfer, arithmetic, logical, bit manipu- lation, and user-defined instructions.

Table 4-10 optimization of data transfer, arithmetic, logical bit manipulation...

Source instruction

First Candidate

Second Candidate

Third Candidate

 

 

 

 

MOV(abs), An

MOV(abs16), An

MOV (abs32), An

 

MOV (abs), Dn

MOV(abs16), Dn

MOV (abs32), Dn

 

MOV(d,An), An

MOV(d8, An), An

MOV(d16,An), An

MOV (d32, An), An

MOV (d, An), Dn

MOV (d8, An), Dn

MOV (d16, An), Dn

MOV (d32, An), Dn

MOV (d, SP), An

MOV(d8, SP), An

MOV(d16, SP), An

MOV (d32, SP), An

MOV (d, SP), Dn

MOV (d8, SP), Dn

MOV (d16, SP), Dn

MOV (d32, SP), Dn

MOV An, (abs)

MOV An,(abs16)

MOV An, (abs32)

 

MOV An, (d, An)

MOV An, (d8, An)

MOV An, (d16, An)

MOV An, (d32, An)

MOV An, (d, SP)

MOV An, (d8, SP)

MOV An, (d16, SP)

MOV An, (d32, SP)

MOV Dn (abs)

MOV Dn (abs 16)

MOV Dn, (abs32)

 

MOV Dn, (d, An)

MOV Dn, (d8, An)

MOV Dn, (d16, An)

MOV Dn, (d32, An)

MOV Dn, (d, SP)

MOV Dn, (d8, SP)

MOV Dn, (d16, SP)

MOV Dn, (d32, SP)

MOV imm, An

MOV imm8, An

MOV imm16, An

MOV imm32, An

MOV imm, Dn

MOV imm8, Dn

MOV imm16, Dn

MOV imm32, Dn

MOVBU (abs),Dn

MOVBU (abs16),Dn

MOVBU (abs32),Dn

 

MOVBU (d,An),Dn

MOVBU (d8,An),Dn

MOVBU (d16,An),Dn

MOVBU (d32,An),Dn

MOVBU (d,SP),Dn

MOVBU (d8,SP),Dn

MOVBU (d16,SP),Dn

MOVBU (d32,SP),Dn

MOVBU Dn,(abs)

MOVBU Dn,(abs16)

MOVBU Dn,(abs32)

 

MOVBU Dn,(d,An)

MOVBU Dn,(d8,An)

MOVBU Dn,(d16,An)

MOVBU Dn,(d32,An)

MOVBU Dn,(d,SP)

MOVBU Dn,(d8,SP)

MOVBU Dn,(d16,SP)

MOVBU Dn,(d32,SP)

MOVB (abs),Dn

MOVB (abs16),Dn

MOVB (abs32),Dn

 

MOVB (d,An),Dn

MOVB (d8,An),Dn

MOVB (d16,An),Dn

MOVB (d32,An),Dn

MOVB (d,SP),Dn

MOVB (d8,SP),Dn

MOVB (d16,SP),Dn

MOVB (d32,SP),Dn

MOVB Dn,(abs)

MOVB Dn,(abs16)

MOVB Dn,(abs32)

 

MOVB Dn,(d,An)

MOVB Dn,(d8,An)

MOVB Dn,(d16,An)

MOVB Dn,(d32,An)

MOVB Dn,(d,SP)

MOVB Dn,(d8,SP)

MOVB Dn,(d16,SP)

MOVB Dn,(d32,SP)

MOVHU (abs),Dn

MOVHU (abs16),Dn

MOVHU (abs32),Dn

 

MOVHU (d,An),Dn

MOVHU (d8,An),Dn

MOVHU (d16,An),Dn

MOVHU (d32,An),Dn

MOVHU (d,SP),Dn

MOVHU (d8,SP),Dn

MOVHU (d16,SP),Dn

MOVHU (d32,SP),Dn

MOVHU Dn,(abs)

MOVHU Dn,(abs16)

MOVHU Dn,(abs32)

 

MOVHU Dn,(d,An)

MOVHU Dn,(d8,An)

MOVHU Dn,(d16,An)

MOVHU Dn,(d32,An)

MOVHU Dn,(d,SP)

MOVHU Dn,(d8,SP)

MOVHU Dn,(d16,SP)

MOVHU Dn,(d32,SP)

MOVH (abs),Dn

MOVH (abs16),Dn

MOVH (abs32),Dn

 

MOVH (d,An),Dn

MOVH (d8,An),Dn

MOVH (d16,An),Dn

MOVH (d32,An),Dn

Usage Example 53

Page 65
Image 65
Panasonic MN1030 user manual Optimization