#include <ppc_asm.tmpl>
#include <ppc_defs.h>
#include <syscall.h>

#define SYSCALL(name,n) \
	.globl name		; \
name:				; \
	li r0,n			; \
	sc			; \
	blr

	.text

	/*
         * Make sure these functions are in the same order as they
         * appear in the "include/syscall.h" header file !!!
	 */

	SYSCALL(mon_getc,SYSCALL_GETC)
	SYSCALL(mon_tstc,SYSCALL_TSTC)
	SYSCALL(mon_putc,SYSCALL_PUTC)
	SYSCALL(mon_puts,SYSCALL_PUTS)
	SYSCALL(mon_printf,SYSCALL_PRINTF)
	SYSCALL(mon_install_hdlr,SYSCALL_INSTALL_HDLR)
	SYSCALL(mon_free_hdlr,SYSCALL_FREE_HDLR)
	SYSCALL(mon_malloc,SYSCALL_MALLOC)
	SYSCALL(mon_free,SYSCALL_FREE)
