wdenk | d3163d3 | 2002-09-07 20:53:01 +0000 | [diff] [blame] | 1 | #include <ppc_asm.tmpl> |
| 2 | #include <ppc_defs.h> |
| 3 | #include <syscall.h> |
| 4 | |
| 5 | #ifdef CONFIG_ARM /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ |
| 6 | #warning ARM version not implemented yet /* XXXXXXXXXXXXXXXXXXXXXXXXXXXX */ |
| 7 | .global mon_getc |
| 8 | .type mon_getc,function |
| 9 | mon_getc: |
| 10 | .global mon_tstc |
| 11 | .type mon_tstc,function |
| 12 | mon_tstc: |
| 13 | .global mon_putc |
| 14 | .type mon_putc,function |
| 15 | mon_putc: |
| 16 | .global mon_puts |
| 17 | .type mon_puts,function |
| 18 | mon_puts: |
| 19 | .global mon_printf |
| 20 | .type mon_printf,function |
| 21 | mon_printf: |
| 22 | .global mon_install_hdlr |
| 23 | .type mon_install_hdlr,function |
| 24 | mon_install_hdlr: |
| 25 | .global mon_free_hdlr |
| 26 | .type mon_free_hdlr,function |
| 27 | mon_free_hdlr: |
| 28 | .global mon_malloc |
| 29 | .type mon_malloc,function |
| 30 | mon_malloc: |
| 31 | .global mon_free |
| 32 | .type mon_free,function |
| 33 | mon_free: |
| 34 | @ args = 0, pretend = 0, frame = 0 |
| 35 | @ frame_needed = 1, current_function_anonymous_args = 0 |
| 36 | mov ip, sp |
| 37 | stmfd sp!, {fp, ip, lr, pc} |
| 38 | sub fp, ip, #4 |
| 39 | ldmea fp, {fp, sp, pc} |
| 40 | #else /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ |
| 41 | #define SYSCALL(name,n) \ |
| 42 | .globl name ; \ |
| 43 | name: ; \ |
| 44 | li r0,n ; \ |
| 45 | sc ; \ |
| 46 | blr |
| 47 | |
| 48 | .text |
| 49 | |
| 50 | /* |
| 51 | * Make sure these functions are in the same order as they |
| 52 | * appear in the "include/syscall.h" header file !!! |
| 53 | */ |
| 54 | |
| 55 | SYSCALL(mon_getc,SYSCALL_GETC) |
| 56 | SYSCALL(mon_tstc,SYSCALL_TSTC) |
| 57 | SYSCALL(mon_putc,SYSCALL_PUTC) |
| 58 | SYSCALL(mon_puts,SYSCALL_PUTS) |
| 59 | SYSCALL(mon_printf,SYSCALL_PRINTF) |
| 60 | SYSCALL(mon_install_hdlr,SYSCALL_INSTALL_HDLR) |
| 61 | SYSCALL(mon_free_hdlr,SYSCALL_FREE_HDLR) |
| 62 | SYSCALL(mon_malloc,SYSCALL_MALLOC) |
| 63 | SYSCALL(mon_free,SYSCALL_FREE) |
| 64 | #endif /* CONFIG_ARM XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ |