xref: /linux/arch/riscv/kernel/tests/module_test/test_set8.S (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2023 Rivos Inc.
4 */
5
6.text
7.global test_set8
8test_set8:
9	lw	a0, set8
10	la	t0, set8
11#ifdef CONFIG_32BIT
12	slli	t0, t0, 24
13	srli	t0, t0, 24
14#else
15	slli	t0, t0, 56
16	srli	t0, t0, 56
17#endif
18	sub	a0, a0, t0
19	ret
20.data
21set8:
22	.reloc set8, R_RISCV_SET8, set8
23	.word 0
24