freebsd-skq/sys/amd64/include
rlibby 8099d86b7b amd64 atomic.h: minor codegen optimization in flag access
Previously the pattern to extract status flags from inline assembly
blocks was to use setcc in the block to write the flag to a register.
This was suboptimal in a few ways:
 - It would lead to code like: sete %cl; test %cl; jne, i.e. a flag
   would just be loaded into a register and then reloaded to a flag.
 - The setcc would force the block to use an additional register.
 - If the client code didn't care for the flag value then the setcc
   would be entirely pointless but could not be eliminated by the
   optimizer.

A more modern inline asm construct (since gcc 6 and clang 9) allows for
"flag output operands", where a C variable can be written directly from
a flag.  The optimizer can then use this to produce direct code where
the flag does not take a trip through a register.

In practice this makes each affected operation sequence shorter by five
bytes of instructions.  It's unlikely this has a measurable performance
impact.

Reviewed by:	kib, markj, mjg
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D23869
2020-02-28 18:32:36 +00:00
..
pc
xen
_align.h
_bus.h Regularize my copyright notice 2019-12-04 16:56:11 +00:00
_inttypes.h
_limits.h
_stdint.h
_types.h
acpica_machdep.h
apm_bios.h
asm.h amd64: Add CFI directives for libc syscall stubs 2019-10-23 19:03:03 +00:00
asmacros.h amd64: prevents speculations over swapgs reload of %gs base. 2019-08-06 16:53:25 +00:00
atomic.h amd64 atomic.h: minor codegen optimization in flag access 2020-02-28 18:32:36 +00:00
bus_dma.h
bus.h
clock.h
counter.h amd64: provide custom zpcpu set/add/sub routines 2020-02-12 11:15:33 +00:00
cpu.h
cpufunc.h amd64: plug spurious cld instructions 2019-10-08 21:14:11 +00:00
cputypes.h
csan.h Add kcsan_md_unsupported from NetBSD. 2019-11-21 13:22:23 +00:00
db_machdep.h
dump.h
efi.h amd64 ef_rt_arch_call: Preserve %rflags around call into EFI RT service. 2019-06-03 15:32:42 +00:00
elf.h
endian.h
exec.h
fdt.h
float.h
floatingpoint.h
fpu.h
frame.h
gdb_machdep.h gdb(4):amd64: Bump MI GDB_BUFSZ for more efficient transfers 2019-08-22 00:35:17 +00:00
ieeefp.h
in_cksum.h
intr_machdep.h
iodev.h
kdb.h
limits.h
md_var.h amd64: move pcb out of kstack to struct thread. 2019-10-25 20:09:42 +00:00
memdev.h
metadata.h
minidump.h
mp_watchdog.h
nexusvar.h
npx.h
ofw_machdep.h
param.h Define MAXCPU consistently between the kernel and KLDs. 2020-02-05 19:08:21 +00:00
pcb.h Provide dummy definition of the amd64 struct pcb for -m32 compilation. 2019-10-26 18:22:52 +00:00
pci_cfgreg.h
pcpu_aux.h amd64: move pcb out of kstack to struct thread. 2019-10-25 20:09:42 +00:00
pcpu.h amd64: provide custom zpcpu set/add/sub routines 2020-02-12 11:15:33 +00:00
pmap.h Introduce vm_page_astate. 2019-12-10 18:14:50 +00:00
pmc_mdep.h
ppireg.h
proc.h amd64: move pcb out of kstack to struct thread. 2019-10-25 20:09:42 +00:00
procctl.h
profile.h
psl.h
ptrace.h
pvclock.h
reg.h
reloc.h
resource.h
runq.h
segments.h amd64: move GDT into PCPU area. 2019-11-12 15:51:47 +00:00
setjmp.h
sf_buf.h
sgx.h
sgxreg.h
sigframe.h
signal.h
smp.h
specialreg.h
stack.h
stdarg.h
sysarch.h
timerreg.h
trap.h
tss.h amd64: move common_tss into pcpu. 2019-11-10 09:28:18 +00:00
ucontext.h
vdso.h
vm.h
vmm_dev.h Tie the name limit of a VM to SPECNAMELEN from devfs instead of a 2019-07-12 18:37:56 +00:00
vmm_instruction_emul.h
vmm.h bhyve: terminate waiting loops if thread suspension is requested. 2020-01-02 22:37:04 +00:00
vmparam.h Fix some nits in pmap_page_array_startup(). 2019-09-03 22:26:01 +00:00