From 0feda1d4af308f7bcba435e313fcc06ef2c59132 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 10 Apr 2025 00:58:00 -0400 Subject: tools/tests: Add tools and tests Signed-off-by: Ian Moffett --- tests/test.S | 12 ++++++++++++ tools/machchk.sh | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 tests/test.S create mode 100644 tools/machchk.sh diff --git a/tests/test.S b/tests/test.S new file mode 100644 index 0000000..df907a6 --- /dev/null +++ b/tests/test.S @@ -0,0 +1,12 @@ +#include + + .text + .globl _start +_start: + nop /* Debug start (step-in here) */ + movq $0xDEADBEEF, %rdx + nop /* Debug end, exit start (step-out here) */ + movq $SYS_EXIT, %rax + xor %rdi, %rdi + syscall + ud2 diff --git a/tools/machchk.sh b/tools/machchk.sh new file mode 100644 index 0000000..fc8952e --- /dev/null +++ b/tools/machchk.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +getdefs() { + gcc -dM -E -