Atmel SAM4S Xplained Pro Starter and Evaluation Kit ATSAM4S-XPRO ATSAM4S-XPRO 데이터 시트
제품 코드
ATSAM4S-XPRO
159
SAM4S Series [DATASHEET]
Atmel-11100G-ATARM-SAM4S-Datasheet_27-May-14
12.6.6.12SDIV and UDIV
Signed Divide and Unsigned Divide.
Syntax
Syntax
SDIV{cond} {Rd,} Rn, Rm
UDIV{cond} {Rd,} Rn, Rm
where:
condis an optional condition code, see
condis an optional condition code, see
.
Rdis the destination register. If Rd is omitted, the destination register is Rn.
Rnis the register holding the value to be divided.
Rmis a register holding the divisor.
Operation
SDIV performs a signed integer division of the value in Rn by the value in Rm.
UDIV performs an unsigned integer division of the value in Rn by the value in Rm.
For both instructions, if the value in Rn is not divisible by the value in Rm, the result is rounded towards zero.
Restrictions
Do not use SP and do not use PC
Rnis the register holding the value to be divided.
Rmis a register holding the divisor.
Operation
SDIV performs a signed integer division of the value in Rn by the value in Rm.
UDIV performs an unsigned integer division of the value in Rn by the value in Rm.
For both instructions, if the value in Rn is not divisible by the value in Rm, the result is rounded towards zero.
Restrictions
Do not use SP and do not use PC
.
Condition Flags
These instructions do not change the flags.
Examples
These instructions do not change the flags.
Examples
SDIV
R0, R2, R4
; Signed divide, R0 = R2/R4
UDIV
R8, R8, R1
; Unsigned divide, R8 = R8/R1