20 Multiplier/Divider (COPRO2)
20-4
Seiko Epson Corporation
S1C17M20/M21/M22/M23/M24/M25
TECHNICAL MANUAL (Rev. 1.0)
Table 20.4.1 Initializing the Operation Result Register 0 (32 bits)
Mode set-
ting value
Instruction
Operations
Remarks
0x02
ld.cf %rd,%rs
res0[31:16]
←
%rd
res0[15:0]
←
%rs
(
ext imm9
)
ld.cf %rd,imm7
res0[31:16]
←
%rd
res0[15:0]
←
imm7/16
res0: operation result register 0
÷
16 bits
32 bits
32 bits
S1C17 Core
Operation result
register 0
Operation result
register 1
Selector
Argument 2
Argument 1
Coprocessor
output (16 bits)
Flag output
Quotient
Remainder
COPRO2
Figure 20.4.2 Data Path in Division Mode
Table 20.4.2 Operation in Division Mode
Mode set-
ting value
Instruction
Operations
Flags
Remarks
0x08
or 0x09
ld.ca %rd,%rs
res0[31:0]
÷ {
%rd, %rs}
res0[31:0]
←
Quotient
res1[31:0]
←
Remainder
%rd
←
res0[15:0] (Quotient)
psr (CVZN)
←
0b0000 The operation result regis-
ters 0 and 1 keep the op-
eration results until they are
rewritten by other opera-
tion.
COPRO2 does not support
0
÷
0 division.
(
ext imm9
)
ld.ca %rd,imm7
res0[31:0]
÷ {
%rd, imm7/16}
res0[31:0]
←
Quotient
res1[31:0]
←
Remainder
%rd
←
res0[15:0] (Quotient)
0x18
or 0x19
ld.ca %rd,%rs
res0[31:0]
÷ {
%rd, %rs}
res0[31:0]
←
Quotient
res1[31:0]
←
Remainder
%rd
←
res0[31:16] (Quotient)
(
ext imm9
)
ld.ca %rd,imm7
res0[31:0]
÷ {
%rd, imm7/16}
res0[31:0]
←
Quotient
res1[31:0]
←
Remainder
%rd
←
res0[31:16] (Quotient)
0x28
or 0x29
ld.ca %rd,%rs
res0[31:0]
÷ {
%rd, %rs}
res0[31:0]
←
Quotient
res1[31:0]
←
Remainder
%rd
←
res1[15:0] (Remainder)
(
ext imm9
)
ld.ca %rd,imm7
res0[31:0]
÷ {
%rd, imm7/16}
res0[31:0]
←
Quotient
res1[31:0]
←
Remainder
%rd
←
res1[15:0] (Remainder)
0x38
or 0x39
ld.ca %rd,%rs
res0[31:0]
÷ {
%rd, %rs}
res0[31:0]
←
Quotient
res1[31:0]
←
Remainder
%rd
←
res1[31:16] (Remainder)
(
ext imm9
)
ld.ca %rd,imm7
res0[31:0]
÷ {
%rd, imm7/16}
res0[31:0]
←
Quotient
res1[31:0]
←
Remainder
%rd
←
res1[31:16] (Remainder)
res0: operation result register 0, res1: operation result register 1