Motorola CPU32 Reference Manual page 207

Hide thumbs Also See for CPU32:
Table of Contents

Advertisement

TBLU
TBLUN
Unsigned table entries range from 0 to 2
long-word tables, respectively. Unsigned and unrounded table results are zero extend-
ed.
Rounding of the result is optionally selected via the 'R' instruction field. If R = 0 (TBLU),
the fractional portion is rounded according to the round-to-nearest algorithm. The
rounding procedure can be summarized by the following table.
Adjusted Difference Fraction
The adjusted difference is then added to the selected table entry. The rounded result
is returned in the destination data register, Dx. Only the portion of the register corre-
sponding to the selected size is affected.
31
BYTE
UNAFFECTED
WORD
UNAFFECTED
LONG
RESULT
If R = 1 (TABLUN), the result is returned in register Dx without rounding. If the size is
byte, the integer portion of the result is returned in Dx (15:8). The integer portion of a
word result is stored in Dx (23:8). The least significant 24 bits of a long result are stored
in Dx (31:8). Byte and word results are zero extended to fill the entire 32-bit register.
31
BYTE
ZERO EXTENDED
WORD
ZERO EXTENDED
LONG
RESULT
A long-word result contains only the least significant 24 bits of integer
precision.
CPU32
REFERENCE MANUAL
Table Lookup and Interpolate (Unsigned)
n < ½
n ≥ ½
24 23
UNAFFECTED
UNAFFECTED
RESULT
24 23
ZERO EXTENDED
RESULT
RESULT
INSTRUCTION SET
n–1
where n is 8, 16, or 32 for byte, word, and
Rounding Adjustment
+0
+1
16 15
8 7
UNAFFECTED
RESULT
RESULT
16 15
RESULT
RESULT
RESULT
NOTE
TBLU
TBLUN
0
RESULT
RESULT
RESULT
8 7
0
FRACTION
FRACTION
FRACTION
MOTOROLA
4-159

Advertisement

Table of Contents
loading

Table of Contents