diff options
Diffstat (limited to 'targ.c')
| -rw-r--r-- | targ.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -6,16 +6,16 @@ static const struct targ { struct { uchar longsize, vlongsize, ptrsize, valistsize; }; struct { uchar longalign, vlongalign, doublealign, ptralign; }; bool charsigned; - uchar sizetype, ptrdifftype; + uchar sizetype, ptrdifftype, wchartype; const struct mctarg *mctarg; } targs[] = { - { "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 } + { "amd64-sysv", {8, 8, 8, 24}, {8, 8, 8, 8}, 1, TYULONG, TYLONG, TYUINT, &t_amd64_sysv }, + { "i686-sysv", {4, 8, 4, 8}, {4, 4, 4, 4}, 1, TYUINT, TYINT, TYUINT } }; uchar targ_primsizes[TYPTR+1]; uchar targ_primalign[TYPTR+1]; -enum typetag targ_sizetype, targ_ptrdifftype; +enum typetag targ_sizetype, targ_ptrdifftype, targ_wchartype; bool targ_charsigned, targ_bigendian, targ_64bit; const struct mctarg *mctarg; @@ -30,6 +30,7 @@ targ_init(const char *starg) sizes[TYUINT] = sizes[TYINT] = 4; sizes[TYFLOAT] = 4; sizes[TYDOUBLE] = 8; + sizes[TYLDOUBLE] = 8; memcpy(align, sizes, sizeof targ_primalign); sizes[TYULONG] = sizes[TYLONG] = t->longsize; sizes[TYUVLONG] = sizes[TYVLONG] = t->vlongsize; @@ -38,9 +39,11 @@ targ_init(const char *starg) align[TYULONG] = align[TYLONG] = t->longalign; align[TYUVLONG] = align[TYVLONG] = t->vlongalign; align[TYDOUBLE] = t->doublealign; + align[TYLDOUBLE] = t->doublealign; align[TYVALIST] = align[TYPTR] = t->ptralign; targ_sizetype = t->sizetype; targ_ptrdifftype = t->ptrdifftype; + targ_wchartype = t->wchartype; targ_charsigned = t->charsigned; targ_bigendian = 0; targ_64bit = t->ptrsize == 8; |