Instructions
The floating-point instructions and their mnemonics,
formats, and operation codes follow. The table indi­
cates wh{m the condition code is set and the excep­
tions in operand designations, data, or results that
cause a program interruption.
Note: In the detailed descriptions of the individual
instructions, the mnemonic and the symbolic oper­
and designation for the IBM System/370 assembly
language are shown with each instruction. For a
register-to-register operation using LOAD (short),
for example, LER is the mnemonic and Rl,R2 the
operand designation.
Mnemonics for the floating-point instructions
have an "R" as the last letter when the instruction is
in the RR format. For instructions where all oper­
ands are the same length, certain letters are used to
represent operand-format length and normalization,
as follows:
E short normalized U short unnormalized
D long normalized
W long unnormalized
X extended normalized
Add Normalized
AER Rl,R2
[RR, Short Operands]
AE Rl,D2(X2,B2)
[RX, Short Operands] I R1 I X
2 0 8 12
ADR Rl,R2
[RR, Long Operands]
[
2A I R, I R2 I 0 8 12 15
AD Rl,D2(X2,B2)
[RX, Long Operands] R1
X
2 0 8 12
8
2
16 20 8
2
16 20 160 System/370 Principles of Operation
31
AXR Rl,R2
[RR, Extended Operands] I 36 I R1 I R2 I 0 8 12 15
The second operand is added to the first operand,
and the normalized sum is placed in the first­
operand location.
Addition of two floating-point numbers consists
in characteristic comparison and fraction addition.
The characteristics of the two operands are com­
pared, and the fraction accompanying the smaller
characteristic is shifted right, with its characteristic
increased by one for each hexadecimal digit of shift
until the two characteristics agree.
When an operand is shifted right during aligri­
ment, the leftmost hexadecimal digit of the field
shifted out is retained as a guard digit. The operand
that is not shifted is considered to be extended with
a low-order zero. Both operands are considered to
be extended with low-order zeros when no align­
ment shift occurs. The fractions are then added alge­
braically to form an intermediate sum.
The short intermediate-sum fraction consists of
seven hexadecimal digits and a possible carry. The
long intermediate-sum fraction consists of 15 hexa­
decimal digits and a possible carry. The extended
intermediate-sum fraction consists of 29 hexadeci­
mal digits and a possible carry. If a carry is present,
the sum is shifted right one digit position, and the
characteristic is increased by one.
After the addition, the intermediate sum is shifted
left as necessary to form a normalized number, pro­
vided the fraction is not zero. Vacated low-order
digit positions are filled with zeros, and the charac­
teristic is reduced by the number of hexadecimal
digits of shift. The intermediate-sum fraction is sub­
sequently truncated to the proper result-fraction
length.
The sign of the sum is determined by the rules of
algebra, unless all digits of the intermediate-sum
fraction are zero, in which case the sign is made plus.
An exponent-overflow exception is recognized
when a carry from the high-order position of the
intermediate-sum fraction causes the characteristic
of the normalized sum to exceed 127. The operation
is completed by making the characteristic 128 less
than the correct value, and a program interruption
for exponent overflow occurs. The result is normal­
ized, the sign and fraction remain correct, and, for AXR, the low-order characteristic remains correct.
An exponent-underflow exception exists when the
characteristic of the normalized sum is less than zero
and the fraction is not zero. If the exponent-
Name
ADD NORMALIZED (extended)
ADD NORMALIZED (long)
ADD NORMALIZED (long)
ADD NORMALIZED (short)
ADD NORMALIZED (short)
ADD UNNORMALIZED (long) ADD UN NORMALIZED (long)
ADD UN NORMALIZED (short)
ADD UNNORMALIZED (short) COMPAR E (long) COMPARE (long) COMPARE (short) COMPARE (short) DIVI DE (long) DIVIDE (long) DI VI DE (short) DIVIDE (short)
HALVE (long) HALVE (short)
LOAD (long)
LOAD (long) LOAD (short)
LOAD (short)
LOAD AND TEST (long)
LOAD AND TEST (short)
LOAD COMPLEMENT (long)
LOAD COMPLEMENT (short)
LOAD NEGATIVE (long)
LOAD NEGATIVE (short)
LOAD POSITIVE (long) LOAD POSITIVE (short)
LOAD ROUNDED (extended to long)
LOAD ROUNDED (long to short) MULTIPLY (extended) MULTIPLY (long) MULTIPLY (long)
MU L TI PL Y (long to extended) MULTIPLY (long to extended)
MUL TIPL Y (short to long) MULTIPLY (short to long) STORE (long) STORE (short) SUBTRACT NORMALIZED (extended) SUBTRACT NORMALIZED (long) SUBTRACT NORMALIZED (long) SUBTRACT NORMALIZED (short) SUBTRACT NORMALIZED (short) SUBTRACT UNNORMALIZED (long) SUBTRACT UNNORMALIZED (long) SUBTRACT UNNORMALIZED (short) SUBTRACT UNNORMALIZED (short)
Explanation:
A Access exceptions C Condition code is set
E Exponent-overflow exception
FK Floating-point divide exception
FP Floating-point feature LS Significance exception
Floating-Point-Instruction Summary
Mnemonic
AXR
ADR
AD
AER
AE
AWR
AW
AUR
AU CDR CD CER CE DDR
DD
DER
DE
HDR
HER
LDR
RR C RR C RX C RR C RX C RR C RX C RR C RX C RR C RX C RR C RX C RR
RX
RR
RX
RR
RR
RR
LD RX
LER RR
LE RX
LTDR RR C LTER RR C LCDR LCER LNDR
LNER
LPDR
RR C RR C RR C RR C RR C LPER RR C LRDR RR
LRER RR
MXR RR
MDR RR
MD RX
MXDR RR
MXD RX
MER RR
ME RX STD STE SXR SDR SD SER SE SWR SW SUR SU RX
RX
RR C RR C RX C RR C RX C RR C RX C RR C RX C XP
FP
FP A
FP
FP A
FP
FP A
FP
FP A
FP
FP A
FP
FP A
FP
FP A
FP
FP A
FP
FP
FP
FP A
FP
FP A
FP
FP
FP
FP
FP
FP
FP
FP
XP
XP
XP
FP
FP A
XP
XP A
FP
FP A
FP A
FP A
XP
FP
FP A
FP
FP A
FP
FP A
FP
FP A
Characteristics SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U t RR RR instruction format RX RX instruction format i SP Specification exception\ ST PER storage alteratio'n";vent E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
U
Exponent underflow exception
FK
FK
FK
FK
XP Extended-precision floating-point feature LS LS LS LS LS LS LS LS LS LS LS LS LS LS LS LS LS LS ST ST Code 36
2A
6A
3A
7A
2E
6E
3E
7E
29
69
39
79
2D
6D
3D
7D
24
34
28
68
38
78
22
32
23
33
21
31 20 30 25
35
26 2C 6C 27
67 3C 7C 60 70 37
2B
6B
3B
7B
2F
6F
3F
7F
Floating-Point Instructions 161
Previous Page Next Page