summaryrefslogtreecommitdiff
path: root/bsp/hpmicro/hpm6750evkmini/startup/HPM6750/toolchains/gcc/port_gcc.S
blob: 6e8933bd7afd7a2f91bdd99a3410746d37a2a8bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * Copyright (c) 2021-2023 HPMicro
 *
 * SPDX-License-Identifier: BSD-3-Clause
 *
 */
#include "cpuport.h"
    .section .text.entry, "ax"
    .align  2
    .globl rt_hw_do_after_save_above
    .type rt_hw_do_after_save_above,@function
rt_hw_do_after_save_above:
    addi  sp, sp,  -4
    STORE ra,  0 * REGBYTES(sp)

    csrr    t1, mcause
    andi    t1, t1, 0x3FF
    /* get ISR */
    la      t2, trap_entry
    jalr    t2

    LOAD  ra,  0 * REGBYTES(sp)
    addi  sp, sp,  4
    ret