2 ### Class Macro68k: Implements m68k-only features for macro files #############
11 my $class = ref($proto) || $proto;
12 my $self = $class->SUPER::new
( @_ );
16 bless ($self, $class);
23 my $prototype = $params{'prototype'};
24 my $sfd = $self->{SFD
};
26 if ($$prototype{'type'} eq 'function') {
28 my $regs = join(',', @
{$$prototype{'regs'}});
29 my $argtypes = join(',', @
{$$prototype{'argtypes'}});
30 my $a4 = $regs =~ /a4/;
31 my $a5 = $regs =~ /a5/;
32 my $fp = $argtypes =~ /\(\*\)/;
38 $self->{FUNCARGTYPE
} = '';
39 for my $argtype (@
{$$prototype{'argtypes'}}) {
40 if ($argtype =~ /\(\*\)/) {
41 $self->{FUNCARGTYPE
} = $argtype;
46 printf " LP%d%s%s%s%s%s(0x%x, ", $$prototype{'numargs'},
47 $prototype->{nr
} ?
"NR" : "",
48 $prototype->{nb
} ?
"NB" : "",
49 $a4 ?
"A4" : "", $a5 ?
"A5" : "",
50 $self->{FUNCARGTYPE
} ne '' ?
"FP" : "",
53 if (!$prototype->{nr
}) {
54 print "$$prototype{'return'}, ";
57 print "$$prototype{'funcname'} ";
60 $self->SUPER::function_start
(@_);
68 my $prototype = $params{'prototype'};
70 if ($$prototype{'type'} eq 'function') {
71 my $argtype = $params{'argtype'};
72 my $argname = $params{'argname'};
73 my $argreg = $params{'argreg'};
75 if (!$self->{a4a5
} && ($argreg eq 'a4' || $argreg eq 'a5')) {
79 if ($argtype =~ /\(\*\)/) {
80 print ", __fpt, $argname, $argreg";
83 print ", $argtype, $argname, $argreg";
87 $self->SUPER::function_arg
(@_);