Motorola CPU32 Reference Manual page 217

M68300 series central processor unit
Hide thumbs Also See for CPU32:
Table of Contents

Advertisement

III
TBLU
TBLUN
Table Lookup and Interpolate (Unsigned)
TBLU
TBLUN
Unsigned table entries range from 0 to 2n-1 where n is 8, 16, or 32 for byte, word, and long-word
tables, respectively. Unsigned and unrounded table results are zero extended.
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
Rounding
Fraction
Adjustment
1
+0
n<2'
n>1
-2
+1
The adjusted difference is then added to the selected table entry. The rounded result is returned
in the destination data register, Ox. Only the portion of the register corresponding to the selected
size is affected.
BYTE
WORD
LONG
31
UNAFFECTED
UNAFFECTED
RESULT
24
23
16
15
UNAFFECTED
UNAFFECTED
RESULT
8
7
o
UNAFFECTED
RESULT
RESULT
RESULT
RESULT
RESULT
If R
=
1 (TABLUN), the result is returned in register Ox without rounding. If the size is byte, the
integer portion of the result is returned in Ox (15:8). The integer portion of a word result is stored
in Ox (23:8). The least significant 24 bits of a long result are stored in Ox (31 :8). Byte and word
results are zero extended to fill the entire 32-bit register.
BYTE
WORD
LONG
MOTOROLA
4-164
31
24
23
16
15
8
7
o
ZERO EXTENDED
ZERO EXTENDED
RESULT
FRACTION
ZERO EXTENDED
RESULT
RESULT
FRACTION
RESULT
RESULT
RESULT
FRACTION
NOTE
A long-word result contains only the least significant 24 bits of integer preCision.
INSTRUCTION SET
CPU32 REFERENCE MANUAL

Advertisement

Table of Contents
loading

Table of Contents