]> git.wh0rd.org Git - ICEs.git/blob - hppa-O1/vfprintf.i
add bfin ice
[ICEs.git] / hppa-O1 / vfprintf.i
1 static void __lll_mutex_lock(int *futex)
2 {
3         int lws_errno = 14; 
4         int lws_ret;
5         asm (
6 "0:                                     \n\t" 
7 "copy   %3, %%r26                       \n\t" 
8 "copy   %4, %%r25                       \n\t" 
9 "copy   %5, %%r24                       \n\t" 
10 "ble    " "0xb0" "(%%sr2, %%r0)         \n\t" 
11 "ldi    " "0" ", %%r20          \n\t" 
12 "cmpib,=,n " "11" ",%%r21,0b    \n\t" 
13 "nop                                    \n\t" 
14 "copy   %%r28, %0       /* here */              \n\t" 
15 "sub    %%r0, %%r21, %%r21              \n\t" 
16 "copy   %%r21, %1       /* here */              \n\t"
17 : "=r" (lws_ret), "=r"(lws_errno), "=m"(*futex)
18 : "r"(futex), "r"(0), "r"(1)
19 :"r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory"
20 );
21 }
22 typedef struct {
23         char *_IO_write_end;
24         int lock;
25 } _IO_FILE;
26 __attribute__ ((__nothrow__)) __attribute__ ((noinline))
27 static int buffered_vfprintf(_IO_FILE *s)
28 {
29         char buf[8192];
30         _IO_FILE *hp;
31         hp->_IO_write_end = buf;
32         __lll_mutex_lock(&s->lock);
33 }
34 void foo(_IO_FILE *s)
35 {
36         buffered_vfprintf(s);
37 }