diff options
author | Andreas Schwab <schwab@suse.de> | 2020-01-07 14:51:19 +0100 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2020-02-23 10:27:58 -0500 |
commit | 5432e15521d5ce5a7d3f26bf78674cbaa9d73d1f (patch) | |
tree | f0bf4ab2fcb55620c15aae9f4c6169bea6d73285 /src/arch.c | |
parent | 0a4c0300ebcc982cf419a4f7382ffc28e4792d2a (diff) | |
download | libseccomp-5432e15521d5ce5a7d3f26bf78674cbaa9d73d1f.tar.gz |
arch: Add RISC-V 64-bit support
Signed-off-by: Andreas Schwab <schwab@suse.de>
[PM: minor macro shuffling in seccomp.h.in]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'src/arch.c')
-rw-r--r-- | src/arch.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -41,6 +41,7 @@ #include "arch-parisc.h" #include "arch-ppc.h" #include "arch-ppc64.h" +#include "arch-riscv64.h" #include "arch-s390.h" #include "arch-s390x.h" #include "db.h" @@ -94,6 +95,8 @@ const struct arch_def *arch_def_native = &arch_def_ppc; const struct arch_def *arch_def_native = &arch_def_s390x; #elif __s390__ const struct arch_def *arch_def_native = &arch_def_s390; +#elif __riscv && __riscv_xlen == 64 +const struct arch_def *arch_def_native = &arch_def_riscv64; #else #error the arch code needs to know about your machine type #endif /* machine type guess */ @@ -156,6 +159,8 @@ const struct arch_def *arch_def_lookup(uint32_t token) return &arch_def_s390; case SCMP_ARCH_S390X: return &arch_def_s390x; + case SCMP_ARCH_RISCV64: + return &arch_def_riscv64; } return NULL; @@ -206,6 +211,8 @@ const struct arch_def *arch_def_lookup_name(const char *arch_name) return &arch_def_s390; else if (strcmp(arch_name, "s390x") == 0) return &arch_def_s390x; + else if (strcmp(arch_name, "riscv64") == 0) + return &arch_def_riscv64; return NULL; } |