Sun Microelectronics
219
13. UltraSPARC Extended Instructions
13.5.8 Edge Handling Instructions
Format (3):
Description:
These instructions are used to handle the boundary conditions for parallel pixel
scan line loops, where src1 is the address of the next pixel to render and src2 is
the address of the last pixel in the scan line.
EDGE8L, EDGE16L, and EDGE32L are little-endian versions of EDGE8, EDGE16
and EDGE32. They produce an edge mask that is bit reversed from their big-en-
dian counterparts, but are otherwise the same. This makes the mask consistent
with the mask generated by the graphics compare operations (see Section 13.5.7,
“Pixel Compare Instructions,” on page 217) on little-endian data.
A 2- (EDGE32), 4- (EDGE16), or 8-bit (EDGE8) pixel mask is stored in the least
significant bits of rd. The mask is computed from left and right edge masks as fol-
lows:
1.
The left edge mask is computed from the 3 least significant bits (LSBs) of
rs1 and the right edge mask is computed from the 3 LSBs of rs2, according
to Table 13-1 (Table 13-2 for little-endian byte ordering).
opcode
opf
operation
EDGE8
0 0000 0000
Eight 8-bit edge boundary processing
EDGE8L
0 0000 0010
Eight 8-bit edge boundary processing, little-
endian
EDGE16
0 0000 0100
Four 16-bit edge boundary processing
EDGE16L
0 0000 0110
Four 16-bit edge boundary processing, little-
endian
EDGE32
0 0000 1000
Four 32-bit edge boundary processing
EDGE32L
0 0000 1010
Two 32-bit edge boundary processing, little-
endian
Suggested Assembly Language Syntax
edge8
reg
rs1
,
reg
rs2
,
reg
rd
edge8l
reg
rs1
,
reg
rs2
,
reg
rd
edge16
reg
rs1
,
reg
rs2
,
reg
rd
edge16l
reg
rs1
,
reg
rs2
,
reg
rd
edge32
reg
rs1
,
reg
rs2
,
reg
rd
edge32l
reg
rs1
,
reg
rs2
,
reg
rd
10
11 0110
rs2
rd
rs1
31
14
19
24
18
13
0
25
30 29
4
opf
5
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com