10 2 = mean this bit can be 0 or 1
12 opcode Name Desciptions
13 0010 0000 0000 0000 1000 0000 0100 1110 blr return from a functions
15 0222 2222 2222 2222 2222 2222 0011 1000 Li reg,#imm move a value to a register
17 2222 2222 2222 2222 2222 2222 1001 0022 stw reg,mem store a value into memory
19 2222 2222 2222 2222 2222 2222 1001 0122 stwu reg,mem store contain of reg to memory and
20 move reg to that memory position
24 Here how the primary opcode work
25 xxxx xxxx xxxx xxxx DDDS SSSS 3333 33DD
28 3 = it is the primary opcode
32 -------------------------
33 |bit order: 5432 10 67 |
34 ------- ------- ----------- ----
35 34: | 0c 00 | | e1 93 | stw r31,12(r1) 0000 1100 0000 0000 1110 0001 | 1001 00 | 00
36 38: | 14 00 | | 01 90 | stw r0,20(r1) 0001 0100 0000 0000 0000 0001 | 1001 00 | 11
37 ------- ------- ---------
39 | |--> Get source register R0-R31 (0xE1 & 0x1F) = 1
41 | |--> Get Dest register R0-R31 ((0xE1 & 0xE0)>>5) | ((0x90 & 0x3)<<3) = 31 or 0
42 | | (The adding the two last bit on the end is maybe wrong need examine it)
44 | --> Get the opcpde (0x90 & 0xFC)
47 The address offset 12 or 20
50 ---------------------------------------------------------
51 |bit order: pos 1111 1111 1111 1111 0000 0000 0000 0000 |
53 |---------------------------------------------------------|
54 | bits 0000 1100 0000 0000 1110 0001 1001 0000 |
55 ---------------------------------------------------------
56 | math (opcode>>2) & 0x3F |
57 ---------------------------------------------------------
60 ---------------------------------------------------------
61 |bit order: pos 1111 1111 1111 1111 0000 0000 0000 0000 |
63 |---------------------------------------------------------|
64 | bits 0000 1100 0000 0000 1110 0001 1001 0000 |
65 ---------------------------------------------------------
66 | math (((opcode & 0x3) << 3) | ((opcode & 0xE000) >> 13))|
67 ---------------------------------------------------------
70 ---------------------------------------------------------
71 |bit order: pos 1111 1111 1111 1111 0000 0000 0000 0000 |
73 |---------------------------------------------------------|
74 | bits 0000 1100 0000 0000 1110 0001 1001 0000 |
75 ---------------------------------------------------------
77 ---------------------------------------------------------