diff options
Diffstat (limited to 'src/prc1/cgen/qbe/gl.c')
| -rw-r--r-- | src/prc1/cgen/qbe/gl.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/prc1/cgen/qbe/gl.c b/src/prc1/cgen/qbe/gl.c new file mode 100644 index 0000000..61e9d7a --- /dev/null +++ b/src/prc1/cgen/qbe/gl.c @@ -0,0 +1,16 @@ +#include "cgen.h" +#include "qbe.h" +#include <stddef.h> +#include <stdio.h> + +int qbe_gl(const struct storage *gl, struct cgen *c) +{ + for (size_t i = 0; i < gl->nentries; i++) + { + const struct stentry *e = &gl->entries[i]; + + printf("export data $%s = { z %zu }\n", e->tk->s, e->t->sz); + } + + return 0; +} |
