projects
/
uebersetzerbau-ss10.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
codea: immediate values gehen auch fuer subtraktion
[uebersetzerbau-ss10.git]
/
codea
/
chelper.c
diff --git
a/codea/chelper.c
b/codea/chelper.c
index 70c8a662611eab493618b201113f4580bea854ec..4926b8ac6283fe1c15640b91a8343a0940b25a43 100644
(file)
--- a/
codea/chelper.c
+++ b/
codea/chelper.c
@@
-19,6
+19,13
@@
void move(char *src, char *dst)
}
}
+void moveimm(long imm, char *dst)
+{
+ char buf[100];
+ sprintf(buf, "$%li", imm);
+ printf("\tmovq %s, %%%s\n", buf, dst);
+}
+
void ret(void)
{
printf("\tret\n");