P60ARM-B Zarlink Semiconductor, Inc., P60ARM-B Datasheet - Page 65

no-image

P60ARM-B

Manufacturer Part Number
P60ARM-B
Description
32-bit RISC microprocessor
Manufacturer
Zarlink Semiconductor, Inc.
Datasheet
4.15 Instruction Set Examples
The following examples show ways in which the basic ARM60 instructions can combine to give efficient
code. None of these methods saves a great deal of execution time (although they may save some), mostly
they just save code.
4.15.1 Using the conditional instructions
(1)
(2)
(3)
(4)
(5)
Div1
can be replaced by
using conditionals for logical OR
CMP
BEQ
CMP
BEQ
CMP
CMPNE
BEQ
absolute value
TEQ
RSBMI
multiplication by 4, 5 or 6 (run time)
MOV
CMP
ADDCS
ADDHI
combining discrete and range tests
TEQ
CMPNE
MOVLS
division and remainder
MOV
CMP
CMPCC
MOVCC
MOVCC
Rn,#p
Label
Rm,#q
Label
Rn,#p
Rm,#q
Label
Rn,#0
Rn,Rn,#0
Rc,Ra,LSL#2
Rb,#5
Rc,Rc,Ra
Rc,Rc,Ra
Rc,#127
Rc,#” “-1
Rc,#”.”
Rcnt,#1
Rb,#0x80000000
Rb,Ra
Rb,Rb,ASL#1
Rcnt,Rcnt,ASL#1
; if Rn=p OR Rm=q THEN GOTO Label
; if condition not satisfied try other test
; test sign
; and 2's complement if necessary
; multiply by 4
; test value
; complete multiply by 5
; complete multiply by 6
; discrete test
; range test
; IF
; THEN Rc:=”.”
; enter with numbers in Ra and Rb
;
; bit to control the division
; move Rb until greater than Ra
Instruction Set - Examples
Rc<=” “ OR Rc=ASCII(127)
61

Related parts for P60ARM-B