mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
6df01ab8ab
The defs.h header will take care of including the various config.h headers. For now, it's just config.h, but we'll add more when we integrate gnulib in. This header should be used instead of config.h, and should be the first include in every .c file. We won't rely on the old behavior where we expected files to include the port's sim-main.h which then includes the common sim-basics.h which then includes config.h. We have a ton of code that includes things before sim-main.h, and it sometimes needs to be that way. Creating a dedicated header avoids the ordering mess and implicit inclusion that shows up otherwise.
36 lines
559 B
C
36 lines
559 B
C
/* CGEN fpu support
|
|
Copyright (C) 1999 Cygnus Solutions. */
|
|
|
|
/* This must come before any other includes. */
|
|
#include "defs.h"
|
|
|
|
#include "sim-main.h"
|
|
#include "sim-fpu.h"
|
|
|
|
/* Return boolean indicating if X is an snan. */
|
|
|
|
BI
|
|
cgen_sf_snan_p (CGEN_FPU* fpu, SF x)
|
|
{
|
|
sim_fpu op1;
|
|
|
|
sim_fpu_32to (&op1, x);
|
|
return sim_fpu_is_nan (&op1);
|
|
}
|
|
|
|
BI
|
|
cgen_df_snan_p (CGEN_FPU* fpu, DF x)
|
|
{
|
|
sim_fpu op1;
|
|
|
|
sim_fpu_64to (&op1, x);
|
|
return sim_fpu_is_nan (&op1);
|
|
}
|
|
|
|
/* No-op fpu error handler. */
|
|
|
|
void
|
|
cgen_fpu_ignore_errors (CGEN_FPU* fpu, int status)
|
|
{
|
|
}
|