OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sw/] [common/] [crt0.S] - Diff between revs 58 and 59

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 58 Rev 59
Line 40... Line 40...
 
 
_start:
_start:
.cfi_startproc
.cfi_startproc
.cfi_undefined ra
.cfi_undefined ra
 
 
 
  nop
 
 
// *********************************************************
// *********************************************************
// Clear integer register file (lower half, assume E extension)
// Clear integer register file (lower half, assume E extension)
// *********************************************************
// *********************************************************
__crt0_reg_file_clear:
__crt0_reg_file_clear:
//addi  x0, x0, 0 // hardwired to zero
//addi  x0, x0, 0 // hardwired to zero
Line 208... Line 210...
// *********************************************************
// *********************************************************
// Go to endless sleep mode if main returns
// Go to endless sleep mode if main returns
// *********************************************************
// *********************************************************
__crt0_this_is_the_end:
__crt0_this_is_the_end:
  csrrci zero, mstatus, 8 // mstatus: disable global IRQs (MIE)
  csrrci zero, mstatus, 8 // mstatus: disable global IRQs (MIE)
  nop
 
  wfi
 
__crt0_this_is_the_end_my_friend:
__crt0_this_is_the_end_my_friend:
  j __crt0_this_is_the_end_my_friend // in case WFI is not available
  wfi
 
  j __crt0_this_is_the_end_my_friend
 
 
 
 
// *********************************************************
// *********************************************************
// dummy trap handler (for exceptions & IRQs)
// dummy trap handler (for exceptions & IRQs)
// tries to move on to next instruction
// tries to move on to next instruction

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.