2
# Translate the assembler syntax of mips assembler programs
3
# Usage: asmmips < irix-asm-file > portable-asm-file
4
# The portable-asm-file has to be
6
# 2. grep -v '^ *#line' | grep -v '^#'
7
# 3. sed -e 's,% ,%,g' -e 's,//.*$,,'
11
tmpremove='rm -f $tmpscript1 $tmpscript2'
12
trap "$tmpremove" 1 2 15
14
cat > $tmpscript1 << \EOF
15
# ----------- Remove gcc self-identification
20
cat > $tmpscript2 << \EOF
21
# ----------- Remove comments, they would cause trouble in preprocessing
23
# ----------- Declare global symbols as functions (we have no variables)
24
s/\.globl \([A-Za-z0-9_]*\)$/.globl \1\
28
sed -f $tmpscript1 | \