diff options
Diffstat (limited to 'src/arch.c')
-rw-r--r-- | src/arch.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -45,6 +45,7 @@ #include "arch-riscv64.h" #include "arch-s390.h" #include "arch-s390x.h" +#include "arch-sh.h" #include "db.h" #include "system.h" @@ -98,6 +99,12 @@ const struct arch_def *arch_def_native = &arch_def_s390x; 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; +#elif __sh__ +#ifdef __BIG_ENDIAN__ +const struct arch_def *arch_def_native = &arch_def_sheb; +#else +const struct arch_def *arch_def_native = &arch_def_sh; +#endif #else #error the arch code needs to know about your machine type #endif /* machine type guess */ @@ -162,6 +169,10 @@ const struct arch_def *arch_def_lookup(uint32_t token) return &arch_def_s390x; case SCMP_ARCH_RISCV64: return &arch_def_riscv64; + case SCMP_ARCH_SHEB: + return &arch_def_sheb; + case SCMP_ARCH_SH: + return &arch_def_sh; } return NULL; @@ -214,6 +225,10 @@ const struct arch_def *arch_def_lookup_name(const char *arch_name) return &arch_def_s390x; else if (strcmp(arch_name, "riscv64") == 0) return &arch_def_riscv64; + else if (strcmp(arch_name, "sheb") == 0) + return &arch_def_sheb; + else if (strcmp(arch_name, "sh") == 0) + return &arch_def_sh; return NULL; } |