2 ### Class StubAROS: Create an AROS stub file ##################################
11 my $class = ref($proto) || $proto;
12 my $self = $class->SUPER::new
( @_ );
13 bless ($self, $class);
20 $self->SUPER::header
(@_);
22 print "#include <aros/libcall.h>\n";
29 my $prototype = $params{'prototype'};
30 my $sfd = $self->{SFD
};
32 if ($prototype->{type
} eq 'function') {
36 if (!$prototype->{nb
}) {
37 print " BASE_EXT_DECL\n";
40 if (!$prototype->{nr
}) {
41 print " $prototype->{return} _res = ($prototype->{return}) ";
47 printf "AROS_LC%d%s($prototype->{return}, $prototype->{funcname},\n",
48 $prototype->{numargs
}, $prototype->{nb
} ?
"I" : "";
51 $self->SUPER::function_start
(@_);
58 my $prototype = $params{'prototype'};
59 my $argtype = $params{'argtype'};
60 my $argname = $params{'argname'};
61 my $argreg = $params{'argreg'};
62 my $argnum = $params{'argnum'};
63 my $sfd = $self->{SFD
};
65 if ($$prototype{'type'} eq 'function') {
66 print " AROS_LCA($argtype, $argname, " . (uc $argreg) . "),\n";
69 $self->SUPER::function_arg
(@_);
76 my $prototype = $params{'prototype'};
77 my $sfd = $self->{SFD
};
79 if ($$prototype{'type'} eq 'function') {
80 if ($prototype->{nb
}) {
84 for my $i (0 .. $#{$prototype->{regs}}) {
85 if ($prototype->{regs
}[$i] eq 'a6') {
86 $bt = $prototype->{argtypes
}[$i];
87 $bn =$prototype->{___argnames
}[$i];
92 printf " $bt, $bn, %d, $sfd->{Basename});\n",
93 $prototype->{bias
} / 6;
96 printf " $sfd->{basetype}, BASE_NAME, %d, $sfd->{Basename});\n",
97 $prototype->{bias
} / 6;
100 if (!$prototype->{nr
}) {
101 print " return _res;\n";
107 $self->SUPER::function_end
(@_);