2 --- libdrm-2.4.20.orig/xf86drm.h 2010-03-06 00:21:13.000000000 +0100
3 +++ libdrm-2.4.20/xf86drm.h 2010-06-12 20:43:01.324916826 +0200
4 @@ -374,6 +374,29 @@ typedef struct _drmSetVersion {
8 +#elif defined(__mips__)
10 +#define DRM_CAS(lock, old, new, ret) \
12 + __asm__ __volatile__( \
13 + " .set mips3;.set noreorder;\n" \
16 + " bne %1, %2, 1f;\n" \
18 + " move %1, %3; \n" \
20 + " xori %1, %1, 1\n" \
22 + " .set mips0; .set reorder;\n" \
23 + : "=m" (__drm_dummy_lock(lock)),\
31 #elif defined(__sparc__)
33 #define DRM_CAS(lock,old,new,__ret) \
34 @@ -457,7 +480,7 @@ do { register unsigned int __old __asm("
36 #if defined(__alpha__)
37 #define DRM_CAS_RESULT(_result) long _result
38 -#elif defined(__powerpc__)
39 +#elif defined(__powerpc__) || defined(__mips__)
40 #define DRM_CAS_RESULT(_result) int _result
42 #define DRM_CAS_RESULT(_result) char _result