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