1: /
   2: / c code tables-- compile to register
   3: /
   4: 
   5: .globl  _regtab
   6: 
   7: .data
   8: _regtab=.
   9:         106.;   cr106
  10:         30.;    cr70
  11:         31.;    cr70
  12:         32.;    cr32
  13:         33.;    cr32
  14:         37.;    cr37
  15:         38.;    cr37
  16:         98.;    cr100
  17:         99.;    cr100
  18:         80.;    cr80
  19:         40.;    cr40
  20:         41.;    cr40    / - like +
  21:         42.;    cr42
  22:         43.;    cr43
  23:         14.;    cr43
  24:         44.;    cr43
  25:         45.;    cr45
  26:         46.;    cr40
  27:         55.;    cr40
  28:         48.;    cr40
  29:         49.;    cr49
  30:         70.;    cr70
  31:         71.;    cr70
  32:         72.;    cr72
  33:         73.;    cr73
  34:         74.;    cr74
  35:         75.;    cr75
  36:         76.;    cr72
  37:         78.;    cr70
  38:         85.;    cr70
  39:         79.;    cr79
  40:         102.;   cr102
  41:         51.;    cr51
  42:         52.;    cr52
  43:         56.;    cr56
  44:         57.;    cr57
  45:         58.;    cr58
  46:         59.;    cr59
  47:         91.;    cr91
  48:         82.;    cr82
  49:         83.;    cr82
  50:         84.;    cr82
  51:         86.;    cr86
  52:         87.;    cr86
  53:         88.;    cr86
  54:         16.;    cr16
  55:         92.;    cr92
  56:         17.;    cr43
  57:         18.;    cr74
  58:         109.; cr109
  59:         0
  60: .text
  61: 
  62: / goto
  63: cr102:
  64: %a,n
  65:         jmp     A1
  66: 
  67: %n*,n
  68:         F*
  69:         jmp     #1(R)
  70: 
  71: / call
  72: cr100:
  73: %a,n
  74:         jsr     pc,IA1
  75: 
  76: %n*,n
  77:         F*
  78:         jsr     pc,#1(R)
  79: 
  80: %n,n
  81:         F
  82:         jsr     pc,(R)
  83: 
  84: / addressible
  85: cr106:
  86: %z,n
  87:         clr     R
  88: 
  89: %zf,n
  90:         clrf    R
  91: 
  92: %a,n
  93: %ad,n
  94:         movB1   A1,R
  95: 
  96: %af,n
  97:         movof   A1,R
  98: 
  99: %n*,n
 100: %nd*,n
 101:         F*
 102:         movB1   #1(R),R
 103: 
 104: %nf*,n
 105:         F*
 106:         movof   #1(R),R
 107: 
 108: %al,n
 109:         mov     A1+,R+
 110:         mov     A1,R
 111: 
 112: %nl*,n
 113:         F*
 114:         mov     #1+2(R),R+
 115:         mov     #1(R),R
 116: 
 117: %n,n
 118:         F
 119: 
 120: / ++,-- postfix
 121: cr32:
 122: %a,1
 123:         movB1   A1',R
 124:         I'B1    A1''
 125: 
 126: %aw,n
 127:         mov     A1',R
 128:         I       A2,A1''
 129: 
 130: %e*,1
 131:         F1*
 132:         movB1   #1(R1),R
 133:         I'B1    #1(R1)
 134: 
 135: %n*,1
 136:         F*
 137:         movB1   #1(R),-(sp)
 138:         I'B1    #1(R)
 139:         movB1   (sp)+,R
 140: 
 141: %ew*,n
 142:         F1*
 143:         mov     #1(R1),R
 144:         I       A2,#1(R1)
 145: 
 146: %nw*,n
 147:         F*
 148:         mov     #1(R),-(sp)
 149:         I       A2,#1(R)
 150:         mov     (sp)+,R
 151: 
 152: %al,1
 153:         F
 154:         I       $1,A1+
 155:         V       A1
 156: 
 157: %el*,1
 158:         F1*
 159:         mov     #1+2(R1),R+
 160:         mov     #1(R1),R
 161:         I       $1,#1+2(R1)
 162:         V       #1(R1)
 163: 
 164: %nl*,1
 165:         F*
 166:         mov     #1+2(R),-(sp)
 167:         mov     #1(R),-(sp)
 168:         I       $1,#1+2(R)
 169:         V       #1(R)
 170:         mov     (sp)+,R
 171:         mov     (sp)+,R+
 172: 
 173: / - unary, ~
 174: cr37:
 175: %n,n
 176: %nf,n
 177:         F
 178:         IBF     R
 179: 
 180: %nl,n
 181:         F
 182:         I       R
 183:         I       R+
 184:         V       R
 185: 
 186: / =
 187: cr80:
 188: %a,n
 189: %ad,nf
 190:         S
 191:         movB1   R,A1
 192: 
 193: %af,nf
 194:         S
 195:         movfo   R,A1
 196: 
 197: %nd*,af
 198:         F*
 199:         S
 200:         movf    R,#1(R)
 201: 
 202: %n*,aw
 203:         F*
 204:         movB1   A2,#1(R)
 205:         movB1   #1(R),R
 206: 
 207: %nf*,af
 208:         F*
 209:         S
 210:         movfo   R,#1(R)
 211: 
 212: %n*,e
 213:         F*
 214:         S1
 215:         movB1   R1,#1(R)
 216:         movB1   R1,R
 217: 
 218: %ed*,nf
 219:         S
 220:         F1*
 221:         movf    R,#1(R1)
 222: 
 223: %ef*,nf
 224:         S
 225:         F1*
 226:         movfo   R,#1(R1)
 227: 
 228: %n*,n
 229: %nd*,nf
 230:         FS*
 231:         S
 232:         movB1   R,*(sp)+
 233: 
 234: %nf*,nf
 235:         FS*
 236:         S
 237:         movfo   R,*(sp)+
 238: 
 239: %al,nl
 240:         S
 241:         mov     R+,A1+
 242:         mov     R,A1
 243: 
 244: %el*,nl
 245:         S
 246:         F1*
 247:         mov     R+,2+#1(R1)
 248:         mov     R,#1(R1)
 249: 
 250: %nl*,nl
 251:         FS*
 252:         S
 253:         mov     R,*(sp)
 254:         add     $2,(sp)
 255:         mov     R+,*(sp)+
 256: 
 257: / field assign, value in reg.
 258: cr16:
 259: %a,n
 260:         S
 261:         bicB1   Z,A1'
 262:         bisB1   R,A1''
 263: 
 264: %e*,n
 265: %       [fas1]
 266: 
 267: %n*,n
 268:         SS
 269:         F*
 270:         bicB1   Z,#1(R)
 271:         bisB1   (sp),#1(R)
 272:         mov     (sp)+,R
 273: 
 274: / +, -, |, &~, <<
 275: cr40:
 276: %n,z
 277:         F
 278: 
 279: %n,1
 280:         F
 281:         I'	R
 282: 
 283: %[add1:]
 284: %n,aw
 285: %nf,ad
 286:         F
 287:         IB2     A2,R
 288: 
 289: %[add2:]
 290: %n,ew*
 291: %nf,ed*
 292:         F
 293:         S1*
 294:         IB2     #2(R1),R
 295: 
 296: %[add3:]
 297: %n,e
 298: %nf,ef
 299:         F
 300:         S1
 301:         IBF     R1,R
 302: 
 303: %[add4:]
 304: %n,nw*
 305: %nf,nd*
 306:         SS*
 307:         F
 308:         IB2     *(sp)+,R
 309: 
 310: %[add5:]
 311: %n,n
 312: %nf,nf
 313:         SS
 314:         F
 315:         IBF     (sp)+,R
 316: 
 317: %nl,c
 318: %nl,au
 319:         F
 320:         I       A2,R+
 321:         V       R
 322: 
 323: %nl,eu
 324:         F
 325:         S1
 326:         I       R1,R+
 327:         V       R
 328: 
 329: %nl,al
 330:         F
 331:         I       A2,R
 332:         I       A2+,R+
 333:         V       R
 334: 
 335: %[addl1:]
 336: %nl,el
 337:         F
 338:         S1
 339:         I       R1+,R+
 340:         V       R
 341:         I       R1,R
 342: 
 343: %[addl2:]
 344: %nl,nl
 345:         SS
 346:         F
 347:         I       (sp)+,R
 348:         I       (sp)+,R+
 349:         V       R
 350: 
 351: / ^ -- xor
 352: cr49:
 353: %n,e
 354: %       [add3]
 355: 
 356: %n,n
 357:         FS
 358:         S
 359:         xor     R,(sp)
 360:         mov     (sp)+,R
 361: 
 362: %nl,el
 363: %       [addl1]
 364: 
 365: %nl,nl
 366:         SS
 367:         F
 368:         I       R,(sp)
 369:         mov     (sp)+,R
 370:         I       R+,(sp)
 371:         mov     (sp)+,R+
 372: 
 373: / >> (all complicated cases taken care of by << -)
 374: cr45:
 375: %n,1
 376:         F
 377:         asr     R
 378: 
 379: / * -- R must be odd on integers
 380: cr42:
 381: %n,aw
 382: %nf,ad
 383: %       [add1]
 384: 
 385: %n,ew*
 386: %nf,ed*
 387: %       [add2]
 388: 
 389: %n,e
 390: %nf,ef
 391: %       [add3]
 392: 
 393: %n,n
 394: %nf,nf
 395: %       [add5]
 396: 
 397: / / R must be odd on integers
 398: cr43:
 399: %n,aw
 400:         F
 401:         T
 402:         I       A2,R-
 403: 
 404: %n,ew*
 405:         F
 406:         T
 407:         S1*
 408:         I       #2(R1),R-
 409: 
 410: %n,e
 411:         F
 412:         T
 413:         S1
 414:         I       R1,R-
 415: 
 416: %n,n
 417:         SS
 418:         F
 419:         T
 420:         I       (sp)+,R-
 421: 
 422: %nf,ad
 423: %       [add1]
 424: 
 425: %nf,ed*
 426: %       [add2]
 427: 
 428: %nf,ef
 429: %       [add3]
 430: 
 431: %nf,nf
 432: %       [add5]
 433: 
 434: / =+, =-, =|, =&~
 435: cr70:
 436: %[addq1:]
 437: %aw,aw
 438:         I       A2,A1'
 439:         mov     A1'',R
 440: 
 441: %[addq1a:]
 442: %a,aw
 443: %ad,ad
 444:         movB1   A1',R
 445:         IBF     A2,R
 446:         movB1   R,A1''
 447: 
 448: %[addq2:]
 449: %aw,nw*
 450:         S*
 451:         I       #2(R),A1'
 452:         mov     A1'',R
 453: 
 454: %[addq3:]
 455: %aw,n
 456:         S
 457:         I       R,A1'
 458:         mov     A1'',R
 459: 
 460: %[addq4:]
 461: %ew*,nw*
 462:         S*
 463:         F1*
 464:         I       #2(R),#1(R1)
 465:         mov     #1(R1),R
 466: 
 467: %[addq4a:]
 468: %ad,ef
 469:         movf    A1',R
 470:         S1
 471:         IBF     R1,R
 472:         movf    R,A1''
 473: 
 474: %[addq5:]
 475: %a,n
 476: %ad,nf
 477:         SS
 478:         movB1   A1',R
 479:         IBF     (sp)+,R
 480:         movB1   R,A1''
 481: 
 482: %[addq6:]
 483: %af,nf
 484:         SS
 485:         movof   A1',R
 486:         IBF     (sp)+,R
 487:         movfo   R,A1''
 488: 
 489: %[addq7:]
 490: %ew*,n
 491:         S
 492:         F1*
 493:         I       R,#1(R1)
 494:         mov     #1(R1),R
 495: 
 496: %[addq8:]
 497: %nw*,n
 498:         SS
 499:         F*
 500:         I       (sp)+,#1(R)
 501:         mov     #1(R),R
 502: 
 503: %[addq9:]
 504: %n*,n
 505:         FS*
 506:         SS
 507:         movB1   *2(sp),R
 508:         IBF     (sp)+,R
 509:         movB1   R,*(sp)+
 510: 
 511: %[addq9a:]
 512: %nd*,nf
 513:         SS
 514:         F*
 515:         movB1   #1(R),R
 516:         IBF     (sp)+,R
 517:         movB1   R,#1(R)
 518: 
 519: %[addq10:]
 520: %nf*,nf
 521:         SS
 522:         F*
 523:         movof   #1(R),R1
 524:         IBF     (sp)+,R1
 525:         movfo   R1,#1(R)
 526:         movf    R1,R
 527: 
 528: %al,c
 529:         I       A2,A1+
 530:         V       A1
 531:         F
 532: 
 533: %al,al
 534:         I       A2+,A1+
 535:         V       A1
 536:         I       A2,A1
 537:         F
 538: 
 539: %al,nl
 540:         S
 541:         I       R+,A1+
 542:         V       A1
 543:         I       R,A1
 544:         F
 545: 
 546: %nl*,c
 547:         F*
 548:         I       A2,#1+2(R)
 549:         V       #1(R)
 550:         mov     #1+2(R),R+
 551:         mov     #1(R),R
 552: 
 553: %nl*,al
 554:         F*
 555:         I       A2+,#1+2(R)
 556:         V       #1(R)
 557:         I       A2,#1(R)
 558:         mov     #1+2(R),R+
 559:         mov     #1(R),R
 560: 
 561: %nl*,nl
 562:         SS
 563:         F*
 564:         I       (sp)+,#1(R)
 565:         I       (sp)+,#1+2(R)
 566:         V       #1(R)
 567:         mov     #1+2(R),R+
 568:         mov     #1(R),R
 569: 
 570: / =*, =<< (for integer multiply, R must be odd)
 571: cr72:
 572: %a,aw
 573: %ad,ad
 574: %       [addq1a]
 575: 
 576: %ad,ef
 577: %       [addq4a]
 578: 
 579: %a,n
 580: %ad,nf
 581: %       [addq5]
 582: 
 583: %af,nf
 584: %       [addq6]
 585: 
 586: %n*,n
 587: %       [addq9]
 588: 
 589: %nd*,nf
 590: %       [addq9a]
 591: 
 592: %nf*,nf
 593: %       [addq10]
 594: 
 595: / =/ ;  R must be odd on integers
 596: cr73:
 597: %a,aw
 598:         movB1   A1',R
 599:         V       R-
 600:         IBF     A2,R-
 601:         movB1   R-,A1''
 602: 
 603: %a,n
 604:         SS
 605:         movB1   A1',R
 606:         V       R-
 607:         I       (sp)+,R-
 608:         movB1   R-,A1''
 609: 
 610: %e*,n
 611:         SS
 612:         F1*
 613:         movB1   #1(R1),R
 614:         V       R-
 615:         I       (sp)+,R-
 616:         movB1   R-,#1(R1)
 617: 
 618: %n*,n
 619:         FS*
 620:         SS
 621:         movB1   *2(sp),R
 622:         V       R-
 623:         I       (sp)+,R-
 624:         movB1   R-,*(sp)+
 625: 
 626: %ad,ad
 627: %       [addq1a]
 628: 
 629: %ad,ef
 630: %       [addq4a]
 631: 
 632: %ad,nf
 633: %       [addq5]
 634: 
 635: %af,nf
 636: %       [addq6]
 637: 
 638: %nd*,nf
 639: %       [addq9a]
 640: 
 641: %nf*,nf
 642: %       [addq10]
 643: 
 644: / =mod; R must be odd on integers
 645: cr74:
 646: %a,aw
 647:         movB1   A1',R
 648:         V       R-
 649:         I       A2,R-
 650:         movB1   R,A1''
 651: 
 652: %a,n
 653:         SS
 654:         movB1   A1',R
 655:         V       R-
 656:         I       (sp)+,R-
 657:         movB1   R,A1''
 658: 
 659: %e*,n
 660:         SS
 661:         F1*
 662:         movB1   #1(R1),R
 663:         V       R-
 664:         I       (sp)+,R-
 665:         movB1   R,#1(R1)
 666: 
 667: %n*,n
 668:         FS*
 669:         SS
 670:         movB1   *2(sp),R
 671:         V       R-
 672:         I       (sp)+,R-
 673:         mov     R,*(sp)+
 674: 
 675: / =^ -- =xor
 676: cr79:
 677: %aw,n
 678: %       [addq3]
 679: 
 680: %ab,n
 681:         SS
 682:         movb    A1',R
 683:         xor     R,(sp)
 684:         mov     (sp)+,R
 685:         movb    R,A1''
 686: 
 687: %n*,n
 688:         FS*
 689:         movB1   *(sp),-(sp)
 690:         S
 691:         xor     R,(sp)
 692:         movB1   (sp)+,R
 693:         movB1   R,*(sp)+
 694: 
 695: / =>> (all complicated cases done by =<< -)
 696: cr75:
 697: %a,1
 698:         asrB1   A1'
 699:         movB1   A1'',R
 700: 
 701: %n*,1
 702:         F*
 703:         asrB1   #1(R)
 704:         movB1   #1(R),R
 705: 
 706: / << for longs
 707: cr91:
 708: %nl,aw
 709: %       [add1]
 710: 
 711: %nl,ew*
 712: %       [add2]
 713: 
 714: %nl,e
 715: %       [add3]
 716: 
 717: %nl,nw*
 718: %       [add4]
 719: 
 720: %nl,n
 721: %       [add5]
 722: 
 723: / int -> float
 724: cr51:
 725: %aw,n
 726:         movif   A1,R
 727: 
 728: %nw*,n
 729:         F*
 730:         movif   #1(R),R
 731: 
 732: %n,n
 733:         F
 734:         movif   R,R
 735: 
 736: / float, double -> int
 737: cr52:
 738: %nf,n
 739:         F
 740:         movfi   R,R
 741: 
 742: / double (float) to long
 743: cr56:
 744: %nf,n
 745:         F
 746:         setl
 747:         movfi   R,-(sp)
 748:         mov     (sp)+,R
 749:         mov     (sp)+,R+
 750:         seti
 751: 
 752: / long to double
 753: cr57:
 754: %al,n
 755:         setl
 756:         movif   A1,R
 757:         seti
 758: 
 759: %nl*,n
 760:         F*
 761:         setl
 762:         movif   #1(R),R
 763:         seti
 764: 
 765: %nl,n
 766:         FS
 767:         setl
 768:         movif   (sp)+,R
 769:         seti
 770: 
 771: / integer to long
 772: cr58:
 773: %eu,n
 774:         F1!
 775:         clr     R
 776: 
 777: %nu,n
 778:         F
 779:         mov     R,R1
 780:         clr     R
 781: 
 782: %e,n
 783:         F1!
 784:         sxt     R
 785: 
 786: %n,n
 787:         F
 788:         mov     R,R1
 789:         sxt     R
 790: 
 791: / long to integer
 792: cr59:
 793: %al,n
 794:         mov     A1+,R
 795: 
 796: %nl*,n
 797:         F*
 798:         mov     #1+2(R),R
 799: 
 800: / *, /, remainder for longs.
 801: cr82:
 802: %nl,nl
 803:         SS
 804:         FS
 805:         jsr     pc,I
 806:         add     $10,sp
 807: 
 808: / =*, =/, =rem for longs
 809: / Operands of the form &x op y, so stack space is known.
 810: cr86:
 811: %n,nl
 812:         SS
 813:         FS
 814:         jsr     pc,I
 815:         add     $6,sp
 816: 
 817: / convert integer to character (sign extend)
 818: cr109:
 819: %n,n
 820:         F
 821:         movb    R,R
 822: 
 823: /
 824: / c code tables -- compile for side effects.
 825: / Also set condition codes properly (except for ++, --)
 826: /
 827: 
 828: .globl  _efftab
 829: 
 830: .data
 831: _efftab=.
 832:         30.;    ci70
 833:         31.;    ci70
 834:         32.;    ci70
 835:         33.;    ci70
 836:         80.;    ci80
 837:         70.;    ci70
 838:         71.;    ci70    / - like +
 839:         78.;    ci78
 840:         79.;    ci79
 841:         85.;    ci78
 842:         75.;    ci75
 843:         76.;    ci76
 844:         16.;    ci16
 845:         116.;   ci116
 846:         0
 847: .text
 848: 
 849: / =
 850: ci80:
 851: %[move1:]
 852: %a,z
 853: %ad,zf
 854:         I'B1    A1
 855: 
 856: %[move2:]
 857: %n*,z
 858: %nd*,zf
 859:         F*
 860:         I'B1    #1(R)
 861: 
 862: %[move3:]
 863: %a,aw
 864: %ab,a
 865:         IBE     A2,A1
 866: 
 867: %[move4:]
 868: %ab,n*
 869: %a,nw*
 870:         S*
 871:         IBE     #2(R),A1
 872: 
 873: %[move5:]
 874: %a,n
 875:         S
 876:         IB1     R,A1
 877: 
 878: %[move6:]
 879: %n*,aw
 880: %nb*,a
 881:         F*
 882:         IBE     A2,#1(R)
 883: 
 884: %[move7:]
 885: %n*,ew*
 886: %nb*,e*
 887:         F*
 888:         S1*
 889:         IBE     #2(R1),#1(R)
 890: 
 891: %[move8:]
 892: %n*,e
 893:         F*
 894:         S1
 895:         IB1     R1,#1(R)
 896: 
 897: %[move9:]
 898: %e*,nw*
 899: %eb*,n*
 900:         S*
 901:         F1*
 902:         IBE     #2(R),#1(R1)
 903: 
 904: %[move10:]
 905: %e*,n
 906:         S
 907:         F1*
 908:         IB1     R,#1(R1)
 909: 
 910: %[move11:]
 911: %n*,nw*
 912: %nb*,n*
 913:         FS*
 914:         S*
 915:         IBE     #2(R),*(sp)+
 916: 
 917: %[move12:]
 918: %n*,n
 919:         FS*
 920:         S
 921:         IB1     R,*(sp)+
 922: 
 923: %aw,nf
 924:         S
 925:         movfi   R,A1
 926: 
 927: %ew*,nf
 928:         S
 929:         F1*
 930:         movfi   R,#1(R1)
 931: 
 932: %al,z
 933:         clr     A1
 934:         clr     A1+
 935: 
 936: %nl*,z
 937:         F*
 938:         clr     #1(R)
 939:         clr     2+#1(R)
 940: 
 941: %[move13a:]
 942: %al,aw
 943:         I       A2,A1+
 944:         V       A1
 945: 
 946: %al,nw*
 947:         S*
 948:         mov     #2(R),A1+
 949:         V       A1
 950: 
 951: %al,n
 952:         S
 953:         mov     R,A1+
 954:         V       A1
 955: 
 956: %al,nf
 957:         S
 958:         setl
 959:         movfi   R,A1
 960:         seti
 961: 
 962: %el*,nf
 963:         S
 964:         F1*
 965:         setl
 966:         movfi   R,#1(R1)
 967:         seti
 968: 
 969: %[move13:]
 970: %al,al
 971:         I       A2,A1
 972:         I       A2+,A1+
 973:         V       A1
 974: 
 975: %[move14:]
 976: %al,nl*
 977:         S*
 978:         I       #2(R),A1
 979:         I       #2+2(R),A1+
 980:         V       A1
 981: 
 982: %[move15:]
 983: %al,nl
 984:         S
 985:         I       R,A1
 986:         I       R+,A1+
 987:         V       A1
 988: 
 989: %[move14a:]
 990: %nl*,aw
 991:         F*
 992:         I       A2,#1+2(R)
 993:         V       #1(R)
 994: 
 995: %[move16a:]
 996: %nl*,al
 997:         F*
 998:         I       A2+,#1+2(R)
 999:         V       #1(R)
1000:         I       A2,#1(R)
1001: 
1002: %[move16:]
1003: %el*,nl
1004:         S
1005:         F1*
1006:         I       R+,#1+2(R1)
1007:         V       #1(R1)
1008:         I       R,#1(R1)
1009: 
1010: %nl*,n
1011:         SS
1012:         F*
1013:         mov     (sp)+,#1+2(R)
1014:         V       #1(R)
1015: 
1016: %[move17:]
1017: %nl*,nl
1018:         SS
1019:         F*
1020:         I       (sp)+,#1(R)
1021:         I       (sp)+,#1+2(R)
1022:         V       #1(R)
1023: 
1024: / =| and =& ~
1025: ci78:
1026: %a,aw
1027: %ab,a
1028: %       [move3]
1029: 
1030: %a,n
1031: %       [move5]
1032: 
1033: %n*,aw
1034: %nb*,a
1035: %       [move6]
1036: 
1037: %n*,ew*
1038: %nb*,e*
1039: %       [move7]
1040: 
1041: %n*,e
1042: %       [move8]
1043: 
1044: %e*,nw*
1045: %eb*,n*
1046: %       [move9]
1047: 
1048: %e*,n
1049: %       [move10]
1050: 
1051: %n*,nw*
1052: %nb*,n*
1053: %       [move11]
1054: 
1055: %n*,n
1056: %       [move12]
1057: 
1058: %al,c
1059: %al,au
1060: %       [move13a]
1061: 
1062: %al,al
1063: %       [move13]
1064: 
1065: %al,nl*
1066: %       [move14]
1067: 
1068: %al,nl
1069: %       [move15]
1070: 
1071: %nl*,c
1072: %       [move14a]
1073: 
1074: %nl*,al
1075: %       [move16a]
1076: 
1077: %el*,nl
1078: %       [move16]
1079: 
1080: %nl*,nl
1081: %       [move17]
1082: 
1083: / =^
1084: ci79:
1085: %al,nl
1086: %       [move15]
1087: 
1088: %el*,nl
1089: %       [move16]
1090: 
1091: %nl*,nl
1092:         FS*
1093:         S
1094:         I       R,*(sp)
1095:         mov     (sp)+,R
1096:         I       R+,2(R)
1097: 
1098: / =+
1099: ci70:
1100: %n*,z
1101: %a,z
1102: 
1103: %a,1
1104:         I'B1    A1
1105: 
1106: %aw,aw
1107: %       [move3]
1108: 
1109: %aw,nw*
1110: %       [move4]
1111: 
1112: %aw,n
1113: %       [move5]
1114: 
1115: %n*,1
1116: %       [move2]
1117: 
1118: %ew*,nw*
1119: %       [move9]
1120: 
1121: %a,nw*
1122:         S*
1123:         movB1   A1',R1
1124:         I       #2(R),R1
1125:         movB1   R1,A1''
1126: 
1127: %a,n
1128:         S
1129:         movB1   A1',R1
1130:         I       R,R1
1131:         movB1   R1,A1''
1132: 
1133: %ew*,n
1134: %       [move10]
1135: 
1136: %nw*,n
1137: %       [move12]
1138: 
1139: %n*,n
1140:         SS
1141:         F*
1142:         movB1   #1(R),R1
1143:         I       (sp)+,R1
1144:         movB1   R1,#1(R)
1145: 
1146: %al,c
1147: %al,au
1148: %       [move13a]
1149: 
1150: %al,al
1151: %       [move13]
1152: 
1153: %al,nl*
1154: %       [move14]
1155: 
1156: %al,nl
1157: %       [move15]
1158: 
1159: %nl*,c
1160: %nl*,au
1161: %       [move14a]
1162: 
1163: %nl*,al
1164: %       [move16a]
1165: 
1166: %el*,nl
1167: %       [move16]
1168: 
1169: %nl*,nl
1170: %       [move17]
1171: 
1172: / =>> (all harder cases handled by =<< -)
1173: ci75:
1174: %a,1
1175:         asrB1   A1
1176: 
1177: %n*,1
1178:         F*
1179:         asrB1   #1(R)
1180: 
1181: / =<<
1182: ci76:
1183: %a,1
1184:         aslB1   A1
1185: 
1186: %n*,1
1187:         F*
1188:         aslB1   #1(R)
1189: 
1190: %r,aw
1191:         ash     A2,A1
1192: 
1193: %r,nw*
1194:         S*
1195:         ash     #2(R),A1
1196: 
1197: %r,n
1198:         S
1199:         ash     R,A1
1200: 
1201: / =<< for longs
1202: cr92:
1203: %al,aw
1204:         F
1205:         ashc    A2,R
1206:         mov     R,A1
1207:         mov     R+,A1+
1208: 
1209: %al,n
1210:         SS
1211:         F
1212:         ashc    (sp)+,R
1213:         mov     R,A1
1214:         mov     R+,A1+
1215: 
1216: %nl*,n
1217:         FS*
1218:         SS
1219:         mov     2(sp),R
1220:         mov     2(R),R+
1221:         mov     (R),R
1222:         ashc    (sp)+,R
1223:         mov     R,*(sp)
1224:         add     $2,(sp)
1225:         mov     R+,*(sp)+
1226: 
1227: / field = ...
1228: ci16:
1229: %a,a
1230:         bicB1   Z,A1'
1231:         bisB1   A2,A1''
1232: 
1233: %a,n
1234:         S
1235:         bicB1   Z,A1'
1236:         bisB1   R,A1''
1237: 
1238: %n*,a
1239:         F*
1240:         bicB1   Z,#1(R)
1241:         bisB1   A2,#1(R)
1242: 
1243: %[fas1:]
1244: %e*,n
1245:         S
1246:         F1*
1247:         bicB1   Z,#1(R1)
1248:         bisB1   R,#1(R1)
1249: 
1250: %n*,e
1251:         F*
1252:         S1
1253:         bicB1   Z,#1(R)
1254:         bisB1   R1,#1(R)
1255: 
1256: %n*,n
1257:         SS
1258:         F*
1259:         bicB1   Z,#1(R)
1260:         bisB1   (sp)+,#1(R)
1261: 
1262: /
1263: / c code tables-- set condition codes
1264: /
1265: 
1266: .globl  _cctab
1267: 
1268: .data
1269: _cctab=.
1270:         106.;   cc60
1271:         28.;    rest
1272:         55.;    rest
1273:         34.;    rest
1274:         35.;    rest
1275:         36.;    rest
1276:         37.;    rest
1277:         40.;    rest
1278:         41.;    rest
1279:         42.;    rest
1280:         43.;    rest
1281:         81.;    cc81    / & as in "if ((a&b)==0)"
1282:         48.;    rest
1283:         60.;    cc60
1284:         61.;    cc60
1285:         62.;    cc60
1286:         63.;    cc60
1287:         64.;    cc60
1288:         65.;    cc60
1289:         66.;    cc60
1290:         67.;    cc60
1291:         68.;    cc60
1292:         69.;    cc60
1293:         72.;    rest
1294:         73.;    rest
1295:         79.;    rest
1296:         0
1297: .text
1298: 
1299: / relationals
1300: cc60:
1301: %a,z
1302: %ad,zf
1303: %       [move1]
1304: 
1305: %af,z
1306:         movof   A1,R
1307: 
1308: %n*,z
1309: %nd*,zf
1310: %       [move2]
1311: 
1312: %nf*,z
1313:         F*
1314:         movof   #1(R),R
1315: 
1316: %n,z
1317: %nf,zf
1318:         FC
1319: 
1320: %aw,aw
1321: %ab,ab
1322: %       [move3]
1323: 
1324: %nw*,aw
1325: %nb*,ab
1326: %       [move6]
1327: 
1328: %n,aw
1329: %nf,ad
1330: %       [add1]
1331: 
1332: %nw*,ew*
1333: %nb*,eb*
1334: %       [move7]
1335: 
1336: %nw*,e
1337: %       [move8]
1338: 
1339: %n,ew*
1340: %nf,ed*
1341: %       [add2]
1342: 
1343: %n,e
1344: %nf,ef
1345: %       [add3]
1346: 
1347: %nw*,nw*
1348: %nb*,nb*
1349: %       [move11]
1350: 
1351: %nw*,n
1352: %       [move12]
1353: 
1354: %n,n
1355: %nf,nf
1356: %       [add5]
1357: 
1358: %al,z
1359:         tst     A1
1360:         X0
1361:         tst     A1+
1362:         X1
1363: 
1364: %al,c
1365: %al,au
1366:         tst     A1
1367:         X0
1368:         cmp     A1+,A2
1369:         X1
1370: 
1371: %[lcmp1:]
1372: %al,al
1373:         I       A1,A2
1374:         X0
1375:         I       A1+,A2+
1376:         X1
1377: 
1378: %nl*,z
1379:         F*
1380:         tst     #1(R)
1381:         X0
1382:         tst     #1+2(R)
1383:         X1
1384: 
1385: %nl*,c
1386: %nl*,au
1387:         F*
1388:         tst     #1(R)
1389:         X0
1390:         cmp     #1+2(R),A2
1391:         X1
1392: 
1393: %[lcmp2:]
1394: %nl*,al
1395:         F*
1396:         I       #1(R),A2
1397:         X0
1398:         I       #1+2(R),A2+
1399:         X1
1400: 
1401: %nl,z
1402:         F
1403:         tst     R
1404:         X0
1405:         tst     R+
1406:         X1
1407: 
1408: %nl,c
1409: %nl,au
1410:         F
1411:         tst     R
1412:         X0
1413:         cmp     R+,A2
1414:         X1
1415: 
1416: %[lcmp3:]
1417: %nl,al
1418:         F
1419:         I       R,A2
1420:         X0
1421:         I       R+,A2+
1422:         X1
1423: 
1424: %[lcmp4:]
1425: %nl*,el*
1426:         F*
1427:         S1*
1428:         I       #1(R),#2(R1)
1429:         X0
1430:         I       #1+2(R),#2+2(R1)
1431:         X1
1432: 
1433: %[lcmp5:]
1434: %nl,el*
1435:         F
1436:         S1*
1437:         I       R,#2(R1)
1438:         X0
1439:         I       R+,#2+2(R1)
1440:         X1
1441: 
1442: %[lcmp6:]
1443: %nl,nl
1444:         FS
1445:         S
1446:         mov     R,-(sp)
1447:         mov     4(sp),R
1448:         mov     (sp)+,2(sp)
1449:         I       (sp)+,(sp)+
1450:         X0
1451:         I       R,R+
1452:         X1
1453: 
1454: / & as in "if ((a&b) ==0)"
1455: cc81:
1456: %a,a
1457: %       [move3]
1458: 
1459: %n*,a
1460: %       [move6]
1461: 
1462: %n,a
1463: %       [add1]
1464: 
1465: %n,e
1466: %       [add3]
1467: 
1468: %n,n
1469: %       [add5]
1470: 
1471: %al,c
1472: %al,au
1473:         /bit	$0,A1
1474:         /X0
1475:         bit     A2,A1+
1476:         X1
1477: 
1478: %nl*,c
1479: %nl*,au
1480:         F*
1481:         /bit	$0,#2(R)
1482:         /X0
1483:         bit     A2,#2+2(R)
1484:         X1
1485: 
1486: %al,al
1487: %       [lcmp1]
1488: 
1489: %nl*,al
1490: %       [lcmp2]
1491: 
1492: %nl,al
1493: %       [lcmp3]
1494: 
1495: %nl*,el*
1496: %       [lcmp4]
1497: 
1498: %nl,el*
1499: %       [lcmp5]
1500: 
1501: %nl,nl
1502: %       [lcmp6]
1503: 
1504: %nl,c
1505: %nl,au
1506:         F
1507:         /bit	$0,R
1508:         /X0
1509:         bit     A2,R+
1510:         X1
1511: 
1512: / set codes right
1513: rest:
1514: %n,n
1515: %nf,nf
1516:         H
1517: 
1518: /
1519: / c code tables-- expression to -(sp)
1520: /
1521: 
1522: .globl  _sptab
1523: 
1524: .data
1525: _sptab=.
1526:         106.;   cs106
1527:         40.;    cs40
1528:         41.;    cs40
1529:         55.;    cs40
1530:         48.;    cs40
1531:         58.;    cs58
1532:         56.;    cs56
1533:         0
1534: .text
1535: 
1536: / name
1537: cs106:
1538: %z,n
1539: %zf,n
1540:         clrB1   -(sp)
1541: 
1542: %aw,n
1543:         mov     A1,-(sp)
1544: 
1545: %nw*,n
1546:         F*
1547:         mov     #1(R),-(sp)
1548: 
1549: %al,n
1550:         mov     A1+,-(sp)
1551:         mov     A1,-(sp)
1552: 
1553: / +, -, |, &~
1554: cs40:
1555: %a,1
1556:         FS
1557:         I'	(sp)
1558: 
1559: %a,aw
1560:         FS
1561:         I       A2,(sp)
1562: 
1563: %a,nw*
1564:         FS
1565:         S*
1566:         I       #2(R),(sp)
1567: 
1568: %a,n
1569:         FS
1570:         S
1571:         I       R,(sp)
1572: 
1573: / integer to long
1574: cs58:
1575: %nu,n
1576:         FS
1577:         clr     -(sp)
1578: 
1579: %n,n
1580:         FS
1581:         sxt     -(sp)
1582: 
1583: / float to long
1584: cs56:
1585: %nf,n
1586:         F
1587:         setl
1588:         movfi   R,-(sp)
1589:         seti
1590: 
1591: / setup for structure assign
1592: ci116:
1593: %n,e
1594:         F!
1595:         S1!
1596: 
1597: %n,n
1598:         SS
1599:         F!
1600:         mov     (sp)+,r1

Defined functions

add1 defined in line 283; used 5 times
add2 defined in line 289; used 4 times
add3 defined in line 296; used 6 times
add4 defined in line 303; used 1 times
add5 defined in line 310; used 5 times
addl1 defined in line 335; used 1 times
addl2 defined in line 343; never used
addq1 defined in line 436; never used
addq10 defined in line 519; used 2 times
addq1a defined in line 441; used 2 times
addq2 defined in line 448; never used
addq3 defined in line 454; used 1 times
addq4 defined in line 460; never used
addq4a defined in line 467; used 2 times
addq5 defined in line 474; used 2 times
addq6 defined in line 482; used 2 times
addq7 defined in line 489; never used
addq8 defined in line 496; never used
addq9 defined in line 503; used 1 times
addq9a defined in line 511; used 2 times
cc60 defined in line 1300; used 11 times
cc81 defined in line 1455; used 1 times
ci116 defined in line 1592; used 1 times
ci16 defined in line 1228; used 1 times
ci70 defined in line 1099; used 6 times
ci75 defined in line 1173; used 1 times
ci76 defined in line 1182; used 1 times
ci78 defined in line 1025; used 2 times
ci79 defined in line 1084; used 1 times
ci80 defined in line 850; used 1 times
cr100 defined in line 72; used 2 times
cr102 defined in line 63; used 1 times
  • in line 40
cr106 defined in line 85; used 1 times
  • in line 9
cr109 defined in line 818; used 1 times
  • in line 58
cr16 defined in line 258; used 1 times
  • in line 54
cr32 defined in line 121; used 2 times
cr37 defined in line 174; used 2 times
cr40 defined in line 275; used 5 times
cr42 defined in line 380; used 1 times
  • in line 21
cr43 defined in line 398; used 4 times
cr45 defined in line 374; used 1 times
  • in line 25
cr49 defined in line 352; used 1 times
  • in line 29
cr51 defined in line 724; used 1 times
  • in line 41
cr52 defined in line 737; used 1 times
  • in line 42
cr56 defined in line 743; used 1 times
  • in line 43
cr57 defined in line 753; used 1 times
  • in line 44
cr58 defined in line 772; used 1 times
  • in line 45
cr59 defined in line 792; used 1 times
  • in line 46
cr70 defined in line 435; used 6 times
cr72 defined in line 571; used 2 times
cr73 defined in line 596; used 1 times
  • in line 33
cr74 defined in line 645; used 2 times
cr75 defined in line 696; used 1 times
  • in line 35
cr79 defined in line 676; used 1 times
  • in line 39
cr80 defined in line 187; used 1 times
  • in line 18
cr82 defined in line 801; used 3 times
cr86 defined in line 810; used 3 times
cr91 defined in line 707; used 1 times
  • in line 47
cr92 defined in line 1202; used 1 times
  • in line 55
cs106 defined in line 1537; used 1 times
cs40 defined in line 1554; used 4 times
cs56 defined in line 1584; used 1 times
cs58 defined in line 1574; used 1 times
fas1 defined in line 1243; used 1 times
lcmp1 defined in line 1371; used 1 times
lcmp2 defined in line 1393; used 1 times
lcmp3 defined in line 1416; used 1 times
lcmp4 defined in line 1424; used 1 times
lcmp5 defined in line 1433; used 1 times
lcmp6 defined in line 1442; used 1 times
move1 defined in line 851; used 1 times
move10 defined in line 904; used 2 times
move11 defined in line 910; used 2 times
move12 defined in line 917; used 3 times
move13 defined in line 969; used 2 times
move13a defined in line 941; used 2 times
move14 defined in line 975; used 2 times
move14a defined in line 989; used 2 times
move15 defined in line 982; used 3 times
move16 defined in line 1002; used 3 times
move16a defined in line 995; used 2 times
move17 defined in line 1016; used 2 times
move2 defined in line 856; used 2 times
move3 defined in line 862; used 4 times
move4 defined in line 867; used 1 times
move5 defined in line 873; used 2 times
move6 defined in line 878; used 3 times
move7 defined in line 884; used 2 times
move8 defined in line 891; used 2 times
move9 defined in line 897; used 2 times
rest defined in line 1513; used 14 times

Defined variables

_cctab declared in line 1266; defined in line 1269; used 1 times
_efftab declared in line 828; defined in line 831; used 1 times
_regtab declared in line 5; defined in line 8; used 1 times
  • in line 5
_sptab declared in line 1522; defined in line 1525; used 1 times
Last modified: 1983-09-23
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 542
Valid CSS Valid XHTML 1.0 Strict