#define EBUSY 16
#define ENOSYS 251
+#define _ASM_EFAULT "-14"
+
typedef unsigned char u8;
typedef short unsigned int u16;
#ifdef __LP64__
register long lws_errno asm("r21");
asm volatile ( "ble 0xb0(%%sr2, %%r0) \n\t"
"ldi %2, %%r20 \n\t"
+ "cmpiclr,<> " _ASM_EFAULT ", %%r21, %%r0\n\t"
+ "iitlbp %%r0,(%%sr0, %%r0) \n\t"
: "=r" (lws_ret), "=r" (lws_errno)
: "i" (LWS_CAS), "r" (lws_mem), "r" (lws_old), "r" (lws_new)
: "r1", "r20", "r22", "r23", "r29", "r31", "memory"
register long lws_errno asm("r21");
asm volatile ( "ble 0xb0(%%sr2, %%r0) \n\t"
"ldi %6, %%r20 \n\t"
+ "cmpiclr,<> " _ASM_EFAULT ", %%r21, %%r0\n\t"
+ "iitlbp %%r0,(%%sr0, %%r0) \n\t"
: "=r" (lws_ret), "=r" (lws_errno), "+r" (lws_mem),
"+r" (lws_old), "+r" (lws_new), "+r" (lws_size)
: "i" (2)