shithub: scc

Download patch

ref: 32bc8b570e96d2735d23bba6375cb2d2443b2d85
parent: b5db11bdc0453df8725b2e62789ef41fa7b95d6b
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Mon Dec 18 18:01:30 EST 2017

[as] Add test.sh script

This script is added to help etsting that the code is doing the
correct work.

--- /dev/null
+++ b/as/test.sh
@@ -1,0 +1,29 @@
+#!/bin/sh
+
+set -e
+
+tmp1=`mktemp`
+tmp2=`mktemp`
+
+trap "rm -f a.out $tmp1 $tmp2" 0 2 3 
+
+./as-$cpu target/$cpu/test.s
+
+sed -n '/^\// ! {
+	s/.*\/ //
+	s/  */\
+/
+	w '$tmp1'
+}' target/$cpu/test.s
+
+../objdump/objdump |
+sed -n '/^data:/,$ {
+	/^data:/ ! {
+		s/.*: //
+		s/  */\
+/
+		w '$tmp2'
+	}
+}' 
+
+diff $tmp1 $tmp2 >/dev/null