Annotation of researchv10no/cmd/lcc/gen2/sparc-sun/tst/wf1.s, revision 1.1

1.1     ! root        1: .seg "text"
        !             2: .global _main
        !             3: .align 4
        !             4: .proc 4
        !             5: _main:save %sp,-120,%sp
        !             6: st %r0,[%fp+-24]
        !             7: set _next,%r29
        !             8: st %r0,[%r29]
        !             9: ba L3; nop
        !            10: L2:
        !            11: add -20,%fp,%r8
        !            12: add -24,%fp,%r9
        !            13: call _lookup; nop
        !            14: mov %r8,%r29
        !            15: ld [%r29],%r28
        !            16: add %r28,1,%r28
        !            17: st %r28,[%r29]
        !            18: L3:
        !            19: add -20,%fp,%r8
        !            20: call _getword; nop
        !            21: cmp %r8,%r0; bne L2; nop
        !            22: ld [%fp+-24],%r8
        !            23: call _tprint; nop
        !            24: mov %r0,%r24
        !            25: L1:
        !            26: ret; restore
        !            27: .global _err
        !            28: .align 4
        !            29: .proc 4
        !            30: _err:save %sp,-96,%sp
        !            31: set L6,%r8
        !            32: mov %r24,%r9
        !            33: call _printf; nop
        !            34: set 1,%r8
        !            35: call _exit; nop
        !            36: L5:
        !            37: ret; restore
        !            38: .global _getword
        !            39: .align 4
        !            40: .proc 4
        !            41: _getword:save %sp,-96,%sp
        !            42: L8:
        !            43: L9:
        !            44: call _getchar; nop
        !            45: mov %r8,%r29
        !            46: cmp %r8,-1; be L11; nop
        !            47: mov %r29,%r8
        !            48: call _isletter; nop
        !            49: cmp %r8,%r0; be L8; nop
        !            50: L11:
        !            51: mov %r24,%r28
        !            52: ba L15; nop
        !            53: L12:
        !            54: mov %r28,%r27
        !            55: add %r27,1,%r28
        !            56: stb %r29,[%r27]
        !            57: L13:
        !            58: call _getchar; nop
        !            59: mov %r8,%r29
        !            60: L15:
        !            61: mov %r29,%r8
        !            62: call _isletter; nop
        !            63: mov %r8,%r29
        !            64: cmp %r8,%r0; bne L12; nop
        !            65: stb %r0,[%r28]
        !            66: cmp %r28,%r24; bleu L16; nop
        !            67: set 1,%r24
        !            68: ba L7; nop
        !            69: L16:
        !            70: mov %r0,%r24
        !            71: L7:
        !            72: ret; restore
        !            73: .global _isletter
        !            74: .align 4
        !            75: .proc 4
        !            76: _isletter:
        !            77: cmp %r8,65; bl L19; nop
        !            78: cmp %r8,90; bg L19; nop
        !            79: add %r8,32,%r8
        !            80: L19:
        !            81: cmp %r8,97; bl L21; nop
        !            82: cmp %r8,122; bg L21; nop
        !            83: ba L18; nop
        !            84: L21:
        !            85: mov %r0,%r8
        !            86: L18:
        !            87: retl; nop
        !            88: .global _lookup
        !            89: .align 4
        !            90: .proc 4
        !            91: _lookup:save %sp,-96,%sp
        !            92: ld [%r25],%r28
        !            93: cmp %r28,%r0; be L24; nop
        !            94: mov %r24,%r8
        !            95: ld [%r25],%r28
        !            96: ld [%r28+12],%r9
        !            97: call _strcmp; nop
        !            98: mov %r8,%r29
        !            99: cmp %r29,%r0; bge L26; nop
        !           100: mov %r24,%r8
        !           101: ld [%r25],%r28
        !           102: add %r28,4,%r9
        !           103: call _lookup; nop
        !           104: mov %r8,%r24
        !           105: ba L23; nop
        !           106: L26:
        !           107: cmp %r29,%r0; ble L28; nop
        !           108: mov %r24,%r8
        !           109: ld [%r25],%r28
        !           110: add %r28,8,%r9
        !           111: call _lookup; nop
        !           112: mov %r8,%r24
        !           113: ba L23; nop
        !           114: L28:
        !           115: ld [%r25],%r24
        !           116: ba L23; nop
        !           117: L24:
        !           118: set _next,%r28
        !           119: ld [%r28],%r28
        !           120: cmp %r28,2000; bl L30; nop
        !           121: set L32,%r8
        !           122: call _err; nop
        !           123: L30:
        !           124: set _next,%r28
        !           125: ld [%r28],%r28
        !           126: sll %r28,4,%r28
        !           127: set _words,%r27
        !           128: st %r0,[%r28+%r27]
        !           129: set _next,%r28
        !           130: ld [%r28],%r28
        !           131: sll %r28,4,%r28
        !           132: set _words+8,%r27
        !           133: st %r0,[%r28+%r27]
        !           134: set _words+4,%r27
        !           135: st %r0,[%r28+%r27]
        !           136: mov %r24,%r8
        !           137: call _strlen; nop
        !           138: add %r8,1,%r8
        !           139: call _malloc; nop
        !           140: set _next,%r28
        !           141: ld [%r28],%r28
        !           142: sll %r28,4,%r28
        !           143: set _words+12,%r27
        !           144: st %r8,[%r28+%r27]
        !           145: set _next,%r28
        !           146: ld [%r28],%r28
        !           147: sll %r28,4,%r28
        !           148: set _words+12,%r27
        !           149: ld [%r28+%r27],%r28
        !           150: cmp %r28,%r0; bne L36; nop
        !           151: set L39,%r8
        !           152: call _err; nop
        !           153: L36:
        !           154: set _next,%r28
        !           155: ld [%r28],%r28
        !           156: sll %r28,4,%r28
        !           157: set _words+12,%r27
        !           158: ld [%r28+%r27],%r8
        !           159: mov %r24,%r9
        !           160: call _strcpy; nop
        !           161: set _next,%r28
        !           162: ld [%r28],%r27
        !           163: add %r27,1,%r26
        !           164: st %r26,[%r28]
        !           165: sll %r27,4,%r28
        !           166: set _words,%r27
        !           167: add %r28,%r27,%r28
        !           168: st %r28,[%r25]
        !           169: mov %r28,%r24
        !           170: L23:
        !           171: ret; restore
        !           172: .global _tprint
        !           173: .align 4
        !           174: .proc 4
        !           175: _tprint:save %sp,-96,%sp
        !           176: cmp %r24,%r0; be L42; nop
        !           177: ld [%r24+4],%r8
        !           178: call _tprint; nop
        !           179: set L44,%r8
        !           180: ld [%r24],%r9
        !           181: ld [%r24+12],%r10
        !           182: call _printf; nop
        !           183: ld [%r24+8],%r8
        !           184: call _tprint; nop
        !           185: L42:
        !           186: L41:
        !           187: ret; restore
        !           188: .global _strcmp
        !           189: .align 4
        !           190: .proc 4
        !           191: _strcmp:
        !           192: ba L47; nop
        !           193: L46:
        !           194: mov %r8,%r13
        !           195: add %r13,1,%r8
        !           196: ldsb [%r13],%r13
        !           197: cmp %r13,%r0; bne L49; nop
        !           198: mov %r0,%r8
        !           199: ba L45; nop
        !           200: L49:
        !           201: add %r9,1,%r9
        !           202: L47:
        !           203: ldsb [%r8],%r13
        !           204: ldsb [%r9],%r12
        !           205: cmp %r13,%r12; be L46; nop
        !           206: ldsb [%r8],%r13
        !           207: cmp %r13,%r0; bne L51; nop
        !           208: set -1,%r8
        !           209: ba L45; nop
        !           210: L51:
        !           211: ldsb [%r9],%r13
        !           212: cmp %r13,%r0; bne L53; nop
        !           213: set 1,%r8
        !           214: ba L45; nop
        !           215: L53:
        !           216: ldsb [%r8],%r13
        !           217: ldsb [%r9],%r12
        !           218: sub %r13,%r12,%r8
        !           219: L45:
        !           220: retl; nop
        !           221: .seg "bss"
        !           222: .global _next
        !           223: .align 4; .common _next,4
        !           224: .global _words
        !           225: .align 4; .common _words,32000
        !           226: .seg "text"
        !           227: L44:.ascii "%d\011%s\012\000"
        !           228: L39:.ascii "out of word storage\000"
        !           229: L32:.ascii "out of node storage\000"
        !           230: L6:.ascii "? %s\012\000"

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.