MegaProcessor

Check-in [37476051d2]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added table with postbytes for instructions 0xd8..0xdb (shifts/rotates) Have script `tools/gen_bitops.lua` leave a signature in its output.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:37476051d2c952c40bc9886ef588ea7dc0e5d8b3
User & Date: jos 2015-10-09 10:11:37
Context
2015-10-09
10:28
Typo-fix in .WT part of the 0xd8..0xdb postbyte table. check-in: ade7e89880 user: jos tags: trunk
10:11
Added table with postbytes for instructions 0xd8..0xdb (shifts/rotates) Have script `tools/gen_bitops.lua` leave a signature in its output. check-in: 37476051d2 user: jos tags: trunk
2015-10-06
17:12
Flagged all opcode-instructions that still return dummy byte values. check-in: eb9ed1ec92 user: jos tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to bit_ops.txt.

69
70
71
72
73
74
75
























76
77
78
79
80
81
82
...
118
119
120
121
122
123
124
125

0xe8..0xeb  :   ROXL.WT Rx, R0 .. R3
0xec..0xef  :   -- Redundant (4)
0xf0..0xf3  :	ROXR Rx,    R0 .. R3
0xf4..0xf7  :   -- Redundant (4)
0xf8..0xfb  :   ROXR.WT Rx, R0 .. R3
0xfc..0xff  :   -- Redundant (4)
</table>

























Decoding of second byte [b2] for instructions 0xDC..0xDF

There are 8 different instructions in the category 'test-or-set'.
These are positioned at the bytes with even values for the high-nibble.
<table>
2nd byte    : fixed part : variable part
................................................................................
0xed..0xef  :   -- Redundant
0xf0..0xf3  :   -- Redundant
0xf4..0xf7  :   -- Redundant
0xf8..0xfc  :   -- Redundant
0xfd..0xff  :   -- Redundant

</table>









>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 








>
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
142
143
144
145
146
147
148
149
150
0xe8..0xeb  :   ROXL.WT Rx, R0 .. R3
0xec..0xef  :   -- Redundant (4)
0xf0..0xf3  :	ROXR Rx,    R0 .. R3
0xf4..0xf7  :   -- Redundant (4)
0xf8..0xfb  :   ROXR.WT Rx, R0 .. R3
0xfc..0xff  :   -- Redundant (4)
</table>

Encoding of mnemonic into 2nd byte [b2] for instruction-byte [b1] 0xD8..0xDB

<table>
-----------------------------------------------------------------------------
                LSL             ASL             ROL             ROXL
                LSR             ASR             ROR             ROXR
-----------------------------------------------------------------------------
#0..#15         0x00..0x0f      0x40..0x4f      0x80..0x8f      0xc0..0xcf
                   ---             ---             ---             ---

#-16..#-1       0x10..0x1f      0x50..0x5f      0x90..0x9f      0xd0..0xdf
                   ---             ---             ---             ---

R0..R3          0x20..0x23      0x60..0x63      0xa0..0xa3      0xe0..0xe3
                0x30..0x33      0x70..0x73      0xb0..0xb3      0xf0..0xf3
-----------------------------------------------------------------------------
                LSL.WT           ASL.WT            ROL.WT        ROXL.WT
                LSR.WT           ASR.WT            ROR.WT        ROXR.WT

R8..Rb          0x28..0x2b      0x68..0x6b      0xa8..0xab      0xe8..0xeb
                0x38..0x3b      0x78..0x7b      0xb8..0xbb      0xf8..0xfb
-----------------------------------------------------------------------------
</table>

Decoding of second byte [b2] for instructions 0xDC..0xDF

There are 8 different instructions in the category 'test-or-set'.
These are positioned at the bytes with even values for the high-nibble.
<table>
2nd byte    : fixed part : variable part
................................................................................
0xed..0xef  :   -- Redundant
0xf0..0xf3  :   -- Redundant
0xf4..0xf7  :   -- Redundant
0xf8..0xfc  :   -- Redundant
0xfd..0xff  :   -- Redundant

</table>


Changes to tools/gen_bitops.lua.

1
2

3
4
5
6
7
8
9
..
11
12
13
14
15
16
17




18
19
20
21
22
23
24
--
-- One-off tool to generate an assembly source with all the possible bit shift/rotate/test/set/change instructions.

--


local L_Shift_rotate_instr = {
    "LSL", "ASL", "ROL", "ROXL" 
};

................................................................................
    "LSR", "ASR", "ROR", "ROXR"
};


local Bit_instruction = {
    "BTST", "BCHG", "BCLR", "BSET"
};





for _,v in ipairs(L_Shift_rotate_instr) do
    for i=0,3 do
        for j=0,15 do
            print( string.format("   %s R%d, #%d",v,i,j) );
        end
        for j=-16,-1 do


>







 







>
>
>
>







1
2
3
4
5
6
7
8
9
10
..
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--
-- One-off tool to generate an assembly source with all the possible bit shift/rotate/test/set/change instructions.
-- Cmd line usage: lua 'thisfile' > 'outfile'.
--


local L_Shift_rotate_instr = {
    "LSL", "ASL", "ROL", "ROXL" 
};

................................................................................
    "LSR", "ASR", "ROR", "ROXR"
};


local Bit_instruction = {
    "BTST", "BCHG", "BCLR", "BSET"
};

print( '//' );
print( '// Generated by gen_bitops.lua' );
print( '//' );

for _,v in ipairs(L_Shift_rotate_instr) do
    for i=0,3 do
        for j=0,15 do
            print( string.format("   %s R%d, #%d",v,i,j) );
        end
        for j=-16,-1 do