diff options
| author | 2026-11-11 23:18:20 +0000 | |
|---|---|---|
| committer | 2026-11-13 23:20:02 +0000 | |
| commit | 9befbf0bf752173c43e81dff103ac15da9e99711 (patch) | |
| tree | af27330a4a35b749a07dedb5e439a9635ff58e7a /tools/x86test.c | |
| parent | 3b86c974e1ea8ccee355eee223b90d545a0c0f95 (diff) | |
| download | sst-9befbf0bf752173c43e81dff103ac15da9e99711.tar.gz sst-9befbf0bf752173c43e81dff103ac15da9e99711.zip | |
Remove old x86test program
It served its purpose long ago, and doesn't even build now. Can always
fish it out of history and clean it up if we ever need it again.
Diffstat (limited to 'tools/x86test.c')
| -rw-r--r-- | tools/x86test.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/tools/x86test.c b/tools/x86test.c deleted file mode 100644 index 18fc72f..0000000 --- a/tools/x86test.c +++ /dev/null @@ -1,43 +0,0 @@ -/* This file is dedicated to the public domain. */ - -#include <stdbool.h> -#include <stdio.h> - -#include "../src/udis86.h" -#include "../src/udis86.c" -#include "../src/intdefs.h" -#include "../src/x86.h" -#include "../src/x86.c" -#include "../src/os.h" -#include "../src/os.c" - -/* - * Quick hacked-up test program to more exhaustively test x86.c. This is not run - * as part of the build; it is just here for development and reference purposes. - */ - -int main(void) { - uchar buf[15]; - int bad = 0; - for (int i = 0; i < 100000000 && bad < 30; ++i) { - os_randombytes(buf, sizeof(buf)); - struct ud u; - ud_init(&u); - ud_set_mode(&u, 32); - ud_set_input_buffer(&u, buf, sizeof(buf)); - ud_set_syntax(&u, UD_SYN_INTEL); - int len = ud_disassemble(&u); - if (len && ud_insn_mnemonic(&u) != UD_Iinvalid) { - int mylen = x86_len(buf); - if (mylen != -1 && mylen != len) { - ++bad; - fprintf(stderr, "Uh oh! %s\nExp: %d\nGot: %d\nBytes:", - ud_insn_asm(&u), len, mylen); - for (int i = 0; i < len; ++i) fprintf(stderr, " %02X", buf[i]); - fputs("\n\n", stderr); - } - } - } - fprintf(stderr, "%d bad cases\n", bad); -} - |
