Skip to content

Commit f7afa99

Browse files
Merge pull request #210 from hegza/fix/align-jump-targets
Align jump targets to 4 bytes
2 parents b23a94f + 858f2db commit f7afa99

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

riscv-rt/macros/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -483,12 +483,14 @@ fn vectored_interrupt_trap(arch: RiscvArch) -> TokenStream {
483483
core::arch::global_asm!(
484484
".section .trap, \"ax\"
485485
486+
.align 4
486487
.global _start_DefaultHandler_trap
487488
_start_DefaultHandler_trap:
488489
addi sp, sp, -{TRAP_SIZE} * {width} // allocate space for trap frame
489490
{store_start} // store trap partially (only register a0)
490491
la a0, DefaultHandler // load interrupt handler address into a0
491492
493+
.align 4
492494
.global _continue_interrupt_trap
493495
_continue_interrupt_trap:
494496
{store_continue} // store trap partially (all registers except a0)

0 commit comments

Comments
 (0)