Lines Matching +full:conditional +full:- +full:select
1 #!/usr/bin/perl -s
2 # SPDX-License-Identifier: GPL-2.0-or-later
12 # +1 (303) 786-7975
14 # Support for 53c710 (via -ncr7x0_family switch) added by Richard
15 # Hirst <[email protected]> - 15th March 1997
38 # XXX - set these with command line options
43 #$prefix; # (set by perl -s)
58 # XXX - replace references to the *_810 constants with general constants
62 # XXX - NCR53c710 only implements
141 $identifier = '[A-Za-z_][A-Za-z_0-9]*';
142 $decnum = '-?\\d+';
143 $hexnum = '0[xX][0-9A-Fa-f]+';
146 # yucky - since we can't control grouping of # $constant, we need to
149 $value = "$identifier|$identifier\\s*[+\-]\\s*$decnum|".
150 "$identifier\\s*[+-]\s*$hexnum|$constant";
158 # yucky - since %operators includes meta-characters which must
267 # &parse_conditional ($conditional) where $conditional is the conditional
271 local ($conditional) = @_;
272 if ($conditional =~ /^\s*(IF|WHEN)\s*(.*)/i) {
274 $conditional = $2;
290 if ($conditional =~ /^NOT\s+(.*)$/i) {
293 $conditional = $1;
302 if ($conditional =~ /^ATN\s*(.*)/i) {#
304 WHEN conditional is incompatible with ATN
307 $conditional = $1;
309 } elsif ($conditional =~ /^($phase)\s*(.*)/i) {
313 $conditional = $2;
321 if ($conditional =~ /^(AND|OR)\s*(.*)/i) {
323 $conditional = $2;
339 print STDERR "looking for data in $conditional\n" if ($debug);
340 if ($conditional=~ /^($value)\s*(.*)/i) {
342 $conditional = $2;
352 if ($conditional =~ /^\s*,\s*(.*)/) {
353 $conditional = $1;
354 if ($conditional =~ /^AND\s\s*MASK\s\s*($value)\s*(.*)/i) {
365 } elsif ($conditional !~ /^\s*$/) {
368 not \"$conditional\"
514 /^($register)\s+(-|$operator)\s+($value)\s*$/i) {
518 if ($op ne '-') {
521 die "- is not implemented yet.\n"
583 # Note that Move data8 to reg is encoded as a read-modify-write
617 # Process SELECT {ATN|} id, fail_address
618 } elsif (/^\s*(SELECT|RESELECT)\s+(.*)/i) {
643 expected SELECT id, alternate_address or
644 SELECT FROM address, alternate_address or
656 } elsif ($rest =~ /^(RESELECT|SELECT)\s+($identifier)\s*$/i) {
666 (target) WAIT SELECT alternate_address
733 expected , <conditional> or end of line, got $1
740 $conditional = $2;
744 if ($conditional =~ /^,\s*(.*)/) {
745 $conditional = $1;
746 &parse_conditional ($conditional);
747 } elsif ($conditional !~ /^\s*$/) {
750 expected , <conditional>
774 SELECT SET, or WAIT
860 # - The address of the reference should be in the second and last word
862 # - Relative jumps, etc. are relative to the DSP of the _next_ instruction
867 $tmp = $symbol_values{$label} -
872 relative/\n" if (($tmp >= 0x80_00_00) || ($tmp < -0x80_00_00));
886 print OUTPUT "/* DO NOT EDIT - Generated automatically by ".$_." */\n";