diff options
| author | rsc <devnull@localhost> | 2004-12-26 21:51:15 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2004-12-26 21:51:15 +0000 |
| commit | 5f8fa94796903bf81db4f1dc76d433a80308b3d4 (patch) | |
| tree | bc94c36965c4bf6cdb420c4c5fe628024647f88e /src/lib9/tas-PowerMacintosh.c | |
| parent | b2ff5382580e13d82ca48966c9d79d3318865cba (diff) | |
| download | plan9port-5f8fa94796903bf81db4f1dc76d433a80308b3d4.tar.gz plan9port-5f8fa94796903bf81db4f1dc76d433a80308b3d4.zip | |
cleanups - lots of removed files now in thread library.
qlock.c - stubs to thread library
notify.c - clean interface slightly.
Diffstat (limited to 'src/lib9/tas-PowerMacintosh.c')
| -rw-r--r-- | src/lib9/tas-PowerMacintosh.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/lib9/tas-PowerMacintosh.c b/src/lib9/tas-PowerMacintosh.c deleted file mode 100644 index d7a8610c..00000000 --- a/src/lib9/tas-PowerMacintosh.c +++ /dev/null @@ -1,42 +0,0 @@ -#include "u.h" -#include "libc.h" - -/* - * first argument (l) is in r3 at entry. - * r3 contains return value upon return. - */ -int -_tas(int *x) -{ - int v; - /* - * this __asm__ works with gcc 2.95.2 (mac os x 10.1). - * this assembly language destroys r0 (0), some other register (v), - * r4 (x) and r5 (temp). - */ - __asm__("\n sync\n" - " li r0,0\n" - " mr r4,%1 /* &l->val */\n" - " lis r5,0xdead /* assemble constant 0xdeaddead */\n" - " ori r5,r5,0xdead /* \" */\n" - "tas1:\n" - " dcbf r4,r0 /* cache flush; \"fix for 603x bug\" */\n" - " lwarx %0,r4,r0 /* v = l->val with reservation */\n" - " cmp cr0,0,%0,r0 /* v == 0 */\n" - " bne tas0\n" - " stwcx. r5,r4,r0 /* if (l->val same) l->val = 0xdeaddead */\n" - " bne tas1\n" - "tas0:\n" - " sync\n" - " isync\n" - : "=r" (v) - : "r" (x) - : "cc", "memory", "r0", "r4", "r5" - ); - switch(v) { - case 0: return 0; - case 0xdeaddead: return 1; - default: fprint(2, "tas: corrupted 0x%lux\n", v); - } - return 0; -} |
