Add support for ENDBR instructions

These instructions are useful to support Intel Control-flow Enforcement Technology (CET),
when JIT code is called through idirect jump.

See `man gcc` "-fcf-protection" and https://www.felixcloutier.com/x86/endbr64
This commit is contained in:
Dmitry Stogov 2023-12-26 21:18:41 +03:00
parent c525bcb902
commit 413b1a803c

View File

@ -1151,6 +1151,8 @@ local map_op = {
rep_0 = "F3", rep_0 = "F3",
repe_0 = "F3", repe_0 = "F3",
repz_0 = "F3", repz_0 = "F3",
endbr32_0 = "F30F1EFB",
endbr64_0 = "F30F1EFA",
-- F4: *hlt -- F4: *hlt
cmc_0 = "F5", cmc_0 = "F5",
-- F6: test... mb,i; div... mb -- F6: test... mb,i; div... mb