Put spaces between "::" in the asm directive to let it compile in C++ mode.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3262 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -108,35 +108,35 @@ void i386_fxsave_swap(void *old_fpu_state, void *new_fpu_state);
|
|||||||
__asm__("movl %%dr3,%0" : "=r" (value))
|
__asm__("movl %%dr3,%0" : "=r" (value))
|
||||||
|
|
||||||
#define write_dr3(value) \
|
#define write_dr3(value) \
|
||||||
__asm__("movl %0,%%dr3" :: "r" (value))
|
__asm__("movl %0,%%dr3" : : "r" (value))
|
||||||
|
|
||||||
#define invalidate_TLB(va) \
|
#define invalidate_TLB(va) \
|
||||||
__asm__("invlpg (%0)" : : "r" (va))
|
__asm__("invlpg (%0)" : : "r" (va))
|
||||||
|
|
||||||
#define out8(value,port) \
|
#define out8(value,port) \
|
||||||
__asm__ ("outb %%al,%%dx"::"a" (value),"d" (port))
|
__asm__ ("outb %%al,%%dx" : : "a" (value), "d" (port))
|
||||||
|
|
||||||
#define out16(value,port) \
|
#define out16(value,port) \
|
||||||
__asm__ ("outw %%ax,%%dx"::"a" (value),"d" (port))
|
__asm__ ("outw %%ax,%%dx" : : "a" (value), "d" (port))
|
||||||
|
|
||||||
#define out32(value,port) \
|
#define out32(value,port) \
|
||||||
__asm__ ("outl %%eax,%%dx"::"a" (value),"d" (port))
|
__asm__ ("outl %%eax,%%dx" : : "a" (value), "d" (port))
|
||||||
|
|
||||||
#define in8(port) ({ \
|
#define in8(port) ({ \
|
||||||
unsigned char _v; \
|
unsigned char _v; \
|
||||||
__asm__ volatile ("inb %%dx,%%al":"=a" (_v):"d" (port)); \
|
__asm__ volatile ("inb %%dx,%%al" : "=a" (_v) : "d" (port)); \
|
||||||
_v; \
|
_v; \
|
||||||
})
|
})
|
||||||
|
|
||||||
#define in16(port) ({ \
|
#define in16(port) ({ \
|
||||||
unsigned short _v; \
|
unsigned short _v; \
|
||||||
__asm__ volatile ("inw %%dx,%%ax":"=a" (_v):"d" (port)); \
|
__asm__ volatile ("inw %%dx,%%ax":"=a" (_v) : "d" (port)); \
|
||||||
_v; \
|
_v; \
|
||||||
})
|
})
|
||||||
|
|
||||||
#define in32(port) ({ \
|
#define in32(port) ({ \
|
||||||
unsigned int _v; \
|
unsigned int _v; \
|
||||||
__asm__ volatile ("inl %%dx,%%eax":"=a" (_v):"d" (port)); \
|
__asm__ volatile ("inl %%dx,%%eax":"=a" (_v) : "d" (port)); \
|
||||||
_v; \
|
_v; \
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -144,14 +144,14 @@ _v; \
|
|||||||
__asm__ ("outb %%al,%%dx\n" \
|
__asm__ ("outb %%al,%%dx\n" \
|
||||||
"\tjmp 1f\n" \
|
"\tjmp 1f\n" \
|
||||||
"1:\tjmp 1f\n" \
|
"1:\tjmp 1f\n" \
|
||||||
"1:"::"a" (value),"d" (port))
|
"1:" : : "a" (value), "d" (port))
|
||||||
|
|
||||||
#define in8_p(port) ({ \
|
#define in8_p(port) ({ \
|
||||||
unsigned char _v; \
|
unsigned char _v; \
|
||||||
__asm__ volatile ("inb %%dx,%%al\n" \
|
__asm__ volatile ("inb %%dx,%%al\n" \
|
||||||
"\tjmp 1f\n" \
|
"\tjmp 1f\n" \
|
||||||
"1:\tjmp 1f\n" \
|
"1:\tjmp 1f\n" \
|
||||||
"1:":"=a" (_v):"d" (port)); \
|
"1:" : "=a" (_v) : "d" (port)); \
|
||||||
_v; \
|
_v; \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user