SGX543: Difference between revisions

From Vita Development Wiki
Jump to navigation Jump to search
Line 204: Line 204:
! 7 !! 6 !! 5 !! 4 !! 3 !! 2 !! 1 !! 0
! 7 !! 6 !! 5 !! 4 !! 3 !! 2 !! 1 !! 0
|-
|-
| colspan="5" style="text-align: center;" | opcode1 || colspan="3" style="text-align:center;" |  
| colspan="5" style="text-align: center;" | opcode1 || colspan="3" style="text-align:center;" | predicate
|-
|-
| 0 || 0 || 0 || 1 || 0 || 0 || 0 || 0
| 0 || 0 || 0 || 1 || 0 || || ||  
|}
|}
||  
||  
Line 215: Line 215:
|  ||  ||  ||  ||  ||  ||  ||  
|  ||  ||  ||  ||  ||  ||  ||  
|-
|-
| 0 || 0 || 0 || 0 || 0 || 0 || 0 || 0
| x || x || x || x || x || x || x || x
|}
|}
||  
||  
Line 224: Line 224:
|  ||  ||  ||  ||  ||  ||  ||  
|  ||  ||  ||  ||  ||  ||  ||  
|-
|-
| 0 || 0 || 0 || 0 || 0 || 0 || 0 || 0
| x || x || x || x || x || x || x || x
|}
|}
||  
||  

Revision as of 00:06, 9 February 2018

Instruction set

It looks like instructions are 8 bytes long. Roughly speaking - first 4 bytes contain opcode and addressing mode. Second 4 bytes contain operands encoding.

Bit encoding used in this reference.

value meaning
0 bit clear
1 bit set
x dont care
? unknown

0x00000000 - 0x08000000

Instructions: mad

Encoding:

7 6 5 4 3 2 1 0
opcode1 data_format predicate
0 0 0 0 0
7 6 5 4 3 2 1 0
x x x x x x x x
7 6 5 4 3 2 1 0
x x x x x x x x
7 6 5 4 3 2 1 0
? ? ? ? ? ? ? ?

Fields:

data_format:

2 value
0 f32
1 f16

predicate:

1 0 value
0 0
0 1 p0
1 0 !p0
1 1 Pn

Examples:

mad.f32
p0 mad.f32
!p0 mad.f32
Pn mad.f32
 
mad.f16
p0 mad.f16
!p0 mad.f16
Pn mad.f16

0x08000000 - 0x10000000

Instructions: mul.f32

Encoding:

7 6 5 4 3 2 1 0
opcode1 predicate
0 0 0 0 1
7 6 5 4 3 2 1 0
x x x x x x x x
7 6 5 4 3 2 1 0
x x x x x x x x
7 6 5 4 3 2 1 0
? ? ? ? ? ? ? ?

Fields:

predicate:

2 1 0 value
0 0 0
0 0 1 p0
0 1 0 p1
0 1 1 p2
1 0 0 !p0
1 0 1 !p1
1 1 0 !p2
1 1 1 Pn

Examples:

mul.f32
p0 mul.f32
p1 mul.f32
p2 mul.f32
!p0 mul.f32
!p1 mul.f32
!p2 mul.f32
Pn mul.f32

0x10000000 - 0x18000000

7 6 5 4 3 2 1 0
opcode1 predicate
0 0 0 1 0
7 6 5 4 3 2 1 0
x x x x x x x x
7 6 5 4 3 2 1 0
x x x x x x x x
7 6 5 4 3 2 1 0
? ? ? ? ? ? ? ?

0x18000000 - 0x20000000

7 6 5 4 3 2 1 0
opcode1
0 0 0 1 1 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
? ? ? ? ? ? ? ?

0x20000000 - 0x28000000

7 6 5 4 3 2 1 0
opcode1
0 0 1 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
? ? ? ? ? ? ? ?

0x28000000 - 0x30000000

7 6 5 4 3 2 1 0
opcode1
0 0 1 0 1 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
? ? ? ? ? ? ? ?

0x30000000 - 0x38000000

7 6 5 4 3 2 1 0
opcode1
0 0 1 1 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
? ? ? ? ? ? ? ?

0x38000000 - 0x40000000

7 6 5 4 3 2 1 0
opcode1
0 0 1 1 1 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
? ? ? ? ? ? ? ?

0x40000000 - 0x48000000

7 6 5 4 3 2 1 0
opcode1
0 1 0 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
? ? ? ? ? ? ? ?

0x48000000 - 0x50000000

7 6 5 4 3 2 1 0
opcode1
0 1 0 0 1 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
? ? ? ? ? ? ? ?

0x50000000 - 0x58000000

7 6 5 4 3 2 1 0
opcode1
0 1 0 1 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
? ? ? ? ? ? ? ?

0x58000000 - 0x60000000

7 6 5 4 3 2 1 0
opcode1
0 1 0 1 1 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
? ? ? ? ? ? ? ?

0x60000000 - 0x68000000

7 6 5 4 3 2 1 0
opcode1
0 1 1 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
? ? ? ? ? ? ? ?

0x68000000 - 0x70000000

7 6 5 4 3 2 1 0
opcode1
0 1 1 0 1 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0
7 6 5 4 3 2 1 0
? ? ? ? ? ? ? ?

0x70000000 - 0x78000000

7 6 5 4 3 2 1 0
opcode1
0 1 1 1 0 0 0 0
7 6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