diff options
author | Tiezhu Yang <yangtiezhu@loongson.cn> | 2022-10-12 16:36:19 +0800 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2022-10-12 16:36:19 +0800 |
commit | 8a34228eb30308f6e223c6f2b87e2381d45056e2 (patch) | |
tree | 2fbdbf2a1f1287dfb19f3c8ebbe66bdb134ad57c /arch/loongarch/kernel | |
parent | 4e62d1d86585e1b62b4f96ee586881dd45a443dc (diff) |
LoongArch: Move {signed,unsigned}_imm_check() to inst.h
{signed,unsigned}_imm_check() will also be used in the bpf jit, so move
them from module.c to inst.h, this is preparation for later patches.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/kernel')
-rw-r--r-- | arch/loongarch/kernel/module.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/loongarch/kernel/module.c b/arch/loongarch/kernel/module.c index bee7457db804..097595b2fc14 100644 --- a/arch/loongarch/kernel/module.c +++ b/arch/loongarch/kernel/module.c @@ -18,16 +18,6 @@ #include <linux/string.h> #include <linux/kernel.h> -static inline bool signed_imm_check(long val, unsigned int bit) -{ - return -(1L << (bit - 1)) <= val && val < (1L << (bit - 1)); -} - -static inline bool unsigned_imm_check(unsigned long val, unsigned int bit) -{ - return val < (1UL << bit); -} - static int rela_stack_push(s64 stack_value, s64 *rela_stack, size_t *rela_stack_top) { if (*rela_stack_top >= RELA_STACK_DEPTH) |