aboutsummaryrefslogtreecommitdiffhomepage
path: root/targ.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-05-31 23:31:58 +0200
committerlemon <lsof@mailbox.org>2023-05-31 23:31:58 +0200
commit82cac0ae5d4e335719445857ab16ffdf05413222 (patch)
tree51af015a1eed86d8a6c543f415d3b5107a5043bd /targ.c
parente2d649f575c31d96f2fc7595594ba8c360f7bdc5 (diff)
regalloc skeleton
Diffstat (limited to 'targ.c')
-rw-r--r--targ.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/targ.c b/targ.c
index e323148..da3d86a 100644
--- a/targ.c
+++ b/targ.c
@@ -1,21 +1,24 @@
#include "common.h"
-uchar targ_primsizes[TYPTR+1];
-uchar targ_primalign[TYPTR+1];
-enum typetag targ_sizetype, targ_ptrdifftype;
-bool targ_charsigned, targ_bigendian;
-
+extern const struct mctarg t_amd64_sysv;
static const struct targ {
const char *name;
struct { uchar longsize, vlongsize, ptrsize, valistsize; };
struct { uchar longalign, vlongalign, doublealign, ptralign; };
bool charsigned;
uchar sizetype, ptrdifftype;
+ const struct mctarg *mctarg;
} targs[] = {
- { "amd64-sysv", {8, 8, 8, 24}, {8, 8, 8, 8}, 1, TYULONG, TYLONG },
+ { "amd64-sysv", {8, 8, 8, 24}, {8, 8, 8, 8}, 1, TYULONG, TYLONG, &t_amd64_sysv },
{ "i686-sysv", {4, 8, 4, 8}, {4, 4, 4, 4}, 1, TYUINT, TYINT }
};
+uchar targ_primsizes[TYPTR+1];
+uchar targ_primalign[TYPTR+1];
+enum typetag targ_sizetype, targ_ptrdifftype;
+bool targ_charsigned, targ_bigendian;
+const struct mctarg *mctarg;
+
void
targ_init(const char *starg)
{
@@ -40,4 +43,5 @@ targ_init(const char *starg)
targ_ptrdifftype = t->ptrdifftype;
targ_charsigned = t->charsigned;
targ_bigendian = 0;
+ mctarg = t->mctarg;
}