~joshrig/mipsfoo

f262e3d90fd5cc5e368f5ac190d821c99afc7cd5 — Joshua Lynch 11 months ago 35c4987
small code cleanup.
i don't know what a thunk is, so i removed it.
2 files changed, 6 insertions(+), 22 deletions(-)

M locore.S
M main.c
M locore.S => locore.S +5 -22
@@ 19,12 19,6 @@ _reset:
        di                              # disable interrupts
        ehb                             # hazard barrier

        ## sw      zero, (LATB)            # enable gpio port
        ## li      t3, 0x7                 # gpio mask
        ## sll     t3, t3, 8
        ## sw      t3, (TRISBCLR)          # set output pin direction
        ## sw      t3, (ANSELCLR)          # enable digital mode

        la      sp, _stack              # _stack is defined in the linker script
        la      gp, _gp                 # _gp is defined in the linker script



@@ 61,20 55,6 @@ _bss_check:
        mtc0    t1, _CP0_EBASE


        and     a0, a0, 0               # call main via a "thunk"
        and     a1, a1, 0
        la      t0, _main_entry
        jr      t0
        nop
        
        .end _reset
        .globl _reset
        .size _reset, .-_reset


        .ent _main_entry
_main_entry:

        and     a0, a0, 0
        and     a1, a1, 0
        la      t0, main


@@ 84,9 64,12 @@ _main_entry:
1:
        j       1b
        nop

        
        .end _main_entry
        
        .end _reset
        .globl _reset
        .size _reset, .-_reset

        
##         sw      zero, (LATB)            # enable gpio port


M main.c => main.c +1 -0
@@ 58,6 58,7 @@
#pragma config TSEQ =       0xffff
#pragma config CSEQ =       0x0

/* XXX this should be in kseg0 */
int main(int, int) __attribute__((section(".reset")));