Hi
I'm just starting out with or1k assembler and I've been reading through crt0.S 
in http://git.openrisc.net/cgit.cgi/stefan/orpsoc/tree/sw/drivers/or1200/crt0.S
Just one question, shouldn't 'l.addi  r5, r5, 4' be placed prior to 'l.bf    
1b'?
ENTRY(_start)

        /* Cache initialisation */
        l.jal _cache_init
        l.nop
        
        /* Clear BSS */
        LOAD_SYMBOL_2_GPR(r5, _bss_start)
        LOAD_SYMBOL_2_GPR(r6, _bss_end)
1:
        l.sw    (0)(r5), r0
        l.sfltu r5, r6
        l.bf    1b
        l.addi  r5, r5, 4
        
        /* Jump to main program entry point (argc = argv = 0) */
        CLEAR_GPR(r3)
        CLEAR_GPR(r4)
        l.jal   main
        l.nop
        
        /* If program exits, call exit routine */
        l.addi  r3, r11, 0
        l.jal   exit
        l.nop
CheersNick                                        
_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc

Reply via email to