/* Subroutines needed by GCC output code on some machines. */
/* Compile this file with the Unix C compiler! */
/* Define the C data type to use for an SImode value. */
/* Define the type to be used for returning an SF mode value
and the method for turning a float into that type.
These definitions work for machines where an SF value is
returned in the same register as an int. */
#define INTIFY(FLOATVAL) (intify.f = (FLOATVAL), intify.i)
union flt_or_int
{ int i
; float f
; };
/* This is used by the `assert' macro. */
__eprintf (string
, expression
, line
, filename
)
fprintf (stderr
, string
, expression
, line
, filename
);
#define HIGH_BIT_INT_COEFF (1 << (BITS_PER_WORD - 1))
#define HIGH_BIT_COEFF (2 * (double) (1 << (BITS_PER_WORD - 2)))
/* Convert large positive numbers to smaller ones,
then increase again after you have a fixed point number. */
return ((SItype
) (a
- HIGH_BIT_COEFF
)) + HIGH_BIT_INT_COEFF
;
return INTIFY (a
.f
+ b
.f
);
return INTIFY (a
.f
- b
.f
);
return INTIFY (a
.f
* b
.f
);
return INTIFY (a
.f
/ b
.f
);
int __avoid_ranlib_warning
; /* Don't let symbol table be empty. */
#if defined (sun) && defined (mc68000)
___bb_link (blocks
->filename
, blocks
->counts
, blocks
->ncounts
);
extern vfp __new_handler
;
vfp __new_handler
= default_new_handler
;
__builtin_vec_new (p
, maxindex
, size
, ctor
)
int i
, nelts
= maxindex
+ 1;
p
= (char *)__builtin_new (nelts
* size
);
for (i
= 0; i
< nelts
; i
++)
__set_new_handler (handler
)
prev_handler
= __new_handler
;
if (handler
== 0) handler
= default_new_handler
;
set_new_handler (handler
)
return __set_new_handler (handler
);
/* don't use fprintf (stderr, ...) because it may need to call malloc. */
write (2, "default_new_handler: out of memory... aaaiiiiiieeeeeeeeeeeeee!\n", 65);
/* don't call exit () because that may call global destructors which
__builtin_vec_delete (ptr
, maxindex
, size
, dtor
, auto_delete_vec
, auto_delete
)
int i
, nelts
= maxindex
+ 1;
for (i
= 0; i
< nelts
; i
++)
(*dtor
) (ptr
, auto_delete
);