codea: immediate values gehen auch fuer subtraktion
[uebersetzerbau-ss10.git] / codea / chelper.c
index 70c8a662611eab493618b201113f4580bea854ec..4926b8ac6283fe1c15640b91a8343a0940b25a43 100644 (file)
@@ -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");