1 /* $Id: pass1.h,v 1.10 2014/05/03 09:47:51 ragge Exp $ */ 2 /* 3 * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * Redistributions of source code and documentation must retain the above 10 * copyright notice, this list of conditions and the following disclaimer. 11 * Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditionsand the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * All advertising materials mentioning features or use of this software 15 * must display the following acknowledgement: 16 * This product includes software developed or owned by Caldera 17 * International, Inc. 18 * Neither the name of Caldera International, Inc. nor the names of other 19 * contributors may be used to endorse or promote products derived from 20 * this software without specific prior written permission. 21 * 22 * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA 23 * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR 24 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE 27 * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, 31 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 32 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 * POSSIBILITY OF SUCH DAMAGE. 34 */ 35 36 #include "config.h" 37 38 #include <sys/types.h> 39 #include <stdarg.h> 40 #include <string.h> 41 #ifdef HAVE_STDINT_H 42 #include <stdint.h> 43 #endif 44 45 #ifndef MKEXT 46 #include "external.h" 47 #else 48 typedef unsigned int bittype; /* XXX - for basicblock */ 49 #endif 50 #include "manifest.h" 51 52 /* 53 * Storage classes 54 */ 55 #define SNULL 0 56 #define AUTO 1 57 #define EXTERN 2 58 #define STATIC 3 59 #define REGISTER 4 60 #define EXTDEF 5 61 /* #define LABEL 6*/ 62 /* #define ULABEL 7*/ 63 #define MOS 8 64 #define PARAM 9 65 #define STNAME 10 66 #define MOU 11 67 #define UNAME 12 68 #define TYPEDEF 13 69 /* #define FORTRAN 14 */ 70 #define ENAME 15 71 #define MOE 16 72 /* #define UFORTRAN 17 */ 73 #define USTATIC 18 74 #define MAXSTCL 20 75 76 /* field size is ORed in */ 77 #define FIELD 0200 78 #define FLDSIZ 0177 79 extern char *scnames(int); 80 81 /* 82 * Symbol table flags 83 */ 84 #define SNORMAL 0 85 #define STAGNAME 01 86 #define SLBLNAME 02 87 #define SMOSNAME 03 88 #define SSTRING 04 89 #define NSTYPES 05 90 #define SMASK 07 91 92 #define STLS 00010 /* Thread Local Support variable */ 93 /* #define SREF 00020 */ 94 #define SNOCREAT 00040 /* don't create a symbol in lookup() */ 95 #define STEMP 00100 /* Allocate symtab from temp or perm mem */ 96 #define SDYNARRAY 00200 /* symbol is dynamic array on stack */ 97 #define SINLINE 00400 /* function is of type inline */ 98 #define STNODE 01000 /* symbol shall be a temporary node */ 99 #define SBUILTIN 02000 /* this is a builtin function */ 100 #define SASG 04000 /* symbol is assigned to already */ 101 #define SLOCAL1 010000 102 #define SLOCAL2 020000 103 #define SLOCAL3 040000 104 105 /* alignment of initialized quantities */ 106 #ifndef AL_INIT 107 #define AL_INIT ALINT 108 #endif 109 110 struct rstack; 111 struct symtab; 112 union arglist; 113 #ifdef GCC_COMPAT 114 struct gcc_attr_pack; 115 #endif 116 117 struct namespace; 118 119 /* 120 * Dimension/prototype information. 121 * ddim > 0 holds the dimension of an array. 122 * ddim < 0 is a dynamic array and refers to a tempnode. 123 * ...unless: 124 * ddim == NOOFFSET, an array without dimenston, "[]" 125 * ddim == -1, dynamic array while building before defid. 126 */ 127 union dimfun { 128 int ddim; /* Dimension of an array */ 129 union arglist *dfun; /* Prototype index */ 130 }; 131 132 /* 133 * Argument list member info when storing prototypes. 134 */ 135 union arglist { 136 TWORD type; 137 union dimfun *df; 138 struct attr *sap; 139 }; 140 #define TNULL INCREF(FARG) /* pointer to FARG -- impossible type */ 141 #define TELLIPSIS INCREF(INCREF(FARG)) 142 143 /* 144 * Symbol table definition. 145 */ 146 struct symtab { 147 struct symtab *snext; /* link to other symbols in the same scope */ 148 struct symtab *sdown; /* link to parent class */ 149 struct symtab *sup; /* link to child class */ 150 int soffset; /* offset or value */ 151 char sclass; /* storage class */ 152 char slevel; /* scope level */ 153 short sflags; /* flags, see below */ 154 char *sname; /* Symbol name */ 155 char *soname; /* Written-out name */ 156 TWORD stype; /* type word */ 157 TWORD squal; /* qualifier word */ 158 union dimfun *sdf; /* ptr to the dimension/prototype array */ 159 struct attr *sap; /* the base type attribute list */ 160 }; 161 162 #define ISSOU(ty) ((ty) == STRTY || (ty) == UNIONTY) 163 164 /* 165 * External definitions 166 */ 167 struct swents { /* switch table */ 168 struct swents *next; /* Next struct in linked list */ 169 CONSZ sval; /* case value */ 170 int slab; /* associated label */ 171 }; 172 int mygenswitch(int, TWORD, struct swents **, int); 173 174 extern int blevel; 175 extern int oldstyle; 176 177 extern int lineno, nerrors; 178 179 extern char *ftitle; 180 extern struct symtab *cftnsp; 181 extern int autooff, maxautooff, argoff; 182 183 extern OFFSZ inoff; 184 185 extern int reached; 186 extern int isinlining; 187 extern int xinline, xgnu89, xgnu99; 188 extern int bdebug, ddebug, edebug, idebug, ndebug; 189 extern int odebug, pdebug, sdebug, tdebug, xdebug; 190 191 /* various labels */ 192 extern int brklab; 193 extern int contlab; 194 extern int flostat; 195 extern int retlab; 196 extern int doing_init, statinit; 197 extern short sztable[]; 198 extern char *astypnames[]; 199 200 /* pragma globals */ 201 extern int pragma_allpacked, pragma_packed, pragma_aligned; 202 extern char *pragma_renamed; 203 204 /* 205 * Flags used in the (elementary) flow analysis ... 206 */ 207 #define FBRK 02 208 #define FCONT 04 209 #define FDEF 010 210 #define FLOOP 020 211 212 /* 213 * Location counters 214 */ 215 #define NOSEG -1 216 #define PROG 0 /* (ro) program segment */ 217 #define DATA 1 /* (rw) data segment */ 218 #define RDATA 2 /* (ro) data segment */ 219 #define LDATA 3 /* (rw) local data */ 220 #define UDATA 4 /* (rw) uninitialized data */ 221 #define STRNG 5 /* (ro) string segment */ 222 #define PICDATA 6 /* (rw) relocatable data segment */ 223 #define PICRDATA 7 /* (ro) relocatable data segment */ 224 #define PICLDATA 8 /* (rw) local relocatable data */ 225 #define TLSDATA 9 /* (rw) TLS data segment */ 226 #define TLSUDATA 10 /* (rw) TLS uninitialized segment */ 227 #define CTORS 11 /* constructor */ 228 #define DTORS 12 /* destructor */ 229 #define NMSEG 13 /* other (named) segment */ 230 231 extern int lastloc; 232 void locctr(int type, struct symtab *sp); 233 void setseg(int type, char *name); 234 void defalign(int al); 235 void symdirec(struct symtab *sp); 236 237 /* mark an offset which is undefined */ 238 239 #define NOOFFSET (-10201) 240 241 /* declarations of various functions */ 242 extern NODE 243 *buildtree(int, NODE *, NODE *r), 244 *mkty(unsigned, union dimfun *, struct attr *), 245 *rstruct(char *, int), 246 *dclstruct(struct rstack *), 247 *strend(int gtype, char *), 248 *tymerge(NODE *, NODE *), 249 *stref(NODE *), 250 #ifdef WORD_ADDRESSED 251 *offcon(OFFSZ, TWORD, union dimfun *, struct attr *), 252 #endif 253 *bcon(int), 254 *xbcon(CONSZ, struct symtab *, TWORD), 255 *bpsize(NODE *), 256 *convert(NODE *, int), 257 *pconvert(NODE *), 258 *oconvert(NODE *), 259 *ptmatch(NODE *), 260 *makety(NODE *, TWORD, TWORD, union dimfun *, struct attr *), 261 *block(int, NODE *, NODE *, TWORD, union dimfun *, struct attr *), 262 *doszof(NODE *), 263 *talloc(void), 264 *optim(NODE *), 265 *clocal(NODE *), 266 *ccopy(NODE *), 267 *tempnode(int, TWORD, union dimfun *, struct attr *), 268 *eve(NODE *), 269 *doacall(struct symtab *, NODE *, NODE *, int); 270 NODE *intprom(NODE *); 271 OFFSZ tsize(TWORD, union dimfun *, struct attr *), 272 psize(NODE *); 273 NODE * typenode(NODE *new); 274 void spalloc(NODE *, NODE *, OFFSZ); 275 char *exname(char *); 276 NODE *floatcon(char *); 277 NODE *fhexcon(char *); 278 NODE *bdty(int op, ...); 279 extern struct rstack *rpole; 280 281 int oalloc(struct symtab *, int *); 282 void deflabel(char *, NODE *); 283 void gotolabel(char *); 284 unsigned int esccon(char **); 285 void inline_start(struct symtab *); 286 void inline_end(void); 287 void inline_addarg(struct interpass *); 288 void inline_ref(struct symtab *); 289 void inline_prtout(void); 290 void inline_args(struct symtab **, int); 291 NODE *inlinetree(struct symtab *, NODE *, NODE *); 292 void ftnarg(NODE *); 293 struct rstack *bstruct(char *, int, NODE *); 294 void moedef(char *); 295 void beginit(struct symtab *); 296 void simpleinit(struct symtab *, NODE *); 297 struct symtab *lookup(char *, int); 298 struct symtab *getsymtab(char *, int); 299 char *addstring(char *); 300 char *addname(char *); 301 void symclear(int); 302 struct symtab *hide(struct symtab *); 303 void soumemb(NODE *, char *, int); 304 int talign(unsigned int, struct attr *); 305 void bfcode(struct symtab **, int); 306 int chkftn(union arglist *, union arglist *); 307 void branch(int); 308 void cbranch(NODE *, NODE *); 309 void extdec(struct symtab *); 310 void defzero(struct symtab *); 311 int falloc(struct symtab *, int, NODE *); 312 TWORD ctype(TWORD); 313 void inval(CONSZ, int, NODE *); 314 int ninval(CONSZ, int, NODE *); 315 void infld(CONSZ, int, CONSZ); 316 void zbits(CONSZ, int); 317 void instring(struct symtab *); 318 void inwstring(struct symtab *); 319 void plabel(int); 320 void bjobcode(void); 321 void ejobcode(int); 322 void calldec(NODE *, NODE *); 323 int cisreg(TWORD); 324 void asginit(NODE *); 325 void desinit(NODE *); 326 void endinit(int); 327 void endictx(void); 328 void sspinit(void); 329 void sspstart(void); 330 void sspend(void); 331 void ilbrace(void); 332 void irbrace(void); 333 CONSZ scalinit(NODE *); 334 void p1print(char *, ...); 335 char *copst(int); 336 int cdope(int); 337 void myp2tree(NODE *); 338 void lcommprint(void); 339 void lcommdel(struct symtab *); 340 NODE *funcode(NODE *); 341 struct symtab *enumhd(char *); 342 NODE *enumdcl(struct symtab *); 343 NODE *enumref(char *); 344 CONSZ icons(NODE *); 345 CONSZ valcast(CONSZ v, TWORD t); 346 int mypragma(char *); 347 char *pragtok(char *); 348 int eat(int); 349 void fixdef(struct symtab *); 350 int cqual(TWORD, TWORD); 351 void defloc(struct symtab *); 352 int fldchk(int); 353 int nncon(NODE *); 354 void cunput(char); 355 NODE *nametree(struct symtab *sp); 356 void *inlalloc(int size); 357 void *blkalloc(int size); 358 void pass1_lastchance(struct interpass *); 359 void fldty(struct symtab *p); 360 int getlab(void); 361 struct suedef *sueget(struct suedef *p); 362 void complinit(void); 363 NODE *structref(NODE *p, int f, char *name); 364 NODE *cxop(int op, NODE *l, NODE *r); 365 NODE *imop(int op, NODE *l, NODE *r); 366 NODE *cxelem(int op, NODE *p); 367 NODE *cxconj(NODE *p); 368 NODE *cxret(NODE *p, NODE *q); 369 NODE *cast(NODE *p, TWORD t, TWORD q); 370 NODE *ccast(NODE *p, TWORD t, TWORD u, union dimfun *df, struct attr *sue); 371 int andable(NODE *); 372 int conval(NODE *, int, NODE *); 373 int ispow2(CONSZ); 374 void defid(NODE *q, int class); 375 void efcode(void); 376 void ecomp(NODE *p); 377 int upoff(int size, int alignment, int *poff); 378 void nidcl(NODE *p, int class); 379 void eprint(NODE *, int, int *, int *); 380 int uclass(int class); 381 int notlval(NODE *); 382 void ecode(NODE *p); 383 void ftnend(void); 384 void dclargs(void); 385 int suemeq(struct attr *s1, struct attr *s2); 386 struct symtab *strmemb(struct attr *ap); 387 int yylex(void); 388 void yyerror(char *); 389 int pragmas_gcc(char *t); 390 NODE *cstknode(TWORD t, union dimfun *df, struct attr *ap); 391 int concast(NODE *p, TWORD t); 392 #ifdef WORD_ADDRESSED 393 #define rmpconv(p) (p) 394 #else 395 NODE *rmpconv(NODE *); 396 #endif 397 NODE *nlabel(int label); 398 int isbuiltin(char *n); 399 400 #ifdef SOFTFLOAT 401 typedef struct softfloat SF; 402 SF soft_neg(SF); 403 SF soft_cast(CONSZ v, TWORD); 404 SF soft_plus(SF, SF); 405 SF soft_minus(SF, SF); 406 SF soft_mul(SF, SF); 407 SF soft_div(SF, SF); 408 int soft_cmp_eq(SF, SF); 409 int soft_cmp_ne(SF, SF); 410 int soft_cmp_ge(SF, SF); 411 int soft_cmp_gt(SF, SF); 412 int soft_cmp_le(SF, SF); 413 int soft_cmp_lt(SF, SF); 414 int soft_isz(SF); 415 CONSZ soft_val(SF); 416 #define FLOAT_NEG(sf) soft_neg(sf) 417 #define FLOAT_CAST(v,t) soft_cast(v, t) 418 #define FLOAT_PLUS(x1,x2) soft_plus(x1, x2) 419 #define FLOAT_MINUS(x1,x2) soft_minus(x1, x2) 420 #define FLOAT_MUL(x1,x2) soft_mul(x1, x2) 421 #define FLOAT_DIV(x1,x2) soft_div(x1, x2) 422 #define FLOAT_ISZERO(sf) soft_isz(sf) 423 #define FLOAT_VAL(sf) soft_val(sf) 424 #define FLOAT_EQ(x1,x2) soft_cmp_eq(x1, x2) 425 #define FLOAT_NE(x1,x2) soft_cmp_ne(x1, x2) 426 #define FLOAT_GE(x1,x2) soft_cmp_ge(x1, x2) 427 #define FLOAT_GT(x1,x2) soft_cmp_gt(x1, x2) 428 #define FLOAT_LE(x1,x2) soft_cmp_le(x1, x2) 429 #define FLOAT_LT(x1,x2) soft_cmp_lt(x1, x2) 430 #else 431 #define FLOAT_NEG(p) -(p) 432 #define FLOAT_CAST(p,v) (ISUNSIGNED(v) ? \ 433 (long double)(U_CONSZ)(p) : (long double)(CONSZ)(p)) 434 #define FLOAT_PLUS(x1,x2) (x1) + (x2) 435 #define FLOAT_MINUS(x1,x2) (x1) - (x2) 436 #define FLOAT_MUL(x1,x2) (x1) * (x2) 437 #define FLOAT_DIV(x1,x2) (x1) / (x2) 438 #define FLOAT_ISZERO(p) (p) == 0.0 439 #define FLOAT_VAL(p) (CONSZ)(p) 440 #define FLOAT_EQ(x1,x2) (x1) == (x2) 441 #define FLOAT_NE(x1,x2) (x1) != (x2) 442 #define FLOAT_GE(x1,x2) (x1) >= (x2) 443 #define FLOAT_GT(x1,x2) (x1) > (x2) 444 #define FLOAT_LE(x1,x2) (x1) <= (x2) 445 #define FLOAT_LT(x1,x2) (x1) < (x2) 446 #endif 447 448 enum { ATTR_NONE, 449 450 /* PCC used attributes */ 451 ATTR_COMPLEX, /* Internal definition of complex */ 452 xxxATTR_BASETYP, /* Internal; see below */ 453 ATTR_QUALTYP, /* Internal; const/volatile, see below */ 454 ATTR_ALIGNED, 455 ATTR_STRUCT, /* Internal; element list */ 456 #define ATTR_MAX ATTR_STRUCT 457 458 #ifdef GCC_COMPAT 459 /* type attributes */ 460 GCC_ATYP_PACKED, 461 GCC_ATYP_SECTION, 462 GCC_ATYP_TRANSP_UNION, 463 GCC_ATYP_UNUSED, 464 GCC_ATYP_DEPRECATED, 465 GCC_ATYP_MAYALIAS, 466 467 /* variable attributes */ 468 GCC_ATYP_MODE, 469 470 /* function attributes */ 471 GCC_ATYP_NORETURN, 472 GCC_ATYP_FORMAT, 473 GCC_ATYP_NONNULL, 474 GCC_ATYP_SENTINEL, 475 GCC_ATYP_WEAK, 476 GCC_ATYP_FORMATARG, 477 GCC_ATYP_GNU_INLINE, 478 GCC_ATYP_MALLOC, 479 GCC_ATYP_NOTHROW, 480 GCC_ATYP_CONST, 481 GCC_ATYP_PURE, 482 GCC_ATYP_CONSTRUCTOR, 483 GCC_ATYP_DESTRUCTOR, 484 GCC_ATYP_VISIBILITY, 485 GCC_ATYP_STDCALL, 486 GCC_ATYP_CDECL, 487 GCC_ATYP_WARN_UNUSED_RESULT, 488 GCC_ATYP_USED, 489 GCC_ATYP_NO_INSTR_FUN, 490 GCC_ATYP_NOINLINE, 491 GCC_ATYP_ALIAS, 492 GCC_ATYP_WEAKREF, 493 GCC_ATYP_ALLOCSZ, 494 GCC_ATYP_ALW_INL, 495 GCC_ATYP_TLSMODEL, 496 GCC_ATYP_ALIASWEAK, 497 GCC_ATYP_REGPARM, 498 499 /* other stuff */ 500 GCC_ATYP_BOUNDED, /* OpenBSD extra boundary checks */ 501 502 GCC_ATYP_MAX 503 #endif 504 }; 505 506 507 /* 508 #ifdef notdef 509 * ATTR_BASETYP has the following layout: 510 * aa[0].iarg has size 511 * aa[1].iarg has alignment 512 #endif 513 * ATTR_QUALTYP has the following layout: 514 * aa[0].iarg has CON/VOL + FUN/ARY/PTR 515 * Not defined yet... 516 * aa[3].iarg is dimension for arrays (XXX future) 517 * aa[3].varg is function defs for functions. 518 */ 519 #ifdef notdef 520 #define atypsz aa[0].iarg 521 #define aalign aa[1].iarg 522 #endif 523 524 /* 525 * ATTR_STRUCT member list. 526 */ 527 #define amlist aa[0].varg 528 #define amsize aa[1].iarg 529 #define strattr(x) (attr_find(x, ATTR_STRUCT)) 530 531 #define iarg(x) aa[x].iarg 532 #define sarg(x) aa[x].sarg 533 #define varg(x) aa[x].varg 534 535 void gcc_init(void); 536 int gcc_keyword(char *, NODE **); 537 struct attr *gcc_attr_parse(NODE *); 538 void gcc_tcattrfix(NODE *); 539 struct gcc_attrib *gcc_get_attr(struct suedef *, int); 540 void dump_attr(struct attr *gap); 541 542 struct attr *attr_add(struct attr *orig, struct attr *new); 543 struct attr *attr_new(int, int); 544 struct attr *attr_find(struct attr *, int); 545 struct attr *attr_copy(struct attr *src, struct attr *dst, int nelem); 546 struct attr *attr_dup(struct attr *ap, int n); 547 548 #ifndef NO_C_BUILTINS 549 struct bitable { 550 char *name; 551 NODE *(*fun)(const struct bitable *, NODE *a); 552 short flags; 553 #define BTNOPROTO 001 554 #define BTNORVAL 002 555 #define BTNOEVE 004 556 short narg; 557 TWORD *tp; 558 TWORD rt; 559 }; 560 561 NODE *builtin_check(struct symtab *, NODE *a); 562 void builtin_init(void); 563 564 /* Some builtins targets need to implement */ 565 NODE *builtin_frame_address(const struct bitable *bt, NODE *a); 566 NODE *builtin_return_address(const struct bitable *bt, NODE *a); 567 NODE *builtin_cfa(const struct bitable *bt, NODE *a); 568 #endif 569 570 571 #ifdef STABS 572 void stabs_init(void); 573 void stabs_file(char *); 574 void stabs_efile(char *); 575 void stabs_line(int); 576 void stabs_rbrac(int); 577 void stabs_lbrac(int); 578 void stabs_func(struct symtab *); 579 void stabs_newsym(struct symtab *); 580 void stabs_chgsym(struct symtab *); 581 void stabs_struct(struct symtab *, struct attr *); 582 #endif 583 584 #ifndef CHARCAST 585 /* to make character constants into character connstants */ 586 /* this is a macro to defend against cross-compilers, etc. */ 587 #define CHARCAST(x) (char)(x) 588 #endif 589 590 /* sometimes int is smaller than pointers */ 591 #if SZPOINT(CHAR) <= SZINT 592 #define INTPTR INT 593 #elif SZPOINT(CHAR) <= SZLONG 594 #define INTPTR LONG 595 #elif SZPOINT(CHAR) <= SZLONGLONG 596 #define INTPTR LONGLONG 597 #else 598 #error int size unknown 599 #endif 600 601 /* Generate a bitmask from a given type size */ 602 #define SZMASK(y) ((((1LL << ((y)-1))-1) << 1) | 1) 603 604 /* 605 * C compiler first pass extra defines. 606 */ 607 #define QUALIFIER (MAXOP+1) 608 #define CLASS (MAXOP+2) 609 #define RB (MAXOP+3) 610 #define DOT (MAXOP+4) 611 #define ELLIPSIS (MAXOP+5) 612 #define TYPE (MAXOP+6) 613 #define LB (MAXOP+7) 614 #define COMOP (MAXOP+8) 615 #define QUEST (MAXOP+9) 616 #define COLON (MAXOP+10) 617 #define ANDAND (MAXOP+11) 618 #define OROR (MAXOP+12) 619 #define NOT (MAXOP+13) 620 #define CAST (MAXOP+14) 621 #define STRING (MAXOP+15) 622 623 /* The following must be in the same order as their NOASG counterparts */ 624 #define PLUSEQ (MAXOP+16) 625 #define MINUSEQ (MAXOP+17) 626 #define DIVEQ (MAXOP+18) 627 #define MODEQ (MAXOP+19) 628 #define MULEQ (MAXOP+20) 629 #define ANDEQ (MAXOP+21) 630 #define OREQ (MAXOP+22) 631 #define EREQ (MAXOP+23) 632 #define LSEQ (MAXOP+24) 633 #define RSEQ (MAXOP+25) 634 635 #define UNASG (-(PLUSEQ-PLUS))+ 636 637 #define INCR (MAXOP+26) 638 #define DECR (MAXOP+27) 639 #define SZOF (MAXOP+28) 640 #define CLOP (MAXOP+29) 641 #define ATTRIB (MAXOP+30) 642 #define XREAL (MAXOP+31) 643 #define XIMAG (MAXOP+32) 644 #define TYMERGE (MAXOP+33) 645 #define LABEL (MAXOP+34) 646 647 /* 648 * The following types are only used in pass1. 649 */ 650 #define SIGNED (MAXTYPES+1) 651 #define FARG (MAXTYPES+2) 652 #define FIMAG (MAXTYPES+3) 653 #define IMAG (MAXTYPES+4) 654 #define LIMAG (MAXTYPES+5) 655 #define FCOMPLEX (MAXTYPES+6) 656 #define COMPLEX (MAXTYPES+7) 657 #define LCOMPLEX (MAXTYPES+8) 658 #define ENUMTY (MAXTYPES+9) 659 660 #define ISFTY(x) ((x) >= FLOAT && (x) <= LDOUBLE) 661 #define ISCTY(x) ((x) >= FCOMPLEX && (x) <= LCOMPLEX) 662 #define ISITY(x) ((x) >= FIMAG && (x) <= LIMAG) 663 #define ANYCX(p) (p->n_type == STRTY && attr_find(p->n_ap, ATTR_COMPLEX)) 664 665 #define coptype(o) (cdope(o)&TYFLG) 666 #define clogop(o) (cdope(o)&LOGFLG) 667 #define casgop(o) (cdope(o)&ASGFLG) 668 669 #include <cxxdefs.h> 670 671