Updated: 11 December 1998 |
VAX MACRO and Instruction Set Reference Manual
Previous | Contents | Index |
Divide
2operand: opcode divr.rx, quo.mx
3operand: opcode divr.rx, divd.rx, quo.wx
N|| <--- quo LSS 0; | |
Z|| <--- quo EQL 0; | |
V|| <--- 0; | |
C|| <--- 0; |
46 | DIVF2 | Divide F_floating 2 Operand |
47 | DIVF3 | Divide F_floating 3 Operand |
66 | DIVD2 | Divide D_floating 2 Operand |
67 | DIVD3 | Divide D_floating 3 Operand |
46FD | DIVG2 | Divide G_floating 2 Operand |
47FD | DIVG3 | Divide G_floating 3 Operand |
66FD | DIVH2 | Divide H_floating 2 Operand |
67FD | DIVH3 | Divide H_floating 3 Operand |
In 2 operand format, the quotient operand is divided by the divisor operand and the quotient operand is replaced by the rounded result. In 3 operand format, the dividend operand is divided by the divisor operand, and the quotient operand is replaced by the rounded result.
Notes
Extended Multiply and Integerize
EMODF and EMODD:
opcode mulr.rx, mulrx.rb, muld.rx, int.wl, fract.wx
EMODG and EMODH:
opcode mulr.rx, mulrx.rw, muld.rx, int.wl, fract.wx
N|| <--- fract LSS 0; | |
Z|| <--- fract EQL 0; | |
V|| <--- {integer overflow}; | |
C|| <--- 0; |
54 | EMODF | Extended Multiply and Integerize F_floating |
74 | EMODD | Extended Multiply and Integerize D_floating |
54FD | EMODG | Extended Multiply and Integerize G_floating |
74FD | EMODH | Extended Multiply and Integerize H_floating |
The multiplier extension operand is concatenated with the multiplier operand to gain 8 (EMODD and EMODF), 11 (EMODG), or 15 (EMODH) additional low-order fraction bits. The low-order 5 or 1 bits of the 16-bit multiplier extension operand are ignored by the EMODG and EMODH instructions, respectively. The multiplicand operand is multiplied by the extended multiplier operand. The multiplication result is equivalent to the exact product truncated (before normalization) to a fraction field of 32 bits in F_floating, 64 bits in D_floating and G_floating, and 128 bits in H_floating. The result is regarded as the sum of an integer and fraction of the same sign. The integer operand is replaced by the integer part of the result, and the fraction operand is replaced by the rounded fractional part of the result.
Notes
Move Negated
opcode src.rx, dst.wx
N|| <--- dst LSS 0; | |
Z|| <--- dst EQL 0; | |
V|| <--- 0; | |
C|| <--- 0; |
52 | MNEGF | Move Negated F_floating |
72 | MNEGD | Move Negated D_floating |
52FD | MNEGG | Move Negated G_floating |
72FD | MNEGH | Move Negated H_floating |
The destination operand is replaced by the negative of the source operand.
Move
opcode src.rx, dst.wx
N|| <--- dst LSS 0; | |
Z|| <--- dst EQL 0; | |
V|| <--- 0; | |
C|| <--- C; |
50 | MOVF | Move F_floating |
70 | MOVD | Move D_floating |
50FD | MOVG | Move G_floating |
70FD | MOVH | Move H_floating |
The destination operand is replaced by the source operand.
Note
On a reserved operand fault, the destination operand is unaffected, and the condition codes are UNPREDICTABLE.
Multiply
2operand: opcode mulr.rx, prod.mx
3operand: opcode mulr.rx, muld.rx, prod.wx
N|| <--- prod LSS 0; | |
Z|| <--- prod EQL 0; | |
V|| <--- 0; | |
C|| <--- 0; |
44 | MULF2 | Multiply F_floating 2 Operand |
45 | MULF3 | Multiply F_floating 3 Operand |
64 | MULD2 | Multiply D_floating 2 Operand |
65 | MULD3 | Multiply D_floating 3 Operand |
44FD | MULG2 | Multiply G_floating 2 Operand |
45FD | MULG3 | Multiply G_floating 3 Operand |
64FD | MULH2 | Multiply H_floating 2 Operand |
65FD | MULH3 | Multiply H_floating 3 Operand |
In 2 operand format, the product operand is multiplied by the multiplier operand, and the product operand is replaced by the rounded result. In 3 operand format, the multiplicand operand is multiplied by the multiplier operand, and the product operand is replaced by the rounded result.
Notes
Polynomial Evaluation
opcode arg.rx, degree.rw, tbladdr.ab
N|| <--- R0 LSS 0; | |
Z|| <--- R0 EQL 0; | |
V|| <--- 0; | |
C|| <--- 0; |
55 | POLYF | Polynomial Evaluation F_floating |
75 | POLYD | Polynomial Evaluation D_floating |
55FD | POLYG | Polynomial Evaluation G_floating |
75FD | POLYH | Polynomial Evaluation H_floating |
The table address operand points to a table of polynomial coefficients. The coefficient of the highest-order term of the polynomial is pointed to by the table address operand. The table is specified with lower-order coefficients stored at increasing addresses. The data type of the coefficients is the same as the data type of the argument operand. The evaluation is carried out by Horner's method, and the contents of R0 (R1'R0 for POLYD and POLYG, R3'R2'R1'R0 for POLYH) are replaced by the result. The result computed is:
if d = degree and x = arg result = C[0]+x**0 + x*(C[1] + x*(C[2] + ... x*C[d]))The unsigned word degree operand specifies the highest-numbered coefficient to participate in the evaluation. POLYH requires four longwords on the stack to store arg in case the instruction is interrupted.
Notes
POLYF: R0 = tmp3 ! Partial result after iteration ! prior to the one causing the ! overflow/underflow R1 = arg R2<7:0> = tmp1 ! Number of iterations remaining R2<31:8> = implementation specific R3 = tmp2 ! Points to table entry causing ! exception POLYD and POLYG: R1'R0 = tmp3 ! Partial result after iteration ! prior to the one causing the ! overflow/underflow R2<7:0> = tmp1 ! Number of iterations remaining R2<31:8> = implementation specific R3 = tmp2 ! Points to table entry causing ! exception R5'R4 = arg POLYH: R3'R2'R1'R0 = tmp3 ! Partial result after iteration ! prior to the one causing the ! overflow/underflow R4<7:0> = tmp1 ! Number of iterations remaining R4<31:8> = implementation specific R5 = tmp2 ! Points to table entry causing ! exception |
; To compute P(x) = C0 + C1*x + C2*x**2 ; where C0 = 1.0, C1 = .5, and C2 = .25 POLYF X,#2,PTABLE . . . PTABLE: .FLOAT 0.25 ; C2 .FLOAT 0.5 ; C1 .FLOAT 1.0 ; C0 |
Subtract
2operand: opcode sub.rx, dif.mx
3operand: opcode sub.rx, min.rx, dif.wx
N|| <--- dif LSS 0; | |
Z|| <--- dif EQL 0; | |
V|| <--- 0; | |
C|| <--- 0; |
42 | SUBF2 | Subtract F_floating 2 Operand |
43 | SUBF3 | Subtract F_floating 3 Operand |
62 | SUBD2 | Subtract D_floating 2 Operand |
63 | SUBD3 | Subtract D_floating 3 Operand |
42FD | SUBG2 | Subtract G_floating 2 Operand |
43FD | SUBG3 | Subtract G_floating 3 Operand |
62FD | SUBH2 | Subtract H_floating 2 Operand |
63FD | SUBH3 | Subtract H_floating 3 Operand |
In 2 operand format, the subtrahend operand is subtracted from the difference operand, and the difference is replaced by the rounded result. In 3 operand format, the subtrahend operand is subtracted from the minuend operand, and the difference operand is replaced by the rounded result.
Notes
Test
opcode src.rx
N|| <--- src LSS 0; | |
Z|| <--- src EQL 0; | |
V|| <--- 0; | |
C|| <--- 0; |
53 | TSTF | Test F_floating |
73 | TSTD | Test D_floating |
53FD | TSTG | Test G_floating |
73FD | TSTH | Test H_floating |
The condition codes are affected according to the value of the source operand.
Notes
Previous | Next | Contents | Index |
Copyright © Compaq Computer Corporation 1998. All rights reserved. Legal |
4515PRO_024.HTML
|