mirror of
https://github.com/tailix/libkernaux.git
synced 2025-04-14 17:32:55 -04:00
Add arch "riscv64"
This commit is contained in:
parent
536c1f44f7
commit
00345258e9
7 changed files with 40 additions and 0 deletions
|
@ -30,6 +30,10 @@ if ASM_I386
|
|||
libkernaux_a_SOURCES += src/asm/i386.S
|
||||
endif
|
||||
|
||||
if ASM_RISCV64
|
||||
libkernaux_a_SOURCES += src/asm/riscv64.S
|
||||
endif
|
||||
|
||||
if ASM_X86_64
|
||||
libkernaux_a_SOURCES += src/asm/x86_64.S
|
||||
endif
|
||||
|
|
|
@ -54,6 +54,7 @@ AS_IF([test "$with_libc" = yes], do_with_libc)
|
|||
|
||||
dnl Architecture
|
||||
AM_CONDITIONAL([ASM_I386], [test "$host_cpu" = i386])
|
||||
AM_CONDITIONAL([ASM_RISCV64], [test "$host_cpu" = riscv64])
|
||||
AM_CONDITIONAL([ASM_X86_64], [test "$host_cpu" = x86_64])
|
||||
|
||||
dnl Features (disabled by default)
|
||||
|
@ -79,6 +80,7 @@ AM_CONDITIONAL([WITH_LIBC_STRLEN], [test "$with_libc_strlen" = yes])
|
|||
|
||||
dnl Architecture
|
||||
AS_IF([test "$host_cpu" = i386], [AC_DEFINE([ASM_I386], [1], [architecture is i386])])
|
||||
AS_IF([test "$host_cpu" = riscv64], [AC_DEFINE([ASM_RISCV64], [1], [architecture is RISC-V 64-bit])])
|
||||
AS_IF([test "$host_cpu" = x86_64], [AC_DEFINE([ASM_X86_64], [1], [architecture is x86_64])])
|
||||
|
||||
dnl Features (disabled by default)
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
nobase_include_HEADERS = \
|
||||
kernaux.h \
|
||||
kernaux/arch/i386.h \
|
||||
kernaux/arch/riscv64.h \
|
||||
kernaux/arch/x86_64.h \
|
||||
kernaux/asm/i386.h \
|
||||
kernaux/asm/riscv64.h \
|
||||
kernaux/asm/x86_64.h \
|
||||
kernaux/assert.h \
|
||||
kernaux/cmdline.h \
|
||||
|
|
|
@ -18,4 +18,5 @@
|
|||
#include <kernaux/units.h>
|
||||
|
||||
#include <kernaux/arch/i386.h>
|
||||
#include <kernaux/arch/riscv64.h>
|
||||
#include <kernaux/arch/x86_64.h>
|
||||
|
|
14
include/kernaux/arch/riscv64.h
Normal file
14
include/kernaux/arch/riscv64.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef KERNAUX_INCLUDED_ARCH_RISCV64
|
||||
#define KERNAUX_INCLUDED_ARCH_RISCV64
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
14
include/kernaux/asm/riscv64.h
Normal file
14
include/kernaux/asm/riscv64.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef KERNAUX_INCLUDED_ASM_RISCV64
|
||||
#define KERNAUX_INCLUDED_ASM_RISCV64
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <kernaux/arch/riscv64.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
3
src/asm/riscv64.S
Normal file
3
src/asm/riscv64.S
Normal file
|
@ -0,0 +1,3 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
Loading…
Add table
Reference in a new issue