From 6062716f1d2c580700960b0c9ca394429409c03c Mon Sep 17 00:00:00 2001 From: Mitchell Plamann Date: Sun, 22 Mar 2015 20:58:00 -0400 Subject: [PATCH] Added simple test programs --- test/iadd.c0 | 3 +++ test/iadd.c0.bc0 | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100755 test/iadd.c0 create mode 100755 test/iadd.c0.bc0 diff --git a/test/iadd.c0 b/test/iadd.c0 new file mode 100755 index 0000000..09ec0ab --- /dev/null +++ b/test/iadd.c0 @@ -0,0 +1,3 @@ +int main () { + return -1 + -1; +} diff --git a/test/iadd.c0.bc0 b/test/iadd.c0.bc0 new file mode 100755 index 0000000..1c63767 --- /dev/null +++ b/test/iadd.c0.bc0 @@ -0,0 +1,24 @@ +C0 C0 FF EE # magic number +00 09 # version 4, arch = 1 (64 bits) + +00 00 # int pool count +# int pool + +00 00 # string pool total size +# string pool + +00 01 # function count +# function_pool + +#
+00 00 # number of arguments = 0 +00 00 # number of local variables = 0 +00 06 # code length = 6 bytes +10 FF # bipush -1 # -1 +10 FF # bipush -1 # -1 +60 # iadd # (-(1) + -(1)) +B0 # return # + +00 00 # native count +# native pool +