diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2025-04-24 00:21:02 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2025-04-24 00:21:02 +0200 |
commit | 23e0ccf7b5a0ccea545f231d35dbecc00011a9de (patch) | |
tree | fcabb2e084297bb51c2a12ee77404b891cca0df6 /x86-bare-metal/multiboot/scripts/check_sse.awk | |
parent | 20a854354918735c3289c5576a28fad18ca21757 (diff) | |
download | zig-playground-main.tar.gz zig-playground-main.zip |
Diffstat (limited to 'x86-bare-metal/multiboot/scripts/check_sse.awk')
-rw-r--r-- | x86-bare-metal/multiboot/scripts/check_sse.awk | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/x86-bare-metal/multiboot/scripts/check_sse.awk b/x86-bare-metal/multiboot/scripts/check_sse.awk new file mode 100644 index 0000000..91fb389 --- /dev/null +++ b/x86-bare-metal/multiboot/scripts/check_sse.awk @@ -0,0 +1,12 @@ +# Utility to check the disassembly for sse instructions. This uses a +# simple heuristic by checking if there are any usaged of xmm, ymm or +# zmm register. +# +# We want to build our kernel w/o sse instruction, as those first need +# to be enabled in the cpus control register as well the sse state +# needs to be initialized. + +/[xyz]mm[0-9]/ { + print "FAIL: no sse insns allowed in binary, found: "$0 + exit 1 +} |