3 static int resvreg[nelem(reg)];
14 exfregoffset = FREGEXT;
28 typeswitch = typechlv;
32 memmove(typechlpv, typechlp, sizeof(typechlpv));
33 typechlpv[TVLONG] = 1;
34 typechlpv[TUVLONG] = 1;
38 zprog.from.type = D_NONE;
39 zprog.from.index = D_NONE;
41 zprog.to = zprog.from;
43 lregnode.op = OREGISTER;
44 lregnode.class = CEXREG;
45 lregnode.reg = REGTMP;
47 lregnode.addable = 11;
48 lregnode.type = types[TLONG];
51 qregnode.type = types[TVLONG];
53 constnode.op = OCONST;
54 constnode.class = CXXX;
55 constnode.complex = 0;
56 constnode.addable = 20;
57 constnode.type = types[TLONG];
59 vconstnode = constnode;
60 vconstnode.type = types[TVLONG];
62 fconstnode.op = OCONST;
63 fconstnode.class = CXXX;
64 fconstnode.complex = 0;
65 fconstnode.addable = 20;
66 fconstnode.type = types[TDOUBLE];
68 nodsafe = new(ONAME, Z, Z);
69 nodsafe->sym = slookup(".safe");
70 nodsafe->type = types[TINT];
71 nodsafe->etype = types[TINT]->etype;
72 nodsafe->class = CAUTO;
75 t = typ(TARRAY, types[TCHAR]);
76 symrathole = slookup(".rathole");
77 symrathole->class = CGLOBL;
80 nodrat = new(ONAME, Z, Z);
81 nodrat->sym = symrathole;
82 nodrat->type = types[TIND];
83 nodrat->etype = TVOID;
84 nodrat->class = CGLOBL;
88 nodret = new(ONAME, Z, Z);
89 nodret->sym = slookup(".ret");
90 nodret->type = types[TIND];
92 nodret->class = CPARAM;
93 nodret = new(OIND, nodret, Z);
99 memset(reg, 0, sizeof(reg));
100 for(i=0; i<nelem(reg); i++) {
102 if(i >= D_AX && i <= D_R15 && i != D_SP)
104 if(i >= D_X0 && i <= D_X7)
107 /* keep two external registers */
110 memmove(resvreg, reg, sizeof(resvreg));
120 for(i=D_AX; i<=D_R15; i++)
121 if(reg[i] && !resvreg[i])
122 diag(Z, "reg %R left allocated", i);
123 for(i=D_X0; i<=D_X7; i++)
124 if(reg[i] && !resvreg[i])
125 diag(Z, "reg %R left allocated", i);
128 symstring->type->width = nstring;
129 symrathole->type->width = nrathole;
130 for(i=0; i<NHASH; i++)
131 for(s = hash[i]; s != S; s = s->link) {
134 if(s->type->width == 0)
136 if(s->class != CGLOBL && s->class != CSTATIC)
138 if(s->type == types[TENUM])
140 gpseudo(AGLOBL, s, nodconst(s->type->width));
151 p = alloc(sizeof(*p));
165 gargs(Node *n, Node *tn1, Node *tn2)
168 Node fnxargs[20], *fnxp;
173 garg1(n, tn1, tn2, 0, &fnxp); /* compile fns to temps */
177 garg1(n, tn1, tn2, 1, &fnxp); /* compile normal args and temps */
188 for(i=D_AX; i<=D_R15; i++)
189 if(reg[i] == 0 && !resvreg[i])
195 garg1(Node *n, Node *tn1, Node *tn2, int f, Node **fnxp)
202 garg1(n->left, tn1, tn2, f, fnxp);
203 garg1(n->right, tn1, tn2, f, fnxp);
207 if(n->complex >= FNX) {
219 if(typesu[n->type->etype]) {
221 if(n->complex >= FNX) {
222 sugen(*fnxp, tn2, n->type->width);
225 sugen(n, tn2, n->type->width);
228 if(REGARG && curarg == 0 && typechlpv[n->type->etype]) {
230 if(n->complex >= FNX) {
243 if(n->complex >= FNX) {
254 nodgconst(vlong v, Type *t)
257 return nodconst((long)v);
258 vconstnode.vconst = v;
265 constnode.vconst = v;
272 fconstnode.fconst = d;
277 isreg(Node *n, int r)
280 if(n->op == OREGISTER)
287 nodreg(Node *n, Node *nn, int r)
294 et = nn->type->etype;
295 if(!typefd[et] && nn->type->width <= SZ_LONG && 0)
296 n->type = typeu[et]? types[TUINT]: types[TINT];
299 //print("nodreg %s [%s]\n", tnames[et], tnames[n->type->etype]);
300 n->lineno = nn->lineno;
305 if(nn->op == OREGISTER)
313 regret(Node *n, Node *nn)
318 if(typefd[nn->type->etype])
325 regalloc(Node *n, Node *tn, Node *o)
329 switch(tn->type->etype) {
341 if(o != Z && o->op == OREGISTER) {
343 if(i >= D_AX && i <= D_R15)
346 for(i=D_AX; i<=D_R15; i++){
348 if(reg[i] == 0 && !resvreg[i])
352 diag(tn, "out of fixed registers");
357 if(o != Z && o->op == OREGISTER) {
359 if(i >= D_X0 && i <= D_X7)
362 for(i=D_X0; i<=D_X7; i++)
363 if(reg[i] == 0 && !resvreg[i])
365 diag(tn, "out of float registers");
368 diag(tn, "unknown type in regalloc: %T", tn->type);
378 regialloc(Node *n, Node *tn, Node *o)
383 nod.type = types[TIND];
384 regalloc(n, &nod, o);
393 if(n->op != OREGISTER && n->op != OINDREG)
396 if(i < 0 || i >= sizeof(reg))
403 diag(n, "error in regfree: %R", i);
407 regsalloc(Node *n, Node *nn)
409 cursafe = align(cursafe, nn->type, Aaut3);
410 maxargsafe = maxround(maxargsafe, cursafe+curarg);
412 n->xoffset = -(stkoff + cursafe);
414 n->etype = nn->type->etype;
415 n->lineno = nn->lineno;
419 regaalloc1(Node *n, Node *nn)
421 nodreg(n, nn, REGARG);
423 curarg = align(curarg, nn->type, Aarg1);
424 curarg = align(curarg, nn->type, Aarg2);
425 maxargsafe = maxround(maxargsafe, cursafe+curarg);
429 regaalloc(Node *n, Node *nn)
431 curarg = align(curarg, nn->type, Aarg1);
438 curarg = align(curarg, nn->type, Aarg2);
439 maxargsafe = maxround(maxargsafe, cursafe+curarg);
443 regind(Node *n, Node *nn)
446 if(n->op != OREGISTER) {
447 diag(n, "regind not OREGISTER");
455 naddr(Node *n, Adr *a)
465 diag(n, "bad in naddr: %O %D", n->op, a);
476 if(a->type >= D_AX && a->type <= D_R15)
479 if(a->type == D_CONST)
480 a->type = D_NONE+D_INDIR;
482 if(a->type == D_ADDR) {
491 if(n->left->op == OADDR || n->left->op == OCONST)
493 if(a->type >= D_AX && a->type <= D_R15)
496 if(a->type == D_CONST)
497 a->type = D_NONE+D_INDIR;
499 if(a->type == D_ADDR) {
506 a->offset += n->xoffset;
510 a->type = n->reg+D_INDIR;
512 a->offset = n->xoffset;
519 a->offset = n->xoffset;
520 if(n->class == CSTATIC)
522 if(n->class == CEXTERN || n->class == CGLOBL) {
526 if(n->class == CAUTO) {
530 if(n->class == CPARAM) {
537 if(typefd[n->type->etype]) {
544 if(typev[n->type->etype] || n->type->etype == TIND)
545 a->offset = n->vconst;
547 a->offset = convvtox(n->vconst, typeu[n->type->etype]? TULONG: TLONG);
552 if(a->type >= D_INDIR) {
556 if(a->type == D_EXTERN || a->type == D_STATIC ||
557 a->type == D_AUTO || a->type == D_PARAM)
558 if(a->index == D_NONE) {
566 if(n->right->op == OCONST) {
567 v = n->right->vconst;
570 if(n->left->op == OCONST) {
582 gcmp(int op, Node *n, vlong val)
586 cn = nodgconst(val, n->type);
588 regalloc(&nod, n, Z);
590 gopcode(op, n->type, n, &nod);
593 gopcode(op, n->type, n, cn);
596 #define CASE(a,b) ((a<<8)|(b<<0))
599 gmove(Node *f, Node *t)
602 Node nod, nod1, nod2, nod3;
607 t64 = tt == TVLONG || tt == TUVLONG || tt == TIND;
609 print("gop: %O %O[%s],%O[%s]\n", OAS,
610 f->op, tnames[ft], t->op, tnames[tt]);
611 if(typefd[ft] && f->op == OCONST) {
612 /* TO DO: pick up special constants, possibly preloaded */
613 if(f->fconst == 0.0){
614 regalloc(&nod, t, t);
615 gins(AXORPD, &nod, &nod);
624 if(f->op == ONAME || f->op == OINDREG ||
625 f->op == OIND || f->op == OINDEX)
650 regalloc(&nod, t, t);
668 a = AMOVLQZX; /* could probably use plain MOVL */
672 regalloc(&nod, t, t);
686 regalloc(&nod, f, t);
703 if(t->op == ONAME || t->op == OINDREG ||
704 t->op == OIND || t->op == OINDEX)
723 if(f->op == OCONST) {
728 regalloc(&nod, t, f);
745 switch(CASE(ft,tt)) {
752 case CASE( TCHAR, TCHAR):
753 case CASE( TUCHAR, TCHAR):
754 case CASE( TSHORT, TCHAR):
755 case CASE( TUSHORT,TCHAR):
756 case CASE( TINT, TCHAR):
757 case CASE( TUINT, TCHAR):
758 case CASE( TLONG, TCHAR):
759 case CASE( TULONG, TCHAR):
761 case CASE( TCHAR, TUCHAR):
762 case CASE( TUCHAR, TUCHAR):
763 case CASE( TSHORT, TUCHAR):
764 case CASE( TUSHORT,TUCHAR):
765 case CASE( TINT, TUCHAR):
766 case CASE( TUINT, TUCHAR):
767 case CASE( TLONG, TUCHAR):
768 case CASE( TULONG, TUCHAR):
770 case CASE( TSHORT, TSHORT):
771 case CASE( TUSHORT,TSHORT):
772 case CASE( TINT, TSHORT):
773 case CASE( TUINT, TSHORT):
774 case CASE( TLONG, TSHORT):
775 case CASE( TULONG, TSHORT):
777 case CASE( TSHORT, TUSHORT):
778 case CASE( TUSHORT,TUSHORT):
779 case CASE( TINT, TUSHORT):
780 case CASE( TUINT, TUSHORT):
781 case CASE( TLONG, TUSHORT):
782 case CASE( TULONG, TUSHORT):
784 case CASE( TINT, TINT):
785 case CASE( TUINT, TINT):
786 case CASE( TLONG, TINT):
787 case CASE( TULONG, TINT)::
789 case CASE( TINT, TUINT):
790 case CASE( TUINT, TUINT):
791 case CASE( TLONG, TUINT):
792 case CASE( TULONG, TUINT):
797 case CASE( TINT, TIND):
798 case CASE( TINT, TVLONG):
799 case CASE( TINT, TUVLONG):
800 case CASE( TLONG, TIND):
801 case CASE( TLONG, TVLONG):
802 case CASE( TLONG, TUVLONG):
804 if(f->op == OCONST) {
805 f->vconst &= (uvlong)0xffffffffU;
806 if(f->vconst & 0x80000000)
807 f->vconst |= (vlong)0xffffffff << 32;
812 case CASE( TUINT, TIND):
813 case CASE( TUINT, TVLONG):
814 case CASE( TUINT, TUVLONG):
815 case CASE( TULONG, TVLONG):
816 case CASE( TULONG, TUVLONG):
817 case CASE( TULONG, TIND):
819 if(f->op == OCONST) {
820 f->vconst &= (uvlong)0xffffffffU;
825 case CASE( TIND, TCHAR):
826 case CASE( TIND, TUCHAR):
827 case CASE( TIND, TSHORT):
828 case CASE( TIND, TUSHORT):
829 case CASE( TIND, TINT):
830 case CASE( TIND, TUINT):
831 case CASE( TIND, TLONG):
832 case CASE( TIND, TULONG):
833 case CASE( TVLONG, TCHAR):
834 case CASE( TVLONG, TUCHAR):
835 case CASE( TVLONG, TSHORT):
836 case CASE( TVLONG, TUSHORT):
837 case CASE( TVLONG, TINT):
838 case CASE( TVLONG, TUINT):
839 case CASE( TVLONG, TLONG):
840 case CASE( TVLONG, TULONG):
841 case CASE( TUVLONG, TCHAR):
842 case CASE( TUVLONG, TUCHAR):
843 case CASE( TUVLONG, TSHORT):
844 case CASE( TUVLONG, TUSHORT):
845 case CASE( TUVLONG, TINT):
846 case CASE( TUVLONG, TUINT):
847 case CASE( TUVLONG, TLONG):
848 case CASE( TUVLONG, TULONG):
850 if(f->op == OCONST) {
851 f->vconst &= 0xffffffffU;
856 case CASE( TIND, TIND):
857 case CASE( TIND, TVLONG):
858 case CASE( TIND, TUVLONG):
859 case CASE( TVLONG, TIND):
860 case CASE( TVLONG, TVLONG):
861 case CASE( TVLONG, TUVLONG):
862 case CASE( TUVLONG, TIND):
863 case CASE( TUVLONG, TVLONG):
864 case CASE( TUVLONG, TUVLONG):
868 case CASE( TSHORT, TINT):
869 case CASE( TSHORT, TUINT):
870 case CASE( TSHORT, TLONG):
871 case CASE( TSHORT, TULONG):
873 if(f->op == OCONST) {
875 if(f->vconst & 0x8000)
876 f->vconst |= 0xffff0000;
881 case CASE( TSHORT, TVLONG):
882 case CASE( TSHORT, TUVLONG):
883 case CASE( TSHORT, TIND):
885 if(f->op == OCONST) {
887 if(f->vconst & 0x8000){
888 f->vconst |= 0xffff0000;
889 f->vconst |= (vlong)~0 << 32;
895 case CASE( TUSHORT,TINT):
896 case CASE( TUSHORT,TUINT):
897 case CASE( TUSHORT,TLONG):
898 case CASE( TUSHORT,TULONG):
900 if(f->op == OCONST) {
906 case CASE( TUSHORT,TVLONG):
907 case CASE( TUSHORT,TUVLONG):
908 case CASE( TUSHORT,TIND):
910 if(f->op == OCONST) {
912 a = AMOVL; /* MOVL also zero-extends to 64 bits */
916 case CASE( TCHAR, TSHORT):
917 case CASE( TCHAR, TUSHORT):
918 case CASE( TCHAR, TINT):
919 case CASE( TCHAR, TUINT):
920 case CASE( TCHAR, TLONG):
921 case CASE( TCHAR, TULONG):
923 if(f->op == OCONST) {
926 f->vconst |= 0xffffff00;
931 case CASE( TCHAR, TVLONG):
932 case CASE( TCHAR, TUVLONG):
933 case CASE( TCHAR, TIND):
935 if(f->op == OCONST) {
937 if(f->vconst & 0x80){
938 f->vconst |= 0xffffff00;
939 f->vconst |= (vlong)~0 << 32;
945 case CASE( TUCHAR, TSHORT):
946 case CASE( TUCHAR, TUSHORT):
947 case CASE( TUCHAR, TINT):
948 case CASE( TUCHAR, TUINT):
949 case CASE( TUCHAR, TLONG):
950 case CASE( TUCHAR, TULONG):
952 if(f->op == OCONST) {
958 case CASE( TUCHAR, TVLONG):
959 case CASE( TUCHAR, TUVLONG):
960 case CASE( TUCHAR, TIND):
962 if(f->op == OCONST) {
964 a = AMOVL; /* zero-extends to 64-bits */
971 case CASE( TFLOAT, TCHAR):
972 case CASE( TFLOAT, TUCHAR):
973 case CASE( TFLOAT, TSHORT):
974 case CASE( TFLOAT, TUSHORT):
975 case CASE( TFLOAT, TINT):
976 case CASE( TFLOAT, TUINT):
977 case CASE( TFLOAT, TLONG):
978 case CASE( TFLOAT, TULONG):
979 case CASE( TFLOAT, TVLONG):
980 case CASE( TFLOAT, TUVLONG):
981 case CASE( TFLOAT, TIND):
983 case CASE( TDOUBLE,TCHAR):
984 case CASE( TDOUBLE,TUCHAR):
985 case CASE( TDOUBLE,TSHORT):
986 case CASE( TDOUBLE,TUSHORT):
987 case CASE( TDOUBLE,TINT):
988 case CASE( TDOUBLE,TUINT):
989 case CASE( TDOUBLE,TLONG):
990 case CASE( TDOUBLE,TULONG):
991 case CASE( TDOUBLE,TVLONG):
992 case CASE( TDOUBLE,TUVLONG):
993 case CASE( TDOUBLE,TIND):
994 regalloc(&nod, t, Z);
995 if(ewidth[tt] == SZ_VLONG || typeu[tt] && ewidth[tt] == SZ_INT){
1014 case CASE( TUVLONG, TDOUBLE):
1015 case CASE( TUVLONG, TFLOAT):
1019 regalloc(&nod, f, f);
1021 regalloc(&nod1, t, t);
1022 gins(ACMPQ, &nod, nodconst(0));
1025 gins(a, &nod, &nod1);
1029 regalloc(&nod2, f, Z);
1030 regalloc(&nod3, f, Z);
1032 gins(ASHRQ, nodconst(1), &nod2);
1034 gins(AANDL, nodconst(1), &nod3);
1035 gins(AORQ, &nod3, &nod2);
1036 gins(a, &nod2, &nod1);
1037 gins(tt == TDOUBLE? AADDSD: AADDSS, &nod1, &nod1);
1045 case CASE( TULONG, TDOUBLE):
1046 case CASE( TUINT, TDOUBLE):
1047 case CASE( TULONG, TFLOAT):
1048 case CASE( TUINT, TFLOAT):
1052 regalloc(&nod, f, f);
1053 gins(AMOVLQZX, f, &nod);
1054 regalloc(&nod1, t, t);
1055 gins(a, &nod, &nod1);
1064 case CASE( TCHAR, TFLOAT):
1065 case CASE( TUCHAR, TFLOAT):
1066 case CASE( TSHORT, TFLOAT):
1067 case CASE( TUSHORT,TFLOAT):
1068 case CASE( TINT, TFLOAT):
1069 case CASE( TLONG, TFLOAT):
1070 case CASE( TVLONG, TFLOAT):
1071 case CASE( TIND, TFLOAT):
1073 case CASE( TCHAR, TDOUBLE):
1074 case CASE( TUCHAR, TDOUBLE):
1075 case CASE( TSHORT, TDOUBLE):
1076 case CASE( TUSHORT,TDOUBLE):
1077 case CASE( TINT, TDOUBLE):
1078 case CASE( TLONG, TDOUBLE):
1079 case CASE( TVLONG, TDOUBLE):
1080 case CASE( TIND, TDOUBLE):
1081 regalloc(&nod, t, t);
1082 if(ewidth[ft] == SZ_VLONG){
1101 case CASE( TFLOAT, TFLOAT):
1104 case CASE( TDOUBLE,TFLOAT):
1107 case CASE( TFLOAT, TDOUBLE):
1110 case CASE( TDOUBLE,TDOUBLE):
1114 if(a == AMOVQ || a == AMOVSD || a == AMOVSS || a == AMOVL && ewidth[ft] == ewidth[tt]) /* TO DO: check AMOVL */
1121 regused(Node *n, int r)
1127 return regused(n->left, r) || regused(n->right, r);
1131 doindex(Node *n, Node *o)
1139 if(n->left->complex >= FNX)
1140 print("botch in doindex\n");
1142 if(n->right->op == OREGISTER)
1144 else if(o == Z || o->op != OREGISTER || regused(n, o->reg))
1146 regalloc(&nod, &qregnode, o);
1147 v = constnode.vconst;
1148 cgen(n->right, &nod);
1150 if(n->left->op == OCONST)
1152 else if(n->left->op == OREGISTER)
1153 idx.ptr = n->left->reg;
1154 else if(n->left->op != OADDR) {
1155 reg[D_BP]++; // cant be used as a base
1157 regalloc(&nod1, &qregnode, Z);
1158 cgen(n->left, &nod1);
1166 constnode.vconst = v;
1170 gins(int a, Node *f, Node *t)
1173 if(f != Z && f->op == OINDEX)
1174 doindex(f, a == AMOVL || a == ALEAL
1175 || a == AMOVQ || a == ALEAQ
1176 || a == AMOVBLSX || a == AMOVBLZX
1177 || a == AMOVBQSX || a == AMOVBQZX
1178 || a == AMOVWLSX || a == AMOVWLZX
1179 || a == AMOVWQSX || a == AMOVWQZX ? t : Z);
1180 if(t != Z && t->op == OINDEX)
1193 gopcode(int o, Type *ty, Node *f, Node *t)
1201 if(f != Z && f->type != T)
1202 print("gop: %O %O[%s],", o, f->op, tnames[et]);
1204 print("gop: %O Z,", o);
1205 if(t != Z && t->type != T)
1206 print("%O[%s]\n", t->op, tnames[t->type->etype]);
1214 if(et == TCHAR || et == TUCHAR)
1216 if(et == TSHORT || et == TUSHORT)
1218 if(et == TVLONG || et == TUVLONG || et == TIND)
1224 if(et == TCHAR || et == TUCHAR)
1226 if(et == TSHORT || et == TUSHORT)
1228 if(et == TVLONG || et == TUVLONG || et == TIND)
1239 if(et == TCHAR || et == TUCHAR)
1241 if(et == TSHORT || et == TUSHORT)
1243 if(et == TVLONG || et == TUVLONG || et == TIND)
1254 if(et == TCHAR || et == TUCHAR)
1256 if(et == TSHORT || et == TUSHORT)
1258 if(et == TVLONG || et == TUVLONG || et == TIND)
1269 if(et == TCHAR || et == TUCHAR)
1271 if(et == TSHORT || et == TUSHORT)
1273 if(et == TVLONG || et == TUVLONG || et == TIND)
1280 if(et == TCHAR || et == TUCHAR)
1282 if(et == TSHORT || et == TUSHORT)
1284 if(et == TVLONG || et == TUVLONG || et == TIND)
1291 if(et == TCHAR || et == TUCHAR)
1293 if(et == TSHORT || et == TUSHORT)
1295 if(et == TVLONG || et == TUVLONG || et == TIND)
1302 if(et == TCHAR || et == TUCHAR)
1304 if(et == TSHORT || et == TUSHORT)
1306 if(et == TVLONG || et == TUVLONG || et == TIND)
1313 if(et == TCHAR || et == TUCHAR)
1315 if(et == TSHORT || et == TUSHORT)
1317 if(et == TVLONG || et == TUVLONG || et == TIND)
1324 if(et == TCHAR || et == TUCHAR)
1326 if(et == TSHORT || et == TUSHORT)
1328 if(et == TVLONG || et == TUVLONG || et == TIND)
1334 if(et == TCHAR || et == TUCHAR)
1336 if(et == TSHORT || et == TUSHORT)
1338 if(et == TVLONG || et == TUVLONG || et == TIND)
1348 if(f->op == OREGISTER && t != Z && isreg(t, D_AX) && reg[D_DX] == 0)
1351 if(et == TVLONG || et == TUVLONG || et == TIND)
1364 if(et == TVLONG || et == TUVLONG || et == TIND)
1375 if(et == TVLONG || et == TUVLONG || et == TIND)
1384 if(et == TVLONG || et == TUVLONG || et == TIND)
1399 if(et == TCHAR || et == TUCHAR)
1401 if(et == TSHORT || et == TUSHORT)
1403 if(et == TVLONG || et == TUVLONG || et == TIND)
1411 case OEQ: a = AJEQ; break;
1412 case ONE: a = AJNE; break;
1413 case OLT: a = AJLT; break;
1414 case OLE: a = AJLE; break;
1415 case OGE: a = AJGE; break;
1416 case OGT: a = AJGT; break;
1417 case OLO: a = AJCS; break;
1418 case OLS: a = AJLS; break;
1419 case OHS: a = AJCC; break;
1420 case OHI: a = AJHI; break;
1426 diag(Z, "bad in gopcode %O", o);
1431 samaddr(Node *f, Node *t)
1433 return f->op == OREGISTER && t->op == OREGISTER && f->reg == t->reg;
1452 diag(Z, "bad in gbranch %O", o);
1459 patch(Prog *op, long pc)
1463 op->to.type = D_BRANCH;
1467 gpseudo(int a, Sym *s, Node *n)
1472 p->from.type = D_EXTERN;
1474 p->from.scale = (profileflg ? 0 : NOPROF);
1475 if(s->class == CSTATIC)
1476 p->from.type = D_STATIC;
1478 if(a == ADATA || a == AGLOBL)
1487 if(n->op == OCONST && !typefd[n->type->etype]) {
1489 if(v >= -32766L && v < 32766L)
1500 if(typechlpv[t->etype]) {
1501 if(exregoffset <= REGEXT-4)
1510 schar ewidth[NTYPE] =
1513 SZ_CHAR, /*[TCHAR]*/
1514 SZ_CHAR, /*[TUCHAR]*/
1515 SZ_SHORT, /*[TSHORT]*/
1516 SZ_SHORT, /*[TUSHORT]*/
1519 SZ_LONG, /*[TLONG]*/
1520 SZ_LONG, /*[TULONG]*/
1521 SZ_VLONG, /*[TVLONG]*/
1522 SZ_VLONG, /*[TUVLONG]*/
1523 SZ_FLOAT, /*[TFLOAT]*/
1524 SZ_DOUBLE, /*[TDOUBLE]*/
1536 BCHAR|BUCHAR, /*[TCHAR]*/
1537 BCHAR|BUCHAR, /*[TUCHAR]*/
1538 BSHORT|BUSHORT, /*[TSHORT]*/
1539 BSHORT|BUSHORT, /*[TUSHORT]*/
1540 BINT|BUINT|BLONG|BULONG, /*[TINT]*/
1541 BINT|BUINT|BLONG|BULONG, /*[TUINT]*/
1542 BINT|BUINT|BLONG|BULONG, /*[TLONG]*/
1543 BINT|BUINT|BLONG|BULONG, /*[TULONG]*/
1544 BVLONG|BUVLONG|BIND, /*[TVLONG]*/
1545 BVLONG|BUVLONG|BIND, /*[TUVLONG]*/
1546 BFLOAT, /*[TFLOAT]*/
1547 BDOUBLE, /*[TDOUBLE]*/
1548 BVLONG|BUVLONG|BIND, /*[TIND]*/
1552 BSTRUCT, /*[TSTRUCT]*/
1553 BUNION, /*[TUNION]*/