xref: /linux/arch/riscv/kernel/tests/module_test/test_sub64.S (revision ae22a94997b8a03dcb3c922857c203246711f9d4)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2023 Rivos Inc.
4 */
5
6.text
7.global test_sub64
8test_sub64:
9#ifdef CONFIG_32BIT
10	lw	a0, sub64
11#else
12	ld	a0, sub64
13#endif
14	addi	a0, a0, -32
15	ret
16first:
17	.space 32
18second:
19
20.data
21sub64:
22	.reloc		sub64, R_RISCV_ADD64, second
23	.reloc		sub64, R_RISCV_SUB64, first
24	.word		0
25	.word		0
26