Subc - Intel i960 Jx Developer's Manual

Microprocessor
Table of Contents

Advertisement

INSTRUCTION SET REFERENCE
6.2.63

subc

Mnemonic:
subc
Format:
subc
Description:
Subtracts src1 from src2, then subtracts the opposite of condition code bit 1
(used here as the carry bit) and stores the result in dst. When the ordinal
subtraction results in a carry, condition code bit 1 is set to 1, otherwise it is
set to 0.
This instruction can also be used for integer subtraction. Here, when integer
subtraction results in an overflow, condition code bit 0 is set.
subc
code bits 0 and 1 regardless of data type.
dst = (src2 - src1 -1 + AC.cc[1])[31:0];
Action:
AC.cc[2:0] = 000
if((src2[31] == src1[31]) && (src2[31] != dst[31]))
AC.cc[0] = 1;
AC.cc[1] = (src2 - src1 -1 + AC.cc[1])[32];
Faults:
STANDARD
Example:
subc g5, g6, g7
Opcode:
subc
See Also:
addc, addi, addo, subi, subo
Side Effects:
Sets the condition code in the arithmetic controls.
6-108
Subtract Ordinal With Carry
src1,
src2,
reg/lit
reg/lit
does not distinguish between ordinals and integers: it sets condition
;
2
# Overflow bit.
Refer to
# g7 g6 - g5 - not(condition code bit 1)
5B2H
REG
dst
reg
# Carry out.
section 6.1.6, "Faults" (pg.
6-5).

Advertisement

Table of Contents
loading

Table of Contents