The tests in C11 and C23 mode look the same right now but will change
soon.
The warnings in the C11 test disappeared because after the first error,
warnings about unused variables are suppressed by check_variable_usage,
as they are often wrong.
Not all variables that start with '.' are internals,
and unless they are explicitly flagged as internal should go
into .MAKEOVERRIDES
Update varname-dot-makeoverrides to check this.
Also avoid using SCOPE_CMDLINE when ReadOnly will do.
STRONG_ALIAS copies the symbol size and type, so it avoids warnings
like this:
/home/riastradh/netbsd/10/obj.vax/tooldir/bin/../lib/gcc/vax--netbsdelf/10.5.0/../../../../vax--netbsdelf/bin/ld: warning: type and size of dynamic symbol `ldexpl' are not defined
1. Instead of calling out VAX by name, use #ifdef NAN.
2. Verify signbit works on long double on all architectures, not just
those with __HAVE_LONG_DOUBLE which means long double is _larger_
than double.
3. Minor formatting tidying.
- KNF and add some newlines per blocks
- define and use proper bintobcd() macro
- make local functions and variables static
The same uboot.lif binaries are generated.
Conversion from uint64_t to long double should work on all ports,
including those where long double is the same as double, i.e., where
__HAVE_LONG_DOUBLE is undefined.
Instead, conditionalize the test cases on how many bits of precision
long double has in the significand, according to LDBL_MANT_DIG. The
conditionals here should handle binary128, powerpc double-dekker
(~106-bit precision), x86 extended precision (80-bit), m68k extended
precision (80-bit), and VAX D (56-bit).
If long double is the same as double, i.e., __HAVE_LONG_DOUBLE is
undefined, these tests should still pass, since they don't rely on
extra precision beyond double.
long double and LDBL_EPSILON work even on architectures where long
double is the same as double, i.e., where the confusingly named
__HAVE_LONG_DOUBLE is not defined.
cosl should always be defined even on architectures where long double
is the same as double so the confusingly named __HAVE_LONG_DOUBLE is
not defined.
__HAVE_LONG_DOUBLE just means long double is different from double.
This test should always pass on all ports, even if long double is the
same as double; it doesn't test any additional precision.
Also explicitly initialize sc->sc_status = HIL_STATUS_BUSY in hil_attach().
Previously hil_intr(9) returned immediately during 'cold', but
all interrupts are enabled at the end of configure() (actually
in MD cpu_configure()) and cold is cleared in confiugre2()
after configure(), so there is a small window when hil interrupts
can be triggered during cold.
It looks there is no problem to process hil_intr() before
hil_attach_deferre() is called via configure2() because
we already check 'sc->sc_status != HIL_STATUS_BUSY' on
processing a kthread.
Note this seems also to appease the similar panic on mame's hp9k370
emulation (though mame's emulation around DMAC looks still incomplete).
Should be pulled up to netbsd-10 and netbsd-9.
this reduces the size of the installed files by over half in most cases,
though the debug set size doesn't really change much (which looks like
close to 1GB of space on amd64 with xdebug installed, similar on arm64,
and about 600MB without xdebug.)
tested by running GDB on a few things, seems just as functional, on amd64,
arm64, and slightly on riscv64.
(first attempt for this feature used "gcc -gz=zlib", but that ends up
making CTF unhappy, but fortunately this works in binutils to create
the .debug files separate to any ctf usage of the main file.)
Otherwise, a pending signal may be delivered on the wrong stack when
we restore the signal mask.
While here:
- Move the botched sp and lr tests earlier.
PR lib/57946
Normally I don't like CHECK(A && B) and favour CHECK(A); CHECK(B)
instead, so you can see which one failed, but in this case the inputs
are displayed anyway so we don't lose anything unless the
floating-point printer is broken.
1. Exercise more edge cases around the largest exponent that can
represent non-integers.
2. - Verify modf can handle all cases modff can.
- Veriy modf can handle some cases modff can't.
- Verify modfl can handle all cases modf or modff can.
- If long double isn't just double, verify modfl can handle some
cases modf and modff can't.
3. Check infinities and NaN.
4. Verify oddness, i.e., modf(-x) = -modf(x).
5. Display more useful diagnostics in case any of this goes wrong.
While here, use CWARNFLAGS.clang instead of an explicit conditional.
In file included from 110_blorp_exec.c:33:
In file included from /home/source/ab/HEAD-llvm/xsrc/external/mit/MesaLib/dist/src/intel/blorp/blorp_genX_exec.h:27:
In file included from /home/source/ab/HEAD-llvm/xsrc/external/mit/MesaLib/dist/src/intel/blorp/blorp_priv.h:30:
/home/source/ab/HEAD-llvm/xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir.h:3840:3: error: redefinition of typedef 'nir_shader' is a C11 feature [-Werror,-Wtypedef-redefinition]
} nir_shader;
^
/home/source/ab/HEAD-llvm/xsrc/external/mit/MesaLib/dist/src/intel/compiler/brw_compiler.h:41:27: note: previous definition is here
typedef struct nir_shader nir_shader;
^
We should arrange to just have LDBL_NBIT unconditionally defined in the
appropriate MD header file, and make LDBL_IMPLICIT_NBIT an alias for
LDBL_NBIT==0. But for now this will do.
Seems likely that there are other parts of libm which would benefit
from being defined unconditionally in terms of ieee_ext_u, with
ieee_ext_u as an alias for ieee_double_u, in this scenario. But I
haven't gone looking yet.
This strtol(3) was introduced in rev 1.12 for PR/57909 after netbsd-10,
but it returns LONG_MAX (0x7FFFFFFF) for 0xFFF00000 on ILP32 hosts and
the wrong loadpoint causes "NOT ENOUGH MEMORY" error by the BOOTROMs
on loading uboot.lif on (at least) my 9000/360 and 9000/425t.