&mov ($magic,0x30);
&mov ($out,0);
- &mov ($const,&label("_vpaes_consts")."+0x30-".&label("pic_point"));
+ &lea ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
&call ("_vpaes_schedule_core");
&set_label("pic_point");
&and ($magic,32);
&xor ($magic,32); # nbist==192?0:32;
- &mov ($const,&label("_vpaes_consts")."+0x30-".&label("pic_point"));
+ &lea ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
&call ("_vpaes_schedule_core");
&set_label("pic_point");
&function_end("${PREFIX}_set_decrypt_key");
&function_begin("${PREFIX}_encrypt");
- &mov ($const,&label("_vpaes_consts")."+0x30-".&label("pic_point"));
+ &lea ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
&call ("_vpaes_preheat");
&set_label("pic_point");
&mov ($inp,&wparam(0)); # inp
&function_end("${PREFIX}_encrypt");
&function_begin("${PREFIX}_decrypt");
- &mov ($const,&label("_vpaes_consts")."+0x30-".&label("pic_point"));
+ &lea ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
&call ("_vpaes_preheat");
&set_label("pic_point");
&mov ($inp,&wparam(0)); # inp
&mov (&DWP(8,"esp"),$const); # save ivp
&mov ($out,$round); # $out works as $len
- &mov ($const,&label("_vpaes_consts")."+0x30-".&label("pic_point"));
+ &lea ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
&call ("_vpaes_preheat");
&set_label("pic_point");
&cmp ($magic,0);
# fix hexadecimal constants
for (@arg) { s/(?<![\w\$\.])0x([0-9a-f]+)/0$1h/oi; }
- if ($opcode !~ /movq/)
+ if ($opcode =~ /lea/ && @arg[1] =~ s/.*PTR\s+([^\[]+)$/$1/) # no []
+ { $opcode="mov"; }
+ elsif ($opcode !~ /movq/)
{ # fix xmm references
$arg[0] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[1]=~/\bxmm[0-7]\b/i);
$arg[1] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[0]=~/\bxmm[0-7]\b/i);