Use C2X standard
This commit is contained in:
parent
8d53f5468e
commit
4a2dc7e083
@ -7,7 +7,7 @@ CC := ${TARGET}-gcc
|
|||||||
SRC := $(shell find -type f -name '*.[cS]*')
|
SRC := $(shell find -type f -name '*.[cS]*')
|
||||||
OBJ := $(patsubst %, %.o, $(basename $(basename $(SRC))))
|
OBJ := $(patsubst %, %.o, $(basename $(basename $(SRC))))
|
||||||
|
|
||||||
CFLAGS := -Wall -Wextra -pedantic -ffreestanding -mcmodel=large
|
CFLAGS := -Wall -Wextra -pedantic -ffreestanding -mcmodel=large -std=c2x
|
||||||
CFLAGS += -ggdb -O0
|
CFLAGS += -ggdb -O0
|
||||||
ASFLAGS += -ggdb
|
ASFLAGS += -ggdb
|
||||||
CPPFLAGS += -I include
|
CPPFLAGS += -I include
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
debug_printf("\n"); \
|
debug_printf("\n"); \
|
||||||
volatile int _override = 0; \
|
volatile int _override = 0; \
|
||||||
while(1) { \
|
while(1) { \
|
||||||
asm("panic_breakpoint_" S__LINE__ ":"); \
|
__asm__("panic_breakpoint_" S__LINE__ ":"); \
|
||||||
if(_override) break; \
|
if(_override) break; \
|
||||||
} \
|
} \
|
||||||
}while(0)
|
}while(0)
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
|
|
||||||
static __inline void _outb(uint16_t port, uint8_t value)
|
static __inline void _outb(uint16_t port, uint8_t value)
|
||||||
{
|
{
|
||||||
asm volatile("outb %1, %0" : : "dN" (port), "a" (value));
|
__asm__ volatile("outb %1, %0" : : "dN" (port), "a" (value));
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline uint8_t _inb(uint16_t port)
|
static __inline uint8_t _inb(uint16_t port)
|
||||||
{
|
{
|
||||||
uint8_t ret;
|
uint8_t ret;
|
||||||
asm volatile("inb %1, %0" : "=a" (ret) : "dN" (port));
|
__asm__ volatile("inb %1, %0" : "=a" (ret) : "dN" (port));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user