Skip to content

Commit 62c8ffd

Browse files
committed
update alt vector support
1 parent 60f1236 commit 62c8ffd

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

include/nds/asminc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#endif // !__ASSEMBLER__
77

88

9-
.macro BEGIN_ASM_FUNC name
10-
.section .text.\name, "ax", %progbits
9+
.macro BEGIN_ASM_FUNC name section=text
10+
.section .\section\().\name\(), "ax", %progbits
1111
.global \name
1212
.type \name, %function
1313
.align 2

include/nds/system.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,12 @@ void setVectorBase(int highVector);
189189
See gbatek for more information.
190190
*/
191191
typedef struct sysVectors_t {
192-
u32 reset; //!< CPU reset.
193-
u32 undefined; //!< undefined instruction.
194-
u32 swi; //!< software interrupt.
195-
u32 prefetch_abort; //!< prefetch abort.
196-
u32 data_abort; //!< data abort.
197-
/* according to gbatek, there should be 4 bytes reserved and 4 bytes for normal interupt
198-
asuming the struct follows the memory layout?...*/
199-
u32 fiq; //!< fast interrupt.
192+
VoidFn reset; //!< CPU reset.
193+
VoidFn undefined; //!< undefined instruction.
194+
VoidFn swi; //!< software interrupt.
195+
VoidFn prefetch_abort; //!< prefetch abort.
196+
VoidFn data_abort; //!< data abort.
197+
VoidFn fiq; //!< fast interrupt.
200198
} sysVectors;
201199

202200

source/arm9/vectorbase.s

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727

2828
.global SystemVectors
2929

30+
.arm
31+
3032
ldr r15,vec_reset
3133
ldr r15,vec_undefined
3234
ldr r15,vec_swi
@@ -54,7 +56,7 @@ vec_fiq:
5456

5557

5658
@---------------------------------------------------------------------------------
57-
BEGIN_ASM_FUNC setVectorBase
59+
BEGIN_ASM_FUNC setVectorBase vectors
5860
@---------------------------------------------------------------------------------
5961

6062
@ load the CP15 Control Register

0 commit comments

Comments
 (0)