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.
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.
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.
suitable for holding object pointers (ptrint_t -> uintptr_t).
Added corresponding signed type (intptr_t). Changed/added
corresponding non-C9x types for function pointers to match. Don't
use nonstandard types to implement these types, and don't comment
on them in <machine/types.h>.
cure the problems I was having with interrupts not being acknowledged
on time. This fixes a problem I observed where starting two ping -f
processes at 10Mbps would cause an adapter check due to TX GO commands
being issued before TXEOC interrupts were being acked.
Also fix a small problem with tl_start(): the mechanism I was using
to queue new packets onto the TX chain was bogus.
Change adapter check handler so that it resets card state after
tl_softreset() is stored.
Moved all EEPROM-related macro definitions into if_tlreg.h.
Don't allow an autoneg session to start until after the TX queue has
been drained, and don't transmit anything until after the autoneg
session is complete.
Also add support for two more Compaq ThunderLAN-based cards, and three
cards from Olicom which also use the ThunderLAN chip. The only thing
different about the Olicom cards is that they store the station address
at a different location within the EEPROM.
`len = min(so->so_snd.sb_cc, win) - off;'. min() has type u_int
and `off' has type int, so when min() is 0 and `off' is 1, the RHS
overflows to 0U - 1 = UINT_MAX. `len' has type long, so when
sizeof(long) == sizeof(int), the LHS normally overflows to to the
correct value of -1, but when sizeof(long) > sizeof(int), the LHS
is UINT_MAX.
Fixed some u_long's that should have been fixed-sized types.
mismatches exposed by this (the prototype for tcp_respond() didn't
match the function definition lexically, and still depends on a
gcc feature to match if ints have more than 32 bits).
sizeof(struct bpf_hdr) > 20. 20 is normal on 32-bit systems with
32-bit alignment, but we still assume that the last 2 bytes of the
struct are unnecessary padding on such systems. On systems with
64-bit longs, struct timeval is bloated to 16 bytes, so bpf headers
certainly don't fit in 18 bytes.
interupt level events. This needs a lot of cleanup, but has been working
here for a month or two.. originally needed for CAM integration
but that hasn't happenned yet. The probing state machines for each
handler should be replaced by a more generic state-service. It's
still quite messy in there..
Use them to `make gcc -Wformat' check formats for all printf-like
and scanf-like functions in /usr/src except for the err()/warn()
family. err() isn't quite printf-like since its format arg can
legitimately be NULL. syslog() isn't quite printf-like, but gcc
already accepts %m, even for plain printf() when it shouldn't.
hidden). Now "ticks" are used, which are 4 byte, not 8 byte in size.
The size mismatch did not matter due to sufficient padding at the end
of the structure that holds time stamps (there is an unused member).
The fix suggested by Bruce Evans used "sizeof (ticks_t)", but I prefer
to use "sizeof ticks", and didn't seem to object in his last mail on
this topic.
Submitted by: bde
mostly for objects that have the fewest dependencies on `Makefile'
(since they were mostly for utilities and objects generated from *.s
and these don't depend on profiling flags).
Give an explicit rule for building vnode_if.o. This fixes building
it without ${PROF}.
Use .ORDER instead of a stamp file to avoid building vnode_if.[ch]
concurrently.
Removed explicit dependencies that will be generated by `make' (.c.o)
or will be generated by mkdep.
Added missing dependencies of special objects on opt_global.h.
Use ${NORMAL_C} instead of special rules for special objects where
possible.
FIxed dependencies of vers.o.
just to ensure 32-bit variables. Doing so broke and/or pessimized
i386's with 64-bit longs (unnecessary use of 64-bit variables
caused remarkably few problems in C code, but the inline asm here
tended to fail because there are no 64-bit registers). Since the
interfaces here are very machine-dependent and shouldn't be used
outside of the kernel, use a standard types of "known" width instead
of fixed-width types.
Changed all quad_t's to u_int64_t's. quad_t isn't standard, and
using signed types for 64-bit registers was bogus (but made no
difference).
to ensure 32-bit variables. Doing so broke i386's with 64-bit
longs. Use fixed-size integral types instead of plain ints, shorts,
chars and pointers since the bootinfo struct layout is a binary
interface. The boot blocks could reasonably be implemented using
16-bit code.