diff options
author | Wojciech Kosior <kwojtus@protonmail.com> | 2020-09-21 13:43:29 +0200 |
---|---|---|
committer | Wojciech Kosior <kwojtus@protonmail.com> | 2020-09-21 13:43:29 +0200 |
commit | c75dcab5988f5c0b5e0629015f384e5aa1440690 (patch) | |
tree | 0fa4d4dece1a6710e62cf25bde4605918cf9f4a4 /tools/stack_machine_instruction.h | |
parent | f462785ee0894432e1e1d07793aba73b5ec20134 (diff) | |
download | AGH-engineering-thesis-c75dcab5988f5c0b5e0629015f384e5aa1440690.tar.gz AGH-engineering-thesis-c75dcab5988f5c0b5e0629015f384e5aa1440690.zip |
enable translation of few arithmetic operations (testbench included)
Diffstat (limited to 'tools/stack_machine_instruction.h')
-rw-r--r-- | tools/stack_machine_instruction.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/stack_machine_instruction.h b/tools/stack_machine_instruction.h index 5fd20fc..7b22c83 100644 --- a/tools/stack_machine_instruction.h +++ b/tools/stack_machine_instruction.h @@ -139,7 +139,10 @@ Y(tee, 0x1000) /* 0001_0000_0000_0000 */ Y(get_frame, 0x1001) /* 0001_0000_0000_0001 */ X(const, 0x5000) /* 0101_0000_0xxx_xxxx */ X(call, 0x5080) /* 0101_0000_1xxx_xxxx */ +Y(add, 0x3000) /* 0011_0000_0000_0000 */ Y(sub, 0x3001) /* 0011_0000_0000_0001 */ +Y(div, 0x3002) /* 0011_0000_0000_0010 */ +Y(mul, 0x3003) /* 0011_0000_0000_0011 */ Y(drop, 0x3004) /* 0011_0000_0000_0100 */ Y(ret, 0x3080) /* 0011_0000_1000_0000 */ Y(halt, 0x0000) /* 0000_0000_0000_0000 */ |