~ubuntu-branches/ubuntu/natty/libunwind/natty

« back to all changes in this revision

Viewing changes to tests/flush-cache.S

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Delahaye
  • Date: 2004-05-28 14:21:39 UTC
  • Revision ID: james.westby@ubuntu.com-20040528142139-jv1eckpdf4t94f3o
Tags: upstream-0.97
ImportĀ upstreamĀ versionĀ 0.97

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#if defined(__ia64__)
 
2
 
 
3
        .global flush_cache
 
4
 
 
5
        .proc flush_cache
 
6
flush_cache:
 
7
        .prologue
 
8
        alloc r2=ar.pfs,2,0,0,0
 
9
        add r8=31,in1                   // round up to 32 byte-boundary
 
10
        ;;
 
11
        shr.u r8=r8,5                   // we flush 32 bytes per iteration
 
12
        ;;
 
13
        add r8=-1,r8
 
14
        .save ar.lc, r3
 
15
        mov r3=ar.lc                    // save ar.lc
 
16
        ;;
 
17
        .body
 
18
 
 
19
        mov ar.lc=r8
 
20
        ;;
 
21
.loop:  fc in0                          // issuable on M0 only
 
22
        add in0=32,in0
 
23
        br.cloop.sptk.few .loop
 
24
        ;;
 
25
        sync.i
 
26
        ;;
 
27
        srlz.i
 
28
        ;;
 
29
        mov ar.lc=r3                    // restore ar.lc
 
30
        br.ret.sptk.many rp
 
31
        .endp flush_cache
 
32
 
 
33
#elif defined(__i386__)
 
34
 
 
35
        .globl flush_cache
 
36
flush_cache:
 
37
        ret
 
38
 
 
39
#elif
 
40
 
 
41
# error Need flush_cache code for this architecture.
 
42
 
 
43
#endif