Artifact bad8685b68144b2c0460f6d0bb68bae463a6168e:
- File ffcall/avcall/asmsparc.sh — part of check-in [24d3bc4776] at 2011-01-30 17:11:43 on branch trunk — Adding ffcall (and built files) (user: matt, size: 887) [annotate] [blame] [check-ins using] [more...]
- File ffcall/callback/trampoline_r/asmsparc.sh — part of check-in [24d3bc4776] at 2011-01-30 17:11:43 on branch trunk — Adding ffcall (and built files) (user: matt, size: 887) [annotate] [blame] [check-ins using]
- File ffcall/callback/vacall_r/asmsparc.sh — part of check-in [24d3bc4776] at 2011-01-30 17:11:43 on branch trunk — Adding ffcall (and built files) (user: matt, size: 887) [annotate] [blame] [check-ins using]
- File ffcall/trampoline/asmsparc.sh — part of check-in [24d3bc4776] at 2011-01-30 17:11:43 on branch trunk — Adding ffcall (and built files) (user: matt, size: 887) [annotate] [blame] [check-ins using]
- File ffcall/vacall/asmsparc.sh — part of check-in [24d3bc4776] at 2011-01-30 17:11:43 on branch trunk — Adding ffcall (and built files) (user: matt, size: 887) [annotate] [blame] [check-ins using]
#!/bin/sh # Translate the assembler syntax of sparc assembler programs # Usage: asmsparc < sunos4-asm-file > portable-asm-file # The portable-asm-file has to be # 1. preprocessed, # 2. grep -v '^ *#line' | grep -v '^#' # 3. sed -e 's,% ,%,g' -e 's,//.*$,,' -e 's,\$,#,g' tmpscript1=sed$$tmp1 tmpscript2=sed$$tmp2 tmpremove='rm -f $tmpscript1 $tmpscript2' trap "$tmpremove" 1 2 15 cat > $tmpscript1 << \EOF # ----------- Remove gcc self-identification /gcc2_compiled/d /gnu_compiled_c/d EOF cat > $tmpscript2 << \EOF # ----------- Turn # into $, to avoid trouble in preprocessing s,#,\$,g # ----------- Declare global symbols as functions (we have no variables) s/\.global _\([A-Za-z0-9_]*\)$/.global _\1\ DECLARE_FUNCTION(\1)/ # ----------- Global symbols depends on ASM_UNDERSCORE s/_\([A-Za-z0-9_:]*\)/C(\1)/ EOF sed -f $tmpscript1 | \ sed -f $tmpscript2 eval "$tmpremove"