Changed the encoding for add,and,branch instructions

This commit is contained in:
niravthakkar 2016-11-16 14:44:12 +05:30 committed by GitHub
parent 498f028e69
commit dcb977d1db

View File

@ -653,47 +653,83 @@ end)
-- Template strings for ARM instructions.
map_op = {
-- Basic data processing instructions.
add_2 = "00000000005a0000RX-a|00000000001aRR|00000000b9f80000RRF-a|00000000e35a0000RXY-a|00000000e3080000RXY-a",
--add
ar = "0000000000001a00", --RR
ay = "0000e3000000005a", --RXY-a
ag = "0000e30000000008",
agr = "00000000b9080000", --RRE
agf = "0000e30000000018",
agfr = "00000000b9180000",
agbr = "00000000b34a0000",
adbr = "00000000b31a0000",
aebr = "00000000b30a0000",
ah = "000000004a000000", --RXa
ahy = "0000e3000000007a",
afi = "0000c20900000000", --RIL-a --pls check if this is correct
agfi = "0000c20800000000",
aih = "0000cc0800000000",
al = "000000005e000000",
alr = "0000000000001e00",
aly = "0000e3000000005e", -- RXY-a
alg = "0000e3000000000a",
algr = "00000000b90a0000",
algf = "0000e3000000001a",
algfr = "00000000b91a0000",
alfi = "0000c20b00000000",
algfi = "0000c20a00000000",
alc = "0000e30000000098",
alcr = "00000000b9980000", -- RRE
alcg = "0000e30000000088",
alcgr = "00000000b9880000",
alsih = "0000cc0a00000000",
alsihn ="0000cc0b00000000",
axr = "0000000000003600", -- RR
ad = "000000006a000000", -- Rx-a
adr = "0000000000002a00",
ae = "000000007a000000",
aer = "0000000000003a00",
aw = "000000006e000000",
awr = "0000000000002e00",
au = "000000007e000000",
aur = "0000000000003e00",
-- and has several possible ways, need to find one, currently added two type of
and_2 = "0000000000540000RX-a|00000000140000RR|00000000b9f4RRF-a|00000000e3540000RXY-a|00000000b9800000RRE| 00000000b9e40000RRF-a",
and_c = "0000000000d40000SS-a",
and_i = "0000000000940000SI|00000000eb540000SIY",
-- and
n = "0000000054000000",
nr = "0000000000001400",
ny = "0000e30000000054", -- RXY-a
ng = "0000e30000000080",
ngr = "00000000b9800000",
nihf = "0000c00a00000000", --RIL-a
nihl = "0000c00b00000000",
and_2 = "0000000000540000RX-a|0000000000140000RR|00000000b9f40000RRF-a|00000000e3540000RXY-a",
and_3 = "00000000e3800000RXY-a|00000000b9800000RRE|00000000b9e40000RRF-a",
and_c = "0000000000d40000SS-a",
and_i = "0000000000940000SI",
and_i4 = "00000000eb540000SIY"
and_i3 = "000000000a540000RI-a|000000000a550000RI-a|000000000c0a0000RIL-a|000000000a560000RI-a|000000000a570000RI-a|000000000c0bRIL-a"
--branch related instrcutions
bal = "0000000000450000RX-a",
balr = "0000000000050000RR",
bas = "00000000004d0000RX-a",
basr = "00000000000d0000RR",
bassm = "00000000000c0000RR",
bsm = "00000000000b0000RR",
bc = "0000000000470000Rx-b",
bcr = "00000000000070000RR",
bct = "0000000000460000RX-a",
bctr = "0000000000060000RR",
bctg = "00000000e3460000RXY-a",
bctgr = "00000000b9460000RRE",
bxh = "0000000000860000RS-a",
bxhg = "00000000eb440000RSY-a",
bxle = "0000000000870000RS-a",
bxleg = "00000000eb450000RSY-a",
bras = "000000000a750000RI-b",
brasl = "000000000c050000RIL-b",
brc = "000000000a740000RI-c",
brcl = "000000000c040000RIL-c",
brct = "000000000a760000RI-b",
brctg = "000000000a770000RI-b",
brctg = "00000000occ60000RIL-b",
brxh = "0000000000840000RSI",
brxhg = "00000000ec440000RIE-e",
brxle = "0000000000850000RSI",
brxlg = "00000000ec450000RIE-e",
bal = "0000000045000000", --RX-a
balr = "0000000000005000", --RR
bas = "000000004d000000",
basr = "0000000000000d00", -- this has leading zero in the instrcution opcode: 0d, need to take into consideration
bassm = "0000000000000c00",
bsm = "0000000000000b00",
bc = "0000000047000000",
bcr = "0000000000000700",
bct = "0000000046000000",
bctr = "0000000000000600",
bctg = "0000e30000000046",
bctgr = "00000000b9460000",
bxh = "0000000086000000", --RS-a
bxhg = "0000eb0000000044",
bxle = "0000000087000000",
bxleg = "0000eb0000000045", -- RSY-a
--bras = "000000000a750000RI-b",
brasl = "0000c00500000000", --RIL-b
--brc = "000000000a740000RI-c",
brcl = "0000c00400000000", --RIL-c
--brct = "000000000a760000RI-b",
--brctg = "000000000a770000RI-b",
brcth = "0000cc0600000000",
--brxh = "0000000000840000RSI",
--brxhg = "00000000ec440000RIE-e",
--brxle = "0000000000850000RSI",
--brxlg = "00000000ec450000RIE-e",
----subtraction (basic operation)
sub = "00000000005b0000RX-a"