From e827ed5d15baa60955ddd6361e4689cc285de1a4 Mon Sep 17 00:00:00 2001 From: "Anna (navi) Figueiredo Gomes" Date: Thu, 6 Jun 2024 15:00:08 +0200 Subject: use __asm__ instead of asm Signed-off-by: Anna (navi) Figueiredo Gomes --- include/nrvn.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/nrvn.h b/include/nrvn.h index abb03b4..98b4c78 100644 --- a/include/nrvn.h +++ b/include/nrvn.h @@ -6,12 +6,26 @@ #include static inline void outb(uint16_t port, uint8_t val) { - asm volatile ("outb %0, %1" : : "a"(val), "Nd"(port) : "memory"); + __asm__ volatile ("outb %0, %1" : : "a"(val), "Nd"(port) : "memory"); +} + +static inline void outl(uint32_t port, uint32_t val) { + __asm__ volatile ("outl %0, %1" : : "a"(val), "Nd"(port) : "memory"); +} + +static inline void outw(uint16_t port, uint16_t val) { + __asm__ volatile ("outw %0, %1" : : "a"(val), "Nd"(port) : "memory"); } static inline uint8_t inb(uint16_t port) { uint8_t ret; - asm volatile ("inb %1, %0" : "=a"(ret) : "Nd"(port) : "memory"); + __asm__ volatile ("inb %1, %0" : "=a"(ret) : "Nd"(port) : "memory"); + return ret; +} + +static inline uint32_t inl(uint16_t port) { + uint32_t ret; + __asm__ volatile ("inl %1, %0" : "=a"(ret) : "Nd"(port) : "memory"); return ret; } -- cgit v1.2.3