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

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sw/] [common/] [crt0.S] - Diff between revs 61 and 62

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

Rev 61 Rev 62
Line 40... Line 40...
 
 
_start:
_start:
.cfi_startproc
.cfi_startproc
.cfi_undefined ra
.cfi_undefined ra
 
 
  nop
 
 
// ************************************************************************************************
 
// This is the very first instruction that is executed after hardware reset. It ensures that x0 is
 
// written at least once - the CPU HW will ensure it is always set to zero on any write access.
 
// ************************************************************************************************
 
  lui zero, 0 // "dummy" instruction that uses no reg-file input operands at all
 
 
 
 
// ************************************************************************************************
// ************************************************************************************************
// Setup pointers using linker script symbols
// Setup pointers using linker script symbols
// ************************************************************************************************
// ************************************************************************************************
__crt0_pointer_init:
__crt0_pointer_init:
Line 80... Line 86...
  csrw mcycleh,   zero
  csrw mcycleh,   zero
  csrw minstret,  zero                  // reset instruction counters
  csrw minstret,  zero                  // reset instruction counters
  csrw minstreth, zero
  csrw minstreth, zero
 
 
#if defined(__riscv_flen)
#if defined(__riscv_flen)
 
  li   x11, 0x00005000                  // enable FPU (state = initial)
 
  csrs mstatus, x11
  csrw fcsr, zero                       // reset floating-point CSR
  csrw fcsr, zero                       // reset floating-point CSR
#endif
#endif
 
 
 
 
// ************************************************************************************************
// ************************************************************************************************

powered by: WebSVN 2.1.0

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