File: flush-cache.S

package info (click to toggle)
libunwind 0.98.5-8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 3,704 kB
  • ctags: 2,701
  • sloc: ansic: 16,594; sh: 11,043; asm: 1,216; makefile: 482; cpp: 70
file content (41 lines) | stat: -rw-r--r-- 849 bytes parent folder | download | duplicates (2)
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
#if defined(__ia64__)

	.global flush_cache

	.proc flush_cache
flush_cache:
	.prologue
        alloc r2=ar.pfs,2,0,0,0
	add r8=31,in1			// round up to 32 byte-boundary
        ;;
        shr.u r8=r8,5                   // we flush 32 bytes per iteration
	;;
	add r8=-1,r8
        .save ar.lc, r3
        mov r3=ar.lc                    // save ar.lc
        ;;
        .body

        mov ar.lc=r8
        ;;
.loop:  fc in0                          // issuable on M0 only
        add in0=32,in0
        br.cloop.sptk.few .loop
        ;;
        sync.i
        ;;
        srlz.i
        ;;
        mov ar.lc=r3                    // restore ar.lc
        br.ret.sptk.many rp
	.endp flush_cache

#elif defined(__i386__) || defined (__x86_64__)

	.globl flush_cache
flush_cache:
	ret

#else
# error Need flush_cache code for this architecture.
#endif