about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-07-15 22:29:01 -0700
committerKartik Agaram <vc@akkartik.com>2018-07-15 22:29:01 -0700
commite1fcc521be3d2ec9e379b3baa974cb805386496d (patch)
tree0a4bdc3f2eb32d1dbbcb404ced0537a93efbaf31
parent8f64fc0a603c728348c14401dafbe2e10709a201 (diff)
downloadmu-e1fcc521be3d2ec9e379b3baa974cb805386496d.tar.gz
4349
-rwxr-xr-xsubx/ggdiff22
-rwxr-xr-xsubx/xdiff4
2 files changed, 26 insertions, 0 deletions
diff --git a/subx/ggdiff b/subx/ggdiff
new file mode 100755
index 00000000..e2263ec2
--- /dev/null
+++ b/subx/ggdiff
@@ -0,0 +1,22 @@
+#!/usr/bin/env zsh
+# git diff a specific example's generated binary after converting through xxd.
+
+if [ $# -eq 0 ]
+then
+  echo "ggdiff <target> [rev]"
+  exit 1
+fi
+
+target=$1
+rev=${2:-HEAD}
+
+tmp=`mktemp`
+
+if [[ $target == 'test'* ]]
+then
+  git show ${rev}:subx/teensy/$target > $tmp
+  xdiff $tmp teensy/$target
+else
+  git show ${rev}:subx/$target > $tmp
+  xdiff $tmp $target
+fi
diff --git a/subx/xdiff b/subx/xdiff
new file mode 100755
index 00000000..3e0c034d
--- /dev/null
+++ b/subx/xdiff
@@ -0,0 +1,4 @@
+#!/usr/bin/env zsh
+# Compare xxd output of two files.
+
+diff -u <(xxd $1) <(xxd $2)
ik/mu/blame/subx/opcodes?h=hlt&id=1ab48a69ccfa4ddaa2e1fa803ea6fe568b890abc'>^
417a05ee ^

5f3b3e7a ^
417a05ee ^
f15fcfe8 ^
417a05ee ^

a78deb23 ^
417a05ee ^
f15fcfe8 ^





417a05ee ^
be609279 ^
417a05ee ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102