xref: /linux/arch/riscv/kernel/tests/module_test/test_sub8.S (revision 0ea5c948cb64bab5bc7a5516774eb8536f05aa0d)
1*af71bc19SCharlie Jenkins/* SPDX-License-Identifier: GPL-2.0 */
2*af71bc19SCharlie Jenkins/*
3*af71bc19SCharlie Jenkins * Copyright (C) 2023 Rivos Inc.
4*af71bc19SCharlie Jenkins */
5*af71bc19SCharlie Jenkins
6*af71bc19SCharlie Jenkins.text
7*af71bc19SCharlie Jenkins.global test_sub8
8*af71bc19SCharlie Jenkinstest_sub8:
9*af71bc19SCharlie Jenkins	lb	a0, sub8
10*af71bc19SCharlie Jenkins	addi	a0, a0, -32
11*af71bc19SCharlie Jenkins	ret
12*af71bc19SCharlie Jenkinsfirst:
13*af71bc19SCharlie Jenkins	.space 32
14*af71bc19SCharlie Jenkinssecond:
15*af71bc19SCharlie Jenkins
16*af71bc19SCharlie Jenkins.data
17*af71bc19SCharlie Jenkinssub8:
18*af71bc19SCharlie Jenkins	.reloc		sub8, R_RISCV_ADD8, second
19*af71bc19SCharlie Jenkins	.reloc		sub8, R_RISCV_SUB8, first
20*af71bc19SCharlie Jenkins	.byte		0
21