~ubuntu-branches/ubuntu/hardy/klibc/hardy-updates

« back to all changes in this revision

Viewing changes to klibc/arch/parisc/syscall.c

  • Committer: Bazaar Package Importer
  • Author(s): Jeff Bailey
  • Date: 2006-01-04 20:24:52 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060104202452-ec4v3n829rymukuv
Tags: 1.1.15-0ubuntu1
* New upstream version.

* Patch to fix compilation on parisc64 kernels.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * arch/parisc/syscall.c
3
 
 *
4
 
 * This function is called from a stub with %r20 already set up.
5
 
 * Compile this function with -ffixed-r20 so that it doesn't clobber
6
 
 * this register by mistake.
7
 
 */
8
 
 
9
 
#include <klibc/compiler.h>
10
 
#include <errno.h>
11
 
 
12
 
long __syscall_common(long a0, long a1, long a2, long a3, long a4, long a5)
13
 
{
14
 
  register unsigned long rv asm ("r28");
15
 
 
16
 
  asm volatile("\tble 0x100(%%sr2, %%r0)\n"
17
 
               : "=r" (rv)
18
 
               : "r" (a0), "r" (a1), "r" (a2), "r" (a3), "r" (a4), "r" (a5)
19
 
               : "%r1", "%r2", "%r29", "%r31");
20
 
 
21
 
  if ( __unlikely(rv >= -4095UL) ) {
22
 
    errno = -rv;
23
 
    return -1L;
24
 
  } else {
25
 
    return (long)rv;
26
 
  }
27
 
}
28
 
 
29