ARM ARM7TDMI User Manual Page 28

  • Download
  • Add to my manuals
  • Print
  • Page
    / 43
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 27
Page 24
The <fields> indicate which fields of the CPSR/SPSR be written to should be allowed to
be changed. This limits any changes just to the fields intended by the programmer. The
allowed fields are;
c sets the control field mask bit (bit 16)
x sets the extension field mask bit (bit 17)
s sets the status field mask bit (bit 18)
f sets the flags field mask bit (bit 19)
One or more fields may be specified.
4.21 MUL – Multiply
Syntax:
MUL{<cond>}{S} <Rd >, <Rm>, <Rs>
RTL:
if(cond)
Rd Rs • Rm
Flags updated if S used:
N, Z (C is unpredictable)
Encoding:
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
cond 0 0 0 0 0 0 0 S Rd SBZ Rs 1 0 0 1 Rm
Usage and Examples:
MUL performs a 32x32 multiply operation, and stores a 32-bit result. Since only the
least significant 32-bits are stored, the result is the same for signed and unsigned
numbers.
The instruction below stores the product of R1 and R2 to R0.
MUL R0, R1, R2
Page view 27
1 2 ... 23 24 25 26 27 28 29 30 31 32 33 ... 42 43

Comments to this Manuals

No comments