diff options
author | Sebastian Andrzej Siewior <sebastian@breakpoint.cc> | 2022-05-19 21:51:18 +0200 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2022-05-24 13:17:06 +1000 |
commit | 5aa6e627953a4b3e96ea1f37b5ed71c9bb8c1e1b (patch) | |
tree | 923420ba6c26e5caef2e47304040b36f9af67895 /crypto/perlasm | |
parent | 6cfbb4b30f83df8db3262da8d070f9fa48a5b1bc (diff) |
x86asm: Generate endbr32 based on __CET__.
The VIA Nehemiah CPU is a x86-32 CPU without SSE2 support. It does not
support multi byte nops and considers the endb32 opcode as an invalid
instruction.
Add an ifdef around the endbr32 opcode on x86-32.
Fixes: #18334
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18353)
(cherry picked from commit 272138795ffa63d5811e985f98cac94acf658dbe)
Diffstat (limited to 'crypto/perlasm')
-rw-r--r-- | crypto/perlasm/x86asm.pl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/perlasm/x86asm.pl b/crypto/perlasm/x86asm.pl index be462cec6e..2ec16c5571 100644 --- a/crypto/perlasm/x86asm.pl +++ b/crypto/perlasm/x86asm.pl @@ -174,7 +174,9 @@ sub ::vprotd sub ::endbranch { + &::generic("#ifdef __CET__\n"); &::data_byte(0xf3,0x0f,0x1e,0xfb); + &::generic("#endif\n"); } # label management |