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'},
45 $$prototype{'return'} eq 'void'
46 || $$prototype{'return'} eq 'VOID' ?
"NR" : "",
47 $$prototype{'return'}, $$prototype{'funcname'};
50 $self->SUPER::function_start
(@_);
58 my $prototype = $params{'prototype'};
60 if ($$prototype{'type'} eq 'function') {
61 my $argtype = $params{'argtype'};
62 my $argname = $params{'argname'};
63 my $argreg = $params{'argreg'};
65 print " AROS_LCA($argtype, ($argname), " . uc $argreg . "), \\\n";
68 $self->SUPER::function_arg
(@_);
75 my $prototype = $params{'prototype'};
76 my $sfd = $self->{SFD
};
78 if ($$prototype{'type'} eq 'function') {
79 if( !$prototype->{nb
}) {
80 print " $$sfd{'basetype'}, (___base), ";
86 for my $i (0 .. $#{$prototype->{regs}}) {
87 if ($prototype->{regs
}[$i] eq 'a6') {
88 $bt = $prototype->{argtypes
}[$i];
89 $bn =$prototype->{___argnames
}[$i];
97 print $$prototype{'bias'} / 6;
98 print ", $sfd->{Basename})\n";
101 $self->SUPER::function_end
(@_);