summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--asmdiff.sh12
2 files changed, 14 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index cbe2e0812..22955a9aa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,4 +14,5 @@ __pychahe__/*
*.pyc
test.txt
*.xlsx
-src/test.c \ No newline at end of file
+src/test.c
+*.dump \ No newline at end of file
diff --git a/asmdiff.sh b/asmdiff.sh
new file mode 100644
index 000000000..2a7845e8b
--- /dev/null
+++ b/asmdiff.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+MIPS_BINUTILS="mips-linux-gnu-"
+
+OBJDUMP="${MIPS_BINUTILS}objdump -D -z -mmips -EB -j .text"
+
+FORMATTER="sed '/^0/!s/.*://'"
+
+$OBJDUMP build/src/test.o | sed '1,6d; /^0/!s/.*://' > test.dump
+$OBJDUMP $1 | sed '1,6d; /^0/!s/.*://' > comp.dump
+diff -y test.dump comp.dump > diff.dump
+rm test.dump comp.dump \ No newline at end of file