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