You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
#include "tconfig.h"
#include "machmode.h"
+#include "defaults.h"
#ifndef L_trampoline
#include <stddef.h>
#endif
#undef abort
#endif
+#if (SUPPORTS_WEAK == 1) && defined (ASM_OUTPUT_DEF)
+#define WEAK_ALIAS
+#endif
+
/* Permit the tm.h file to select the endianness to use just for this
file. This is used when the endianness is determined when the
compiler is run. */
DItype ll;
} DIunion;
-#if defined (L_udivmoddi4) || defined (L_muldi3) || defined (L_udiv_w_sdiv)
+#if (defined (L_udivmoddi4) || defined (L_muldi3) || defined (L_udiv_w_sdiv)\
+ || defined (L_divdi3) || defined (L_udivdi3) \
+ || defined (L_moddi3) || defined (L_umoddi3))
#include "longlong.h"
#endif
\f
#ifdef L_udiv_w_sdiv
+#if defined (sdiv_qrnnd)
USItype
__udiv_w_sdiv (rp, a1, a0, d)
USItype *rp, a1, a0, d;
*rp = r;
return q;
}
+#else
+/* If sdiv_qrnnd doesn't exist, define dummy __udiv_w_sdiv. */
+USItype
+__udiv_w_sdiv (rp, a1, a0, d)
+ USItype *rp, a1, a0, d;
+{}
+#endif
#endif
\f
+#if (defined (L_udivdi3) || defined (L_divdi3) || \
+ defined (L_umoddi3) || defined (L_moddi3))
+#define L_udivmoddi4
+#endif
+
#ifdef L_udivmoddi4
static const UQItype __clz_tab[] =
{
8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
};
+#if (defined (L_udivdi3) || defined (L_divdi3) || \
+ defined (L_umoddi3) || defined (L_moddi3))
+static inline
+#endif
UDItype
__udivmoddi4 (n, d, rp)
UDItype n, d;
#define HIGH_HALFWORD_COEFF (((UDItype) 1) << (WORD_SIZE / 2))
#define HIGH_WORD_COEFF (((UDItype) 1) << WORD_SIZE)
#define DI_SIZE (sizeof (DItype) * BITS_PER_UNIT)
-#if TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT
+
+/* Define codes for all the float formats that we know of. Note
+ that this is copied from real.h. */
+
+#define UNKNOWN_FLOAT_FORMAT 0
+#define IEEE_FLOAT_FORMAT 1
+#define VAX_FLOAT_FORMAT 2
+#define IBM_FLOAT_FORMAT 3
+
+/* Default to IEEE float if not specified. Nearly all machines use it. */
+#ifndef HOST_FLOAT_FORMAT
+#define HOST_FLOAT_FORMAT IEEE_FLOAT_FORMAT
+#endif
+
+#if HOST_FLOAT_FORMAT == IEEE_FLOAT_FORMAT
#define DF_SIZE 53
#define SF_SIZE 24
-#else
-#if TARGET_FLOAT_FORMAT == IBM_FLOAT_FORMAT
+#endif
+
+#if HOST_FLOAT_FORMAT == IBM_FLOAT_FORMAT
#define DF_SIZE 56
#define SF_SIZE 24
-#else
-#if TARGET_FLOAT_FORMAT == VAX_FLOAT_FORMAT
+#endif
+
+#if HOST_FLOAT_FORMAT == VAX_FLOAT_FORMAT
#define DF_SIZE 56
#define SF_SIZE 24
-#else
-#define DF_SIZE 0
-#define SF_SIZE 0
-#endif
-#endif
#endif
-
SFtype
__floatdisf (u)
DItype u;
#ifdef L__gcc_bcmp
/* Like bcmp except the sign is meaningful.
- Reult is negative if S1 is less than S2,
+ Result is negative if S1 is less than S2,
positive if S1 is greater, 0 if S1 and S2 are equal. */
int
#ifndef inhibit_libc
/* Simple minded basic block profiling output dumper for
- systems that don't provde tcov support. At present,
+ systems that don't provide tcov support. At present,
it requires atexit and stdio. */
#undef NULL /* Avoid errors if stdio.h and our stddef.h mismatch. */
extern vfp __new_handler;
extern void __default_new_handler (void);
+#ifdef WEAK_ALIAS
+void * __builtin_new (size_t sz)
+ __attribute__ ((weak, alias ("___builtin_new")));
+void *
+___builtin_new (size_t sz)
+#else
void *
__builtin_new (size_t sz)
+#endif
{
void *p;
vfp handler = (__new_handler) ? __new_handler : __default_new_handler;
extern void * __builtin_new (size_t);
+#ifdef WEAK_ALIAS
+void * __builtin_vec_new (size_t sz)
+ __attribute__ ((weak, alias ("___builtin_vec_new")));
+void *
+___builtin_vec_new (size_t sz)
+#else
void *
__builtin_vec_new (size_t sz)
+#endif
{
return __builtin_new (sz);
}
by C++ programs to return to the free store a block of memory allocated
as a single object. */
+#ifdef WEAK_ALIAS
+void __builtin_delete (void *ptr)
+ __attribute__ ((weak, alias ("___builtin_delete")));
+void
+___builtin_delete (void *ptr)
+#else
void
__builtin_delete (void *ptr)
+#endif
{
if (ptr)
free (ptr);
extern void __builtin_delete (void *);
+#ifdef WEAK_ALIAS
+void __builtin_vec_delete (void *ptr)
+ __attribute__ ((weak, alias ("___builtin_vec_delete")));
+void
+___builtin_vec_delete (void *ptr)
+#else
void
__builtin_vec_delete (void *ptr)
+#endif
{
__builtin_delete (ptr);
}
/* Some systems use __main in a way incompatible with its use in gcc, in these
cases use the macros NAME__MAIN to give a quoted symbol and SYMBOL__MAIN to
give the same symbol without quotes for an alternative entry point. You
- must define both, or niether. */
+ must define both, or neither. */
#ifndef NAME__MAIN
#define NAME__MAIN "__main"
#define SYMBOL__MAIN __main
return 0;
Assuming a correctly sorted table (ascending order) this routine should
- return the tighest match...
+ return the tightest match...
In the advent of a tie, we have to give the last entry, as it represents
an inner block.
/* Undo current frame */
asm("movl %ebp,%esp");
asm("popl %ebp");
- asm("# like ret, but stay here");
+ /* like ret, but stay here */
asm("addl $4,%esp");
/* Now, undo previous frame. */
/* This is a test routine, as we have to dynamically probe to find out
what to pop for certain, this is just a guess. */
asm("leal -16(%ebp),%esp");
- asm("pop %eax # really for popl %ebx");
- asm("pop %eax # really for popl %esi");
- asm("pop %eax # really for popl %edi");
+ asm("pop %eax"); /* really for popl %ebx */
+ asm("pop %eax"); /* really for popl %esi */
+ asm("pop %eax"); /* really for popl %edi */
asm("movl %ebp,%esp");
asm("popl %ebp");