MegaProcessor

Check-in [991e20501d]
Login

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

Overview
Comment:Test evaluation of postbytes for 0xd8..0xdb instructions.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:991e20501daa1b89dcf602803c416d38ee6de071
User & Date: jos 2015-07-06 21:30:51
Context
2015-07-06
21:36
Separated the evaluation test of the first byte for instructions 0xd8..0xdf check-in: 1c63c2103d user: jos tags: trunk
21:30
Test evaluation of postbytes for 0xd8..0xdb instructions. check-in: 991e20501d user: jos tags: trunk
2015-07-01
22:03
Minor corrections.. check-in: e41893a465 user: jos tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added rangetst.lua.





























































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env lua

function printf( f, ... )
	print( string.format(f, ...) );
end

--[[
--
firstbyte = {}

for i=0,7 do
	firstbyte[i+1] = 0xd8+i;
	dest = bit32.band(firstbyte[i+1],0x03);
	printf( "%02x : R%1x", firstbyte[i+1], dest );
end
--]]


--[[
-- table 'postbyte' holds the starting bytes for all the significant ranges
-- where the 0xd[8..b] instructions have an identical form.
--
-- The for-loop takes the value of byte[i], and the value of (byte[i+1] - 1)
-- as first and last byte of a significant range, and prints the value of (byte >> 3)
-- to show that the result will be the same for both bytes.
--]]

postbyte = {
0x00, 0x10, 0x20, 0x24, 0x28, 0x2c, 0x30, 0x34, 
0x38, 0x3c, 0x40, 0x50, 0x60, 0x64, 0x68, 0x6c,
0x70, 0x74, 0x78, 0x7c, 0x80, 0x90, 0xa0, 0xa4,
0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0, 0xd0,
0xe0, 0xe4, 0xe8, 0xec, 0xf0, 0xf4, 0xf8, 0xfc,
}


for i,b in ipairs(postbyte) do
	local out1 = bit32.rshift( b, 3);
	local nxtIndex = ( (i + 1) % (#postbyte+1) );
	if nxtIndex == 0 then nxtIndex = 1; end;
	local b2 = bit32.band( postbyte[nxtIndex] - 1 , 0xff );
	local out2 = bit32.rshift( b2, 3);
	printf( "%02x : %02x : %02x : %02x",b, b2, out1, out2 );
end

-- End of file