Avoid CALL without RET for closure entries, hooks, and trampolines.
authorTaylor R Campbell <campbell@mumble.net>
Thu, 20 Dec 2018 04:58:07 +0000 (04:58 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Tue, 13 Aug 2019 14:37:02 +0000 (14:37 +0000)
commita6a461c06f036195c98bcf0f4f31bef7fe18859a
tree65fc356a31c7fa6d02c01cb1205d983e551dd554
parenta91ec28ab2a9097938d79699a37fa51f62234733
Avoid CALL without RET for closure entries, hooks, and trampolines.

This will wreck the CPU's return address branch target predictor.

This is an intermediate change en route to using paired CALL/RET for
continuation pushes and pop-returns in order to take advantage of the
CPU's branch target predictor.

WARNING: This changes the format of compiled closures, and as such,
new compiled code requires a new microcode and vice versa.
src/compiler/machines/x86-64/lapgen.scm
src/compiler/machines/x86-64/machin.scm
src/compiler/machines/x86-64/rules3.scm
src/microcode/cmpauxmd/x86-64.m4
src/microcode/cmpintmd/x86-64.c
src/microcode/cmpintmd/x86-64.h