Open-code with-interrupt-mask, with-interrupts-reduced.
authorTaylor R Campbell <campbell@mumble.net>
Thu, 3 Jan 2019 19:10:45 +0000 (19:10 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Tue, 13 Aug 2019 14:37:03 +0000 (14:37 +0000)
commitf2384feb368d44e9b80a789239e8d3b1ad4df689
treed406922eb2fef30613e3dbc737f1017e4ecaa4e6
parent500ae9a5b856ddc8ea3ae03fa1d32b6efaa10de3
Open-code with-interrupt-mask, with-interrupts-reduced.

Not open-coded at the RTL level, but at the LAP level.

This way we avoid going through a return trampoline, which wrecks the
return address stack branch target predictor as long as we transition
between Scheme and C to handle trampolines.

Most of the work, of munging MEMTOP and STACK_GUARD, is relegated to
an assembly hook subroutine so the code doesn't expand too much.  The
format of the stack still uses reflect-to-interface so that this
should require no changes to the continuation parser to get the
interrupt masks right, but with an intermediate empty-frame
continuation that actually calls the assembly hook and then pops
reflect-to-interface off.
src/compiler/machines/x86-64/lapgen.scm
src/compiler/machines/x86-64/machin.scm
src/compiler/machines/x86-64/rules1.scm
src/compiler/machines/x86-64/rules3.scm
src/microcode/cmpauxmd/x86-64.m4
src/microcode/cmpint.c
src/microcode/cmpintmd/x86-64.c
src/microcode/cmpintmd/x86-64.h