freebsd-dev/sys/i386
Bruce Evans 26ab2d1d23 Avoid an instruction in atomic_cmpset_{int_long)() in most cases.
These functions are used a lot for mutexes, so this reduces the text
size of an average kernel by about 0.75%.  This wasn't intended to
be a significant optimization, but it somehow increased the maximum
number of packets per second that can be transmitted by my bge hardware
from 320000 to 460000 (this benchmark is CPU-bound and remarkably
sensitive to changes in the text section).

Details: we would prefer to leave the result of the cmpxchg in %al,
but cannot tell gcc that it is there, so we have to convert it to an
integer register.  We converted  to %al, then to %[re]ax, but the
latter step is usually wasted since gcc usually only wants the condition
code and can recover it from %al just as easily as from %[re]ax.  Let
gcc promote %al in the few cases where this is needed.

Nearby style fixes;
- let gcc manage the load of `res', and don't abuse `res' for a copy of `exp'
- don't echo `res's name in comments
- consistently spell the condition code as 'e' after comparison for equality
- don't hard-code %al anywhere except in constraints
- for the version that doesn't use cmpxchg, there is no requirement to use
  %al anywhere, so don't hard-code it in the constraints either.

Style non-fix:
- for the versions that use cmpxchg, keep using "a" (was %[re]ax, now %al)
  for the main output operand, although this is not required.  The input
  and output operands that use the "a" constraint are now decoupled, and
  this makes things clearer except for the reason that the output register
  is hard-coded.  It is now just a hack to tell gcc that the input "a" has
  been clobbered without increasing the number of operands.
2006-12-27 20:26:00 +00:00
..
acpica Add missing acpi_wakecode.o: assym.s dependency, so that if assym.s 2006-10-19 05:55:09 +00:00
bios First part of a little cleanup in the calendar/timezone/RTC handling. 2006-10-02 12:59:59 +00:00
compile
conf Add msk(4) to the list of drivers supported by GENERIC kernel. 2006-12-13 03:41:47 +00:00
cpufreq Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
i386 Add a lwpid field into per-cpu structure, the lwpid represents current 2006-12-20 04:40:39 +00:00
ibcs2 Merge posix4/* into normal kernel hierarchy. 2006-11-11 16:26:58 +00:00
include Avoid an instruction in atomic_cmpset_{int_long)() in most cases. 2006-12-27 20:26:00 +00:00
isa Evidently FreeBSD has long relied on the compiler to treat structures 2006-12-17 05:07:01 +00:00
linux Regen (just to fix 'generated from' line from the previous commit). 2006-12-20 20:42:58 +00:00
pci Give Host-PCI bridge drivers their own pcib_alloc_msi() and 2006-12-12 19:27:01 +00:00
svr4 Use svr4_si_{addr,code,errno,signo,trap} in preference to si_{...}. 2005-10-19 14:59:54 +00:00
xbox - Fix typo in #error pragma: compitable -> compatible 2006-08-15 20:10:49 +00:00
Makefile