File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -319,6 +319,28 @@ arch___test_and_change_bit(unsigned long nr, volatile unsigned long *addr)
319
319
return test_and_change_bit (nr , addr );
320
320
}
321
321
322
+ static inline bool xor_unlock_is_negative_byte (unsigned long mask ,
323
+ volatile unsigned long * p )
324
+ {
325
+ #ifdef CONFIG_COLDFIRE
326
+ __asm__ __volatile__ ("eorl %1, %0"
327
+ : "+m" (* p )
328
+ : "d" (mask )
329
+ : "memory" );
330
+ return * p & (1 << 7 );
331
+ #else
332
+ char result ;
333
+ char * cp = (char * )p + 3 ; /* m68k is big-endian */
334
+
335
+ __asm__ __volatile__ ("eor.b %1, %2; smi %0"
336
+ : "=d" (result )
337
+ : "di" (mask ), "o" (* cp )
338
+ : "memory" );
339
+ return result ;
340
+ #endif
341
+ }
342
+ #define xor_unlock_is_negative_byte xor_unlock_is_negative_byte
343
+
322
344
/*
323
345
* The true 68020 and more advanced processors support the "bfffo"
324
346
* instruction for finding bits. ColdFire and simple 68000 parts
You can’t perform that action at this time.
0 commit comments