2005-01-31 07:16:54 +03:00
|
|
|
sub start_file()
|
|
|
|
{
|
2005-02-08 22:27:32 +03:00
|
|
|
my $ret = "";
|
2005-01-31 07:16:54 +03:00
|
|
|
if ($IS64BIT == 1) {
|
|
|
|
$ret .= "\t.machine \"ppc64\"\n";
|
2005-02-10 03:06:54 +03:00
|
|
|
} else {
|
|
|
|
$ret .= "\t.machine \"ppc\"\n";
|
2005-01-31 07:16:54 +03:00
|
|
|
}
|
2005-02-08 22:27:32 +03:00
|
|
|
$ret .= "\t.toc\n";
|
2005-01-31 07:16:54 +03:00
|
|
|
return $ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sub start_func($)
|
|
|
|
{
|
|
|
|
my $func_name = shift;
|
|
|
|
my $ret = "";
|
|
|
|
|
|
|
|
$ret = "\t$GLOBAL $func_name\n";
|
|
|
|
$ret .= "\t$GLOBAL $GSYM$func_name\n";
|
|
|
|
$ret .= "\t.csect [DS],3\n";
|
|
|
|
|
|
|
|
$ret .= "$func_name$SUFFIX\n";
|
|
|
|
|
|
|
|
if ($IS64BIT == 1) {
|
2005-02-08 22:27:32 +03:00
|
|
|
$ret .= "\t.llong .$func_name, TOC[tc0], 0\n";
|
2005-01-31 07:16:54 +03:00
|
|
|
} else {
|
2005-02-08 22:27:32 +03:00
|
|
|
$ret .= "\t.long .$func_name, TOC[tc0], 0\n";
|
2005-01-31 07:16:54 +03:00
|
|
|
}
|
|
|
|
$ret .= "\t.csect [PR]\n";
|
|
|
|
|
|
|
|
$ret .= "\t.align 2\n";
|
|
|
|
$ret .= "$GSYM$func_name$SUFFIX\n";
|
|
|
|
|
|
|
|
return $ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sub end_func($)
|
|
|
|
{
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
|
|
|
1
|