/* ffs -- find first set bit in a word, counted from least significant end.
For Amd 290x0.
- Copyright (C) 1991 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
#undef ffs
+#ifdef __GNUC__
+
int
DEFUN(ffs, (x), int x)
{
return 32 - cnt;
}
+
+#else
+#include <sysdeps/generic/ffs.c>
+#endif
/* ffs -- find first set bit in a word, counted from least significant end.
For Motorola 88000.
- Copyright (C) 1991 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
#undef ffs
+#ifdef __GNUC__
+
int
DEFUN(ffs, (x), int x)
{
asm ("ff1 %0,%1" : "=r" (cnt) : "r" (x & -x));
return cnt + 1;
}
+
+#else
+#include <sysdeps/generic/ffs.c>
+#endif
/* ffs -- find first set bit in a word, counted from least significant end.
For IBM rs6000.
- Copyright (C) 1991 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
#undef ffs
+#ifdef __GNUC__
+
int
DEFUN(ffs, (x), int x)
{
asm ("cntlz %0,%1" : "=r" (cnt) : "r" (x & -x));
return 32 - cnt;
}
+
+#else
+#include <sysdeps/generic/ffs.c>
+#endif
/* hp300 4.3 BSD starts at 4, rather than 0, when the start address is 0.
Go figure. */
-asm(".globl __start\n"
- "__start: .long 0");
+asm(".globl __start");
+asm("__start: .long 0");
#define _start __start0
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88,
Copyright (c) 1980 Regents of the University of California.
#include <ansidecl.h>
#include <setjmp.h>
+#ifndef __GNUC__
+ #error This file uses GNU C extensions; you must compile with GCC.
+#endif
+
#define REI 02 /* Vax `rei' opcode. */
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88,
Copyright (c) 1980 Regents of the University of California.
#include <ansidecl.h>
#include <setjmp.h>
+#ifndef __GNUC__
+ #error This file uses GNU C extensions; you must compile with GCC.
+#endif
+
/* Save the current program position in ENV and return 0. */
int