scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 08d465302ea0806f1c0b95b873d5725592e1e8e3
parent 52e1fdda535e7bee18f092cc4c22d4f89eb67027
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon, 18 Dec 2017 23:01:30 +0100

[as] Add test.sh script

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

Diffstat:
Aas/test.sh | 29+++++++++++++++++++++++++++++
1 file changed, 29 insertions(+), 0 deletions(-)

diff --git a/as/test.sh b/as/test.sh @@ -0,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