aboutsummaryrefslogtreecommitdiff
path: root/src/prc1/cgen/qbe/gl.c
blob: 61e9d7a70370df83e2de529113c161678af4a982 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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;
}