2018-08-31 11:48:26 +03:00
|
|
|
#include "core-isa.h"
|
|
|
|
|
2011-09-06 03:55:57 +04:00
|
|
|
.macro vector name
|
|
|
|
|
2019-02-18 17:04:51 +03:00
|
|
|
.section .vector.\name, "ax"
|
|
|
|
.global vector_\name
|
|
|
|
vector_\name\():
|
2011-09-06 03:55:57 +04:00
|
|
|
j 1f
|
2019-02-18 17:04:51 +03:00
|
|
|
.literal_position
|
2011-09-06 03:55:57 +04:00
|
|
|
1:
|
2019-02-18 17:04:51 +03:00
|
|
|
wsr a0, excsave1
|
|
|
|
movi a0, 1f
|
|
|
|
ret.n
|
|
|
|
|
|
|
|
.section .vector.\name\().text, "ax"
|
|
|
|
.literal_position
|
|
|
|
1:
|
|
|
|
rsr a0, excsave1
|
2011-09-06 03:55:57 +04:00
|
|
|
wsr a2, excsave1
|
|
|
|
movi a2, handler_\name
|
|
|
|
l32i a2, a2, 0
|
|
|
|
beqz a2, 1f
|
|
|
|
jx a2
|
|
|
|
1:
|
|
|
|
movi a3, 1b
|
|
|
|
movi a2, 1
|
|
|
|
simcall
|
|
|
|
|
|
|
|
.align 4
|
|
|
|
.global handler_\name
|
|
|
|
handler_\name\(): .word 0
|
|
|
|
|
|
|
|
.endm
|
|
|
|
|
2018-08-31 11:48:26 +03:00
|
|
|
#if XCHAL_HAVE_WINDOWED
|
2011-09-06 03:55:57 +04:00
|
|
|
vector window_overflow_4
|
|
|
|
vector window_overflow_8
|
|
|
|
vector window_overflow_12
|
|
|
|
vector window_underflow_4
|
|
|
|
vector window_underflow_8
|
|
|
|
vector window_underflow_12
|
2018-08-31 11:48:26 +03:00
|
|
|
#endif
|
2011-09-06 03:55:57 +04:00
|
|
|
|
2018-08-31 11:48:26 +03:00
|
|
|
#if XCHAL_NUM_INTLEVELS + XCHAL_HAVE_NMI >= 2
|
2011-09-06 03:55:57 +04:00
|
|
|
vector level2
|
2018-08-31 11:48:26 +03:00
|
|
|
#endif
|
|
|
|
#if XCHAL_NUM_INTLEVELS + XCHAL_HAVE_NMI >= 3
|
2011-09-06 03:55:57 +04:00
|
|
|
vector level3
|
2018-08-31 11:48:26 +03:00
|
|
|
#endif
|
|
|
|
#if XCHAL_NUM_INTLEVELS + XCHAL_HAVE_NMI >= 4
|
2011-09-06 03:55:57 +04:00
|
|
|
vector level4
|
2018-08-31 11:48:26 +03:00
|
|
|
#endif
|
|
|
|
#if XCHAL_NUM_INTLEVELS + XCHAL_HAVE_NMI >= 5
|
2011-09-06 03:55:57 +04:00
|
|
|
vector level5
|
2018-08-31 11:48:26 +03:00
|
|
|
#endif
|
|
|
|
#if XCHAL_NUM_INTLEVELS + XCHAL_HAVE_NMI >= 6
|
2011-09-06 03:55:57 +04:00
|
|
|
vector level6
|
2018-08-31 11:48:26 +03:00
|
|
|
#endif
|
|
|
|
#if XCHAL_NUM_INTLEVELS + XCHAL_HAVE_NMI >= 7
|
2011-09-06 03:55:57 +04:00
|
|
|
vector level7
|
2018-08-31 11:48:26 +03:00
|
|
|
#endif
|
2011-09-06 03:55:57 +04:00
|
|
|
|
|
|
|
vector kernel
|
|
|
|
vector user
|
|
|
|
vector double
|