On Wed, Sep 02, 2026 at 09:49:29AM -0700, Kees Cook wrote:
> +** movl \$-?[0-9]+, %r10d
> +** addl -4\((%r[a-z0-9]+)\), %r10d
> +** je .Lkcfi_call([0-9]+)
What is reason to use movl + addl instead of just cmpl?
I mean,
int foo (int *p) { return *p == 0x12345678; }
is compiled into
cmpl $305419896, (%rdi)
so I wonder why you can't just compare -4(%r11) with
a 32-bit immediate.
Are you trying to avoid the immediate to be present in the insn
sequence, so that nothing can do an indirect call to the insn after this
compare?
Jakub