Commit b7d6ffa1 authored by Benedikt Geßele's avatar Benedikt Geßele

support for all revision 6 instructions

parent b7d7e499
......@@ -23,7 +23,7 @@ GDSL_OPT_HL=specifications/rreil/rreil-liveness.ml specifications/rreil/rreil-fo
GDSL_MIPS_HL_R5=specifications/mips/mips_r5.ml specifications/mips/mips-pretty_r5.ml specifications/mips/mips-rreil-translator_r5.ml specifications/mips/mips-asm_r5.ml specifications/mips/mips-traverse_r5.ml
GDSL_MIPS_HL_R6=specifications/mips/mips_r6.ml specifications/mips/mips-pretty_r6.ml specifications/mips/mips-rreil-translator_r6.ml specifications/mips/mips-asm_r6.ml specifications/mips/mips-traverse_r6.ml
GDSL_MIPS_HL=specifications/mips/mips.ml specifications/mips/mips-pretty.ml specifications/mips/mips-rreil-pretty.ml specifications/mips/mips-rreil-registermapping.ml specifications/mips/mips-rreil-translator.ml specifications/mips/mips-liveness.ml specifications/mips/mips-asm.ml specifications/mips/mips-traverse.ml $(GDSL_MIPS_HL_R6)
GDSL_MIPS_HL=specifications/mips/mips.ml specifications/mips/mips-pretty.ml specifications/mips/mips-rreil-pretty.ml specifications/mips/mips-rreil-registermapping.ml specifications/mips/mips-rreil-translator.ml specifications/mips/mips-liveness.ml specifications/mips/mips-asm.ml specifications/mips/mips-traverse.ml $(GDSL_MIPS_HL_R5)
GDSL_MIPS_TRANS_HL=
GDSL_SOURCES=$(GDSL_BASIS_HL) $(GDSL_RREIL_HL) $(GDSL_MIPS_HL) $(GDSL_MIPS_TRANS_HL) $(GDSL_OPT_HL) $(GDSL_ASM_HL)
......
......@@ -9,5 +9,6 @@ in case i of
| OFFSET23 i: inner i 23
| OFFSET28 i: inner i 28
| C2CONDITION i: inner i 5
| CODE16 i: inner i 16
end end
......@@ -44,6 +44,7 @@ val revision/show/immediate imm =
| OFFSET23 x: show-int (zx x)
| OFFSET28 x: show-int (zx x)
| C2CONDITION x: show-int (zx x)
| CODE16 x: show-int (zx x)
end
val revision/show/format format = "ERROR"
......@@ -1160,57 +1160,6 @@ val sem-sc x = do
write x.op1 (var temp)
end
val sem-swl x = do
rt <- rval Signed x.op1;
off/base <- rval Signed x.op2;
base <- return (extract-tuple off/base).opnd1;
off <- return (extract-tuple off/base).opnd2;
size <- return (sizeof-rval x.op1);
vaddr <- mktemp;
add size vaddr base off;
bcpu <- is-big-endian-cpu;
bcpu2 <- mktemp;
movsx 2 bcpu2 1 bcpu;
byte <- mktemp;
xorb 2 byte (var vaddr) (var bcpu2);
shl 32 byte (var byte) (imm 3);
rshift <- mktemp;
sub size rshift (imm 24) (var byte);
memword <- mktemp;
shr size memword rt (var rshift);
store 32 (address size (var vaddr)) (var memword)
end
val sem-swr x = do
rt <- rval Signed x.op1;
off/base <- rval Signed x.op2;
base <- return (extract-tuple off/base).opnd1;
off <- return (extract-tuple off/base).opnd2;
size <- return (sizeof-rval x.op1);
vaddr <- mktemp;
add size vaddr base off;
bcpu <- is-big-endian-cpu;
bcpu2 <- mktemp;
movsx 2 bcpu2 1 bcpu;
byte <- mktemp;
xorb 2 byte (var vaddr) (var bcpu2);
shl 32 byte (var byte) (imm 3);
lshift <- mktemp;
memword <- mktemp;
shr size memword rt (var byte);
store 32 (address size (var vaddr)) (var memword)
end
val sem-sdbbp x = do
debugDM <- return (fDM);
......@@ -1271,22 +1220,6 @@ val sem-tlt x = sem-t /lts x
val sem-tltu x = sem-t /ltu x
val sem-tne x = sem-t /neq x
val sem-ti cmp_op signedness x = do
rs <- rval signedness x.op1;
imm <- rval signedness x.op2;
size <- return (sizeof-rval x.op1);
_if (cmp_op size rs imm) _then
throw-exception SEM_EXC_TRAP
end
val sem-teqi x = sem-ti /eq Signed x
val sem-tgei x = sem-ti /ges Signed x
val sem-tgeiu x = sem-ti /geu Unsigned x
val sem-tlti x = sem-ti /lts Signed x
val sem-tltiu x = sem-ti /ltu Unsigned x
val sem-tnei x = sem-ti /neq Signed x
val sem-wsbh x = do
rt <- rval Unsigned x.op2;
size <- return (sizeof-rval x.op2);
......@@ -1433,24 +1366,15 @@ val semantics i =
| SUB x: sem-sub x
| SUB-fmt x: sem-default-ternop-flrr-generic i x
| SUBU x: sem-subu x
| SUXC1 x: sem-default-binop-rr-tuple-generic i x
| SW x: sem-sw x
| SWC1 x: sem-default-binop-rr-tuple-generic i x
| SWC2 x: sem-default-binop-rr-tuple-generic i x
| SWE x: sem-sw x
| SWL x: sem-swl x
| SWLE x: sem-swl x
| SWR x: sem-swr x
| SWRE x: sem-swr x
| SWXC1 x: sem-default-binop-rr-tuple-generic i x
| SYNC x: sem-default-unop-r-generic i x
| SYNCI x: sem-default-unop-r-tuple-generic i x
| SYSCALL x: sem-syscall
| TEQ x: sem-teq x
| TEQI x: sem-teqi x
| TGE x: sem-tge x
| TGEI x: sem-tgei x
| TGEIU x: sem-tgeiu x
| TGEU x: sem-tgeu x
| TLBINV: sem-default-nullop-generic i
| TLBINVF: sem-default-nullop-generic i
......@@ -1459,11 +1383,8 @@ val semantics i =
| TLBWI: sem-default-nullop-generic i
| TLBWR: sem-default-nullop-generic i
| TLT x: sem-tlt x
| TLTI x: sem-tlti x
| TLTIU x: sem-tltiu x
| TLTU x: sem-tltu x
| TNE x: sem-tne x
| TNEI x: sem-tnei x
| TRUNC-L-fmt x: sem-default-binop-flr-generic i x
| TRUNC-W-fmt x: sem-default-binop-flr-generic i x
| WAIT x: sem-default-unop-r-generic i x
......
......@@ -282,6 +282,74 @@ val sem-mul x = do
write x.op1 (var res)
end
val sem-swl x = do
rt <- rval Signed x.op1;
off/base <- rval Signed x.op2;
base <- return (extract-tuple off/base).opnd1;
off <- return (extract-tuple off/base).opnd2;
size <- return (sizeof-rval x.op1);
vaddr <- mktemp;
add size vaddr base off;
bcpu <- is-big-endian-cpu;
bcpu2 <- mktemp;
movsx 2 bcpu2 1 bcpu;
byte <- mktemp;
xorb 2 byte (var vaddr) (var bcpu2);
shl 32 byte (var byte) (imm 3);
rshift <- mktemp;
sub size rshift (imm 24) (var byte);
memword <- mktemp;
shr size memword rt (var rshift);
store 32 (address size (var vaddr)) (var memword)
end
val sem-swr x = do
rt <- rval Signed x.op1;
off/base <- rval Signed x.op2;
base <- return (extract-tuple off/base).opnd1;
off <- return (extract-tuple off/base).opnd2;
size <- return (sizeof-rval x.op1);
vaddr <- mktemp;
add size vaddr base off;
bcpu <- is-big-endian-cpu;
bcpu2 <- mktemp;
movsx 2 bcpu2 1 bcpu;
byte <- mktemp;
xorb 2 byte (var vaddr) (var bcpu2);
shl 32 byte (var byte) (imm 3);
lshift <- mktemp;
memword <- mktemp;
shr size memword rt (var byte);
store 32 (address size (var vaddr)) (var memword)
end
val sem-ti cmp_op signedness x = do
rs <- rval signedness x.op1;
imm <- rval signedness x.op2;
size <- return (sizeof-rval x.op1);
_if (cmp_op size rs imm) _then
throw-exception SEM_EXC_TRAP
end
val sem-teqi x = sem-ti /eq Signed x
val sem-tgei x = sem-ti /ges Signed x
val sem-tgeiu x = sem-ti /geu Unsigned x
val sem-tlti x = sem-ti /lts Signed x
val sem-tltiu x = sem-ti /ltu Unsigned x
val sem-tnei x = sem-ti /neq Signed x
val revision/semantics i =
case i of
......@@ -353,4 +421,16 @@ val revision/semantics i =
| PUL-PS x: sem-default-ternop-lrr-generic i x
| PUU-PS x: sem-default-ternop-lrr-generic i x
| SDXC1 x: sem-default-binop-rr-tuple-generic i x
| SUXC1 x: sem-default-binop-rr-tuple-generic i x
| SWL x: sem-swl x
| SWLE x: sem-swl x
| SWR x: sem-swr x
| SWRE x: sem-swr x
| SWXC1 x: sem-default-binop-rr-tuple-generic i x
| TEQI x: sem-teqi x
| TGEI x: sem-tgei x
| TGEIU x: sem-tgeiu x
| TLTI x: sem-tlti x
| TLTIU x: sem-tltiu x
| TNEI x: sem-tnei x
end
......@@ -8,6 +8,7 @@ val revision/sizeof-imm imm =
| OFFSET23 i: 23
| OFFSET28 i: 28
| C2CONDITION i: 5
| CODE16 i: 16
end
val revision/rval-imm sn x = let
......@@ -26,6 +27,7 @@ in
| OFFSET23 i: from-vec sn i
| OFFSET28 i: from-vec sn i
| C2CONDITION i: from-vec sn i
| CODE16 i: from-vec sn i
end
end
......@@ -324,6 +326,8 @@ end
val sem-seleqz x = sem-sel /eq x
val sem-selnez x = sem-sel /neq x
val sem-sigrie x = throw-exception SEM_EXC_RESERVED_INSTRUCTION
val revision/semantics i =
case i of
ADDIUPC x: sem-addiupc x
......@@ -386,4 +390,5 @@ val revision/semantics i =
| SELNEZ x: sem-selnez x
| SELEQZ-fmt x: sem-default-ternop-flrr-generic i x
| SELNEQZ-fmt x: sem-default-ternop-flrr-generic i x
| SIGRIE x: sem-sigrie x
end
......@@ -138,24 +138,15 @@ val traverse f insn =
| SUB x: f "SUB" (TERNOP_LRR x)
| SUB-fmt x: f "SUB" (TERNOP_FLRR x)
| SUBU x: f "SUBU" (TERNOP_LRR x)
| SUXC1 x: f "SUXC1" (BINOP_RR x)
| SW x: f "SW" (BINOP_RR x)
| SWC1 x: f "SWC1" (BINOP_RR x)
| SWC2 x: f "SWC2" (BINOP_RR x)
| SWE x: f "SWE" (BINOP_RR x)
| SWL x: f "SWL" (BINOP_RR x)
| SWLE x: f "SWLE" (BINOP_RR x)
| SWR x: f "SWR" (BINOP_RR x)
| SWRE x: f "SWRE" (BINOP_RR x)
| SWXC1 x: f "SWXC1" (BINOP_RR x)
| SYNC x: f "SYNC" (UNOP_R x)
| SYNCI x: f "SYNCI" (UNOP_R x)
| SYSCALL x: f "SYSCALL" (UNOP_R x)
| TEQ x: f "TEQ" (TERNOP_RRR x)
| TEQI x: f "TEQI" (BINOP_RR x)
| TGE x: f "TGE" (TERNOP_RRR x)
| TGEI x: f "TGEI" (BINOP_RR x)
| TGEIU x: f "TGEIU" (BINOP_RR x)
| TGEU x: f "TGEU" (TERNOP_RRR x)
| TLBINV: f "TLBINV" (NULLOP)
| TLBINVF: f "TLBINVF" (NULLOP)
......@@ -164,11 +155,8 @@ val traverse f insn =
| TLBWI: f "TLBWI" (NULLOP)
| TLBWR: f "TLBWR" (NULLOP)
| TLT x: f "TLT" (TERNOP_RRR x)
| TLTI x: f "TLTI" (BINOP_RR x)
| TLTIU x: f "TLTIU" (BINOP_RR x)
| TLTU x: f "TLTU" (TERNOP_RRR x)
| TNE x: f "TNE" (TERNOP_RRR x)
| TNEI x: f "TNEI" (BINOP_RR x)
| TRUNC-L-fmt x: f "TRUNC.L" (BINOP_FLR x)
| TRUNC-W-fmt x: f "TRUNC.W" (BINOP_FLR x)
| WAIT x: f "WAIT" (UNOP_R x)
......
......@@ -68,4 +68,16 @@ val revision/traverse f insn =
| PUL-PS x: f "PUL.PS" (TERNOP_LRR x)
| PUU-PS x: f "PUU.PS" (TERNOP_LRR x)
| SDXC1 x: f "SDXC1" (BINOP_RR x)
| SUXC1 x: f "SUXC1" (BINOP_RR x)
| SWL x: f "SWL" (BINOP_RR x)
| SWLE x: f "SWLE" (BINOP_RR x)
| SWR x: f "SWR" (BINOP_RR x)
| SWRE x: f "SWRE" (BINOP_RR x)
| SWXC1 x: f "SWXC1" (BINOP_RR x)
| TEQI x: f "TEQI" (BINOP_RR x)
| TGEI x: f "TGEI" (BINOP_RR x)
| TGEIU x: f "TGEIU" (BINOP_RR x)
| TLTI x: f "TLTI" (BINOP_RR x)
| TLTIU x: f "TLTIU" (BINOP_RR x)
| TNEI x: f "TNEI" (BINOP_RR x)
end
......@@ -60,4 +60,5 @@ val revision/traverse f insn =
| SELNEZ x: f "SELNEZ" (TERNOP_LRR x)
| SELEQZ-fmt x: f "SELEQZ" (TERNOP_FLRR x)
| SELNEQZ-fmt x: f "SELNEQZ" (TERNOP_FLRR x)
| SIGRIE x: f "SIGRIE" (UNOP_R x)
end
......@@ -594,18 +594,10 @@ val / ['000000 /rs /rt /rd 0000 0 000110'] = ternop SRLV rd (right rt) (right rs
### - Subtract Word
val / ['000000 /rs /rt /rd 00000 100010'] = ternop SUB rd (right rs) (right rt)
### SUB-fmt
### - Floating Point Subtract
val / ['010001 /fmt5sdps /ft /fs /fd 000001'] = ternop-fmt SUB-fmt fmt fd (right fs) (right ft)
### SUBU
### - Subtract Unsigned Word
val / ['000000 /rs /rt /rd 00000 100011'] = ternop SUBU rd (right rs) (right rt)
### SUXC1
### - Store Doubleword Indexed Unaligned from Floating Point
val / ['010011 /base /index /fs 00000 001101'] = binop SUXC1 (right fs) index/base
### SW
### - Store Word
val / ['101011 /base /rt /offset16'] = binop SW (right rt) offset16/base
......@@ -620,30 +612,6 @@ val / ['011111 /base /rt /offset9 0 011111']
| asmode? = nullop UNDEFINED
| otherwise = binop SWE (right rt) offset9/base
### SWL
### - Store Word Left
val / ['101010 /base /rt /offset16'] = binop SWL (right rt) offset16/base
### SWLE
### - Store Word Left EVA
val / ['011111 /base /rt /offset9 0 100001']
| asmode? = nullop UNDEFINED
| otherwise = binop SWLE (right rt) offset9/base
### SWR
### - Store Word Right
val / ['101110 /base /rt /offset16'] = binop SWR (right rt) offset16/base
### SWRE
### - Store Word Right EVA
val / ['011111 /base /rt /offset9 0 100010']
| asmode? = nullop UNDEFINED
| otherwise = binop SWRE (right rt) offset9/base
### SWXC1
### - Store Word Indexed from Floating Point
val / ['010011 /base /index /fs 00000 001000'] = binop SWXC1 (right fs) index/base
### SYNC
### - Synchronize Shared Memory
val / ['000000 000000000000000 /stype 001111'] = unop SYNC stype
......@@ -660,22 +628,10 @@ val / ['000000 /code20 001100'] = unop SYSCALL code20
### - Trap if Equal
val / ['000000 /rs /rt /code10 110100'] = ternop TEQ (right rs) (right rt) code10
### TEQI
### - Trap if Equal Immediate
val / ['000001 /rs 01100 /immediate16'] = binop TEQI (right rs) immediate16
### TGE
### - Trap if Greater or Equal
val / ['000000 /rs /rt /code10 110000'] = ternop TGE (right rs) (right rt) code10
### TGEI
### - Trap if Greater or Equal Immediate
val / ['000001 /rs 01000 /immediate16'] = binop TGEI (right rs) immediate16
### TGEIU
### - Trap if Greater or Equal Immediate Unsigned
val / ['000001 /rs 01001 /immediate16'] = binop TGEIU (right rs) immediate16
### TGEU
### - Trap if Greater or Equal Unsigned
val / ['000000 /rs /rt /code10 110001'] = ternop TGEU (right rs) (right rt) code10
......@@ -712,14 +668,6 @@ val / ['010000 1 0000000000000000000 000110'] = nullop TLBWR
### - Trap if Less Than
val / ['000000 /rs /rt /code10 110010'] = ternop TLT (right rs) (right rt) code10
### TLTI
### - Trap if Less Than Immediate
val / ['000001 /rs 01010 /immediate16'] = binop TLTI (right rs) immediate16
### TLTIU
### - Trap if Less Than Immediate Unsigned
val / ['000001 /rs 01011 /immediate16'] = binop TLTIU (right rs) immediate16
### TLTU
### - Trap if Less Than Unsigned
val / ['000000 /rs /rt /code10 110011'] = ternop TLTU (right rs) (right rt) code10
......@@ -728,10 +676,6 @@ val / ['000000 /rs /rt /code10 110011'] = ternop TLTU (right rs) (right rt) code
### - Trap if Not Equal
val / ['000000 /rs /rt /code10 110110'] = ternop TNE (right rs) (right rt) code10
### TNEI
### - Trap if Not Equal Immediate
val / ['000001 /rs 01110 /immediate16'] = binop TNEI (right rs) immediate16
### TRUNC-L-fmt
### - Floating Point Truncate to Long Fixed Point
val / ['010001 /fmt5sd 00000 /fs /fd 001001'] = binop-fmt TRUNC-L-fmt fmt fd (right fs)
......@@ -1196,24 +1140,15 @@ type instruction =
| SUB of ternop-lrr
| SUB-fmt of ternop-flrr
| SUBU of ternop-lrr
| SUXC1 of binop-rr
| SW of binop-rr
| SWC1 of binop-rr
| SWC2 of binop-rr
| SWE of binop-rr
| SWL of binop-rr
| SWLE of binop-rr
| SWR of binop-rr
| SWRE of binop-rr
| SWXC1 of binop-rr
| SYNC of unop-r
| SYNCI of unop-r
| SYSCALL of unop-r
| TEQ of ternop-rrr
| TEQI of binop-rr
| TGE of ternop-rrr
| TGEI of binop-rr
| TGEIU of binop-rr
| TGEU of ternop-rrr
| TLBINV
| TLBINVF
......@@ -1222,11 +1157,8 @@ type instruction =
| TLBWI
| TLBWR
| TLT of ternop-rrr
| TLTI of binop-rr
| TLTIU of binop-rr
| TLTU of ternop-rrr
| TNE of ternop-rrr
| TNEI of binop-rr
| TRUNC-L-fmt of binop-flr
| TRUNC-W-fmt of binop-flr
| WAIT of unop-r
......@@ -1307,9 +1239,7 @@ type gpr-register =
####
type sp-register =
HI
| LO
| PC
PC
| SREG
......
......@@ -331,10 +331,68 @@ val / ['111110 /base /rt /offset16'] = binop SDC2 rt/imm offset16/base
### - Store Doubleword Indexed from Floating Point
val / ['010011 /base /index /fs 00000 001001'] = binop SDXC1 (right fs) index/base
### SUB-fmt
### - Floating Point Subtract
val / ['010001 /fmt5sdps /ft /fs /fd 000001'] = ternop-fmt SUB-fmt fmt fd (right fs) (right ft)
### SUXC1
### - Store Doubleword Indexed Unaligned from Floating Point
val / ['010011 /base /index /fs 00000 001101'] = binop SUXC1 (right fs) index/base
### SWC2
### - Store Word from Coprocessor 2
val / ['111010 /base /rt /offset16'] = binop SWC2 rt/imm offset16/base
### SWL
### - Store Word Left
val / ['101010 /base /rt /offset16'] = binop SWL (right rt) offset16/base
### SWLE
### - Store Word Left EVA
val / ['011111 /base /rt /offset9 0 100001']
| asmode? = nullop UNDEFINED
| otherwise = binop SWLE (right rt) offset9/base
### SWR
### - Store Word Right
val / ['101110 /base /rt /offset16'] = binop SWR (right rt) offset16/base
### SWRE
### - Store Word Right EVA
val / ['011111 /base /rt /offset9 0 100010']
| asmode? = nullop UNDEFINED
| otherwise = binop SWRE (right rt) offset9/base
### SWXC1
### - Store Word Indexed from Floating Point
val / ['010011 /base /index /fs 00000 001000'] = binop SWXC1 (right fs) index/base
### TEQI
### - Trap if Equal Immediate
val / ['000001 /rs 01100 /immediate16'] = binop TEQI (right rs) immediate16
### TGEI
### - Trap if Greater or Equal Immediate
val / ['000001 /rs 01000 /immediate16'] = binop TGEI (right rs) immediate16
### TGEIU
### - Trap if Greater or Equal Immediate Unsigned
val / ['000001 /rs 01001 /immediate16'] = binop TGEIU (right rs) immediate16
### TLTI
### - Trap if Less Than Immediate
val / ['000001 /rs 01010 /immediate16'] = binop TLTI (right rs) immediate16
### TLTIU
### - Trap if Less Than Immediate Unsigned
val / ['000001 /rs 01011 /immediate16'] = binop TLTIU (right rs) immediate16
### TNEI
### - Trap if Not Equal Immediate
val / ['000001 /rs 01110 /immediate16'] = binop TNEI (right rs) immediate16
type instruction =
ADDI of ternop-lrr
......@@ -404,7 +462,19 @@ type instruction =
| PREFX of binop-rr
| PUL-PS of ternop-lrr
| PUU-PS of ternop-lrr
| SUXC1 of binop-rr
| SDXC1 of binop-rr
| SWL of binop-rr
| SWLE of binop-rr
| SWR of binop-rr
| SWRE of binop-rr
| SWXC1 of binop-rr
| TEQI of binop-rr
| TGEI of binop-rr
| TGEIU of binop-rr
| TLTI of binop-rr
| TLTIU of binop-rr
| TNEI of binop-rr
type format =
PS
......@@ -427,6 +497,10 @@ type condop =
| C_LE
| C_NGT
type sp-register =
HI
| LO
val /cond ['cond:4'] = update@{cond=cond}
val /fmt5sdps ['10 /fmt3sdps'] = return void
val /fmt3sdps [/fmt3sd] = return void
......
......@@ -324,6 +324,17 @@ val / ['010001 /fmt5sd /ft /fs /fd 010100'] = ternop-fmt SELEQZ-fmt fmt fd (righ
### - Select floating point value or zero with FPR condition
val / ['010001 /fmt5sd /ft /fs /fd 010111'] = ternop-fmt SELNEQZ-fmt fmt fd (right fs) (right ft)
### SIGRIE
### - Signal Reserved Instruction Exception
val / ['000001 00000 10111 /code16'] = unop SIGRIE code16
### SUB-fmt
### - Floating Point Subtract
val / ['010001 /fmt5sd /ft /fs /fd 000001'] = ternop-fmt SUB-fmt fmt fd (right fs) (right ft)
### SWC2
### - Store Word from Coprocessor 2
val / ['010010 01011 /rt /base /offset11'] = binop SWC2 rt/imm offset11/base
type instruction =
......@@ -387,6 +398,7 @@ type instruction =
| SELNEZ of ternop-lrr
| SELEQZ-fmt of ternop-flrr
| SELNEQZ-fmt of ternop-flrr
| SIGRIE of unop-r
type imm =
IMM21 of 21
......@@ -397,6 +409,7 @@ type imm =
| OFFSET23 of 23
| OFFSET28 of 28
| C2CONDITION of 5
| CODE16 of 16
###########################
......@@ -414,6 +427,7 @@ val /fmt5sd/wl ['10100'] = update@{fmt=S}
val /fmt5sd/wl ['10101'] = update@{fmt=D}
val /condn ['condn:5'] = update@{condn=condn}
val /rs-notnull ['rs@00001|00010|00011|00100|00101|00110|00111|01000|01001|01010|01011|01100|01101|01110|01111|10000|10001|10010|10011|10100|10101|10110|10111|11000|11001|11010|11011|11100|11101|11110|11111'] = update@{rs=rs}
val /code16 ['code16:16'] = update@{code16=code16}
###########################
# operand constructors
......@@ -465,6 +479,12 @@ val offset11/base = do
return (OFFSET/BASE {offset=(OFFSET11 offset11), base=(gpr-from-bits base)})
end
val code16 = do
code16 <- query $code16;
return (IMM (CODE16 code16))
end
val condn-from-bits bits =
case bits of
'00000': C_AF
......@@ -534,15 +554,3 @@ type condop =
| C_SOGE
| C_SUGT
| C_SOGT
#################################
# to be removed ;)
type format =
PS
val /fmt5sdps ['10 /fmt3sdps'] = return void
val /fmt3sdps [/fmt3sd] = return void
val /fmt3sdps ['110'] = update@{fmt=PS}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment