summaryrefslogtreecommitdiff
path: root/as
diff options
context:
space:
mode:
Diffstat (limited to 'as')
-rw-r--r--as/Makefile11
-rw-r--r--as/as.l25
-rw-r--r--as/as.y36
-rw-r--r--as/x86.h38
4 files changed, 0 insertions, 110 deletions
diff --git a/as/Makefile b/as/Makefile
deleted file mode 100644
index 99fe9de..0000000
--- a/as/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-as: as.yy.o as.tab.o
- c99 -o $@ as.yy.o as.tab.o -ly -ll
-
-as.yy.c: as.l as.tab.h
- lex -t as.l > $@
-
-as.tab.h as.tab.c: as.y
- yacc -d -b as as.y
-
-clean:
- rm -f as *.o as.yy.c as.tab.c as.tab.h
diff --git a/as/as.l b/as/as.l
deleted file mode 100644
index 059b7c3..0000000
--- a/as/as.l
+++ /dev/null
@@ -1,25 +0,0 @@
-%{
-#include <inttypes.h>
-#include "as.tab.h"
-%}
-
-NONDIGIT [_a-zA-Z]
-DIGIT [0-9]
-IDENTIFIERS [_a-zA-Z0-9]
-
-%x COMMENT
-
-%%
-
-{DIGIT}+ { yylval.n = strtoumax(yytext, NULL, 10); return NUMBER; }
-
-{NONDIGIT}{IDENTIFIERS}* { yylval.s = yytext; return TOKEN; }
-
-:|,|\. { return yytext[0]; }
-\n { return NEWLINE; }
-
-; { BEGIN COMMENT; }
-<COMMENT>. ;
-<COMMENT>\n { BEGIN INITIAL; return NEWLINE; }
-
-. ;
diff --git a/as/as.y b/as/as.y
deleted file mode 100644
index ed8714f..0000000
--- a/as/as.y
+++ /dev/null
@@ -1,36 +0,0 @@
-%{
-#include <inttypes.h>
-%}
-
-%union {
- char *s;
- uintmax_t n;
-};
-
-%token<n> NUMBER
-%token<s> TOKEN
-%token NEWLINE
-
-%%
-
-program
- : /* empty */
- | instruction NEWLINE
-;
-
-instruction
- : bare_instruction
- | TOKEN ':' bare_instruction
-;
-
-bare_instruction
- : TOKEN
- | TOKEN operand
- | TOKEN operand ',' operand
- | TOKEN operand ',' operand ',' operand
-;
-
-operand
- : TOKEN
- | NUMBER
-;
diff --git a/as/x86.h b/as/x86.h
deleted file mode 100644
index 56bf639..0000000
--- a/as/x86.h
+++ /dev/null
@@ -1,38 +0,0 @@
-struct {
-const char *mnemonic;
-const char *opcode;
-char x32;
-char x64;
-} x86_opcodes[] = {
-{ "aaa", "37", 1, 0 },
-
-{ "aad", "d5 0a", 1, 0 },
-{ "aad imm8", "db ib", 1, 0 },
-
-{ "aam", "d4 0a", 1, 0 },
-{ "aam imm8", "d4 ib", 1, 0 },
-
-{ "aas", "3f" , 1, 0 },
-
-{ "adc al, imm8", "14 ib", 1, 1 },
-{ "adc ax, immm16", "15 iw", 1, 1 },
-{ "adc eax, imm32", "15 id", 1, 1 },
-{ "adc rax, imm32", "rex.w 15 id", 0, 1 },
-{ "adc r/m8, imm8", "80 /2 ib", 1, 1 },
-{ "adc r/m8*, imm8", "rex 80 /2 ib", 0, 1 },
-{ "adc r/m16, imm16", "81 /2 iw", 1, 1 },
-{ "adc r/m32, imm32", "81 /2 id", 1, 1 },
-{ "adc r/m64, imm32", "rex.w 81 /2 id", 0, 1 },
-{ "adc r/m16, imm8", "83 /2 ib", 1, 1 },
-{ "adc r/m32, imm8", "83 /2 ib", 1, 1 },
-{ "adc r/m64, imm8", "rex.w 83 /2 ib", 0, 1 },
-{ "adc r/m8, r8", "10 /r", 1, 1 },
-{ "adc r/m8*, r8*", "rex 10 /r", 0, 1 },
-{ "adc r/m16, r16", "11 /r", 1, 1 },
-{ "adc r/m32, r32", "11 /r", 1, 1 },
-{ "adc r/m64, r64", "rex.w 11 /r", 0, 1 },
-{ "adc r8, r/m8", "12 /r", 1, 1 },
-{ "adc r8*, r/m8*", "rex 12 /r", 0, 1 },
-{ "adc r16, r/m16", "13 /r", 1, 1 },
-{ "adc r32, r/m32", "13 /r", 1, 1 },
-{ "adc r64, r/m64", "rex.w 13 /r", 0, 1 },