Commit 81fb503d authored by agl@chromium.org's avatar agl@chromium.org

net: pickup "586" asm files for x86.

BUG=392745
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/385983006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282698 0039d316-1c4b-4281-b951-d872f2087c98
parent c0bf7c29
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
['OS == "linux" or OS == "android"', { ['OS == "linux" or OS == "android"', {
'sources': [ '<@(boringssl_linux_x86_sources)' ], 'sources': [ '<@(boringssl_linux_x86_sources)' ],
}], }],
['OS != "mac" and OS != "linux"', { ['OS != "mac" and OS != "linux" and OS != "android"', {
'defines': [ 'OPENSSL_NO_ASM' ], 'defines': [ 'OPENSSL_NO_ASM' ],
}], }],
] ]
...@@ -44,12 +44,12 @@ ...@@ -44,12 +44,12 @@
['OS == "win"', { ['OS == "win"', {
'sources': [ '<@(boringssl_win_x86_64_sources)' ], 'sources': [ '<@(boringssl_win_x86_64_sources)' ],
}], }],
['OS != "mac" and OS != "linux" and OS != "win"', { ['OS != "mac" and OS != "linux" and OS != "win" and OS != "android"', {
'defines': [ 'OPENSSL_NO_ASM' ], 'defines': [ 'OPENSSL_NO_ASM' ],
}], }],
] ]
}], }],
['target_arch != "arm" and target_arch != "x86" and target_arch != "x64"', { ['target_arch != "arm" and target_arch != "ia32" and target_arch != "x64"', {
'defines': [ 'OPENSSL_NO_ASM' ], 'defines': [ 'OPENSSL_NO_ASM' ],
}], }],
], ],
......
# Copyright 2014 The Chromium Authors. All rights reserved. # Copyright (c) 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
...@@ -325,11 +325,19 @@ ...@@ -325,11 +325,19 @@
'src/crypto/poly1305/poly1305_arm_asm.S', 'src/crypto/poly1305/poly1305_arm_asm.S',
], ],
'boringssl_linux_x86_sources': [ 'boringssl_linux_x86_sources': [
'linux-x86/crypto/aes/aes-586.S',
'linux-x86/crypto/aes/aesni-x86.S', 'linux-x86/crypto/aes/aesni-x86.S',
'linux-x86/crypto/aes/vpaes-x86.S', 'linux-x86/crypto/aes/vpaes-x86.S',
'linux-x86/crypto/bn/bn-586.S',
'linux-x86/crypto/bn/co-586.S',
'linux-x86/crypto/bn/x86-mont.S', 'linux-x86/crypto/bn/x86-mont.S',
'linux-x86/crypto/cpu-x86-asm.S', 'linux-x86/crypto/cpu-x86-asm.S',
'linux-x86/crypto/md5/md5-586.S',
'linux-x86/crypto/modes/ghash-x86.S', 'linux-x86/crypto/modes/ghash-x86.S',
'linux-x86/crypto/rc4/rc4-586.S',
'linux-x86/crypto/sha/sha1-586.S',
'linux-x86/crypto/sha/sha256-586.S',
'linux-x86/crypto/sha/sha512-586.S',
], ],
'boringssl_linux_x86_64_sources': [ 'boringssl_linux_x86_64_sources': [
'linux-x86_64/crypto/aes/aes-x86_64.S', 'linux-x86_64/crypto/aes/aes-x86_64.S',
...@@ -352,11 +360,19 @@ ...@@ -352,11 +360,19 @@
'linux-x86_64/crypto/sha/sha512-x86_64.S', 'linux-x86_64/crypto/sha/sha512-x86_64.S',
], ],
'boringssl_mac_x86_sources': [ 'boringssl_mac_x86_sources': [
'mac-x86/crypto/aes/aes-586.S',
'mac-x86/crypto/aes/aesni-x86.S', 'mac-x86/crypto/aes/aesni-x86.S',
'mac-x86/crypto/aes/vpaes-x86.S', 'mac-x86/crypto/aes/vpaes-x86.S',
'mac-x86/crypto/bn/bn-586.S',
'mac-x86/crypto/bn/co-586.S',
'mac-x86/crypto/bn/x86-mont.S', 'mac-x86/crypto/bn/x86-mont.S',
'mac-x86/crypto/cpu-x86-asm.S', 'mac-x86/crypto/cpu-x86-asm.S',
'mac-x86/crypto/md5/md5-586.S',
'mac-x86/crypto/modes/ghash-x86.S', 'mac-x86/crypto/modes/ghash-x86.S',
'mac-x86/crypto/rc4/rc4-586.S',
'mac-x86/crypto/sha/sha1-586.S',
'mac-x86/crypto/sha/sha256-586.S',
'mac-x86/crypto/sha/sha512-586.S',
], ],
'boringssl_mac_x86_64_sources': [ 'boringssl_mac_x86_64_sources': [
'mac-x86_64/crypto/aes/aes-x86_64.S', 'mac-x86_64/crypto/aes/aes-x86_64.S',
......
# Copyright 2014 The Chromium Authors. All rights reserved. # Copyright (c) 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -132,6 +132,20 @@ def PerlAsm(output_filename, input_filename, perlasm_style, extra_args): ...@@ -132,6 +132,20 @@ def PerlAsm(output_filename, input_filename, perlasm_style, extra_args):
out_file.write(output) out_file.write(output)
def ArchForAsmFilename(filename):
"""Returns the architecture that a given asm file should be compiled for
based on substrings in the filename."""
if 'x86_64' in filename or 'avx2' in filename:
return 'x86_64'
elif ('x86' in filename and 'x86_64' not in filename) or '586' in filename:
return 'x86'
elif 'arm' in filename:
return 'arm'
else:
raise ValueError('Unknown arch for asm filename: ' + filename)
def WriteAsmFiles(perlasms): def WriteAsmFiles(perlasms):
"""Generates asm files from perlasm directives for each supported OS x """Generates asm files from perlasm directives for each supported OS x
platform combination.""" platform combination."""
...@@ -150,15 +164,7 @@ def WriteAsmFiles(perlasms): ...@@ -150,15 +164,7 @@ def WriteAsmFiles(perlasms):
output = os.path.join(outDir, output[4:]) output = os.path.join(outDir, output[4:])
output = output.replace('${ASM_EXT}', asm_ext) output = output.replace('${ASM_EXT}', asm_ext)
found = False if arch == ArchForAsmFilename(filename):
if arch == 'x86_64' and ('x86_64' in filename or 'avx2' in filename):
found = True
elif arch == 'x86' and 'x86' in filename and 'x86_64' not in filename:
found = True
elif arch == 'arm' and 'arm' in filename:
found = True
if found:
PerlAsm(output, perlasm['input'], perlasm_style, perlasm['extra_args']) PerlAsm(output, perlasm['input'], perlasm_style, perlasm['extra_args'])
asmfiles.setdefault(key, []).append(output) asmfiles.setdefault(key, []).append(output)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment