1
0
mirror of https://github.com/j-core/j-core-ice40.git synced 2026-04-25 03:34:27 +00:00

Work around strange %pr bug in entry.c. Finally runs to C code

This commit is contained in:
J
2019-03-17 17:03:19 -04:00
parent d6d809c516
commit 2246a52244
3 changed files with 692 additions and 171 deletions

BIN
ram.img

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -141,6 +141,17 @@ __asm__(
" mov.l jsr_leds, r0\n"
" mov.l pio_addr, r1\n"
" mov.l r0, @r1\n"
" mov.l retjsr, r3\n"
" lds r3, pr\n"
" nop\n"
" nop\n"
"_njsr:\n"
" nop\n"
" nop\n"
" nop\n"
" nop\n"
" nop\n"
" nop\n"
" rts\n"
" nop\n"
""
@@ -153,10 +164,26 @@ __asm__(
" nop\n"
" mov.l start_leds, r0\n"
" mov.l pio_addr, r1\n"
" mov.l r0, @r1\n"
" mov.l r0, @r1\n"
" mov.l testjsr_k, r0\n"
" jmp @r0\n"
" nop\n"
"retloc:\n"
" nop\n"
" nop\n"
" mov.l njsr_k, r0\n"
" jsr @r0\n"
" nop\n"
" mov.l njsr_k, r2\n"
" jsr @r2\n"
" nop\n"
" mov.l njsr_k, r5\n"
" jsr @r5\n"
" nop\n"
" mov.l njsr_k, r10\n"
" jsr @r10\n"
" nop\n"
" nop\n"
" mov.l pio_addr, r1\n"
" mov.l start1_leds, r0\n"
" mov.l r0, @r1\n"
@@ -203,11 +230,13 @@ __asm__(
" mov.l testdiv_k, r0\n"
" jsr @r0\n"
" nop\n"
#endif
" mov.l testmacw_k, r0\n"
" jsr @r0\n"
" nop\n"
" mov.l testmacl_k, r0\n"
" jsr @r0\n"
#if 0
#endif /* NO_TESTS */
" nop\n"
" mov #0, r0\n"
@@ -237,6 +266,7 @@ __asm__(
"gdbstartup_k: .long _gdb_startup\n"
"gdbmonitor_k: .long _gdb_monitor\n"
"testjsr_k: .long _testjsr\n"
"njsr_k: .long _njsr\n"
#ifndef NO_TESTS
"testbra_k: .long _testbra\n"
"testmov_k: .long _testmov\n"
@@ -252,12 +282,15 @@ __asm__(
"testdmuls_k: .long _testdmuls\n"
"testmulconf_k: .long _testmulconf\n"
"testdiv_k: .long _testdiv\n"
#endif
"testmacw_k: .long _testmacw\n"
"testmacl_k: .long _testmacl\n"
#ifndef NO_TESTS
#endif /* NO_TESTS */
"pio_addr: .long 0xABCD0000\n"
"start_leds: .long 0x000000ff\n"
"start1_leds: .long 0x0000004f\n"
"jsr_leds: .long 0x00000011\n"
"retjsr: .long retloc\n"
);