Skip to content

Commit 82180b1

Browse files
charlie-rivospalmer-dabbelt
authored andcommitted
Support rv32 ULEB128 test
Use opcodes available to both rv32 and rv64 in uleb128 module linking test. Fixes: af71bc1 ("riscv: Add tests for riscv module loading") Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Reported-by: Randy Dunlap <rdunlap@infradead.org> Closes: https://lore.kernel.org/lkml/1d7c71ee-5742-4df4-b8ef-a2aea0a624eb@infradead.org/ Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Link: https://lore.kernel.org/r/20231122-module_fixup-v2-1-dfb9565e9ea5@rivosinc.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 7c15934 commit 82180b1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

arch/riscv/kernel/tests/module_test/test_uleb128.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
.text
77
.global test_uleb_basic
88
test_uleb_basic:
9-
ld a0, second
9+
lw a0, second
1010
addi a0, a0, -127
1111
ret
1212

1313
.global test_uleb_large
1414
test_uleb_large:
15-
ld a0, fourth
15+
lw a0, fourth
1616
addi a0, a0, -0x07e8
1717
ret
1818

@@ -22,10 +22,10 @@ first:
2222
second:
2323
.reloc second, R_RISCV_SET_ULEB128, second
2424
.reloc second, R_RISCV_SUB_ULEB128, first
25-
.dword 0
25+
.word 0
2626
third:
2727
.space 1000
2828
fourth:
2929
.reloc fourth, R_RISCV_SET_ULEB128, fourth
3030
.reloc fourth, R_RISCV_SUB_ULEB128, third
31-
.dword 0
31+
.word 0

0 commit comments

Comments
 (0)