Skip to content

Commit

Permalink
[X86] Consistently use __inline__ keyword in intrin.h
Browse files Browse the repository at this point in the history
This fixes llvm#117854
  • Loading branch information
momo5502 committed Nov 27, 2024
1 parent c00e532 commit 2048ca6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions clang/lib/Headers/intrin.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,33 +330,33 @@ static __inline__ void __DEFAULT_FN_ATTRS __halt(void) {
__asm__ volatile("hlt");
}

static inline unsigned char __inbyte(unsigned short port) {
static __inline__ unsigned char __inbyte(unsigned short port) {
unsigned char ret;
__asm__ __volatile__("inb %w1, %b0" : "=a"(ret) : "Nd"(port));
return ret;
}

static inline unsigned short __inword(unsigned short port) {
static __inline__ unsigned short __inword(unsigned short port) {
unsigned short ret;
__asm__ __volatile__("inw %w1, %w0" : "=a"(ret) : "Nd"(port));
return ret;
}

static inline unsigned long __indword(unsigned short port) {
static __inline__ unsigned long __indword(unsigned short port) {
unsigned long ret;
__asm__ __volatile__("inl %w1, %k0" : "=a"(ret) : "Nd"(port));
return ret;
}

static inline void __outbyte(unsigned short port, unsigned char data) {
static __inline__ void __outbyte(unsigned short port, unsigned char data) {
__asm__ __volatile__("outb %b0, %w1" : : "a"(data), "Nd"(port));
}

static inline void __outword(unsigned short port, unsigned short data) {
static __inline__ void __outword(unsigned short port, unsigned short data) {
__asm__ __volatile__("outw %w0, %w1" : : "a"(data), "Nd"(port));
}

static inline void __outdword(unsigned short port, unsigned long data) {
static __inline__ void __outdword(unsigned short port, unsigned long data) {
__asm__ __volatile__("outl %k0, %w1" : : "a"(data), "Nd"(port));
}
#endif
Expand Down

0 comments on commit 2048ca6

Please sign in to comment.