summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/perlasm/x86unix.pl
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2005-04-29 05:39:09 +0000
committerdjm <djm@openbsd.org>2005-04-29 05:39:09 +0000
commit40d8aef356a70d0b13395f0805e3044b85d91347 (patch)
tree22edbfd34c49ce1b7988794a7a74d65829c13819 /lib/libcrypto/perlasm/x86unix.pl
parentimport of openssl-0.9.7g; tested on platforms from alpha to zaurus, ok deraadt@ (diff)
downloadwireguard-openbsd-40d8aef356a70d0b13395f0805e3044b85d91347.tar.xz
wireguard-openbsd-40d8aef356a70d0b13395f0805e3044b85d91347.zip
resolve conflicts
Diffstat (limited to 'lib/libcrypto/perlasm/x86unix.pl')
-rw-r--r--lib/libcrypto/perlasm/x86unix.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libcrypto/perlasm/x86unix.pl b/lib/libcrypto/perlasm/x86unix.pl
index 53ad5f49279..9717d185579 100644
--- a/lib/libcrypto/perlasm/x86unix.pl
+++ b/lib/libcrypto/perlasm/x86unix.pl
@@ -143,12 +143,12 @@ sub main'shl { &out2("sall",@_); }
sub main'shr { &out2("shrl",@_); }
sub main'xor { &out2("xorl",@_); }
sub main'xorb { &out2("xorb",@_); }
-sub main'add { &out2("addl",@_); }
+sub main'add { &out2($_[0]=~/%[a-d][lh]/?"addb":"addl",@_); }
sub main'adc { &out2("adcl",@_); }
sub main'sub { &out2("subl",@_); }
sub main'rotl { &out2("roll",@_); }
sub main'rotr { &out2("rorl",@_); }
-sub main'exch { &out2("xchg",@_); }
+sub main'exch { &out2($_[0]=~/%[a-d][lh]/?"xchgb":"xchgl",@_); }
sub main'cmp { &out2("cmpl",@_); }
sub main'lea { &out2("leal",@_); }
sub main'mul { &out1("mull",@_); }
@@ -170,7 +170,7 @@ sub main'jc { &out1("jc",@_); }
sub main'jnc { &out1("jnc",@_); }
sub main'jno { &out1("jno",@_); }
sub main'dec { &out1("decl",@_); }
-sub main'inc { &out1("incl",@_); }
+sub main'inc { &out1($_[0]=~/%[a-d][hl]/?"incb":"incl",@_); }
sub main'push { &out1("pushl",@_); $stack+=4; }
sub main'pop { &out1("popl",@_); $stack-=4; }
sub main'pushf { &out0("pushf"); $stack+=4; }
@@ -179,6 +179,7 @@ sub main'not { &out1("notl",@_); }
sub main'call { &out1("call",($_[0]=~/^\.L/?'':$under).$_[0]); }
sub main'ret { &out0("ret"); }
sub main'nop { &out0("nop"); }
+sub main'movz { &out2("movzbl",@_); }
# The bswapl instruction is new for the 486. Emulate if i386.
sub main'bswap