diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-10-31 13:51:06 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-10-31 13:51:06 +0100 |
| commit | 4dbcfc991a4fb203ec2b50d950f59adb1ad61922 (patch) | |
| tree | 474dbf6fbf510f19f613b3357f20052f17239436 /src/prc1/cgen/qbe/st.c | |
| parent | 803e95a883a5d3881f662d60cd1a24309bafd4de (diff) | |
| download | prc-4dbcfc991a4fb203ec2b50d950f59adb1ad61922.tar.gz | |
Setup scaffolding for statics section
Diffstat (limited to 'src/prc1/cgen/qbe/st.c')
| -rw-r--r-- | src/prc1/cgen/qbe/st.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/prc1/cgen/qbe/st.c b/src/prc1/cgen/qbe/st.c new file mode 100644 index 0000000..d736497 --- /dev/null +++ b/src/prc1/cgen/qbe/st.c @@ -0,0 +1,20 @@ +#include "cgen.h" +#include "storage.h" +#include "qbe.h" +#include <stddef.h> +#include <stdio.h> + +static int stpush(const struct stentry *e, struct cgen *c) +{ + fprintf(stderr, "%s: TODO\n", __func__); + return -1; +} + +int qbe_st(const struct storage *s, struct cgen *c) +{ + for (size_t i = 0; i < s->nentries; i++) + if (stpush(&s->entries[i], c)) + return -1; + + return 0; +} |
