mirror of
https://github.com/tailix/libkernaux.git
synced 2024-12-04 11:25:18 -05:00
Fix conditional compilation
This commit is contained in:
parent
8e7bdf9d16
commit
07e914f938
8 changed files with 20 additions and 6 deletions
|
@ -30,21 +30,21 @@ void kernaux_arch_x86_write_cr4(volatile unsigned long value);
|
||||||
unsigned char kernaux_arch_x86_inportb(const unsigned short port)
|
unsigned char kernaux_arch_x86_inportb(const unsigned short port)
|
||||||
{
|
{
|
||||||
register unsigned char result;
|
register unsigned char result;
|
||||||
asm volatile("inb %1, %0" : "=a" (result) : "dN" (port));
|
__asm__ volatile("inb %1, %0" : "=a" (result) : "dN" (port));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned short kernaux_arch_x86_inportw(const unsigned short port)
|
unsigned short kernaux_arch_x86_inportw(const unsigned short port)
|
||||||
{
|
{
|
||||||
register unsigned short result;
|
register unsigned short result;
|
||||||
asm volatile("inw %1, %0" : "=a" (result) : "dN" (port));
|
__asm__ volatile("inw %1, %0" : "=a" (result) : "dN" (port));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int kernaux_arch_x86_inportd(const unsigned short port)
|
unsigned int kernaux_arch_x86_inportd(const unsigned short port)
|
||||||
{
|
{
|
||||||
register unsigned int result;
|
register unsigned int result;
|
||||||
asm volatile("ind %1, %0" : "=a" (result) : "dN" (port));
|
__asm__ volatile("ind %1, %0" : "=a" (result) : "dN" (port));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,21 +52,21 @@ void kernaux_arch_x86_outportb(
|
||||||
const unsigned short port,
|
const unsigned short port,
|
||||||
const unsigned char value
|
const unsigned char value
|
||||||
) {
|
) {
|
||||||
asm volatile("outb %1, %0" : : "dN" (port), "a" (value));
|
__asm__ volatile("outb %1, %0" : : "dN" (port), "a" (value));
|
||||||
}
|
}
|
||||||
|
|
||||||
void kernaux_arch_x86_outportw(
|
void kernaux_arch_x86_outportw(
|
||||||
const unsigned short port,
|
const unsigned short port,
|
||||||
const unsigned short value
|
const unsigned short value
|
||||||
) {
|
) {
|
||||||
asm volatile("outw %1, %0" : : "dN" (port), "a" (value));
|
__asm__ volatile("outw %1, %0" : : "dN" (port), "a" (value));
|
||||||
}
|
}
|
||||||
|
|
||||||
void kernaux_arch_x86_outportd(
|
void kernaux_arch_x86_outportd(
|
||||||
const unsigned short port,
|
const unsigned short port,
|
||||||
const unsigned int value
|
const unsigned int value
|
||||||
) {
|
) {
|
||||||
asm volatile("outd %1, %0" : : "dN" (port), "a" (value));
|
__asm__ volatile("outd %1, %0" : : "dN" (port), "a" (value));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include "../config.h"
|
||||||
|
|
||||||
.global kernaux_arch_x86_hang
|
.global kernaux_arch_x86_hang
|
||||||
.global kernaux_arch_x86_read_cr0
|
.global kernaux_arch_x86_read_cr0
|
||||||
.global kernaux_arch_x86_read_cr4
|
.global kernaux_arch_x86_read_cr4
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#ifdef ARCH_X86
|
#ifdef ARCH_X86
|
||||||
#include <kernaux/arch/x86.h>
|
#include <kernaux/arch/x86.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include "../config.h"
|
||||||
|
|
||||||
#include <kernaux/multiboot2.h>
|
#include <kernaux/multiboot2.h>
|
||||||
|
|
||||||
const struct KernAux_Multiboot2_TagBase *KernAux_Multiboot2_first_tag_with_type(
|
const struct KernAux_Multiboot2_TagBase *KernAux_Multiboot2_first_tag_with_type(
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include "../config.h"
|
||||||
|
|
||||||
#include <kernaux/multiboot2.h>
|
#include <kernaux/multiboot2.h>
|
||||||
|
|
||||||
kernaux_bool KernAux_Multiboot2_is_valid(
|
kernaux_bool KernAux_Multiboot2_is_valid(
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include "../config.h"
|
||||||
|
|
||||||
#include <kernaux/multiboot2.h>
|
#include <kernaux/multiboot2.h>
|
||||||
|
|
||||||
static const char *KernAux_Multiboot2_TagType_to_str(
|
static const char *KernAux_Multiboot2_TagType_to_str(
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <kernaux/pfa.h>
|
#include <kernaux/pfa.h>
|
||||||
|
|
||||||
kernaux_bool KernAux_PFA_initialize_start(
|
kernaux_bool KernAux_PFA_initialize_start(
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <kernaux/stdlib.h>
|
#include <kernaux/stdlib.h>
|
||||||
|
|
||||||
void kernaux_memset(
|
void kernaux_memset(
|
||||||
|
|
Loading…
Reference in a new issue