[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug in lm32 port

Am Friday 27 March 2009 07:31:17 schrieb Jukka Pietarinen:
> We could move both crt0 and _ISR_Handler to the .boot section. Wouldn't
> that work?
> I just noticed crt0 does use immediate call to boot_card...
moving crt0 to .boot should work, because there, we can use any register and 
can do
  mvhi r1, hi(boot_card)
  ori r1, r1, lo(boot_card)
  b r1

i got another idea for the isr: the linker could provide the address of the 
isr, so we can do something like this:
  lw r0, <address of pointer to _ISR_handler>
  b r0

in _ISR_handler the first operation then should be a
  xor r0, r0, r0

but i'm not sure how to provide that symbol with an linker script.


Don't cry because it is over, smile because it happened.