6 /* The "g" below really should be an "i", but gcc doesn't believe that it will
7 * always be an immediate value. Using "g" makes the compiler be quiet, but
8 * the assembler should fail if the value is not an immediate.
10 extern inline void bset(const void* addr, const u8 mask) {
11 /* The assembly breaks when gcc tries to optimise consecutive calls to
12 * bset/bclr on the same memory address. Sigh. Either turn off optimisation
13 * (-O1 without -Os works), or we do it the dumb way.
20 // : "p" (addr), "g" (mask) /* inputs */
21 // : "x" /* altered registers */
25 extern inline void bclr(const void* addr, const u8 mask) {
26 /* same issue as above */
32 // : "p" (addr), "g" (mask) /* inputs */
33 // : "x" /* altered registers */
37 extern inline void lock() {
41 extern inline void unlock() {