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
};
41 my $numargs = $$prototype{'numargs'};
43 if ($prototype->{nb
}) {
46 if ($$prototype{'type'} eq 'function') {
47 printf " AROS_LC%d%s(%s, %s, \\\n",
49 $$prototype{'return'} eq 'void'
50 || $$prototype{'return'} eq 'VOID' ?
"NR" : "",
51 $$prototype{'return'}, $$prototype{'funcname'};
54 $self->SUPER::function_start
(@_);
62 my $prototype = $params{'prototype'};
64 if ($$prototype{'type'} eq 'function') {
65 my $argreg = uc $params{'argreg'};
67 if ($argreg ne 'A6') {
68 my $argtype = $params{'argtype'};
69 my $argname = $params{'argname'};
71 print " AROS_LCA($argtype, ($argname), $argreg), \\\n";
75 $self->SUPER::function_arg
(@_);
82 my $prototype = $params{'prototype'};
83 my $sfd = $self->{SFD
};
85 if ($$prototype{'type'} eq 'function') {
86 if( !$prototype->{nb
}) {
87 print " $$sfd{'basetype'}, (___base), ";
93 for my $i (0 .. $#{$prototype->{regs}}) {
94 if ($prototype->{regs
}[$i] eq 'a6') {
95 $bt = $prototype->{argtypes
}[$i];
96 $bn =$prototype->{___argnames
}[$i];
104 print $$prototype{'bias'} / 6;
105 print ", $sfd->{Basename})\n";
108 $self->SUPER::function_end
(@_);