#! /usr/bin/ruby # This script takes a text file describing function prologues and # emits a C file with the necessary C/assembly functions plus a # dejagnu ".exp" file to do several tests on each of the patterns. $filename_base = "gen-x86-prologues" ####### add_prototypes def add_prototype (str, pat) str + "void #{pat} (void);\n" + "void func_under_#{pat} (void);\n" end ####### add_main_call def add_main_call (str, pat) str + " #{pat} ();\n" end ####### add_function def add_function (str, pat, prologue, epilogue) t = <