Use C2X standard

This commit is contained in:
Thomas Lovén 2022-01-09 23:39:19 +01:00
parent 8d53f5468e
commit 4a2dc7e083
3 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ CC := ${TARGET}-gcc
SRC := $(shell find -type f -name '*.[cS]*')
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
ASFLAGS += -ggdb
CPPFLAGS += -I include

View File

@ -30,7 +30,7 @@
debug_printf("\n"); \
volatile int _override = 0; \
while(1) { \
asm("panic_breakpoint_" S__LINE__ ":"); \
__asm__("panic_breakpoint_" S__LINE__ ":"); \
if(_override) break; \
} \
}while(0)

View File

@ -3,13 +3,13 @@
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)
{
uint8_t ret;
asm volatile("inb %1, %0" : "=a" (ret) : "dN" (port));
__asm__ volatile("inb %1, %0" : "=a" (ret) : "dN" (port));
return ret;
}