File: ppc_start.s

package info (click to toggle)
gprbuild 2011-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 10,396 kB
  • sloc: ada: 94,726; sh: 2,818; xml: 2,225; makefile: 471; ansic: 240; cpp: 89; fortran: 62; asm: 27
file content (33 lines) | stat: -rw-r--r-- 609 bytes parent folder | download | duplicates (3)
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
        top_of_stack   = 0x200000
        call_id_return = 0x063
        exit_status    = 0x0

        .section ".text"
        .global _start

_start:
        addis 1,0,__bss_start@h
        ori   1,1,__bss_start@l
        addis 2,0,__end@h
        ori   2,2,__end@l
        addi  3,0,0

bssloop:
        cmp   0,0,1,2
        bge   bssdone
        stwx  3,0,1
        addi  1,1,4
        b     bssloop

bssdone:
        addis 1,0,top_of_stack@h
        ori   1,1,top_of_stack@l

entry_point:
        bl      main

.globl abort
abort:
        addi 3,0,exit_status
        addi 10,0,call_id_return
        sc