Merge tag 'qemu-macppc-20230206' of https://github.com/mcayland/qemu into staging
[qemu.git] / tests / tcg / nios2 / intr.S
blobc1730692ba260a29357ad526643f15740eb59240
1 /*
2  * Minimal Nios2 system boot code -- exit on interrupt.
3  *
4  * Copyright Linaro Ltd 2022
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  */
8 #include "semicall.h"
10         .section .text.intr, "ax"
11         .global _interrupt
12         .type   _interrupt, @function
14 _interrupt:
15         rdctl   r5, exception           /* extract exception.CAUSE */
16         srli    r5, r5, 2
17         movi    r4, HOSTED_EXIT
18         semihosting_call
20         .size   _interrupt, . - _interrupt
22         .text
23         .global _fast_tlb_miss
24         .type   _fast_tlb_miss, @function
26 _fast_tlb_miss:
27         movi    r5, 32
28         movi    r4, HOSTED_EXIT
29         semihosting_call
31         .size   _fast_tlb_miss, . - _fast_tlb_miss