give a hand old assemblers assembling loop instruction. (original by Andy)
authorDr. Stephen Henson <steve@openssl.org>
Wed, 18 Jan 2012 14:54:20 +0000 (14:54 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 18 Jan 2012 14:54:20 +0000 (14:54 +0000)
crypto/perlasm/x86gas.pl

index d0b7ae27ae73d091a344d68a2e10e3153a62fa08..263182b9853d18f525fafbd56881b46e510a188b 100644 (file)
@@ -45,10 +45,8 @@ sub ::generic
     undef $suffix if ($dst =~ m/^%[xm]/o || $src =~ m/^%[xm]/o);
 
     if ($#_==0)                                { &::emit($opcode);             }
-    elsif ($opcode =~ m/^j/o && $#_==1)        { &::emit($opcode,@arg);        }
-    elsif ($opcode eq "call" && $#_==1)        { &::emit($opcode,@arg);        }
-    elsif ($opcode eq "clflush" && $#_==1){ &::emit($opcode,@arg);     }
-    elsif ($opcode =~ m/^set/&& $#_==1)        { &::emit($opcode,@arg);        }
+    elsif ($#_==1 && $opcode =~ m/^(call|clflush|j|loop|set)/o)
+                                       { &::emit($opcode,@arg);        }
     else                               { &::emit($opcode.$suffix,@arg);}
 
   1;