mirror of
				https://github.com/netwide-assembler/nasm.git
				synced 2025-10-10 00:25:06 -04:00 
			
		
		
		
	inslist.pl: deal with the new encoding format
Make it possible for inslist.pl to understand the new encoding format; fix a few minor buglets.
This commit is contained in:
		| @@ -35,6 +35,7 @@ $line = 0; | |||||||
| $insns = 0; | $insns = 0; | ||||||
| while (<F>) { | while (<F>) { | ||||||
|   $line++; |   $line++; | ||||||
|  |   next if (/^\s*$/);		# blank lines | ||||||
|   if ( /^\s*;/ )		# comments |   if ( /^\s*;/ )		# comments | ||||||
|   { |   { | ||||||
|     if ( /^\s*;\#\s*(.+)/ )	# section subheader |     if ( /^\s*;\#\s*(.+)/ )	# section subheader | ||||||
| @@ -44,19 +45,21 @@ while (<F>) { | |||||||
|     next; |     next; | ||||||
|   } |   } | ||||||
|   chomp; |   chomp; | ||||||
|   my @entry = split; |   unless (/^\s*(\S+)\s+(\S+)\s+(\S+|\[.*\])\s+(\S+)\s*$/) { | ||||||
|   next if $#entry == -1; # blank lines |       warn "line $line does not contain four fields\n"; | ||||||
|   (warn "line $line does not contain four fields\n"), next if $#entry != 3; |       next; | ||||||
|  |   } | ||||||
|  |   my @entry = ($1, $2, $3, $4); | ||||||
|  |  | ||||||
|   @entry[1] =~ s/ignore//; |   $entry[1] =~ s/ignore//; | ||||||
|   @entry[1] =~ s/void//; |   $entry[1] =~ s/void//; | ||||||
|   @entry[3] =~ s/ignore//; |   $entry[3] =~ s/ignore//; | ||||||
|   @entry[3] =~ s/,SB//; |   $entry[3] =~ s/,SB//; | ||||||
|   @entry[3] =~ s/,SM//; |   $entry[3] =~ s/,SM//; | ||||||
|   @entry[3] =~ s/,SM2//; |   $entry[3] =~ s/,SM2//; | ||||||
|   @entry[3] =~ s/,SQ//; |   $entry[3] =~ s/,SQ//; | ||||||
|   @entry[3] =~ s/,AR2//; |   $entry[3] =~ s/,AR2//; | ||||||
|   printf S "\\c %-16s %-24s %s\n",@entry[0],@entry[1],@entry[3]; |   printf S "\\c %-16s %-24s %s\n",$entry[0],$entry[1],$entry[3]; | ||||||
|   $insns++; |   $insns++; | ||||||
| } | } | ||||||
| print S "\n"; | print S "\n"; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user