Commit 17956e44 authored by Julian Kranz's avatar Julian Kranz

Merge branch 'master' of versioncontrolseidl.in.tum.de:gesselbe/gdsl-toolkit into experimental

parents 05db984d 951b849a
......@@ -36,6 +36,41 @@ val arch-show-id r =
| Sem_SP: "sp"
| Sem_S8: "s8"
| Sem_RA: "ra"
| Sem_HI: "HI"
| Sem_LO: "LO"
| Sem_F0: "f0"
| Sem_F1: "f1"
| Sem_F2: "f2"
| Sem_F3: "f3"
| Sem_F4: "f4"
| Sem_F5: "f5"
| Sem_F6: "f6"
| Sem_F7: "f7"
| Sem_F8: "f8"
| Sem_F9: "f9"
| Sem_F10: "f10"
| Sem_F11: "f11"
| Sem_F12: "f12"
| Sem_F13: "f13"
| Sem_F14: "f14"
| Sem_F15: "f15"
| Sem_F16: "f16"
| Sem_F17: "f17"
| Sem_F18: "f18"
| Sem_F19: "f19"
| Sem_F20: "f20"
| Sem_F21: "f21"
| Sem_F22: "f22"
| Sem_F23: "f23"
| Sem_F24: "f24"
| Sem_F25: "f25"
| Sem_F26: "f26"
| Sem_F27: "f27"
| Sem_F28: "f28"
| Sem_F29: "f29"
| Sem_F30: "f30"
| Sem_F31: "f31"
| Sem_SREG: "SREG"
end
val pretty-arch-id r = arch-show-id r
......
type sem_id =
Sem_PC
| Sem_SREG
type sem_id =
Sem_ZERO
......@@ -34,6 +35,51 @@ type sem_id =
| Sem_SP
| Sem_S8
| Sem_RA
| Sem_HI
| Sem_LO
type sem_id =
Sem_F0
| Sem_F1
| Sem_F2
| Sem_F3
| Sem_F4
| Sem_F5
| Sem_F6
| Sem_F7
| Sem_F8
| Sem_F9
| Sem_F10
| Sem_F11
| Sem_F12
| Sem_F13
| Sem_F14
| Sem_F15
| Sem_F16
| Sem_F17
| Sem_F18
| Sem_F19
| Sem_F20
| Sem_F21
| Sem_F22
| Sem_F23
| Sem_F24
| Sem_F25
| Sem_F26
| Sem_F27
| Sem_F28
| Sem_F29
| Sem_F30
| Sem_F31
val fRE = sem-reg-offset (sreg-get) 25
val sem-reg-offset r o = @{offset=r.offset + o}r
val ip-get = {id=Sem_PC,offset=0,size=32}
val hi-get = {id=Sem_HI,offset=0,size=32}
val lo-get = {id=Sem_LO,offset=0,size=32}
val sreg-get = {id=Sem_SREG,offset=0,size=32}
val semantic-gpr-of r =
case r of
......@@ -70,3 +116,39 @@ val semantic-gpr-of r =
| S8 : {id=Sem_S8 ,offset=0,size=32}
| RA : {id=Sem_RA ,offset=0,size=32}
end
val semantic-fpr-of f =
case f of
F0 : {id=Sem_F0 ,offset=0,size=32}
| F1 : {id=Sem_F1 ,offset=0,size=32}
| F2 : {id=Sem_F2 ,offset=0,size=32}
| F3 : {id=Sem_F3 ,offset=0,size=32}
| F4 : {id=Sem_F4 ,offset=0,size=32}
| F5 : {id=Sem_F5 ,offset=0,size=32}
| F6 : {id=Sem_F6 ,offset=0,size=32}
| F7 : {id=Sem_F7 ,offset=0,size=32}
| F8 : {id=Sem_F8 ,offset=0,size=32}
| F9 : {id=Sem_F9 ,offset=0,size=32}
| F10 : {id=Sem_F10 ,offset=0,size=32}
| F11 : {id=Sem_F11 ,offset=0,size=32}
| F12 : {id=Sem_F12 ,offset=0,size=32}
| F13 : {id=Sem_F13 ,offset=0,size=32}
| F14 : {id=Sem_F14 ,offset=0,size=32}
| F15 : {id=Sem_F15 ,offset=0,size=32}
| F16 : {id=Sem_F16 ,offset=0,size=32}
| F17 : {id=Sem_F17 ,offset=0,size=32}
| F18 : {id=Sem_F18 ,offset=0,size=32}
| F19 : {id=Sem_F19 ,offset=0,size=32}
| F20 : {id=Sem_F20 ,offset=0,size=32}
| F21 : {id=Sem_F21 ,offset=0,size=32}
| F22 : {id=Sem_F22 ,offset=0,size=32}
| F23 : {id=Sem_F23 ,offset=0,size=32}
| F24 : {id=Sem_F24 ,offset=0,size=32}
| F25 : {id=Sem_F25 ,offset=0,size=32}
| F26 : {id=Sem_F26 ,offset=0,size=32}
| F27 : {id=Sem_F27 ,offset=0,size=32}
| F28 : {id=Sem_F28 ,offset=0,size=32}
| F29 : {id=Sem_F29 ,offset=0,size=32}
| F30 : {id=Sem_F30 ,offset=0,size=32}
| F31 : {id=Sem_F31 ,offset=0,size=32}
end
......@@ -4,6 +4,12 @@ in
traverse f insn
end
val mnemonic-of insn = let
val f a b = a
in
traverse f insn
end
# -> sftl
type uarity =
NULLOP
......
......@@ -1510,9 +1510,12 @@ type register =
| SP
| S8
| RA
| HI
type register =
HI
| LO
| PC
| SREG
type register =
F0
......
......@@ -396,6 +396,13 @@ val /geu sz a b = do
return (var t)
end
val /ges sz a b = do
t <- mktemp;
cmplts sz t a b;
xorb 1 t (var t) (imm 1);
return (var t)
end
val /lts sz a b = do
t <- mktemp;
cmplts sz t a b;
......@@ -414,6 +421,12 @@ val /leu sz a b = do
return (var t)
end
val /les sz a b = do
t <- mktemp;
cmples sz t a b;
return (var t)
end
val const i = return (SEM_LIN_IMM{const=i})
val imm i = SEM_LIN_IMM{const=i}
......
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