syscall-template-sparc-sunos-5.3.S
Upload User: tsgydb
Upload Date: 2007-04-14
Package Size: 10674k
Code Size: 1k
Category:

MySQL

Development Platform:

Visual C++

  1. /* ==== syscall.S ============================================================
  2.  * Copyright (c) 1994 Chris Provenzano, proven@mit.edu
  3.  * All rights reserved.
  4.  *
  5.  */
  6. #ifndef lint
  7. .text
  8. .asciz "$Id$";
  9. #endif
  10.  
  11. #define _ASM
  12. #include <sys/syscall.h>
  13. /*
  14.  * Initial asm stuff for all functions.
  15.  */
  16. .text
  17. .align 4
  18. /* ==========================================================================
  19.  * error code for all syscalls. The error value is returned as the negative
  20.  * of the errno value.
  21.  */
  22. 1:
  23. sub %r0, %o0, %o0
  24. 2:
  25. retl
  26. nop
  27. #define concat2(a,b) a ## b
  28. #define concat(a,b) concat2(a,b)
  29. #define SYSval concat(SYS_,SYSCALL_NAME)
  30. #define procname concat(machdep_sys_,SYSCALL_NAME)
  31. .globl procname
  32. procname:
  33. mov SYSval, %g1
  34. ta 0
  35. bcs,a 2b
  36. sub %r0,%o0,%o0
  37. retl
  38. nop