These asm statments are not quite as pessimal as when I complained
about them in rev.1.9 of audio.c. They seem to be only 40% slower
than the C version on P5's and the same speed on K6's.
to int32_t's and all unsigned longs to u_int32_t's. Fixed the one
printf format broken by this. The old math emulator now compiles
cleanly on i386's with 64-bit longs. It may even work, provided
suword() doesn't actually write a long.
nearly so many casts here. Casting an pointer that was an integer
back to an integer just to compare it with -1 is bad, and casting
it back just to compare it with NULL is just wrong.
Access the entry address as a uintfptr_t, not as a long, and not
necessarily as what modload(8) passes (it takes a u_long from the
exec header and passes a u_int).
Fixed bitrot in K&R support (suword() now takes a long word).
Didn't fix corresponding bitrot in store.9 and fetch.9.
The correct types for the store and fetch families are problematic.
The `word' functions are unfortunately named and need to be split
to handle ints/longs/object pointers/function pointers. Storing
argv[] as longs is quite broken when longs are longer than pointers,
but usually works because it clobbers variables that will soon be
reinitialized.
Hopefully caddr_t is large enough to hold function pointers.
Cast object pointers to uintptr_t before casting them to u_long.
Types are wronger than usual for the PT_READ_U case. ptrace() can
only return ints, but longs are accessed.
attribute. It is like the existing "printf" archetype, except that
it doesn't complain if the format string is a null pointer. See
the node "Function Attributes" in the GCC info pages if you don't
know what this is all about.
This change will allow us to add format string checking for the
err(3) family of functions.
respectively. Most of the longs should probably have been
u_longs, but this changes is just to prevent warnings about
casts between pointers and integers of different sizes, not
to fix poorly chosen types.
FreeBSD does not have _POSIX_SAVED_IDS enabled. Thanks to Warner Losh
and Ollivier Robert for pointing this out, and Bruce Evans for explaining
the role of _POSIX_SAVED_IDS.
casting them to long, etc. Fixed some nearby printf bogons (sign
errors not warned about by gcc, and style bugs, but not truncation
of vm_ooffset_t's).
casting them to long, etc. Fixed some nearby printf bogons (sign
errors not warned about by gcc, and style bugs, but not truncation
of vm_ooffset_t's).
Use slightly less bogus casts for passing pointers to ddb command
functions.
to [u]intptr_t instead of to [u_]long.
Don't cast pointers to integers just to do ordinary pointer arithmetic
on them, especially when the casts use gcc's feature of casting lvalues.
them as ints. Among other bugs, doing so at best caused benign
overflow followed by fatal sign extension on machines with 32-bit
ints and 64-bit longs.