~ubuntu-branches/debian/squeeze/ffcall/squeeze

« back to all changes in this revision

Viewing changes to callback/trampoline_r/cache-powerpc.c

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Egger
  • Date: 2010-06-26 15:29:30 UTC
  • mfrom: (5.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20100626152930-c09y01gk3szcnykn
Tags: 1.10+cvs20100619-2
Ship to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Instruction cache flushing for powerpc, not on AIX */
 
2
 
 
3
/*
 
4
 * Copyright 1997-2006 Bruno Haible, <bruno@clisp.org>
 
5
 *
 
6
 * This is free software distributed under the GNU General Public Licence
 
7
 * described in the file COPYING. Contact the author if you don't have this
 
8
 * or can't live with it. There is ABSOLUTELY NO WARRANTY, explicit or implied,
 
9
 * on this software.
 
10
 */
 
11
 
 
12
void __TR_clear_cache (char* first_addr)
 
13
{
 
14
  /* Taken from egcs-1.1.2/gcc/config/rs6000/tramp.asm. */
 
15
  asm volatile ("icbi 0,%0; dcbf 0,%0" : : "r" (first_addr));
 
16
  asm volatile ("icbi 0,%0; dcbf 0,%0" : : "r" (first_addr+4));
 
17
  asm volatile ("icbi 0,%0; dcbf 0,%0" : : "r" (first_addr+8));
 
18
  asm volatile ("icbi 0,%0; dcbf 0,%0" : : "r" (first_addr+12));
 
19
  asm volatile ("icbi 0,%0; dcbf 0,%0" : : "r" (first_addr+16));
 
20
  asm volatile ("icbi 0,%0; dcbf 0,%0" : : "r" (first_addr+20));
 
21
  asm volatile ("icbi 0,%0; dcbf 0,%0" : : "r" (first_addr+24));
 
22
  asm volatile ("icbi 0,%0; dcbf 0,%0" : : "r" (first_addr+28));
 
23
  asm volatile ("icbi 0,%0; dcbf 0,%0" : : "r" (first_addr+32));
 
24
  asm volatile ("sync; isync");
 
25
}