2 ### Class MacroAROS: Implements AROS macro files ##############################
11 my $class = ref($proto) || $proto;
12 my $self = $class->SUPER::new
( @_ );
13 bless ($self, $class);
19 my $sfd = $self->{SFD
};
21 $self->SUPER::header
(@_);
23 print "#ifndef AROS_LIBCALL_H\n";
24 print "#include <aros/libcall.h>\n";
25 print "#endif /* !AROS_LIBCALL_H */\n";
28 if ($$sfd{'base'} ne '') {
29 print "#ifndef $self->{BASE}\n";
30 print "#define $self->{BASE} $$sfd{'base'}\n";
31 print "#endif /* !$self->{BASE} */\n";
39 my $prototype = $params{'prototype'};
40 my $sfd = $self->{SFD
};
42 if ($$prototype{'type'} eq 'function') {
43 printf " AROS_LC%d%s(%s, %s, \\\n",
44 $$prototype{'numargs'}, $prototype->{nb
} ?
"I" : "",
45 $$prototype{'return'}, $$prototype{'funcname'};
48 $self->SUPER::function_start
(@_);
56 my $prototype = $params{'prototype'};
58 if ($$prototype{'type'} eq 'function') {
59 my $argtype = $params{'argtype'};
60 my $argname = $params{'argname'};
61 my $argreg = $params{'argreg'};
63 print " AROS_LCA($argtype, ($argname), " . uc $argreg . "), \\\n";
66 $self->SUPER::function_arg
(@_);
73 my $prototype = $params{'prototype'};
74 my $sfd = $self->{SFD
};
76 if ($$prototype{'type'} eq 'function') {
77 if( !$prototype->{nb
}) {
78 print " $$sfd{'basetype'}, (___base), ";
84 for my $i (0 .. $#{$prototype->{regs}}) {
85 if ($prototype->{regs
}[$i] eq 'a6') {
86 $bt = $prototype->{argtypes
}[$i];
87 $bn =$prototype->{___argnames
}[$i];
95 print $$prototype{'bias'} / 6;
96 print ", $sfd->{Basename})\n";
99 $self->SUPER::function_end
(@_);