OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [cris/] [c/] [syscall1.c] - Diff between revs 24 and 157

Only display areas with differences | Details | Blame | View Log

Rev 24 Rev 157
/* Test unknown-syscall output.
/* Test unknown-syscall output.
#notarget: cris*-*-elf
#notarget: cris*-*-elf
#xerror:
#xerror:
#output: Unimplemented syscall: 166 (0x1, 0x2, 0x3, 0x4, 0x5, 0x6)\n
#output: Unimplemented syscall: 166 (0x1, 0x2, 0x3, 0x4, 0x5, 0x6)\n
#output: program stopped with signal 4.\n
#output: program stopped with signal 4.\n
*/
*/
 
 
#include <unistd.h>
#include <unistd.h>
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <errno.h>
#include <errno.h>
 
 
int main (void)
int main (void)
{
{
  /* The number 166 is chosen because there's a gap for that number in
  /* The number 166 is chosen because there's a gap for that number in
     the CRIS asm/unistd.h.  */
     the CRIS asm/unistd.h.  */
  int err = syscall (166, 1, 2, 3, 4, 5, 6);
  int err = syscall (166, 1, 2, 3, 4, 5, 6);
  if (err == -1 && errno == ENOSYS)
  if (err == -1 && errno == ENOSYS)
    printf ("ENOSYS\n");
    printf ("ENOSYS\n");
  printf ("xyzzy\n");
  printf ("xyzzy\n");
  exit (0);
  exit (0);
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.