ARM INSTRUCTION SET
SC32442B RISC MICROPROCESSOR
3-62
Multiplication by 6
ADD
Ra,Ra,Ra,LSL #1
; Multiply by 3
MOV
Ra,Ra,LSL#1
; and then by 2
Multiply by 10 and add in extra number
ADD
Ra,Ra,Ra,LSL#2
; Multiply by 5
ADD
Ra,Rc,Ra,LSL#1
; Multiply by 2 and add in next digit
General recursive method for Rb := Ra*C, C a constant:
1. If C even, say C = 2^n*D, D odd:
D=1:
MOV Rb,Ra,LSL #n
D<>1:
{Rb := Ra*D}
MOV
Rb,Rb,LSL
#n
2. If C MOD 4 = 1, say C = 2^n*D+1, D odd, n>1:
D=1:
ADD Rb,Ra,Ra,LSL #n
D<>1:
{Rb := Ra*D}
ADD
Rb,Ra,Rb,LSL
#n
3. If C MOD 4 = 3, say C = 2^n*D-1, D odd, n>1:
D=1:
RSB Rb,Ra,Ra,LSL #n
D<>1:
{Rb := Ra*D}
RSB
Rb,Ra,Rb,LSL #n
This is not quite optimal, but close. An example of its non-optimality is multiply by 45 which is done by:
RSB
Rb,Ra,Ra,LSL#2
; Multiply by 3
RSB
Rb,Ra,Rb,LSL#2
; Multiply by 4*3-1 = 11
ADD
Rb,Ra,Rb,LSL# 2
; Multiply by 4*11+1 = 45
rather than by:
ADD
Rb,Ra,Ra,LSL#3
; Multiply by 9
ADD
Rb,Rb,Rb,LSL#2
; Multiply by 5*9 = 45
Summary of Contents for SC32442B54
Page 1: ...SC32442B54 USER S MANUAL Revision 1 0 ...
Page 43: ...PRODUCT OVERVIEW SC32442B RISC MICROPROCESSOR 1 42 NOTES ...
Page 59: ...PROGRAMMER S MODEL SC32442B RISC MICROPROCESSOR 2 16 NOTES ...
Page 123: ...ARM INSTRUCTION SET SC32442B RISC MICROPROCESSOR 3 64 NOTES ...
Page 167: ...THUMB INSTRUCTION SET SC32442B RISC MICROPROCESSOR 4 44 NOTES ...
Page 187: ...MEMORY CONTROLLER SC32442B RISC MICROPROCESSOR 5 20 NOTES ...
Page 250: ...DMA SC32442B RISC MICROPROCESSOR 8 14 NOTES ...
Page 308: ...PWM TIMER SC32442B RISC MICROPROCESSOR 10 20 NOTES ...
Page 330: ...UART SC32442B RISC MICROPROCESSOR 11 22 NOTES ...
Page 417: ...SC32442B RISC MICROPROCESSOR LCD CONTROLLER 15 45 NOTES ...
Page 427: ...ADC AND TOUCH SCREEN INTERFACE SC32442B RISC MICROPROCESSOR 16 10 NOTES ...
Page 511: ...BUS PRIORITIES SC32442B RISC MICROPROCESSOR 24 2 NOTES ...
Page 562: ...K5D2G13ACM D075 Revision 1 0 December 2006 7 MCP MEMORY 2Gb 256Mb x8 NAND Flash Memory A Die ...
Page 599: ...K5D2G13ACM D075 Revision 1 0 December 2006 44 MCP MEMORY 512Mb 16Mb x32 Mobile SDRAM C Die ...