projects
/
calu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1dcebfd
)
3a_asm: relative jumps
author
Bernhard Urban
<lewurm@gmail.com>
Mon, 1 Nov 2010 00:06:03 +0000
(
01:06
+0100)
committer
Bernhard Urban
<lewurm@gmail.com>
Mon, 1 Nov 2010 00:06:03 +0000
(
01:06
+0100)
ooops, I removed that in
0df70b557af
:/
3a_asm/DT.hs
patch
|
blob
|
history
diff --git
a/3a_asm/DT.hs
b/3a_asm/DT.hs
index e2727b451773df6d9e793f4ffb8ab60e532f3900..713f1779c3f7d4840ef0a135419c093ffddf6312 100644
(file)
--- a/
3a_asm/DT.hs
+++ b/
3a_asm/DT.hs
@@
-32,6
+32,10
@@
testins input =
comma = char ','
mnem m = string m
comma = char ','
mnem m = string m
+iLabel :: Dict -> Parser Word32
+-- TODO: save msb (=sign) correctly...
+iLabel d@(aktadr,_) = do {i <- (iLit d); return $ (i - aktadr) .&. 0xffff}
+
iLit :: Dict -> Parser Word32
iLit (_,d) = do
val <- expr d;
iLit :: Dict -> Parser Word32
iLit (_,d) = do
val <- expr d;
@@
-101,7
+105,7
@@
infixl 1 <%>
infixl 1 <@>
ins m form e = do {mnem m; form e}
infixl 1 <@>
ins m form e = do {mnem m; form e}
-csv0i_p dict f = f<$>condition<*>branchpred<*>(iL
it
dict)
+csv0i_p dict f = f<$>condition<*>branchpred<*>(iL
abel
dict)
csv0i_p' f = f<$>condition<*>branchpred
csv1 f = f<$>condition<%>reg
csv1_p f = f<$>condition<%>reg
csv0i_p' f = f<$>condition<*>branchpred
csv1 f = f<$>condition<%>reg
csv1_p f = f<$>condition<%>reg