File: lineno.s

package info (click to toggle)
binutils 2.34-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 328,380 kB
  • sloc: ansic: 1,180,155; asm: 665,310; cpp: 130,540; exp: 69,822; makefile: 57,183; sh: 22,559; yacc: 14,469; lisp: 13,785; perl: 2,112; ada: 1,681; lex: 1,650; pascal: 1,446; cs: 879; sed: 195; python: 154; xml: 95; awk: 25
file content (60 lines) | stat: -rw-r--r-- 1,436 bytes parent folder | download | duplicates (26)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
	.text

# some data
	.word	0xdeadbeef
	.word	0xdeadbeef
	.word	0xdeadbeef
	.word	0xdeadbeef

# some real code, compiled from a toy C program
        .globl  main
        .ent    main
main:
        .frame  $fp,24,$31              # vars= 16, regs= 2/0, args= 0, extra= 0
        .mask   0xc0000000,-8
        .fmask  0x00000000,0
        subu    $sp,$sp,24
        sw      $31,20($sp)
        sw      $fp,16($sp)
        move    $fp,$sp
        jal     __main
        li      $2,2                    # 0x2
        sw      $2,0($fp)
        lw      $2,0($fp)
        move    $3,$2
        sll     $4,$3,1
        addu    $2,$4,$2
        sw      $2,4($fp)
        lw      $4,4($fp)
        jal     g
        lw      $3,0($fp)
        move    $2,$3
        b       $L1
$L1:
        move    $sp,$fp
        lw      $31,20($sp)
        lw      $fp,16($sp)
        addu    $sp,$sp,24
        j       $31
        .end    main
        .align  2
        .globl  g
        .ent    g
g:
        .frame  $fp,24,$31              # vars= 16, regs= 1/0, args= 0, extra= 0
        .mask   0x40000000,-16
        .fmask  0x00000000,0
        subu    $sp,$sp,24
        sw      $fp,16($sp)
        move    $fp,$sp
        sw      $4,0($fp)
        lw      $2,0($fp)
        addu    $3,$2,1
        move    $2,$3
        b       $L2
$L2:
        move    $sp,$fp
        lw      $fp,16($sp)
        addu    $sp,$sp,24
        j       $31
        .end    g