Lines Matching refs:opcode

98 { package opcode;	# pick up opcodes  package
222 die if (opcode->mnemonic() ne "mov");
223 opcode->mnemonic("lea");
278 (opcode->mnemonic() =~ /^v?mov([qd])$/) && ($sz=$1) ||
279 (opcode->mnemonic() =~ /^v?pinsr([qdwb])$/) && ($sz=$1) ||
280 (opcode->mnemonic() =~ /^vpbroadcast([qdwb])$/) && ($sz=$1) ||
281 (opcode->mnemonic() =~ /^vinsert[fi]128$/) && ($sz="x");
421 if ($nasm && opcode->mnemonic()=~m/^j(?![re]cxz)/) {
434 my %opcode = # lea 2f-1f(%rip),%dst; 1: nop; 2:
453 $line=sprintf "0x%x,0x90000000",$opcode{$1};
669 local *opcode=shift;
674 push @opcode,($rex|0x40) if ($rex);
683 my @opcode=(0x66);
687 rex(\@opcode,$src,$dst,0x8);
688 push @opcode,0x0f,0x7e;
689 push @opcode,0xc0|(($src&7)<<3)|($dst&7); # ModR/M
690 @opcode;
694 rex(\@opcode,$src,$dst,0x8);
695 push @opcode,0x0f,0x6e;
696 push @opcode,0xc0|(($src&7)<<3)|($dst&7); # ModR/M
697 @opcode;
705 my @opcode=(0x66);
711 rex(\@opcode,$src,$dst);
712 push @opcode,0x0f,0x3a,0x16;
713 push @opcode,0xc0|(($src&7)<<3)|($dst&7); # ModR/M
714 push @opcode,$imm;
715 @opcode;
723 my @opcode=(0x66);
729 rex(\@opcode,$dst,$src);
730 push @opcode,0x0f,0x3a,0x22;
731 push @opcode,0xc0|(($dst&7)<<3)|($src&7); # ModR/M
732 push @opcode,$imm;
733 @opcode;
741 my @opcode=(0x66);
742 rex(\@opcode,$2,$1);
743 push @opcode,0x0f,0x38,0x00;
744 push @opcode,0xc0|($1&7)|(($2&7)<<3); # ModR/M
745 @opcode;
753 my @opcode=(0x66);
754 rex(\@opcode,$3,$2);
755 push @opcode,0x0f,0x3a,0x0f;
756 push @opcode,0xc0|($2&7)|(($3&7)<<3); # ModR/M
757 push @opcode,$1;
758 @opcode;
766 my @opcode=(0x66);
767 rex(\@opcode,$3,$2);
768 push @opcode,0x0f,0x3a,0x44;
769 push @opcode,0xc0|($2&7)|(($3&7)<<3); # ModR/M
771 push @opcode,$c=~/^0/?oct($c):$c;
772 @opcode;
780 my @opcode=();
783 rex(\@opcode,0,$1,8);
784 push @opcode,0x0f,0xc7,0xf0|($dst&7);
785 @opcode;
793 my @opcode=();
796 rex(\@opcode,0,$1,8);
797 push @opcode,0x0f,0xc7,0xf8|($dst&7);
798 @opcode;
805 local *opcode=shift;
812 push @opcode,$rxb;
817 my @opcode=(0x8f);
818 rxb(\@opcode,$3,$2,-1,0x08);
819 push @opcode,0x78,0xc2;
820 push @opcode,0xc0|($2&7)|(($3&7)<<3); # ModR/M
822 push @opcode,$c=~/^0/?oct($c):$c;
823 @opcode;
831 my @opcode=(0x8f);
832 rxb(\@opcode,$3,$2,-1,0x08);
833 push @opcode,0x78,0xc3;
834 push @opcode,0xc0|($2&7)|(($3&7)<<3); # ModR/M
836 push @opcode,$c=~/^0/?oct($c):$c;
837 @opcode;
868 undef $opcode;
875 } elsif ($opcode=opcode->re(\$line)) {
876 my $asm = eval("\$".$opcode->mnemonic());
887 if ($arg=register->re(\$line)) { opcode->size($arg->size()); }
902 my $sz=opcode->size();
905 $insn = $opcode->out($#args>=1?$args[$#args]->size():$sz);
909 $insn = $opcode->out();
919 undef $sz if ($nasm && $opcode->mnemonic() eq "lea");
929 printf "\t%s",$opcode->out();