Quick Search:

Mode

Context

Displaying the whole file. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.21
 
1.22
 
MAIN:ragge:20110714170210
 
local2.c
_>11 /*      $Id$    */
 22 /*
 33  * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved.
 44  *
 55  * Redistribution and use in source and binary forms, with or without
 66  * modification, are permitted provided that the following conditions
 77  * are met:
 88  *
 99  * Redistributions of source code and documentation must retain the above
 1010  * copyright notice, this list of conditions and the following disclaimer.
 1111  * Redistributions in binary form must reproduce the above copyright
 1212  * notice, this list of conditionsand the following disclaimer in the
 1313  * documentation and/or other materials provided with the distribution.
 1414  * All advertising materials mentioning features or use of this software
 1515  * must display the following acknowledgement:
 1616  *      This product includes software developed or owned by Caldera
 1717  *      International, Inc.
 1818  * Neither the name of Caldera International, Inc. nor the names of other
 1919  * contributors may be used to endorse or promote products derived from
 2020  * this software without specific prior written permission.
 2121  *
 2222  * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
 2323  * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
 2424  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 2525  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 2626  * DISCLAIMED.  IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE
 2727  * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 2828  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 2929  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 3030  * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT,
 3131  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
 3232  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 3333  * POSSIBILITY OF SUCH DAMAGE.
 3434  */
 3535 
 3636 # include "pass2.h"
 3737 # include "ctype.h"
 3838 /* a lot of the machine dependent parts of the second pass */
 3939 
 4040 static void prtype(NODE *n);
 4141 static void acon(NODE *p);
 4242 
 4343 /*
 4444  * Print out the prolog assembler.
 4545  * addto and regoff are already calculated.
 4646  */
 4747 void
 4848 prologue(struct interpass_prolog *ipp)
 4949 {
 5050         printf("        .word 0x%llx\n", (unsigned long long)ipp->ipp_regs[0]);
 5151         if (p2maxautooff)
 5252                 printf("        subl2 $%d,%%sp\n", p2maxautooff);
 5353 }
 5454 
 5555 /*
 5656  * Called after all instructions in a function are emitted.
 5757  * Generates code for epilog here.
 5858  */
 5959 void
 6060 eoftn(struct interpass_prolog *ipp)
 6161 {
 6262         if (ipp->ipp_ip.ip_lbl == 0)
 6363                 return; /* no code needs to be generated */
 6464         printf("        ret\n");
 6565 }
 6666 
 6767 struct hoptab { int opmask; char * opstring; } ioptab[] = {
 6868 
 6969         { PLUS"add", },
 7070         { MINUS,        "sub", },
 7171         { MUL,  "mul", },
 7272         { DIV,  "div", },
 7373         { OR,   "bis", },
 7474         { ER,   "xor", },
 7575         { AND,  "bic", },
 7676         { -1, ""     },
 7777 };
 7878 
 7979 void
 8080 hopcode( f, o ){
 8181         /* output the appropriate string from the above table */
 8282 
 8383         register struct hoptab *q;
 8484 
 8585         for( q = ioptabq->opmask>=0; ++q ){
 8686                 if( q->opmask == o ){
 8787                         printf( "%s", q->opstring );
 8888 /* tbl
 8989                         if( f == 'F' ) printf( "e" );
 9090                         else if( f == 'D' ) printf( "d" );
 9191    tbl */
 9292 /* tbl */
 9393                         switch( f ) {
 9494                                 case 'L':
 9595                                 case 'W':
 9696                                 case 'B':
 9797                                 case 'D':
 9898                                 case 'F':
 9999                                         printf("%c", tolower(f));
 100100                                         break;
 101101 
 102102                                 }
 103103 /* tbl */
 104104                         return;
 105105                         }
 106106                 }
 107107         cerror( "no hoptab for %s", opst[o] );
 108108         }
 109109 
 110110 char *
 111111 rnames[] = {  /* keyed to register number tokens */
 112112 
 113113         "%r0", "%r1", "%r2", "%r3", "%r4", "%r5",
 114114         "%r6", "%r7", "%r8", "%r9", "%r10", "%r11",
 115115         "%ap", "%fp", "%sp", "%pc",
 116116         /* The concatenated regs has the name of the lowest */
 117117         "%r0", "%r1", "%r2", "%r3", "%r4", "%r5",
 118118         "%r6", "%r7", "%r8", "%r9", "%r10"
 119119         };
 120120 
 121121 int
 122122 tlen(NODE *p)
 123123 {
 124124         switch(p->n_type) {
 125125         case CHAR:
 126126         case UCHAR:
 127127                 return(1);
 128128 
 129129         case SHORT:
 130130         case USHORT:
 131131                 return(2);
 132132 
 133133         case DOUBLE:
 134134         case LONGLONG:
 135135         case ULONGLONG:
 136136                 return(8);
 137137 
 138138         default:
 139139                 return(4);
 140140         }
 141141 }
 142142 
 143143 void
 144144 prtype(NODE *n)
 145145 {
 146146         static char pt[] = { 0, 0, 'b', 'b', 'w', 'w', 'l', 'l', 0, 0,
 147147             'q', 'q', 'f', 'd' };
 148148         TWORD t = n->n_type;
 149149 
 150150         if (ISPTR(t))
 151151                 t = UNSIGNED;
 152152 
 153153         if (t > DOUBLE || pt[t] == 0)
 154154                 comperr("prtype: bad type");
 155155         putchar(pt[t]);
 156156 }
 157157 
 158158 /*
 159159  * Emit conversions as given by the following table. Dest is always reg,
 160160  *   if it should be something else let peephole optimizer deal with it.
 161161  *   This code ensures type correctness in 32-bit registers.
 162162  *   XXX is that necessary?
 163163  *
 164164  * From                         To
 165165  *       char   uchar  short  ushort int    uint   ll    ull   float double
 166166  * char  movb   movb   cvtbw  cvtbw  cvtbl  cvtbl  A     A     cvtbf cvtbd
 167167  * uchar movb   movb   movzbw movzbw movzbl movzbl B     B     G     G
 168168  * short movb   movb   movw   movw   cvtwl  cvtwl  C(A)  C(A)  cvtwf cvtwd
 169169  * ushrt movb   movb   movw   movw   movzwl movzwl D(B)  D(B)  H     H
 170170  * int   movb   movb   movw   movw   movl   movl   E     E     cvtlf cvtld
 171171  * uint  movb   movb   movw   movw   movl   movl   F     F     I     I
 172172  * ll    movb   movb   movw   movw   movl   movl   movq  movq  J     K
 173173  * ull   movb   movb   movw   movw   movl   movl   movq  movq  L     M
 174174  * float cvtfb  cvtfb  cvtfw  cvtfw  cvtfl  cvtfl  N     O     movf  cvtfd
 175175  * doubl cvtdb  cvtdb  cvtdw  cvtdw  cvtdl  cvtdl  P     Q     cvtdf movd
 176176  *
 177177  *  A: cvtbl + sign extend
 178178  *  B: movzbl + zero extend
 179179  *  G: movzbw + cvtwX
 180180  *  H: movzwl + cvtwX
 181181  *  I: cvtld + addX
 182182  *  J: call __floatdisf
 183183  *  K: call __floatdidf
 184184  *  L: xxx + call __floatdisf
 185185  *  M: xxx + call __floatdidf
 186186  *  N: call __fixsfdi
 187187  *  O: call __fixunssfdi
 188188  *  P: call __fixdfdi
 189189  *  Q: call __fixunsdfdi
 190190  */
 191191 
 192192 #define MVD     1 /* mov + dest type */
 193193 #define CVT     2 /* cvt + src type + dst type */
 194194 #define MVZ     3 /* movz + src type + dst type */
 195195 #define CSE     4 /* cvt + src type + l + sign extend upper */
 196196 #define MZE     5 /* movz + src type + l + zero extend upper */
 197197 #define MLE     6 /* movl + sign extend upper */
 198198 #define MLZ     7 /* movl + zero extend upper */
 199199 #define MZC     8 /* movz + cvt */
 200200 
 201201 static char scary[][10] = {
 202202         { MVD, MVD, CVT, CVT, CVT, CVT, CSE, CSE, CVT, CVT },
 203203         { MVD, MVD, MVZ, MVZ, MVZ, MVZ, MZE, MZE, MZC, MZC },
 204204         { MVD, MVD, MVD, MVD, CVT, CVT, CSE, CSE, CVT, CVT },
 205205         { MVD, MVD, MVD, MVD, MVZ, MVZ, MZE, MZE, MZC, MZC },
 206206         { MVD, MVD, MVD, MVD, MVD, MVD, MLE, MLE, CVT, CVT },
 207207         { MVD, MVD, MVD, MVD, MVD, MVD, MLZ, MLZ, 'I', 'I' },
 208208         { MVD, MVD, MVD, MVD, MVD, MVD, MVD, MVD, 'J', 'K' },
 209209         { MVD, MVD, MVD, MVD, MVD, MVD, MVD, MVD, 'L', 'M' },
 210210         { CVT, CVT, CVT, CVT, CVT, CVT, 'N', 'O', MVD, CVT },
 211211         { CVT, CVT, CVT, CVT, CVT, CVT, 'P', 'Q', CVT, MVD },
 212212 };
 213213 
 214214 static void
 215215 sconv(NODE *p)
 216216 {
 217217         NODE *l = p->n_left;
 218218         TWORD ts, td;
 219219         int o;
 220220 
 221221         /*
 222222          * Source node may be in register or memory.
 223223          * Result is always in register.
 224224          */
 225225         ts = l->n_type;
 226226         if (ISPTR(ts))
 227227                 ts = UNSIGNED;
 228228         td = p->n_type;
 229229         ts = ts < LONG ? ts-2 : ts-4;
 230230         td = td < LONG ? td-2 : td-4;
 231231 
 232232         o = scary[ts][td];
 233233         switch (o) {
 234234         case MLE:
 235235         case MLZ:
 236236         case MVD:
 237237                 expand(p, INAREG|INBREG, "\tmovZL\tAL,A1\n");
 238238                 break;
 239239 
 240240         case CSE:
 241241                 expand(p, INAREG|INBREG, "\tcvtZLl\tAL,A1\n");
 242242                 break;
 243243 
 244244         case CVT:
 245245                 expand(p, INAREG|INBREG, "\tcvtZLZR\tAL,A1\n");
 246246                 break;
 247247 
 248248         case MZE:
 249249                 expand(p, INAREG|INBREG, "\tmovzZLl\tAL,A1\n");
 250250                 break;
 251251 
 252252         case MVZ:
 253253                 expand(p, INAREG|INBREG, "\tmovzZLZR\tAL,A1\n");
 254254                 break;
 255255 
 256256         case MZC:
 257257                 expand(p, INAREG|INBREG, "\tmovzZLl\tAL,A1\n");
 258258                 expand(p, INAREG|INBREG, "\tcvtlZR\tA1,A1\n");
 259259                 break;
 260260 
<> 261+        case 'I': /* unsigned to double */
  262+                expand(p, INAREG|INBREG, "\tcvtld\tAL,A1\n");
  263+                printf("\tjgeq\t1f\n");
  264+                expand(p, INAREG|INBREG, "\taddd2\t$0d4.294967296e+9,A1\n");
  265+                printf("1:\n");
  266+                break;
261267         default:
 262268                 comperr("unsupported conversion %d", o);
 263269         }
 264270         switch (o) {
 265271         case MLE:
 266272         case CSE:
 267273                 expand(p, INBREG, "\tashl\t$-31,A1,U1\n");
 268274                 break;
 269275         case MLZ:
 270276         case MZE:
 271277                 expand(p, INAREG|INBREG, "\tclrl\tU1\n");
 272278                 break;
 273279         }
 274280 }
 275281 
 276282 /*
 277283  * Assign a constant from p to q.  Both are expected to be leaves by now.
 278284  * This is for 64-bit integers.
 279285  */
 280286 static void
 281287 casg64(NODE *p)
 282288 {
 283289         NODE *l, *r;
 284290         char *str;
 285291         int mneg = 1;
 286292         
 287293         l = p->n_left;
 288294         r = p->n_right;
 289295 
 290296 #ifdef PCC_DEBUG
 291297         if (r->n_op != ICON)
 292298                 comperr("casg");
 293299 #endif
 294300         if (r->n_name[0] != '\0') {
 295301                 /* named constant, nothing to do */
 296302                 str = "movq\tAR,AL";
 297303                 mneg = 0;
 298304         } else if (r->n_lval == 0) {
 299305                 str = "clrq\tAL";
 300306                 mneg = 0;
 301307         } else if (r->n_lval < 0) {
 302308                 if (r->n_lval >= -63) {
 303309                         r->n_lval = -r->n_lval;
 304310                         str = "mnegl\tAR,AL";
 305311                 } else if (r->n_lval >= -128) {
 306312                         str = "cvtbl\tAR,AL";
 307313                 } else if (r->n_lval >= -32768) {
 308314                         str = "cvtwl\tAR,AL";
 309315                 } else if (r->n_lval >= -4294967296LL) {
 310316                         str = "movl\tAR,AL";
 311317                 } else {
 312318                         str = "movq\tAR,AL";
 313319                         mneg = 0;
 314320                 }
 315321         } else {
 316322                 mneg = 0;
 317323                 if (r->n_lval <= 63 || r->n_lval > 4294967295LL) {
 318324                         str = "movq\tAR,AL";
 319325                 } else if (r->n_lval <= 255) {
 320326                         str = "movzbl\tAR,AL\n\tclrl\tUL";
 321327                 } else if (r->n_lval <= 65535) {
 322328                         str = "movzwl\tAR,AL\n\tclrl\tUL";
 323329                 } else /* if (r->n_lval <= 4294967295) */ {
 324330                         str = "movl\tAR,AL\n\tclrl\tUL";
 325331                 }
 326332         }
 327333         expand(p, FOREFF, str);
 328334         if (mneg)
 329335                 expand(p, FOREFF, "\tmnegl $-1,UL\n");
 330336 }
 331337 
 332338 /*
 333339  * Assign a constant from p to q.  Both are expected to be leaves by now.
 334340  * This is only for 32-bit integer types.
 335341  */
 336342 static void
 337343 casg(NODE *p)
 338344 {
 339345         NODE *l, *r;
 340346         char *str;
 341347         
 342348         l = p->n_left;
 343349         r = p->n_right;
 344350 
 345351 #ifdef PCC_DEBUG
 346352         if (r->n_op != ICON)
 347353                 comperr("casg");
 348354 #endif
 349355         if (r->n_name[0] != '\0') {
 350356                 /* named constant, nothing to do */
 351357                 str = "movZL\tAR,AL";
 352358         } else if (r->n_lval == 0) {
 353359                 str = "clrZL\tAL";
 354360         } else if (r->n_lval < 0) {
 355361                 if (r->n_lval >= -63) {
 356362                         r->n_lval = -r->n_lval;
 357363                         str = "mnegZL\tAR,AL";
 358364                 } else if (r->n_lval >= -128) {
 359365                         if (l->n_type == CHAR)
 360366                                 str = "movb\tAR,AL";
 361367                         else
 362368                                 str = "cvtbZL\tAR,AL";
 363369                 } else if (r->n_lval >= -32768) {
 364370                         if (l->n_type == SHORT)
 365371                                 str = "movw\tAR,AL";
 366372                         else
 367373                                 str = "cvtwZL\tAR,AL";
 368374                 } else
 369375                         str = "movZL\tAR,AL";
 370376         } else {
 371377                 if (r->n_lval <= 63 || r->n_lval > 65535) {
 372378                         str = "movZL\tAR,AL";
 373379                 } else if (r->n_lval <= 255) {
 374380                         str = l->n_type < SHORT ?
 375381                             "movb\tAR,AL" : "movzbZL\tAR,AL";
 376382                 } else /* if (r->n_lval <= 65535) */ {
 377383                         str = l->n_type < INT ?
 378384                             "movw\tAR,AL" : "movzwZL\tAR,AL";
 379385                 }
 380386         }
 381387         expand(p, FOREFF, str);
 382388 }
 383389 
 384390 /*
 385391  * Emit code to compare two longlong numbers.
 386392  */
 387393 static void
 388394 twollcomp(NODE *p)
 389395 {
 390396         int u;
 391397         int s = getlab2();
 392398         int e = p->n_label;
 393399         int cb1, cb2;
 394400 
 395401         u = p->n_op;
 396402         switch (p->n_op) {
 397403         case NE:
 398404                 cb1 = 0;
 399405                 cb2 = NE;
 400406                 break;
 401407         case EQ:
 402408                 cb1 = NE;
 403409                 cb2 = 0;
 404410                 break;
 405411         case LE:
 406412         case LT:
 407413                 u += (ULE-LE);
 408414                 /* FALLTHROUGH */
 409415         case ULE:
 410416         case ULT:
 411417                 cb1 = GT;
 412418                 cb2 = LT;
 413419                 break;
 414420         case GE:
 415421         case GT:
 416422                 u += (ULE-LE);
 417423                 /* FALLTHROUGH */
 418424         case UGE:
 419425         case UGT:
 420426                 cb1 = LT;
 421427                 cb2 = GT;
 422428                 break;
 423429         
 424430         default:
 425431                 cb1 = cb2 = 0; /* XXX gcc */
 426432         }
 427433         if (p->n_op >= ULE)
 428434                 cb1 += 4, cb2 += 4;
 429435         expand(p, 0, "  cmpl UR,UL\n");
 430436         if (cb1) cbgen(cb1, s);
 431437         if (cb2) cbgen(cb2, e);
 432438         expand(p, 0, "  cmpl AL,AR\n");
 433439         cbgen(u, e);
 434440         deflab(s);
 435441 }
 436442 
 437443 
 438444 void
 439445 zzzcode(NODE *p, int c)
 440446 {
 441447         NODE *l, *r;
 442448         int m;
 443449         char *ch;
 444450 
 445451         switch (c) {
 446452         case 'N'/* logical ops, turned into 0-1 */
 447453                 /* use register given by register 1 */
 448454                 cbgen( 0, m=getlab2());
 449455                 deflab( p->n_label );
 450456                 printf( "       clrl    %s\n", rnames[getlr( p, '1' )->n_rval] );
 451457                 deflab( m );
 452458                 return;
 453459 
 454460         case 'A': /* Assign a constant directly to a memory position */
 455461                 printf("\t");
 456462                 if (p->n_type < LONG || ISPTR(p->n_type))
 457463                         casg(p);
 458464                 else
 459465                         casg64(p);
 460466                 printf("\n");
 461467                 break;
 462468 
 463469         case 'B': /* long long compare */
 464470                 twollcomp(p);
 465471                 break;
 466472 
 467473         case 'C':       /* num words pushed on arg stack */
 468474                 printf("$%d", p->n_qual);
 469475                 break;
 470476 
 471477         case 'D':       /* INCR and DECR */
 472478                 zzzcode(p->n_left, 'A');
 473479                 printf("\n      ");
 474480 
 475481 #if 0
 476482         case 'E':       /* INCR and DECR, FOREFF */
 477483                 if (p->n_right->n_lval == 1)
 478484                         {
 479485                         printf("%s", (p->n_op == INCR ? "inc" : "dec") );
 480486                         prtype(p->n_left);
 481487                         printf("        ");
 482488                         adrput(stdout, p->n_left);
 483489                         return;
 484490                         }
 485491                 printf("%s", (p->n_op == INCR ? "add" : "sub") );
 486492                 prtype(p->n_left);
 487493                 printf("2       ");
 488494                 adrput(stdout, p->n_right);
 489495                 printf(",");
 490496                 adrput(p->n_left);
 491497                 return;
 492498 #endif
 493499 
 494500         case 'F':       /* register type of right operand */
 495501                 {
 496502                 register NODE *n;
 497503                 extern int xdebug;
 498504                 register int ty;
 499505 
 500506                 n = getlr( p, 'R' );
 501507                 ty = n->n_type;
 502508 
 503509                 if (xdebug) printf("->%d<-", ty);
 504510 
 505511                 if ( ty==DOUBLE) printf("d");
 506512                 else if ( ty==FLOAT ) printf("f");
 507513                 else printf("l");
 508514                 return;
 509515                 }
 510516 
 511517         case 'G': /* emit conversion instructions */
 512518                 sconv(p);
 513519                 break;
 514520 
 515521         case 'J': /* jump or ret? */
 516522                 {
 517523                         struct interpass *ip =
 518524                             DLIST_PREV((struct interpass *)p2env.epp, qelem);
 519525                         if (ip->type != IP_DEFLAB ||
 520526                             ip->ip_lbl != getlr(p, 'L')->n_lval)
 521527                                 expand(p, FOREFF, "jbr  LL");
 522528                         else
 523529                                 printf("ret");
 524530                 }
 525531                 break;
 526532 
 527533         case 'L':       /* type of left operand */
 528534         case 'R':       /* type of right operand */
 529535                 {
 530536                 register NODE *n;
 531537                 extern int xdebug;
 532538 
 533539                 n = getlr ( p, c);
 534540                 if (xdebug) printf("->%d<-", n->n_type);
 535541 
 536542                 prtype(n);
 537543                 return;
 538544                 }
 539545 
 540546         case 'O': /* print out emulated ops */
 541547                 expand(p, FOREFF, "\tmovq       AR,-(%sp)\n");
 542548                 expand(p, FOREFF, "\tmovq       AL,-(%sp)\n");
 543549                 if (p->n_op == DIV && p->n_type == ULONGLONG) ch = "udiv";
 544550                 else if (p->n_op == DIV) ch = "div";
 545551                 else if (p->n_op == MOD && p->n_type == ULONGLONG) ch = "umod";
 546552                 else if (p->n_op == MOD) ch = "mod";
<>547 -                else ch = 0, comperr("ZO");
  553+                else if (p->n_op == MUL) ch = "mul";
  554+                else ch = 0, comperr("ZO %d", p->n_op);
548555                 printf("\tcalls $4,__%sdi3\n", ch);
 549556                 break;
 550557 
 551558 
 552559         case 'Z':       /* complement mask for bit instr */
 553560                 printf("$%Ld", ~p->n_right->n_lval);
 554561                 return;
 555562 
 556563         case 'U':       /* 32 - n, for unsigned right shifts */
 557564                 printf("$" CONFMT, 32 - p->n_right->n_lval );
 558565                 return;
 559566 
 560567         case 'T':       /* rounded structure length for arguments */
 561568                 {
 562569                 int size;
 563570 
 564571                 size = p->n_stsize;
 565572                 SETOFF( size, 4);
 566573                 printf("$%d", size);
 567574                 return;
 568575                 }
 569576 
 570577         case 'S'/* structure assignment */
 571578                 {
 572579                         register int size;
 573580 
 574581                         size = p->n_stsize;
 575582                         l = r = NULL; /* XXX gcc */
 576583                         if( p->n_op == STASG ){
 577584                                 l = p->n_left;
 578585                                 r = p->n_right;
 579586 
 580587                                 }
 581588                         else if( p->n_op == STARG ){
 582589                                 /* store an arg into a temporary */
 583590                                 printf("\tsubl2 $%d,%%sp\n",
 584591                                     size < 4 ? 4 : size);
 585592                                 l = mklnode(OREG, 0, SP, INT);
 586593                                 r = p->n_left;
 587594                                 }
 588595                         else cerror( "STASG bad" );
 589596 
 590597                         if( r->n_op == ICON ) r->n_op = NAME;
 591598                         else if( r->n_op == REG ) r->n_op = OREG;
 592599                         else if( r->n_op != OREG ) cerror( "STASG-r" );
 593600 
 594601                         if( size <= 0 || size > 65535 )
 595602                                 cerror("structure size <0=0 or >65535");
 596603 
 597604                         switch(size) {
 598605                                 case 1:
 599606                                         printf("        movb    ");
 600607                                         break;
 601608                                 case 2:
 602609                                         printf("        movw    ");
 603610                                         break;
 604611                                 case 4:
 605612                                         printf("        movl    ");
 606613                                         break;
 607614                                 case 8:
 608615                                         printf("        movq    ");
 609616                                         break;
 610617                                 default:
 611618                                         printf("        movc3   $%d,", size);
 612619                                         break;
 613620                         }
 614621                         adrput(stdout, r);
 615622                         printf(",");
 616623                         adrput(stdout, l);
 617624                         printf("\n");
 618625 
 619626                         if( r->n_op == NAME ) r->n_op = ICON;
 620627                         else if( r->n_op == OREG ) r->n_op = REG;
 621628                         if (p->n_op == STARG)
 622629                                 tfree(l);
 623630 
 624631                         }
 625632                 break;
 626633 
 627634         default:
 628635                 comperr("illegal zzzcode '%c'", c);
 629636         }
 630637 }
 631638 
 632639 void
 633640 rmove( int rt,int  rs, TWORD t ){
 634641         printf( "       %s      %s,%s\n",
 635642                 (t==FLOAT ? "movf" : (t==DOUBLE ? "movd" : "movl")),
 636643                 rnames[rs], rnames[rt] );
 637644         }
 638645 
 639646 #if 0
 640647 setregs(){ /* set up temporary registers */
 641648         fregs = 6;      /* tbl- 6 free regs on VAX (0-5) */
 642649         ;
 643650         }
 644651 
 645652 szty(t){ /* size, in registers, needed to hold thing of type t */
 646653         return( (t==DOUBLE||t==FLOAT) ? 2 : 1 );
 647654         }
 648655 #endif
 649656 
 650657 int
 651658 rewfld( p ) NODE *p; {
 652659         return(1);
 653660         }
 654661 
 655662 #if 0
 656663 callreg(p) NODE *p; {
 657664         return( R0 );
 658665         }
 659666 
 660667 base( p ) register NODE *p; {
 661668         register int o = p->op;
 662669 
 663670         if( (o==ICON && p->name[0] != '\0')) return( 100 ); /* ie no base reg */
 664671         if( o==REG ) return( p->rval );
 665672     if( (o==PLUS || o==MINUS) && p->left->op == REG && p->right->op==ICON)
 666673                 return( p->left->rval );
 667674     if( o==OREG && !R2TEST(p->rval) && (p->type==INT || p->type==UNSIGNED || ISPTR(p->type)) )
 668675                 return( p->rval + 0200*1 );
 669676         if( o==INCR && p->left->op==REG ) return( p->left->rval + 0200*2 );
 670677         if( o==ASG MINUS && p->left->op==REG) return( p->left->rval + 0200*4 );
 671678         if( o==UNARY MUL && p->left->op==INCR && p->left->left->op==REG
 672679           && (p->type==INT || p->type==UNSIGNED || ISPTR(p->type)) )
 673680                 return( p->left->left->rval + 0200*(1+2) );
 674681         return( -1 );
 675682         }
 676683 
 677684 offset( p, tyl ) register NODE *p; int tyl; {
 678685 
 679686         if( tyl==1 && p->op==REG && (p->type==INT || p->type==UNSIGNED) ) return( p->rval );
 680687         if( (p->op==LS && p->left->op==REG && (p->left->type==INT || p->left->type==UNSIGNED) &&
 681688               (p->right->op==ICON && p->right->name[0]=='\0')
 682689               && (1<<p->right->lval)==tyl))
 683690                 return( p->left->rval );
 684691         return( -1 );
 685692         }
 686693 #endif
 687694 
 688695 #if 0
 689696 void
 690697 makeor2( p, q, b, o) register NODE *p, *q; register int b, o; {
 691698         register NODE *t;
 692699         NODE *f;
 693700 
 694701         p->n_op = OREG;
 695702         f = p->n_left;  /* have to free this subtree later */
 696703 
 697704         /* init base */
 698705         switch (q->n_op) {
 699706                 case ICON:
 700707                 case REG:
 701708                 case OREG:
 702709                         t = q;
 703710                         break;
 704711 
 705712                 case MINUS:
 706713                         q->n_right->n_lval = -q->n_right->n_lval;
 707714                 case PLUS:
 708715                         t = q->n_right;
 709716                         break;
 710717 
 711718                 case UMUL:
 712719                         t = q->n_left->n_left;
 713720                         break;
 714721 
 715722                 default:
 716723                         cerror("illegal makeor2");
 717724                         t = NULL; /* XXX gcc */
 718725         }
 719726 
 720727         p->n_lval = t->n_lval;
 721728         p->n_name = t->n_name;
 722729 
 723730         /* init offset */
 724731         p->n_rval = R2PACK( (b & 0177), o, (b>>7) );
 725732 
 726733         tfree(f);
 727734         return;
 728735         }
 729736 
 730737 int
 731738 canaddr( p ) NODE *p; {
 732739         register int o = p->n_op;
 733740 
 734741         if( o==NAME || o==REG || o==ICON || o==OREG || (o==UMUL && shumul(p->n_left, STARNM|SOREG)) ) return(1);
 735742         return(0);
 736743         }
 737744 
 738745 shltype( o, p ) register NODE *p; {
 739746         return( o== REG || o == NAME || o == ICON || o == OREG || ( o==UMUL && shumul(p->n_left, STARNM|SOREG)) );
 740747         }
 741748 #endif
 742749 
 743750 int
 744751 fldexpand(NODE *p, int cookie, char **cp)
 745752 {
 746753         return 0;
 747754 }
 748755 
 749756 int
 750757 flshape( p ) register NODE *p; {
 751758         return( p->n_op == REG || p->n_op == NAME || p->n_op == ICON ||
 752759                 (p->n_op == OREG && (!R2TEST(p->n_rval) || tlen(p) == 1)) );
 753760         }
 754761 
 755762 int
 756763 shtemp( p ) register NODE *p; {
 757764         if( p->n_op == STARG ) p = p->n_left;
 758765         return( p->n_op==NAME || p->n_op ==ICON || p->n_op == OREG || (p->n_op==UMUL && shumul(p->n_left, STARNM|SOREG)) );
 759766         }
 760767 
 761768 /*
 762769  * Shape matches for UMUL.  Cooperates with offstar().
 763770  */
 764771 int
 765772 shumul(NODE *p, int shape)
 766773 {
 767774 
 768775         if (x2debug)
 769776                 printf("shumul(%p)\n", p);
 770777 
 771778         /* Turns currently anything into OREG on vax */
 772779         if (shape & SOREG)
 773780                 return SROREG;
 774781         return SRNOPE;
 775782 }
 776783 
 777784 
 778785 #ifdef notdef
 779786 int
 780787 shumul( p, shape ) register NODE *p; int shape; {
 781788         register int o;
 782789         extern int xdebug;
 783790 
 784791         if (xdebug) {
 785792                  printf("\nshumul:op=%d,lop=%d,rop=%d", p->n_op, p->n_left->n_op, p->n_right->n_op);
 786793                 printf(" prname=%s,plty=%d, prlval=%lld\n", p->n_right->n_name, p->n_left->n_type, p->n_right->n_lval);
 787794                 }
 788795 
 789796 
 790797         o = p->n_op;
 791798         if( o == NAME || (o == OREG && !R2TEST(p->n_rval)) || o == ICON )
 792799                 if (shape & STARNM)
 793800                         return SRDIR;
 794801 
 795802         if( ( o == INCR || o == ASG MINUS ) &&
 796803             ( p->n_left->n_op == REG && p->n_right->n_op == ICON ) &&
 797804             p->n_right->n_name[0] == '\0' )
 798805                 {
 799806                 switch (p->n_left->n_type)
 800807                         {
 801808                         case CHAR|PTR:
 802809                         case UCHAR|PTR:
 803810                                 o = 1;
 804811                                 break;
 805812 
 806813                         case SHORT|PTR:
 807814                         case USHORT|PTR:
 808815                                 o = 2;
 809816                                 break;
 810817 
 811818                         case INT|PTR:
 812819                         case UNSIGNED|PTR:
 813820                         case LONG|PTR:
 814821                         case ULONG|PTR:
 815822                         case FLOAT|PTR:
 816823                                 o = 4;
 817824                                 break;
 818825 
 819826                         case DOUBLE|PTR:
 820827                                 o = 8;
 821828                                 break;
 822829 
 823830                         default:
 824831                                 if ( ISPTR(p->n_left->n_type) ) {
 825832                                         o = 4;
 826833                                         break;
 827834                                         }
 828835                                 else return(0);
 829836                         }
 830837                 return( p->n_right->n_lval == o ? STARREG : 0);
 831838                 }
 832839 
 833840         return( SRNOPE );
 834841         }
 835842 #endif
 836843 
 837844 void
 838845 adrcon( val ) CONSZ val; {
 839846         printf( "$" );
 840847         printf( CONFMT, val );
 841848         }
 842849 
 843850 void
 844851 conput(FILE *fp, NODE *p)
 845852 {
 846853         switch( p->n_op ){
 847854 
 848855         case ICON:
 849856                 acon( p );
 850857                 return;
 851858 
 852859         case REG:
 853860                 printf( "%s", rnames[p->n_rval] );
 854861                 return;
 855862 
 856863         default:
 857864                 cerror( "illegal conput" );
 858865                 }
 859866         }
 860867 
 861868 void
 862869 insput( p ) register NODE *p; {
 863870         cerror( "insput" );
 864871         }
 865872 
 866873 /*
 867874  * Write out the upper address, like the upper register of a 2-register
 868875  * reference, or the next memory location.
 869876  */
 870877 void
 871878 upput(NODE *p, int size)
 872879 {
 873880 
 874881         size /= SZCHAR;
 875882         switch (p->n_op) {
 876883         case REG:
 877884                 fprintf(stdout, "%s", rnames[regno(p)-16+1]);
 878885                 break;
 879886 
 880887         case NAME:
 881888         case OREG:
 882889                 p->n_lval += size;
 883890                 adrput(stdout, p);
 884891                 p->n_lval -= size;
 885892                 break;
 886893         case ICON:
 887894                 fprintf(stdout, "$" CONFMT, p->n_lval >> 32);
 888895                 break;
 889896         default:
 890897                 comperr("upput bad op %d size %d", p->n_op, size);
 891898         }
 892899 }
 893900 
 894901 void
 895902 adrput(FILE *fp, NODE *p)
 896903 {
 897904         register int r;
 898905         /* output an address, with offsets, from p */
 899906 
 900907         if( p->n_op == FLD ){
 901908                 p = p->n_left;
 902909                 }
 903910         switch( p->n_op ){
 904911 
 905912         case NAME:
 906913                 acon( p );
 907914                 return;
 908915 
 909916         case ICON:
 910917                 /* addressable value of the constant */
 911918                 if (p->n_name[0] == '\0') /* uses xxxab */
 912919                         printf("$");
 913920                 acon(p);
 914921                 return;
 915922 
 916923         case REG:
 917924                 printf( "%s", rnames[p->n_rval] );
 918925                 return;
 919926 
 920927         case OREG:
 921928                 r = p->n_rval;
 922929                 if( R2TEST(r) ){ /* double indexing */
 923930                         register int flags;
 924931 
 925932                         flags = R2UPK3(r);
 926933                         if( flags & 1 ) printf("*");
 927934                         if( flags & 4 ) printf("-");
 928935                         if( p->n_lval != 0 || p->n_name[0] != '\0' ) acon(p);
 929936                         if( R2UPK1(r) != 100) printf( "(%s)", rnames[R2UPK1(r)] );
 930937                         if( flags & 2 ) printf("+");
 931938                         printf( "[%s]", rnames[R2UPK2(r)] );
 932939                         return;
 933940                         }
 934941                 if( r == AP ){  /* in the argument region */
 935942                         if( p->n_lval <= 0 || p->n_name[0] != '\0' )
 936943                                 werror( "bad arg temp" );
 937944                         printf( CONFMT, p->n_lval );
 938945                         printf( "(%%ap)" );
 939946                         return;
 940947                         }
 941948                 if( p->n_lval != 0 || p->n_name[0] != '\0') acon( p );
 942949                 printf( "(%s)", rnames[p->n_rval] );
 943950                 return;
 944951 
 945952         case UMUL:
 946953                 /* STARNM or STARREG found */
 947954                 if( tshape(p, STARNM) ) {
 948955                         printf( "*" );
 949956                         adrput(0p->n_left);
 950957                         }
 951958                 else {  /* STARREG - really auto inc or dec */
 952959                         register NODE *q;
 953960 
 954961 /* tbl
 955962                         p = p->n_left;
 956963                         p->n_left->n_op = OREG;
 957964                         if( p->n_op == INCR ) {
 958965                                 adrput( p->n_left );
 959966                                 printf( "+" );
 960967                                 }
 961968                         else {
 962969                                 printf( "-" );
 963970                                 adrput( p->n_left );
 964971                                 }
 965972    tbl */
 966973 #ifdef notyet
 967974                         printf("%c(%s)%c", (p->n_left->n_op==INCR ? '\0' : '-'),
 968975                                 rnames[p->n_left->n_left->n_rval],
 969976                                 (p->n_left->n_op==INCR ? '+' : '\0') );
 970977 #else
 971978                         printf("%c(%s)%c", '-',
 972979                                 rnames[p->n_left->n_left->n_rval],
 973980                                 '\0' );
 974981 #endif
 975982                         p->n_op = OREG;
 976983                         p->n_rval = p->n_left->n_left->n_rval;
 977984                         q = p->n_left;
 978985 #ifdef notyet
 979986 
 980987                         p->n_lval = (p->n_left->n_op == INCR ? -p->n_left->n_right->n_lval : 0);
 981988 #else
 982989                         p->n_lval = 0;
 983990 #endif
 984991                         p->n_name[0] = '\0';
 985992                         tfree(q);
 986993                 }
 987994                 return;
 988995 
 989996         default:
 990997                 cerror( "illegal address" );
 991998                 return;
 992999         }
 9931000 
 9941001 }
 9951002 
 9961003 /*
 9971004  * print out a constant
 9981005  */
 9991006 void
 10001007 acon(NODE *p)
 10011008 {
 10021009 
 10031010         if (p->n_name[0] == '\0') {
 10041011                 printf(CONFMT, p->n_lval);
 10051012         } else if( p->n_lval == 0 ) {
 10061013                 printf("%s", p->n_name);
 10071014         } else {
 10081015                 printf("%s+", p->n_name);
 10091016                 printf(CONFMT, p->n_lval);
 10101017         }
 10111018 }
 10121019 
 10131020 #if 0
 10141021 genscall( p, cookie ) register NODE *p; {
 10151022         /* structure valued call */
 10161023         return( gencall( p, cookie ) );
 10171024         }
 10181025 
 10191026 /* tbl */
 10201027 int gc_numbytes;
 10211028 /* tbl */
 10221029 
 10231030 gencall( p, cookie ) register NODE *p; {
 10241031         /* generate the call given by p */
 10251032         register NODE *p1, *ptemp;
 10261033         register temp, temp1;
 10271034         register m;
 10281035 
 10291036         if( p->right ) temp = argsize( p->right );
 10301037         else temp = 0;
 10311038 
 10321039         if( p->op == STCALL || p->op == UNARY STCALL ){
 10331040                 /* set aside room for structure return */
 10341041 
 10351042                 if( p->stsize > temp ) temp1 = p->stsize;
 10361043                 else temp1 = temp;
 10371044                 }
 10381045 
 10391046         if( temp > maxargs ) maxargs = temp;
 10401047         SETOFF(temp1,4);
 10411048 
 10421049         if( p->right ){ /* make temp node, put offset in, and generate args */
 10431050                 ptemp = talloc();
 10441051                 ptemp->op = OREG;
 10451052                 ptemp->lval = -1;
 10461053                 ptemp->rval = SP;
 10471054                 ptemp->name[0] = '\0';
 10481055                 ptemp->rall = NOPREF;
 10491056                 ptemp->su = 0;
 10501057                 genargs( p->right, ptemp );
 10511058                 nfree(ptemp);
 10521059                 }
 10531060 
 10541061         p1 = p->left;
 10551062         if( p1->op != ICON ){
 10561063                 if( p1->op != REG ){
 10571064                         if( p1->op != OREG || R2TEST(p1->rval) ){
 10581065                                 if( p1->op != NAME ){
 10591066                                         order( p1, INAREG );
 10601067                                         }
 10611068                                 }
 10621069                         }
 10631070                 }
 10641071 
 10651072 /*
 10661073         if( p1->op == REG && p->rval == R5 ){
 10671074                 cerror( "call register overwrite" );
 10681075                 }
 10691076  */
 10701077 /* tbl
 10711078         setup gc_numbytes so reference to ZC works */
 10721079 
 10731080         gc_numbytes = temp;
 10741081 /* tbl */
 10751082 
 10761083         p->op = UNARY CALL;
 10771084         m = match( p, INTAREG|INTBREG );
 10781085 /* tbl
 10791086         switch( temp ) {
 10801087         case 0:
 10811088                 break;
 10821089         case 2:
 10831090                 printf( "       tst     (sp)+\n" );
 10841091                 break;
 10851092         case 4:
 10861093                 printf( "       cmp     (sp)+,(sp)+\n" );
 10871094                 break;
 10881095         default:
 10891096                 printf( "       add     $%d,sp\n", temp);
 10901097                 }
 10911098    tbl */
 10921099         return(m != MDONE);
 10931100         }
 10941101 #endif
 10951102 
 10961103 static char *
 10971104 ccbranches[] = {
 10981105         "jeql",
 10991106         "jneq",
 11001107         "jleq",
 11011108         "jlss",
 11021109         "jgeq",
 11031110         "jgtr",
 11041111         "jlequ",
 11051112         "jlssu",
 11061113         "jgequ",
 11071114         "jgtru",
 11081115 };
 11091116 
 11101117 /*
 11111118  * printf conditional and unconditional branches
 11121119  */
 11131120 void
 11141121 cbgen(int o, int lab)
 11151122 {
 11161123 
 11171124         if (o == 0) {
 11181125                 printf("        jbr     " LABFMT "\n", lab);
 11191126         } else {
 11201127                 if (o > UGT)
 11211128                         comperr("bad conditional branch: %s", opst[o]);
 11221129                 printf("\t%s\t" LABFMT "\n", ccbranches[o-EQ], lab);
 11231130         }
 11241131 }
 11251132 
 11261133 static void
 11271134 mkcall(NODE *p, char *name)
 11281135 {
 11291136         p->n_op = CALL;
 11301137         p->n_right = mkunode(FUNARG, p->n_left, 0, p->n_left->n_type);
 11311138         p->n_left = mklnode(ICON, 0, 0, FTN|p->n_type);
 11321139         p->n_left->n_name = "__fixunsdfdi";
 11331140 }
 11341141 
 11351142 /* do local tree transformations and optimizations */
 11361143 static void
 11371144 optim2(NODE *p, void *arg)
 11381145 {
 11391146         NODE *r, *s;
 11401147         TWORD lt;
 11411148 
 11421149         switch (p->n_op) {
 11431150 
 11441151         case AND:
 11451152                 /* commute L and R to eliminate compliments and constants */
 11461153                 if ((p->n_left->n_op == ICON && p->n_left->n_name[0] == 0) ||
 11471154                     p->n_left->n_op==COMPL) {
 11481155                         r = p->n_left;
 11491156                         p->n_left = p->n_right;
 11501157                         p->n_right = r;
 11511158                 }
 11521159                 /* change meaning of AND to ~R&L - bic on pdp11 */
 11531160                 r = p->n_right;
 11541161                 if (r->n_op == ICON && r->n_name[0] == 0) {
 11551162                         /* compliment constant */
 11561163                         r->n_lval = ~r->n_lval;
 11571164                 } else if (r->n_op == COMPL) { /* ~~A => A */
 11581165                         s = r->n_left;
 11591166                         nfree(r);
 11601167                         p->n_right = s;
 11611168                 } else { /* insert complement node */
 11621169                         p->n_right = mkunode(COMPL, r, 0, r->n_type);
 11631170                 }
 11641171                 break;
 11651172         case SCONV:
 11661173                 lt = p->n_left->n_type;
 11671174                 switch (p->n_type) {
 11681175                 case LONGLONG:
 11691176                         if (lt == FLOAT)
 11701177                                 mkcall(p, "__fixsfdi");
 11711178                         else if (lt == DOUBLE)
 11721179                                 mkcall(p, "__fixdfdi");
 11731180                         break;
 11741181                 case ULONGLONG:
 11751182                         if (lt == FLOAT)
 11761183                                 mkcall(p, "__fixunssfdi");
 11771184                         else if (lt == DOUBLE)
 11781185                                 mkcall(p, "__fixunsdfdi");
 11791186                         break;
 11801187                 case FLOAT:
 11811188                         if (lt == LONGLONG)
 11821189                                 mkcall(p, "__floatdisf");
 11831190                         else if (lt == ULONGLONG) {
 11841191                                 p->n_left = mkunode(SCONV, p->n_left,0, DOUBLE);
 11851192                                 p->n_type = FLOAT;
 11861193                                 mkcall(p->n_left, "__floatunsdidf");
<> 1194+                        } else if (lt == UNSIGNED) {
  1195+                                /* insert an extra double-to-float sconv */
  1196+                                p->n_left = mkunode(SCONV, p->n_left,0, DOUBLE);
<_11871197                         }
 11881198                         break;
 11891199                 case DOUBLE:
 11901200                         if (lt == LONGLONG)
 11911201                                 mkcall(p, "__floatdidf");
 11921202                         else if (lt == ULONGLONG)
 11931203                                 mkcall(p->n_left, "__floatunsdidf");
 11941204                         break;
 11951205                         
 11961206                 }
 11971207                 break;
 11981208         }
 11991209 }
 12001210 
 12011211 void
 12021212 myreader(struct interpass *ipole)
 12031213 {
 12041214         struct interpass *ip;
 12051215 
 12061216         DLIST_FOREACH(ip, ipole, qelem) {
 12071217                 if (ip->type != IP_NODE)
 12081218                         continue;
 12091219                 walkf(ip->ip_node, optim2, 0);
 12101220         }
 12111221 }
 12121222 
 12131223 void
 12141224 mycanon(NODE *p)
 12151225 {
 12161226 }
 12171227 
 12181228 void
 12191229 myoptim(struct interpass *ip)
 12201230 {
 12211231 }
 12221232 
 12231233 /*
 12241234  * Return argument size in regs.
 12251235  */
 12261236 static int
 12271237 argsiz(NODE *p)
 12281238 {
 12291239         TWORD t = p->n_type;
 12301240 
 12311241         if (t == STRTY || t == UNIONTY)
 12321242                 return p->n_stsize/(SZINT/SZCHAR);
 12331243         return szty(t);
 12341244 }
 12351245 
 12361246 /*
 12371247  * Last chance to do something before calling a function.
 12381248  */
 12391249 void
 12401250 lastcall(NODE *p)
 12411251 {
 12421252         NODE *op = p;
 12431253         int size = 0;
 12441254 
 12451255         /* Calculate argument sizes */
 12461256         p->n_qual = 0;
 12471257         if (p->n_op != CALL && p->n_op != FORTCALL && p->n_op != STCALL)
 12481258                 return;
 12491259         for (p = p->n_right; p->n_op == CM; p = p->n_left)
 12501260                 size += argsiz(p->n_right);
 12511261         if (p->n_op != ASSIGN)
 12521262                 size += argsiz(p);
 12531263         op->n_qual = size; /* XXX */
 12541264 }
 12551265 
 12561266 /*
 12571267  * Return a class suitable for a specific type.
 12581268  */
 12591269 int
 12601270 gclass(TWORD t)
 12611271 {
 12621272         return (szty(t) == 2 ? CLASSB : CLASSA);
 12631273 }
 12641274 
 12651275 /*
 12661276  * For class c, find worst-case displacement of the number of
 12671277  * registers in the array r[] indexed by class.
 12681278  */
 12691279 int
 12701280 COLORMAP(int c, int *r)
 12711281 {
 12721282         int num;
 12731283 
 12741284         switch (c) {
 12751285         case CLASSA:
 12761286                 /* there are 12 classa, so min 6 classb are needed to block */
 12771287                 num = r[CLASSB] * 2;
 12781288                 num += r[CLASSA];
 12791289                 return num < 12;
 12801290         case CLASSB:
 12811291                 /* 6 classa may block all classb */
 12821292                 num = r[CLASSB] + r[CLASSA];
 12831293                 return num < 6;
 12841294         }
 12851295         comperr("COLORMAP");
 12861296         return 0; /* XXX gcc */
 12871297 }
 12881298 
 12891299 /*
 12901300  * Special shapes.
 12911301  */
 12921302 int
 12931303 special(NODE *p, int shape)
 12941304 {
 12951305         return SRNOPE;
 12961306 }
 12971307 
 12981308 /*
 12991309  * Target-dependent command-line options.
 13001310  */
 13011311 void
 13021312 mflags(char *str)
 13031313 {
 13041314 }
 13051315 /*
 13061316  * Do something target-dependent for xasm arguments.
 13071317  * Supposed to find target-specific constraints and rewrite them.
 13081318  */
 13091319 int
 13101320 myxasm(struct interpass *ip, NODE *p)
 13111321 {
 13121322         return 0;
 13131323 }
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-09-02 18:43 +0200