Don't do REG_E?AX combining with reg8/reg8x instructions, to allow things like

"ADD AX, byte 8" to generate the same code as NASM does (OT: this doesn't save
any space because the reg8x form needs a ModRM, but if it's what the user
wants, do it).

svn path=/trunk/yasm/; revision=353
0.3
Peter Johnson 24 years ago
parent 7a3761ac0c
commit bd921434cb
  1. 4
      modules/parsers/nasm/gen_instr.pl
  2. 4
      src/parsers/nasm/gen_instr.pl

@ -749,14 +749,14 @@ sub output_yacc ($@)
print GRAMMAR cond_action ($rule, $tokens, $count++, $regarg, 0, $func, $AL->[3], \@args);
}
elsif ($AX and ($inst->[OPERANDS]||"") =~ m/reg16,imm/)
elsif ($AX and ($inst->[OPERANDS]||"") =~ m/reg16,imm(16|16x)?$/)
{
$AX->[4] = 1;
my $regarg = get_token_number ($tokens, "reg16");
print GRAMMAR cond_action ($rule, $tokens, $count++, $regarg, 0, $func, $AX->[3], \@args);
}
elsif ($EAX and ($inst->[OPERANDS]||"") =~ m/reg32,imm/)
elsif ($EAX and ($inst->[OPERANDS]||"") =~ m/reg32,imm(32|32x)?$/)
{
$EAX->[4] = 1;
my $regarg = get_token_number ($tokens, "reg32");

@ -749,14 +749,14 @@ sub output_yacc ($@)
print GRAMMAR cond_action ($rule, $tokens, $count++, $regarg, 0, $func, $AL->[3], \@args);
}
elsif ($AX and ($inst->[OPERANDS]||"") =~ m/reg16,imm/)
elsif ($AX and ($inst->[OPERANDS]||"") =~ m/reg16,imm(16|16x)?$/)
{
$AX->[4] = 1;
my $regarg = get_token_number ($tokens, "reg16");
print GRAMMAR cond_action ($rule, $tokens, $count++, $regarg, 0, $func, $AX->[3], \@args);
}
elsif ($EAX and ($inst->[OPERANDS]||"") =~ m/reg32,imm/)
elsif ($EAX and ($inst->[OPERANDS]||"") =~ m/reg32,imm(32|32x)?$/)
{
$EAX->[4] = 1;
my $regarg = get_token_number ($tokens, "reg32");

Loading…
Cancel
Save