diff --git a/DEPS b/DEPS index e821e85de3246..0b72d1e61b19e 100644 --- a/DEPS +++ b/DEPS @@ -20,10 +20,8 @@ vars = { 'chromium_git': 'https://chromium.googlesource.com', 'skia_revision': '2ced78866fcadd98895777c8dffe92e229775181', - 'angle_revision': '02df796f466cee47f42130bd8c7dbad6c72a1662', 'dart_revision': 'e5e3d161e70d862608e6597facdf5ac8ae9ab2c3', 'dart_observatory_packages_revision': 'cdc4b3d4c15b9c0c8e7702dff127b440afbb7485', - 'boringssl_revision': '7f15ff53d82a1991d6732d2303eb652b1cf7e023', 'buildtools_revision': '5215ee866bc3e8eb4a7f124212845abf4029e60b', @@ -58,9 +56,6 @@ deps = { 'src/testing/gmock': Var('chromium_git') + '/external/googlemock.git' + '@' + '29763965ab52f24565299976b936d1265cb6a271', - 'src/third_party/angle': - Var('chromium_git') + '/angle/angle.git' + '@' + Var('angle_revision'), - 'src/third_party/icu': Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'c3f79166089e5360c09e3053fce50e6e296c3204', @@ -81,18 +76,9 @@ deps = { 'src/third_party/libjpeg_turbo': Var('chromium_git') + '/chromium/deps/libjpeg_turbo.git' + '@' + 'f4631b6ee8b1dbb05e51ae335a7886f9ac598ab6', - 'src/third_party/smhasher/src': - Var('chromium_git') + '/external/smhasher.git' + '@' + 'e87738e57558e0ec472b2fc3a643b838e5b6e88f', - 'src/third_party/mesa/src': Var('chromium_git') + '/chromium/deps/mesa.git' + '@' + '071d25db04c23821a12a8b260ab9d96a097402f0', - 'src/third_party/boringssl/src': - 'https://boringssl.googlesource.com/boringssl.git' + '@' + Var('boringssl_revision'), - - 'src/third_party/requests/src': - Var('chromium_git') + '/external/github.com/kennethreitz/requests.git' + '@' + 'f172b30356d821d180fa4ecfa3e71c7274a32de4', - 'src/third_party/dart-pkg/archive': Var('chromium_git') + '/external/github.com/brendan-duncan/archive.git' + '@' + Var('archive_dart_revision'), @@ -150,9 +136,6 @@ deps_os = { 'src/third_party/robolectric/lib': Var('chromium_git') + '/chromium/third_party/robolectric.git' + '@' + '6b63c99a8b6967acdb42cbed0adb067c80efc810', - 'src/third_party/appurify-python/src': - Var('chromium_git') + '/external/github.com/appurify/appurify-python.git' + '@' + 'ee7abd5c5ae3106f72b2a0b9d2cb55094688e867', - 'src/third_party/freetype-android/src': Var('chromium_git') + '/chromium/src/third_party/freetype2.git' + '@' + 'e186230678ee8e4ea4ac4797ece8125761e3225a', }, diff --git a/crypto/BUILD.gn b/crypto/BUILD.gn index a81bfa8754954..190963170ac12 100644 --- a/crypto/BUILD.gn +++ b/crypto/BUILD.gn @@ -2,373 +2,13 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//build/config/crypto.gni") -import("//testing/test.gni") - -if (is_nacl) { - component("crypto") { - output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto. - sources = [ - "random.cc", - "random.h", - ] - deps = [ - "//base", - ] - } -} else { - component("crypto") { - output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto. - sources = [ - "aead_openssl.cc", - "aead_openssl.h", - "aes_128_gcm_helpers_nss.cc", - "aes_128_gcm_helpers_nss.h", - "apple_keychain.h", - "apple_keychain_ios.mm", - "apple_keychain_mac.mm", - "capi_util.cc", - "capi_util.h", - "crypto_export.h", - "cssm_init.cc", - "cssm_init.h", - "curve25519-donna.c", - "curve25519.cc", - "curve25519.h", - "ec_private_key.h", - "ec_private_key_nss.cc", - "ec_private_key_openssl.cc", - "ec_signature_creator.cc", - "ec_signature_creator.h", - "ec_signature_creator_impl.h", - "ec_signature_creator_nss.cc", - "ec_signature_creator_openssl.cc", - "encryptor.cc", - "encryptor.h", - "encryptor_nss.cc", - "encryptor_openssl.cc", - "ghash.cc", - "ghash.h", - "hkdf.cc", - "hkdf.h", - "hmac.cc", - "hmac.h", - "hmac_nss.cc", - "hmac_openssl.cc", - "mac_security_services_lock.cc", - "mac_security_services_lock.h", - - # TODO(brettw) these mocks should be moved to a test_support_crypto target - # if possible. - "mock_apple_keychain.cc", - "mock_apple_keychain.h", - "mock_apple_keychain_ios.cc", - "mock_apple_keychain_mac.cc", - "nss_key_util.cc", - "nss_key_util.h", - "nss_util.cc", - "nss_util.h", - "nss_util_internal.h", - "openssl_bio_string.cc", - "openssl_bio_string.h", - "openssl_util.cc", - "openssl_util.h", - "p224.cc", - "p224.h", - "p224_spake.cc", - "p224_spake.h", - "random.cc", - "random.h", - "rsa_private_key.cc", - "rsa_private_key.h", - "rsa_private_key_nss.cc", - "rsa_private_key_openssl.cc", - "scoped_capi_types.h", - "scoped_nss_types.h", - "secure_hash.h", - "secure_hash_default.cc", - "secure_hash_openssl.cc", - "secure_util.cc", - "secure_util.h", - "sha2.cc", - "sha2.h", - "signature_creator.h", - "signature_creator_nss.cc", - "signature_creator_openssl.cc", - "signature_verifier.h", - "signature_verifier_nss.cc", - "signature_verifier_openssl.cc", - "symmetric_key.h", - "symmetric_key_nss.cc", - "symmetric_key_openssl.cc", - "third_party/nss/chromium-blapi.h", - "third_party/nss/chromium-blapit.h", - "third_party/nss/chromium-nss.h", - "third_party/nss/chromium-sha256.h", - "third_party/nss/pk11akey.cc", - "third_party/nss/rsawrapr.c", - "third_party/nss/secsign.cc", - "third_party/nss/sha512.cc", - ] - - # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. - configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] - - deps = [ - ":platform", - "//base", - "//base/third_party/dynamic_annotations", - ] - - if (!is_mac && !is_ios) { - sources -= [ - "apple_keychain.h", - "mock_apple_keychain.cc", - "mock_apple_keychain.h", - ] - } - - if (!is_mac) { - sources -= [ - "cssm_init.cc", - "cssm_init.h", - "mac_security_services_lock.cc", - "mac_security_services_lock.h", - ] - } - if (!is_win) { - sources -= [ - "capi_util.cc", - "capi_util.h", - ] - } - - if (is_android) { - deps += [ "//third_party/android_tools:cpu_features" ] - } - - if (use_openssl) { - # Remove NSS files when using OpenSSL - sources -= [ - "aes_128_gcm_helpers_nss.cc", - "aes_128_gcm_helpers_nss.h", - "ec_private_key_nss.cc", - "ec_signature_creator_nss.cc", - "encryptor_nss.cc", - "hmac_nss.cc", - "rsa_private_key_nss.cc", - "secure_hash_default.cc", - "signature_creator_nss.cc", - "signature_verifier_nss.cc", - "symmetric_key_nss.cc", - "third_party/nss/chromium-blapi.h", - "third_party/nss/chromium-blapit.h", - "third_party/nss/chromium-nss.h", - "third_party/nss/pk11akey.cc", - "third_party/nss/rsawrapr.c", - "third_party/nss/secsign.cc", - ] - } else { - # Remove OpenSSL when using NSS. - sources -= [ - "aead_openssl.cc", - "aead_openssl.h", - "ec_private_key_openssl.cc", - "ec_signature_creator_openssl.cc", - "encryptor_openssl.cc", - "hmac_openssl.cc", - "openssl_bio_string.cc", - "openssl_bio_string.h", - "openssl_util.cc", - "openssl_util.h", - "rsa_private_key_openssl.cc", - "secure_hash_openssl.cc", - "signature_creator_openssl.cc", - "signature_verifier_openssl.cc", - "symmetric_key_openssl.cc", - ] - } - - # Some files are built when NSS is used at all, either for the internal crypto - # library or the platform certificate library. - if (use_openssl && !use_nss_certs) { - sources -= [ - "nss_key_util.cc", - "nss_key_util.h", - "nss_util.cc", - "nss_util.h", - "nss_util_internal.h", - ] - } - - defines = [ "CRYPTO_IMPLEMENTATION" ] - } -} - -# TODO(GYP): TODO(dpranke), fix the compile errors for this stuff -# and make it work. -if (false && is_win) { - # A minimal crypto subset for hmac-related stuff that small standalone - # targets can use to reduce code size on Windows. This does not depend on - # OpenSSL/NSS but will use Windows APIs for that functionality. - source_set("crypto_minimal_win") { - sources = [ - "crypto_export.h", - "hmac.cc", - "hmac.h", - "hmac_win.cc", - "scoped_capi_types.h", - "scoped_nss_types.h", - "secure_util.cc", - "secure_util.h", - "symmetric_key.h", - "symmetric_key_win.cc", - "third_party/nss/chromium-blapi.h", - "third_party/nss/chromium-sha256.h", - "third_party/nss/sha512.cc", - ] - - deps = [ - "//base", - "//base/third_party/dynamic_annotations", - ] - - defines = [ "CRYPTO_IMPLEMENTATION" ] - } -} - -test("crypto_unittests") { - sources = [ - # Tests. - "aes_128_gcm_helpers_nss_unittest.cc", - "curve25519_unittest.cc", - "ec_private_key_unittest.cc", - "ec_signature_creator_unittest.cc", - "encryptor_unittest.cc", - "ghash_unittest.cc", - "hkdf_unittest.cc", - "hmac_unittest.cc", - "nss_key_util_unittest.cc", - "nss_util_unittest.cc", - "openssl_bio_string_unittest.cc", - "p224_spake_unittest.cc", - "p224_unittest.cc", - "random_unittest.cc", - "rsa_private_key_unittest.cc", - "secure_hash_unittest.cc", - "sha2_unittest.cc", - "signature_creator_unittest.cc", - "signature_verifier_unittest.cc", - "symmetric_key_unittest.cc", - ] - - # Some files are built when NSS is used at all, either for the internal crypto - # library or the platform certificate library. - if (use_openssl && !use_nss_certs) { - sources -= [ - "nss_key_util_unittest.cc", - "nss_util_unittest.cc", - ] - } - - if (use_openssl) { - sources -= [ "aes_128_gcm_helpers_nss_unittest.cc" ] - } else { - sources -= [ "openssl_bio_string_unittest.cc" ] - } - - configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] - - deps = [ - ":crypto", - ":platform", - ":test_support", - "//base", - "//base/test:run_all_unittests", - "//base/test:test_support", - "//testing/gmock", - "//testing/gtest", - ] -} - -source_set("test_support") { +component("crypto") { + output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto. sources = [ - "scoped_test_nss_chromeos_user.cc", - "scoped_test_nss_chromeos_user.h", - "scoped_test_nss_db.cc", - "scoped_test_nss_db.h", - "scoped_test_system_nss_key_slot.cc", - "scoped_test_system_nss_key_slot.h", + "random.cc", + "random.h", ] deps = [ - ":crypto", - ":platform", "//base", ] - - if (!use_nss_certs) { - sources -= [ - "scoped_test_nss_db.cc", - "scoped_test_nss_db.h", - ] - } - - if (!is_chromeos) { - sources -= [ - "scoped_test_nss_chromeos_user.cc", - "scoped_test_nss_chromeos_user.h", - "scoped_test_system_nss_key_slot.cc", - "scoped_test_system_nss_key_slot.h", - ] - } -} - -config("platform_config") { - if ((!use_openssl || use_nss_certs) && is_clang) { - # There is a broken header guard in /usr/include/nss/secmod.h: - # https://bugzilla.mozilla.org/show_bug.cgi?id=884072 - cflags = [ "-Wno-header-guard" ] - } -} - -# This is a meta-target that forwards to NSS's SSL library or OpenSSL, -# according to the state of the crypto flags. A target just wanting to depend -# on the current SSL library should just depend on this. -group("platform") { - if (use_openssl) { - deps = [ - "//third_party/boringssl", - ] - } else { - deps = [ - "//net/third_party/nss/ssl:libssl", - ] - } - - # Link in NSS if it is used for either the internal crypto library - # (!use_openssl) or platform certificate library (use_nss_certs). - if (!use_openssl || use_nss_certs) { - if (is_linux) { - # On Linux, we use the system NSS (excepting SSL where we always use our - # own). - public_configs = [ ":platform_config" ] - if (!use_openssl) { - # If using a bundled copy of NSS's SSL library, ensure the bundled SSL - # header search path comes before the system one so our versions are - # used. The libssl target will add the search path we want, but - # according to GN's ordering rules, public_configs' search path will get - # applied before ones inherited from our dependencies. Therefore, we - # need to explicitly list our custom libssl's config here before the - # system one. - public_configs += [ "//net/third_party/nss/ssl:ssl_config" ] - } - public_configs += [ "//third_party/nss:system_nss_no_ssl_config" ] - } else { - # Non-Linux platforms use the hermetic NSS from the tree. - public_deps = [ - "//third_party/nss:nspr", - "//third_party/nss:nss", - ] - } - } } diff --git a/gpu/BUILD.gn b/gpu/BUILD.gn index 939e9e9e9f565..9de545803c341 100644 --- a/gpu/BUILD.gn +++ b/gpu/BUILD.gn @@ -2,39 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# GYP-to-GN project mappings: -# -# gpu.gyp:command_buffer_client => //gpu/command_buffer/client -# -# gpu.gyp:command_buffer_common => //gpu/command_buffer/common -# -# gpu.gyp:command_buffer_service => //gpu/command_buffer/service - -# gpu/gpu.gyp:gl_in_process_context => -# //gpu/command_buffer/client:gl_in_process_context -# -# gpu.gyp:gles2_cmd_helper => //gpu/command_buffer/client:gles2_cmd_helper -# -# gpu.gyp:gles2_c_lib => //gpu/command_buffer/client:gles2_c_lib -# -# gpu.gyp:gles2_implementation => -# //gpu/command_buffer/client:gles2_implementation -# -# gpu.gyp:gpu_config => //gpu/config -# -# -# gpu.gyp:disk_cache_proto => //gpu/command_buffer/service:disk_cache_proto -# -# command_buffer/command_buffer.gyp:gles2_utils => -# //gpu/command_buffer/common -# (Merged in to here because the separate file exists in GYP only to break -# a .gyp file dependency cycle which GN doesn't have.) -# -# gpu/skia_bindings/skia_bindings.gyp:gpu_skia_bindings => //gpu/skia_bindings - -import("//testing/test.gni") -import("//build/config/ui.gni") - config("gpu_implementation") { defines = [ "GPU_IMPLEMENTATION" ] } @@ -42,275 +9,7 @@ config("gpu_implementation") { component("gpu") { public_deps = [ "//gpu/command_buffer/client", - "//gpu/command_buffer/client:gles2_cmd_helper_sources", "//gpu/command_buffer/common", - "//gpu/command_buffer/service", "//gpu/config", ] } - -source_set("test_support") { - testonly = true - sources = [ - "command_buffer/client/gles2_interface_stub.cc", - "command_buffer/client/gles2_interface_stub.h", - "command_buffer/service/error_state_mock.cc", - "command_buffer/service/gles2_cmd_decoder_mock.cc", - ] - - configs += [ ":gpu_implementation" ] - - public_deps = [ - ":gpu", - "//gpu/command_buffer/client:gles2_interface", - ] - deps = [ - "//testing/gmock", - "//testing/gtest", - "//ui/gl:gl_unittest_utils", - ] -} - -test("gl_tests") { - sources = [ - "command_buffer/tests/compressed_texture_test.cc", - "command_buffer/tests/gl_bind_uniform_location_unittest.cc", - "command_buffer/tests/gl_chromium_framebuffer_multisample_unittest.cc", - "command_buffer/tests/gl_chromium_path_rendering_unittest.cc", - "command_buffer/tests/gl_clear_framebuffer_unittest.cc", - "command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc", - "command_buffer/tests/gl_depth_texture_unittest.cc", - "command_buffer/tests/gl_gpu_memory_buffer_unittest.cc", - "command_buffer/tests/gl_lose_context_chromium_unittest.cc", - "command_buffer/tests/gl_manager.cc", - "command_buffer/tests/gl_manager.h", - "command_buffer/tests/gl_pointcoord_unittest.cc", - "command_buffer/tests/gl_program_unittest.cc", - "command_buffer/tests/gl_query_unittest.cc", - "command_buffer/tests/gl_readback_unittest.cc", - "command_buffer/tests/gl_shared_resources_unittest.cc", - "command_buffer/tests/gl_stream_draw_unittest.cc", - "command_buffer/tests/gl_test_utils.cc", - "command_buffer/tests/gl_test_utils.h", - "command_buffer/tests/gl_tests_main.cc", - "command_buffer/tests/gl_texture_mailbox_unittest.cc", - "command_buffer/tests/gl_texture_storage_unittest.cc", - "command_buffer/tests/gl_unittest.cc", - "command_buffer/tests/gl_unittests_android.cc", - "command_buffer/tests/gl_virtual_contexts_unittest.cc", - "command_buffer/tests/occlusion_query_unittest.cc", - ] - - defines = [ "GL_GLEXT_PROTOTYPES" ] - - configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] - - deps = [ - ":gpu", - ":test_support", - "//base", - "//base/test:test_support", - "//base/third_party/dynamic_annotations", - "//testing/gmock", - "//testing/gtest", - "//third_party/angle:translator", - "//ui/gfx", - "//ui/gfx:test_support", - "//ui/gfx/geometry", - "//ui/gl", - "//gpu/command_buffer/common:gles2_utils", - "//gpu/command_buffer/client:gles2_c_lib", - "//gpu/command_buffer/client:gles2_implementation", - ] - - libs = [] - - if (is_android) { - deps += [ "//testing/android/native_test:native_test_native_code" ] - libs += [ "android" ] - } - - # TODO(GYP) - # ['OS == "win"', { - # 'dependencies': [ - # '../third_party/angle/src/build_angle.gyp:libEGL', - # '../third_party/angle/src/build_angle.gyp:libGLESv2', - # ], - # }], -} - -test("gpu_unittests") { - sources = [ - "command_buffer/client/buffer_tracker_unittest.cc", - "command_buffer/client/client_test_helper.cc", - "command_buffer/client/client_test_helper.h", - "command_buffer/client/cmd_buffer_helper_test.cc", - "command_buffer/client/fenced_allocator_test.cc", - "command_buffer/client/gles2_implementation_unittest.cc", - "command_buffer/client/mapped_memory_unittest.cc", - "command_buffer/client/program_info_manager_unittest.cc", - "command_buffer/client/query_tracker_unittest.cc", - "command_buffer/client/ring_buffer_test.cc", - "command_buffer/client/transfer_buffer_unittest.cc", - "command_buffer/client/vertex_array_object_manager_unittest.cc", - "command_buffer/common/bitfield_helpers_test.cc", - "command_buffer/common/command_buffer_mock.cc", - "command_buffer/common/command_buffer_mock.h", - "command_buffer/common/command_buffer_shared_test.cc", - "command_buffer/common/debug_marker_manager_unittest.cc", - "command_buffer/common/gles2_cmd_format_test.cc", - "command_buffer/common/gles2_cmd_format_test_autogen.h", - "command_buffer/common/gles2_cmd_utils_unittest.cc", - "command_buffer/common/id_allocator_test.cc", - "command_buffer/common/trace_event.h", - "command_buffer/common/unittest_main.cc", - "command_buffer/service/async_pixel_transfer_delegate_mock.cc", - "command_buffer/service/async_pixel_transfer_delegate_mock.h", - "command_buffer/service/async_pixel_transfer_manager_mock.cc", - "command_buffer/service/async_pixel_transfer_manager_mock.h", - "command_buffer/service/buffer_manager_unittest.cc", - "command_buffer/service/cmd_parser_test.cc", - "command_buffer/service/command_buffer_service_unittest.cc", - "command_buffer/service/common_decoder_unittest.cc", - "command_buffer/service/context_group_unittest.cc", - "command_buffer/service/feature_info_unittest.cc", - "command_buffer/service/framebuffer_manager_unittest.cc", - "command_buffer/service/gl_context_mock.cc", - "command_buffer/service/gl_context_mock.h", - "command_buffer/service/gl_surface_mock.cc", - "command_buffer/service/gl_surface_mock.h", - "command_buffer/service/gles2_cmd_decoder_unittest.cc", - "command_buffer/service/gles2_cmd_decoder_unittest.h", - "command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h", - "command_buffer/service/gles2_cmd_decoder_unittest_1.cc", - "command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h", - "command_buffer/service/gles2_cmd_decoder_unittest_2.cc", - "command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h", - "command_buffer/service/gles2_cmd_decoder_unittest_3.cc", - "command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h", - "command_buffer/service/gles2_cmd_decoder_unittest_async_pixel.cc", - "command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc", - "command_buffer/service/gles2_cmd_decoder_unittest_base.cc", - "command_buffer/service/gles2_cmd_decoder_unittest_base.h", - "command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc", - "command_buffer/service/gles2_cmd_decoder_unittest_context_lost.cc", - "command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc", - "command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc", - "command_buffer/service/gles2_cmd_decoder_unittest_extensions.cc", - "command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc", - "command_buffer/service/gles2_cmd_decoder_unittest_programs.cc", - "command_buffer/service/gles2_cmd_decoder_unittest_textures.cc", - "command_buffer/service/gles2_cmd_decoder_unittest_valuebuffer.cc", - "command_buffer/service/gpu_scheduler_unittest.cc", - "command_buffer/service/gpu_service_test.cc", - "command_buffer/service/gpu_service_test.h", - "command_buffer/service/gpu_tracer_unittest.cc", - "command_buffer/service/id_manager_unittest.cc", - "command_buffer/service/mailbox_manager_unittest.cc", - "command_buffer/service/memory_program_cache_unittest.cc", - "command_buffer/service/mocks.cc", - "command_buffer/service/mocks.h", - "command_buffer/service/program_cache_unittest.cc", - "command_buffer/service/program_manager_unittest.cc", - "command_buffer/service/query_manager_unittest.cc", - "command_buffer/service/renderbuffer_manager_unittest.cc", - "command_buffer/service/shader_manager_unittest.cc", - "command_buffer/service/shader_translator_cache_unittest.cc", - "command_buffer/service/shader_translator_unittest.cc", - "command_buffer/service/test_helper.cc", - "command_buffer/service/test_helper.h", - "command_buffer/service/texture_manager_unittest.cc", - "command_buffer/service/transfer_buffer_manager_unittest.cc", - "command_buffer/service/valuebuffer_manager_unittest.cc", - "command_buffer/service/vertex_array_manager_unittest.cc", - "command_buffer/service/vertex_attrib_manager_unittest.cc", - "config/gpu_blacklist_unittest.cc", - "config/gpu_control_list_entry_unittest.cc", - "config/gpu_control_list_number_info_unittest.cc", - "config/gpu_control_list_os_info_unittest.cc", - "config/gpu_control_list_unittest.cc", - "config/gpu_control_list_version_info_unittest.cc", - "config/gpu_driver_bug_list_unittest.cc", - "config/gpu_info_collector_unittest.cc", - "config/gpu_info_unittest.cc", - "config/gpu_test_config_unittest.cc", - "config/gpu_test_expectations_parser_unittest.cc", - "config/gpu_util_unittest.cc", - ] - - configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] - - deps = [ - ":gpu", - ":test_support", - "//base", - "//base/test:test_support", - "//base/third_party/dynamic_annotations", - "//testing/gmock", - "//testing/gtest", - "//third_party/angle:translator", - "//ui/gfx", - "//ui/gfx:test_support", - "//ui/gfx/geometry", - "//ui/gl", - "//gpu/command_buffer/common:gles2_utils", - "//gpu/command_buffer/client:gles2_c_lib", - "//gpu/command_buffer/client:gles2_implementation", - ] -} - -test("gpu_perftests") { - sources = [ - "perftests/measurements.cc", - "perftests/run_all_tests.cc", - "perftests/texture_upload_perftest.cc", - ] - - deps = [ - "//base", - "//base/test:test_support", - "//gpu/command_buffer/service", - "//testing/gmock", - "//testing/gtest", - "//testing/perf", - "//ui/gfx/geometry", - "//ui/gl", - ] -} - -test("angle_unittests") { - sources = [ - "angle_unittest_main.cc", - ] - - deps = [ - "//base", - "//base/test:test_support", - "//base/third_party/dynamic_annotations", - "//testing/gmock", - "//testing/gtest", - "//third_party/angle:translator_static", - ] -} - -if (is_linux && target_cpu != "arm" && use_x11) { - executable("compositor_model_bench") { - sources = [ - "tools/compositor_model_bench/compositor_model_bench.cc", - "tools/compositor_model_bench/forward_render_model.cc", - "tools/compositor_model_bench/render_model_utils.cc", - "tools/compositor_model_bench/render_models.cc", - "tools/compositor_model_bench/render_tree.cc", - "tools/compositor_model_bench/shaders.cc", - ] - - libs = [ "GL" ] - - configs += [ "//build/config/linux:x11" ] - - deps = [ - "//base", - "//ui/gl", - ] - } -} diff --git a/sky/engine/bindings/BUILD.gn b/sky/engine/bindings/BUILD.gn index d8133936962b1..03a429974c05d 100644 --- a/sky/engine/bindings/BUILD.gn +++ b/sky/engine/bindings/BUILD.gn @@ -385,7 +385,6 @@ source_set("generated_bindings") { "//skia", "//sky/engine/core:core_names", "//sky/engine/wtf", - "//third_party/angle:translator", "//third_party/iccjpeg", "//third_party/libpng", "//third_party/ots", diff --git a/sky/engine/core/BUILD.gn b/sky/engine/core/BUILD.gn index 69624dc08bb01..eb7c730fc59d9 100644 --- a/sky/engine/core/BUILD.gn +++ b/sky/engine/core/BUILD.gn @@ -23,7 +23,6 @@ source_set("libraries") { "//skia", "//sky/engine/tonic:tonic", "//sky/engine/wtf", - "//third_party/angle:translator", "//third_party/iccjpeg", "//third_party/libpng", "//third_party/ots", diff --git a/sky/tools/roll/roll.py b/sky/tools/roll/roll.py index af26105420dd0..e58de49ebbc7b 100755 --- a/sky/tools/roll/roll.py +++ b/sky/tools/roll/roll.py @@ -38,11 +38,6 @@ 'tools/valgrind', ] -# things used from //mojo/public -_mojo_sdk_deps = [ - 'third_party/cython', -] - _chromium_libs = [ 'crypto', 'url', @@ -51,7 +46,6 @@ _third_party_deps = [ 'third_party/android_platform', 'third_party/apple_apsl', - 'third_party/boringssl', 'third_party/brotli', 'third_party/expat', 'third_party/freetype-android', @@ -73,12 +67,10 @@ 'third_party/qcms', 'third_party/re2', 'third_party/robolectric', - 'third_party/smhasher', - 'third_party/yasm', 'third_party/zlib', ] -dirs_from_chromium = _base_deps + _build_deps + _mojo_sdk_deps + _chromium_libs + _third_party_deps +dirs_from_chromium = _base_deps + _build_deps + _chromium_libs + _third_party_deps dirs_from_mojo = [ 'gpu', @@ -97,11 +89,13 @@ 'build/config/ui.gni', 'build/ls.py', 'build/module_args/mojo.gni', + 'crypto/BUILD.gn', + 'gpu/BUILD.gn', + 'tools/android/download_android_tools.py', 'tools/android/VERSION_LINUX_NDK', 'tools/android/VERSION_LINUX_SDK', 'tools/android/VERSION_MACOSX_NDK', 'tools/android/VERSION_MACOSX_SDK', - 'tools/android/download_android_tools.py', ] diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn deleted file mode 100644 index a8fe16edb9056..0000000000000 --- a/third_party/boringssl/BUILD.gn +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# Config for us and everybody else depending on BoringSSL. -config("openssl_config") { - include_dirs = [] - include_dirs += [ "src/include" ] - if (is_component_build) { - defines = [ "BORINGSSL_SHARED_LIBRARY" ] - } -} - -# Config internal to this build file. -config("openssl_internal_config") { - visibility = [ ":*" ] # Only targets in this file can depend on this. -} - -# The list of BoringSSL files is kept in boringssl.gypi. -gypi_values = - exec_script("//build/gypi_to_gn.py", - [ rebase_path("//third_party/boringssl/boringssl.gypi") ], - "scope", - [ "//third_party/boringssl/boringssl.gypi" ]) - -# Windows' assembly is built with Yasm. The other platforms use the platform -# assembler. -if (is_win && !is_msan) { - import("//third_party/yasm/yasm_assemble.gni") - yasm_assemble("boringssl_asm") { - if (current_cpu == "x64") { - sources = gypi_values.boringssl_win_x86_64_sources - } else if (current_cpu == "x86") { - sources = gypi_values.boringssl_win_x86_sources - } - } -} - -component("boringssl") { - sources = gypi_values.boringssl_crypto_sources - sources += gypi_values.boringssl_ssl_sources - - public_configs = [ ":openssl_config" ] - - cflags = [] - defines = [ - "BORINGSSL_IMPLEMENTATION", - "BORINGSSL_NO_STATIC_INITIALIZER", - ] - deps = [] - if (is_component_build) { - defines += [ "BORINGSSL_SHARED_LIBRARY" ] - } - - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ - "//build/config/compiler:no_chromium_code", - - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - "//build/config/compiler:no_size_t_to_int_warning", - ] - - # Also gets the include dirs from :openssl_config - include_dirs = [ - "src/include", - - # This is for arm_arch.h, which is needed by some asm files. Since the - # asm files are generated and kept in a different directory, they - # cannot use relative paths to find this file. - "src/crypto", - ] - - if (is_msan) { - defines += [ "OPENSSL_NO_ASM" ] - } else if (current_cpu == "x64") { - if (is_mac || is_ios) { - sources += gypi_values.boringssl_mac_x86_64_sources - } else if (is_linux || is_android) { - sources += gypi_values.boringssl_linux_x86_64_sources - } else if (is_win) { - deps += [ ":boringssl_asm" ] - } else { - defines += [ "OPENSSL_NO_ASM" ] - } - } else if (current_cpu == "x86") { - if (is_mac || is_ios) { - sources += gypi_values.boringssl_mac_x86_sources - } else if (is_linux || is_android) { - sources += gypi_values.boringssl_linux_x86_sources - } else if (is_win) { - deps += [ ":boringssl_asm" ] - } else { - defines += [ "OPENSSL_NO_ASM" ] - } - } else if (current_cpu == "arm" && (is_linux || is_android)) { - sources += gypi_values.boringssl_linux_arm_sources - } else if (current_cpu == "arm64" && (is_linux || is_android)) { - sources += gypi_values.boringssl_linux_aarch64_sources - } else { - defines += [ "OPENSSL_NO_ASM" ] - } -} diff --git a/third_party/boringssl/DEPS b/third_party/boringssl/DEPS deleted file mode 100644 index dda2d7c7fc6f8..0000000000000 --- a/third_party/boringssl/DEPS +++ /dev/null @@ -1,6 +0,0 @@ -specific_include_rules = { - "boringssl_unittest\.cc": [ - "+base", - "+testing", - ], -} diff --git a/third_party/boringssl/NOTICE b/third_party/boringssl/NOTICE deleted file mode 100644 index e47d101f1025e..0000000000000 --- a/third_party/boringssl/NOTICE +++ /dev/null @@ -1,127 +0,0 @@ - - LICENSE ISSUES - ============== - - The OpenSSL toolkit stays under a dual license, i.e. both the conditions of - the OpenSSL License and the original SSLeay license apply to the toolkit. - See below for the actual license texts. Actually both licenses are BSD-style - Open Source licenses. In case of any license issues related to OpenSSL - please contact openssl-core@openssl.org. - - OpenSSL License - --------------- - -/* ==================================================================== - * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - - Original SSLeay License - ----------------------- - -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - diff --git a/third_party/boringssl/OWNERS b/third_party/boringssl/OWNERS deleted file mode 100644 index 42d0d3b58b3b6..0000000000000 --- a/third_party/boringssl/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -agl@chromium.org -davidben@chromium.org -rsleevi@chromium.org diff --git a/third_party/boringssl/README.chromium b/third_party/boringssl/README.chromium deleted file mode 100644 index 8c89faa63339b..0000000000000 --- a/third_party/boringssl/README.chromium +++ /dev/null @@ -1,18 +0,0 @@ -Name: boringssl -URL: https://boringssl.googlesource.com/boringssl -Version: git -License: BSDish -License File: NOTICE -License Android Compatible: yes -Security Critical: yes - -Description: -This is BoringSSL, a fork of OpenSSL. See -https://www.imperialviolet.org/2014/06/20/boringssl.html - -Note: when rolling DEPS forward, remember to run - - cd third_party/boringssl - python src/util/generate_build_files.py chromium - -from a system with both Perl and Go installed. diff --git a/third_party/boringssl/boringssl.gyp b/third_party/boringssl/boringssl.gyp deleted file mode 100644 index 5118fc7cc28fb..0000000000000 --- a/third_party/boringssl/boringssl.gyp +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'boringssl', - 'type': '<(component)', - 'includes': [ - 'boringssl.gypi', - ], - 'sources': [ - '<@(boringssl_crypto_sources)', - '<@(boringssl_ssl_sources)', - ], - 'defines': [ - 'BORINGSSL_IMPLEMENTATION', - 'BORINGSSL_NO_STATIC_INITIALIZER', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - 'conditions': [ - ['component == "shared_library"', { - 'defines': [ - 'BORINGSSL_SHARED_LIBRARY', - ], - }], - ['target_arch == "arm" and msan == 0', { - 'conditions': [ - ['OS == "linux" or OS == "android"', { - 'sources': [ '<@(boringssl_linux_arm_sources)' ], - }, { - 'defines': [ 'OPENSSL_NO_ASM' ], - }], - ], - }], - ['target_arch == "arm64" and msan == 0', { - 'conditions': [ - ['OS == "linux" or OS == "android"', { - 'sources': [ '<@(boringssl_linux_aarch64_sources)' ], - }, { - 'defines': [ 'OPENSSL_NO_ASM' ], - }], - ], - }], - ['target_arch == "ia32" and msan == 0', { - 'conditions': [ - ['OS == "mac" or OS == "ios"', { - 'sources': [ '<@(boringssl_mac_x86_sources)' ], - }], - ['OS == "linux" or OS == "android"', { - 'sources': [ '<@(boringssl_linux_x86_sources)' ], - }], - ['OS == "win"', { - 'sources': [ '<@(boringssl_win_x86_sources)' ], - # Windows' assembly is built with Yasm. The other platforms use - # the platform assembler. - 'variables': { - 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/third_party/boringssl', - }, - 'includes': [ - '../yasm/yasm_compile.gypi', - ], - }], - ['OS != "mac" and OS != "ios" and OS != "linux" and OS != "win" and OS != "android"', { - 'defines': [ 'OPENSSL_NO_ASM' ], - }], - ] - }], - ['target_arch == "x64" and msan == 0', { - 'conditions': [ - ['OS == "mac" or OS == "ios"', { - 'sources': [ '<@(boringssl_mac_x86_64_sources)' ], - }], - ['OS == "linux" or OS == "android"', { - 'sources': [ '<@(boringssl_linux_x86_64_sources)' ], - }], - ['OS == "win"', { - 'sources': [ '<@(boringssl_win_x86_64_sources)' ], - # Windows' assembly is built with Yasm. The other platforms use - # the platform assembler. - 'variables': { - 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/third_party/boringssl', - }, - 'includes': [ - '../yasm/yasm_compile.gypi', - ], - }], - ['OS != "mac" and OS != "ios" and OS != "linux" and OS != "win" and OS != "android"', { - 'defines': [ 'OPENSSL_NO_ASM' ], - }], - ] - }], - ['msan == 1 or (target_arch != "arm" and target_arch != "ia32" and target_arch != "x64" and target_arch != "arm64")', { - 'defines': [ 'OPENSSL_NO_ASM' ], - }], - ], - 'include_dirs': [ - 'src/include', - # This is for arm_arch.h, which is needed by some asm files. Since the - # asm files are generated and kept in a different directory, they - # cannot use relative paths to find this file. - 'src/crypto', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - 'src/include', - ], - 'conditions': [ - ['component == "shared_library"', { - 'defines': [ - 'BORINGSSL_SHARED_LIBRARY', - ], - }], - ], - }, - }, - ], -} diff --git a/third_party/boringssl/boringssl.gypi b/third_party/boringssl/boringssl.gypi deleted file mode 100644 index b8a2a1293a2df..0000000000000 --- a/third_party/boringssl/boringssl.gypi +++ /dev/null @@ -1,431 +0,0 @@ -# Copyright (c) 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# This file is created by generate_build_files.py. Do not edit manually. - -{ - 'variables': { - 'boringssl_ssl_sources': [ - 'src/ssl/d1_both.c', - 'src/ssl/d1_clnt.c', - 'src/ssl/d1_lib.c', - 'src/ssl/d1_meth.c', - 'src/ssl/d1_pkt.c', - 'src/ssl/d1_srtp.c', - 'src/ssl/d1_srvr.c', - 'src/ssl/pqueue/pqueue.c', - 'src/ssl/s3_both.c', - 'src/ssl/s3_clnt.c', - 'src/ssl/s3_enc.c', - 'src/ssl/s3_lib.c', - 'src/ssl/s3_meth.c', - 'src/ssl/s3_pkt.c', - 'src/ssl/s3_srvr.c', - 'src/ssl/ssl_aead_ctx.c', - 'src/ssl/ssl_algs.c', - 'src/ssl/ssl_asn1.c', - 'src/ssl/ssl_cert.c', - 'src/ssl/ssl_cipher.c', - 'src/ssl/ssl_lib.c', - 'src/ssl/ssl_rsa.c', - 'src/ssl/ssl_sess.c', - 'src/ssl/ssl_stat.c', - 'src/ssl/ssl_txt.c', - 'src/ssl/t1_enc.c', - 'src/ssl/t1_lib.c', - ], - 'boringssl_crypto_sources': [ - 'err_data.c', - 'src/crypto/aes/aes.c', - 'src/crypto/aes/mode_wrappers.c', - 'src/crypto/asn1/a_bitstr.c', - 'src/crypto/asn1/a_bool.c', - 'src/crypto/asn1/a_bytes.c', - 'src/crypto/asn1/a_d2i_fp.c', - 'src/crypto/asn1/a_dup.c', - 'src/crypto/asn1/a_enum.c', - 'src/crypto/asn1/a_gentm.c', - 'src/crypto/asn1/a_i2d_fp.c', - 'src/crypto/asn1/a_int.c', - 'src/crypto/asn1/a_mbstr.c', - 'src/crypto/asn1/a_object.c', - 'src/crypto/asn1/a_octet.c', - 'src/crypto/asn1/a_print.c', - 'src/crypto/asn1/a_strnid.c', - 'src/crypto/asn1/a_time.c', - 'src/crypto/asn1/a_type.c', - 'src/crypto/asn1/a_utctm.c', - 'src/crypto/asn1/a_utf8.c', - 'src/crypto/asn1/asn1_lib.c', - 'src/crypto/asn1/asn1_par.c', - 'src/crypto/asn1/asn_pack.c', - 'src/crypto/asn1/bio_asn1.c', - 'src/crypto/asn1/bio_ndef.c', - 'src/crypto/asn1/f_enum.c', - 'src/crypto/asn1/f_int.c', - 'src/crypto/asn1/f_string.c', - 'src/crypto/asn1/t_bitst.c', - 'src/crypto/asn1/t_pkey.c', - 'src/crypto/asn1/tasn_dec.c', - 'src/crypto/asn1/tasn_enc.c', - 'src/crypto/asn1/tasn_fre.c', - 'src/crypto/asn1/tasn_new.c', - 'src/crypto/asn1/tasn_prn.c', - 'src/crypto/asn1/tasn_typ.c', - 'src/crypto/asn1/tasn_utl.c', - 'src/crypto/asn1/x_bignum.c', - 'src/crypto/asn1/x_long.c', - 'src/crypto/base64/base64.c', - 'src/crypto/bio/bio.c', - 'src/crypto/bio/bio_mem.c', - 'src/crypto/bio/buffer.c', - 'src/crypto/bio/connect.c', - 'src/crypto/bio/fd.c', - 'src/crypto/bio/file.c', - 'src/crypto/bio/hexdump.c', - 'src/crypto/bio/pair.c', - 'src/crypto/bio/printf.c', - 'src/crypto/bio/socket.c', - 'src/crypto/bio/socket_helper.c', - 'src/crypto/bn/add.c', - 'src/crypto/bn/asm/x86_64-gcc.c', - 'src/crypto/bn/bn.c', - 'src/crypto/bn/bn_asn1.c', - 'src/crypto/bn/cmp.c', - 'src/crypto/bn/convert.c', - 'src/crypto/bn/ctx.c', - 'src/crypto/bn/div.c', - 'src/crypto/bn/exponentiation.c', - 'src/crypto/bn/gcd.c', - 'src/crypto/bn/generic.c', - 'src/crypto/bn/kronecker.c', - 'src/crypto/bn/montgomery.c', - 'src/crypto/bn/mul.c', - 'src/crypto/bn/prime.c', - 'src/crypto/bn/random.c', - 'src/crypto/bn/rsaz_exp.c', - 'src/crypto/bn/shift.c', - 'src/crypto/bn/sqrt.c', - 'src/crypto/buf/buf.c', - 'src/crypto/bytestring/ber.c', - 'src/crypto/bytestring/cbb.c', - 'src/crypto/bytestring/cbs.c', - 'src/crypto/chacha/chacha_generic.c', - 'src/crypto/chacha/chacha_vec.c', - 'src/crypto/cipher/aead.c', - 'src/crypto/cipher/cipher.c', - 'src/crypto/cipher/derive_key.c', - 'src/crypto/cipher/e_aes.c', - 'src/crypto/cipher/e_chacha20poly1305.c', - 'src/crypto/cipher/e_des.c', - 'src/crypto/cipher/e_null.c', - 'src/crypto/cipher/e_rc2.c', - 'src/crypto/cipher/e_rc4.c', - 'src/crypto/cipher/e_ssl3.c', - 'src/crypto/cipher/e_tls.c', - 'src/crypto/cipher/tls_cbc.c', - 'src/crypto/cmac/cmac.c', - 'src/crypto/conf/conf.c', - 'src/crypto/cpu-arm.c', - 'src/crypto/cpu-intel.c', - 'src/crypto/crypto.c', - 'src/crypto/des/des.c', - 'src/crypto/dh/check.c', - 'src/crypto/dh/dh.c', - 'src/crypto/dh/dh_asn1.c', - 'src/crypto/dh/dh_impl.c', - 'src/crypto/dh/params.c', - 'src/crypto/digest/digest.c', - 'src/crypto/digest/digests.c', - 'src/crypto/directory_posix.c', - 'src/crypto/directory_win.c', - 'src/crypto/dsa/dsa.c', - 'src/crypto/dsa/dsa_asn1.c', - 'src/crypto/dsa/dsa_impl.c', - 'src/crypto/ec/ec.c', - 'src/crypto/ec/ec_asn1.c', - 'src/crypto/ec/ec_key.c', - 'src/crypto/ec/ec_montgomery.c', - 'src/crypto/ec/oct.c', - 'src/crypto/ec/p256-64.c', - 'src/crypto/ec/simple.c', - 'src/crypto/ec/util-64.c', - 'src/crypto/ec/wnaf.c', - 'src/crypto/ecdh/ecdh.c', - 'src/crypto/ecdsa/ecdsa.c', - 'src/crypto/ecdsa/ecdsa_asn1.c', - 'src/crypto/engine/engine.c', - 'src/crypto/err/err.c', - 'src/crypto/evp/algorithm.c', - 'src/crypto/evp/digestsign.c', - 'src/crypto/evp/evp.c', - 'src/crypto/evp/evp_asn1.c', - 'src/crypto/evp/evp_ctx.c', - 'src/crypto/evp/p_dsa_asn1.c', - 'src/crypto/evp/p_ec.c', - 'src/crypto/evp/p_ec_asn1.c', - 'src/crypto/evp/p_rsa.c', - 'src/crypto/evp/p_rsa_asn1.c', - 'src/crypto/evp/pbkdf.c', - 'src/crypto/evp/sign.c', - 'src/crypto/ex_data.c', - 'src/crypto/hkdf/hkdf.c', - 'src/crypto/hmac/hmac.c', - 'src/crypto/lhash/lhash.c', - 'src/crypto/md4/md4.c', - 'src/crypto/md5/md5.c', - 'src/crypto/mem.c', - 'src/crypto/modes/cbc.c', - 'src/crypto/modes/cfb.c', - 'src/crypto/modes/ctr.c', - 'src/crypto/modes/gcm.c', - 'src/crypto/modes/ofb.c', - 'src/crypto/obj/obj.c', - 'src/crypto/obj/obj_xref.c', - 'src/crypto/pem/pem_all.c', - 'src/crypto/pem/pem_info.c', - 'src/crypto/pem/pem_lib.c', - 'src/crypto/pem/pem_oth.c', - 'src/crypto/pem/pem_pk8.c', - 'src/crypto/pem/pem_pkey.c', - 'src/crypto/pem/pem_x509.c', - 'src/crypto/pem/pem_xaux.c', - 'src/crypto/pkcs8/p5_pbe.c', - 'src/crypto/pkcs8/p5_pbev2.c', - 'src/crypto/pkcs8/p8_pkey.c', - 'src/crypto/pkcs8/pkcs8.c', - 'src/crypto/poly1305/poly1305.c', - 'src/crypto/poly1305/poly1305_arm.c', - 'src/crypto/poly1305/poly1305_vec.c', - 'src/crypto/rand/hwrand.c', - 'src/crypto/rand/rand.c', - 'src/crypto/rand/urandom.c', - 'src/crypto/rand/windows.c', - 'src/crypto/rc4/rc4.c', - 'src/crypto/refcount_c11.c', - 'src/crypto/refcount_lock.c', - 'src/crypto/rsa/blinding.c', - 'src/crypto/rsa/padding.c', - 'src/crypto/rsa/rsa.c', - 'src/crypto/rsa/rsa_asn1.c', - 'src/crypto/rsa/rsa_impl.c', - 'src/crypto/sha/sha1.c', - 'src/crypto/sha/sha256.c', - 'src/crypto/sha/sha512.c', - 'src/crypto/stack/stack.c', - 'src/crypto/thread.c', - 'src/crypto/thread_none.c', - 'src/crypto/thread_pthread.c', - 'src/crypto/thread_win.c', - 'src/crypto/time_support.c', - 'src/crypto/x509/a_digest.c', - 'src/crypto/x509/a_sign.c', - 'src/crypto/x509/a_strex.c', - 'src/crypto/x509/a_verify.c', - 'src/crypto/x509/asn1_gen.c', - 'src/crypto/x509/by_dir.c', - 'src/crypto/x509/by_file.c', - 'src/crypto/x509/i2d_pr.c', - 'src/crypto/x509/pkcs7.c', - 'src/crypto/x509/t_crl.c', - 'src/crypto/x509/t_req.c', - 'src/crypto/x509/t_x509.c', - 'src/crypto/x509/t_x509a.c', - 'src/crypto/x509/x509.c', - 'src/crypto/x509/x509_att.c', - 'src/crypto/x509/x509_cmp.c', - 'src/crypto/x509/x509_d2.c', - 'src/crypto/x509/x509_def.c', - 'src/crypto/x509/x509_ext.c', - 'src/crypto/x509/x509_lu.c', - 'src/crypto/x509/x509_obj.c', - 'src/crypto/x509/x509_r2x.c', - 'src/crypto/x509/x509_req.c', - 'src/crypto/x509/x509_set.c', - 'src/crypto/x509/x509_trs.c', - 'src/crypto/x509/x509_txt.c', - 'src/crypto/x509/x509_v3.c', - 'src/crypto/x509/x509_vfy.c', - 'src/crypto/x509/x509_vpm.c', - 'src/crypto/x509/x509cset.c', - 'src/crypto/x509/x509name.c', - 'src/crypto/x509/x509rset.c', - 'src/crypto/x509/x509spki.c', - 'src/crypto/x509/x509type.c', - 'src/crypto/x509/x_algor.c', - 'src/crypto/x509/x_all.c', - 'src/crypto/x509/x_attrib.c', - 'src/crypto/x509/x_crl.c', - 'src/crypto/x509/x_exten.c', - 'src/crypto/x509/x_info.c', - 'src/crypto/x509/x_name.c', - 'src/crypto/x509/x_pkey.c', - 'src/crypto/x509/x_pubkey.c', - 'src/crypto/x509/x_req.c', - 'src/crypto/x509/x_sig.c', - 'src/crypto/x509/x_spki.c', - 'src/crypto/x509/x_val.c', - 'src/crypto/x509/x_x509.c', - 'src/crypto/x509/x_x509a.c', - 'src/crypto/x509v3/pcy_cache.c', - 'src/crypto/x509v3/pcy_data.c', - 'src/crypto/x509v3/pcy_lib.c', - 'src/crypto/x509v3/pcy_map.c', - 'src/crypto/x509v3/pcy_node.c', - 'src/crypto/x509v3/pcy_tree.c', - 'src/crypto/x509v3/v3_akey.c', - 'src/crypto/x509v3/v3_akeya.c', - 'src/crypto/x509v3/v3_alt.c', - 'src/crypto/x509v3/v3_bcons.c', - 'src/crypto/x509v3/v3_bitst.c', - 'src/crypto/x509v3/v3_conf.c', - 'src/crypto/x509v3/v3_cpols.c', - 'src/crypto/x509v3/v3_crld.c', - 'src/crypto/x509v3/v3_enum.c', - 'src/crypto/x509v3/v3_extku.c', - 'src/crypto/x509v3/v3_genn.c', - 'src/crypto/x509v3/v3_ia5.c', - 'src/crypto/x509v3/v3_info.c', - 'src/crypto/x509v3/v3_int.c', - 'src/crypto/x509v3/v3_lib.c', - 'src/crypto/x509v3/v3_ncons.c', - 'src/crypto/x509v3/v3_pci.c', - 'src/crypto/x509v3/v3_pcia.c', - 'src/crypto/x509v3/v3_pcons.c', - 'src/crypto/x509v3/v3_pku.c', - 'src/crypto/x509v3/v3_pmaps.c', - 'src/crypto/x509v3/v3_prn.c', - 'src/crypto/x509v3/v3_purp.c', - 'src/crypto/x509v3/v3_skey.c', - 'src/crypto/x509v3/v3_sxnet.c', - 'src/crypto/x509v3/v3_utl.c', - ], - 'boringssl_linux_aarch64_sources': [ - 'linux-aarch64/crypto/aes/aesv8-armx64.S', - 'linux-aarch64/crypto/modes/ghashv8-armx64.S', - 'linux-aarch64/crypto/sha/sha1-armv8.S', - 'linux-aarch64/crypto/sha/sha256-armv8.S', - 'linux-aarch64/crypto/sha/sha512-armv8.S', - ], - 'boringssl_linux_arm_sources': [ - 'linux-arm/crypto/aes/aes-armv4.S', - 'linux-arm/crypto/aes/aesv8-armx32.S', - 'linux-arm/crypto/aes/bsaes-armv7.S', - 'linux-arm/crypto/bn/armv4-mont.S', - 'linux-arm/crypto/modes/ghash-armv4.S', - 'linux-arm/crypto/modes/ghashv8-armx32.S', - 'linux-arm/crypto/sha/sha1-armv4-large.S', - 'linux-arm/crypto/sha/sha256-armv4.S', - 'linux-arm/crypto/sha/sha512-armv4.S', - 'src/crypto/chacha/chacha_vec_arm.S', - 'src/crypto/cpu-arm-asm.S', - 'src/crypto/poly1305/poly1305_arm_asm.S', - ], - 'boringssl_linux_x86_sources': [ - 'linux-x86/crypto/aes/aes-586.S', - 'linux-x86/crypto/aes/aesni-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/cpu-x86-asm.S', - 'linux-x86/crypto/md5/md5-586.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': [ - 'linux-x86_64/crypto/aes/aes-x86_64.S', - 'linux-x86_64/crypto/aes/aesni-x86_64.S', - 'linux-x86_64/crypto/aes/bsaes-x86_64.S', - 'linux-x86_64/crypto/aes/vpaes-x86_64.S', - 'linux-x86_64/crypto/bn/rsaz-avx2.S', - 'linux-x86_64/crypto/bn/rsaz-x86_64.S', - 'linux-x86_64/crypto/bn/x86_64-mont.S', - 'linux-x86_64/crypto/bn/x86_64-mont5.S', - 'linux-x86_64/crypto/cpu-x86_64-asm.S', - 'linux-x86_64/crypto/md5/md5-x86_64.S', - 'linux-x86_64/crypto/modes/aesni-gcm-x86_64.S', - 'linux-x86_64/crypto/modes/ghash-x86_64.S', - 'linux-x86_64/crypto/rand/rdrand-x86_64.S', - 'linux-x86_64/crypto/rc4/rc4-md5-x86_64.S', - 'linux-x86_64/crypto/rc4/rc4-x86_64.S', - 'linux-x86_64/crypto/sha/sha1-x86_64.S', - 'linux-x86_64/crypto/sha/sha256-x86_64.S', - 'linux-x86_64/crypto/sha/sha512-x86_64.S', - ], - 'boringssl_mac_x86_sources': [ - 'mac-x86/crypto/aes/aes-586.S', - 'mac-x86/crypto/aes/aesni-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/cpu-x86-asm.S', - 'mac-x86/crypto/md5/md5-586.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': [ - 'mac-x86_64/crypto/aes/aes-x86_64.S', - 'mac-x86_64/crypto/aes/aesni-x86_64.S', - 'mac-x86_64/crypto/aes/bsaes-x86_64.S', - 'mac-x86_64/crypto/aes/vpaes-x86_64.S', - 'mac-x86_64/crypto/bn/rsaz-avx2.S', - 'mac-x86_64/crypto/bn/rsaz-x86_64.S', - 'mac-x86_64/crypto/bn/x86_64-mont.S', - 'mac-x86_64/crypto/bn/x86_64-mont5.S', - 'mac-x86_64/crypto/cpu-x86_64-asm.S', - 'mac-x86_64/crypto/md5/md5-x86_64.S', - 'mac-x86_64/crypto/modes/aesni-gcm-x86_64.S', - 'mac-x86_64/crypto/modes/ghash-x86_64.S', - 'mac-x86_64/crypto/rand/rdrand-x86_64.S', - 'mac-x86_64/crypto/rc4/rc4-md5-x86_64.S', - 'mac-x86_64/crypto/rc4/rc4-x86_64.S', - 'mac-x86_64/crypto/sha/sha1-x86_64.S', - 'mac-x86_64/crypto/sha/sha256-x86_64.S', - 'mac-x86_64/crypto/sha/sha512-x86_64.S', - ], - 'boringssl_win_x86_sources': [ - 'win-x86/crypto/aes/aes-586.asm', - 'win-x86/crypto/aes/aesni-x86.asm', - 'win-x86/crypto/aes/vpaes-x86.asm', - 'win-x86/crypto/bn/bn-586.asm', - 'win-x86/crypto/bn/co-586.asm', - 'win-x86/crypto/bn/x86-mont.asm', - 'win-x86/crypto/cpu-x86-asm.asm', - 'win-x86/crypto/md5/md5-586.asm', - 'win-x86/crypto/modes/ghash-x86.asm', - 'win-x86/crypto/rc4/rc4-586.asm', - 'win-x86/crypto/sha/sha1-586.asm', - 'win-x86/crypto/sha/sha256-586.asm', - 'win-x86/crypto/sha/sha512-586.asm', - ], - 'boringssl_win_x86_64_sources': [ - 'win-x86_64/crypto/aes/aes-x86_64.asm', - 'win-x86_64/crypto/aes/aesni-x86_64.asm', - 'win-x86_64/crypto/aes/bsaes-x86_64.asm', - 'win-x86_64/crypto/aes/vpaes-x86_64.asm', - 'win-x86_64/crypto/bn/rsaz-avx2.asm', - 'win-x86_64/crypto/bn/rsaz-x86_64.asm', - 'win-x86_64/crypto/bn/x86_64-mont.asm', - 'win-x86_64/crypto/bn/x86_64-mont5.asm', - 'win-x86_64/crypto/cpu-x86_64-asm.asm', - 'win-x86_64/crypto/md5/md5-x86_64.asm', - 'win-x86_64/crypto/modes/aesni-gcm-x86_64.asm', - 'win-x86_64/crypto/modes/ghash-x86_64.asm', - 'win-x86_64/crypto/rand/rdrand-x86_64.asm', - 'win-x86_64/crypto/rc4/rc4-md5-x86_64.asm', - 'win-x86_64/crypto/rc4/rc4-x86_64.asm', - 'win-x86_64/crypto/sha/sha1-x86_64.asm', - 'win-x86_64/crypto/sha/sha256-x86_64.asm', - 'win-x86_64/crypto/sha/sha512-x86_64.asm', - ], - } -} diff --git a/third_party/boringssl/boringssl_nacl.gyp b/third_party/boringssl/boringssl_nacl.gyp deleted file mode 100644 index e560c29e9c375..0000000000000 --- a/third_party/boringssl/boringssl_nacl.gyp +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -{ - 'includes': [ - '../../native_client/build/untrusted.gypi', - ], - 'targets': [ - { - 'target_name': 'boringssl_nacl', - 'type': 'none', - 'variables': { - 'nlib_target': 'libboringssl_nacl.a', - 'build_glibc': 0, - 'build_newlib': 0, - 'build_pnacl_newlib': 1, - }, - 'dependencies': [ - '<(DEPTH)/native_client_sdk/native_client_sdk_untrusted.gyp:nacl_io_untrusted', - ], - 'includes': [ - # Include the auto-generated gypi file. - 'boringssl.gypi' - ], - 'sources': [ - '<@(boringssl_crypto_sources)', - '<@(boringssl_ssl_sources)', - ], - 'defines': [ - 'OPENSSL_NO_ASM', - ], - 'include_dirs': [ - 'src/include', - # This is for arm_arch.h, which is needed by some asm files. Since the - # asm files are generated and kept in a different directory, they - # cannot use relative paths to find this file. - 'src/crypto', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - 'src/include', - ], - }, - 'pnacl_compile_flags': [ - '-Wno-sometimes-uninitialized', - '-Wno-unused-variable', - ], - }, # target boringssl_nacl - ], -} diff --git a/third_party/boringssl/boringssl_tests.gyp b/third_party/boringssl/boringssl_tests.gyp deleted file mode 100644 index a875bfecd4544..0000000000000 --- a/third_party/boringssl/boringssl_tests.gyp +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'includes': [ - 'boringssl_tests.gypi', - ], - 'targets': [ - { - 'target_name': 'boringssl_unittests', - 'type': 'executable', - 'sources': [ - 'boringssl_unittest.cc', - ], - 'dependencies': [ - '<@(boringssl_test_targets)', - '../../base/base.gyp:base', - '../../base/base.gyp:run_all_unittests', - '../../base/base.gyp:test_support_base', - '../../testing/gtest.gyp:gtest', - ], - }, - ], -} diff --git a/third_party/boringssl/boringssl_tests.gypi b/third_party/boringssl/boringssl_tests.gypi deleted file mode 100644 index 675b9132494fe..0000000000000 --- a/third_party/boringssl/boringssl_tests.gypi +++ /dev/null @@ -1,513 +0,0 @@ -# Copyright (c) 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# This file is created by generate_build_files.py. Do not edit manually. - -{ - 'targets': [ - { - 'target_name': 'boringssl_aes_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/aes/aes_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_base64_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/base64/base64_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_bio_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/bio/bio_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_bn_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/bn/bn_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_bytestring_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/bytestring/bytestring_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_aead_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/cipher/aead_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_cipher_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/cipher/cipher_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_cmac_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/cmac/cmac_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_constant_time_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/constant_time_test.c', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_dh_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/dh/dh_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_digest_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/digest/digest_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_dsa_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/dsa/dsa_test.c', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_ec_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/ec/ec_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_example_mul', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/ec/example_mul.c', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_ecdsa_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/ecdsa/ecdsa_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_err_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/err/err_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_evp_extra_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/evp/evp_extra_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_evp_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/evp/evp_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_pbkdf_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/evp/pbkdf_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_hkdf_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/hkdf/hkdf_test.c', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_hmac_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/hmac/hmac_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_lhash_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/lhash/lhash_test.c', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_gcm_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/modes/gcm_test.c', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_pkcs12_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/pkcs8/pkcs12_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_poly1305_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/poly1305/poly1305_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_refcount_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/refcount_test.c', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_rsa_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/rsa/rsa_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_thread_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/thread_test.c', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_pkcs7_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/x509/pkcs7_test.c', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_tab_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/x509v3/tab_test.c', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_v3name_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/crypto/x509v3/v3name_test.c', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_pqueue_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/ssl/pqueue/pqueue_test.c', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - { - 'target_name': 'boringssl_ssl_test', - 'type': 'executable', - 'dependencies': [ - 'boringssl.gyp:boringssl', - ], - 'sources': [ - 'src/ssl/ssl_test.cc', - '<@(boringssl_test_support_sources)', - ], - # TODO(davidben): Fix size_t truncations in BoringSSL. - # https://crbug.com/429039 - 'msvs_disabled_warnings': [ 4267, ], - }, - ], - 'variables': { - 'boringssl_test_support_sources': [ - 'src/crypto/test/file_test.cc', - 'src/crypto/test/malloc.cc', - ], - 'boringssl_test_targets': [ - 'boringssl_aead_test', - 'boringssl_aes_test', - 'boringssl_base64_test', - 'boringssl_bio_test', - 'boringssl_bn_test', - 'boringssl_bytestring_test', - 'boringssl_cipher_test', - 'boringssl_cmac_test', - 'boringssl_constant_time_test', - 'boringssl_dh_test', - 'boringssl_digest_test', - 'boringssl_dsa_test', - 'boringssl_ec_test', - 'boringssl_ecdsa_test', - 'boringssl_err_test', - 'boringssl_evp_extra_test', - 'boringssl_evp_test', - 'boringssl_example_mul', - 'boringssl_gcm_test', - 'boringssl_hkdf_test', - 'boringssl_hmac_test', - 'boringssl_lhash_test', - 'boringssl_pbkdf_test', - 'boringssl_pkcs12_test', - 'boringssl_pkcs7_test', - 'boringssl_poly1305_test', - 'boringssl_pqueue_test', - 'boringssl_refcount_test', - 'boringssl_rsa_test', - 'boringssl_ssl_test', - 'boringssl_tab_test', - 'boringssl_thread_test', - 'boringssl_v3name_test', - ], - } -} diff --git a/third_party/boringssl/boringssl_unittest.cc b/third_party/boringssl/boringssl_unittest.cc deleted file mode 100644 index 75b9db80bfcb6..0000000000000 --- a/third_party/boringssl/boringssl_unittest.cc +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include - -#include - -#include "base/base_paths.h" -#include "base/command_line.h" -#include "base/files/file_path.h" -#include "base/logging.h" -#include "base/path_service.h" -#include "base/process/launch.h" -#include "base/strings/string_util.h" -#include "testing/gtest/include/gtest/gtest.h" - -namespace { - -void TestProcess(const std::string& name, - const std::vector& args) { - base::FilePath exe_dir; - ASSERT_TRUE(PathService::Get(base::DIR_EXE, &exe_dir)); - base::FilePath test_binary = - exe_dir.AppendASCII("boringssl_" + name); - base::CommandLine cmd(test_binary); - - for (size_t i = 0; i < args.size(); ++i) { - cmd.AppendArgNative(args[i]); - } - - std::string output; - EXPECT_TRUE(base::GetAppOutput(cmd, &output)); - // Account for Windows line endings. - base::ReplaceSubstringsAfterOffset(&output, 0, "\r\n", "\n"); - - const bool ok = output.size() >= 5 && - memcmp("PASS\n", &output[output.size() - 5], 5) == 0 && - (output.size() == 5 || output[output.size() - 6] == '\n'); - - EXPECT_TRUE(ok) << output; -} - -void TestSimple(const std::string& name) { - std::vector empty; - TestProcess(name, empty); -} - -bool BoringSSLPath(base::FilePath* result) { - if (!PathService::Get(base::DIR_SOURCE_ROOT, result)) - return false; - - *result = result->Append(FILE_PATH_LITERAL("third_party")); - *result = result->Append(FILE_PATH_LITERAL("boringssl")); - *result = result->Append(FILE_PATH_LITERAL("src")); - return true; -} - -bool CryptoCipherTestPath(base::FilePath *result) { - if (!BoringSSLPath(result)) - return false; - - *result = result->Append(FILE_PATH_LITERAL("crypto")); - *result = result->Append(FILE_PATH_LITERAL("cipher")); - *result = result->Append(FILE_PATH_LITERAL("test")); - return true; -} - -} // anonymous namespace - -struct AEADTest { - const base::CommandLine::CharType *name; - const base::FilePath::CharType *test_vector_filename; -}; - -static const AEADTest kAEADTests[] = { - {FILE_PATH_LITERAL("aes-128-gcm"), - FILE_PATH_LITERAL("aes_128_gcm_tests.txt")}, - {FILE_PATH_LITERAL("aes-128-key-wrap"), - FILE_PATH_LITERAL("aes_128_key_wrap_tests.txt")}, - {FILE_PATH_LITERAL("aes-256-gcm"), - FILE_PATH_LITERAL("aes_256_gcm_tests.txt")}, - {FILE_PATH_LITERAL("aes-256-key-wrap"), - FILE_PATH_LITERAL("aes_256_key_wrap_tests.txt")}, - {FILE_PATH_LITERAL("chacha20-poly1305"), - FILE_PATH_LITERAL("chacha20_poly1305_tests.txt")}, - {FILE_PATH_LITERAL("rc4-md5-tls"), - FILE_PATH_LITERAL("rc4_md5_tls_tests.txt")}, - {FILE_PATH_LITERAL("rc4-sha1-tls"), - FILE_PATH_LITERAL("rc4_sha1_tls_tests.txt")}, - {FILE_PATH_LITERAL("aes-128-cbc-sha1-tls"), - FILE_PATH_LITERAL("aes_128_cbc_sha1_tls_tests.txt")}, - {FILE_PATH_LITERAL("aes-128-cbc-sha1-tls-implicit-iv"), - FILE_PATH_LITERAL("aes_128_cbc_sha1_tls_implicit_iv_tests.txt")}, - {FILE_PATH_LITERAL("aes-128-cbc-sha256-tls"), - FILE_PATH_LITERAL("aes_128_cbc_sha256_tls_tests.txt")}, - {FILE_PATH_LITERAL("aes-256-cbc-sha1-tls"), - FILE_PATH_LITERAL("aes_256_cbc_sha1_tls_tests.txt")}, - {FILE_PATH_LITERAL("aes-256-cbc-sha1-tls-implicit-iv"), - FILE_PATH_LITERAL("aes_256_cbc_sha1_tls_implicit_iv_tests.txt")}, - {FILE_PATH_LITERAL("aes-256-cbc-sha256-tls"), - FILE_PATH_LITERAL("aes_256_cbc_sha256_tls_tests.txt")}, - {FILE_PATH_LITERAL("aes-256-cbc-sha384-tls"), - FILE_PATH_LITERAL("aes_256_cbc_sha384_tls_tests.txt")}, - {FILE_PATH_LITERAL("des-ede3-cbc-sha1-tls"), - FILE_PATH_LITERAL("des_ede3_cbc_sha1_tls_tests.txt")}, - {FILE_PATH_LITERAL("des-ede3-cbc-sha1-tls-implicit-iv"), - FILE_PATH_LITERAL("des_ede3_cbc_sha1_tls_implicit_iv_tests.txt")}, - {FILE_PATH_LITERAL("rc4-md5-ssl3"), - FILE_PATH_LITERAL("rc4_md5_ssl3_tests.txt")}, - {FILE_PATH_LITERAL("rc4-sha1-ssl3"), - FILE_PATH_LITERAL("rc4_sha1_ssl3_tests.txt")}, - {FILE_PATH_LITERAL("aes-128-cbc-sha1-ssl3"), - FILE_PATH_LITERAL("aes_128_cbc_sha1_ssl3_tests.txt")}, - {FILE_PATH_LITERAL("aes-256-cbc-sha1-ssl3"), - FILE_PATH_LITERAL("aes_256_cbc_sha1_ssl3_tests.txt")}, - {FILE_PATH_LITERAL("des-ede3-cbc-sha1-ssl3"), - FILE_PATH_LITERAL("des_ede3_cbc_sha1_ssl3_tests.txt")}, - {FILE_PATH_LITERAL("aes-128-ctr-hmac-sha256"), - FILE_PATH_LITERAL("aes_128_ctr_hmac_sha256.txt")}, - {FILE_PATH_LITERAL("aes-256-ctr-hmac-sha256"), - FILE_PATH_LITERAL("aes_256_ctr_hmac_sha256.txt")}, -}; - -TEST(BoringSSL, AEADs) { - base::FilePath test_vector_dir; - ASSERT_TRUE(CryptoCipherTestPath(&test_vector_dir)); - - for (size_t i = 0; i < arraysize(kAEADTests); i++) { - const AEADTest& test = kAEADTests[i]; - SCOPED_TRACE(test.name); - - base::FilePath test_vector_file = - test_vector_dir.Append(test.test_vector_filename); - - std::vector args; - args.push_back(test.name); - args.push_back(test_vector_file.value()); - - TestProcess("aead_test", args); - } -} - -TEST(BoringSSL, AES) { - TestSimple("aes_test"); -} - -TEST(BoringSSL, Base64) { - TestSimple("base64_test"); -} - -TEST(BoringSSL, BIO) { - TestSimple("bio_test"); -} - -TEST(BoringSSL, BN) { - TestSimple("bn_test"); -} - -TEST(BoringSSL, ByteString) { - TestSimple("bytestring_test"); -} - -TEST(BoringSSL, Cipher) { - base::FilePath data_file; - ASSERT_TRUE(CryptoCipherTestPath(&data_file)); - data_file = data_file.Append(FILE_PATH_LITERAL("cipher_test.txt")); - - std::vector args; - args.push_back(data_file.value()); - - TestProcess("cipher_test", args); -} - -TEST(BoringSSL, CMAC) { - TestSimple("cmac_test"); -} - -TEST(BoringSSL, ConstantTime) { - TestSimple("constant_time_test"); -} - -TEST(BoringSSL, DH) { - TestSimple("dh_test"); -} - -TEST(BoringSSL, Digest) { - TestSimple("digest_test"); -} - -TEST(BoringSSL, DSA) { - TestSimple("dsa_test"); -} - -TEST(BoringSSL, EC) { - TestSimple("ec_test"); -} - -TEST(BoringSSL, ECDSA) { - TestSimple("ecdsa_test"); -} - -TEST(BoringSSL, ERR) { - TestSimple("err_test"); -} - -TEST(BoringSSL, EVP) { - base::FilePath data_file; - ASSERT_TRUE(BoringSSLPath(&data_file)); - data_file = data_file.Append(FILE_PATH_LITERAL("crypto")); - data_file = data_file.Append(FILE_PATH_LITERAL("evp")); - data_file = data_file.Append(FILE_PATH_LITERAL("evp_tests.txt")); - - std::vector args; - args.push_back(data_file.value()); - - TestProcess("evp_test", args); -} - -TEST(BoringSSL, EVPExtra) { - TestSimple("evp_extra_test"); -} - -TEST(BoringSSL, ExampleMul) { - TestSimple("example_mul"); -} - -TEST(BoringSSL, GCM) { - TestSimple("gcm_test"); -} - -TEST(BoringSSL, HKDF) { - TestSimple("hkdf_test"); -} - -TEST(BoringSSL, HMAC) { - base::FilePath data_file; - ASSERT_TRUE(BoringSSLPath(&data_file)); - data_file = data_file.Append(FILE_PATH_LITERAL("crypto")); - data_file = data_file.Append(FILE_PATH_LITERAL("hmac")); - data_file = data_file.Append(FILE_PATH_LITERAL("hmac_tests.txt")); - - std::vector args; - args.push_back(data_file.value()); - - TestProcess("hmac_test", args); -} - -TEST(BoringSSL, LH) { - TestSimple("lhash_test"); -} - -TEST(BoringSSL, PBKDF) { - TestSimple("pbkdf_test"); -} - -TEST(BoringSSL, Poly1305) { - base::FilePath data_file; - ASSERT_TRUE(BoringSSLPath(&data_file)); - data_file = data_file.Append(FILE_PATH_LITERAL("crypto")); - data_file = data_file.Append(FILE_PATH_LITERAL("poly1305")); - data_file = data_file.Append(FILE_PATH_LITERAL("poly1305_test.txt")); - - std::vector args; - args.push_back(data_file.value()); - - TestProcess("poly1305_test", args); -} - -TEST(BoringSSL, PKCS7) { - TestSimple("pkcs7_test"); -} - -TEST(BoringSSL, PKCS12) { - TestSimple("pkcs12_test"); -} - -TEST(BoringSSL, PQueue) { - TestSimple("pqueue_test"); -} - -TEST(BoringSSL, RefcountTest) { - TestSimple("refcount_test"); -} - -TEST(BoringSSL, RSA) { - TestSimple("rsa_test"); -} - -TEST(BoringSSL, SSL) { - TestSimple("ssl_test"); -} - -TEST(BoringSSL, TabTest) { - TestSimple("tab_test"); -} - -TEST(BoringSSL, Thread) { - TestSimple("thread_test"); -} - -TEST(BoringSSL, V3NameTest) { - TestSimple("v3name_test"); -} diff --git a/third_party/boringssl/err_data.c b/third_party/boringssl/err_data.c deleted file mode 100644 index ddb7eb49f01cd..0000000000000 --- a/third_party/boringssl/err_data.c +++ /dev/null @@ -1,2740 +0,0 @@ -/* Copyright (c) 2015, Google Inc. - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - - /* This file was generated by err_data_generate.go. */ - -#include -#include -#include - - -OPENSSL_COMPILE_ASSERT(ERR_LIB_NONE == 1, library_values_changed_1); -OPENSSL_COMPILE_ASSERT(ERR_LIB_SYS == 2, library_values_changed_2); -OPENSSL_COMPILE_ASSERT(ERR_LIB_BN == 3, library_values_changed_3); -OPENSSL_COMPILE_ASSERT(ERR_LIB_RSA == 4, library_values_changed_4); -OPENSSL_COMPILE_ASSERT(ERR_LIB_DH == 5, library_values_changed_5); -OPENSSL_COMPILE_ASSERT(ERR_LIB_EVP == 6, library_values_changed_6); -OPENSSL_COMPILE_ASSERT(ERR_LIB_BUF == 7, library_values_changed_7); -OPENSSL_COMPILE_ASSERT(ERR_LIB_OBJ == 8, library_values_changed_8); -OPENSSL_COMPILE_ASSERT(ERR_LIB_PEM == 9, library_values_changed_9); -OPENSSL_COMPILE_ASSERT(ERR_LIB_DSA == 10, library_values_changed_10); -OPENSSL_COMPILE_ASSERT(ERR_LIB_X509 == 11, library_values_changed_11); -OPENSSL_COMPILE_ASSERT(ERR_LIB_ASN1 == 12, library_values_changed_12); -OPENSSL_COMPILE_ASSERT(ERR_LIB_CONF == 13, library_values_changed_13); -OPENSSL_COMPILE_ASSERT(ERR_LIB_CRYPTO == 14, library_values_changed_14); -OPENSSL_COMPILE_ASSERT(ERR_LIB_EC == 15, library_values_changed_15); -OPENSSL_COMPILE_ASSERT(ERR_LIB_SSL == 16, library_values_changed_16); -OPENSSL_COMPILE_ASSERT(ERR_LIB_BIO == 17, library_values_changed_17); -OPENSSL_COMPILE_ASSERT(ERR_LIB_PKCS7 == 18, library_values_changed_18); -OPENSSL_COMPILE_ASSERT(ERR_LIB_PKCS8 == 19, library_values_changed_19); -OPENSSL_COMPILE_ASSERT(ERR_LIB_X509V3 == 20, library_values_changed_20); -OPENSSL_COMPILE_ASSERT(ERR_LIB_RAND == 21, library_values_changed_21); -OPENSSL_COMPILE_ASSERT(ERR_LIB_ENGINE == 22, library_values_changed_22); -OPENSSL_COMPILE_ASSERT(ERR_LIB_OCSP == 23, library_values_changed_23); -OPENSSL_COMPILE_ASSERT(ERR_LIB_UI == 24, library_values_changed_24); -OPENSSL_COMPILE_ASSERT(ERR_LIB_COMP == 25, library_values_changed_25); -OPENSSL_COMPILE_ASSERT(ERR_LIB_ECDSA == 26, library_values_changed_26); -OPENSSL_COMPILE_ASSERT(ERR_LIB_ECDH == 27, library_values_changed_27); -OPENSSL_COMPILE_ASSERT(ERR_LIB_HMAC == 28, library_values_changed_28); -OPENSSL_COMPILE_ASSERT(ERR_LIB_DIGEST == 29, library_values_changed_29); -OPENSSL_COMPILE_ASSERT(ERR_LIB_CIPHER == 30, library_values_changed_30); -OPENSSL_COMPILE_ASSERT(ERR_LIB_USER == 31, library_values_changed_31); -OPENSSL_COMPILE_ASSERT(ERR_LIB_HKDF == 32, library_values_changed_32); -OPENSSL_COMPILE_ASSERT(ERR_NUM_LIBS == 33, library_values_changed_num); - -const uint32_t kOpenSSLFunctionValues[] = { - 0xc32054b, - 0xc328556, - 0xc330561, - 0xc338578, - 0xc340582, - 0xc34859c, - 0xc3505a3, - 0xc3585af, - 0xc3605b6, - 0xc3685cc, - 0xc3705eb, - 0xc3785fc, - 0xc38060c, - 0xc388626, - 0xc39063b, - 0xc39864a, - 0xc3a0663, - 0xc3a8677, - 0xc3b0683, - 0xc3b868a, - 0xc3c0692, - 0xc3c86aa, - 0xc3d06b2, - 0xc3d86ba, - 0xc3e06c5, - 0xc3e85e1, - 0xc3f06a0, - 0xc3f856e, - 0xc40058c, - 0x103219ca, - 0x103299e1, - 0x103319fa, - 0x10339a10, - 0x10341a20, - 0x10349a48, - 0x10351a85, - 0x10359a94, - 0x10361ab4, - 0x10369ad3, - 0x10371af0, - 0x10379b0d, - 0x10381b22, - 0x10389b44, - 0x10391b63, - 0x10399b82, - 0x103a1c2a, - 0x103a9c41, - 0x103b1c4a, - 0x103b9c55, - 0x103c1c6f, - 0x103c9c77, - 0x103d1ca2, - 0x103d9a33, - 0x103e1ccb, - 0x103e9cf8, - 0x103f1d0b, - 0x103f9d14, - 0x10401ca9, - 0x10409a6e, - 0x10411baf, - 0x10419bf8, - 0x10421c12, - 0x10429c91, - 0x10431cbb, - 0x10439a56, - 0x10441b99, - 0x10449bc4, - 0x10451bdf, - 0x10459c7f, - 0x10461cdd, - 0x14320a68, - 0x14328a76, - 0x14330a82, - 0x14338a8f, - 0x183612b1, - 0x183712df, - 0x183792f0, - 0x18381306, - 0x18391329, - 0x1839933e, - 0x183a1350, - 0x183c1394, - 0x183c93a2, - 0x183d13b5, - 0x183d93c5, - 0x183e93eb, - 0x183f13fe, - 0x183f940d, - 0x18409437, - 0x184114a3, - 0x184194b4, - 0x184214c7, - 0x184294d9, - 0x184314eb, - 0x184394fc, - 0x1844150d, - 0x1844951e, - 0x1845152f, - 0x1845953c, - 0x1846155e, - 0x18469571, - 0x18471585, - 0x18479592, - 0x184815a1, - 0x184895b0, - 0x184915c1, - 0x184995dd, - 0x184a15eb, - 0x184a95fc, - 0x184b160d, - 0x184b961b, - 0x184c162b, - 0x184c9651, - 0x184d1660, - 0x184d9670, - 0x184e1680, - 0x184e968f, - 0x184f15ce, - 0x184f9240, - 0x185011e3, - 0x185091fb, - 0x1851121d, - 0x1851922f, - 0x18521261, - 0x1852927a, - 0x1853128b, - 0x185392a1, - 0x185412c6, - 0x18549317, - 0x18551360, - 0x18559375, - 0x18561382, - 0x185693da, - 0x1857141d, - 0x1857942a, - 0x18581446, - 0x18589457, - 0x18591467, - 0x18599477, - 0x185a1486, - 0x185a9495, - 0x185b154a, - 0x1c3206d2, - 0x1c3286de, - 0x1c3306e9, - 0x1c3386f5, - 0x203216a3, - 0x203296ae, - 0x203316b6, - 0x203396c2, - 0x243216ce, - 0x243296dc, - 0x243316ee, - 0x243396fd, - 0x24341710, - 0x24349723, - 0x2435173a, - 0x24359752, - 0x24361760, - 0x24369778, - 0x24371781, - 0x24379793, - 0x243817a7, - 0x243897b4, - 0x243917ca, - 0x243997e2, - 0x243a17fa, - 0x243a9804, - 0x243b1819, - 0x243b9827, - 0x243c183f, - 0x243c9856, - 0x243d1861, - 0x243d986f, - 0x28320ac8, - 0x28328ad7, - 0x28330ae2, - 0x28338ae7, - 0x28340af2, - 0x2c322da2, - 0x2c32adae, - 0x2c332dc1, - 0x2c33add2, - 0x2c342deb, - 0x2c34ae13, - 0x2c352e2a, - 0x2c35ae47, - 0x2c362e64, - 0x2c36ae81, - 0x2c372e9a, - 0x2c37aeb3, - 0x2c382ec9, - 0x2c38aed7, - 0x2c392ee9, - 0x2c39af06, - 0x2c3a2f23, - 0x2c3aaf31, - 0x2c3b2f4f, - 0x2c3baf6d, - 0x2c3c2f88, - 0x2c3caf9c, - 0x2c3d2fae, - 0x2c3dafbe, - 0x2c3e2fcc, - 0x2c3eafdc, - 0x2c3f2fec, - 0x2c3fb02b, - 0x2c40303c, - 0x2c40b057, - 0x2c41306b, - 0x2c41b07e, - 0x2c42309d, - 0x2c42b0b1, - 0x2c4330c4, - 0x2c43b0d3, - 0x2c4430e2, - 0x2c44b0f9, - 0x2c453114, - 0x2c45b12c, - 0x2c463140, - 0x2c46b153, - 0x2c473164, - 0x2c47b175, - 0x2c483186, - 0x2c48b197, - 0x2c4931a6, - 0x2c49b1b3, - 0x2c4a31c0, - 0x2c4ab1cd, - 0x2c4b31d6, - 0x2c4bb1ea, - 0x2c4c31f9, - 0x2c4cb207, - 0x2c4d3229, - 0x2c4db23a, - 0x2c4e324b, - 0x2c4eb216, - 0x2c4f2e04, - 0x2c4fb007, - 0x2c503019, - 0x30320000, - 0x30328018, - 0x3033002c, - 0x30338042, - 0x3034005b, - 0x3034806c, - 0x3035007f, - 0x3035808f, - 0x3036009d, - 0x303680b3, - 0x303700c3, - 0x303780d8, - 0x303800e6, - 0x303880f7, - 0x30390103, - 0x3039810c, - 0x303a011d, - 0x303a812d, - 0x303b013a, - 0x303b8146, - 0x303c0157, - 0x303c8165, - 0x303d0176, - 0x303d8188, - 0x303e0199, - 0x303e81a8, - 0x303f01b9, - 0x303f81cd, - 0x304001df, - 0x304081ec, - 0x30410202, - 0x30418215, - 0x30420225, - 0x30428239, - 0x3043024a, - 0x3043825a, - 0x30440265, - 0x3044826d, - 0x3045027d, - 0x30458294, - 0x304602a1, - 0x304682b7, - 0x304702c9, - 0x304782d5, - 0x304802e1, - 0x304882ef, - 0x30490308, - 0x30498316, - 0x304a032b, - 0x304a8343, - 0x304b034d, - 0x304b8361, - 0x304c0372, - 0x304c8382, - 0x304d038f, - 0x304d83a0, - 0x304e03b0, - 0x304e83c2, - 0x304f03d3, - 0x304f83e2, - 0x305003f6, - 0x30508404, - 0x30510413, - 0x3051841c, - 0x343209f0, - 0x34328a00, - 0x34330a0b, - 0x34338a18, - 0x38320a21, - 0x38328a39, - 0x38330a4c, - 0x38338a56, - 0x3c320b05, - 0x3c328b13, - 0x3c330b2a, - 0x3c338b3e, - 0x3c340b70, - 0x3c348b81, - 0x3c350b8d, - 0x3c358bba, - 0x3c360bcc, - 0x3c368bf5, - 0x3c370c02, - 0x3c378c0f, - 0x3c380c1d, - 0x3c388c2a, - 0x3c390c37, - 0x3c398c5b, - 0x3c3a0c6b, - 0x3c3a8c83, - 0x3c3b0c98, - 0x3c3b8cad, - 0x3c3c0cba, - 0x3c3c8ccd, - 0x3c3d0ce0, - 0x3c3d8d04, - 0x3c3e0d2c, - 0x3c3e8d45, - 0x3c3f0d5b, - 0x3c3f8d68, - 0x3c400d7b, - 0x3c408d8c, - 0x3c410d9d, - 0x3c418db6, - 0x3c420dcf, - 0x3c428de5, - 0x3c430e02, - 0x3c438e18, - 0x3c440e9c, - 0x3c448ec3, - 0x3c450ee1, - 0x3c458efb, - 0x3c460f13, - 0x3c468f2b, - 0x3c470f56, - 0x3c478f81, - 0x3c480fa2, - 0x3c488fcb, - 0x3c490fe6, - 0x3c49900f, - 0x3c4a101c, - 0x3c4a9033, - 0x3c4b104a, - 0x3c4b9073, - 0x3c4c1083, - 0x3c4c908f, - 0x3c4d10a7, - 0x3c4d90ba, - 0x3c4e10cb, - 0x3c4e90dc, - 0x3c4f1102, - 0x3c4f8af9, - 0x3c500e34, - 0x3c508e54, - 0x3c510e81, - 0x3c519001, - 0x3c5210ec, - 0x3c528ba1, - 0x3c530b59, - 0x40321d54, - 0x40329d8d, - 0x40331db5, - 0x40339dcd, - 0x40341deb, - 0x40349e51, - 0x40351e68, - 0x40359e84, - 0x40361ea0, - 0x40369eba, - 0x40371ed9, - 0x40379ef8, - 0x40381f10, - 0x40389f2d, - 0x40391f50, - 0x40399f6d, - 0x403a1fa2, - 0x403a9ffc, - 0x403b2011, - 0x403ba02d, - 0x403c2047, - 0x403ca052, - 0x403d2075, - 0x403da099, - 0x403e20af, - 0x403ea0b9, - 0x403f20c5, - 0x403fa0d6, - 0x404020ee, - 0x4040a0f6, - 0x404120ff, - 0x4041a108, - 0x40422130, - 0x4042a144, - 0x4043214f, - 0x4043a15b, - 0x404421af, - 0x4044a1bb, - 0x404521c8, - 0x4045a1db, - 0x404621f3, - 0x4046a20b, - 0x40472221, - 0x4047a23c, - 0x40482257, - 0x4048a26b, - 0x40492284, - 0x4049a29d, - 0x404a22b7, - 0x404aa2c1, - 0x404b1fc4, - 0x404b9fe3, - 0x404c22d1, - 0x404ca2df, - 0x404d22ec, - 0x404da300, - 0x404e2318, - 0x404ea326, - 0x404f2350, - 0x404fa367, - 0x40502379, - 0x4050a3aa, - 0x405123db, - 0x4051a3f0, - 0x40522413, - 0x4052a433, - 0x405324b6, - 0x4053a4c6, - 0x4054a4d2, - 0x405524e8, - 0x4055a528, - 0x40562535, - 0x4056a53f, - 0x4057254d, - 0x4057a568, - 0x40582583, - 0x4058a5a2, - 0x405925b7, - 0x4059a5cc, - 0x405a25e9, - 0x405aa5fd, - 0x405b2619, - 0x405ba62f, - 0x405c264c, - 0x405ca65e, - 0x405d2675, - 0x405da686, - 0x405e26a2, - 0x405ea6b6, - 0x405f26c6, - 0x405fa6e2, - 0x406026f7, - 0x4060a70d, - 0x4061272a, - 0x4061a743, - 0x4062276d, - 0x4062a776, - 0x40632786, - 0x4063a7bf, - 0x406427d5, - 0x4064a7f3, - 0x40652808, - 0x4065a825, - 0x4066283c, - 0x4066a85a, - 0x40672877, - 0x4067a88e, - 0x406828ac, - 0x4068a8c3, - 0x406928db, - 0x4069a8ec, - 0x406a28ff, - 0x406aa912, - 0x406b2926, - 0x406ba94a, - 0x406c2965, - 0x406ca986, - 0x406d29aa, - 0x406da9c5, - 0x406e29e6, - 0x406ea9fb, - 0x406f2a14, - 0x406faa21, - 0x40702a2f, - 0x4070aa3c, - 0x40712a59, - 0x4071aa79, - 0x40722a94, - 0x4072aaad, - 0x40732ac4, - 0x4073aade, - 0x40742b02, - 0x4074ab18, - 0x40752b2c, - 0x4075ab41, - 0x40762b5b, - 0x4076ab6d, - 0x40772b82, - 0x4077aba8, - 0x40782bc5, - 0x4078abe8, - 0x40792c0e, - 0x4079ac2b, - 0x407a2c4e, - 0x407aac6a, - 0x407b2c86, - 0x407bac98, - 0x407c2ca5, - 0x407e2cb2, - 0x407eacc8, - 0x407f2ce0, - 0x407facf3, - 0x40802d08, - 0x4080ad21, - 0x40812d3f, - 0x4081ad5f, - 0x40822d68, - 0x4082ad84, - 0x40832d8d, - 0x4083a335, - 0x408423c4, - 0x4084a394, - 0x408527ae, - 0x4085a792, - 0x40861e29, - 0x40869e3c, - 0x4087218f, - 0x4087a19e, - 0x40881d99, - 0x4088a118, - 0x40892176, - 0x4089a756, - 0x408a1d1f, - 0x408a9d30, - 0x408b1d42, - 0x408ba401, - 0x408c1f8b, - 0x408c9fb2, - 0x408d2506, - 0x408d9d6e, - 0x408e1e0a, - 0x408ea448, - 0x408f2461, - 0x408fa47a, - 0x40902498, - 0x4432042a, - 0x4432843c, - 0x44330445, - 0x4433844d, - 0x4434045a, - 0x44348475, - 0x44350490, - 0x443584b0, - 0x443604cc, - 0x443684ed, - 0x443704f4, - 0x44378502, - 0x4438050c, - 0x44388518, - 0x44390522, - 0x4439852d, - 0x443a0537, - 0x443a8541, - 0x443b046a, - 0x4c321877, - 0x4c329886, - 0x4c331895, - 0x4c3398ae, - 0x4c3418c9, - 0x4c3498e5, - 0x4c3518f7, - 0x4c359905, - 0x4c36191a, - 0x4c36992b, - 0x4c371939, - 0x4c379947, - 0x4c381959, - 0x4c389969, - 0x4c391973, - 0x4c39998b, - 0x4c3a19a3, - 0x4c3a99b6, - 0x5032325c, - 0x5032b271, - 0x50333282, - 0x5033b295, - 0x503432a6, - 0x5034b2b9, - 0x503532c8, - 0x5035b2dd, - 0x503632ed, - 0x5036b2fc, - 0x5037330d, - 0x5037b31d, - 0x5038332e, - 0x5038b341, - 0x50393353, - 0x5039b369, - 0x503a337b, - 0x503ab38c, - 0x503b339d, - 0x503bb3ae, - 0x503c33b9, - 0x503cb3c5, - 0x503d33d0, - 0x503db3db, - 0x503e33e8, - 0x503eb3fd, - 0x503f340b, - 0x503fb41f, - 0x50403432, - 0x5040b443, - 0x5041345d, - 0x5041b46c, - 0x50423475, - 0x5042b484, - 0x50433496, - 0x5043b4a2, - 0x504434aa, - 0x5044b4bd, - 0x504534ce, - 0x5045b4e4, - 0x504634f0, - 0x5046b504, - 0x50473512, - 0x5047b526, - 0x50483540, - 0x5048b554, - 0x5049356a, - 0x5049b581, - 0x504a3593, - 0x504ab5a7, - 0x504b35bc, - 0x504bb5d3, - 0x504c35e7, - 0x504cb5f0, - 0x504d35f8, - 0x504db607, - 0x504e3617, - 0x6832116d, - 0x6832917e, - 0x6833118e, - 0x683391b7, - 0x683411c4, - 0x683491a9, - 0x68351123, - 0x68359138, - 0x6836114a, - 0x6836915a, - 0x6837119c, - 0x683811d5, - 0x6c321112, - 0x74320aa3, - 0x74328ab5, - 0x78320702, - 0x78328735, - 0x78330747, - 0x78338759, - 0x7834076d, - 0x78348781, - 0x7835079f, - 0x783587b1, - 0x783607c5, - 0x78368833, - 0x78370845, - 0x78378857, - 0x78380869, - 0x78388880, - 0x78390897, - 0x783988ae, - 0x783a08ca, - 0x783a88e6, - 0x783b0902, - 0x783b8918, - 0x783c092e, - 0x783c8944, - 0x783d0961, - 0x783d8970, - 0x783e097f, - 0x783e898e, - 0x783f09aa, - 0x783f89b8, - 0x784009c6, - 0x784089d4, - 0x784109e1, - 0x78418714, - 0x784207d9, - 0x784287f7, - 0x78430815, - 0x8032169e, -}; - -const size_t kOpenSSLFunctionValuesLen = sizeof(kOpenSSLFunctionValues) / sizeof(kOpenSSLFunctionValues[0]); - -const char kOpenSSLFunctionStringData[] = - "ASN1_BIT_STRING_set_bit\0" - "ASN1_ENUMERATED_set\0" - "ASN1_ENUMERATED_to_BN\0" - "ASN1_GENERALIZEDTIME_adj\0" - "ASN1_INTEGER_set\0" - "ASN1_INTEGER_to_BN\0" - "ASN1_OBJECT_new\0" - "ASN1_PCTX_new\0" - "ASN1_STRING_TABLE_add\0" - "ASN1_STRING_set\0" - "ASN1_STRING_type_new\0" - "ASN1_TIME_adj\0" - "ASN1_UTCTIME_adj\0" - "ASN1_d2i_fp\0" - "ASN1_dup\0" - "ASN1_generate_v3\0" - "ASN1_get_object\0" - "ASN1_i2d_bio\0" - "ASN1_i2d_fp\0" - "ASN1_item_d2i_fp\0" - "ASN1_item_dup\0" - "ASN1_item_ex_d2i\0" - "ASN1_item_i2d_bio\0" - "ASN1_item_i2d_fp\0" - "ASN1_item_pack\0" - "ASN1_item_unpack\0" - "ASN1_mbstring_ncopy\0" - "ASN1_template_new\0" - "BIO_new_NDEF\0" - "BN_to_ASN1_ENUMERATED\0" - "BN_to_ASN1_INTEGER\0" - "a2d_ASN1_OBJECT\0" - "a2i_ASN1_ENUMERATED\0" - "a2i_ASN1_INTEGER\0" - "a2i_ASN1_STRING\0" - "append_exp\0" - "asn1_cb\0" - "asn1_check_tlen\0" - "asn1_collate_primitive\0" - "asn1_collect\0" - "asn1_d2i_ex_primitive\0" - "asn1_d2i_read_bio\0" - "asn1_do_adb\0" - "asn1_ex_c2i\0" - "asn1_find_end\0" - "asn1_item_ex_combine_new\0" - "asn1_str2type\0" - "asn1_template_ex_d2i\0" - "asn1_template_noexp_d2i\0" - "bitstr_cb\0" - "c2i_ASN1_BIT_STRING\0" - "c2i_ASN1_INTEGER\0" - "c2i_ASN1_OBJECT\0" - "collect_data\0" - "d2i_ASN1_BOOLEAN\0" - "d2i_ASN1_OBJECT\0" - "d2i_ASN1_UINTEGER\0" - "d2i_ASN1_UTCTIME\0" - "d2i_ASN1_bytes\0" - "d2i_ASN1_type_bytes\0" - "i2d_ASN1_TIME\0" - "i2d_PrivateKey\0" - "long_c2i\0" - "parse_tagging\0" - "BIO_callback_ctrl\0" - "BIO_ctrl\0" - "BIO_new\0" - "BIO_new_file\0" - "BIO_new_mem_buf\0" - "BIO_printf\0" - "BIO_zero_copy_get_read_buf\0" - "BIO_zero_copy_get_read_buf_done\0" - "BIO_zero_copy_get_write_buf\0" - "BIO_zero_copy_get_write_buf_done\0" - "bio_io\0" - "bio_make_pair\0" - "bio_write\0" - "buffer_ctrl\0" - "conn_ctrl\0" - "conn_state\0" - "file_ctrl\0" - "file_read\0" - "mem_write\0" - "BN_CTX_get\0" - "BN_CTX_new\0" - "BN_CTX_start\0" - "BN_bn2cbb\0" - "BN_bn2dec\0" - "BN_bn2hex\0" - "BN_cbs2unsigned\0" - "BN_div\0" - "BN_div_recp\0" - "BN_exp\0" - "BN_generate_dsa_nonce\0" - "BN_generate_prime_ex\0" - "BN_lshift\0" - "BN_mod_exp2_mont\0" - "BN_mod_exp_mont\0" - "BN_mod_exp_mont_consttime\0" - "BN_mod_exp_mont_word\0" - "BN_mod_inverse\0" - "BN_mod_inverse_no_branch\0" - "BN_mod_lshift_quick\0" - "BN_mod_sqrt\0" - "BN_new\0" - "BN_rand\0" - "BN_rand_range\0" - "BN_rshift\0" - "BN_sqrt\0" - "BN_usub\0" - "bn_wexpand\0" - "mod_exp_recp\0" - "BUF_MEM_new\0" - "BUF_memdup\0" - "BUF_strndup\0" - "buf_mem_grow\0" - "EVP_AEAD_CTX_init\0" - "EVP_AEAD_CTX_init_with_direction\0" - "EVP_AEAD_CTX_open\0" - "EVP_AEAD_CTX_seal\0" - "EVP_CIPHER_CTX_copy\0" - "EVP_CIPHER_CTX_ctrl\0" - "EVP_CIPHER_CTX_set_key_length\0" - "EVP_CipherInit_ex\0" - "EVP_DecryptFinal_ex\0" - "EVP_EncryptFinal_ex\0" - "aead_aes_ctr_hmac_sha256_init\0" - "aead_aes_ctr_hmac_sha256_open\0" - "aead_aes_ctr_hmac_sha256_seal\0" - "aead_aes_gcm_init\0" - "aead_aes_gcm_open\0" - "aead_aes_gcm_seal\0" - "aead_aes_key_wrap_init\0" - "aead_aes_key_wrap_open\0" - "aead_aes_key_wrap_seal\0" - "aead_chacha20_poly1305_init\0" - "aead_chacha20_poly1305_open\0" - "aead_chacha20_poly1305_seal\0" - "aead_rc4_md5_tls_init\0" - "aead_rc4_md5_tls_open\0" - "aead_rc4_md5_tls_seal\0" - "aead_ssl3_ensure_cipher_init\0" - "aead_ssl3_init\0" - "aead_ssl3_open\0" - "aead_ssl3_seal\0" - "aead_tls_ensure_cipher_init\0" - "aead_tls_init\0" - "aead_tls_open\0" - "aead_tls_seal\0" - "aes_init_key\0" - "aesni_init_key\0" - "CONF_parse_list\0" - "NCONF_load\0" - "def_load_bio\0" - "str_copy\0" - "CRYPTO_get_ex_new_index\0" - "CRYPTO_set_ex_data\0" - "get_class\0" - "get_func_pointers\0" - "DH_new_method\0" - "compute_key\0" - "generate_key\0" - "generate_parameters\0" - "EVP_DigestInit_ex\0" - "EVP_MD_CTX_copy_ex\0" - "DSA_new_method\0" - "dsa_sig_cb\0" - "sign\0" - "sign_setup\0" - "verify\0" - "BN_to_felem\0" - "EC_GROUP_copy\0" - "EC_GROUP_get_curve_GFp\0" - "EC_GROUP_get_degree\0" - "EC_GROUP_new_by_curve_name\0" - "EC_GROUP_new_curve_GFp\0" - "EC_KEY_check_key\0" - "EC_KEY_copy\0" - "EC_KEY_generate_key\0" - "EC_KEY_new_by_curve_name\0" - "EC_KEY_new_method\0" - "EC_KEY_set_public_key_affine_coordinates\0" - "EC_POINT_add\0" - "EC_POINT_cmp\0" - "EC_POINT_copy\0" - "EC_POINT_dbl\0" - "EC_POINT_dup\0" - "EC_POINT_get_affine_coordinates_GFp\0" - "EC_POINT_invert\0" - "EC_POINT_is_at_infinity\0" - "EC_POINT_is_on_curve\0" - "EC_POINT_make_affine\0" - "EC_POINT_new\0" - "EC_POINT_oct2point\0" - "EC_POINT_point2oct\0" - "EC_POINT_set_affine_coordinates_GFp\0" - "EC_POINT_set_compressed_coordinates_GFp\0" - "EC_POINT_set_to_infinity\0" - "EC_POINTs_make_affine\0" - "compute_wNAF\0" - "d2i_ECPKParameters\0" - "d2i_ECParameters\0" - "d2i_ECPrivateKey\0" - "ec_GFp_mont_field_decode\0" - "ec_GFp_mont_field_encode\0" - "ec_GFp_mont_field_mul\0" - "ec_GFp_mont_field_set_to_one\0" - "ec_GFp_mont_field_sqr\0" - "ec_GFp_mont_group_set_curve\0" - "ec_GFp_nistp256_group_set_curve\0" - "ec_GFp_nistp256_point_get_affine_coordinates\0" - "ec_GFp_nistp256_points_mul\0" - "ec_GFp_simple_group_check_discriminant\0" - "ec_GFp_simple_group_set_curve\0" - "ec_GFp_simple_make_affine\0" - "ec_GFp_simple_oct2point\0" - "ec_GFp_simple_point2oct\0" - "ec_GFp_simple_point_get_affine_coordinates\0" - "ec_GFp_simple_point_set_affine_coordinates\0" - "ec_GFp_simple_points_make_affine\0" - "ec_GFp_simple_set_compressed_coordinates\0" - "ec_asn1_group2pkparameters\0" - "ec_asn1_pkparameters2group\0" - "ec_group_copy\0" - "ec_group_new\0" - "ec_group_new_curve_GFp\0" - "ec_group_new_from_data\0" - "ec_point_set_Jprojective_coordinates_GFp\0" - "ec_pre_comp_new\0" - "ec_wNAF_mul\0" - "ec_wNAF_precompute_mult\0" - "i2d_ECPKParameters\0" - "i2d_ECParameters\0" - "i2d_ECPrivateKey\0" - "i2o_ECPublicKey\0" - "nistp256_pre_comp_new\0" - "o2i_ECPublicKey\0" - "ECDH_compute_key\0" - "ECDSA_SIG_from_bytes\0" - "ECDSA_SIG_marshal\0" - "ECDSA_SIG_parse\0" - "ECDSA_SIG_to_bytes\0" - "ECDSA_do_sign_ex\0" - "ECDSA_do_verify\0" - "ECDSA_sign_ex\0" - "ECDSA_verify\0" - "d2i_ECDSA_SIG\0" - "digest_to_bn\0" - "ecdsa_sign_setup\0" - "i2d_ECDSA_SIG\0" - "EVP_DigestSignAlgorithm\0" - "EVP_DigestVerifyInitFromAlgorithm\0" - "EVP_PKEY_CTX_ctrl\0" - "EVP_PKEY_CTX_dup\0" - "EVP_PKEY_CTX_get0_rsa_oaep_label\0" - "EVP_PKEY_copy_parameters\0" - "EVP_PKEY_decrypt\0" - "EVP_PKEY_decrypt_init\0" - "EVP_PKEY_derive\0" - "EVP_PKEY_derive_init\0" - "EVP_PKEY_derive_set_peer\0" - "EVP_PKEY_encrypt\0" - "EVP_PKEY_encrypt_init\0" - "EVP_PKEY_get1_DH\0" - "EVP_PKEY_get1_DSA\0" - "EVP_PKEY_get1_EC_KEY\0" - "EVP_PKEY_get1_RSA\0" - "EVP_PKEY_keygen\0" - "EVP_PKEY_keygen_init\0" - "EVP_PKEY_new\0" - "EVP_PKEY_set_type\0" - "EVP_PKEY_sign\0" - "EVP_PKEY_sign_init\0" - "EVP_PKEY_verify\0" - "EVP_PKEY_verify_init\0" - "check_padding_md\0" - "d2i_AutoPrivateKey\0" - "d2i_PrivateKey\0" - "do_EC_KEY_print\0" - "do_dsa_print\0" - "do_rsa_print\0" - "do_sigver_init\0" - "dsa_param_decode\0" - "dsa_priv_decode\0" - "dsa_priv_encode\0" - "dsa_pub_decode\0" - "dsa_pub_encode\0" - "dsa_sig_print\0" - "eckey_param2type\0" - "eckey_param_decode\0" - "eckey_priv_decode\0" - "eckey_priv_encode\0" - "eckey_pub_decode\0" - "eckey_pub_encode\0" - "eckey_type2param\0" - "evp_pkey_ctx_new\0" - "hmac_signctx\0" - "i2d_PublicKey\0" - "old_dsa_priv_decode\0" - "old_ec_priv_decode\0" - "old_rsa_priv_decode\0" - "pkey_ec_ctrl\0" - "pkey_ec_derive\0" - "pkey_ec_keygen\0" - "pkey_ec_paramgen\0" - "pkey_ec_sign\0" - "pkey_hmac_ctrl\0" - "pkey_rsa_ctrl\0" - "pkey_rsa_decrypt\0" - "pkey_rsa_encrypt\0" - "pkey_rsa_sign\0" - "rsa_algor_to_md\0" - "rsa_digest_verify_init_from_algorithm\0" - "rsa_mgf1_to_md\0" - "rsa_priv_decode\0" - "rsa_priv_encode\0" - "rsa_pss_to_ctx\0" - "rsa_pub_decode\0" - "HKDF\0" - "OBJ_create\0" - "OBJ_dup\0" - "OBJ_nid2obj\0" - "OBJ_txt2obj\0" - "PEM_ASN1_read\0" - "PEM_ASN1_read_bio\0" - "PEM_ASN1_write\0" - "PEM_ASN1_write_bio\0" - "PEM_X509_INFO_read\0" - "PEM_X509_INFO_read_bio\0" - "PEM_X509_INFO_write_bio\0" - "PEM_do_header\0" - "PEM_get_EVP_CIPHER_INFO\0" - "PEM_read\0" - "PEM_read_DHparams\0" - "PEM_read_PrivateKey\0" - "PEM_read_bio\0" - "PEM_read_bio_DHparams\0" - "PEM_read_bio_Parameters\0" - "PEM_read_bio_PrivateKey\0" - "PEM_write\0" - "PEM_write_PrivateKey\0" - "PEM_write_bio\0" - "d2i_PKCS8PrivateKey_bio\0" - "d2i_PKCS8PrivateKey_fp\0" - "do_pk8pkey\0" - "do_pk8pkey_fp\0" - "load_iv\0" - "EVP_PKCS82PKEY\0" - "EVP_PKEY2PKCS8\0" - "PKCS12_get_key_and_certs\0" - "PKCS12_handle_content_info\0" - "PKCS12_handle_content_infos\0" - "PKCS5_pbe2_set_iv\0" - "PKCS5_pbe_set\0" - "PKCS5_pbe_set0_algor\0" - "PKCS5_pbkdf2_set\0" - "PKCS8_decrypt\0" - "PKCS8_encrypt\0" - "PKCS8_encrypt_pbe\0" - "pbe_cipher_init\0" - "pbe_crypt\0" - "pkcs12_item_decrypt_d2i\0" - "pkcs12_item_i2d_encrypt\0" - "pkcs12_key_gen_raw\0" - "pkcs12_pbe_keyivgen\0" - "BN_BLINDING_convert_ex\0" - "BN_BLINDING_create_param\0" - "BN_BLINDING_invert_ex\0" - "BN_BLINDING_new\0" - "BN_BLINDING_update\0" - "RSA_add_pkcs1_prefix\0" - "RSA_check_key\0" - "RSA_marshal_private_key\0" - "RSA_marshal_public_key\0" - "RSA_new_method\0" - "RSA_padding_add_PKCS1_OAEP_mgf1\0" - "RSA_padding_add_PKCS1_PSS_mgf1\0" - "RSA_padding_add_PKCS1_type_1\0" - "RSA_padding_add_PKCS1_type_2\0" - "RSA_padding_add_none\0" - "RSA_padding_check_PKCS1_OAEP_mgf1\0" - "RSA_padding_check_PKCS1_type_1\0" - "RSA_padding_check_PKCS1_type_2\0" - "RSA_padding_check_none\0" - "RSA_parse_private_key\0" - "RSA_parse_public_key\0" - "RSA_private_key_from_bytes\0" - "RSA_private_key_to_bytes\0" - "RSA_public_key_from_bytes\0" - "RSA_public_key_to_bytes\0" - "RSA_recover_crt_params\0" - "RSA_sign\0" - "RSA_verify\0" - "RSA_verify_PKCS1_PSS_mgf1\0" - "decrypt\0" - "encrypt\0" - "i2d_RSAPrivateKey\0" - "i2d_RSAPublicKey\0" - "keygen\0" - "keygen_multiprime\0" - "marshal_integer\0" - "private_transform\0" - "rsa_parse_additional_prime\0" - "rsa_setup_blinding\0" - "sign_raw\0" - "verify_raw\0" - "SSL_AEAD_CTX_new\0" - "SSL_AEAD_CTX_open\0" - "SSL_AEAD_CTX_seal\0" - "SSL_CTX_check_private_key\0" - "SSL_CTX_get_tlsext_ticket_keys\0" - "SSL_CTX_new\0" - "SSL_CTX_set1_tls_channel_id\0" - "SSL_CTX_set_cipher_list\0" - "SSL_CTX_set_cipher_list_tls11\0" - "SSL_CTX_set_session_id_context\0" - "SSL_CTX_set_tlsext_ticket_keys\0" - "SSL_CTX_set_tmp_dh\0" - "SSL_CTX_set_tmp_ecdh\0" - "SSL_CTX_use_PrivateKey\0" - "SSL_CTX_use_PrivateKey_ASN1\0" - "SSL_CTX_use_PrivateKey_file\0" - "SSL_CTX_use_RSAPrivateKey\0" - "SSL_CTX_use_RSAPrivateKey_ASN1\0" - "SSL_CTX_use_RSAPrivateKey_file\0" - "SSL_CTX_use_certificate\0" - "SSL_CTX_use_certificate_ASN1\0" - "SSL_CTX_use_certificate_chain_file\0" - "SSL_CTX_use_certificate_file\0" - "SSL_CTX_use_psk_identity_hint\0" - "SSL_SESSION_from_bytes\0" - "SSL_SESSION_new\0" - "SSL_SESSION_parse\0" - "SSL_SESSION_parse_octet_string\0" - "SSL_SESSION_parse_string\0" - "SSL_SESSION_print_fp\0" - "SSL_SESSION_set1_id_context\0" - "SSL_SESSION_to_bytes_full\0" - "SSL_accept\0" - "SSL_add_dir_cert_subjects_to_stack\0" - "SSL_add_file_cert_subjects_to_stack\0" - "SSL_check_private_key\0" - "SSL_clear\0" - "SSL_connect\0" - "SSL_do_handshake\0" - "SSL_load_client_CA_file\0" - "SSL_new\0" - "SSL_peek\0" - "SSL_read\0" - "SSL_renegotiate\0" - "SSL_set1_tls_channel_id\0" - "SSL_set_cipher_list\0" - "SSL_set_fd\0" - "SSL_set_rfd\0" - "SSL_set_session_id_context\0" - "SSL_set_tlsext_host_name\0" - "SSL_set_tmp_dh\0" - "SSL_set_tmp_ecdh\0" - "SSL_set_wfd\0" - "SSL_shutdown\0" - "SSL_use_PrivateKey\0" - "SSL_use_PrivateKey_ASN1\0" - "SSL_use_PrivateKey_file\0" - "SSL_use_RSAPrivateKey\0" - "SSL_use_RSAPrivateKey_ASN1\0" - "SSL_use_RSAPrivateKey_file\0" - "SSL_use_certificate\0" - "SSL_use_certificate_ASN1\0" - "SSL_use_certificate_file\0" - "SSL_use_psk_identity_hint\0" - "SSL_write\0" - "d2i_SSL_SESSION\0" - "do_ssl3_write\0" - "dtls1_accept\0" - "dtls1_buffer_record\0" - "dtls1_check_timeout_num\0" - "dtls1_connect\0" - "dtls1_do_write\0" - "dtls1_get_buffered_message\0" - "dtls1_get_hello_verify\0" - "dtls1_get_message\0" - "dtls1_get_message_fragment\0" - "dtls1_hm_fragment_new\0" - "dtls1_preprocess_fragment\0" - "dtls1_process_fragment\0" - "dtls1_process_record\0" - "dtls1_read_bytes\0" - "dtls1_seal_record\0" - "dtls1_send_hello_verify_request\0" - "dtls1_write_app_data\0" - "ext_ri_parse_clienthello\0" - "ext_ri_parse_serverhello\0" - "ext_sigalgs_parse_clienthello\0" - "ext_sigalgs_parse_serverhello\0" - "i2d_SSL_SESSION\0" - "ssl3_accept\0" - "ssl3_cert_verify_hash\0" - "ssl3_check_cert_and_algorithm\0" - "ssl3_check_certificate_for_cipher\0" - "ssl3_connect\0" - "ssl3_ctrl\0" - "ssl3_ctx_ctrl\0" - "ssl3_digest_cached_records\0" - "ssl3_do_change_cipher_spec\0" - "ssl3_expect_change_cipher_spec\0" - "ssl3_get_cert_status\0" - "ssl3_get_cert_verify\0" - "ssl3_get_certificate_request\0" - "ssl3_get_channel_id\0" - "ssl3_get_client_certificate\0" - "ssl3_get_client_hello\0" - "ssl3_get_client_key_exchange\0" - "ssl3_get_finished\0" - "ssl3_get_initial_bytes\0" - "ssl3_get_message\0" - "ssl3_get_new_session_ticket\0" - "ssl3_get_next_proto\0" - "ssl3_get_record\0" - "ssl3_get_server_certificate\0" - "ssl3_get_server_done\0" - "ssl3_get_server_hello\0" - "ssl3_get_server_key_exchange\0" - "ssl3_get_v2_client_hello\0" - "ssl3_handshake_mac\0" - "ssl3_output_cert_chain\0" - "ssl3_prf\0" - "ssl3_read_bytes\0" - "ssl3_read_n\0" - "ssl3_record_sequence_update\0" - "ssl3_seal_record\0" - "ssl3_send_cert_verify\0" - "ssl3_send_certificate_request\0" - "ssl3_send_channel_id\0" - "ssl3_send_client_certificate\0" - "ssl3_send_client_hello\0" - "ssl3_send_client_key_exchange\0" - "ssl3_send_server_certificate\0" - "ssl3_send_server_hello\0" - "ssl3_send_server_key_exchange\0" - "ssl3_setup_read_buffer\0" - "ssl3_setup_write_buffer\0" - "ssl3_write_bytes\0" - "ssl3_write_pending\0" - "ssl_add_cert_chain\0" - "ssl_add_cert_to_buf\0" - "ssl_add_clienthello_renegotiate_ext\0" - "ssl_add_clienthello_tlsext\0" - "ssl_add_clienthello_use_srtp_ext\0" - "ssl_add_serverhello_renegotiate_ext\0" - "ssl_add_serverhello_tlsext\0" - "ssl_add_serverhello_use_srtp_ext\0" - "ssl_build_cert_chain\0" - "ssl_bytes_to_cipher_list\0" - "ssl_cert_dup\0" - "ssl_cert_inst\0" - "ssl_cert_new\0" - "ssl_check_serverhello_tlsext\0" - "ssl_check_srvr_ecc_cert_and_alg\0" - "ssl_cipher_process_rulestr\0" - "ssl_cipher_strength_sort\0" - "ssl_create_cipher_list\0" - "ssl_ctx_log_master_secret\0" - "ssl_ctx_log_rsa_client_key_exchange\0" - "ssl_ctx_make_profiles\0" - "ssl_get_new_session\0" - "ssl_get_prev_session\0" - "ssl_get_server_cert_index\0" - "ssl_get_sign_pkey\0" - "ssl_init_wbio_buffer\0" - "ssl_parse_clienthello_renegotiate_ext\0" - "ssl_parse_clienthello_tlsext\0" - "ssl_parse_clienthello_use_srtp_ext\0" - "ssl_parse_serverhello_renegotiate_ext\0" - "ssl_parse_serverhello_tlsext\0" - "ssl_parse_serverhello_use_srtp_ext\0" - "ssl_scan_clienthello_tlsext\0" - "ssl_scan_serverhello_tlsext\0" - "ssl_sess_cert_new\0" - "ssl_set_cert\0" - "ssl_set_pkey\0" - "ssl_verify_cert_chain\0" - "tls12_check_peer_sigalg\0" - "tls1_aead_ctx_init\0" - "tls1_cert_verify_mac\0" - "tls1_change_cipher_state\0" - "tls1_change_cipher_state_aead\0" - "tls1_check_duplicate_extensions\0" - "tls1_enc\0" - "tls1_export_keying_material\0" - "tls1_prf\0" - "tls1_setup_key_block\0" - "ASN1_digest\0" - "ASN1_item_sign_ctx\0" - "ASN1_item_verify\0" - "NETSCAPE_SPKI_b64_decode\0" - "NETSCAPE_SPKI_b64_encode\0" - "PKCS7_get_CRLs\0" - "PKCS7_get_certificates\0" - "X509_ATTRIBUTE_create_by_NID\0" - "X509_ATTRIBUTE_create_by_OBJ\0" - "X509_ATTRIBUTE_create_by_txt\0" - "X509_ATTRIBUTE_get0_data\0" - "X509_ATTRIBUTE_set1_data\0" - "X509_CRL_add0_revoked\0" - "X509_CRL_diff\0" - "X509_CRL_print_fp\0" - "X509_EXTENSION_create_by_NID\0" - "X509_EXTENSION_create_by_OBJ\0" - "X509_INFO_new\0" - "X509_NAME_ENTRY_create_by_NID\0" - "X509_NAME_ENTRY_create_by_txt\0" - "X509_NAME_ENTRY_set_object\0" - "X509_NAME_add_entry\0" - "X509_NAME_oneline\0" - "X509_NAME_print\0" - "X509_PKEY_new\0" - "X509_PUBKEY_get\0" - "X509_PUBKEY_set\0" - "X509_REQ_check_private_key\0" - "X509_REQ_print_ex\0" - "X509_REQ_print_fp\0" - "X509_REQ_to_X509\0" - "X509_STORE_CTX_get1_issuer\0" - "X509_STORE_CTX_init\0" - "X509_STORE_CTX_new\0" - "X509_STORE_CTX_purpose_inherit\0" - "X509_STORE_add_cert\0" - "X509_STORE_add_crl\0" - "X509_TRUST_add\0" - "X509_TRUST_set\0" - "X509_check_private_key\0" - "X509_get_pubkey_parameters\0" - "X509_load_cert_crl_file\0" - "X509_load_cert_file\0" - "X509_load_crl_file\0" - "X509_print_ex_fp\0" - "X509_to_X509_REQ\0" - "X509_verify_cert\0" - "X509at_add1_attr\0" - "X509v3_add_ext\0" - "add_cert_dir\0" - "by_file_ctrl\0" - "check_policy\0" - "dir_ctrl\0" - "get_cert_by_subject\0" - "i2d_DSA_PUBKEY\0" - "i2d_EC_PUBKEY\0" - "i2d_RSA_PUBKEY\0" - "pkcs7_parse_header\0" - "x509_name_encode\0" - "x509_name_ex_d2i\0" - "x509_name_ex_new\0" - "SXNET_add_id_INTEGER\0" - "SXNET_add_id_asc\0" - "SXNET_add_id_ulong\0" - "SXNET_get_id_asc\0" - "SXNET_get_id_ulong\0" - "X509V3_EXT_add\0" - "X509V3_EXT_add_alias\0" - "X509V3_EXT_free\0" - "X509V3_EXT_i2d\0" - "X509V3_EXT_nconf\0" - "X509V3_add1_i2d\0" - "X509V3_add_value\0" - "X509V3_get_section\0" - "X509V3_get_string\0" - "X509V3_get_value_bool\0" - "X509V3_parse_list\0" - "X509_PURPOSE_add\0" - "X509_PURPOSE_set\0" - "a2i_GENERAL_NAME\0" - "copy_email\0" - "copy_issuer\0" - "do_dirname\0" - "do_ext_i2d\0" - "do_ext_nconf\0" - "gnames_from_sectname\0" - "hex_to_string\0" - "i2s_ASN1_ENUMERATED\0" - "i2s_ASN1_IA5STRING\0" - "i2s_ASN1_INTEGER\0" - "i2v_AUTHORITY_INFO_ACCESS\0" - "notice_section\0" - "nref_nos\0" - "policy_section\0" - "process_pci_value\0" - "r2i_certpol\0" - "r2i_pci\0" - "s2i_ASN1_IA5STRING\0" - "s2i_ASN1_INTEGER\0" - "s2i_ASN1_OCTET_STRING\0" - "s2i_skey_id\0" - "set_dist_point_name\0" - "string_to_hex\0" - "v2i_ASN1_BIT_STRING\0" - "v2i_AUTHORITY_INFO_ACCESS\0" - "v2i_AUTHORITY_KEYID\0" - "v2i_BASIC_CONSTRAINTS\0" - "v2i_EXTENDED_KEY_USAGE\0" - "v2i_GENERAL_NAMES\0" - "v2i_GENERAL_NAME_ex\0" - "v2i_NAME_CONSTRAINTS\0" - "v2i_POLICY_CONSTRAINTS\0" - "v2i_POLICY_MAPPINGS\0" - "v2i_crld\0" - "v2i_idp\0" - "v2i_issuer_alt\0" - "v2i_subject_alt\0" - "v3_generic_extension\0" - ""; - -const uint32_t kOpenSSLReasonValues[] = { - 0xc3207ba, - 0xc3287d4, - 0xc3307e3, - 0xc3387f3, - 0xc340802, - 0xc34881b, - 0xc350827, - 0xc358844, - 0xc360856, - 0xc368864, - 0xc370874, - 0xc378881, - 0xc380891, - 0xc38889c, - 0xc3908b2, - 0xc3988c1, - 0xc3a08d5, - 0xc3a87c7, - 0xc3b00b0, - 0x10321478, - 0x10329484, - 0x1033149d, - 0x103394b0, - 0x10340de1, - 0x103494cf, - 0x103514e4, - 0x10359516, - 0x1036152f, - 0x10369544, - 0x10371562, - 0x10379571, - 0x1038158d, - 0x103895a8, - 0x103915b7, - 0x103995d3, - 0x103a15ee, - 0x103a9605, - 0x103b1616, - 0x103b962a, - 0x103c1649, - 0x103c9658, - 0x103d166f, - 0x103d9682, - 0x103e0b6c, - 0x103e96b3, - 0x103f16c6, - 0x103f96e0, - 0x104016f0, - 0x10409704, - 0x1041171a, - 0x10419732, - 0x10421747, - 0x1042975b, - 0x1043176d, - 0x104385d0, - 0x104408c1, - 0x10449782, - 0x10451799, - 0x104597ae, - 0x104617bc, - 0x10469695, - 0x104714f7, - 0x104787c7, - 0x104800b0, - 0x104894c3, - 0x14320b4f, - 0x14328b5d, - 0x14330b6c, - 0x14338b7e, - 0x18320083, - 0x18328e47, - 0x18340e75, - 0x18348e89, - 0x18358ec0, - 0x18368eed, - 0x18370f00, - 0x18378f14, - 0x18380f38, - 0x18388f46, - 0x18390f5c, - 0x18398f70, - 0x183a0f80, - 0x183b0f90, - 0x183b8fa5, - 0x183c8fd0, - 0x183d0fe4, - 0x183d8ff4, - 0x183e0b9b, - 0x183e9001, - 0x183f1013, - 0x183f901e, - 0x1840102e, - 0x1840903f, - 0x18411050, - 0x18419062, - 0x1842108b, - 0x184290bd, - 0x184310cc, - 0x18451135, - 0x1845914b, - 0x18461166, - 0x18468ed8, - 0x184709d9, - 0x18478094, - 0x18480fbc, - 0x18489101, - 0x18490e5d, - 0x18498e9e, - 0x184a119c, - 0x184a9119, - 0x184b10e0, - 0x184b8e37, - 0x184c10a4, - 0x184c866b, - 0x184d1181, - 0x203211c3, - 0x243211cf, - 0x24328907, - 0x243311e1, - 0x243391ee, - 0x243411fb, - 0x2434920d, - 0x2435121c, - 0x24359239, - 0x24361246, - 0x24369254, - 0x24371262, - 0x24379270, - 0x24381279, - 0x24389286, - 0x24391299, - 0x28320b8f, - 0x28328b9b, - 0x28330b6c, - 0x28338bae, - 0x2c322b64, - 0x2c32ab72, - 0x2c332b84, - 0x2c33ab96, - 0x2c342baa, - 0x2c34abbc, - 0x2c352bd7, - 0x2c35abe9, - 0x2c362bfc, - 0x2c3682f3, - 0x2c372c09, - 0x2c37ac1b, - 0x2c382c2e, - 0x2c38ac3c, - 0x2c392c4c, - 0x2c39ac5e, - 0x2c3a2c72, - 0x2c3aac83, - 0x2c3b1359, - 0x2c3bac94, - 0x2c3c2ca8, - 0x2c3cacbe, - 0x2c3d2cd7, - 0x2c3dad05, - 0x2c3e2d13, - 0x2c3ead2b, - 0x2c3f2d43, - 0x2c3fad50, - 0x2c402d73, - 0x2c40ad92, - 0x2c4111c3, - 0x2c41ada3, - 0x2c422db6, - 0x2c429135, - 0x2c432dc7, - 0x2c4386a2, - 0x2c442cf4, - 0x30320000, - 0x30328015, - 0x3033001f, - 0x30338038, - 0x3034004a, - 0x30348064, - 0x3035006b, - 0x30358083, - 0x30360094, - 0x303680a1, - 0x303700b0, - 0x303780bd, - 0x303800d0, - 0x303880eb, - 0x30390100, - 0x30398114, - 0x303a0128, - 0x303a8139, - 0x303b0152, - 0x303b816f, - 0x303c017d, - 0x303c8191, - 0x303d01a1, - 0x303d81ba, - 0x303e01ca, - 0x303e81dd, - 0x303f01ec, - 0x303f81f8, - 0x3040020d, - 0x3040821d, - 0x30410234, - 0x30418241, - 0x30420254, - 0x30428263, - 0x30430278, - 0x30438299, - 0x304402ac, - 0x304482bf, - 0x304502d8, - 0x304582f3, - 0x30460310, - 0x30468329, - 0x30470337, - 0x30478348, - 0x30480357, - 0x3048836f, - 0x30490381, - 0x30498395, - 0x304a03b4, - 0x304a83c7, - 0x304b03d2, - 0x304b83e1, - 0x304c03f2, - 0x304c83fe, - 0x304d0414, - 0x304d8422, - 0x304e0438, - 0x304e844a, - 0x304f045c, - 0x304f846f, - 0x30500482, - 0x30508493, - 0x305104a3, - 0x305184bb, - 0x305204d0, - 0x305284e8, - 0x305304fc, - 0x30538514, - 0x3054052d, - 0x30548546, - 0x30550563, - 0x3055856e, - 0x30560586, - 0x30568596, - 0x305705a7, - 0x305785ba, - 0x305805d0, - 0x305885d9, - 0x305905ee, - 0x30598601, - 0x305a0610, - 0x305a8630, - 0x305b063f, - 0x305b864b, - 0x305c066b, - 0x305c8687, - 0x305d0698, - 0x305d86a2, - 0x34320ac9, - 0x34328add, - 0x34330afa, - 0x34338b0d, - 0x34340b1c, - 0x34348b39, - 0x3c320083, - 0x3c328bd8, - 0x3c330bf1, - 0x3c338c0c, - 0x3c340c29, - 0x3c348c44, - 0x3c350c5f, - 0x3c358c74, - 0x3c360c8d, - 0x3c368ca5, - 0x3c370cb6, - 0x3c378cc4, - 0x3c380cd1, - 0x3c388ce5, - 0x3c390b9b, - 0x3c398cf9, - 0x3c3a0d0d, - 0x3c3a8881, - 0x3c3b0d1d, - 0x3c3b8d38, - 0x3c3c0d4a, - 0x3c3c8d60, - 0x3c3d0d6a, - 0x3c3d8d7e, - 0x3c3e0d8c, - 0x3c3e8db1, - 0x3c3f0bc4, - 0x3c3f8d9a, - 0x403217d3, - 0x403297e9, - 0x40331817, - 0x40339821, - 0x40341838, - 0x40349856, - 0x40351866, - 0x40359878, - 0x40361885, - 0x40369891, - 0x403718a6, - 0x403798bb, - 0x403818cd, - 0x403898d8, - 0x403918ea, - 0x40398de1, - 0x403a18fa, - 0x403a990d, - 0x403b192e, - 0x403b993f, - 0x403c194f, - 0x403c8064, - 0x403d195b, - 0x403d9977, - 0x403e198d, - 0x403e999c, - 0x403f19af, - 0x403f99c9, - 0x404019d7, - 0x404099ec, - 0x40411a00, - 0x40419a1d, - 0x40421a36, - 0x40429a51, - 0x40431a6a, - 0x40439a7d, - 0x40441a91, - 0x40449aa9, - 0x40451ab9, - 0x40459ac7, - 0x40461ae5, - 0x40468094, - 0x40471afa, - 0x40479b0c, - 0x40481b30, - 0x40489b50, - 0x40491b64, - 0x40499b79, - 0x404a1b92, - 0x404a9bcc, - 0x404b1be6, - 0x404b9c04, - 0x404c1c1f, - 0x404c9c39, - 0x404d1c50, - 0x404d9c78, - 0x404e1c8f, - 0x404e9cab, - 0x404f1cc7, - 0x404f9ce8, - 0x40501d0a, - 0x40509d26, - 0x40511d3a, - 0x40519d47, - 0x40521d5e, - 0x40529d6e, - 0x40531d7e, - 0x40539d92, - 0x40541dad, - 0x40549dbd, - 0x40551dd4, - 0x40559de3, - 0x40561dfe, - 0x40569e16, - 0x40571e32, - 0x40579e4b, - 0x40581e5e, - 0x40589e73, - 0x40591e96, - 0x40599ea4, - 0x405a1eb1, - 0x405a9eca, - 0x405b1ee2, - 0x405b9ef5, - 0x405c1f0a, - 0x405c9f1c, - 0x405d1f31, - 0x405d9f41, - 0x405e1f5a, - 0x405e9f6e, - 0x405f1f7e, - 0x405f9f96, - 0x40601fa7, - 0x40609fba, - 0x40611fcb, - 0x40619fe9, - 0x40621ffa, - 0x4062a007, - 0x4063201e, - 0x4063a05f, - 0x40642076, - 0x4064a083, - 0x40652091, - 0x4065a0b3, - 0x406620db, - 0x4066a0f0, - 0x40672107, - 0x4067a118, - 0x40682129, - 0x4068a13a, - 0x4069214f, - 0x4069a166, - 0x406a2177, - 0x406aa190, - 0x406b21ab, - 0x406ba1c2, - 0x406c222f, - 0x406ca250, - 0x406d2263, - 0x406da284, - 0x406e229f, - 0x406ea2e8, - 0x406f2309, - 0x406fa32f, - 0x4070234f, - 0x4070a36b, - 0x407124f8, - 0x4071a51b, - 0x40722531, - 0x4072a550, - 0x40732568, - 0x4073a588, - 0x407427b2, - 0x4074a7d7, - 0x407527f2, - 0x4075a811, - 0x40762840, - 0x4076a868, - 0x40772899, - 0x4077a8b8, - 0x407828f2, - 0x4078a909, - 0x4079291c, - 0x4079a939, - 0x407a0782, - 0x407aa94b, - 0x407b295e, - 0x407ba977, - 0x407c298f, - 0x407c90bd, - 0x407d29a3, - 0x407da9bd, - 0x407e29ce, - 0x407ea9e2, - 0x407f29f0, - 0x407faa0b, - 0x40801286, - 0x4080aa30, - 0x40812a52, - 0x4081aa6d, - 0x40822a82, - 0x4082aa9a, - 0x40832ab2, - 0x4083aac9, - 0x40842adf, - 0x4084aaeb, - 0x40852afe, - 0x4085ab13, - 0x40862b25, - 0x4086ab3a, - 0x40872b43, - 0x40879c66, - 0x40880083, - 0x4088a03e, - 0x40890a17, - 0x4089a1da, - 0x408a1bb5, - 0x408aa204, - 0x408b2881, - 0x408ba8dd, - 0x408c22ba, - 0x41f42423, - 0x41f924b5, - 0x41fe23a8, - 0x41fea5d9, - 0x41ff26ca, - 0x4203243c, - 0x4208245e, - 0x4208a49a, - 0x4209238c, - 0x4209a4d4, - 0x420a23e3, - 0x420aa3c3, - 0x420b2403, - 0x420ba47c, - 0x420c26e6, - 0x420ca5a6, - 0x420d25c0, - 0x420da5f7, - 0x42122611, - 0x421726ad, - 0x4217a653, - 0x421c2675, - 0x421f2630, - 0x422126fd, - 0x42262690, - 0x422b2796, - 0x422ba75f, - 0x422c277e, - 0x422ca739, - 0x422d2718, - 0x443206ad, - 0x443286bc, - 0x443306c8, - 0x443386d6, - 0x443406e9, - 0x443486fa, - 0x44350701, - 0x4435870b, - 0x4436071e, - 0x44368734, - 0x44370746, - 0x44378753, - 0x44380762, - 0x4438876a, - 0x44390782, - 0x44398790, - 0x443a07a3, - 0x4c3212b0, - 0x4c3292c0, - 0x4c3312d3, - 0x4c3392f3, - 0x4c340094, - 0x4c3480b0, - 0x4c3512ff, - 0x4c35930d, - 0x4c361329, - 0x4c36933c, - 0x4c37134b, - 0x4c379359, - 0x4c38136e, - 0x4c38937a, - 0x4c39139a, - 0x4c3993c4, - 0x4c3a13dd, - 0x4c3a93f6, - 0x4c3b05d0, - 0x4c3b940f, - 0x4c3c1421, - 0x4c3c9430, - 0x4c3d10bd, - 0x4c3d9449, - 0x4c3e1456, - 0x50322dd9, - 0x5032ade8, - 0x50332df3, - 0x5033ae03, - 0x50342e1c, - 0x5034ae36, - 0x50352e44, - 0x5035ae5a, - 0x50362e6c, - 0x5036ae82, - 0x50372e9b, - 0x5037aeae, - 0x50382ec6, - 0x5038aed7, - 0x50392eec, - 0x5039af00, - 0x503a2f20, - 0x503aaf36, - 0x503b2f4e, - 0x503baf60, - 0x503c2f7c, - 0x503caf93, - 0x503d2fac, - 0x503dafc2, - 0x503e2fcf, - 0x503eafe5, - 0x503f2ff7, - 0x503f8348, - 0x5040300a, - 0x5040b01a, - 0x50413034, - 0x5041b043, - 0x5042305d, - 0x5042b07a, - 0x5043308a, - 0x5043b09a, - 0x504430a9, - 0x50448414, - 0x504530bd, - 0x5045b0db, - 0x504630ee, - 0x5046b104, - 0x50473116, - 0x5047b12b, - 0x50483151, - 0x5048b15f, - 0x50493172, - 0x5049b187, - 0x504a319d, - 0x504ab1ad, - 0x504b31cd, - 0x504bb1e0, - 0x504c3203, - 0x504cb231, - 0x504d3243, - 0x504db260, - 0x504e327b, - 0x504eb297, - 0x504f32a9, - 0x504fb2c0, - 0x505032cf, - 0x50508687, - 0x505132e2, - 0x58320e1f, - 0x68320de1, - 0x68328b9b, - 0x68330bae, - 0x68338def, - 0x68340dff, - 0x683480b0, - 0x6c320dbd, - 0x6c328b7e, - 0x6c330dc8, - 0x7432098d, - 0x783208f2, - 0x78328907, - 0x78330913, - 0x78338083, - 0x78340922, - 0x78348937, - 0x78350956, - 0x78358978, - 0x7836098d, - 0x783689a3, - 0x783709b3, - 0x783789c6, - 0x783809d9, - 0x783889eb, - 0x783909f8, - 0x78398a17, - 0x783a0a2c, - 0x783a8a3a, - 0x783b0a44, - 0x783b8a58, - 0x783c0a6f, - 0x783c8a84, - 0x783d0a9b, - 0x783d8ab0, - 0x783e0a06, - 0x803211b2, -}; - -const size_t kOpenSSLReasonValuesLen = sizeof(kOpenSSLReasonValues) / sizeof(kOpenSSLReasonValues[0]); - -const char kOpenSSLReasonStringData[] = - "ASN1_LENGTH_MISMATCH\0" - "AUX_ERROR\0" - "BAD_GET_ASN1_OBJECT_CALL\0" - "BAD_OBJECT_HEADER\0" - "BMPSTRING_IS_WRONG_LENGTH\0" - "BN_LIB\0" - "BOOLEAN_IS_WRONG_LENGTH\0" - "BUFFER_TOO_SMALL\0" - "DECODE_ERROR\0" - "DEPTH_EXCEEDED\0" - "ENCODE_ERROR\0" - "ERROR_GETTING_TIME\0" - "EXPECTING_AN_ASN1_SEQUENCE\0" - "EXPECTING_AN_INTEGER\0" - "EXPECTING_AN_OBJECT\0" - "EXPECTING_A_BOOLEAN\0" - "EXPECTING_A_TIME\0" - "EXPLICIT_LENGTH_MISMATCH\0" - "EXPLICIT_TAG_NOT_CONSTRUCTED\0" - "FIELD_MISSING\0" - "FIRST_NUM_TOO_LARGE\0" - "HEADER_TOO_LONG\0" - "ILLEGAL_BITSTRING_FORMAT\0" - "ILLEGAL_BOOLEAN\0" - "ILLEGAL_CHARACTERS\0" - "ILLEGAL_FORMAT\0" - "ILLEGAL_HEX\0" - "ILLEGAL_IMPLICIT_TAG\0" - "ILLEGAL_INTEGER\0" - "ILLEGAL_NESTED_TAGGING\0" - "ILLEGAL_NULL\0" - "ILLEGAL_NULL_VALUE\0" - "ILLEGAL_OBJECT\0" - "ILLEGAL_OPTIONAL_ANY\0" - "ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE\0" - "ILLEGAL_TAGGED_ANY\0" - "ILLEGAL_TIME_VALUE\0" - "INTEGER_NOT_ASCII_FORMAT\0" - "INTEGER_TOO_LARGE_FOR_LONG\0" - "INVALID_BIT_STRING_BITS_LEFT\0" - "INVALID_BMPSTRING_LENGTH\0" - "INVALID_DIGIT\0" - "INVALID_MODIFIER\0" - "INVALID_NUMBER\0" - "INVALID_OBJECT_ENCODING\0" - "INVALID_SEPARATOR\0" - "INVALID_TIME_FORMAT\0" - "INVALID_UNIVERSALSTRING_LENGTH\0" - "INVALID_UTF8STRING\0" - "LIST_ERROR\0" - "MALLOC_FAILURE\0" - "MISSING_ASN1_EOS\0" - "MISSING_EOC\0" - "MISSING_SECOND_NUMBER\0" - "MISSING_VALUE\0" - "MSTRING_NOT_UNIVERSAL\0" - "MSTRING_WRONG_TAG\0" - "NESTED_ASN1_ERROR\0" - "NESTED_ASN1_STRING\0" - "NON_HEX_CHARACTERS\0" - "NOT_ASCII_FORMAT\0" - "NOT_ENOUGH_DATA\0" - "NO_MATCHING_CHOICE_TYPE\0" - "NULL_IS_WRONG_LENGTH\0" - "OBJECT_NOT_ASCII_FORMAT\0" - "ODD_NUMBER_OF_CHARS\0" - "SECOND_NUMBER_TOO_LARGE\0" - "SEQUENCE_LENGTH_MISMATCH\0" - "SEQUENCE_NOT_CONSTRUCTED\0" - "SEQUENCE_OR_SET_NEEDS_CONFIG\0" - "SHORT_LINE\0" - "STREAMING_NOT_SUPPORTED\0" - "STRING_TOO_LONG\0" - "STRING_TOO_SHORT\0" - "TAG_VALUE_TOO_HIGH\0" - "TIME_NOT_ASCII_FORMAT\0" - "TOO_LONG\0" - "TYPE_NOT_CONSTRUCTED\0" - "TYPE_NOT_PRIMITIVE\0" - "UNEXPECTED_EOC\0" - "UNIVERSALSTRING_IS_WRONG_LENGTH\0" - "UNKNOWN_FORMAT\0" - "UNKNOWN_TAG\0" - "UNSUPPORTED_ANY_DEFINED_BY_TYPE\0" - "UNSUPPORTED_PUBLIC_KEY_TYPE\0" - "UNSUPPORTED_TYPE\0" - "WRONG_TAG\0" - "WRONG_TYPE\0" - "BAD_FOPEN_MODE\0" - "BROKEN_PIPE\0" - "CONNECT_ERROR\0" - "ERROR_SETTING_NBIO\0" - "INVALID_ARGUMENT\0" - "IN_USE\0" - "KEEPALIVE\0" - "NBIO_CONNECT_ERROR\0" - "NO_HOSTNAME_SPECIFIED\0" - "NO_PORT_SPECIFIED\0" - "NO_SUCH_FILE\0" - "NULL_PARAMETER\0" - "SYS_LIB\0" - "UNABLE_TO_CREATE_SOCKET\0" - "UNINITIALIZED\0" - "UNSUPPORTED_METHOD\0" - "WRITE_TO_READ_ONLY_BIO\0" - "ARG2_LT_ARG3\0" - "BAD_ENCODING\0" - "BAD_RECIPROCAL\0" - "BIGNUM_TOO_LONG\0" - "BITS_TOO_SMALL\0" - "CALLED_WITH_EVEN_MODULUS\0" - "DIV_BY_ZERO\0" - "EXPAND_ON_STATIC_BIGNUM_DATA\0" - "INPUT_NOT_REDUCED\0" - "INVALID_RANGE\0" - "NEGATIVE_NUMBER\0" - "NOT_A_SQUARE\0" - "NOT_INITIALIZED\0" - "NO_INVERSE\0" - "PRIVATE_KEY_TOO_LARGE\0" - "P_IS_NOT_PRIME\0" - "TOO_MANY_ITERATIONS\0" - "TOO_MANY_TEMPORARY_VARIABLES\0" - "AES_KEY_SETUP_FAILED\0" - "BAD_DECRYPT\0" - "BAD_KEY_LENGTH\0" - "CTRL_NOT_IMPLEMENTED\0" - "CTRL_OPERATION_NOT_IMPLEMENTED\0" - "DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH\0" - "INITIALIZATION_ERROR\0" - "INPUT_NOT_INITIALIZED\0" - "INVALID_AD_SIZE\0" - "INVALID_KEY_LENGTH\0" - "INVALID_NONCE_SIZE\0" - "INVALID_OPERATION\0" - "IV_TOO_LARGE\0" - "NO_CIPHER_SET\0" - "NO_DIRECTION_SET\0" - "OUTPUT_ALIASES_INPUT\0" - "TAG_TOO_LARGE\0" - "TOO_LARGE\0" - "UNSUPPORTED_AD_SIZE\0" - "UNSUPPORTED_INPUT_SIZE\0" - "UNSUPPORTED_KEY_SIZE\0" - "UNSUPPORTED_NONCE_SIZE\0" - "UNSUPPORTED_TAG_SIZE\0" - "WRONG_FINAL_BLOCK_LENGTH\0" - "LIST_CANNOT_BE_NULL\0" - "MISSING_CLOSE_SQUARE_BRACKET\0" - "MISSING_EQUAL_SIGN\0" - "NO_CLOSE_BRACE\0" - "UNABLE_TO_CREATE_NEW_SECTION\0" - "VARIABLE_HAS_NO_VALUE\0" - "BAD_GENERATOR\0" - "INVALID_PUBKEY\0" - "MODULUS_TOO_LARGE\0" - "NO_PRIVATE_VALUE\0" - "BAD_Q_VALUE\0" - "MISSING_PARAMETERS\0" - "NEED_NEW_SETUP_VALUES\0" - "BIGNUM_OUT_OF_RANGE\0" - "COORDINATES_OUT_OF_RANGE\0" - "D2I_ECPKPARAMETERS_FAILURE\0" - "EC_GROUP_NEW_BY_NAME_FAILURE\0" - "GROUP2PKPARAMETERS_FAILURE\0" - "I2D_ECPKPARAMETERS_FAILURE\0" - "INCOMPATIBLE_OBJECTS\0" - "INVALID_COMPRESSED_POINT\0" - "INVALID_COMPRESSION_BIT\0" - "INVALID_ENCODING\0" - "INVALID_FIELD\0" - "INVALID_FORM\0" - "INVALID_GROUP_ORDER\0" - "INVALID_PRIVATE_KEY\0" - "MISSING_PRIVATE_KEY\0" - "NON_NAMED_CURVE\0" - "PKPARAMETERS2GROUP_FAILURE\0" - "POINT_AT_INFINITY\0" - "POINT_IS_NOT_ON_CURVE\0" - "SLOT_FULL\0" - "UNDEFINED_GENERATOR\0" - "UNKNOWN_GROUP\0" - "UNKNOWN_ORDER\0" - "WRONG_CURVE_PARAMETERS\0" - "WRONG_ORDER\0" - "KDF_FAILED\0" - "POINT_ARITHMETIC_FAILURE\0" - "BAD_SIGNATURE\0" - "NOT_IMPLEMENTED\0" - "RANDOM_NUMBER_GENERATION_FAILED\0" - "OPERATION_NOT_SUPPORTED\0" - "BN_DECODE_ERROR\0" - "COMMAND_NOT_SUPPORTED\0" - "CONTEXT_NOT_INITIALISED\0" - "DIFFERENT_KEY_TYPES\0" - "DIFFERENT_PARAMETERS\0" - "DIGEST_AND_KEY_TYPE_NOT_SUPPORTED\0" - "EXPECTING_AN_EC_KEY_KEY\0" - "EXPECTING_AN_RSA_KEY\0" - "EXPECTING_A_DH_KEY\0" - "EXPECTING_A_DSA_KEY\0" - "ILLEGAL_OR_UNSUPPORTED_PADDING_MODE\0" - "INVALID_CURVE\0" - "INVALID_DIGEST_LENGTH\0" - "INVALID_DIGEST_TYPE\0" - "INVALID_KEYBITS\0" - "INVALID_MGF1_MD\0" - "INVALID_PADDING_MODE\0" - "INVALID_PSS_PARAMETERS\0" - "INVALID_PSS_SALTLEN\0" - "INVALID_SALT_LENGTH\0" - "INVALID_TRAILER\0" - "KEYS_NOT_SET\0" - "NO_DEFAULT_DIGEST\0" - "NO_KEY_SET\0" - "NO_MDC2_SUPPORT\0" - "NO_NID_FOR_CURVE\0" - "NO_OPERATION_SET\0" - "NO_PARAMETERS_SET\0" - "OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE\0" - "OPERATON_NOT_INITIALIZED\0" - "PARAMETER_ENCODING_ERROR\0" - "UNKNOWN_DIGEST\0" - "UNKNOWN_MASK_DIGEST\0" - "UNKNOWN_MESSAGE_DIGEST_ALGORITHM\0" - "UNKNOWN_PUBLIC_KEY_TYPE\0" - "UNKNOWN_SIGNATURE_ALGORITHM\0" - "UNSUPPORTED_ALGORITHM\0" - "UNSUPPORTED_MASK_ALGORITHM\0" - "UNSUPPORTED_MASK_PARAMETER\0" - "UNSUPPORTED_SIGNATURE_TYPE\0" - "WRONG_PUBLIC_KEY_TYPE\0" - "OUTPUT_TOO_LARGE\0" - "UNKNOWN_NID\0" - "BAD_BASE64_DECODE\0" - "BAD_END_LINE\0" - "BAD_IV_CHARS\0" - "BAD_PASSWORD_READ\0" - "CIPHER_IS_NULL\0" - "ERROR_CONVERTING_PRIVATE_KEY\0" - "NOT_DEK_INFO\0" - "NOT_ENCRYPTED\0" - "NOT_PROC_TYPE\0" - "NO_START_LINE\0" - "READ_KEY\0" - "SHORT_HEADER\0" - "UNSUPPORTED_CIPHER\0" - "UNSUPPORTED_ENCRYPTION\0" - "BAD_PKCS12_DATA\0" - "BAD_PKCS12_VERSION\0" - "CIPHER_HAS_NO_OBJECT_IDENTIFIER\0" - "CRYPT_ERROR\0" - "ENCRYPT_ERROR\0" - "ERROR_SETTING_CIPHER_PARAMS\0" - "INCORRECT_PASSWORD\0" - "KEYGEN_FAILURE\0" - "KEY_GEN_ERROR\0" - "METHOD_NOT_SUPPORTED\0" - "MISSING_MAC\0" - "MULTIPLE_PRIVATE_KEYS_IN_PKCS12\0" - "PKCS12_PUBLIC_KEY_INTEGRITY_NOT_SUPPORTED\0" - "PKCS12_TOO_DEEPLY_NESTED\0" - "PRIVATE_KEY_DECODE_ERROR\0" - "PRIVATE_KEY_ENCODE_ERROR\0" - "UNKNOWN_ALGORITHM\0" - "UNKNOWN_CIPHER\0" - "UNKNOWN_CIPHER_ALGORITHM\0" - "UNKNOWN_HASH\0" - "UNSUPPORTED_PRIVATE_KEY_ALGORITHM\0" - "BAD_E_VALUE\0" - "BAD_FIXED_HEADER_DECRYPT\0" - "BAD_PAD_BYTE_COUNT\0" - "BAD_RSA_PARAMETERS\0" - "BAD_VERSION\0" - "BLOCK_TYPE_IS_NOT_01\0" - "BN_NOT_INITIALIZED\0" - "CANNOT_RECOVER_MULTI_PRIME_KEY\0" - "CRT_PARAMS_ALREADY_GIVEN\0" - "CRT_VALUES_INCORRECT\0" - "DATA_LEN_NOT_EQUAL_TO_MOD_LEN\0" - "DATA_TOO_LARGE\0" - "DATA_TOO_LARGE_FOR_KEY_SIZE\0" - "DATA_TOO_LARGE_FOR_MODULUS\0" - "DATA_TOO_SMALL\0" - "DATA_TOO_SMALL_FOR_KEY_SIZE\0" - "DIGEST_TOO_BIG_FOR_RSA_KEY\0" - "D_E_NOT_CONGRUENT_TO_1\0" - "EMPTY_PUBLIC_KEY\0" - "FIRST_OCTET_INVALID\0" - "INCONSISTENT_SET_OF_CRT_VALUES\0" - "INTERNAL_ERROR\0" - "INVALID_MESSAGE_LENGTH\0" - "KEY_SIZE_TOO_SMALL\0" - "LAST_OCTET_INVALID\0" - "MUST_HAVE_AT_LEAST_TWO_PRIMES\0" - "NO_PUBLIC_EXPONENT\0" - "NULL_BEFORE_BLOCK_MISSING\0" - "N_NOT_EQUAL_P_Q\0" - "OAEP_DECODING_ERROR\0" - "ONLY_ONE_OF_P_Q_GIVEN\0" - "OUTPUT_BUFFER_TOO_SMALL\0" - "PADDING_CHECK_FAILED\0" - "PKCS_DECODING_ERROR\0" - "SLEN_CHECK_FAILED\0" - "SLEN_RECOVERY_FAILED\0" - "UNKNOWN_ALGORITHM_TYPE\0" - "UNKNOWN_PADDING_TYPE\0" - "VALUE_MISSING\0" - "WRONG_SIGNATURE_LENGTH\0" - "APP_DATA_IN_HANDSHAKE\0" - "ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT\0" - "BAD_ALERT\0" - "BAD_CHANGE_CIPHER_SPEC\0" - "BAD_DATA_RETURNED_BY_CALLBACK\0" - "BAD_DH_P_LENGTH\0" - "BAD_DIGEST_LENGTH\0" - "BAD_ECC_CERT\0" - "BAD_ECPOINT\0" - "BAD_HANDSHAKE_LENGTH\0" - "BAD_HANDSHAKE_RECORD\0" - "BAD_HELLO_REQUEST\0" - "BAD_LENGTH\0" - "BAD_PACKET_LENGTH\0" - "BAD_RSA_ENCRYPT\0" - "BAD_SRTP_MKI_VALUE\0" - "BAD_SRTP_PROTECTION_PROFILE_LIST\0" - "BAD_SSL_FILETYPE\0" - "BAD_WRITE_RETRY\0" - "BIO_NOT_SET\0" - "CANNOT_SERIALIZE_PUBLIC_KEY\0" - "CA_DN_LENGTH_MISMATCH\0" - "CA_DN_TOO_LONG\0" - "CCS_RECEIVED_EARLY\0" - "CERTIFICATE_VERIFY_FAILED\0" - "CERT_CB_ERROR\0" - "CERT_LENGTH_MISMATCH\0" - "CHANNEL_ID_NOT_P256\0" - "CHANNEL_ID_SIGNATURE_INVALID\0" - "CIPHER_CODE_WRONG_LENGTH\0" - "CIPHER_OR_HASH_UNAVAILABLE\0" - "CLIENTHELLO_PARSE_FAILED\0" - "CLIENTHELLO_TLSEXT\0" - "CONNECTION_REJECTED\0" - "CONNECTION_TYPE_NOT_SET\0" - "COOKIE_MISMATCH\0" - "D2I_ECDSA_SIG\0" - "DATA_BETWEEN_CCS_AND_FINISHED\0" - "DATA_LENGTH_TOO_LONG\0" - "DECRYPTION_FAILED\0" - "DECRYPTION_FAILED_OR_BAD_RECORD_MAC\0" - "DH_PUBLIC_VALUE_LENGTH_IS_WRONG\0" - "DIGEST_CHECK_FAILED\0" - "DTLS_MESSAGE_TOO_BIG\0" - "ECC_CERT_NOT_FOR_SIGNING\0" - "EMPTY_SRTP_PROTECTION_PROFILE_LIST\0" - "EMS_STATE_INCONSISTENT\0" - "ENCRYPTED_LENGTH_TOO_LONG\0" - "ERROR_IN_RECEIVED_CIPHER_LIST\0" - "EVP_DIGESTSIGNFINAL_FAILED\0" - "EVP_DIGESTSIGNINIT_FAILED\0" - "EXCESSIVE_MESSAGE_SIZE\0" - "EXTRA_DATA_IN_MESSAGE\0" - "FRAGMENT_MISMATCH\0" - "GOT_A_FIN_BEFORE_A_CCS\0" - "GOT_CHANNEL_ID_BEFORE_A_CCS\0" - "GOT_NEXT_PROTO_BEFORE_A_CCS\0" - "GOT_NEXT_PROTO_WITHOUT_EXTENSION\0" - "HANDSHAKE_FAILURE_ON_CLIENT_HELLO\0" - "HANDSHAKE_RECORD_BEFORE_CCS\0" - "HTTPS_PROXY_REQUEST\0" - "HTTP_REQUEST\0" - "INAPPROPRIATE_FALLBACK\0" - "INVALID_COMMAND\0" - "INVALID_MESSAGE\0" - "INVALID_SSL_SESSION\0" - "INVALID_TICKET_KEYS_LENGTH\0" - "LENGTH_MISMATCH\0" - "LIBRARY_HAS_NO_CIPHERS\0" - "MISSING_DH_KEY\0" - "MISSING_ECDSA_SIGNING_CERT\0" - "MISSING_RSA_CERTIFICATE\0" - "MISSING_RSA_ENCRYPTING_CERT\0" - "MISSING_RSA_SIGNING_CERT\0" - "MISSING_TMP_DH_KEY\0" - "MISSING_TMP_ECDH_KEY\0" - "MIXED_SPECIAL_OPERATOR_WITH_GROUPS\0" - "MTU_TOO_SMALL\0" - "NESTED_GROUP\0" - "NO_CERTIFICATES_RETURNED\0" - "NO_CERTIFICATE_ASSIGNED\0" - "NO_CERTIFICATE_SET\0" - "NO_CIPHERS_AVAILABLE\0" - "NO_CIPHERS_PASSED\0" - "NO_CIPHERS_SPECIFIED\0" - "NO_CIPHER_MATCH\0" - "NO_COMPRESSION_SPECIFIED\0" - "NO_METHOD_SPECIFIED\0" - "NO_P256_SUPPORT\0" - "NO_PRIVATE_KEY_ASSIGNED\0" - "NO_RENEGOTIATION\0" - "NO_REQUIRED_DIGEST\0" - "NO_SHARED_CIPHER\0" - "NO_SHARED_SIGATURE_ALGORITHMS\0" - "NO_SRTP_PROFILES\0" - "NULL_SSL_CTX\0" - "NULL_SSL_METHOD_PASSED\0" - "OLD_SESSION_CIPHER_NOT_RETURNED\0" - "OLD_SESSION_VERSION_NOT_RETURNED\0" - "PACKET_LENGTH_TOO_LONG\0" - "PARSE_TLSEXT\0" - "PATH_TOO_LONG\0" - "PEER_DID_NOT_RETURN_A_CERTIFICATE\0" - "PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE\0" - "PROTOCOL_IS_SHUTDOWN\0" - "PSK_IDENTITY_NOT_FOUND\0" - "PSK_NO_CLIENT_CB\0" - "PSK_NO_SERVER_CB\0" - "READ_BIO_NOT_SET\0" - "READ_TIMEOUT_EXPIRED\0" - "RECORD_LENGTH_MISMATCH\0" - "RECORD_TOO_LARGE\0" - "RENEGOTIATE_EXT_TOO_LONG\0" - "RENEGOTIATION_ENCODING_ERR\0" - "RENEGOTIATION_MISMATCH\0" - "REQUIRED_CIPHER_MISSING\0" - "RESUMED_EMS_SESSION_WITHOUT_EMS_EXTENSION\0" - "RESUMED_NON_EMS_SESSION_WITH_EMS_EXTENSION\0" - "SCSV_RECEIVED_WHEN_RENEGOTIATING\0" - "SERVERHELLO_TLSEXT\0" - "SESSION_ID_CONTEXT_UNINITIALIZED\0" - "SESSION_MAY_NOT_BE_CREATED\0" - "SIGNATURE_ALGORITHMS_ERROR\0" - "SIGNATURE_ALGORITHMS_EXTENSION_SENT_BY_SERVER\0" - "SRTP_COULD_NOT_ALLOCATE_PROFILES\0" - "SRTP_PROTECTION_PROFILE_LIST_TOO_LONG\0" - "SRTP_UNKNOWN_PROTECTION_PROFILE\0" - "SSL3_EXT_INVALID_SERVERNAME\0" - "SSL3_EXT_INVALID_SERVERNAME_TYPE\0" - "SSLV3_ALERT_BAD_CERTIFICATE\0" - "SSLV3_ALERT_BAD_RECORD_MAC\0" - "SSLV3_ALERT_CERTIFICATE_EXPIRED\0" - "SSLV3_ALERT_CERTIFICATE_REVOKED\0" - "SSLV3_ALERT_CERTIFICATE_UNKNOWN\0" - "SSLV3_ALERT_CLOSE_NOTIFY\0" - "SSLV3_ALERT_DECOMPRESSION_FAILURE\0" - "SSLV3_ALERT_HANDSHAKE_FAILURE\0" - "SSLV3_ALERT_ILLEGAL_PARAMETER\0" - "SSLV3_ALERT_NO_CERTIFICATE\0" - "SSLV3_ALERT_UNEXPECTED_MESSAGE\0" - "SSLV3_ALERT_UNSUPPORTED_CERTIFICATE\0" - "SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION\0" - "SSL_HANDSHAKE_FAILURE\0" - "SSL_SESSION_ID_CALLBACK_FAILED\0" - "SSL_SESSION_ID_CONFLICT\0" - "SSL_SESSION_ID_CONTEXT_TOO_LONG\0" - "SSL_SESSION_ID_HAS_BAD_LENGTH\0" - "TLSV1_ALERT_ACCESS_DENIED\0" - "TLSV1_ALERT_DECODE_ERROR\0" - "TLSV1_ALERT_DECRYPTION_FAILED\0" - "TLSV1_ALERT_DECRYPT_ERROR\0" - "TLSV1_ALERT_EXPORT_RESTRICTION\0" - "TLSV1_ALERT_INAPPROPRIATE_FALLBACK\0" - "TLSV1_ALERT_INSUFFICIENT_SECURITY\0" - "TLSV1_ALERT_INTERNAL_ERROR\0" - "TLSV1_ALERT_NO_RENEGOTIATION\0" - "TLSV1_ALERT_PROTOCOL_VERSION\0" - "TLSV1_ALERT_RECORD_OVERFLOW\0" - "TLSV1_ALERT_UNKNOWN_CA\0" - "TLSV1_ALERT_USER_CANCELLED\0" - "TLSV1_BAD_CERTIFICATE_HASH_VALUE\0" - "TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE\0" - "TLSV1_CERTIFICATE_UNOBTAINABLE\0" - "TLSV1_UNRECOGNIZED_NAME\0" - "TLSV1_UNSUPPORTED_EXTENSION\0" - "TLS_CLIENT_CERT_REQ_WITH_ANON_CIPHER\0" - "TLS_ILLEGAL_EXPORTER_LABEL\0" - "TLS_INVALID_ECPOINTFORMAT_LIST\0" - "TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST\0" - "TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG\0" - "TOO_MANY_EMPTY_FRAGMENTS\0" - "TOO_MANY_WARNING_ALERTS\0" - "UNABLE_TO_FIND_ECDH_PARAMETERS\0" - "UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS\0" - "UNEXPECTED_EXTENSION\0" - "UNEXPECTED_GROUP_CLOSE\0" - "UNEXPECTED_MESSAGE\0" - "UNEXPECTED_OPERATOR_IN_GROUP\0" - "UNEXPECTED_RECORD\0" - "UNKNOWN_ALERT_TYPE\0" - "UNKNOWN_CERTIFICATE_TYPE\0" - "UNKNOWN_CIPHER_RETURNED\0" - "UNKNOWN_CIPHER_TYPE\0" - "UNKNOWN_KEY_EXCHANGE_TYPE\0" - "UNKNOWN_PROTOCOL\0" - "UNKNOWN_SSL_VERSION\0" - "UNKNOWN_STATE\0" - "UNPROCESSED_HANDSHAKE_DATA\0" - "UNSAFE_LEGACY_RENEGOTIATION_DISABLED\0" - "UNSUPPORTED_COMPRESSION_ALGORITHM\0" - "UNSUPPORTED_ELLIPTIC_CURVE\0" - "UNSUPPORTED_PROTOCOL\0" - "UNSUPPORTED_SSL_VERSION\0" - "USE_SRTP_NOT_NEGOTIATED\0" - "WRONG_CERTIFICATE_TYPE\0" - "WRONG_CIPHER_RETURNED\0" - "WRONG_CURVE\0" - "WRONG_MESSAGE_TYPE\0" - "WRONG_SIGNATURE_TYPE\0" - "WRONG_SSL_VERSION\0" - "WRONG_VERSION_NUMBER\0" - "X509_LIB\0" - "X509_VERIFICATION_SETUP_PROBLEMS\0" - "AKID_MISMATCH\0" - "BAD_PKCS7_VERSION\0" - "BAD_X509_FILETYPE\0" - "BASE64_DECODE_ERROR\0" - "CANT_CHECK_DH_KEY\0" - "CERT_ALREADY_IN_HASH_TABLE\0" - "CRL_ALREADY_DELTA\0" - "CRL_VERIFY_FAILURE\0" - "IDP_MISMATCH\0" - "INVALID_DIRECTORY\0" - "INVALID_FIELD_NAME\0" - "INVALID_TRUST\0" - "ISSUER_MISMATCH\0" - "KEY_TYPE_MISMATCH\0" - "KEY_VALUES_MISMATCH\0" - "LOADING_CERT_DIR\0" - "LOADING_DEFAULTS\0" - "NEWER_CRL_NOT_NEWER\0" - "NOT_PKCS7_SIGNED_DATA\0" - "NO_CERTIFICATES_INCLUDED\0" - "NO_CERT_SET_FOR_US_TO_VERIFY\0" - "NO_CRLS_INCLUDED\0" - "NO_CRL_NUMBER\0" - "PUBLIC_KEY_DECODE_ERROR\0" - "PUBLIC_KEY_ENCODE_ERROR\0" - "SHOULD_RETRY\0" - "UNABLE_TO_FIND_PARAMETERS_IN_CHAIN\0" - "UNABLE_TO_GET_CERTS_PUBLIC_KEY\0" - "UNKNOWN_KEY_TYPE\0" - "UNKNOWN_PURPOSE_ID\0" - "UNKNOWN_TRUST_ID\0" - "WRONG_LOOKUP_TYPE\0" - "BAD_IP_ADDRESS\0" - "BAD_OBJECT\0" - "BN_DEC2BN_ERROR\0" - "BN_TO_ASN1_INTEGER_ERROR\0" - "CANNOT_FIND_FREE_FUNCTION\0" - "DIRNAME_ERROR\0" - "DISTPOINT_ALREADY_SET\0" - "DUPLICATE_ZONE_ID\0" - "ERROR_CONVERTING_ZONE\0" - "ERROR_CREATING_EXTENSION\0" - "ERROR_IN_EXTENSION\0" - "EXPECTED_A_SECTION_NAME\0" - "EXTENSION_EXISTS\0" - "EXTENSION_NAME_ERROR\0" - "EXTENSION_NOT_FOUND\0" - "EXTENSION_SETTING_NOT_SUPPORTED\0" - "EXTENSION_VALUE_ERROR\0" - "ILLEGAL_EMPTY_EXTENSION\0" - "ILLEGAL_HEX_DIGIT\0" - "INCORRECT_POLICY_SYNTAX_TAG\0" - "INVALID_BOOLEAN_STRING\0" - "INVALID_EXTENSION_STRING\0" - "INVALID_MULTIPLE_RDNS\0" - "INVALID_NAME\0" - "INVALID_NULL_ARGUMENT\0" - "INVALID_NULL_NAME\0" - "INVALID_NULL_VALUE\0" - "INVALID_NUMBERS\0" - "INVALID_OBJECT_IDENTIFIER\0" - "INVALID_OPTION\0" - "INVALID_POLICY_IDENTIFIER\0" - "INVALID_PROXY_POLICY_SETTING\0" - "INVALID_PURPOSE\0" - "INVALID_SECTION\0" - "INVALID_SYNTAX\0" - "ISSUER_DECODE_ERROR\0" - "NEED_ORGANIZATION_AND_NUMBERS\0" - "NO_CONFIG_DATABASE\0" - "NO_ISSUER_CERTIFICATE\0" - "NO_ISSUER_DETAILS\0" - "NO_POLICY_IDENTIFIER\0" - "NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED\0" - "NO_PUBLIC_KEY\0" - "NO_SUBJECT_DETAILS\0" - "ODD_NUMBER_OF_DIGITS\0" - "OPERATION_NOT_DEFINED\0" - "OTHERNAME_ERROR\0" - "POLICY_LANGUAGE_ALREADY_DEFINED\0" - "POLICY_PATH_LENGTH\0" - "POLICY_PATH_LENGTH_ALREADY_DEFINED\0" - "POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY\0" - "SECTION_NOT_FOUND\0" - "UNABLE_TO_GET_ISSUER_DETAILS\0" - "UNABLE_TO_GET_ISSUER_KEYID\0" - "UNKNOWN_BIT_STRING_ARGUMENT\0" - "UNKNOWN_EXTENSION\0" - "UNKNOWN_EXTENSION_NAME\0" - "UNKNOWN_OPTION\0" - "UNSUPPORTED_OPTION\0" - "USER_TOO_LONG\0" - ""; - diff --git a/third_party/boringssl/linux-aarch64/crypto/aes/aesv8-armx64.S b/third_party/boringssl/linux-aarch64/crypto/aes/aesv8-armx64.S deleted file mode 100644 index c414476cdf72f..0000000000000 --- a/third_party/boringssl/linux-aarch64/crypto/aes/aesv8-armx64.S +++ /dev/null @@ -1,751 +0,0 @@ -#if defined(__aarch64__) -#include "arm_arch.h" - -#if __ARM_MAX_ARCH__>=7 -.text -#if !defined(__clang__) -.arch armv8-a+crypto -#endif -.align 5 -.Lrcon: -.long 0x01,0x01,0x01,0x01 -.long 0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d // rotate-n-splat -.long 0x1b,0x1b,0x1b,0x1b - -.globl aes_v8_set_encrypt_key -.type aes_v8_set_encrypt_key,%function -.align 5 -aes_v8_set_encrypt_key: -.Lenc_key: - stp x29,x30,[sp,#-16]! - add x29,sp,#0 - mov x3,#-1 - cmp x0,#0 - b.eq .Lenc_key_abort - cmp x2,#0 - b.eq .Lenc_key_abort - mov x3,#-2 - cmp w1,#128 - b.lt .Lenc_key_abort - cmp w1,#256 - b.gt .Lenc_key_abort - tst w1,#0x3f - b.ne .Lenc_key_abort - - adr x3,.Lrcon - cmp w1,#192 - - eor v0.16b,v0.16b,v0.16b - ld1 {v3.16b},[x0],#16 - mov w1,#8 // reuse w1 - ld1 {v1.4s,v2.4s},[x3],#32 - - b.lt .Loop128 - b.eq .L192 - b .L256 - -.align 4 -.Loop128: - tbl v6.16b,{v3.16b},v2.16b - ext v5.16b,v0.16b,v3.16b,#12 - st1 {v3.4s},[x2],#16 - aese v6.16b,v0.16b - subs w1,w1,#1 - - eor v3.16b,v3.16b,v5.16b - ext v5.16b,v0.16b,v5.16b,#12 - eor v3.16b,v3.16b,v5.16b - ext v5.16b,v0.16b,v5.16b,#12 - eor v6.16b,v6.16b,v1.16b - eor v3.16b,v3.16b,v5.16b - shl v1.16b,v1.16b,#1 - eor v3.16b,v3.16b,v6.16b - b.ne .Loop128 - - ld1 {v1.4s},[x3] - - tbl v6.16b,{v3.16b},v2.16b - ext v5.16b,v0.16b,v3.16b,#12 - st1 {v3.4s},[x2],#16 - aese v6.16b,v0.16b - - eor v3.16b,v3.16b,v5.16b - ext v5.16b,v0.16b,v5.16b,#12 - eor v3.16b,v3.16b,v5.16b - ext v5.16b,v0.16b,v5.16b,#12 - eor v6.16b,v6.16b,v1.16b - eor v3.16b,v3.16b,v5.16b - shl v1.16b,v1.16b,#1 - eor v3.16b,v3.16b,v6.16b - - tbl v6.16b,{v3.16b},v2.16b - ext v5.16b,v0.16b,v3.16b,#12 - st1 {v3.4s},[x2],#16 - aese v6.16b,v0.16b - - eor v3.16b,v3.16b,v5.16b - ext v5.16b,v0.16b,v5.16b,#12 - eor v3.16b,v3.16b,v5.16b - ext v5.16b,v0.16b,v5.16b,#12 - eor v6.16b,v6.16b,v1.16b - eor v3.16b,v3.16b,v5.16b - eor v3.16b,v3.16b,v6.16b - st1 {v3.4s},[x2] - add x2,x2,#0x50 - - mov w12,#10 - b .Ldone - -.align 4 -.L192: - ld1 {v4.8b},[x0],#8 - movi v6.16b,#8 // borrow v6.16b - st1 {v3.4s},[x2],#16 - sub v2.16b,v2.16b,v6.16b // adjust the mask - -.Loop192: - tbl v6.16b,{v4.16b},v2.16b - ext v5.16b,v0.16b,v3.16b,#12 - st1 {v4.8b},[x2],#8 - aese v6.16b,v0.16b - subs w1,w1,#1 - - eor v3.16b,v3.16b,v5.16b - ext v5.16b,v0.16b,v5.16b,#12 - eor v3.16b,v3.16b,v5.16b - ext v5.16b,v0.16b,v5.16b,#12 - eor v3.16b,v3.16b,v5.16b - - dup v5.4s,v3.s[3] - eor v5.16b,v5.16b,v4.16b - eor v6.16b,v6.16b,v1.16b - ext v4.16b,v0.16b,v4.16b,#12 - shl v1.16b,v1.16b,#1 - eor v4.16b,v4.16b,v5.16b - eor v3.16b,v3.16b,v6.16b - eor v4.16b,v4.16b,v6.16b - st1 {v3.4s},[x2],#16 - b.ne .Loop192 - - mov w12,#12 - add x2,x2,#0x20 - b .Ldone - -.align 4 -.L256: - ld1 {v4.16b},[x0] - mov w1,#7 - mov w12,#14 - st1 {v3.4s},[x2],#16 - -.Loop256: - tbl v6.16b,{v4.16b},v2.16b - ext v5.16b,v0.16b,v3.16b,#12 - st1 {v4.4s},[x2],#16 - aese v6.16b,v0.16b - subs w1,w1,#1 - - eor v3.16b,v3.16b,v5.16b - ext v5.16b,v0.16b,v5.16b,#12 - eor v3.16b,v3.16b,v5.16b - ext v5.16b,v0.16b,v5.16b,#12 - eor v6.16b,v6.16b,v1.16b - eor v3.16b,v3.16b,v5.16b - shl v1.16b,v1.16b,#1 - eor v3.16b,v3.16b,v6.16b - st1 {v3.4s},[x2],#16 - b.eq .Ldone - - dup v6.4s,v3.s[3] // just splat - ext v5.16b,v0.16b,v4.16b,#12 - aese v6.16b,v0.16b - - eor v4.16b,v4.16b,v5.16b - ext v5.16b,v0.16b,v5.16b,#12 - eor v4.16b,v4.16b,v5.16b - ext v5.16b,v0.16b,v5.16b,#12 - eor v4.16b,v4.16b,v5.16b - - eor v4.16b,v4.16b,v6.16b - b .Loop256 - -.Ldone: - str w12,[x2] - mov x3,#0 - -.Lenc_key_abort: - mov x0,x3 // return value - ldr x29,[sp],#16 - ret -.size aes_v8_set_encrypt_key,.-aes_v8_set_encrypt_key - -.globl aes_v8_set_decrypt_key -.type aes_v8_set_decrypt_key,%function -.align 5 -aes_v8_set_decrypt_key: - stp x29,x30,[sp,#-16]! - add x29,sp,#0 - bl .Lenc_key - - cmp x0,#0 - b.ne .Ldec_key_abort - - sub x2,x2,#240 // restore original x2 - mov x4,#-16 - add x0,x2,x12,lsl#4 // end of key schedule - - ld1 {v0.4s},[x2] - ld1 {v1.4s},[x0] - st1 {v0.4s},[x0],x4 - st1 {v1.4s},[x2],#16 - -.Loop_imc: - ld1 {v0.4s},[x2] - ld1 {v1.4s},[x0] - aesimc v0.16b,v0.16b - aesimc v1.16b,v1.16b - st1 {v0.4s},[x0],x4 - st1 {v1.4s},[x2],#16 - cmp x0,x2 - b.hi .Loop_imc - - ld1 {v0.4s},[x2] - aesimc v0.16b,v0.16b - st1 {v0.4s},[x0] - - eor x0,x0,x0 // return value -.Ldec_key_abort: - ldp x29,x30,[sp],#16 - ret -.size aes_v8_set_decrypt_key,.-aes_v8_set_decrypt_key -.globl aes_v8_encrypt -.type aes_v8_encrypt,%function -.align 5 -aes_v8_encrypt: - ldr w3,[x2,#240] - ld1 {v0.4s},[x2],#16 - ld1 {v2.16b},[x0] - sub w3,w3,#2 - ld1 {v1.4s},[x2],#16 - -.Loop_enc: - aese v2.16b,v0.16b - aesmc v2.16b,v2.16b - ld1 {v0.4s},[x2],#16 - subs w3,w3,#2 - aese v2.16b,v1.16b - aesmc v2.16b,v2.16b - ld1 {v1.4s},[x2],#16 - b.gt .Loop_enc - - aese v2.16b,v0.16b - aesmc v2.16b,v2.16b - ld1 {v0.4s},[x2] - aese v2.16b,v1.16b - eor v2.16b,v2.16b,v0.16b - - st1 {v2.16b},[x1] - ret -.size aes_v8_encrypt,.-aes_v8_encrypt -.globl aes_v8_decrypt -.type aes_v8_decrypt,%function -.align 5 -aes_v8_decrypt: - ldr w3,[x2,#240] - ld1 {v0.4s},[x2],#16 - ld1 {v2.16b},[x0] - sub w3,w3,#2 - ld1 {v1.4s},[x2],#16 - -.Loop_dec: - aesd v2.16b,v0.16b - aesimc v2.16b,v2.16b - ld1 {v0.4s},[x2],#16 - subs w3,w3,#2 - aesd v2.16b,v1.16b - aesimc v2.16b,v2.16b - ld1 {v1.4s},[x2],#16 - b.gt .Loop_dec - - aesd v2.16b,v0.16b - aesimc v2.16b,v2.16b - ld1 {v0.4s},[x2] - aesd v2.16b,v1.16b - eor v2.16b,v2.16b,v0.16b - - st1 {v2.16b},[x1] - ret -.size aes_v8_decrypt,.-aes_v8_decrypt -.globl aes_v8_cbc_encrypt -.type aes_v8_cbc_encrypt,%function -.align 5 -aes_v8_cbc_encrypt: - stp x29,x30,[sp,#-16]! - add x29,sp,#0 - subs x2,x2,#16 - mov x8,#16 - b.lo .Lcbc_abort - csel x8,xzr,x8,eq - - cmp w5,#0 // en- or decrypting? - ldr w5,[x3,#240] - and x2,x2,#-16 - ld1 {v6.16b},[x4] - ld1 {v0.16b},[x0],x8 - - ld1 {v16.4s,v17.4s},[x3] // load key schedule... - sub w5,w5,#6 - add x7,x3,x5,lsl#4 // pointer to last 7 round keys - sub w5,w5,#2 - ld1 {v18.4s,v19.4s},[x7],#32 - ld1 {v20.4s,v21.4s},[x7],#32 - ld1 {v22.4s,v23.4s},[x7],#32 - ld1 {v7.4s},[x7] - - add x7,x3,#32 - mov w6,w5 - b.eq .Lcbc_dec - - cmp w5,#2 - eor v0.16b,v0.16b,v6.16b - eor v5.16b,v16.16b,v7.16b - b.eq .Lcbc_enc128 - - ld1 {v2.4s,v3.4s},[x7] - add x7,x3,#16 - add x6,x3,#16*4 - add x12,x3,#16*5 - aese v0.16b,v16.16b - aesmc v0.16b,v0.16b - add x14,x3,#16*6 - add x3,x3,#16*7 - b .Lenter_cbc_enc - -.align 4 -.Loop_cbc_enc: - aese v0.16b,v16.16b - aesmc v0.16b,v0.16b - st1 {v6.16b},[x1],#16 -.Lenter_cbc_enc: - aese v0.16b,v17.16b - aesmc v0.16b,v0.16b - aese v0.16b,v2.16b - aesmc v0.16b,v0.16b - ld1 {v16.4s},[x6] - cmp w5,#4 - aese v0.16b,v3.16b - aesmc v0.16b,v0.16b - ld1 {v17.4s},[x12] - b.eq .Lcbc_enc192 - - aese v0.16b,v16.16b - aesmc v0.16b,v0.16b - ld1 {v16.4s},[x14] - aese v0.16b,v17.16b - aesmc v0.16b,v0.16b - ld1 {v17.4s},[x3] - nop - -.Lcbc_enc192: - aese v0.16b,v16.16b - aesmc v0.16b,v0.16b - subs x2,x2,#16 - aese v0.16b,v17.16b - aesmc v0.16b,v0.16b - csel x8,xzr,x8,eq - aese v0.16b,v18.16b - aesmc v0.16b,v0.16b - aese v0.16b,v19.16b - aesmc v0.16b,v0.16b - ld1 {v16.16b},[x0],x8 - aese v0.16b,v20.16b - aesmc v0.16b,v0.16b - eor v16.16b,v16.16b,v5.16b - aese v0.16b,v21.16b - aesmc v0.16b,v0.16b - ld1 {v17.4s},[x7] // re-pre-load rndkey[1] - aese v0.16b,v22.16b - aesmc v0.16b,v0.16b - aese v0.16b,v23.16b - eor v6.16b,v0.16b,v7.16b - b.hs .Loop_cbc_enc - - st1 {v6.16b},[x1],#16 - b .Lcbc_done - -.align 5 -.Lcbc_enc128: - ld1 {v2.4s,v3.4s},[x7] - aese v0.16b,v16.16b - aesmc v0.16b,v0.16b - b .Lenter_cbc_enc128 -.Loop_cbc_enc128: - aese v0.16b,v16.16b - aesmc v0.16b,v0.16b - st1 {v6.16b},[x1],#16 -.Lenter_cbc_enc128: - aese v0.16b,v17.16b - aesmc v0.16b,v0.16b - subs x2,x2,#16 - aese v0.16b,v2.16b - aesmc v0.16b,v0.16b - csel x8,xzr,x8,eq - aese v0.16b,v3.16b - aesmc v0.16b,v0.16b - aese v0.16b,v18.16b - aesmc v0.16b,v0.16b - aese v0.16b,v19.16b - aesmc v0.16b,v0.16b - ld1 {v16.16b},[x0],x8 - aese v0.16b,v20.16b - aesmc v0.16b,v0.16b - aese v0.16b,v21.16b - aesmc v0.16b,v0.16b - aese v0.16b,v22.16b - aesmc v0.16b,v0.16b - eor v16.16b,v16.16b,v5.16b - aese v0.16b,v23.16b - eor v6.16b,v0.16b,v7.16b - b.hs .Loop_cbc_enc128 - - st1 {v6.16b},[x1],#16 - b .Lcbc_done -.align 5 -.Lcbc_dec: - ld1 {v18.16b},[x0],#16 - subs x2,x2,#32 // bias - add w6,w5,#2 - orr v3.16b,v0.16b,v0.16b - orr v1.16b,v0.16b,v0.16b - orr v19.16b,v18.16b,v18.16b - b.lo .Lcbc_dec_tail - - orr v1.16b,v18.16b,v18.16b - ld1 {v18.16b},[x0],#16 - orr v2.16b,v0.16b,v0.16b - orr v3.16b,v1.16b,v1.16b - orr v19.16b,v18.16b,v18.16b - -.Loop3x_cbc_dec: - aesd v0.16b,v16.16b - aesimc v0.16b,v0.16b - aesd v1.16b,v16.16b - aesimc v1.16b,v1.16b - aesd v18.16b,v16.16b - aesimc v18.16b,v18.16b - ld1 {v16.4s},[x7],#16 - subs w6,w6,#2 - aesd v0.16b,v17.16b - aesimc v0.16b,v0.16b - aesd v1.16b,v17.16b - aesimc v1.16b,v1.16b - aesd v18.16b,v17.16b - aesimc v18.16b,v18.16b - ld1 {v17.4s},[x7],#16 - b.gt .Loop3x_cbc_dec - - aesd v0.16b,v16.16b - aesimc v0.16b,v0.16b - aesd v1.16b,v16.16b - aesimc v1.16b,v1.16b - aesd v18.16b,v16.16b - aesimc v18.16b,v18.16b - eor v4.16b,v6.16b,v7.16b - subs x2,x2,#0x30 - eor v5.16b,v2.16b,v7.16b - csel x6,x2,x6,lo // x6, w6, is zero at this point - aesd v0.16b,v17.16b - aesimc v0.16b,v0.16b - aesd v1.16b,v17.16b - aesimc v1.16b,v1.16b - aesd v18.16b,v17.16b - aesimc v18.16b,v18.16b - eor v17.16b,v3.16b,v7.16b - add x0,x0,x6 // x0 is adjusted in such way that - // at exit from the loop v1.16b-v18.16b - // are loaded with last "words" - orr v6.16b,v19.16b,v19.16b - mov x7,x3 - aesd v0.16b,v20.16b - aesimc v0.16b,v0.16b - aesd v1.16b,v20.16b - aesimc v1.16b,v1.16b - aesd v18.16b,v20.16b - aesimc v18.16b,v18.16b - ld1 {v2.16b},[x0],#16 - aesd v0.16b,v21.16b - aesimc v0.16b,v0.16b - aesd v1.16b,v21.16b - aesimc v1.16b,v1.16b - aesd v18.16b,v21.16b - aesimc v18.16b,v18.16b - ld1 {v3.16b},[x0],#16 - aesd v0.16b,v22.16b - aesimc v0.16b,v0.16b - aesd v1.16b,v22.16b - aesimc v1.16b,v1.16b - aesd v18.16b,v22.16b - aesimc v18.16b,v18.16b - ld1 {v19.16b},[x0],#16 - aesd v0.16b,v23.16b - aesd v1.16b,v23.16b - aesd v18.16b,v23.16b - ld1 {v16.4s},[x7],#16 // re-pre-load rndkey[0] - add w6,w5,#2 - eor v4.16b,v4.16b,v0.16b - eor v5.16b,v5.16b,v1.16b - eor v18.16b,v18.16b,v17.16b - ld1 {v17.4s},[x7],#16 // re-pre-load rndkey[1] - st1 {v4.16b},[x1],#16 - orr v0.16b,v2.16b,v2.16b - st1 {v5.16b},[x1],#16 - orr v1.16b,v3.16b,v3.16b - st1 {v18.16b},[x1],#16 - orr v18.16b,v19.16b,v19.16b - b.hs .Loop3x_cbc_dec - - cmn x2,#0x30 - b.eq .Lcbc_done - nop - -.Lcbc_dec_tail: - aesd v1.16b,v16.16b - aesimc v1.16b,v1.16b - aesd v18.16b,v16.16b - aesimc v18.16b,v18.16b - ld1 {v16.4s},[x7],#16 - subs w6,w6,#2 - aesd v1.16b,v17.16b - aesimc v1.16b,v1.16b - aesd v18.16b,v17.16b - aesimc v18.16b,v18.16b - ld1 {v17.4s},[x7],#16 - b.gt .Lcbc_dec_tail - - aesd v1.16b,v16.16b - aesimc v1.16b,v1.16b - aesd v18.16b,v16.16b - aesimc v18.16b,v18.16b - aesd v1.16b,v17.16b - aesimc v1.16b,v1.16b - aesd v18.16b,v17.16b - aesimc v18.16b,v18.16b - aesd v1.16b,v20.16b - aesimc v1.16b,v1.16b - aesd v18.16b,v20.16b - aesimc v18.16b,v18.16b - cmn x2,#0x20 - aesd v1.16b,v21.16b - aesimc v1.16b,v1.16b - aesd v18.16b,v21.16b - aesimc v18.16b,v18.16b - eor v5.16b,v6.16b,v7.16b - aesd v1.16b,v22.16b - aesimc v1.16b,v1.16b - aesd v18.16b,v22.16b - aesimc v18.16b,v18.16b - eor v17.16b,v3.16b,v7.16b - aesd v1.16b,v23.16b - aesd v18.16b,v23.16b - b.eq .Lcbc_dec_one - eor v5.16b,v5.16b,v1.16b - eor v17.16b,v17.16b,v18.16b - orr v6.16b,v19.16b,v19.16b - st1 {v5.16b},[x1],#16 - st1 {v17.16b},[x1],#16 - b .Lcbc_done - -.Lcbc_dec_one: - eor v5.16b,v5.16b,v18.16b - orr v6.16b,v19.16b,v19.16b - st1 {v5.16b},[x1],#16 - -.Lcbc_done: - st1 {v6.16b},[x4] -.Lcbc_abort: - ldr x29,[sp],#16 - ret -.size aes_v8_cbc_encrypt,.-aes_v8_cbc_encrypt -.globl aes_v8_ctr32_encrypt_blocks -.type aes_v8_ctr32_encrypt_blocks,%function -.align 5 -aes_v8_ctr32_encrypt_blocks: - stp x29,x30,[sp,#-16]! - add x29,sp,#0 - ldr w5,[x3,#240] - - ldr w8, [x4, #12] - ld1 {v0.4s},[x4] - - ld1 {v16.4s,v17.4s},[x3] // load key schedule... - sub w5,w5,#4 - mov x12,#16 - cmp x2,#2 - add x7,x3,x5,lsl#4 // pointer to last 5 round keys - sub w5,w5,#2 - ld1 {v20.4s,v21.4s},[x7],#32 - ld1 {v22.4s,v23.4s},[x7],#32 - ld1 {v7.4s},[x7] - add x7,x3,#32 - mov w6,w5 - csel x12,xzr,x12,lo -#ifndef __ARMEB__ - rev w8, w8 -#endif - orr v1.16b,v0.16b,v0.16b - add w10, w8, #1 - orr v18.16b,v0.16b,v0.16b - add w8, w8, #2 - orr v6.16b,v0.16b,v0.16b - rev w10, w10 - mov v1.s[3],w10 - b.ls .Lctr32_tail - rev w12, w8 - sub x2,x2,#3 // bias - mov v18.s[3],w12 - b .Loop3x_ctr32 - -.align 4 -.Loop3x_ctr32: - aese v0.16b,v16.16b - aesmc v0.16b,v0.16b - aese v1.16b,v16.16b - aesmc v1.16b,v1.16b - aese v18.16b,v16.16b - aesmc v18.16b,v18.16b - ld1 {v16.4s},[x7],#16 - subs w6,w6,#2 - aese v0.16b,v17.16b - aesmc v0.16b,v0.16b - aese v1.16b,v17.16b - aesmc v1.16b,v1.16b - aese v18.16b,v17.16b - aesmc v18.16b,v18.16b - ld1 {v17.4s},[x7],#16 - b.gt .Loop3x_ctr32 - - aese v0.16b,v16.16b - aesmc v4.16b,v0.16b - aese v1.16b,v16.16b - aesmc v5.16b,v1.16b - ld1 {v2.16b},[x0],#16 - orr v0.16b,v6.16b,v6.16b - aese v18.16b,v16.16b - aesmc v18.16b,v18.16b - ld1 {v3.16b},[x0],#16 - orr v1.16b,v6.16b,v6.16b - aese v4.16b,v17.16b - aesmc v4.16b,v4.16b - aese v5.16b,v17.16b - aesmc v5.16b,v5.16b - ld1 {v19.16b},[x0],#16 - mov x7,x3 - aese v18.16b,v17.16b - aesmc v17.16b,v18.16b - orr v18.16b,v6.16b,v6.16b - add w9,w8,#1 - aese v4.16b,v20.16b - aesmc v4.16b,v4.16b - aese v5.16b,v20.16b - aesmc v5.16b,v5.16b - eor v2.16b,v2.16b,v7.16b - add w10,w8,#2 - aese v17.16b,v20.16b - aesmc v17.16b,v17.16b - eor v3.16b,v3.16b,v7.16b - add w8,w8,#3 - aese v4.16b,v21.16b - aesmc v4.16b,v4.16b - aese v5.16b,v21.16b - aesmc v5.16b,v5.16b - eor v19.16b,v19.16b,v7.16b - rev w9,w9 - aese v17.16b,v21.16b - aesmc v17.16b,v17.16b - mov v0.s[3], w9 - rev w10,w10 - aese v4.16b,v22.16b - aesmc v4.16b,v4.16b - aese v5.16b,v22.16b - aesmc v5.16b,v5.16b - mov v1.s[3], w10 - rev w12,w8 - aese v17.16b,v22.16b - aesmc v17.16b,v17.16b - mov v18.s[3], w12 - subs x2,x2,#3 - aese v4.16b,v23.16b - aese v5.16b,v23.16b - aese v17.16b,v23.16b - - eor v2.16b,v2.16b,v4.16b - ld1 {v16.4s},[x7],#16 // re-pre-load rndkey[0] - st1 {v2.16b},[x1],#16 - eor v3.16b,v3.16b,v5.16b - mov w6,w5 - st1 {v3.16b},[x1],#16 - eor v19.16b,v19.16b,v17.16b - ld1 {v17.4s},[x7],#16 // re-pre-load rndkey[1] - st1 {v19.16b},[x1],#16 - b.hs .Loop3x_ctr32 - - adds x2,x2,#3 - b.eq .Lctr32_done - cmp x2,#1 - mov x12,#16 - csel x12,xzr,x12,eq - -.Lctr32_tail: - aese v0.16b,v16.16b - aesmc v0.16b,v0.16b - aese v1.16b,v16.16b - aesmc v1.16b,v1.16b - ld1 {v16.4s},[x7],#16 - subs w6,w6,#2 - aese v0.16b,v17.16b - aesmc v0.16b,v0.16b - aese v1.16b,v17.16b - aesmc v1.16b,v1.16b - ld1 {v17.4s},[x7],#16 - b.gt .Lctr32_tail - - aese v0.16b,v16.16b - aesmc v0.16b,v0.16b - aese v1.16b,v16.16b - aesmc v1.16b,v1.16b - aese v0.16b,v17.16b - aesmc v0.16b,v0.16b - aese v1.16b,v17.16b - aesmc v1.16b,v1.16b - ld1 {v2.16b},[x0],x12 - aese v0.16b,v20.16b - aesmc v0.16b,v0.16b - aese v1.16b,v20.16b - aesmc v1.16b,v1.16b - ld1 {v3.16b},[x0] - aese v0.16b,v21.16b - aesmc v0.16b,v0.16b - aese v1.16b,v21.16b - aesmc v1.16b,v1.16b - eor v2.16b,v2.16b,v7.16b - aese v0.16b,v22.16b - aesmc v0.16b,v0.16b - aese v1.16b,v22.16b - aesmc v1.16b,v1.16b - eor v3.16b,v3.16b,v7.16b - aese v0.16b,v23.16b - aese v1.16b,v23.16b - - cmp x2,#1 - eor v2.16b,v2.16b,v0.16b - eor v3.16b,v3.16b,v1.16b - st1 {v2.16b},[x1],#16 - b.eq .Lctr32_done - st1 {v3.16b},[x1] - -.Lctr32_done: - ldr x29,[sp],#16 - ret -.size aes_v8_ctr32_encrypt_blocks,.-aes_v8_ctr32_encrypt_blocks -#endif -#endif \ No newline at end of file diff --git a/third_party/boringssl/linux-aarch64/crypto/modes/ghashv8-armx64.S b/third_party/boringssl/linux-aarch64/crypto/modes/ghashv8-armx64.S deleted file mode 100644 index a0a9b6807a96b..0000000000000 --- a/third_party/boringssl/linux-aarch64/crypto/modes/ghashv8-armx64.S +++ /dev/null @@ -1,232 +0,0 @@ -#if defined(__aarch64__) -#include "arm_arch.h" - -.text -#if !defined(__clang__) -.arch armv8-a+crypto -#endif -.globl gcm_init_v8 -.type gcm_init_v8,%function -.align 4 -gcm_init_v8: - ld1 {v17.2d},[x1] //load input H - movi v19.16b,#0xe1 - shl v19.2d,v19.2d,#57 //0xc2.0 - ext v3.16b,v17.16b,v17.16b,#8 - ushr v18.2d,v19.2d,#63 - dup v17.4s,v17.s[1] - ext v16.16b,v18.16b,v19.16b,#8 //t0=0xc2....01 - ushr v18.2d,v3.2d,#63 - sshr v17.4s,v17.4s,#31 //broadcast carry bit - and v18.16b,v18.16b,v16.16b - shl v3.2d,v3.2d,#1 - ext v18.16b,v18.16b,v18.16b,#8 - and v16.16b,v16.16b,v17.16b - orr v3.16b,v3.16b,v18.16b //H<<<=1 - eor v20.16b,v3.16b,v16.16b //twisted H - st1 {v20.2d},[x0],#16 //store Htable[0] - - //calculate H^2 - ext v16.16b,v20.16b,v20.16b,#8 //Karatsuba pre-processing - pmull v0.1q,v20.1d,v20.1d - eor v16.16b,v16.16b,v20.16b - pmull2 v2.1q,v20.2d,v20.2d - pmull v1.1q,v16.1d,v16.1d - - ext v17.16b,v0.16b,v2.16b,#8 //Karatsuba post-processing - eor v18.16b,v0.16b,v2.16b - eor v1.16b,v1.16b,v17.16b - eor v1.16b,v1.16b,v18.16b - pmull v18.1q,v0.1d,v19.1d //1st phase - - ins v2.d[0],v1.d[1] - ins v1.d[1],v0.d[0] - eor v0.16b,v1.16b,v18.16b - - ext v18.16b,v0.16b,v0.16b,#8 //2nd phase - pmull v0.1q,v0.1d,v19.1d - eor v18.16b,v18.16b,v2.16b - eor v22.16b,v0.16b,v18.16b - - ext v17.16b,v22.16b,v22.16b,#8 //Karatsuba pre-processing - eor v17.16b,v17.16b,v22.16b - ext v21.16b,v16.16b,v17.16b,#8 //pack Karatsuba pre-processed - st1 {v21.2d,v22.2d},[x0] //store Htable[1..2] - - ret -.size gcm_init_v8,.-gcm_init_v8 -.globl gcm_gmult_v8 -.type gcm_gmult_v8,%function -.align 4 -gcm_gmult_v8: - ld1 {v17.2d},[x0] //load Xi - movi v19.16b,#0xe1 - ld1 {v20.2d,v21.2d},[x1] //load twisted H, ... - shl v19.2d,v19.2d,#57 -#ifndef __ARMEB__ - rev64 v17.16b,v17.16b -#endif - ext v3.16b,v17.16b,v17.16b,#8 - - pmull v0.1q,v20.1d,v3.1d //H.lo·Xi.lo - eor v17.16b,v17.16b,v3.16b //Karatsuba pre-processing - pmull2 v2.1q,v20.2d,v3.2d //H.hi·Xi.hi - pmull v1.1q,v21.1d,v17.1d //(H.lo+H.hi)·(Xi.lo+Xi.hi) - - ext v17.16b,v0.16b,v2.16b,#8 //Karatsuba post-processing - eor v18.16b,v0.16b,v2.16b - eor v1.16b,v1.16b,v17.16b - eor v1.16b,v1.16b,v18.16b - pmull v18.1q,v0.1d,v19.1d //1st phase of reduction - - ins v2.d[0],v1.d[1] - ins v1.d[1],v0.d[0] - eor v0.16b,v1.16b,v18.16b - - ext v18.16b,v0.16b,v0.16b,#8 //2nd phase of reduction - pmull v0.1q,v0.1d,v19.1d - eor v18.16b,v18.16b,v2.16b - eor v0.16b,v0.16b,v18.16b - -#ifndef __ARMEB__ - rev64 v0.16b,v0.16b -#endif - ext v0.16b,v0.16b,v0.16b,#8 - st1 {v0.2d},[x0] //write out Xi - - ret -.size gcm_gmult_v8,.-gcm_gmult_v8 -.globl gcm_ghash_v8 -.type gcm_ghash_v8,%function -.align 4 -gcm_ghash_v8: - ld1 {v0.2d},[x0] //load [rotated] Xi - //"[rotated]" means that - //loaded value would have - //to be rotated in order to - //make it appear as in - //alorithm specification - subs x3,x3,#32 //see if x3 is 32 or larger - mov x12,#16 //x12 is used as post- - //increment for input pointer; - //as loop is modulo-scheduled - //x12 is zeroed just in time - //to preclude oversteping - //inp[len], which means that - //last block[s] are actually - //loaded twice, but last - //copy is not processed - ld1 {v20.2d,v21.2d},[x1],#32 //load twisted H, ..., H^2 - movi v19.16b,#0xe1 - ld1 {v22.2d},[x1] - csel x12,xzr,x12,eq //is it time to zero x12? - ext v0.16b,v0.16b,v0.16b,#8 //rotate Xi - ld1 {v16.2d},[x2],#16 //load [rotated] I[0] - shl v19.2d,v19.2d,#57 //compose 0xc2.0 constant -#ifndef __ARMEB__ - rev64 v16.16b,v16.16b - rev64 v0.16b,v0.16b -#endif - ext v3.16b,v16.16b,v16.16b,#8 //rotate I[0] - b.lo .Lodd_tail_v8 //x3 was less than 32 - ld1 {v17.2d},[x2],x12 //load [rotated] I[1] -#ifndef __ARMEB__ - rev64 v17.16b,v17.16b -#endif - ext v7.16b,v17.16b,v17.16b,#8 - eor v3.16b,v3.16b,v0.16b //I[i]^=Xi - pmull v4.1q,v20.1d,v7.1d //H·Ii+1 - eor v17.16b,v17.16b,v7.16b //Karatsuba pre-processing - pmull2 v6.1q,v20.2d,v7.2d - b .Loop_mod2x_v8 - -.align 4 -.Loop_mod2x_v8: - ext v18.16b,v3.16b,v3.16b,#8 - subs x3,x3,#32 //is there more data? - pmull v0.1q,v22.1d,v3.1d //H^2.lo·Xi.lo - csel x12,xzr,x12,lo //is it time to zero x12? - - pmull v5.1q,v21.1d,v17.1d - eor v18.16b,v18.16b,v3.16b //Karatsuba pre-processing - pmull2 v2.1q,v22.2d,v3.2d //H^2.hi·Xi.hi - eor v0.16b,v0.16b,v4.16b //accumulate - pmull2 v1.1q,v21.2d,v18.2d //(H^2.lo+H^2.hi)·(Xi.lo+Xi.hi) - ld1 {v16.2d},[x2],x12 //load [rotated] I[i+2] - - eor v2.16b,v2.16b,v6.16b - csel x12,xzr,x12,eq //is it time to zero x12? - eor v1.16b,v1.16b,v5.16b - - ext v17.16b,v0.16b,v2.16b,#8 //Karatsuba post-processing - eor v18.16b,v0.16b,v2.16b - eor v1.16b,v1.16b,v17.16b - ld1 {v17.2d},[x2],x12 //load [rotated] I[i+3] -#ifndef __ARMEB__ - rev64 v16.16b,v16.16b -#endif - eor v1.16b,v1.16b,v18.16b - pmull v18.1q,v0.1d,v19.1d //1st phase of reduction - -#ifndef __ARMEB__ - rev64 v17.16b,v17.16b -#endif - ins v2.d[0],v1.d[1] - ins v1.d[1],v0.d[0] - ext v7.16b,v17.16b,v17.16b,#8 - ext v3.16b,v16.16b,v16.16b,#8 - eor v0.16b,v1.16b,v18.16b - pmull v4.1q,v20.1d,v7.1d //H·Ii+1 - eor v3.16b,v3.16b,v2.16b //accumulate v3.16b early - - ext v18.16b,v0.16b,v0.16b,#8 //2nd phase of reduction - pmull v0.1q,v0.1d,v19.1d - eor v3.16b,v3.16b,v18.16b - eor v17.16b,v17.16b,v7.16b //Karatsuba pre-processing - eor v3.16b,v3.16b,v0.16b - pmull2 v6.1q,v20.2d,v7.2d - b.hs .Loop_mod2x_v8 //there was at least 32 more bytes - - eor v2.16b,v2.16b,v18.16b - ext v3.16b,v16.16b,v16.16b,#8 //re-construct v3.16b - adds x3,x3,#32 //re-construct x3 - eor v0.16b,v0.16b,v2.16b //re-construct v0.16b - b.eq .Ldone_v8 //is x3 zero? -.Lodd_tail_v8: - ext v18.16b,v0.16b,v0.16b,#8 - eor v3.16b,v3.16b,v0.16b //inp^=Xi - eor v17.16b,v16.16b,v18.16b //v17.16b is rotated inp^Xi - - pmull v0.1q,v20.1d,v3.1d //H.lo·Xi.lo - eor v17.16b,v17.16b,v3.16b //Karatsuba pre-processing - pmull2 v2.1q,v20.2d,v3.2d //H.hi·Xi.hi - pmull v1.1q,v21.1d,v17.1d //(H.lo+H.hi)·(Xi.lo+Xi.hi) - - ext v17.16b,v0.16b,v2.16b,#8 //Karatsuba post-processing - eor v18.16b,v0.16b,v2.16b - eor v1.16b,v1.16b,v17.16b - eor v1.16b,v1.16b,v18.16b - pmull v18.1q,v0.1d,v19.1d //1st phase of reduction - - ins v2.d[0],v1.d[1] - ins v1.d[1],v0.d[0] - eor v0.16b,v1.16b,v18.16b - - ext v18.16b,v0.16b,v0.16b,#8 //2nd phase of reduction - pmull v0.1q,v0.1d,v19.1d - eor v18.16b,v18.16b,v2.16b - eor v0.16b,v0.16b,v18.16b - -.Ldone_v8: -#ifndef __ARMEB__ - rev64 v0.16b,v0.16b -#endif - ext v0.16b,v0.16b,v0.16b,#8 - st1 {v0.2d},[x0] //write out Xi - - ret -.size gcm_ghash_v8,.-gcm_ghash_v8 -.byte 71,72,65,83,72,32,102,111,114,32,65,82,77,118,56,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 2 -.align 2 -#endif \ No newline at end of file diff --git a/third_party/boringssl/linux-aarch64/crypto/sha/sha1-armv8.S b/third_party/boringssl/linux-aarch64/crypto/sha/sha1-armv8.S deleted file mode 100644 index 487a497da27f6..0000000000000 --- a/third_party/boringssl/linux-aarch64/crypto/sha/sha1-armv8.S +++ /dev/null @@ -1,1215 +0,0 @@ -#if defined(__aarch64__) -#include "arm_arch.h" - -.text - - -.globl sha1_block_data_order -.type sha1_block_data_order,%function -.align 6 -sha1_block_data_order: - ldr x16,.LOPENSSL_armcap_P - adr x17,.LOPENSSL_armcap_P - add x16,x16,x17 - ldr w16,[x16] - tst w16,#ARMV8_SHA1 - b.ne .Lv8_entry - - stp x29,x30,[sp,#-96]! - add x29,sp,#0 - stp x19,x20,[sp,#16] - stp x21,x22,[sp,#32] - stp x23,x24,[sp,#48] - stp x25,x26,[sp,#64] - stp x27,x28,[sp,#80] - - ldp w20,w21,[x0] - ldp w22,w23,[x0,#8] - ldr w24,[x0,#16] - -.Loop: - ldr x3,[x1],#64 - movz w28,#0x7999 - sub x2,x2,#1 - movk w28,#0x5a82,lsl#16 -#ifdef __ARMEB__ - ror x3,x3,#32 -#else - rev32 x3,x3 -#endif - add w24,w24,w28 // warm it up - add w24,w24,w3 - lsr x4,x3,#32 - ldr x5,[x1,#-56] - bic w25,w23,w21 - and w26,w22,w21 - ror w27,w20,#27 - add w23,w23,w28 // future e+=K - orr w25,w25,w26 - add w24,w24,w27 // e+=rot(a,5) - ror w21,w21,#2 - add w23,w23,w4 // future e+=X[i] - add w24,w24,w25 // e+=F(b,c,d) -#ifdef __ARMEB__ - ror x5,x5,#32 -#else - rev32 x5,x5 -#endif - bic w25,w22,w20 - and w26,w21,w20 - ror w27,w24,#27 - add w22,w22,w28 // future e+=K - orr w25,w25,w26 - add w23,w23,w27 // e+=rot(a,5) - ror w20,w20,#2 - add w22,w22,w5 // future e+=X[i] - add w23,w23,w25 // e+=F(b,c,d) - lsr x6,x5,#32 - ldr x7,[x1,#-48] - bic w25,w21,w24 - and w26,w20,w24 - ror w27,w23,#27 - add w21,w21,w28 // future e+=K - orr w25,w25,w26 - add w22,w22,w27 // e+=rot(a,5) - ror w24,w24,#2 - add w21,w21,w6 // future e+=X[i] - add w22,w22,w25 // e+=F(b,c,d) -#ifdef __ARMEB__ - ror x7,x7,#32 -#else - rev32 x7,x7 -#endif - bic w25,w20,w23 - and w26,w24,w23 - ror w27,w22,#27 - add w20,w20,w28 // future e+=K - orr w25,w25,w26 - add w21,w21,w27 // e+=rot(a,5) - ror w23,w23,#2 - add w20,w20,w7 // future e+=X[i] - add w21,w21,w25 // e+=F(b,c,d) - lsr x8,x7,#32 - ldr x9,[x1,#-40] - bic w25,w24,w22 - and w26,w23,w22 - ror w27,w21,#27 - add w24,w24,w28 // future e+=K - orr w25,w25,w26 - add w20,w20,w27 // e+=rot(a,5) - ror w22,w22,#2 - add w24,w24,w8 // future e+=X[i] - add w20,w20,w25 // e+=F(b,c,d) -#ifdef __ARMEB__ - ror x9,x9,#32 -#else - rev32 x9,x9 -#endif - bic w25,w23,w21 - and w26,w22,w21 - ror w27,w20,#27 - add w23,w23,w28 // future e+=K - orr w25,w25,w26 - add w24,w24,w27 // e+=rot(a,5) - ror w21,w21,#2 - add w23,w23,w9 // future e+=X[i] - add w24,w24,w25 // e+=F(b,c,d) - lsr x10,x9,#32 - ldr x11,[x1,#-32] - bic w25,w22,w20 - and w26,w21,w20 - ror w27,w24,#27 - add w22,w22,w28 // future e+=K - orr w25,w25,w26 - add w23,w23,w27 // e+=rot(a,5) - ror w20,w20,#2 - add w22,w22,w10 // future e+=X[i] - add w23,w23,w25 // e+=F(b,c,d) -#ifdef __ARMEB__ - ror x11,x11,#32 -#else - rev32 x11,x11 -#endif - bic w25,w21,w24 - and w26,w20,w24 - ror w27,w23,#27 - add w21,w21,w28 // future e+=K - orr w25,w25,w26 - add w22,w22,w27 // e+=rot(a,5) - ror w24,w24,#2 - add w21,w21,w11 // future e+=X[i] - add w22,w22,w25 // e+=F(b,c,d) - lsr x12,x11,#32 - ldr x13,[x1,#-24] - bic w25,w20,w23 - and w26,w24,w23 - ror w27,w22,#27 - add w20,w20,w28 // future e+=K - orr w25,w25,w26 - add w21,w21,w27 // e+=rot(a,5) - ror w23,w23,#2 - add w20,w20,w12 // future e+=X[i] - add w21,w21,w25 // e+=F(b,c,d) -#ifdef __ARMEB__ - ror x13,x13,#32 -#else - rev32 x13,x13 -#endif - bic w25,w24,w22 - and w26,w23,w22 - ror w27,w21,#27 - add w24,w24,w28 // future e+=K - orr w25,w25,w26 - add w20,w20,w27 // e+=rot(a,5) - ror w22,w22,#2 - add w24,w24,w13 // future e+=X[i] - add w20,w20,w25 // e+=F(b,c,d) - lsr x14,x13,#32 - ldr x15,[x1,#-16] - bic w25,w23,w21 - and w26,w22,w21 - ror w27,w20,#27 - add w23,w23,w28 // future e+=K - orr w25,w25,w26 - add w24,w24,w27 // e+=rot(a,5) - ror w21,w21,#2 - add w23,w23,w14 // future e+=X[i] - add w24,w24,w25 // e+=F(b,c,d) -#ifdef __ARMEB__ - ror x15,x15,#32 -#else - rev32 x15,x15 -#endif - bic w25,w22,w20 - and w26,w21,w20 - ror w27,w24,#27 - add w22,w22,w28 // future e+=K - orr w25,w25,w26 - add w23,w23,w27 // e+=rot(a,5) - ror w20,w20,#2 - add w22,w22,w15 // future e+=X[i] - add w23,w23,w25 // e+=F(b,c,d) - lsr x16,x15,#32 - ldr x17,[x1,#-8] - bic w25,w21,w24 - and w26,w20,w24 - ror w27,w23,#27 - add w21,w21,w28 // future e+=K - orr w25,w25,w26 - add w22,w22,w27 // e+=rot(a,5) - ror w24,w24,#2 - add w21,w21,w16 // future e+=X[i] - add w22,w22,w25 // e+=F(b,c,d) -#ifdef __ARMEB__ - ror x17,x17,#32 -#else - rev32 x17,x17 -#endif - bic w25,w20,w23 - and w26,w24,w23 - ror w27,w22,#27 - add w20,w20,w28 // future e+=K - orr w25,w25,w26 - add w21,w21,w27 // e+=rot(a,5) - ror w23,w23,#2 - add w20,w20,w17 // future e+=X[i] - add w21,w21,w25 // e+=F(b,c,d) - lsr x19,x17,#32 - eor w3,w3,w5 - bic w25,w24,w22 - and w26,w23,w22 - ror w27,w21,#27 - eor w3,w3,w11 - add w24,w24,w28 // future e+=K - orr w25,w25,w26 - add w20,w20,w27 // e+=rot(a,5) - eor w3,w3,w16 - ror w22,w22,#2 - add w24,w24,w19 // future e+=X[i] - add w20,w20,w25 // e+=F(b,c,d) - ror w3,w3,#31 - eor w4,w4,w6 - bic w25,w23,w21 - and w26,w22,w21 - ror w27,w20,#27 - eor w4,w4,w12 - add w23,w23,w28 // future e+=K - orr w25,w25,w26 - add w24,w24,w27 // e+=rot(a,5) - eor w4,w4,w17 - ror w21,w21,#2 - add w23,w23,w3 // future e+=X[i] - add w24,w24,w25 // e+=F(b,c,d) - ror w4,w4,#31 - eor w5,w5,w7 - bic w25,w22,w20 - and w26,w21,w20 - ror w27,w24,#27 - eor w5,w5,w13 - add w22,w22,w28 // future e+=K - orr w25,w25,w26 - add w23,w23,w27 // e+=rot(a,5) - eor w5,w5,w19 - ror w20,w20,#2 - add w22,w22,w4 // future e+=X[i] - add w23,w23,w25 // e+=F(b,c,d) - ror w5,w5,#31 - eor w6,w6,w8 - bic w25,w21,w24 - and w26,w20,w24 - ror w27,w23,#27 - eor w6,w6,w14 - add w21,w21,w28 // future e+=K - orr w25,w25,w26 - add w22,w22,w27 // e+=rot(a,5) - eor w6,w6,w3 - ror w24,w24,#2 - add w21,w21,w5 // future e+=X[i] - add w22,w22,w25 // e+=F(b,c,d) - ror w6,w6,#31 - eor w7,w7,w9 - bic w25,w20,w23 - and w26,w24,w23 - ror w27,w22,#27 - eor w7,w7,w15 - add w20,w20,w28 // future e+=K - orr w25,w25,w26 - add w21,w21,w27 // e+=rot(a,5) - eor w7,w7,w4 - ror w23,w23,#2 - add w20,w20,w6 // future e+=X[i] - add w21,w21,w25 // e+=F(b,c,d) - ror w7,w7,#31 - movz w28,#0xeba1 - movk w28,#0x6ed9,lsl#16 - eor w8,w8,w10 - bic w25,w24,w22 - and w26,w23,w22 - ror w27,w21,#27 - eor w8,w8,w16 - add w24,w24,w28 // future e+=K - orr w25,w25,w26 - add w20,w20,w27 // e+=rot(a,5) - eor w8,w8,w5 - ror w22,w22,#2 - add w24,w24,w7 // future e+=X[i] - add w20,w20,w25 // e+=F(b,c,d) - ror w8,w8,#31 - eor w9,w9,w11 - eor w25,w23,w21 - ror w27,w20,#27 - add w23,w23,w28 // future e+=K - eor w9,w9,w17 - eor w25,w25,w22 - add w24,w24,w27 // e+=rot(a,5) - ror w21,w21,#2 - eor w9,w9,w6 - add w23,w23,w8 // future e+=X[i] - add w24,w24,w25 // e+=F(b,c,d) - ror w9,w9,#31 - eor w10,w10,w12 - eor w25,w22,w20 - ror w27,w24,#27 - add w22,w22,w28 // future e+=K - eor w10,w10,w19 - eor w25,w25,w21 - add w23,w23,w27 // e+=rot(a,5) - ror w20,w20,#2 - eor w10,w10,w7 - add w22,w22,w9 // future e+=X[i] - add w23,w23,w25 // e+=F(b,c,d) - ror w10,w10,#31 - eor w11,w11,w13 - eor w25,w21,w24 - ror w27,w23,#27 - add w21,w21,w28 // future e+=K - eor w11,w11,w3 - eor w25,w25,w20 - add w22,w22,w27 // e+=rot(a,5) - ror w24,w24,#2 - eor w11,w11,w8 - add w21,w21,w10 // future e+=X[i] - add w22,w22,w25 // e+=F(b,c,d) - ror w11,w11,#31 - eor w12,w12,w14 - eor w25,w20,w23 - ror w27,w22,#27 - add w20,w20,w28 // future e+=K - eor w12,w12,w4 - eor w25,w25,w24 - add w21,w21,w27 // e+=rot(a,5) - ror w23,w23,#2 - eor w12,w12,w9 - add w20,w20,w11 // future e+=X[i] - add w21,w21,w25 // e+=F(b,c,d) - ror w12,w12,#31 - eor w13,w13,w15 - eor w25,w24,w22 - ror w27,w21,#27 - add w24,w24,w28 // future e+=K - eor w13,w13,w5 - eor w25,w25,w23 - add w20,w20,w27 // e+=rot(a,5) - ror w22,w22,#2 - eor w13,w13,w10 - add w24,w24,w12 // future e+=X[i] - add w20,w20,w25 // e+=F(b,c,d) - ror w13,w13,#31 - eor w14,w14,w16 - eor w25,w23,w21 - ror w27,w20,#27 - add w23,w23,w28 // future e+=K - eor w14,w14,w6 - eor w25,w25,w22 - add w24,w24,w27 // e+=rot(a,5) - ror w21,w21,#2 - eor w14,w14,w11 - add w23,w23,w13 // future e+=X[i] - add w24,w24,w25 // e+=F(b,c,d) - ror w14,w14,#31 - eor w15,w15,w17 - eor w25,w22,w20 - ror w27,w24,#27 - add w22,w22,w28 // future e+=K - eor w15,w15,w7 - eor w25,w25,w21 - add w23,w23,w27 // e+=rot(a,5) - ror w20,w20,#2 - eor w15,w15,w12 - add w22,w22,w14 // future e+=X[i] - add w23,w23,w25 // e+=F(b,c,d) - ror w15,w15,#31 - eor w16,w16,w19 - eor w25,w21,w24 - ror w27,w23,#27 - add w21,w21,w28 // future e+=K - eor w16,w16,w8 - eor w25,w25,w20 - add w22,w22,w27 // e+=rot(a,5) - ror w24,w24,#2 - eor w16,w16,w13 - add w21,w21,w15 // future e+=X[i] - add w22,w22,w25 // e+=F(b,c,d) - ror w16,w16,#31 - eor w17,w17,w3 - eor w25,w20,w23 - ror w27,w22,#27 - add w20,w20,w28 // future e+=K - eor w17,w17,w9 - eor w25,w25,w24 - add w21,w21,w27 // e+=rot(a,5) - ror w23,w23,#2 - eor w17,w17,w14 - add w20,w20,w16 // future e+=X[i] - add w21,w21,w25 // e+=F(b,c,d) - ror w17,w17,#31 - eor w19,w19,w4 - eor w25,w24,w22 - ror w27,w21,#27 - add w24,w24,w28 // future e+=K - eor w19,w19,w10 - eor w25,w25,w23 - add w20,w20,w27 // e+=rot(a,5) - ror w22,w22,#2 - eor w19,w19,w15 - add w24,w24,w17 // future e+=X[i] - add w20,w20,w25 // e+=F(b,c,d) - ror w19,w19,#31 - eor w3,w3,w5 - eor w25,w23,w21 - ror w27,w20,#27 - add w23,w23,w28 // future e+=K - eor w3,w3,w11 - eor w25,w25,w22 - add w24,w24,w27 // e+=rot(a,5) - ror w21,w21,#2 - eor w3,w3,w16 - add w23,w23,w19 // future e+=X[i] - add w24,w24,w25 // e+=F(b,c,d) - ror w3,w3,#31 - eor w4,w4,w6 - eor w25,w22,w20 - ror w27,w24,#27 - add w22,w22,w28 // future e+=K - eor w4,w4,w12 - eor w25,w25,w21 - add w23,w23,w27 // e+=rot(a,5) - ror w20,w20,#2 - eor w4,w4,w17 - add w22,w22,w3 // future e+=X[i] - add w23,w23,w25 // e+=F(b,c,d) - ror w4,w4,#31 - eor w5,w5,w7 - eor w25,w21,w24 - ror w27,w23,#27 - add w21,w21,w28 // future e+=K - eor w5,w5,w13 - eor w25,w25,w20 - add w22,w22,w27 // e+=rot(a,5) - ror w24,w24,#2 - eor w5,w5,w19 - add w21,w21,w4 // future e+=X[i] - add w22,w22,w25 // e+=F(b,c,d) - ror w5,w5,#31 - eor w6,w6,w8 - eor w25,w20,w23 - ror w27,w22,#27 - add w20,w20,w28 // future e+=K - eor w6,w6,w14 - eor w25,w25,w24 - add w21,w21,w27 // e+=rot(a,5) - ror w23,w23,#2 - eor w6,w6,w3 - add w20,w20,w5 // future e+=X[i] - add w21,w21,w25 // e+=F(b,c,d) - ror w6,w6,#31 - eor w7,w7,w9 - eor w25,w24,w22 - ror w27,w21,#27 - add w24,w24,w28 // future e+=K - eor w7,w7,w15 - eor w25,w25,w23 - add w20,w20,w27 // e+=rot(a,5) - ror w22,w22,#2 - eor w7,w7,w4 - add w24,w24,w6 // future e+=X[i] - add w20,w20,w25 // e+=F(b,c,d) - ror w7,w7,#31 - eor w8,w8,w10 - eor w25,w23,w21 - ror w27,w20,#27 - add w23,w23,w28 // future e+=K - eor w8,w8,w16 - eor w25,w25,w22 - add w24,w24,w27 // e+=rot(a,5) - ror w21,w21,#2 - eor w8,w8,w5 - add w23,w23,w7 // future e+=X[i] - add w24,w24,w25 // e+=F(b,c,d) - ror w8,w8,#31 - eor w9,w9,w11 - eor w25,w22,w20 - ror w27,w24,#27 - add w22,w22,w28 // future e+=K - eor w9,w9,w17 - eor w25,w25,w21 - add w23,w23,w27 // e+=rot(a,5) - ror w20,w20,#2 - eor w9,w9,w6 - add w22,w22,w8 // future e+=X[i] - add w23,w23,w25 // e+=F(b,c,d) - ror w9,w9,#31 - eor w10,w10,w12 - eor w25,w21,w24 - ror w27,w23,#27 - add w21,w21,w28 // future e+=K - eor w10,w10,w19 - eor w25,w25,w20 - add w22,w22,w27 // e+=rot(a,5) - ror w24,w24,#2 - eor w10,w10,w7 - add w21,w21,w9 // future e+=X[i] - add w22,w22,w25 // e+=F(b,c,d) - ror w10,w10,#31 - eor w11,w11,w13 - eor w25,w20,w23 - ror w27,w22,#27 - add w20,w20,w28 // future e+=K - eor w11,w11,w3 - eor w25,w25,w24 - add w21,w21,w27 // e+=rot(a,5) - ror w23,w23,#2 - eor w11,w11,w8 - add w20,w20,w10 // future e+=X[i] - add w21,w21,w25 // e+=F(b,c,d) - ror w11,w11,#31 - movz w28,#0xbcdc - movk w28,#0x8f1b,lsl#16 - eor w12,w12,w14 - eor w25,w24,w22 - ror w27,w21,#27 - add w24,w24,w28 // future e+=K - eor w12,w12,w4 - eor w25,w25,w23 - add w20,w20,w27 // e+=rot(a,5) - ror w22,w22,#2 - eor w12,w12,w9 - add w24,w24,w11 // future e+=X[i] - add w20,w20,w25 // e+=F(b,c,d) - ror w12,w12,#31 - orr w25,w21,w22 - and w26,w21,w22 - eor w13,w13,w15 - ror w27,w20,#27 - and w25,w25,w23 - add w23,w23,w28 // future e+=K - eor w13,w13,w5 - add w24,w24,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w21,w21,#2 - eor w13,w13,w10 - add w23,w23,w12 // future e+=X[i] - add w24,w24,w25 // e+=F(b,c,d) - ror w13,w13,#31 - orr w25,w20,w21 - and w26,w20,w21 - eor w14,w14,w16 - ror w27,w24,#27 - and w25,w25,w22 - add w22,w22,w28 // future e+=K - eor w14,w14,w6 - add w23,w23,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w20,w20,#2 - eor w14,w14,w11 - add w22,w22,w13 // future e+=X[i] - add w23,w23,w25 // e+=F(b,c,d) - ror w14,w14,#31 - orr w25,w24,w20 - and w26,w24,w20 - eor w15,w15,w17 - ror w27,w23,#27 - and w25,w25,w21 - add w21,w21,w28 // future e+=K - eor w15,w15,w7 - add w22,w22,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w24,w24,#2 - eor w15,w15,w12 - add w21,w21,w14 // future e+=X[i] - add w22,w22,w25 // e+=F(b,c,d) - ror w15,w15,#31 - orr w25,w23,w24 - and w26,w23,w24 - eor w16,w16,w19 - ror w27,w22,#27 - and w25,w25,w20 - add w20,w20,w28 // future e+=K - eor w16,w16,w8 - add w21,w21,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w23,w23,#2 - eor w16,w16,w13 - add w20,w20,w15 // future e+=X[i] - add w21,w21,w25 // e+=F(b,c,d) - ror w16,w16,#31 - orr w25,w22,w23 - and w26,w22,w23 - eor w17,w17,w3 - ror w27,w21,#27 - and w25,w25,w24 - add w24,w24,w28 // future e+=K - eor w17,w17,w9 - add w20,w20,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w22,w22,#2 - eor w17,w17,w14 - add w24,w24,w16 // future e+=X[i] - add w20,w20,w25 // e+=F(b,c,d) - ror w17,w17,#31 - orr w25,w21,w22 - and w26,w21,w22 - eor w19,w19,w4 - ror w27,w20,#27 - and w25,w25,w23 - add w23,w23,w28 // future e+=K - eor w19,w19,w10 - add w24,w24,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w21,w21,#2 - eor w19,w19,w15 - add w23,w23,w17 // future e+=X[i] - add w24,w24,w25 // e+=F(b,c,d) - ror w19,w19,#31 - orr w25,w20,w21 - and w26,w20,w21 - eor w3,w3,w5 - ror w27,w24,#27 - and w25,w25,w22 - add w22,w22,w28 // future e+=K - eor w3,w3,w11 - add w23,w23,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w20,w20,#2 - eor w3,w3,w16 - add w22,w22,w19 // future e+=X[i] - add w23,w23,w25 // e+=F(b,c,d) - ror w3,w3,#31 - orr w25,w24,w20 - and w26,w24,w20 - eor w4,w4,w6 - ror w27,w23,#27 - and w25,w25,w21 - add w21,w21,w28 // future e+=K - eor w4,w4,w12 - add w22,w22,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w24,w24,#2 - eor w4,w4,w17 - add w21,w21,w3 // future e+=X[i] - add w22,w22,w25 // e+=F(b,c,d) - ror w4,w4,#31 - orr w25,w23,w24 - and w26,w23,w24 - eor w5,w5,w7 - ror w27,w22,#27 - and w25,w25,w20 - add w20,w20,w28 // future e+=K - eor w5,w5,w13 - add w21,w21,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w23,w23,#2 - eor w5,w5,w19 - add w20,w20,w4 // future e+=X[i] - add w21,w21,w25 // e+=F(b,c,d) - ror w5,w5,#31 - orr w25,w22,w23 - and w26,w22,w23 - eor w6,w6,w8 - ror w27,w21,#27 - and w25,w25,w24 - add w24,w24,w28 // future e+=K - eor w6,w6,w14 - add w20,w20,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w22,w22,#2 - eor w6,w6,w3 - add w24,w24,w5 // future e+=X[i] - add w20,w20,w25 // e+=F(b,c,d) - ror w6,w6,#31 - orr w25,w21,w22 - and w26,w21,w22 - eor w7,w7,w9 - ror w27,w20,#27 - and w25,w25,w23 - add w23,w23,w28 // future e+=K - eor w7,w7,w15 - add w24,w24,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w21,w21,#2 - eor w7,w7,w4 - add w23,w23,w6 // future e+=X[i] - add w24,w24,w25 // e+=F(b,c,d) - ror w7,w7,#31 - orr w25,w20,w21 - and w26,w20,w21 - eor w8,w8,w10 - ror w27,w24,#27 - and w25,w25,w22 - add w22,w22,w28 // future e+=K - eor w8,w8,w16 - add w23,w23,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w20,w20,#2 - eor w8,w8,w5 - add w22,w22,w7 // future e+=X[i] - add w23,w23,w25 // e+=F(b,c,d) - ror w8,w8,#31 - orr w25,w24,w20 - and w26,w24,w20 - eor w9,w9,w11 - ror w27,w23,#27 - and w25,w25,w21 - add w21,w21,w28 // future e+=K - eor w9,w9,w17 - add w22,w22,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w24,w24,#2 - eor w9,w9,w6 - add w21,w21,w8 // future e+=X[i] - add w22,w22,w25 // e+=F(b,c,d) - ror w9,w9,#31 - orr w25,w23,w24 - and w26,w23,w24 - eor w10,w10,w12 - ror w27,w22,#27 - and w25,w25,w20 - add w20,w20,w28 // future e+=K - eor w10,w10,w19 - add w21,w21,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w23,w23,#2 - eor w10,w10,w7 - add w20,w20,w9 // future e+=X[i] - add w21,w21,w25 // e+=F(b,c,d) - ror w10,w10,#31 - orr w25,w22,w23 - and w26,w22,w23 - eor w11,w11,w13 - ror w27,w21,#27 - and w25,w25,w24 - add w24,w24,w28 // future e+=K - eor w11,w11,w3 - add w20,w20,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w22,w22,#2 - eor w11,w11,w8 - add w24,w24,w10 // future e+=X[i] - add w20,w20,w25 // e+=F(b,c,d) - ror w11,w11,#31 - orr w25,w21,w22 - and w26,w21,w22 - eor w12,w12,w14 - ror w27,w20,#27 - and w25,w25,w23 - add w23,w23,w28 // future e+=K - eor w12,w12,w4 - add w24,w24,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w21,w21,#2 - eor w12,w12,w9 - add w23,w23,w11 // future e+=X[i] - add w24,w24,w25 // e+=F(b,c,d) - ror w12,w12,#31 - orr w25,w20,w21 - and w26,w20,w21 - eor w13,w13,w15 - ror w27,w24,#27 - and w25,w25,w22 - add w22,w22,w28 // future e+=K - eor w13,w13,w5 - add w23,w23,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w20,w20,#2 - eor w13,w13,w10 - add w22,w22,w12 // future e+=X[i] - add w23,w23,w25 // e+=F(b,c,d) - ror w13,w13,#31 - orr w25,w24,w20 - and w26,w24,w20 - eor w14,w14,w16 - ror w27,w23,#27 - and w25,w25,w21 - add w21,w21,w28 // future e+=K - eor w14,w14,w6 - add w22,w22,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w24,w24,#2 - eor w14,w14,w11 - add w21,w21,w13 // future e+=X[i] - add w22,w22,w25 // e+=F(b,c,d) - ror w14,w14,#31 - orr w25,w23,w24 - and w26,w23,w24 - eor w15,w15,w17 - ror w27,w22,#27 - and w25,w25,w20 - add w20,w20,w28 // future e+=K - eor w15,w15,w7 - add w21,w21,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w23,w23,#2 - eor w15,w15,w12 - add w20,w20,w14 // future e+=X[i] - add w21,w21,w25 // e+=F(b,c,d) - ror w15,w15,#31 - movz w28,#0xc1d6 - movk w28,#0xca62,lsl#16 - orr w25,w22,w23 - and w26,w22,w23 - eor w16,w16,w19 - ror w27,w21,#27 - and w25,w25,w24 - add w24,w24,w28 // future e+=K - eor w16,w16,w8 - add w20,w20,w27 // e+=rot(a,5) - orr w25,w25,w26 - ror w22,w22,#2 - eor w16,w16,w13 - add w24,w24,w15 // future e+=X[i] - add w20,w20,w25 // e+=F(b,c,d) - ror w16,w16,#31 - eor w17,w17,w3 - eor w25,w23,w21 - ror w27,w20,#27 - add w23,w23,w28 // future e+=K - eor w17,w17,w9 - eor w25,w25,w22 - add w24,w24,w27 // e+=rot(a,5) - ror w21,w21,#2 - eor w17,w17,w14 - add w23,w23,w16 // future e+=X[i] - add w24,w24,w25 // e+=F(b,c,d) - ror w17,w17,#31 - eor w19,w19,w4 - eor w25,w22,w20 - ror w27,w24,#27 - add w22,w22,w28 // future e+=K - eor w19,w19,w10 - eor w25,w25,w21 - add w23,w23,w27 // e+=rot(a,5) - ror w20,w20,#2 - eor w19,w19,w15 - add w22,w22,w17 // future e+=X[i] - add w23,w23,w25 // e+=F(b,c,d) - ror w19,w19,#31 - eor w3,w3,w5 - eor w25,w21,w24 - ror w27,w23,#27 - add w21,w21,w28 // future e+=K - eor w3,w3,w11 - eor w25,w25,w20 - add w22,w22,w27 // e+=rot(a,5) - ror w24,w24,#2 - eor w3,w3,w16 - add w21,w21,w19 // future e+=X[i] - add w22,w22,w25 // e+=F(b,c,d) - ror w3,w3,#31 - eor w4,w4,w6 - eor w25,w20,w23 - ror w27,w22,#27 - add w20,w20,w28 // future e+=K - eor w4,w4,w12 - eor w25,w25,w24 - add w21,w21,w27 // e+=rot(a,5) - ror w23,w23,#2 - eor w4,w4,w17 - add w20,w20,w3 // future e+=X[i] - add w21,w21,w25 // e+=F(b,c,d) - ror w4,w4,#31 - eor w5,w5,w7 - eor w25,w24,w22 - ror w27,w21,#27 - add w24,w24,w28 // future e+=K - eor w5,w5,w13 - eor w25,w25,w23 - add w20,w20,w27 // e+=rot(a,5) - ror w22,w22,#2 - eor w5,w5,w19 - add w24,w24,w4 // future e+=X[i] - add w20,w20,w25 // e+=F(b,c,d) - ror w5,w5,#31 - eor w6,w6,w8 - eor w25,w23,w21 - ror w27,w20,#27 - add w23,w23,w28 // future e+=K - eor w6,w6,w14 - eor w25,w25,w22 - add w24,w24,w27 // e+=rot(a,5) - ror w21,w21,#2 - eor w6,w6,w3 - add w23,w23,w5 // future e+=X[i] - add w24,w24,w25 // e+=F(b,c,d) - ror w6,w6,#31 - eor w7,w7,w9 - eor w25,w22,w20 - ror w27,w24,#27 - add w22,w22,w28 // future e+=K - eor w7,w7,w15 - eor w25,w25,w21 - add w23,w23,w27 // e+=rot(a,5) - ror w20,w20,#2 - eor w7,w7,w4 - add w22,w22,w6 // future e+=X[i] - add w23,w23,w25 // e+=F(b,c,d) - ror w7,w7,#31 - eor w8,w8,w10 - eor w25,w21,w24 - ror w27,w23,#27 - add w21,w21,w28 // future e+=K - eor w8,w8,w16 - eor w25,w25,w20 - add w22,w22,w27 // e+=rot(a,5) - ror w24,w24,#2 - eor w8,w8,w5 - add w21,w21,w7 // future e+=X[i] - add w22,w22,w25 // e+=F(b,c,d) - ror w8,w8,#31 - eor w9,w9,w11 - eor w25,w20,w23 - ror w27,w22,#27 - add w20,w20,w28 // future e+=K - eor w9,w9,w17 - eor w25,w25,w24 - add w21,w21,w27 // e+=rot(a,5) - ror w23,w23,#2 - eor w9,w9,w6 - add w20,w20,w8 // future e+=X[i] - add w21,w21,w25 // e+=F(b,c,d) - ror w9,w9,#31 - eor w10,w10,w12 - eor w25,w24,w22 - ror w27,w21,#27 - add w24,w24,w28 // future e+=K - eor w10,w10,w19 - eor w25,w25,w23 - add w20,w20,w27 // e+=rot(a,5) - ror w22,w22,#2 - eor w10,w10,w7 - add w24,w24,w9 // future e+=X[i] - add w20,w20,w25 // e+=F(b,c,d) - ror w10,w10,#31 - eor w11,w11,w13 - eor w25,w23,w21 - ror w27,w20,#27 - add w23,w23,w28 // future e+=K - eor w11,w11,w3 - eor w25,w25,w22 - add w24,w24,w27 // e+=rot(a,5) - ror w21,w21,#2 - eor w11,w11,w8 - add w23,w23,w10 // future e+=X[i] - add w24,w24,w25 // e+=F(b,c,d) - ror w11,w11,#31 - eor w12,w12,w14 - eor w25,w22,w20 - ror w27,w24,#27 - add w22,w22,w28 // future e+=K - eor w12,w12,w4 - eor w25,w25,w21 - add w23,w23,w27 // e+=rot(a,5) - ror w20,w20,#2 - eor w12,w12,w9 - add w22,w22,w11 // future e+=X[i] - add w23,w23,w25 // e+=F(b,c,d) - ror w12,w12,#31 - eor w13,w13,w15 - eor w25,w21,w24 - ror w27,w23,#27 - add w21,w21,w28 // future e+=K - eor w13,w13,w5 - eor w25,w25,w20 - add w22,w22,w27 // e+=rot(a,5) - ror w24,w24,#2 - eor w13,w13,w10 - add w21,w21,w12 // future e+=X[i] - add w22,w22,w25 // e+=F(b,c,d) - ror w13,w13,#31 - eor w14,w14,w16 - eor w25,w20,w23 - ror w27,w22,#27 - add w20,w20,w28 // future e+=K - eor w14,w14,w6 - eor w25,w25,w24 - add w21,w21,w27 // e+=rot(a,5) - ror w23,w23,#2 - eor w14,w14,w11 - add w20,w20,w13 // future e+=X[i] - add w21,w21,w25 // e+=F(b,c,d) - ror w14,w14,#31 - eor w15,w15,w17 - eor w25,w24,w22 - ror w27,w21,#27 - add w24,w24,w28 // future e+=K - eor w15,w15,w7 - eor w25,w25,w23 - add w20,w20,w27 // e+=rot(a,5) - ror w22,w22,#2 - eor w15,w15,w12 - add w24,w24,w14 // future e+=X[i] - add w20,w20,w25 // e+=F(b,c,d) - ror w15,w15,#31 - eor w16,w16,w19 - eor w25,w23,w21 - ror w27,w20,#27 - add w23,w23,w28 // future e+=K - eor w16,w16,w8 - eor w25,w25,w22 - add w24,w24,w27 // e+=rot(a,5) - ror w21,w21,#2 - eor w16,w16,w13 - add w23,w23,w15 // future e+=X[i] - add w24,w24,w25 // e+=F(b,c,d) - ror w16,w16,#31 - eor w17,w17,w3 - eor w25,w22,w20 - ror w27,w24,#27 - add w22,w22,w28 // future e+=K - eor w17,w17,w9 - eor w25,w25,w21 - add w23,w23,w27 // e+=rot(a,5) - ror w20,w20,#2 - eor w17,w17,w14 - add w22,w22,w16 // future e+=X[i] - add w23,w23,w25 // e+=F(b,c,d) - ror w17,w17,#31 - eor w19,w19,w4 - eor w25,w21,w24 - ror w27,w23,#27 - add w21,w21,w28 // future e+=K - eor w19,w19,w10 - eor w25,w25,w20 - add w22,w22,w27 // e+=rot(a,5) - ror w24,w24,#2 - eor w19,w19,w15 - add w21,w21,w17 // future e+=X[i] - add w22,w22,w25 // e+=F(b,c,d) - ror w19,w19,#31 - ldp w4,w5,[x0] - eor w25,w20,w23 - ror w27,w22,#27 - add w20,w20,w28 // future e+=K - eor w25,w25,w24 - add w21,w21,w27 // e+=rot(a,5) - ror w23,w23,#2 - add w20,w20,w19 // future e+=X[i] - add w21,w21,w25 // e+=F(b,c,d) - ldp w6,w7,[x0,#8] - eor w25,w24,w22 - ror w27,w21,#27 - eor w25,w25,w23 - add w20,w20,w27 // e+=rot(a,5) - ror w22,w22,#2 - ldr w8,[x0,#16] - add w20,w20,w25 // e+=F(b,c,d) - add w21,w21,w5 - add w22,w22,w6 - add w20,w20,w4 - add w23,w23,w7 - add w24,w24,w8 - stp w20,w21,[x0] - stp w22,w23,[x0,#8] - str w24,[x0,#16] - cbnz x2,.Loop - - ldp x19,x20,[sp,#16] - ldp x21,x22,[sp,#32] - ldp x23,x24,[sp,#48] - ldp x25,x26,[sp,#64] - ldp x27,x28,[sp,#80] - ldr x29,[sp],#96 - ret -.size sha1_block_data_order,.-sha1_block_data_order -.type sha1_block_armv8,%function -.align 6 -sha1_block_armv8: -.Lv8_entry: - stp x29,x30,[sp,#-16]! - add x29,sp,#0 - - adr x4,.Lconst - eor v1.16b,v1.16b,v1.16b - ld1 {v0.4s},[x0],#16 - ld1 {v1.s}[0],[x0] - sub x0,x0,#16 - ld1 {v16.4s,v17.4s,v18.4s,v19.4s},[x4] - -.Loop_hw: - ld1 {v4.16b,v5.16b,v6.16b,v7.16b},[x1],#64 - sub x2,x2,#1 - rev32 v4.16b,v4.16b - rev32 v5.16b,v5.16b - - add v20.4s,v16.4s,v4.4s - rev32 v6.16b,v6.16b - orr v22.16b,v0.16b,v0.16b // offload - - add v21.4s,v16.4s,v5.4s - rev32 v7.16b,v7.16b -.inst 0x5e280803 //sha1h v3.16b,v0.16b -.inst 0x5e140020 //sha1c v0.16b,v1.16b,v20.4s // 0 - add v20.4s,v16.4s,v6.4s -.inst 0x5e0630a4 //sha1su0 v4.16b,v5.16b,v6.16b -.inst 0x5e280802 //sha1h v2.16b,v0.16b // 1 -.inst 0x5e150060 //sha1c v0.16b,v3.16b,v21.4s - add v21.4s,v16.4s,v7.4s -.inst 0x5e2818e4 //sha1su1 v4.16b,v7.16b -.inst 0x5e0730c5 //sha1su0 v5.16b,v6.16b,v7.16b -.inst 0x5e280803 //sha1h v3.16b,v0.16b // 2 -.inst 0x5e140040 //sha1c v0.16b,v2.16b,v20.4s - add v20.4s,v16.4s,v4.4s -.inst 0x5e281885 //sha1su1 v5.16b,v4.16b -.inst 0x5e0430e6 //sha1su0 v6.16b,v7.16b,v4.16b -.inst 0x5e280802 //sha1h v2.16b,v0.16b // 3 -.inst 0x5e150060 //sha1c v0.16b,v3.16b,v21.4s - add v21.4s,v17.4s,v5.4s -.inst 0x5e2818a6 //sha1su1 v6.16b,v5.16b -.inst 0x5e053087 //sha1su0 v7.16b,v4.16b,v5.16b -.inst 0x5e280803 //sha1h v3.16b,v0.16b // 4 -.inst 0x5e140040 //sha1c v0.16b,v2.16b,v20.4s - add v20.4s,v17.4s,v6.4s -.inst 0x5e2818c7 //sha1su1 v7.16b,v6.16b -.inst 0x5e0630a4 //sha1su0 v4.16b,v5.16b,v6.16b -.inst 0x5e280802 //sha1h v2.16b,v0.16b // 5 -.inst 0x5e151060 //sha1p v0.16b,v3.16b,v21.4s - add v21.4s,v17.4s,v7.4s -.inst 0x5e2818e4 //sha1su1 v4.16b,v7.16b -.inst 0x5e0730c5 //sha1su0 v5.16b,v6.16b,v7.16b -.inst 0x5e280803 //sha1h v3.16b,v0.16b // 6 -.inst 0x5e141040 //sha1p v0.16b,v2.16b,v20.4s - add v20.4s,v17.4s,v4.4s -.inst 0x5e281885 //sha1su1 v5.16b,v4.16b -.inst 0x5e0430e6 //sha1su0 v6.16b,v7.16b,v4.16b -.inst 0x5e280802 //sha1h v2.16b,v0.16b // 7 -.inst 0x5e151060 //sha1p v0.16b,v3.16b,v21.4s - add v21.4s,v17.4s,v5.4s -.inst 0x5e2818a6 //sha1su1 v6.16b,v5.16b -.inst 0x5e053087 //sha1su0 v7.16b,v4.16b,v5.16b -.inst 0x5e280803 //sha1h v3.16b,v0.16b // 8 -.inst 0x5e141040 //sha1p v0.16b,v2.16b,v20.4s - add v20.4s,v18.4s,v6.4s -.inst 0x5e2818c7 //sha1su1 v7.16b,v6.16b -.inst 0x5e0630a4 //sha1su0 v4.16b,v5.16b,v6.16b -.inst 0x5e280802 //sha1h v2.16b,v0.16b // 9 -.inst 0x5e151060 //sha1p v0.16b,v3.16b,v21.4s - add v21.4s,v18.4s,v7.4s -.inst 0x5e2818e4 //sha1su1 v4.16b,v7.16b -.inst 0x5e0730c5 //sha1su0 v5.16b,v6.16b,v7.16b -.inst 0x5e280803 //sha1h v3.16b,v0.16b // 10 -.inst 0x5e142040 //sha1m v0.16b,v2.16b,v20.4s - add v20.4s,v18.4s,v4.4s -.inst 0x5e281885 //sha1su1 v5.16b,v4.16b -.inst 0x5e0430e6 //sha1su0 v6.16b,v7.16b,v4.16b -.inst 0x5e280802 //sha1h v2.16b,v0.16b // 11 -.inst 0x5e152060 //sha1m v0.16b,v3.16b,v21.4s - add v21.4s,v18.4s,v5.4s -.inst 0x5e2818a6 //sha1su1 v6.16b,v5.16b -.inst 0x5e053087 //sha1su0 v7.16b,v4.16b,v5.16b -.inst 0x5e280803 //sha1h v3.16b,v0.16b // 12 -.inst 0x5e142040 //sha1m v0.16b,v2.16b,v20.4s - add v20.4s,v18.4s,v6.4s -.inst 0x5e2818c7 //sha1su1 v7.16b,v6.16b -.inst 0x5e0630a4 //sha1su0 v4.16b,v5.16b,v6.16b -.inst 0x5e280802 //sha1h v2.16b,v0.16b // 13 -.inst 0x5e152060 //sha1m v0.16b,v3.16b,v21.4s - add v21.4s,v19.4s,v7.4s -.inst 0x5e2818e4 //sha1su1 v4.16b,v7.16b -.inst 0x5e0730c5 //sha1su0 v5.16b,v6.16b,v7.16b -.inst 0x5e280803 //sha1h v3.16b,v0.16b // 14 -.inst 0x5e142040 //sha1m v0.16b,v2.16b,v20.4s - add v20.4s,v19.4s,v4.4s -.inst 0x5e281885 //sha1su1 v5.16b,v4.16b -.inst 0x5e0430e6 //sha1su0 v6.16b,v7.16b,v4.16b -.inst 0x5e280802 //sha1h v2.16b,v0.16b // 15 -.inst 0x5e151060 //sha1p v0.16b,v3.16b,v21.4s - add v21.4s,v19.4s,v5.4s -.inst 0x5e2818a6 //sha1su1 v6.16b,v5.16b -.inst 0x5e053087 //sha1su0 v7.16b,v4.16b,v5.16b -.inst 0x5e280803 //sha1h v3.16b,v0.16b // 16 -.inst 0x5e141040 //sha1p v0.16b,v2.16b,v20.4s - add v20.4s,v19.4s,v6.4s -.inst 0x5e2818c7 //sha1su1 v7.16b,v6.16b -.inst 0x5e280802 //sha1h v2.16b,v0.16b // 17 -.inst 0x5e151060 //sha1p v0.16b,v3.16b,v21.4s - add v21.4s,v19.4s,v7.4s - -.inst 0x5e280803 //sha1h v3.16b,v0.16b // 18 -.inst 0x5e141040 //sha1p v0.16b,v2.16b,v20.4s - -.inst 0x5e280802 //sha1h v2.16b,v0.16b // 19 -.inst 0x5e151060 //sha1p v0.16b,v3.16b,v21.4s - - add v1.4s,v1.4s,v2.4s - add v0.4s,v0.4s,v22.4s - - cbnz x2,.Loop_hw - - st1 {v0.4s},[x0],#16 - st1 {v1.s}[0],[x0] - - ldr x29,[sp],#16 - ret -.size sha1_block_armv8,.-sha1_block_armv8 -.align 6 -.Lconst: -.long 0x5a827999,0x5a827999,0x5a827999,0x5a827999 //K_00_19 -.long 0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1 //K_20_39 -.long 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc //K_40_59 -.long 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6 //K_60_79 -.LOPENSSL_armcap_P: -.quad OPENSSL_armcap_P-. -.byte 83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,65,82,77,118,56,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 2 -.align 2 -.comm OPENSSL_armcap_P,4,4 -#endif \ No newline at end of file diff --git a/third_party/boringssl/linux-aarch64/crypto/sha/sha256-armv8.S b/third_party/boringssl/linux-aarch64/crypto/sha/sha256-armv8.S deleted file mode 100644 index 4834553dc1186..0000000000000 --- a/third_party/boringssl/linux-aarch64/crypto/sha/sha256-armv8.S +++ /dev/null @@ -1,1145 +0,0 @@ -#if defined(__aarch64__) -#include "arm_arch.h" - -.text - - -.globl sha256_block_data_order -.type sha256_block_data_order,%function -.align 6 -sha256_block_data_order: - ldr x16,.LOPENSSL_armcap_P - adr x17,.LOPENSSL_armcap_P - add x16,x16,x17 - ldr w16,[x16] - tst w16,#ARMV8_SHA256 - b.ne .Lv8_entry - stp x29,x30,[sp,#-128]! - add x29,sp,#0 - - stp x19,x20,[sp,#16] - stp x21,x22,[sp,#32] - stp x23,x24,[sp,#48] - stp x25,x26,[sp,#64] - stp x27,x28,[sp,#80] - sub sp,sp,#4*4 - - ldp w20,w21,[x0] // load context - ldp w22,w23,[x0,#2*4] - ldp w24,w25,[x0,#4*4] - add x2,x1,x2,lsl#6 // end of input - ldp w26,w27,[x0,#6*4] - adr x30,.LK256 - stp x0,x2,[x29,#96] - -.Loop: - ldp w3,w4,[x1],#2*4 - ldr w19,[x30],#4 // *K++ - eor w28,w21,w22 // magic seed - str x1,[x29,#112] -#ifndef __ARMEB__ - rev w3,w3 // 0 -#endif - ror w16,w24,#6 - add w27,w27,w19 // h+=K[i] - eor w6,w24,w24,ror#14 - and w17,w25,w24 - bic w19,w26,w24 - add w27,w27,w3 // h+=X[i] - orr w17,w17,w19 // Ch(e,f,g) - eor w19,w20,w21 // a^b, b^c in next round - eor w16,w16,w6,ror#11 // Sigma1(e) - ror w6,w20,#2 - add w27,w27,w17 // h+=Ch(e,f,g) - eor w17,w20,w20,ror#9 - add w27,w27,w16 // h+=Sigma1(e) - and w28,w28,w19 // (b^c)&=(a^b) - add w23,w23,w27 // d+=h - eor w28,w28,w21 // Maj(a,b,c) - eor w17,w6,w17,ror#13 // Sigma0(a) - add w27,w27,w28 // h+=Maj(a,b,c) - ldr w28,[x30],#4 // *K++, w19 in next round - //add w27,w27,w17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev w4,w4 // 1 -#endif - ldp w5,w6,[x1],#2*4 - add w27,w27,w17 // h+=Sigma0(a) - ror w16,w23,#6 - add w26,w26,w28 // h+=K[i] - eor w7,w23,w23,ror#14 - and w17,w24,w23 - bic w28,w25,w23 - add w26,w26,w4 // h+=X[i] - orr w17,w17,w28 // Ch(e,f,g) - eor w28,w27,w20 // a^b, b^c in next round - eor w16,w16,w7,ror#11 // Sigma1(e) - ror w7,w27,#2 - add w26,w26,w17 // h+=Ch(e,f,g) - eor w17,w27,w27,ror#9 - add w26,w26,w16 // h+=Sigma1(e) - and w19,w19,w28 // (b^c)&=(a^b) - add w22,w22,w26 // d+=h - eor w19,w19,w20 // Maj(a,b,c) - eor w17,w7,w17,ror#13 // Sigma0(a) - add w26,w26,w19 // h+=Maj(a,b,c) - ldr w19,[x30],#4 // *K++, w28 in next round - //add w26,w26,w17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev w5,w5 // 2 -#endif - add w26,w26,w17 // h+=Sigma0(a) - ror w16,w22,#6 - add w25,w25,w19 // h+=K[i] - eor w8,w22,w22,ror#14 - and w17,w23,w22 - bic w19,w24,w22 - add w25,w25,w5 // h+=X[i] - orr w17,w17,w19 // Ch(e,f,g) - eor w19,w26,w27 // a^b, b^c in next round - eor w16,w16,w8,ror#11 // Sigma1(e) - ror w8,w26,#2 - add w25,w25,w17 // h+=Ch(e,f,g) - eor w17,w26,w26,ror#9 - add w25,w25,w16 // h+=Sigma1(e) - and w28,w28,w19 // (b^c)&=(a^b) - add w21,w21,w25 // d+=h - eor w28,w28,w27 // Maj(a,b,c) - eor w17,w8,w17,ror#13 // Sigma0(a) - add w25,w25,w28 // h+=Maj(a,b,c) - ldr w28,[x30],#4 // *K++, w19 in next round - //add w25,w25,w17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev w6,w6 // 3 -#endif - ldp w7,w8,[x1],#2*4 - add w25,w25,w17 // h+=Sigma0(a) - ror w16,w21,#6 - add w24,w24,w28 // h+=K[i] - eor w9,w21,w21,ror#14 - and w17,w22,w21 - bic w28,w23,w21 - add w24,w24,w6 // h+=X[i] - orr w17,w17,w28 // Ch(e,f,g) - eor w28,w25,w26 // a^b, b^c in next round - eor w16,w16,w9,ror#11 // Sigma1(e) - ror w9,w25,#2 - add w24,w24,w17 // h+=Ch(e,f,g) - eor w17,w25,w25,ror#9 - add w24,w24,w16 // h+=Sigma1(e) - and w19,w19,w28 // (b^c)&=(a^b) - add w20,w20,w24 // d+=h - eor w19,w19,w26 // Maj(a,b,c) - eor w17,w9,w17,ror#13 // Sigma0(a) - add w24,w24,w19 // h+=Maj(a,b,c) - ldr w19,[x30],#4 // *K++, w28 in next round - //add w24,w24,w17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev w7,w7 // 4 -#endif - add w24,w24,w17 // h+=Sigma0(a) - ror w16,w20,#6 - add w23,w23,w19 // h+=K[i] - eor w10,w20,w20,ror#14 - and w17,w21,w20 - bic w19,w22,w20 - add w23,w23,w7 // h+=X[i] - orr w17,w17,w19 // Ch(e,f,g) - eor w19,w24,w25 // a^b, b^c in next round - eor w16,w16,w10,ror#11 // Sigma1(e) - ror w10,w24,#2 - add w23,w23,w17 // h+=Ch(e,f,g) - eor w17,w24,w24,ror#9 - add w23,w23,w16 // h+=Sigma1(e) - and w28,w28,w19 // (b^c)&=(a^b) - add w27,w27,w23 // d+=h - eor w28,w28,w25 // Maj(a,b,c) - eor w17,w10,w17,ror#13 // Sigma0(a) - add w23,w23,w28 // h+=Maj(a,b,c) - ldr w28,[x30],#4 // *K++, w19 in next round - //add w23,w23,w17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev w8,w8 // 5 -#endif - ldp w9,w10,[x1],#2*4 - add w23,w23,w17 // h+=Sigma0(a) - ror w16,w27,#6 - add w22,w22,w28 // h+=K[i] - eor w11,w27,w27,ror#14 - and w17,w20,w27 - bic w28,w21,w27 - add w22,w22,w8 // h+=X[i] - orr w17,w17,w28 // Ch(e,f,g) - eor w28,w23,w24 // a^b, b^c in next round - eor w16,w16,w11,ror#11 // Sigma1(e) - ror w11,w23,#2 - add w22,w22,w17 // h+=Ch(e,f,g) - eor w17,w23,w23,ror#9 - add w22,w22,w16 // h+=Sigma1(e) - and w19,w19,w28 // (b^c)&=(a^b) - add w26,w26,w22 // d+=h - eor w19,w19,w24 // Maj(a,b,c) - eor w17,w11,w17,ror#13 // Sigma0(a) - add w22,w22,w19 // h+=Maj(a,b,c) - ldr w19,[x30],#4 // *K++, w28 in next round - //add w22,w22,w17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev w9,w9 // 6 -#endif - add w22,w22,w17 // h+=Sigma0(a) - ror w16,w26,#6 - add w21,w21,w19 // h+=K[i] - eor w12,w26,w26,ror#14 - and w17,w27,w26 - bic w19,w20,w26 - add w21,w21,w9 // h+=X[i] - orr w17,w17,w19 // Ch(e,f,g) - eor w19,w22,w23 // a^b, b^c in next round - eor w16,w16,w12,ror#11 // Sigma1(e) - ror w12,w22,#2 - add w21,w21,w17 // h+=Ch(e,f,g) - eor w17,w22,w22,ror#9 - add w21,w21,w16 // h+=Sigma1(e) - and w28,w28,w19 // (b^c)&=(a^b) - add w25,w25,w21 // d+=h - eor w28,w28,w23 // Maj(a,b,c) - eor w17,w12,w17,ror#13 // Sigma0(a) - add w21,w21,w28 // h+=Maj(a,b,c) - ldr w28,[x30],#4 // *K++, w19 in next round - //add w21,w21,w17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev w10,w10 // 7 -#endif - ldp w11,w12,[x1],#2*4 - add w21,w21,w17 // h+=Sigma0(a) - ror w16,w25,#6 - add w20,w20,w28 // h+=K[i] - eor w13,w25,w25,ror#14 - and w17,w26,w25 - bic w28,w27,w25 - add w20,w20,w10 // h+=X[i] - orr w17,w17,w28 // Ch(e,f,g) - eor w28,w21,w22 // a^b, b^c in next round - eor w16,w16,w13,ror#11 // Sigma1(e) - ror w13,w21,#2 - add w20,w20,w17 // h+=Ch(e,f,g) - eor w17,w21,w21,ror#9 - add w20,w20,w16 // h+=Sigma1(e) - and w19,w19,w28 // (b^c)&=(a^b) - add w24,w24,w20 // d+=h - eor w19,w19,w22 // Maj(a,b,c) - eor w17,w13,w17,ror#13 // Sigma0(a) - add w20,w20,w19 // h+=Maj(a,b,c) - ldr w19,[x30],#4 // *K++, w28 in next round - //add w20,w20,w17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev w11,w11 // 8 -#endif - add w20,w20,w17 // h+=Sigma0(a) - ror w16,w24,#6 - add w27,w27,w19 // h+=K[i] - eor w14,w24,w24,ror#14 - and w17,w25,w24 - bic w19,w26,w24 - add w27,w27,w11 // h+=X[i] - orr w17,w17,w19 // Ch(e,f,g) - eor w19,w20,w21 // a^b, b^c in next round - eor w16,w16,w14,ror#11 // Sigma1(e) - ror w14,w20,#2 - add w27,w27,w17 // h+=Ch(e,f,g) - eor w17,w20,w20,ror#9 - add w27,w27,w16 // h+=Sigma1(e) - and w28,w28,w19 // (b^c)&=(a^b) - add w23,w23,w27 // d+=h - eor w28,w28,w21 // Maj(a,b,c) - eor w17,w14,w17,ror#13 // Sigma0(a) - add w27,w27,w28 // h+=Maj(a,b,c) - ldr w28,[x30],#4 // *K++, w19 in next round - //add w27,w27,w17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev w12,w12 // 9 -#endif - ldp w13,w14,[x1],#2*4 - add w27,w27,w17 // h+=Sigma0(a) - ror w16,w23,#6 - add w26,w26,w28 // h+=K[i] - eor w15,w23,w23,ror#14 - and w17,w24,w23 - bic w28,w25,w23 - add w26,w26,w12 // h+=X[i] - orr w17,w17,w28 // Ch(e,f,g) - eor w28,w27,w20 // a^b, b^c in next round - eor w16,w16,w15,ror#11 // Sigma1(e) - ror w15,w27,#2 - add w26,w26,w17 // h+=Ch(e,f,g) - eor w17,w27,w27,ror#9 - add w26,w26,w16 // h+=Sigma1(e) - and w19,w19,w28 // (b^c)&=(a^b) - add w22,w22,w26 // d+=h - eor w19,w19,w20 // Maj(a,b,c) - eor w17,w15,w17,ror#13 // Sigma0(a) - add w26,w26,w19 // h+=Maj(a,b,c) - ldr w19,[x30],#4 // *K++, w28 in next round - //add w26,w26,w17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev w13,w13 // 10 -#endif - add w26,w26,w17 // h+=Sigma0(a) - ror w16,w22,#6 - add w25,w25,w19 // h+=K[i] - eor w0,w22,w22,ror#14 - and w17,w23,w22 - bic w19,w24,w22 - add w25,w25,w13 // h+=X[i] - orr w17,w17,w19 // Ch(e,f,g) - eor w19,w26,w27 // a^b, b^c in next round - eor w16,w16,w0,ror#11 // Sigma1(e) - ror w0,w26,#2 - add w25,w25,w17 // h+=Ch(e,f,g) - eor w17,w26,w26,ror#9 - add w25,w25,w16 // h+=Sigma1(e) - and w28,w28,w19 // (b^c)&=(a^b) - add w21,w21,w25 // d+=h - eor w28,w28,w27 // Maj(a,b,c) - eor w17,w0,w17,ror#13 // Sigma0(a) - add w25,w25,w28 // h+=Maj(a,b,c) - ldr w28,[x30],#4 // *K++, w19 in next round - //add w25,w25,w17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev w14,w14 // 11 -#endif - ldp w15,w0,[x1],#2*4 - add w25,w25,w17 // h+=Sigma0(a) - str w6,[sp,#12] - ror w16,w21,#6 - add w24,w24,w28 // h+=K[i] - eor w6,w21,w21,ror#14 - and w17,w22,w21 - bic w28,w23,w21 - add w24,w24,w14 // h+=X[i] - orr w17,w17,w28 // Ch(e,f,g) - eor w28,w25,w26 // a^b, b^c in next round - eor w16,w16,w6,ror#11 // Sigma1(e) - ror w6,w25,#2 - add w24,w24,w17 // h+=Ch(e,f,g) - eor w17,w25,w25,ror#9 - add w24,w24,w16 // h+=Sigma1(e) - and w19,w19,w28 // (b^c)&=(a^b) - add w20,w20,w24 // d+=h - eor w19,w19,w26 // Maj(a,b,c) - eor w17,w6,w17,ror#13 // Sigma0(a) - add w24,w24,w19 // h+=Maj(a,b,c) - ldr w19,[x30],#4 // *K++, w28 in next round - //add w24,w24,w17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev w15,w15 // 12 -#endif - add w24,w24,w17 // h+=Sigma0(a) - str w7,[sp,#0] - ror w16,w20,#6 - add w23,w23,w19 // h+=K[i] - eor w7,w20,w20,ror#14 - and w17,w21,w20 - bic w19,w22,w20 - add w23,w23,w15 // h+=X[i] - orr w17,w17,w19 // Ch(e,f,g) - eor w19,w24,w25 // a^b, b^c in next round - eor w16,w16,w7,ror#11 // Sigma1(e) - ror w7,w24,#2 - add w23,w23,w17 // h+=Ch(e,f,g) - eor w17,w24,w24,ror#9 - add w23,w23,w16 // h+=Sigma1(e) - and w28,w28,w19 // (b^c)&=(a^b) - add w27,w27,w23 // d+=h - eor w28,w28,w25 // Maj(a,b,c) - eor w17,w7,w17,ror#13 // Sigma0(a) - add w23,w23,w28 // h+=Maj(a,b,c) - ldr w28,[x30],#4 // *K++, w19 in next round - //add w23,w23,w17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev w0,w0 // 13 -#endif - ldp w1,w2,[x1] - add w23,w23,w17 // h+=Sigma0(a) - str w8,[sp,#4] - ror w16,w27,#6 - add w22,w22,w28 // h+=K[i] - eor w8,w27,w27,ror#14 - and w17,w20,w27 - bic w28,w21,w27 - add w22,w22,w0 // h+=X[i] - orr w17,w17,w28 // Ch(e,f,g) - eor w28,w23,w24 // a^b, b^c in next round - eor w16,w16,w8,ror#11 // Sigma1(e) - ror w8,w23,#2 - add w22,w22,w17 // h+=Ch(e,f,g) - eor w17,w23,w23,ror#9 - add w22,w22,w16 // h+=Sigma1(e) - and w19,w19,w28 // (b^c)&=(a^b) - add w26,w26,w22 // d+=h - eor w19,w19,w24 // Maj(a,b,c) - eor w17,w8,w17,ror#13 // Sigma0(a) - add w22,w22,w19 // h+=Maj(a,b,c) - ldr w19,[x30],#4 // *K++, w28 in next round - //add w22,w22,w17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev w1,w1 // 14 -#endif - ldr w6,[sp,#12] - add w22,w22,w17 // h+=Sigma0(a) - str w9,[sp,#8] - ror w16,w26,#6 - add w21,w21,w19 // h+=K[i] - eor w9,w26,w26,ror#14 - and w17,w27,w26 - bic w19,w20,w26 - add w21,w21,w1 // h+=X[i] - orr w17,w17,w19 // Ch(e,f,g) - eor w19,w22,w23 // a^b, b^c in next round - eor w16,w16,w9,ror#11 // Sigma1(e) - ror w9,w22,#2 - add w21,w21,w17 // h+=Ch(e,f,g) - eor w17,w22,w22,ror#9 - add w21,w21,w16 // h+=Sigma1(e) - and w28,w28,w19 // (b^c)&=(a^b) - add w25,w25,w21 // d+=h - eor w28,w28,w23 // Maj(a,b,c) - eor w17,w9,w17,ror#13 // Sigma0(a) - add w21,w21,w28 // h+=Maj(a,b,c) - ldr w28,[x30],#4 // *K++, w19 in next round - //add w21,w21,w17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev w2,w2 // 15 -#endif - ldr w7,[sp,#0] - add w21,w21,w17 // h+=Sigma0(a) - str w10,[sp,#12] - ror w16,w25,#6 - add w20,w20,w28 // h+=K[i] - ror w9,w4,#7 - and w17,w26,w25 - ror w8,w1,#17 - bic w28,w27,w25 - ror w10,w21,#2 - add w20,w20,w2 // h+=X[i] - eor w16,w16,w25,ror#11 - eor w9,w9,w4,ror#18 - orr w17,w17,w28 // Ch(e,f,g) - eor w28,w21,w22 // a^b, b^c in next round - eor w16,w16,w25,ror#25 // Sigma1(e) - eor w10,w10,w21,ror#13 - add w20,w20,w17 // h+=Ch(e,f,g) - and w19,w19,w28 // (b^c)&=(a^b) - eor w8,w8,w1,ror#19 - eor w9,w9,w4,lsr#3 // sigma0(X[i+1]) - add w20,w20,w16 // h+=Sigma1(e) - eor w19,w19,w22 // Maj(a,b,c) - eor w17,w10,w21,ror#22 // Sigma0(a) - eor w8,w8,w1,lsr#10 // sigma1(X[i+14]) - add w3,w3,w12 - add w24,w24,w20 // d+=h - add w20,w20,w19 // h+=Maj(a,b,c) - ldr w19,[x30],#4 // *K++, w28 in next round - add w3,w3,w9 - add w20,w20,w17 // h+=Sigma0(a) - add w3,w3,w8 -.Loop_16_xx: - ldr w8,[sp,#4] - str w11,[sp,#0] - ror w16,w24,#6 - add w27,w27,w19 // h+=K[i] - ror w10,w5,#7 - and w17,w25,w24 - ror w9,w2,#17 - bic w19,w26,w24 - ror w11,w20,#2 - add w27,w27,w3 // h+=X[i] - eor w16,w16,w24,ror#11 - eor w10,w10,w5,ror#18 - orr w17,w17,w19 // Ch(e,f,g) - eor w19,w20,w21 // a^b, b^c in next round - eor w16,w16,w24,ror#25 // Sigma1(e) - eor w11,w11,w20,ror#13 - add w27,w27,w17 // h+=Ch(e,f,g) - and w28,w28,w19 // (b^c)&=(a^b) - eor w9,w9,w2,ror#19 - eor w10,w10,w5,lsr#3 // sigma0(X[i+1]) - add w27,w27,w16 // h+=Sigma1(e) - eor w28,w28,w21 // Maj(a,b,c) - eor w17,w11,w20,ror#22 // Sigma0(a) - eor w9,w9,w2,lsr#10 // sigma1(X[i+14]) - add w4,w4,w13 - add w23,w23,w27 // d+=h - add w27,w27,w28 // h+=Maj(a,b,c) - ldr w28,[x30],#4 // *K++, w19 in next round - add w4,w4,w10 - add w27,w27,w17 // h+=Sigma0(a) - add w4,w4,w9 - ldr w9,[sp,#8] - str w12,[sp,#4] - ror w16,w23,#6 - add w26,w26,w28 // h+=K[i] - ror w11,w6,#7 - and w17,w24,w23 - ror w10,w3,#17 - bic w28,w25,w23 - ror w12,w27,#2 - add w26,w26,w4 // h+=X[i] - eor w16,w16,w23,ror#11 - eor w11,w11,w6,ror#18 - orr w17,w17,w28 // Ch(e,f,g) - eor w28,w27,w20 // a^b, b^c in next round - eor w16,w16,w23,ror#25 // Sigma1(e) - eor w12,w12,w27,ror#13 - add w26,w26,w17 // h+=Ch(e,f,g) - and w19,w19,w28 // (b^c)&=(a^b) - eor w10,w10,w3,ror#19 - eor w11,w11,w6,lsr#3 // sigma0(X[i+1]) - add w26,w26,w16 // h+=Sigma1(e) - eor w19,w19,w20 // Maj(a,b,c) - eor w17,w12,w27,ror#22 // Sigma0(a) - eor w10,w10,w3,lsr#10 // sigma1(X[i+14]) - add w5,w5,w14 - add w22,w22,w26 // d+=h - add w26,w26,w19 // h+=Maj(a,b,c) - ldr w19,[x30],#4 // *K++, w28 in next round - add w5,w5,w11 - add w26,w26,w17 // h+=Sigma0(a) - add w5,w5,w10 - ldr w10,[sp,#12] - str w13,[sp,#8] - ror w16,w22,#6 - add w25,w25,w19 // h+=K[i] - ror w12,w7,#7 - and w17,w23,w22 - ror w11,w4,#17 - bic w19,w24,w22 - ror w13,w26,#2 - add w25,w25,w5 // h+=X[i] - eor w16,w16,w22,ror#11 - eor w12,w12,w7,ror#18 - orr w17,w17,w19 // Ch(e,f,g) - eor w19,w26,w27 // a^b, b^c in next round - eor w16,w16,w22,ror#25 // Sigma1(e) - eor w13,w13,w26,ror#13 - add w25,w25,w17 // h+=Ch(e,f,g) - and w28,w28,w19 // (b^c)&=(a^b) - eor w11,w11,w4,ror#19 - eor w12,w12,w7,lsr#3 // sigma0(X[i+1]) - add w25,w25,w16 // h+=Sigma1(e) - eor w28,w28,w27 // Maj(a,b,c) - eor w17,w13,w26,ror#22 // Sigma0(a) - eor w11,w11,w4,lsr#10 // sigma1(X[i+14]) - add w6,w6,w15 - add w21,w21,w25 // d+=h - add w25,w25,w28 // h+=Maj(a,b,c) - ldr w28,[x30],#4 // *K++, w19 in next round - add w6,w6,w12 - add w25,w25,w17 // h+=Sigma0(a) - add w6,w6,w11 - ldr w11,[sp,#0] - str w14,[sp,#12] - ror w16,w21,#6 - add w24,w24,w28 // h+=K[i] - ror w13,w8,#7 - and w17,w22,w21 - ror w12,w5,#17 - bic w28,w23,w21 - ror w14,w25,#2 - add w24,w24,w6 // h+=X[i] - eor w16,w16,w21,ror#11 - eor w13,w13,w8,ror#18 - orr w17,w17,w28 // Ch(e,f,g) - eor w28,w25,w26 // a^b, b^c in next round - eor w16,w16,w21,ror#25 // Sigma1(e) - eor w14,w14,w25,ror#13 - add w24,w24,w17 // h+=Ch(e,f,g) - and w19,w19,w28 // (b^c)&=(a^b) - eor w12,w12,w5,ror#19 - eor w13,w13,w8,lsr#3 // sigma0(X[i+1]) - add w24,w24,w16 // h+=Sigma1(e) - eor w19,w19,w26 // Maj(a,b,c) - eor w17,w14,w25,ror#22 // Sigma0(a) - eor w12,w12,w5,lsr#10 // sigma1(X[i+14]) - add w7,w7,w0 - add w20,w20,w24 // d+=h - add w24,w24,w19 // h+=Maj(a,b,c) - ldr w19,[x30],#4 // *K++, w28 in next round - add w7,w7,w13 - add w24,w24,w17 // h+=Sigma0(a) - add w7,w7,w12 - ldr w12,[sp,#4] - str w15,[sp,#0] - ror w16,w20,#6 - add w23,w23,w19 // h+=K[i] - ror w14,w9,#7 - and w17,w21,w20 - ror w13,w6,#17 - bic w19,w22,w20 - ror w15,w24,#2 - add w23,w23,w7 // h+=X[i] - eor w16,w16,w20,ror#11 - eor w14,w14,w9,ror#18 - orr w17,w17,w19 // Ch(e,f,g) - eor w19,w24,w25 // a^b, b^c in next round - eor w16,w16,w20,ror#25 // Sigma1(e) - eor w15,w15,w24,ror#13 - add w23,w23,w17 // h+=Ch(e,f,g) - and w28,w28,w19 // (b^c)&=(a^b) - eor w13,w13,w6,ror#19 - eor w14,w14,w9,lsr#3 // sigma0(X[i+1]) - add w23,w23,w16 // h+=Sigma1(e) - eor w28,w28,w25 // Maj(a,b,c) - eor w17,w15,w24,ror#22 // Sigma0(a) - eor w13,w13,w6,lsr#10 // sigma1(X[i+14]) - add w8,w8,w1 - add w27,w27,w23 // d+=h - add w23,w23,w28 // h+=Maj(a,b,c) - ldr w28,[x30],#4 // *K++, w19 in next round - add w8,w8,w14 - add w23,w23,w17 // h+=Sigma0(a) - add w8,w8,w13 - ldr w13,[sp,#8] - str w0,[sp,#4] - ror w16,w27,#6 - add w22,w22,w28 // h+=K[i] - ror w15,w10,#7 - and w17,w20,w27 - ror w14,w7,#17 - bic w28,w21,w27 - ror w0,w23,#2 - add w22,w22,w8 // h+=X[i] - eor w16,w16,w27,ror#11 - eor w15,w15,w10,ror#18 - orr w17,w17,w28 // Ch(e,f,g) - eor w28,w23,w24 // a^b, b^c in next round - eor w16,w16,w27,ror#25 // Sigma1(e) - eor w0,w0,w23,ror#13 - add w22,w22,w17 // h+=Ch(e,f,g) - and w19,w19,w28 // (b^c)&=(a^b) - eor w14,w14,w7,ror#19 - eor w15,w15,w10,lsr#3 // sigma0(X[i+1]) - add w22,w22,w16 // h+=Sigma1(e) - eor w19,w19,w24 // Maj(a,b,c) - eor w17,w0,w23,ror#22 // Sigma0(a) - eor w14,w14,w7,lsr#10 // sigma1(X[i+14]) - add w9,w9,w2 - add w26,w26,w22 // d+=h - add w22,w22,w19 // h+=Maj(a,b,c) - ldr w19,[x30],#4 // *K++, w28 in next round - add w9,w9,w15 - add w22,w22,w17 // h+=Sigma0(a) - add w9,w9,w14 - ldr w14,[sp,#12] - str w1,[sp,#8] - ror w16,w26,#6 - add w21,w21,w19 // h+=K[i] - ror w0,w11,#7 - and w17,w27,w26 - ror w15,w8,#17 - bic w19,w20,w26 - ror w1,w22,#2 - add w21,w21,w9 // h+=X[i] - eor w16,w16,w26,ror#11 - eor w0,w0,w11,ror#18 - orr w17,w17,w19 // Ch(e,f,g) - eor w19,w22,w23 // a^b, b^c in next round - eor w16,w16,w26,ror#25 // Sigma1(e) - eor w1,w1,w22,ror#13 - add w21,w21,w17 // h+=Ch(e,f,g) - and w28,w28,w19 // (b^c)&=(a^b) - eor w15,w15,w8,ror#19 - eor w0,w0,w11,lsr#3 // sigma0(X[i+1]) - add w21,w21,w16 // h+=Sigma1(e) - eor w28,w28,w23 // Maj(a,b,c) - eor w17,w1,w22,ror#22 // Sigma0(a) - eor w15,w15,w8,lsr#10 // sigma1(X[i+14]) - add w10,w10,w3 - add w25,w25,w21 // d+=h - add w21,w21,w28 // h+=Maj(a,b,c) - ldr w28,[x30],#4 // *K++, w19 in next round - add w10,w10,w0 - add w21,w21,w17 // h+=Sigma0(a) - add w10,w10,w15 - ldr w15,[sp,#0] - str w2,[sp,#12] - ror w16,w25,#6 - add w20,w20,w28 // h+=K[i] - ror w1,w12,#7 - and w17,w26,w25 - ror w0,w9,#17 - bic w28,w27,w25 - ror w2,w21,#2 - add w20,w20,w10 // h+=X[i] - eor w16,w16,w25,ror#11 - eor w1,w1,w12,ror#18 - orr w17,w17,w28 // Ch(e,f,g) - eor w28,w21,w22 // a^b, b^c in next round - eor w16,w16,w25,ror#25 // Sigma1(e) - eor w2,w2,w21,ror#13 - add w20,w20,w17 // h+=Ch(e,f,g) - and w19,w19,w28 // (b^c)&=(a^b) - eor w0,w0,w9,ror#19 - eor w1,w1,w12,lsr#3 // sigma0(X[i+1]) - add w20,w20,w16 // h+=Sigma1(e) - eor w19,w19,w22 // Maj(a,b,c) - eor w17,w2,w21,ror#22 // Sigma0(a) - eor w0,w0,w9,lsr#10 // sigma1(X[i+14]) - add w11,w11,w4 - add w24,w24,w20 // d+=h - add w20,w20,w19 // h+=Maj(a,b,c) - ldr w19,[x30],#4 // *K++, w28 in next round - add w11,w11,w1 - add w20,w20,w17 // h+=Sigma0(a) - add w11,w11,w0 - ldr w0,[sp,#4] - str w3,[sp,#0] - ror w16,w24,#6 - add w27,w27,w19 // h+=K[i] - ror w2,w13,#7 - and w17,w25,w24 - ror w1,w10,#17 - bic w19,w26,w24 - ror w3,w20,#2 - add w27,w27,w11 // h+=X[i] - eor w16,w16,w24,ror#11 - eor w2,w2,w13,ror#18 - orr w17,w17,w19 // Ch(e,f,g) - eor w19,w20,w21 // a^b, b^c in next round - eor w16,w16,w24,ror#25 // Sigma1(e) - eor w3,w3,w20,ror#13 - add w27,w27,w17 // h+=Ch(e,f,g) - and w28,w28,w19 // (b^c)&=(a^b) - eor w1,w1,w10,ror#19 - eor w2,w2,w13,lsr#3 // sigma0(X[i+1]) - add w27,w27,w16 // h+=Sigma1(e) - eor w28,w28,w21 // Maj(a,b,c) - eor w17,w3,w20,ror#22 // Sigma0(a) - eor w1,w1,w10,lsr#10 // sigma1(X[i+14]) - add w12,w12,w5 - add w23,w23,w27 // d+=h - add w27,w27,w28 // h+=Maj(a,b,c) - ldr w28,[x30],#4 // *K++, w19 in next round - add w12,w12,w2 - add w27,w27,w17 // h+=Sigma0(a) - add w12,w12,w1 - ldr w1,[sp,#8] - str w4,[sp,#4] - ror w16,w23,#6 - add w26,w26,w28 // h+=K[i] - ror w3,w14,#7 - and w17,w24,w23 - ror w2,w11,#17 - bic w28,w25,w23 - ror w4,w27,#2 - add w26,w26,w12 // h+=X[i] - eor w16,w16,w23,ror#11 - eor w3,w3,w14,ror#18 - orr w17,w17,w28 // Ch(e,f,g) - eor w28,w27,w20 // a^b, b^c in next round - eor w16,w16,w23,ror#25 // Sigma1(e) - eor w4,w4,w27,ror#13 - add w26,w26,w17 // h+=Ch(e,f,g) - and w19,w19,w28 // (b^c)&=(a^b) - eor w2,w2,w11,ror#19 - eor w3,w3,w14,lsr#3 // sigma0(X[i+1]) - add w26,w26,w16 // h+=Sigma1(e) - eor w19,w19,w20 // Maj(a,b,c) - eor w17,w4,w27,ror#22 // Sigma0(a) - eor w2,w2,w11,lsr#10 // sigma1(X[i+14]) - add w13,w13,w6 - add w22,w22,w26 // d+=h - add w26,w26,w19 // h+=Maj(a,b,c) - ldr w19,[x30],#4 // *K++, w28 in next round - add w13,w13,w3 - add w26,w26,w17 // h+=Sigma0(a) - add w13,w13,w2 - ldr w2,[sp,#12] - str w5,[sp,#8] - ror w16,w22,#6 - add w25,w25,w19 // h+=K[i] - ror w4,w15,#7 - and w17,w23,w22 - ror w3,w12,#17 - bic w19,w24,w22 - ror w5,w26,#2 - add w25,w25,w13 // h+=X[i] - eor w16,w16,w22,ror#11 - eor w4,w4,w15,ror#18 - orr w17,w17,w19 // Ch(e,f,g) - eor w19,w26,w27 // a^b, b^c in next round - eor w16,w16,w22,ror#25 // Sigma1(e) - eor w5,w5,w26,ror#13 - add w25,w25,w17 // h+=Ch(e,f,g) - and w28,w28,w19 // (b^c)&=(a^b) - eor w3,w3,w12,ror#19 - eor w4,w4,w15,lsr#3 // sigma0(X[i+1]) - add w25,w25,w16 // h+=Sigma1(e) - eor w28,w28,w27 // Maj(a,b,c) - eor w17,w5,w26,ror#22 // Sigma0(a) - eor w3,w3,w12,lsr#10 // sigma1(X[i+14]) - add w14,w14,w7 - add w21,w21,w25 // d+=h - add w25,w25,w28 // h+=Maj(a,b,c) - ldr w28,[x30],#4 // *K++, w19 in next round - add w14,w14,w4 - add w25,w25,w17 // h+=Sigma0(a) - add w14,w14,w3 - ldr w3,[sp,#0] - str w6,[sp,#12] - ror w16,w21,#6 - add w24,w24,w28 // h+=K[i] - ror w5,w0,#7 - and w17,w22,w21 - ror w4,w13,#17 - bic w28,w23,w21 - ror w6,w25,#2 - add w24,w24,w14 // h+=X[i] - eor w16,w16,w21,ror#11 - eor w5,w5,w0,ror#18 - orr w17,w17,w28 // Ch(e,f,g) - eor w28,w25,w26 // a^b, b^c in next round - eor w16,w16,w21,ror#25 // Sigma1(e) - eor w6,w6,w25,ror#13 - add w24,w24,w17 // h+=Ch(e,f,g) - and w19,w19,w28 // (b^c)&=(a^b) - eor w4,w4,w13,ror#19 - eor w5,w5,w0,lsr#3 // sigma0(X[i+1]) - add w24,w24,w16 // h+=Sigma1(e) - eor w19,w19,w26 // Maj(a,b,c) - eor w17,w6,w25,ror#22 // Sigma0(a) - eor w4,w4,w13,lsr#10 // sigma1(X[i+14]) - add w15,w15,w8 - add w20,w20,w24 // d+=h - add w24,w24,w19 // h+=Maj(a,b,c) - ldr w19,[x30],#4 // *K++, w28 in next round - add w15,w15,w5 - add w24,w24,w17 // h+=Sigma0(a) - add w15,w15,w4 - ldr w4,[sp,#4] - str w7,[sp,#0] - ror w16,w20,#6 - add w23,w23,w19 // h+=K[i] - ror w6,w1,#7 - and w17,w21,w20 - ror w5,w14,#17 - bic w19,w22,w20 - ror w7,w24,#2 - add w23,w23,w15 // h+=X[i] - eor w16,w16,w20,ror#11 - eor w6,w6,w1,ror#18 - orr w17,w17,w19 // Ch(e,f,g) - eor w19,w24,w25 // a^b, b^c in next round - eor w16,w16,w20,ror#25 // Sigma1(e) - eor w7,w7,w24,ror#13 - add w23,w23,w17 // h+=Ch(e,f,g) - and w28,w28,w19 // (b^c)&=(a^b) - eor w5,w5,w14,ror#19 - eor w6,w6,w1,lsr#3 // sigma0(X[i+1]) - add w23,w23,w16 // h+=Sigma1(e) - eor w28,w28,w25 // Maj(a,b,c) - eor w17,w7,w24,ror#22 // Sigma0(a) - eor w5,w5,w14,lsr#10 // sigma1(X[i+14]) - add w0,w0,w9 - add w27,w27,w23 // d+=h - add w23,w23,w28 // h+=Maj(a,b,c) - ldr w28,[x30],#4 // *K++, w19 in next round - add w0,w0,w6 - add w23,w23,w17 // h+=Sigma0(a) - add w0,w0,w5 - ldr w5,[sp,#8] - str w8,[sp,#4] - ror w16,w27,#6 - add w22,w22,w28 // h+=K[i] - ror w7,w2,#7 - and w17,w20,w27 - ror w6,w15,#17 - bic w28,w21,w27 - ror w8,w23,#2 - add w22,w22,w0 // h+=X[i] - eor w16,w16,w27,ror#11 - eor w7,w7,w2,ror#18 - orr w17,w17,w28 // Ch(e,f,g) - eor w28,w23,w24 // a^b, b^c in next round - eor w16,w16,w27,ror#25 // Sigma1(e) - eor w8,w8,w23,ror#13 - add w22,w22,w17 // h+=Ch(e,f,g) - and w19,w19,w28 // (b^c)&=(a^b) - eor w6,w6,w15,ror#19 - eor w7,w7,w2,lsr#3 // sigma0(X[i+1]) - add w22,w22,w16 // h+=Sigma1(e) - eor w19,w19,w24 // Maj(a,b,c) - eor w17,w8,w23,ror#22 // Sigma0(a) - eor w6,w6,w15,lsr#10 // sigma1(X[i+14]) - add w1,w1,w10 - add w26,w26,w22 // d+=h - add w22,w22,w19 // h+=Maj(a,b,c) - ldr w19,[x30],#4 // *K++, w28 in next round - add w1,w1,w7 - add w22,w22,w17 // h+=Sigma0(a) - add w1,w1,w6 - ldr w6,[sp,#12] - str w9,[sp,#8] - ror w16,w26,#6 - add w21,w21,w19 // h+=K[i] - ror w8,w3,#7 - and w17,w27,w26 - ror w7,w0,#17 - bic w19,w20,w26 - ror w9,w22,#2 - add w21,w21,w1 // h+=X[i] - eor w16,w16,w26,ror#11 - eor w8,w8,w3,ror#18 - orr w17,w17,w19 // Ch(e,f,g) - eor w19,w22,w23 // a^b, b^c in next round - eor w16,w16,w26,ror#25 // Sigma1(e) - eor w9,w9,w22,ror#13 - add w21,w21,w17 // h+=Ch(e,f,g) - and w28,w28,w19 // (b^c)&=(a^b) - eor w7,w7,w0,ror#19 - eor w8,w8,w3,lsr#3 // sigma0(X[i+1]) - add w21,w21,w16 // h+=Sigma1(e) - eor w28,w28,w23 // Maj(a,b,c) - eor w17,w9,w22,ror#22 // Sigma0(a) - eor w7,w7,w0,lsr#10 // sigma1(X[i+14]) - add w2,w2,w11 - add w25,w25,w21 // d+=h - add w21,w21,w28 // h+=Maj(a,b,c) - ldr w28,[x30],#4 // *K++, w19 in next round - add w2,w2,w8 - add w21,w21,w17 // h+=Sigma0(a) - add w2,w2,w7 - ldr w7,[sp,#0] - str w10,[sp,#12] - ror w16,w25,#6 - add w20,w20,w28 // h+=K[i] - ror w9,w4,#7 - and w17,w26,w25 - ror w8,w1,#17 - bic w28,w27,w25 - ror w10,w21,#2 - add w20,w20,w2 // h+=X[i] - eor w16,w16,w25,ror#11 - eor w9,w9,w4,ror#18 - orr w17,w17,w28 // Ch(e,f,g) - eor w28,w21,w22 // a^b, b^c in next round - eor w16,w16,w25,ror#25 // Sigma1(e) - eor w10,w10,w21,ror#13 - add w20,w20,w17 // h+=Ch(e,f,g) - and w19,w19,w28 // (b^c)&=(a^b) - eor w8,w8,w1,ror#19 - eor w9,w9,w4,lsr#3 // sigma0(X[i+1]) - add w20,w20,w16 // h+=Sigma1(e) - eor w19,w19,w22 // Maj(a,b,c) - eor w17,w10,w21,ror#22 // Sigma0(a) - eor w8,w8,w1,lsr#10 // sigma1(X[i+14]) - add w3,w3,w12 - add w24,w24,w20 // d+=h - add w20,w20,w19 // h+=Maj(a,b,c) - ldr w19,[x30],#4 // *K++, w28 in next round - add w3,w3,w9 - add w20,w20,w17 // h+=Sigma0(a) - add w3,w3,w8 - cbnz w19,.Loop_16_xx - - ldp x0,x2,[x29,#96] - ldr x1,[x29,#112] - sub x30,x30,#260 // rewind - - ldp w3,w4,[x0] - ldp w5,w6,[x0,#2*4] - add x1,x1,#14*4 // advance input pointer - ldp w7,w8,[x0,#4*4] - add w20,w20,w3 - ldp w9,w10,[x0,#6*4] - add w21,w21,w4 - add w22,w22,w5 - add w23,w23,w6 - stp w20,w21,[x0] - add w24,w24,w7 - add w25,w25,w8 - stp w22,w23,[x0,#2*4] - add w26,w26,w9 - add w27,w27,w10 - cmp x1,x2 - stp w24,w25,[x0,#4*4] - stp w26,w27,[x0,#6*4] - b.ne .Loop - - ldp x19,x20,[x29,#16] - add sp,sp,#4*4 - ldp x21,x22,[x29,#32] - ldp x23,x24,[x29,#48] - ldp x25,x26,[x29,#64] - ldp x27,x28,[x29,#80] - ldp x29,x30,[sp],#128 - ret -.size sha256_block_data_order,.-sha256_block_data_order - -.align 6 -.type .LK256,%object -.LK256: -.long 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5 -.long 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5 -.long 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3 -.long 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174 -.long 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc -.long 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da -.long 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7 -.long 0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967 -.long 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13 -.long 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85 -.long 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3 -.long 0xd192e819,0xd6990624,0xf40e3585,0x106aa070 -.long 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5 -.long 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3 -.long 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208 -.long 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2 -.long 0 //terminator -.size .LK256,.-.LK256 -.align 3 -.LOPENSSL_armcap_P: -.quad OPENSSL_armcap_P-. -.byte 83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,65,82,77,118,56,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 2 -.align 2 -.type sha256_block_armv8,%function -.align 6 -sha256_block_armv8: -.Lv8_entry: - stp x29,x30,[sp,#-16]! - add x29,sp,#0 - - ld1 {v0.4s,v1.4s},[x0] - adr x3,.LK256 - -.Loop_hw: - ld1 {v4.16b,v5.16b,v6.16b,v7.16b},[x1],#64 - sub x2,x2,#1 - ld1 {v16.4s},[x3],#16 - rev32 v4.16b,v4.16b - rev32 v5.16b,v5.16b - rev32 v6.16b,v6.16b - rev32 v7.16b,v7.16b - orr v18.16b,v0.16b,v0.16b // offload - orr v19.16b,v1.16b,v1.16b - ld1 {v17.4s},[x3],#16 - add v16.4s,v16.4s,v4.4s -.inst 0x5e2828a4 //sha256su0 v4.16b,v5.16b - orr v2.16b,v0.16b,v0.16b -.inst 0x5e104020 //sha256h v0.16b,v1.16b,v16.4s -.inst 0x5e105041 //sha256h2 v1.16b,v2.16b,v16.4s -.inst 0x5e0760c4 //sha256su1 v4.16b,v6.16b,v7.16b - ld1 {v16.4s},[x3],#16 - add v17.4s,v17.4s,v5.4s -.inst 0x5e2828c5 //sha256su0 v5.16b,v6.16b - orr v2.16b,v0.16b,v0.16b -.inst 0x5e114020 //sha256h v0.16b,v1.16b,v17.4s -.inst 0x5e115041 //sha256h2 v1.16b,v2.16b,v17.4s -.inst 0x5e0460e5 //sha256su1 v5.16b,v7.16b,v4.16b - ld1 {v17.4s},[x3],#16 - add v16.4s,v16.4s,v6.4s -.inst 0x5e2828e6 //sha256su0 v6.16b,v7.16b - orr v2.16b,v0.16b,v0.16b -.inst 0x5e104020 //sha256h v0.16b,v1.16b,v16.4s -.inst 0x5e105041 //sha256h2 v1.16b,v2.16b,v16.4s -.inst 0x5e056086 //sha256su1 v6.16b,v4.16b,v5.16b - ld1 {v16.4s},[x3],#16 - add v17.4s,v17.4s,v7.4s -.inst 0x5e282887 //sha256su0 v7.16b,v4.16b - orr v2.16b,v0.16b,v0.16b -.inst 0x5e114020 //sha256h v0.16b,v1.16b,v17.4s -.inst 0x5e115041 //sha256h2 v1.16b,v2.16b,v17.4s -.inst 0x5e0660a7 //sha256su1 v7.16b,v5.16b,v6.16b - ld1 {v17.4s},[x3],#16 - add v16.4s,v16.4s,v4.4s -.inst 0x5e2828a4 //sha256su0 v4.16b,v5.16b - orr v2.16b,v0.16b,v0.16b -.inst 0x5e104020 //sha256h v0.16b,v1.16b,v16.4s -.inst 0x5e105041 //sha256h2 v1.16b,v2.16b,v16.4s -.inst 0x5e0760c4 //sha256su1 v4.16b,v6.16b,v7.16b - ld1 {v16.4s},[x3],#16 - add v17.4s,v17.4s,v5.4s -.inst 0x5e2828c5 //sha256su0 v5.16b,v6.16b - orr v2.16b,v0.16b,v0.16b -.inst 0x5e114020 //sha256h v0.16b,v1.16b,v17.4s -.inst 0x5e115041 //sha256h2 v1.16b,v2.16b,v17.4s -.inst 0x5e0460e5 //sha256su1 v5.16b,v7.16b,v4.16b - ld1 {v17.4s},[x3],#16 - add v16.4s,v16.4s,v6.4s -.inst 0x5e2828e6 //sha256su0 v6.16b,v7.16b - orr v2.16b,v0.16b,v0.16b -.inst 0x5e104020 //sha256h v0.16b,v1.16b,v16.4s -.inst 0x5e105041 //sha256h2 v1.16b,v2.16b,v16.4s -.inst 0x5e056086 //sha256su1 v6.16b,v4.16b,v5.16b - ld1 {v16.4s},[x3],#16 - add v17.4s,v17.4s,v7.4s -.inst 0x5e282887 //sha256su0 v7.16b,v4.16b - orr v2.16b,v0.16b,v0.16b -.inst 0x5e114020 //sha256h v0.16b,v1.16b,v17.4s -.inst 0x5e115041 //sha256h2 v1.16b,v2.16b,v17.4s -.inst 0x5e0660a7 //sha256su1 v7.16b,v5.16b,v6.16b - ld1 {v17.4s},[x3],#16 - add v16.4s,v16.4s,v4.4s -.inst 0x5e2828a4 //sha256su0 v4.16b,v5.16b - orr v2.16b,v0.16b,v0.16b -.inst 0x5e104020 //sha256h v0.16b,v1.16b,v16.4s -.inst 0x5e105041 //sha256h2 v1.16b,v2.16b,v16.4s -.inst 0x5e0760c4 //sha256su1 v4.16b,v6.16b,v7.16b - ld1 {v16.4s},[x3],#16 - add v17.4s,v17.4s,v5.4s -.inst 0x5e2828c5 //sha256su0 v5.16b,v6.16b - orr v2.16b,v0.16b,v0.16b -.inst 0x5e114020 //sha256h v0.16b,v1.16b,v17.4s -.inst 0x5e115041 //sha256h2 v1.16b,v2.16b,v17.4s -.inst 0x5e0460e5 //sha256su1 v5.16b,v7.16b,v4.16b - ld1 {v17.4s},[x3],#16 - add v16.4s,v16.4s,v6.4s -.inst 0x5e2828e6 //sha256su0 v6.16b,v7.16b - orr v2.16b,v0.16b,v0.16b -.inst 0x5e104020 //sha256h v0.16b,v1.16b,v16.4s -.inst 0x5e105041 //sha256h2 v1.16b,v2.16b,v16.4s -.inst 0x5e056086 //sha256su1 v6.16b,v4.16b,v5.16b - ld1 {v16.4s},[x3],#16 - add v17.4s,v17.4s,v7.4s -.inst 0x5e282887 //sha256su0 v7.16b,v4.16b - orr v2.16b,v0.16b,v0.16b -.inst 0x5e114020 //sha256h v0.16b,v1.16b,v17.4s -.inst 0x5e115041 //sha256h2 v1.16b,v2.16b,v17.4s -.inst 0x5e0660a7 //sha256su1 v7.16b,v5.16b,v6.16b - ld1 {v17.4s},[x3],#16 - add v16.4s,v16.4s,v4.4s - orr v2.16b,v0.16b,v0.16b -.inst 0x5e104020 //sha256h v0.16b,v1.16b,v16.4s -.inst 0x5e105041 //sha256h2 v1.16b,v2.16b,v16.4s - - ld1 {v16.4s},[x3],#16 - add v17.4s,v17.4s,v5.4s - orr v2.16b,v0.16b,v0.16b -.inst 0x5e114020 //sha256h v0.16b,v1.16b,v17.4s -.inst 0x5e115041 //sha256h2 v1.16b,v2.16b,v17.4s - - ld1 {v17.4s},[x3] - add v16.4s,v16.4s,v6.4s - sub x3,x3,#64*4-16 // rewind - orr v2.16b,v0.16b,v0.16b -.inst 0x5e104020 //sha256h v0.16b,v1.16b,v16.4s -.inst 0x5e105041 //sha256h2 v1.16b,v2.16b,v16.4s - - add v17.4s,v17.4s,v7.4s - orr v2.16b,v0.16b,v0.16b -.inst 0x5e114020 //sha256h v0.16b,v1.16b,v17.4s -.inst 0x5e115041 //sha256h2 v1.16b,v2.16b,v17.4s - - add v0.4s,v0.4s,v18.4s - add v1.4s,v1.4s,v19.4s - - cbnz x2,.Loop_hw - - st1 {v0.4s,v1.4s},[x0] - - ldr x29,[sp],#16 - ret -.size sha256_block_armv8,.-sha256_block_armv8 -.comm OPENSSL_armcap_P,4,4 -#endif \ No newline at end of file diff --git a/third_party/boringssl/linux-aarch64/crypto/sha/sha512-armv8.S b/third_party/boringssl/linux-aarch64/crypto/sha/sha512-armv8.S deleted file mode 100644 index 654c473f2763a..0000000000000 --- a/third_party/boringssl/linux-aarch64/crypto/sha/sha512-armv8.S +++ /dev/null @@ -1,1025 +0,0 @@ -#if defined(__aarch64__) -#include "arm_arch.h" - -.text - - -.globl sha512_block_data_order -.type sha512_block_data_order,%function -.align 6 -sha512_block_data_order: - stp x29,x30,[sp,#-128]! - add x29,sp,#0 - - stp x19,x20,[sp,#16] - stp x21,x22,[sp,#32] - stp x23,x24,[sp,#48] - stp x25,x26,[sp,#64] - stp x27,x28,[sp,#80] - sub sp,sp,#4*8 - - ldp x20,x21,[x0] // load context - ldp x22,x23,[x0,#2*8] - ldp x24,x25,[x0,#4*8] - add x2,x1,x2,lsl#7 // end of input - ldp x26,x27,[x0,#6*8] - adr x30,.LK512 - stp x0,x2,[x29,#96] - -.Loop: - ldp x3,x4,[x1],#2*8 - ldr x19,[x30],#8 // *K++ - eor x28,x21,x22 // magic seed - str x1,[x29,#112] -#ifndef __ARMEB__ - rev x3,x3 // 0 -#endif - ror x16,x24,#14 - add x27,x27,x19 // h+=K[i] - eor x6,x24,x24,ror#23 - and x17,x25,x24 - bic x19,x26,x24 - add x27,x27,x3 // h+=X[i] - orr x17,x17,x19 // Ch(e,f,g) - eor x19,x20,x21 // a^b, b^c in next round - eor x16,x16,x6,ror#18 // Sigma1(e) - ror x6,x20,#28 - add x27,x27,x17 // h+=Ch(e,f,g) - eor x17,x20,x20,ror#5 - add x27,x27,x16 // h+=Sigma1(e) - and x28,x28,x19 // (b^c)&=(a^b) - add x23,x23,x27 // d+=h - eor x28,x28,x21 // Maj(a,b,c) - eor x17,x6,x17,ror#34 // Sigma0(a) - add x27,x27,x28 // h+=Maj(a,b,c) - ldr x28,[x30],#8 // *K++, x19 in next round - //add x27,x27,x17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev x4,x4 // 1 -#endif - ldp x5,x6,[x1],#2*8 - add x27,x27,x17 // h+=Sigma0(a) - ror x16,x23,#14 - add x26,x26,x28 // h+=K[i] - eor x7,x23,x23,ror#23 - and x17,x24,x23 - bic x28,x25,x23 - add x26,x26,x4 // h+=X[i] - orr x17,x17,x28 // Ch(e,f,g) - eor x28,x27,x20 // a^b, b^c in next round - eor x16,x16,x7,ror#18 // Sigma1(e) - ror x7,x27,#28 - add x26,x26,x17 // h+=Ch(e,f,g) - eor x17,x27,x27,ror#5 - add x26,x26,x16 // h+=Sigma1(e) - and x19,x19,x28 // (b^c)&=(a^b) - add x22,x22,x26 // d+=h - eor x19,x19,x20 // Maj(a,b,c) - eor x17,x7,x17,ror#34 // Sigma0(a) - add x26,x26,x19 // h+=Maj(a,b,c) - ldr x19,[x30],#8 // *K++, x28 in next round - //add x26,x26,x17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev x5,x5 // 2 -#endif - add x26,x26,x17 // h+=Sigma0(a) - ror x16,x22,#14 - add x25,x25,x19 // h+=K[i] - eor x8,x22,x22,ror#23 - and x17,x23,x22 - bic x19,x24,x22 - add x25,x25,x5 // h+=X[i] - orr x17,x17,x19 // Ch(e,f,g) - eor x19,x26,x27 // a^b, b^c in next round - eor x16,x16,x8,ror#18 // Sigma1(e) - ror x8,x26,#28 - add x25,x25,x17 // h+=Ch(e,f,g) - eor x17,x26,x26,ror#5 - add x25,x25,x16 // h+=Sigma1(e) - and x28,x28,x19 // (b^c)&=(a^b) - add x21,x21,x25 // d+=h - eor x28,x28,x27 // Maj(a,b,c) - eor x17,x8,x17,ror#34 // Sigma0(a) - add x25,x25,x28 // h+=Maj(a,b,c) - ldr x28,[x30],#8 // *K++, x19 in next round - //add x25,x25,x17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev x6,x6 // 3 -#endif - ldp x7,x8,[x1],#2*8 - add x25,x25,x17 // h+=Sigma0(a) - ror x16,x21,#14 - add x24,x24,x28 // h+=K[i] - eor x9,x21,x21,ror#23 - and x17,x22,x21 - bic x28,x23,x21 - add x24,x24,x6 // h+=X[i] - orr x17,x17,x28 // Ch(e,f,g) - eor x28,x25,x26 // a^b, b^c in next round - eor x16,x16,x9,ror#18 // Sigma1(e) - ror x9,x25,#28 - add x24,x24,x17 // h+=Ch(e,f,g) - eor x17,x25,x25,ror#5 - add x24,x24,x16 // h+=Sigma1(e) - and x19,x19,x28 // (b^c)&=(a^b) - add x20,x20,x24 // d+=h - eor x19,x19,x26 // Maj(a,b,c) - eor x17,x9,x17,ror#34 // Sigma0(a) - add x24,x24,x19 // h+=Maj(a,b,c) - ldr x19,[x30],#8 // *K++, x28 in next round - //add x24,x24,x17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev x7,x7 // 4 -#endif - add x24,x24,x17 // h+=Sigma0(a) - ror x16,x20,#14 - add x23,x23,x19 // h+=K[i] - eor x10,x20,x20,ror#23 - and x17,x21,x20 - bic x19,x22,x20 - add x23,x23,x7 // h+=X[i] - orr x17,x17,x19 // Ch(e,f,g) - eor x19,x24,x25 // a^b, b^c in next round - eor x16,x16,x10,ror#18 // Sigma1(e) - ror x10,x24,#28 - add x23,x23,x17 // h+=Ch(e,f,g) - eor x17,x24,x24,ror#5 - add x23,x23,x16 // h+=Sigma1(e) - and x28,x28,x19 // (b^c)&=(a^b) - add x27,x27,x23 // d+=h - eor x28,x28,x25 // Maj(a,b,c) - eor x17,x10,x17,ror#34 // Sigma0(a) - add x23,x23,x28 // h+=Maj(a,b,c) - ldr x28,[x30],#8 // *K++, x19 in next round - //add x23,x23,x17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev x8,x8 // 5 -#endif - ldp x9,x10,[x1],#2*8 - add x23,x23,x17 // h+=Sigma0(a) - ror x16,x27,#14 - add x22,x22,x28 // h+=K[i] - eor x11,x27,x27,ror#23 - and x17,x20,x27 - bic x28,x21,x27 - add x22,x22,x8 // h+=X[i] - orr x17,x17,x28 // Ch(e,f,g) - eor x28,x23,x24 // a^b, b^c in next round - eor x16,x16,x11,ror#18 // Sigma1(e) - ror x11,x23,#28 - add x22,x22,x17 // h+=Ch(e,f,g) - eor x17,x23,x23,ror#5 - add x22,x22,x16 // h+=Sigma1(e) - and x19,x19,x28 // (b^c)&=(a^b) - add x26,x26,x22 // d+=h - eor x19,x19,x24 // Maj(a,b,c) - eor x17,x11,x17,ror#34 // Sigma0(a) - add x22,x22,x19 // h+=Maj(a,b,c) - ldr x19,[x30],#8 // *K++, x28 in next round - //add x22,x22,x17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev x9,x9 // 6 -#endif - add x22,x22,x17 // h+=Sigma0(a) - ror x16,x26,#14 - add x21,x21,x19 // h+=K[i] - eor x12,x26,x26,ror#23 - and x17,x27,x26 - bic x19,x20,x26 - add x21,x21,x9 // h+=X[i] - orr x17,x17,x19 // Ch(e,f,g) - eor x19,x22,x23 // a^b, b^c in next round - eor x16,x16,x12,ror#18 // Sigma1(e) - ror x12,x22,#28 - add x21,x21,x17 // h+=Ch(e,f,g) - eor x17,x22,x22,ror#5 - add x21,x21,x16 // h+=Sigma1(e) - and x28,x28,x19 // (b^c)&=(a^b) - add x25,x25,x21 // d+=h - eor x28,x28,x23 // Maj(a,b,c) - eor x17,x12,x17,ror#34 // Sigma0(a) - add x21,x21,x28 // h+=Maj(a,b,c) - ldr x28,[x30],#8 // *K++, x19 in next round - //add x21,x21,x17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev x10,x10 // 7 -#endif - ldp x11,x12,[x1],#2*8 - add x21,x21,x17 // h+=Sigma0(a) - ror x16,x25,#14 - add x20,x20,x28 // h+=K[i] - eor x13,x25,x25,ror#23 - and x17,x26,x25 - bic x28,x27,x25 - add x20,x20,x10 // h+=X[i] - orr x17,x17,x28 // Ch(e,f,g) - eor x28,x21,x22 // a^b, b^c in next round - eor x16,x16,x13,ror#18 // Sigma1(e) - ror x13,x21,#28 - add x20,x20,x17 // h+=Ch(e,f,g) - eor x17,x21,x21,ror#5 - add x20,x20,x16 // h+=Sigma1(e) - and x19,x19,x28 // (b^c)&=(a^b) - add x24,x24,x20 // d+=h - eor x19,x19,x22 // Maj(a,b,c) - eor x17,x13,x17,ror#34 // Sigma0(a) - add x20,x20,x19 // h+=Maj(a,b,c) - ldr x19,[x30],#8 // *K++, x28 in next round - //add x20,x20,x17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev x11,x11 // 8 -#endif - add x20,x20,x17 // h+=Sigma0(a) - ror x16,x24,#14 - add x27,x27,x19 // h+=K[i] - eor x14,x24,x24,ror#23 - and x17,x25,x24 - bic x19,x26,x24 - add x27,x27,x11 // h+=X[i] - orr x17,x17,x19 // Ch(e,f,g) - eor x19,x20,x21 // a^b, b^c in next round - eor x16,x16,x14,ror#18 // Sigma1(e) - ror x14,x20,#28 - add x27,x27,x17 // h+=Ch(e,f,g) - eor x17,x20,x20,ror#5 - add x27,x27,x16 // h+=Sigma1(e) - and x28,x28,x19 // (b^c)&=(a^b) - add x23,x23,x27 // d+=h - eor x28,x28,x21 // Maj(a,b,c) - eor x17,x14,x17,ror#34 // Sigma0(a) - add x27,x27,x28 // h+=Maj(a,b,c) - ldr x28,[x30],#8 // *K++, x19 in next round - //add x27,x27,x17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev x12,x12 // 9 -#endif - ldp x13,x14,[x1],#2*8 - add x27,x27,x17 // h+=Sigma0(a) - ror x16,x23,#14 - add x26,x26,x28 // h+=K[i] - eor x15,x23,x23,ror#23 - and x17,x24,x23 - bic x28,x25,x23 - add x26,x26,x12 // h+=X[i] - orr x17,x17,x28 // Ch(e,f,g) - eor x28,x27,x20 // a^b, b^c in next round - eor x16,x16,x15,ror#18 // Sigma1(e) - ror x15,x27,#28 - add x26,x26,x17 // h+=Ch(e,f,g) - eor x17,x27,x27,ror#5 - add x26,x26,x16 // h+=Sigma1(e) - and x19,x19,x28 // (b^c)&=(a^b) - add x22,x22,x26 // d+=h - eor x19,x19,x20 // Maj(a,b,c) - eor x17,x15,x17,ror#34 // Sigma0(a) - add x26,x26,x19 // h+=Maj(a,b,c) - ldr x19,[x30],#8 // *K++, x28 in next round - //add x26,x26,x17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev x13,x13 // 10 -#endif - add x26,x26,x17 // h+=Sigma0(a) - ror x16,x22,#14 - add x25,x25,x19 // h+=K[i] - eor x0,x22,x22,ror#23 - and x17,x23,x22 - bic x19,x24,x22 - add x25,x25,x13 // h+=X[i] - orr x17,x17,x19 // Ch(e,f,g) - eor x19,x26,x27 // a^b, b^c in next round - eor x16,x16,x0,ror#18 // Sigma1(e) - ror x0,x26,#28 - add x25,x25,x17 // h+=Ch(e,f,g) - eor x17,x26,x26,ror#5 - add x25,x25,x16 // h+=Sigma1(e) - and x28,x28,x19 // (b^c)&=(a^b) - add x21,x21,x25 // d+=h - eor x28,x28,x27 // Maj(a,b,c) - eor x17,x0,x17,ror#34 // Sigma0(a) - add x25,x25,x28 // h+=Maj(a,b,c) - ldr x28,[x30],#8 // *K++, x19 in next round - //add x25,x25,x17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev x14,x14 // 11 -#endif - ldp x15,x0,[x1],#2*8 - add x25,x25,x17 // h+=Sigma0(a) - str x6,[sp,#24] - ror x16,x21,#14 - add x24,x24,x28 // h+=K[i] - eor x6,x21,x21,ror#23 - and x17,x22,x21 - bic x28,x23,x21 - add x24,x24,x14 // h+=X[i] - orr x17,x17,x28 // Ch(e,f,g) - eor x28,x25,x26 // a^b, b^c in next round - eor x16,x16,x6,ror#18 // Sigma1(e) - ror x6,x25,#28 - add x24,x24,x17 // h+=Ch(e,f,g) - eor x17,x25,x25,ror#5 - add x24,x24,x16 // h+=Sigma1(e) - and x19,x19,x28 // (b^c)&=(a^b) - add x20,x20,x24 // d+=h - eor x19,x19,x26 // Maj(a,b,c) - eor x17,x6,x17,ror#34 // Sigma0(a) - add x24,x24,x19 // h+=Maj(a,b,c) - ldr x19,[x30],#8 // *K++, x28 in next round - //add x24,x24,x17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev x15,x15 // 12 -#endif - add x24,x24,x17 // h+=Sigma0(a) - str x7,[sp,#0] - ror x16,x20,#14 - add x23,x23,x19 // h+=K[i] - eor x7,x20,x20,ror#23 - and x17,x21,x20 - bic x19,x22,x20 - add x23,x23,x15 // h+=X[i] - orr x17,x17,x19 // Ch(e,f,g) - eor x19,x24,x25 // a^b, b^c in next round - eor x16,x16,x7,ror#18 // Sigma1(e) - ror x7,x24,#28 - add x23,x23,x17 // h+=Ch(e,f,g) - eor x17,x24,x24,ror#5 - add x23,x23,x16 // h+=Sigma1(e) - and x28,x28,x19 // (b^c)&=(a^b) - add x27,x27,x23 // d+=h - eor x28,x28,x25 // Maj(a,b,c) - eor x17,x7,x17,ror#34 // Sigma0(a) - add x23,x23,x28 // h+=Maj(a,b,c) - ldr x28,[x30],#8 // *K++, x19 in next round - //add x23,x23,x17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev x0,x0 // 13 -#endif - ldp x1,x2,[x1] - add x23,x23,x17 // h+=Sigma0(a) - str x8,[sp,#8] - ror x16,x27,#14 - add x22,x22,x28 // h+=K[i] - eor x8,x27,x27,ror#23 - and x17,x20,x27 - bic x28,x21,x27 - add x22,x22,x0 // h+=X[i] - orr x17,x17,x28 // Ch(e,f,g) - eor x28,x23,x24 // a^b, b^c in next round - eor x16,x16,x8,ror#18 // Sigma1(e) - ror x8,x23,#28 - add x22,x22,x17 // h+=Ch(e,f,g) - eor x17,x23,x23,ror#5 - add x22,x22,x16 // h+=Sigma1(e) - and x19,x19,x28 // (b^c)&=(a^b) - add x26,x26,x22 // d+=h - eor x19,x19,x24 // Maj(a,b,c) - eor x17,x8,x17,ror#34 // Sigma0(a) - add x22,x22,x19 // h+=Maj(a,b,c) - ldr x19,[x30],#8 // *K++, x28 in next round - //add x22,x22,x17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev x1,x1 // 14 -#endif - ldr x6,[sp,#24] - add x22,x22,x17 // h+=Sigma0(a) - str x9,[sp,#16] - ror x16,x26,#14 - add x21,x21,x19 // h+=K[i] - eor x9,x26,x26,ror#23 - and x17,x27,x26 - bic x19,x20,x26 - add x21,x21,x1 // h+=X[i] - orr x17,x17,x19 // Ch(e,f,g) - eor x19,x22,x23 // a^b, b^c in next round - eor x16,x16,x9,ror#18 // Sigma1(e) - ror x9,x22,#28 - add x21,x21,x17 // h+=Ch(e,f,g) - eor x17,x22,x22,ror#5 - add x21,x21,x16 // h+=Sigma1(e) - and x28,x28,x19 // (b^c)&=(a^b) - add x25,x25,x21 // d+=h - eor x28,x28,x23 // Maj(a,b,c) - eor x17,x9,x17,ror#34 // Sigma0(a) - add x21,x21,x28 // h+=Maj(a,b,c) - ldr x28,[x30],#8 // *K++, x19 in next round - //add x21,x21,x17 // h+=Sigma0(a) -#ifndef __ARMEB__ - rev x2,x2 // 15 -#endif - ldr x7,[sp,#0] - add x21,x21,x17 // h+=Sigma0(a) - str x10,[sp,#24] - ror x16,x25,#14 - add x20,x20,x28 // h+=K[i] - ror x9,x4,#1 - and x17,x26,x25 - ror x8,x1,#19 - bic x28,x27,x25 - ror x10,x21,#28 - add x20,x20,x2 // h+=X[i] - eor x16,x16,x25,ror#18 - eor x9,x9,x4,ror#8 - orr x17,x17,x28 // Ch(e,f,g) - eor x28,x21,x22 // a^b, b^c in next round - eor x16,x16,x25,ror#41 // Sigma1(e) - eor x10,x10,x21,ror#34 - add x20,x20,x17 // h+=Ch(e,f,g) - and x19,x19,x28 // (b^c)&=(a^b) - eor x8,x8,x1,ror#61 - eor x9,x9,x4,lsr#7 // sigma0(X[i+1]) - add x20,x20,x16 // h+=Sigma1(e) - eor x19,x19,x22 // Maj(a,b,c) - eor x17,x10,x21,ror#39 // Sigma0(a) - eor x8,x8,x1,lsr#6 // sigma1(X[i+14]) - add x3,x3,x12 - add x24,x24,x20 // d+=h - add x20,x20,x19 // h+=Maj(a,b,c) - ldr x19,[x30],#8 // *K++, x28 in next round - add x3,x3,x9 - add x20,x20,x17 // h+=Sigma0(a) - add x3,x3,x8 -.Loop_16_xx: - ldr x8,[sp,#8] - str x11,[sp,#0] - ror x16,x24,#14 - add x27,x27,x19 // h+=K[i] - ror x10,x5,#1 - and x17,x25,x24 - ror x9,x2,#19 - bic x19,x26,x24 - ror x11,x20,#28 - add x27,x27,x3 // h+=X[i] - eor x16,x16,x24,ror#18 - eor x10,x10,x5,ror#8 - orr x17,x17,x19 // Ch(e,f,g) - eor x19,x20,x21 // a^b, b^c in next round - eor x16,x16,x24,ror#41 // Sigma1(e) - eor x11,x11,x20,ror#34 - add x27,x27,x17 // h+=Ch(e,f,g) - and x28,x28,x19 // (b^c)&=(a^b) - eor x9,x9,x2,ror#61 - eor x10,x10,x5,lsr#7 // sigma0(X[i+1]) - add x27,x27,x16 // h+=Sigma1(e) - eor x28,x28,x21 // Maj(a,b,c) - eor x17,x11,x20,ror#39 // Sigma0(a) - eor x9,x9,x2,lsr#6 // sigma1(X[i+14]) - add x4,x4,x13 - add x23,x23,x27 // d+=h - add x27,x27,x28 // h+=Maj(a,b,c) - ldr x28,[x30],#8 // *K++, x19 in next round - add x4,x4,x10 - add x27,x27,x17 // h+=Sigma0(a) - add x4,x4,x9 - ldr x9,[sp,#16] - str x12,[sp,#8] - ror x16,x23,#14 - add x26,x26,x28 // h+=K[i] - ror x11,x6,#1 - and x17,x24,x23 - ror x10,x3,#19 - bic x28,x25,x23 - ror x12,x27,#28 - add x26,x26,x4 // h+=X[i] - eor x16,x16,x23,ror#18 - eor x11,x11,x6,ror#8 - orr x17,x17,x28 // Ch(e,f,g) - eor x28,x27,x20 // a^b, b^c in next round - eor x16,x16,x23,ror#41 // Sigma1(e) - eor x12,x12,x27,ror#34 - add x26,x26,x17 // h+=Ch(e,f,g) - and x19,x19,x28 // (b^c)&=(a^b) - eor x10,x10,x3,ror#61 - eor x11,x11,x6,lsr#7 // sigma0(X[i+1]) - add x26,x26,x16 // h+=Sigma1(e) - eor x19,x19,x20 // Maj(a,b,c) - eor x17,x12,x27,ror#39 // Sigma0(a) - eor x10,x10,x3,lsr#6 // sigma1(X[i+14]) - add x5,x5,x14 - add x22,x22,x26 // d+=h - add x26,x26,x19 // h+=Maj(a,b,c) - ldr x19,[x30],#8 // *K++, x28 in next round - add x5,x5,x11 - add x26,x26,x17 // h+=Sigma0(a) - add x5,x5,x10 - ldr x10,[sp,#24] - str x13,[sp,#16] - ror x16,x22,#14 - add x25,x25,x19 // h+=K[i] - ror x12,x7,#1 - and x17,x23,x22 - ror x11,x4,#19 - bic x19,x24,x22 - ror x13,x26,#28 - add x25,x25,x5 // h+=X[i] - eor x16,x16,x22,ror#18 - eor x12,x12,x7,ror#8 - orr x17,x17,x19 // Ch(e,f,g) - eor x19,x26,x27 // a^b, b^c in next round - eor x16,x16,x22,ror#41 // Sigma1(e) - eor x13,x13,x26,ror#34 - add x25,x25,x17 // h+=Ch(e,f,g) - and x28,x28,x19 // (b^c)&=(a^b) - eor x11,x11,x4,ror#61 - eor x12,x12,x7,lsr#7 // sigma0(X[i+1]) - add x25,x25,x16 // h+=Sigma1(e) - eor x28,x28,x27 // Maj(a,b,c) - eor x17,x13,x26,ror#39 // Sigma0(a) - eor x11,x11,x4,lsr#6 // sigma1(X[i+14]) - add x6,x6,x15 - add x21,x21,x25 // d+=h - add x25,x25,x28 // h+=Maj(a,b,c) - ldr x28,[x30],#8 // *K++, x19 in next round - add x6,x6,x12 - add x25,x25,x17 // h+=Sigma0(a) - add x6,x6,x11 - ldr x11,[sp,#0] - str x14,[sp,#24] - ror x16,x21,#14 - add x24,x24,x28 // h+=K[i] - ror x13,x8,#1 - and x17,x22,x21 - ror x12,x5,#19 - bic x28,x23,x21 - ror x14,x25,#28 - add x24,x24,x6 // h+=X[i] - eor x16,x16,x21,ror#18 - eor x13,x13,x8,ror#8 - orr x17,x17,x28 // Ch(e,f,g) - eor x28,x25,x26 // a^b, b^c in next round - eor x16,x16,x21,ror#41 // Sigma1(e) - eor x14,x14,x25,ror#34 - add x24,x24,x17 // h+=Ch(e,f,g) - and x19,x19,x28 // (b^c)&=(a^b) - eor x12,x12,x5,ror#61 - eor x13,x13,x8,lsr#7 // sigma0(X[i+1]) - add x24,x24,x16 // h+=Sigma1(e) - eor x19,x19,x26 // Maj(a,b,c) - eor x17,x14,x25,ror#39 // Sigma0(a) - eor x12,x12,x5,lsr#6 // sigma1(X[i+14]) - add x7,x7,x0 - add x20,x20,x24 // d+=h - add x24,x24,x19 // h+=Maj(a,b,c) - ldr x19,[x30],#8 // *K++, x28 in next round - add x7,x7,x13 - add x24,x24,x17 // h+=Sigma0(a) - add x7,x7,x12 - ldr x12,[sp,#8] - str x15,[sp,#0] - ror x16,x20,#14 - add x23,x23,x19 // h+=K[i] - ror x14,x9,#1 - and x17,x21,x20 - ror x13,x6,#19 - bic x19,x22,x20 - ror x15,x24,#28 - add x23,x23,x7 // h+=X[i] - eor x16,x16,x20,ror#18 - eor x14,x14,x9,ror#8 - orr x17,x17,x19 // Ch(e,f,g) - eor x19,x24,x25 // a^b, b^c in next round - eor x16,x16,x20,ror#41 // Sigma1(e) - eor x15,x15,x24,ror#34 - add x23,x23,x17 // h+=Ch(e,f,g) - and x28,x28,x19 // (b^c)&=(a^b) - eor x13,x13,x6,ror#61 - eor x14,x14,x9,lsr#7 // sigma0(X[i+1]) - add x23,x23,x16 // h+=Sigma1(e) - eor x28,x28,x25 // Maj(a,b,c) - eor x17,x15,x24,ror#39 // Sigma0(a) - eor x13,x13,x6,lsr#6 // sigma1(X[i+14]) - add x8,x8,x1 - add x27,x27,x23 // d+=h - add x23,x23,x28 // h+=Maj(a,b,c) - ldr x28,[x30],#8 // *K++, x19 in next round - add x8,x8,x14 - add x23,x23,x17 // h+=Sigma0(a) - add x8,x8,x13 - ldr x13,[sp,#16] - str x0,[sp,#8] - ror x16,x27,#14 - add x22,x22,x28 // h+=K[i] - ror x15,x10,#1 - and x17,x20,x27 - ror x14,x7,#19 - bic x28,x21,x27 - ror x0,x23,#28 - add x22,x22,x8 // h+=X[i] - eor x16,x16,x27,ror#18 - eor x15,x15,x10,ror#8 - orr x17,x17,x28 // Ch(e,f,g) - eor x28,x23,x24 // a^b, b^c in next round - eor x16,x16,x27,ror#41 // Sigma1(e) - eor x0,x0,x23,ror#34 - add x22,x22,x17 // h+=Ch(e,f,g) - and x19,x19,x28 // (b^c)&=(a^b) - eor x14,x14,x7,ror#61 - eor x15,x15,x10,lsr#7 // sigma0(X[i+1]) - add x22,x22,x16 // h+=Sigma1(e) - eor x19,x19,x24 // Maj(a,b,c) - eor x17,x0,x23,ror#39 // Sigma0(a) - eor x14,x14,x7,lsr#6 // sigma1(X[i+14]) - add x9,x9,x2 - add x26,x26,x22 // d+=h - add x22,x22,x19 // h+=Maj(a,b,c) - ldr x19,[x30],#8 // *K++, x28 in next round - add x9,x9,x15 - add x22,x22,x17 // h+=Sigma0(a) - add x9,x9,x14 - ldr x14,[sp,#24] - str x1,[sp,#16] - ror x16,x26,#14 - add x21,x21,x19 // h+=K[i] - ror x0,x11,#1 - and x17,x27,x26 - ror x15,x8,#19 - bic x19,x20,x26 - ror x1,x22,#28 - add x21,x21,x9 // h+=X[i] - eor x16,x16,x26,ror#18 - eor x0,x0,x11,ror#8 - orr x17,x17,x19 // Ch(e,f,g) - eor x19,x22,x23 // a^b, b^c in next round - eor x16,x16,x26,ror#41 // Sigma1(e) - eor x1,x1,x22,ror#34 - add x21,x21,x17 // h+=Ch(e,f,g) - and x28,x28,x19 // (b^c)&=(a^b) - eor x15,x15,x8,ror#61 - eor x0,x0,x11,lsr#7 // sigma0(X[i+1]) - add x21,x21,x16 // h+=Sigma1(e) - eor x28,x28,x23 // Maj(a,b,c) - eor x17,x1,x22,ror#39 // Sigma0(a) - eor x15,x15,x8,lsr#6 // sigma1(X[i+14]) - add x10,x10,x3 - add x25,x25,x21 // d+=h - add x21,x21,x28 // h+=Maj(a,b,c) - ldr x28,[x30],#8 // *K++, x19 in next round - add x10,x10,x0 - add x21,x21,x17 // h+=Sigma0(a) - add x10,x10,x15 - ldr x15,[sp,#0] - str x2,[sp,#24] - ror x16,x25,#14 - add x20,x20,x28 // h+=K[i] - ror x1,x12,#1 - and x17,x26,x25 - ror x0,x9,#19 - bic x28,x27,x25 - ror x2,x21,#28 - add x20,x20,x10 // h+=X[i] - eor x16,x16,x25,ror#18 - eor x1,x1,x12,ror#8 - orr x17,x17,x28 // Ch(e,f,g) - eor x28,x21,x22 // a^b, b^c in next round - eor x16,x16,x25,ror#41 // Sigma1(e) - eor x2,x2,x21,ror#34 - add x20,x20,x17 // h+=Ch(e,f,g) - and x19,x19,x28 // (b^c)&=(a^b) - eor x0,x0,x9,ror#61 - eor x1,x1,x12,lsr#7 // sigma0(X[i+1]) - add x20,x20,x16 // h+=Sigma1(e) - eor x19,x19,x22 // Maj(a,b,c) - eor x17,x2,x21,ror#39 // Sigma0(a) - eor x0,x0,x9,lsr#6 // sigma1(X[i+14]) - add x11,x11,x4 - add x24,x24,x20 // d+=h - add x20,x20,x19 // h+=Maj(a,b,c) - ldr x19,[x30],#8 // *K++, x28 in next round - add x11,x11,x1 - add x20,x20,x17 // h+=Sigma0(a) - add x11,x11,x0 - ldr x0,[sp,#8] - str x3,[sp,#0] - ror x16,x24,#14 - add x27,x27,x19 // h+=K[i] - ror x2,x13,#1 - and x17,x25,x24 - ror x1,x10,#19 - bic x19,x26,x24 - ror x3,x20,#28 - add x27,x27,x11 // h+=X[i] - eor x16,x16,x24,ror#18 - eor x2,x2,x13,ror#8 - orr x17,x17,x19 // Ch(e,f,g) - eor x19,x20,x21 // a^b, b^c in next round - eor x16,x16,x24,ror#41 // Sigma1(e) - eor x3,x3,x20,ror#34 - add x27,x27,x17 // h+=Ch(e,f,g) - and x28,x28,x19 // (b^c)&=(a^b) - eor x1,x1,x10,ror#61 - eor x2,x2,x13,lsr#7 // sigma0(X[i+1]) - add x27,x27,x16 // h+=Sigma1(e) - eor x28,x28,x21 // Maj(a,b,c) - eor x17,x3,x20,ror#39 // Sigma0(a) - eor x1,x1,x10,lsr#6 // sigma1(X[i+14]) - add x12,x12,x5 - add x23,x23,x27 // d+=h - add x27,x27,x28 // h+=Maj(a,b,c) - ldr x28,[x30],#8 // *K++, x19 in next round - add x12,x12,x2 - add x27,x27,x17 // h+=Sigma0(a) - add x12,x12,x1 - ldr x1,[sp,#16] - str x4,[sp,#8] - ror x16,x23,#14 - add x26,x26,x28 // h+=K[i] - ror x3,x14,#1 - and x17,x24,x23 - ror x2,x11,#19 - bic x28,x25,x23 - ror x4,x27,#28 - add x26,x26,x12 // h+=X[i] - eor x16,x16,x23,ror#18 - eor x3,x3,x14,ror#8 - orr x17,x17,x28 // Ch(e,f,g) - eor x28,x27,x20 // a^b, b^c in next round - eor x16,x16,x23,ror#41 // Sigma1(e) - eor x4,x4,x27,ror#34 - add x26,x26,x17 // h+=Ch(e,f,g) - and x19,x19,x28 // (b^c)&=(a^b) - eor x2,x2,x11,ror#61 - eor x3,x3,x14,lsr#7 // sigma0(X[i+1]) - add x26,x26,x16 // h+=Sigma1(e) - eor x19,x19,x20 // Maj(a,b,c) - eor x17,x4,x27,ror#39 // Sigma0(a) - eor x2,x2,x11,lsr#6 // sigma1(X[i+14]) - add x13,x13,x6 - add x22,x22,x26 // d+=h - add x26,x26,x19 // h+=Maj(a,b,c) - ldr x19,[x30],#8 // *K++, x28 in next round - add x13,x13,x3 - add x26,x26,x17 // h+=Sigma0(a) - add x13,x13,x2 - ldr x2,[sp,#24] - str x5,[sp,#16] - ror x16,x22,#14 - add x25,x25,x19 // h+=K[i] - ror x4,x15,#1 - and x17,x23,x22 - ror x3,x12,#19 - bic x19,x24,x22 - ror x5,x26,#28 - add x25,x25,x13 // h+=X[i] - eor x16,x16,x22,ror#18 - eor x4,x4,x15,ror#8 - orr x17,x17,x19 // Ch(e,f,g) - eor x19,x26,x27 // a^b, b^c in next round - eor x16,x16,x22,ror#41 // Sigma1(e) - eor x5,x5,x26,ror#34 - add x25,x25,x17 // h+=Ch(e,f,g) - and x28,x28,x19 // (b^c)&=(a^b) - eor x3,x3,x12,ror#61 - eor x4,x4,x15,lsr#7 // sigma0(X[i+1]) - add x25,x25,x16 // h+=Sigma1(e) - eor x28,x28,x27 // Maj(a,b,c) - eor x17,x5,x26,ror#39 // Sigma0(a) - eor x3,x3,x12,lsr#6 // sigma1(X[i+14]) - add x14,x14,x7 - add x21,x21,x25 // d+=h - add x25,x25,x28 // h+=Maj(a,b,c) - ldr x28,[x30],#8 // *K++, x19 in next round - add x14,x14,x4 - add x25,x25,x17 // h+=Sigma0(a) - add x14,x14,x3 - ldr x3,[sp,#0] - str x6,[sp,#24] - ror x16,x21,#14 - add x24,x24,x28 // h+=K[i] - ror x5,x0,#1 - and x17,x22,x21 - ror x4,x13,#19 - bic x28,x23,x21 - ror x6,x25,#28 - add x24,x24,x14 // h+=X[i] - eor x16,x16,x21,ror#18 - eor x5,x5,x0,ror#8 - orr x17,x17,x28 // Ch(e,f,g) - eor x28,x25,x26 // a^b, b^c in next round - eor x16,x16,x21,ror#41 // Sigma1(e) - eor x6,x6,x25,ror#34 - add x24,x24,x17 // h+=Ch(e,f,g) - and x19,x19,x28 // (b^c)&=(a^b) - eor x4,x4,x13,ror#61 - eor x5,x5,x0,lsr#7 // sigma0(X[i+1]) - add x24,x24,x16 // h+=Sigma1(e) - eor x19,x19,x26 // Maj(a,b,c) - eor x17,x6,x25,ror#39 // Sigma0(a) - eor x4,x4,x13,lsr#6 // sigma1(X[i+14]) - add x15,x15,x8 - add x20,x20,x24 // d+=h - add x24,x24,x19 // h+=Maj(a,b,c) - ldr x19,[x30],#8 // *K++, x28 in next round - add x15,x15,x5 - add x24,x24,x17 // h+=Sigma0(a) - add x15,x15,x4 - ldr x4,[sp,#8] - str x7,[sp,#0] - ror x16,x20,#14 - add x23,x23,x19 // h+=K[i] - ror x6,x1,#1 - and x17,x21,x20 - ror x5,x14,#19 - bic x19,x22,x20 - ror x7,x24,#28 - add x23,x23,x15 // h+=X[i] - eor x16,x16,x20,ror#18 - eor x6,x6,x1,ror#8 - orr x17,x17,x19 // Ch(e,f,g) - eor x19,x24,x25 // a^b, b^c in next round - eor x16,x16,x20,ror#41 // Sigma1(e) - eor x7,x7,x24,ror#34 - add x23,x23,x17 // h+=Ch(e,f,g) - and x28,x28,x19 // (b^c)&=(a^b) - eor x5,x5,x14,ror#61 - eor x6,x6,x1,lsr#7 // sigma0(X[i+1]) - add x23,x23,x16 // h+=Sigma1(e) - eor x28,x28,x25 // Maj(a,b,c) - eor x17,x7,x24,ror#39 // Sigma0(a) - eor x5,x5,x14,lsr#6 // sigma1(X[i+14]) - add x0,x0,x9 - add x27,x27,x23 // d+=h - add x23,x23,x28 // h+=Maj(a,b,c) - ldr x28,[x30],#8 // *K++, x19 in next round - add x0,x0,x6 - add x23,x23,x17 // h+=Sigma0(a) - add x0,x0,x5 - ldr x5,[sp,#16] - str x8,[sp,#8] - ror x16,x27,#14 - add x22,x22,x28 // h+=K[i] - ror x7,x2,#1 - and x17,x20,x27 - ror x6,x15,#19 - bic x28,x21,x27 - ror x8,x23,#28 - add x22,x22,x0 // h+=X[i] - eor x16,x16,x27,ror#18 - eor x7,x7,x2,ror#8 - orr x17,x17,x28 // Ch(e,f,g) - eor x28,x23,x24 // a^b, b^c in next round - eor x16,x16,x27,ror#41 // Sigma1(e) - eor x8,x8,x23,ror#34 - add x22,x22,x17 // h+=Ch(e,f,g) - and x19,x19,x28 // (b^c)&=(a^b) - eor x6,x6,x15,ror#61 - eor x7,x7,x2,lsr#7 // sigma0(X[i+1]) - add x22,x22,x16 // h+=Sigma1(e) - eor x19,x19,x24 // Maj(a,b,c) - eor x17,x8,x23,ror#39 // Sigma0(a) - eor x6,x6,x15,lsr#6 // sigma1(X[i+14]) - add x1,x1,x10 - add x26,x26,x22 // d+=h - add x22,x22,x19 // h+=Maj(a,b,c) - ldr x19,[x30],#8 // *K++, x28 in next round - add x1,x1,x7 - add x22,x22,x17 // h+=Sigma0(a) - add x1,x1,x6 - ldr x6,[sp,#24] - str x9,[sp,#16] - ror x16,x26,#14 - add x21,x21,x19 // h+=K[i] - ror x8,x3,#1 - and x17,x27,x26 - ror x7,x0,#19 - bic x19,x20,x26 - ror x9,x22,#28 - add x21,x21,x1 // h+=X[i] - eor x16,x16,x26,ror#18 - eor x8,x8,x3,ror#8 - orr x17,x17,x19 // Ch(e,f,g) - eor x19,x22,x23 // a^b, b^c in next round - eor x16,x16,x26,ror#41 // Sigma1(e) - eor x9,x9,x22,ror#34 - add x21,x21,x17 // h+=Ch(e,f,g) - and x28,x28,x19 // (b^c)&=(a^b) - eor x7,x7,x0,ror#61 - eor x8,x8,x3,lsr#7 // sigma0(X[i+1]) - add x21,x21,x16 // h+=Sigma1(e) - eor x28,x28,x23 // Maj(a,b,c) - eor x17,x9,x22,ror#39 // Sigma0(a) - eor x7,x7,x0,lsr#6 // sigma1(X[i+14]) - add x2,x2,x11 - add x25,x25,x21 // d+=h - add x21,x21,x28 // h+=Maj(a,b,c) - ldr x28,[x30],#8 // *K++, x19 in next round - add x2,x2,x8 - add x21,x21,x17 // h+=Sigma0(a) - add x2,x2,x7 - ldr x7,[sp,#0] - str x10,[sp,#24] - ror x16,x25,#14 - add x20,x20,x28 // h+=K[i] - ror x9,x4,#1 - and x17,x26,x25 - ror x8,x1,#19 - bic x28,x27,x25 - ror x10,x21,#28 - add x20,x20,x2 // h+=X[i] - eor x16,x16,x25,ror#18 - eor x9,x9,x4,ror#8 - orr x17,x17,x28 // Ch(e,f,g) - eor x28,x21,x22 // a^b, b^c in next round - eor x16,x16,x25,ror#41 // Sigma1(e) - eor x10,x10,x21,ror#34 - add x20,x20,x17 // h+=Ch(e,f,g) - and x19,x19,x28 // (b^c)&=(a^b) - eor x8,x8,x1,ror#61 - eor x9,x9,x4,lsr#7 // sigma0(X[i+1]) - add x20,x20,x16 // h+=Sigma1(e) - eor x19,x19,x22 // Maj(a,b,c) - eor x17,x10,x21,ror#39 // Sigma0(a) - eor x8,x8,x1,lsr#6 // sigma1(X[i+14]) - add x3,x3,x12 - add x24,x24,x20 // d+=h - add x20,x20,x19 // h+=Maj(a,b,c) - ldr x19,[x30],#8 // *K++, x28 in next round - add x3,x3,x9 - add x20,x20,x17 // h+=Sigma0(a) - add x3,x3,x8 - cbnz x19,.Loop_16_xx - - ldp x0,x2,[x29,#96] - ldr x1,[x29,#112] - sub x30,x30,#648 // rewind - - ldp x3,x4,[x0] - ldp x5,x6,[x0,#2*8] - add x1,x1,#14*8 // advance input pointer - ldp x7,x8,[x0,#4*8] - add x20,x20,x3 - ldp x9,x10,[x0,#6*8] - add x21,x21,x4 - add x22,x22,x5 - add x23,x23,x6 - stp x20,x21,[x0] - add x24,x24,x7 - add x25,x25,x8 - stp x22,x23,[x0,#2*8] - add x26,x26,x9 - add x27,x27,x10 - cmp x1,x2 - stp x24,x25,[x0,#4*8] - stp x26,x27,[x0,#6*8] - b.ne .Loop - - ldp x19,x20,[x29,#16] - add sp,sp,#4*8 - ldp x21,x22,[x29,#32] - ldp x23,x24,[x29,#48] - ldp x25,x26,[x29,#64] - ldp x27,x28,[x29,#80] - ldp x29,x30,[sp],#128 - ret -.size sha512_block_data_order,.-sha512_block_data_order - -.align 6 -.type .LK512,%object -.LK512: -.quad 0x428a2f98d728ae22,0x7137449123ef65cd -.quad 0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc -.quad 0x3956c25bf348b538,0x59f111f1b605d019 -.quad 0x923f82a4af194f9b,0xab1c5ed5da6d8118 -.quad 0xd807aa98a3030242,0x12835b0145706fbe -.quad 0x243185be4ee4b28c,0x550c7dc3d5ffb4e2 -.quad 0x72be5d74f27b896f,0x80deb1fe3b1696b1 -.quad 0x9bdc06a725c71235,0xc19bf174cf692694 -.quad 0xe49b69c19ef14ad2,0xefbe4786384f25e3 -.quad 0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65 -.quad 0x2de92c6f592b0275,0x4a7484aa6ea6e483 -.quad 0x5cb0a9dcbd41fbd4,0x76f988da831153b5 -.quad 0x983e5152ee66dfab,0xa831c66d2db43210 -.quad 0xb00327c898fb213f,0xbf597fc7beef0ee4 -.quad 0xc6e00bf33da88fc2,0xd5a79147930aa725 -.quad 0x06ca6351e003826f,0x142929670a0e6e70 -.quad 0x27b70a8546d22ffc,0x2e1b21385c26c926 -.quad 0x4d2c6dfc5ac42aed,0x53380d139d95b3df -.quad 0x650a73548baf63de,0x766a0abb3c77b2a8 -.quad 0x81c2c92e47edaee6,0x92722c851482353b -.quad 0xa2bfe8a14cf10364,0xa81a664bbc423001 -.quad 0xc24b8b70d0f89791,0xc76c51a30654be30 -.quad 0xd192e819d6ef5218,0xd69906245565a910 -.quad 0xf40e35855771202a,0x106aa07032bbd1b8 -.quad 0x19a4c116b8d2d0c8,0x1e376c085141ab53 -.quad 0x2748774cdf8eeb99,0x34b0bcb5e19b48a8 -.quad 0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb -.quad 0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3 -.quad 0x748f82ee5defb2fc,0x78a5636f43172f60 -.quad 0x84c87814a1f0ab72,0x8cc702081a6439ec -.quad 0x90befffa23631e28,0xa4506cebde82bde9 -.quad 0xbef9a3f7b2c67915,0xc67178f2e372532b -.quad 0xca273eceea26619c,0xd186b8c721c0c207 -.quad 0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178 -.quad 0x06f067aa72176fba,0x0a637dc5a2c898a6 -.quad 0x113f9804bef90dae,0x1b710b35131c471b -.quad 0x28db77f523047d84,0x32caab7b40c72493 -.quad 0x3c9ebe0a15c9bebc,0x431d67c49c100d4c -.quad 0x4cc5d4becb3e42b6,0x597f299cfc657e2a -.quad 0x5fcb6fab3ad6faec,0x6c44198c4a475817 -.quad 0 // terminator -.size .LK512,.-.LK512 -.align 3 -.LOPENSSL_armcap_P: -.quad OPENSSL_armcap_P-. -.byte 83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,65,82,77,118,56,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 2 -.align 2 -.comm OPENSSL_armcap_P,4,4 -#endif \ No newline at end of file diff --git a/third_party/boringssl/linux-arm/crypto/aes/aes-armv4.S b/third_party/boringssl/linux-arm/crypto/aes/aes-armv4.S deleted file mode 100644 index cb94841e0283e..0000000000000 --- a/third_party/boringssl/linux-arm/crypto/aes/aes-armv4.S +++ /dev/null @@ -1,1200 +0,0 @@ -#if defined(__arm__) - -@ ==================================================================== -@ Written by Andy Polyakov for the OpenSSL -@ project. The module is, however, dual licensed under OpenSSL and -@ CRYPTOGAMS licenses depending on where you obtain it. For further -@ details see http://www.openssl.org/~appro/cryptogams/. -@ ==================================================================== - -@ AES for ARMv4 - -@ January 2007. -@ -@ Code uses single 1K S-box and is >2 times faster than code generated -@ by gcc-3.4.1. This is thanks to unique feature of ARMv4 ISA, which -@ allows to merge logical or arithmetic operation with shift or rotate -@ in one instruction and emit combined result every cycle. The module -@ is endian-neutral. The performance is ~42 cycles/byte for 128-bit -@ key [on single-issue Xscale PXA250 core]. - -@ May 2007. -@ -@ AES_set_[en|de]crypt_key is added. - -@ July 2010. -@ -@ Rescheduling for dual-issue pipeline resulted in 12% improvement on -@ Cortex A8 core and ~25 cycles per byte processed with 128-bit key. - -@ February 2011. -@ -@ Profiler-assisted and platform-specific optimization resulted in 16% -@ improvement on Cortex A8 core and ~21.5 cycles per byte. - -#if defined(__arm__) -#ifndef __KERNEL__ -# include "arm_arch.h" -#else -# define __ARM_ARCH__ __LINUX_ARM_ARCH__ -#endif - -.text -#if __ARM_ARCH__<7 -.code 32 -#else -.syntax unified -# if defined(__thumb2__) && !defined(__APPLE__) -.thumb -# else -.code 32 -# endif -#endif - -.type AES_Te,%object -.align 5 -AES_Te: -.word 0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d -.word 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554 -.word 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d -.word 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a -.word 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87 -.word 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b -.word 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea -.word 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b -.word 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a -.word 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f -.word 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108 -.word 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f -.word 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e -.word 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5 -.word 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d -.word 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f -.word 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e -.word 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb -.word 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce -.word 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497 -.word 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c -.word 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed -.word 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b -.word 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a -.word 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16 -.word 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594 -.word 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81 -.word 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3 -.word 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a -.word 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504 -.word 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163 -.word 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d -.word 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f -.word 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739 -.word 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47 -.word 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395 -.word 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f -.word 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883 -.word 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c -.word 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76 -.word 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e -.word 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4 -.word 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6 -.word 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b -.word 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7 -.word 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0 -.word 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25 -.word 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818 -.word 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72 -.word 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651 -.word 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21 -.word 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85 -.word 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa -.word 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12 -.word 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0 -.word 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9 -.word 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133 -.word 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7 -.word 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920 -.word 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a -.word 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17 -.word 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8 -.word 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11 -.word 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a -@ Te4[256] -.byte 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5 -.byte 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76 -.byte 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0 -.byte 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0 -.byte 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc -.byte 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15 -.byte 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a -.byte 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75 -.byte 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0 -.byte 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84 -.byte 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b -.byte 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf -.byte 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85 -.byte 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8 -.byte 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5 -.byte 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2 -.byte 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17 -.byte 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73 -.byte 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88 -.byte 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb -.byte 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c -.byte 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79 -.byte 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9 -.byte 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08 -.byte 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6 -.byte 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a -.byte 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e -.byte 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e -.byte 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94 -.byte 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf -.byte 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68 -.byte 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16 -@ rcon[] -.word 0x01000000, 0x02000000, 0x04000000, 0x08000000 -.word 0x10000000, 0x20000000, 0x40000000, 0x80000000 -.word 0x1B000000, 0x36000000, 0, 0, 0, 0, 0, 0 -.size AES_Te,.-AES_Te - -@ void asm_AES_encrypt(const unsigned char *in, unsigned char *out, -@ const AES_KEY *key) { -.globl asm_AES_encrypt -.hidden asm_AES_encrypt -.type asm_AES_encrypt,%function -.align 5 -asm_AES_encrypt: -#if __ARM_ARCH__<7 - sub r3,pc,#8 @ asm_AES_encrypt -#else - adr r3,asm_AES_encrypt -#endif - stmdb sp!,{r1,r4-r12,lr} -#ifdef __APPLE__ - adr r10,AES_Te -#else - sub r10,r3,#asm_AES_encrypt-AES_Te @ Te -#endif - mov r12,r0 @ inp - mov r11,r2 -#if __ARM_ARCH__<7 - ldrb r0,[r12,#3] @ load input data in endian-neutral - ldrb r4,[r12,#2] @ manner... - ldrb r5,[r12,#1] - ldrb r6,[r12,#0] - orr r0,r0,r4,lsl#8 - ldrb r1,[r12,#7] - orr r0,r0,r5,lsl#16 - ldrb r4,[r12,#6] - orr r0,r0,r6,lsl#24 - ldrb r5,[r12,#5] - ldrb r6,[r12,#4] - orr r1,r1,r4,lsl#8 - ldrb r2,[r12,#11] - orr r1,r1,r5,lsl#16 - ldrb r4,[r12,#10] - orr r1,r1,r6,lsl#24 - ldrb r5,[r12,#9] - ldrb r6,[r12,#8] - orr r2,r2,r4,lsl#8 - ldrb r3,[r12,#15] - orr r2,r2,r5,lsl#16 - ldrb r4,[r12,#14] - orr r2,r2,r6,lsl#24 - ldrb r5,[r12,#13] - ldrb r6,[r12,#12] - orr r3,r3,r4,lsl#8 - orr r3,r3,r5,lsl#16 - orr r3,r3,r6,lsl#24 -#else - ldr r0,[r12,#0] - ldr r1,[r12,#4] - ldr r2,[r12,#8] - ldr r3,[r12,#12] -#ifdef __ARMEL__ - rev r0,r0 - rev r1,r1 - rev r2,r2 - rev r3,r3 -#endif -#endif - bl _armv4_AES_encrypt - - ldr r12,[sp],#4 @ pop out -#if __ARM_ARCH__>=7 -#ifdef __ARMEL__ - rev r0,r0 - rev r1,r1 - rev r2,r2 - rev r3,r3 -#endif - str r0,[r12,#0] - str r1,[r12,#4] - str r2,[r12,#8] - str r3,[r12,#12] -#else - mov r4,r0,lsr#24 @ write output in endian-neutral - mov r5,r0,lsr#16 @ manner... - mov r6,r0,lsr#8 - strb r4,[r12,#0] - strb r5,[r12,#1] - mov r4,r1,lsr#24 - strb r6,[r12,#2] - mov r5,r1,lsr#16 - strb r0,[r12,#3] - mov r6,r1,lsr#8 - strb r4,[r12,#4] - strb r5,[r12,#5] - mov r4,r2,lsr#24 - strb r6,[r12,#6] - mov r5,r2,lsr#16 - strb r1,[r12,#7] - mov r6,r2,lsr#8 - strb r4,[r12,#8] - strb r5,[r12,#9] - mov r4,r3,lsr#24 - strb r6,[r12,#10] - mov r5,r3,lsr#16 - strb r2,[r12,#11] - mov r6,r3,lsr#8 - strb r4,[r12,#12] - strb r5,[r12,#13] - strb r6,[r12,#14] - strb r3,[r12,#15] -#endif -#if __ARM_ARCH__>=5 - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc} -#else - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} - tst lr,#1 - moveq pc,lr @ be binary compatible with V4, yet -.word 0xe12fff1e @ interoperable with Thumb ISA:-) -#endif -.size asm_AES_encrypt,.-asm_AES_encrypt - -.type _armv4_AES_encrypt,%function -.align 2 -_armv4_AES_encrypt: - str lr,[sp,#-4]! @ push lr - ldmia r11!,{r4,r5,r6,r7} - eor r0,r0,r4 - ldr r12,[r11,#240-16] - eor r1,r1,r5 - eor r2,r2,r6 - eor r3,r3,r7 - sub r12,r12,#1 - mov lr,#255 - - and r7,lr,r0 - and r8,lr,r0,lsr#8 - and r9,lr,r0,lsr#16 - mov r0,r0,lsr#24 -.Lenc_loop: - ldr r4,[r10,r7,lsl#2] @ Te3[s0>>0] - and r7,lr,r1,lsr#16 @ i0 - ldr r5,[r10,r8,lsl#2] @ Te2[s0>>8] - and r8,lr,r1 - ldr r6,[r10,r9,lsl#2] @ Te1[s0>>16] - and r9,lr,r1,lsr#8 - ldr r0,[r10,r0,lsl#2] @ Te0[s0>>24] - mov r1,r1,lsr#24 - - ldr r7,[r10,r7,lsl#2] @ Te1[s1>>16] - ldr r8,[r10,r8,lsl#2] @ Te3[s1>>0] - ldr r9,[r10,r9,lsl#2] @ Te2[s1>>8] - eor r0,r0,r7,ror#8 - ldr r1,[r10,r1,lsl#2] @ Te0[s1>>24] - and r7,lr,r2,lsr#8 @ i0 - eor r5,r5,r8,ror#8 - and r8,lr,r2,lsr#16 @ i1 - eor r6,r6,r9,ror#8 - and r9,lr,r2 - ldr r7,[r10,r7,lsl#2] @ Te2[s2>>8] - eor r1,r1,r4,ror#24 - ldr r8,[r10,r8,lsl#2] @ Te1[s2>>16] - mov r2,r2,lsr#24 - - ldr r9,[r10,r9,lsl#2] @ Te3[s2>>0] - eor r0,r0,r7,ror#16 - ldr r2,[r10,r2,lsl#2] @ Te0[s2>>24] - and r7,lr,r3 @ i0 - eor r1,r1,r8,ror#8 - and r8,lr,r3,lsr#8 @ i1 - eor r6,r6,r9,ror#16 - and r9,lr,r3,lsr#16 @ i2 - ldr r7,[r10,r7,lsl#2] @ Te3[s3>>0] - eor r2,r2,r5,ror#16 - ldr r8,[r10,r8,lsl#2] @ Te2[s3>>8] - mov r3,r3,lsr#24 - - ldr r9,[r10,r9,lsl#2] @ Te1[s3>>16] - eor r0,r0,r7,ror#24 - ldr r7,[r11],#16 - eor r1,r1,r8,ror#16 - ldr r3,[r10,r3,lsl#2] @ Te0[s3>>24] - eor r2,r2,r9,ror#8 - ldr r4,[r11,#-12] - eor r3,r3,r6,ror#8 - - ldr r5,[r11,#-8] - eor r0,r0,r7 - ldr r6,[r11,#-4] - and r7,lr,r0 - eor r1,r1,r4 - and r8,lr,r0,lsr#8 - eor r2,r2,r5 - and r9,lr,r0,lsr#16 - eor r3,r3,r6 - mov r0,r0,lsr#24 - - subs r12,r12,#1 - bne .Lenc_loop - - add r10,r10,#2 - - ldrb r4,[r10,r7,lsl#2] @ Te4[s0>>0] - and r7,lr,r1,lsr#16 @ i0 - ldrb r5,[r10,r8,lsl#2] @ Te4[s0>>8] - and r8,lr,r1 - ldrb r6,[r10,r9,lsl#2] @ Te4[s0>>16] - and r9,lr,r1,lsr#8 - ldrb r0,[r10,r0,lsl#2] @ Te4[s0>>24] - mov r1,r1,lsr#24 - - ldrb r7,[r10,r7,lsl#2] @ Te4[s1>>16] - ldrb r8,[r10,r8,lsl#2] @ Te4[s1>>0] - ldrb r9,[r10,r9,lsl#2] @ Te4[s1>>8] - eor r0,r7,r0,lsl#8 - ldrb r1,[r10,r1,lsl#2] @ Te4[s1>>24] - and r7,lr,r2,lsr#8 @ i0 - eor r5,r8,r5,lsl#8 - and r8,lr,r2,lsr#16 @ i1 - eor r6,r9,r6,lsl#8 - and r9,lr,r2 - ldrb r7,[r10,r7,lsl#2] @ Te4[s2>>8] - eor r1,r4,r1,lsl#24 - ldrb r8,[r10,r8,lsl#2] @ Te4[s2>>16] - mov r2,r2,lsr#24 - - ldrb r9,[r10,r9,lsl#2] @ Te4[s2>>0] - eor r0,r7,r0,lsl#8 - ldrb r2,[r10,r2,lsl#2] @ Te4[s2>>24] - and r7,lr,r3 @ i0 - eor r1,r1,r8,lsl#16 - and r8,lr,r3,lsr#8 @ i1 - eor r6,r9,r6,lsl#8 - and r9,lr,r3,lsr#16 @ i2 - ldrb r7,[r10,r7,lsl#2] @ Te4[s3>>0] - eor r2,r5,r2,lsl#24 - ldrb r8,[r10,r8,lsl#2] @ Te4[s3>>8] - mov r3,r3,lsr#24 - - ldrb r9,[r10,r9,lsl#2] @ Te4[s3>>16] - eor r0,r7,r0,lsl#8 - ldr r7,[r11,#0] - ldrb r3,[r10,r3,lsl#2] @ Te4[s3>>24] - eor r1,r1,r8,lsl#8 - ldr r4,[r11,#4] - eor r2,r2,r9,lsl#16 - ldr r5,[r11,#8] - eor r3,r6,r3,lsl#24 - ldr r6,[r11,#12] - - eor r0,r0,r7 - eor r1,r1,r4 - eor r2,r2,r5 - eor r3,r3,r6 - - sub r10,r10,#2 - ldr pc,[sp],#4 @ pop and return -.size _armv4_AES_encrypt,.-_armv4_AES_encrypt - -.globl asm_AES_set_encrypt_key -.hidden asm_AES_set_encrypt_key -.type asm_AES_set_encrypt_key,%function -.align 5 -asm_AES_set_encrypt_key: -_armv4_AES_set_encrypt_key: -#if __ARM_ARCH__<7 - sub r3,pc,#8 @ asm_AES_set_encrypt_key -#else - adr r3,asm_AES_set_encrypt_key -#endif - teq r0,#0 -#if __ARM_ARCH__>=7 - itt eq @ Thumb2 thing, sanity check in ARM -#endif - moveq r0,#-1 - beq .Labrt - teq r2,#0 -#if __ARM_ARCH__>=7 - itt eq @ Thumb2 thing, sanity check in ARM -#endif - moveq r0,#-1 - beq .Labrt - - teq r1,#128 - beq .Lok - teq r1,#192 - beq .Lok - teq r1,#256 -#if __ARM_ARCH__>=7 - itt ne @ Thumb2 thing, sanity check in ARM -#endif - movne r0,#-1 - bne .Labrt - -.Lok: stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} - mov r12,r0 @ inp - mov lr,r1 @ bits - mov r11,r2 @ key - -#ifdef __APPLE__ - adr r10,AES_Te+1024 @ Te4 -#else - sub r10,r3,#_armv4_AES_set_encrypt_key-AES_Te-1024 @ Te4 -#endif - -#if __ARM_ARCH__<7 - ldrb r0,[r12,#3] @ load input data in endian-neutral - ldrb r4,[r12,#2] @ manner... - ldrb r5,[r12,#1] - ldrb r6,[r12,#0] - orr r0,r0,r4,lsl#8 - ldrb r1,[r12,#7] - orr r0,r0,r5,lsl#16 - ldrb r4,[r12,#6] - orr r0,r0,r6,lsl#24 - ldrb r5,[r12,#5] - ldrb r6,[r12,#4] - orr r1,r1,r4,lsl#8 - ldrb r2,[r12,#11] - orr r1,r1,r5,lsl#16 - ldrb r4,[r12,#10] - orr r1,r1,r6,lsl#24 - ldrb r5,[r12,#9] - ldrb r6,[r12,#8] - orr r2,r2,r4,lsl#8 - ldrb r3,[r12,#15] - orr r2,r2,r5,lsl#16 - ldrb r4,[r12,#14] - orr r2,r2,r6,lsl#24 - ldrb r5,[r12,#13] - ldrb r6,[r12,#12] - orr r3,r3,r4,lsl#8 - str r0,[r11],#16 - orr r3,r3,r5,lsl#16 - str r1,[r11,#-12] - orr r3,r3,r6,lsl#24 - str r2,[r11,#-8] - str r3,[r11,#-4] -#else - ldr r0,[r12,#0] - ldr r1,[r12,#4] - ldr r2,[r12,#8] - ldr r3,[r12,#12] -#ifdef __ARMEL__ - rev r0,r0 - rev r1,r1 - rev r2,r2 - rev r3,r3 -#endif - str r0,[r11],#16 - str r1,[r11,#-12] - str r2,[r11,#-8] - str r3,[r11,#-4] -#endif - - teq lr,#128 - bne .Lnot128 - mov r12,#10 - str r12,[r11,#240-16] - add r6,r10,#256 @ rcon - mov lr,#255 - -.L128_loop: - and r5,lr,r3,lsr#24 - and r7,lr,r3,lsr#16 - ldrb r5,[r10,r5] - and r8,lr,r3,lsr#8 - ldrb r7,[r10,r7] - and r9,lr,r3 - ldrb r8,[r10,r8] - orr r5,r5,r7,lsl#24 - ldrb r9,[r10,r9] - orr r5,r5,r8,lsl#16 - ldr r4,[r6],#4 @ rcon[i++] - orr r5,r5,r9,lsl#8 - eor r5,r5,r4 - eor r0,r0,r5 @ rk[4]=rk[0]^... - eor r1,r1,r0 @ rk[5]=rk[1]^rk[4] - str r0,[r11],#16 - eor r2,r2,r1 @ rk[6]=rk[2]^rk[5] - str r1,[r11,#-12] - eor r3,r3,r2 @ rk[7]=rk[3]^rk[6] - str r2,[r11,#-8] - subs r12,r12,#1 - str r3,[r11,#-4] - bne .L128_loop - sub r2,r11,#176 - b .Ldone - -.Lnot128: -#if __ARM_ARCH__<7 - ldrb r8,[r12,#19] - ldrb r4,[r12,#18] - ldrb r5,[r12,#17] - ldrb r6,[r12,#16] - orr r8,r8,r4,lsl#8 - ldrb r9,[r12,#23] - orr r8,r8,r5,lsl#16 - ldrb r4,[r12,#22] - orr r8,r8,r6,lsl#24 - ldrb r5,[r12,#21] - ldrb r6,[r12,#20] - orr r9,r9,r4,lsl#8 - orr r9,r9,r5,lsl#16 - str r8,[r11],#8 - orr r9,r9,r6,lsl#24 - str r9,[r11,#-4] -#else - ldr r8,[r12,#16] - ldr r9,[r12,#20] -#ifdef __ARMEL__ - rev r8,r8 - rev r9,r9 -#endif - str r8,[r11],#8 - str r9,[r11,#-4] -#endif - - teq lr,#192 - bne .Lnot192 - mov r12,#12 - str r12,[r11,#240-24] - add r6,r10,#256 @ rcon - mov lr,#255 - mov r12,#8 - -.L192_loop: - and r5,lr,r9,lsr#24 - and r7,lr,r9,lsr#16 - ldrb r5,[r10,r5] - and r8,lr,r9,lsr#8 - ldrb r7,[r10,r7] - and r9,lr,r9 - ldrb r8,[r10,r8] - orr r5,r5,r7,lsl#24 - ldrb r9,[r10,r9] - orr r5,r5,r8,lsl#16 - ldr r4,[r6],#4 @ rcon[i++] - orr r5,r5,r9,lsl#8 - eor r9,r5,r4 - eor r0,r0,r9 @ rk[6]=rk[0]^... - eor r1,r1,r0 @ rk[7]=rk[1]^rk[6] - str r0,[r11],#24 - eor r2,r2,r1 @ rk[8]=rk[2]^rk[7] - str r1,[r11,#-20] - eor r3,r3,r2 @ rk[9]=rk[3]^rk[8] - str r2,[r11,#-16] - subs r12,r12,#1 - str r3,[r11,#-12] -#if __ARM_ARCH__>=7 - itt eq @ Thumb2 thing, sanity check in ARM -#endif - subeq r2,r11,#216 - beq .Ldone - - ldr r7,[r11,#-32] - ldr r8,[r11,#-28] - eor r7,r7,r3 @ rk[10]=rk[4]^rk[9] - eor r9,r8,r7 @ rk[11]=rk[5]^rk[10] - str r7,[r11,#-8] - str r9,[r11,#-4] - b .L192_loop - -.Lnot192: -#if __ARM_ARCH__<7 - ldrb r8,[r12,#27] - ldrb r4,[r12,#26] - ldrb r5,[r12,#25] - ldrb r6,[r12,#24] - orr r8,r8,r4,lsl#8 - ldrb r9,[r12,#31] - orr r8,r8,r5,lsl#16 - ldrb r4,[r12,#30] - orr r8,r8,r6,lsl#24 - ldrb r5,[r12,#29] - ldrb r6,[r12,#28] - orr r9,r9,r4,lsl#8 - orr r9,r9,r5,lsl#16 - str r8,[r11],#8 - orr r9,r9,r6,lsl#24 - str r9,[r11,#-4] -#else - ldr r8,[r12,#24] - ldr r9,[r12,#28] -#ifdef __ARMEL__ - rev r8,r8 - rev r9,r9 -#endif - str r8,[r11],#8 - str r9,[r11,#-4] -#endif - - mov r12,#14 - str r12,[r11,#240-32] - add r6,r10,#256 @ rcon - mov lr,#255 - mov r12,#7 - -.L256_loop: - and r5,lr,r9,lsr#24 - and r7,lr,r9,lsr#16 - ldrb r5,[r10,r5] - and r8,lr,r9,lsr#8 - ldrb r7,[r10,r7] - and r9,lr,r9 - ldrb r8,[r10,r8] - orr r5,r5,r7,lsl#24 - ldrb r9,[r10,r9] - orr r5,r5,r8,lsl#16 - ldr r4,[r6],#4 @ rcon[i++] - orr r5,r5,r9,lsl#8 - eor r9,r5,r4 - eor r0,r0,r9 @ rk[8]=rk[0]^... - eor r1,r1,r0 @ rk[9]=rk[1]^rk[8] - str r0,[r11],#32 - eor r2,r2,r1 @ rk[10]=rk[2]^rk[9] - str r1,[r11,#-28] - eor r3,r3,r2 @ rk[11]=rk[3]^rk[10] - str r2,[r11,#-24] - subs r12,r12,#1 - str r3,[r11,#-20] -#if __ARM_ARCH__>=7 - itt eq @ Thumb2 thing, sanity check in ARM -#endif - subeq r2,r11,#256 - beq .Ldone - - and r5,lr,r3 - and r7,lr,r3,lsr#8 - ldrb r5,[r10,r5] - and r8,lr,r3,lsr#16 - ldrb r7,[r10,r7] - and r9,lr,r3,lsr#24 - ldrb r8,[r10,r8] - orr r5,r5,r7,lsl#8 - ldrb r9,[r10,r9] - orr r5,r5,r8,lsl#16 - ldr r4,[r11,#-48] - orr r5,r5,r9,lsl#24 - - ldr r7,[r11,#-44] - ldr r8,[r11,#-40] - eor r4,r4,r5 @ rk[12]=rk[4]^... - ldr r9,[r11,#-36] - eor r7,r7,r4 @ rk[13]=rk[5]^rk[12] - str r4,[r11,#-16] - eor r8,r8,r7 @ rk[14]=rk[6]^rk[13] - str r7,[r11,#-12] - eor r9,r9,r8 @ rk[15]=rk[7]^rk[14] - str r8,[r11,#-8] - str r9,[r11,#-4] - b .L256_loop - -.align 2 -.Ldone: mov r0,#0 - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} -.Labrt: -#if __ARM_ARCH__>=5 - bx lr @ .word 0xe12fff1e -#else - tst lr,#1 - moveq pc,lr @ be binary compatible with V4, yet -.word 0xe12fff1e @ interoperable with Thumb ISA:-) -#endif -.size asm_AES_set_encrypt_key,.-asm_AES_set_encrypt_key - -.globl asm_AES_set_decrypt_key -.hidden asm_AES_set_decrypt_key -.type asm_AES_set_decrypt_key,%function -.align 5 -asm_AES_set_decrypt_key: - str lr,[sp,#-4]! @ push lr - bl _armv4_AES_set_encrypt_key - teq r0,#0 - ldr lr,[sp],#4 @ pop lr - bne .Labrt - - mov r0,r2 @ asm_AES_set_encrypt_key preserves r2, - mov r1,r2 @ which is AES_KEY *key - b _armv4_AES_set_enc2dec_key -.size asm_AES_set_decrypt_key,.-asm_AES_set_decrypt_key - -@ void AES_set_enc2dec_key(const AES_KEY *inp,AES_KEY *out) -.globl AES_set_enc2dec_key -.hidden AES_set_enc2dec_key -.type AES_set_enc2dec_key,%function -.align 5 -AES_set_enc2dec_key: -_armv4_AES_set_enc2dec_key: - stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} - - ldr r12,[r0,#240] - mov r7,r0 @ input - add r8,r0,r12,lsl#4 - mov r11,r1 @ ouput - add r10,r1,r12,lsl#4 - str r12,[r1,#240] - -.Linv: ldr r0,[r7],#16 - ldr r1,[r7,#-12] - ldr r2,[r7,#-8] - ldr r3,[r7,#-4] - ldr r4,[r8],#-16 - ldr r5,[r8,#16+4] - ldr r6,[r8,#16+8] - ldr r9,[r8,#16+12] - str r0,[r10],#-16 - str r1,[r10,#16+4] - str r2,[r10,#16+8] - str r3,[r10,#16+12] - str r4,[r11],#16 - str r5,[r11,#-12] - str r6,[r11,#-8] - str r9,[r11,#-4] - teq r7,r8 - bne .Linv - - ldr r0,[r7] - ldr r1,[r7,#4] - ldr r2,[r7,#8] - ldr r3,[r7,#12] - str r0,[r11] - str r1,[r11,#4] - str r2,[r11,#8] - str r3,[r11,#12] - sub r11,r11,r12,lsl#3 - ldr r0,[r11,#16]! @ prefetch tp1 - mov r7,#0x80 - mov r8,#0x1b - orr r7,r7,#0x8000 - orr r8,r8,#0x1b00 - orr r7,r7,r7,lsl#16 - orr r8,r8,r8,lsl#16 - sub r12,r12,#1 - mvn r9,r7 - mov r12,r12,lsl#2 @ (rounds-1)*4 - -.Lmix: and r4,r0,r7 - and r1,r0,r9 - sub r4,r4,r4,lsr#7 - and r4,r4,r8 - eor r1,r4,r1,lsl#1 @ tp2 - - and r4,r1,r7 - and r2,r1,r9 - sub r4,r4,r4,lsr#7 - and r4,r4,r8 - eor r2,r4,r2,lsl#1 @ tp4 - - and r4,r2,r7 - and r3,r2,r9 - sub r4,r4,r4,lsr#7 - and r4,r4,r8 - eor r3,r4,r3,lsl#1 @ tp8 - - eor r4,r1,r2 - eor r5,r0,r3 @ tp9 - eor r4,r4,r3 @ tpe - eor r4,r4,r1,ror#24 - eor r4,r4,r5,ror#24 @ ^= ROTATE(tpb=tp9^tp2,8) - eor r4,r4,r2,ror#16 - eor r4,r4,r5,ror#16 @ ^= ROTATE(tpd=tp9^tp4,16) - eor r4,r4,r5,ror#8 @ ^= ROTATE(tp9,24) - - ldr r0,[r11,#4] @ prefetch tp1 - str r4,[r11],#4 - subs r12,r12,#1 - bne .Lmix - - mov r0,#0 -#if __ARM_ARCH__>=5 - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc} -#else - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} - tst lr,#1 - moveq pc,lr @ be binary compatible with V4, yet -.word 0xe12fff1e @ interoperable with Thumb ISA:-) -#endif -.size AES_set_enc2dec_key,.-AES_set_enc2dec_key - -.type AES_Td,%object -.align 5 -AES_Td: -.word 0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96 -.word 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393 -.word 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25 -.word 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f -.word 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1 -.word 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6 -.word 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da -.word 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844 -.word 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd -.word 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4 -.word 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45 -.word 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94 -.word 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7 -.word 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a -.word 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5 -.word 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c -.word 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1 -.word 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a -.word 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75 -.word 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051 -.word 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46 -.word 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff -.word 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77 -.word 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb -.word 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000 -.word 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e -.word 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927 -.word 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a -.word 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e -.word 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16 -.word 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d -.word 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8 -.word 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd -.word 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34 -.word 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163 -.word 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120 -.word 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d -.word 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0 -.word 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422 -.word 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef -.word 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36 -.word 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4 -.word 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662 -.word 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5 -.word 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3 -.word 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b -.word 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8 -.word 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6 -.word 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6 -.word 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0 -.word 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815 -.word 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f -.word 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df -.word 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f -.word 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e -.word 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713 -.word 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89 -.word 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c -.word 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf -.word 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86 -.word 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f -.word 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541 -.word 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190 -.word 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742 -@ Td4[256] -.byte 0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38 -.byte 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb -.byte 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87 -.byte 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb -.byte 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d -.byte 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e -.byte 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2 -.byte 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25 -.byte 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16 -.byte 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92 -.byte 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda -.byte 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84 -.byte 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a -.byte 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06 -.byte 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02 -.byte 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b -.byte 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea -.byte 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73 -.byte 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85 -.byte 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e -.byte 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89 -.byte 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b -.byte 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20 -.byte 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4 -.byte 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31 -.byte 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f -.byte 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d -.byte 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef -.byte 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0 -.byte 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61 -.byte 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26 -.byte 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d -.size AES_Td,.-AES_Td - -@ void asm_AES_decrypt(const unsigned char *in, unsigned char *out, -@ const AES_KEY *key) { -.globl asm_AES_decrypt -.hidden asm_AES_decrypt -.type asm_AES_decrypt,%function -.align 5 -asm_AES_decrypt: -#if __ARM_ARCH__<7 - sub r3,pc,#8 @ asm_AES_decrypt -#else - adr r3,asm_AES_decrypt -#endif - stmdb sp!,{r1,r4-r12,lr} -#ifdef __APPLE__ - adr r10,AES_Td -#else - sub r10,r3,#asm_AES_decrypt-AES_Td @ Td -#endif - mov r12,r0 @ inp - mov r11,r2 -#if __ARM_ARCH__<7 - ldrb r0,[r12,#3] @ load input data in endian-neutral - ldrb r4,[r12,#2] @ manner... - ldrb r5,[r12,#1] - ldrb r6,[r12,#0] - orr r0,r0,r4,lsl#8 - ldrb r1,[r12,#7] - orr r0,r0,r5,lsl#16 - ldrb r4,[r12,#6] - orr r0,r0,r6,lsl#24 - ldrb r5,[r12,#5] - ldrb r6,[r12,#4] - orr r1,r1,r4,lsl#8 - ldrb r2,[r12,#11] - orr r1,r1,r5,lsl#16 - ldrb r4,[r12,#10] - orr r1,r1,r6,lsl#24 - ldrb r5,[r12,#9] - ldrb r6,[r12,#8] - orr r2,r2,r4,lsl#8 - ldrb r3,[r12,#15] - orr r2,r2,r5,lsl#16 - ldrb r4,[r12,#14] - orr r2,r2,r6,lsl#24 - ldrb r5,[r12,#13] - ldrb r6,[r12,#12] - orr r3,r3,r4,lsl#8 - orr r3,r3,r5,lsl#16 - orr r3,r3,r6,lsl#24 -#else - ldr r0,[r12,#0] - ldr r1,[r12,#4] - ldr r2,[r12,#8] - ldr r3,[r12,#12] -#ifdef __ARMEL__ - rev r0,r0 - rev r1,r1 - rev r2,r2 - rev r3,r3 -#endif -#endif - bl _armv4_AES_decrypt - - ldr r12,[sp],#4 @ pop out -#if __ARM_ARCH__>=7 -#ifdef __ARMEL__ - rev r0,r0 - rev r1,r1 - rev r2,r2 - rev r3,r3 -#endif - str r0,[r12,#0] - str r1,[r12,#4] - str r2,[r12,#8] - str r3,[r12,#12] -#else - mov r4,r0,lsr#24 @ write output in endian-neutral - mov r5,r0,lsr#16 @ manner... - mov r6,r0,lsr#8 - strb r4,[r12,#0] - strb r5,[r12,#1] - mov r4,r1,lsr#24 - strb r6,[r12,#2] - mov r5,r1,lsr#16 - strb r0,[r12,#3] - mov r6,r1,lsr#8 - strb r4,[r12,#4] - strb r5,[r12,#5] - mov r4,r2,lsr#24 - strb r6,[r12,#6] - mov r5,r2,lsr#16 - strb r1,[r12,#7] - mov r6,r2,lsr#8 - strb r4,[r12,#8] - strb r5,[r12,#9] - mov r4,r3,lsr#24 - strb r6,[r12,#10] - mov r5,r3,lsr#16 - strb r2,[r12,#11] - mov r6,r3,lsr#8 - strb r4,[r12,#12] - strb r5,[r12,#13] - strb r6,[r12,#14] - strb r3,[r12,#15] -#endif -#if __ARM_ARCH__>=5 - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc} -#else - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} - tst lr,#1 - moveq pc,lr @ be binary compatible with V4, yet -.word 0xe12fff1e @ interoperable with Thumb ISA:-) -#endif -.size asm_AES_decrypt,.-asm_AES_decrypt - -.type _armv4_AES_decrypt,%function -.align 2 -_armv4_AES_decrypt: - str lr,[sp,#-4]! @ push lr - ldmia r11!,{r4,r5,r6,r7} - eor r0,r0,r4 - ldr r12,[r11,#240-16] - eor r1,r1,r5 - eor r2,r2,r6 - eor r3,r3,r7 - sub r12,r12,#1 - mov lr,#255 - - and r7,lr,r0,lsr#16 - and r8,lr,r0,lsr#8 - and r9,lr,r0 - mov r0,r0,lsr#24 -.Ldec_loop: - ldr r4,[r10,r7,lsl#2] @ Td1[s0>>16] - and r7,lr,r1 @ i0 - ldr r5,[r10,r8,lsl#2] @ Td2[s0>>8] - and r8,lr,r1,lsr#16 - ldr r6,[r10,r9,lsl#2] @ Td3[s0>>0] - and r9,lr,r1,lsr#8 - ldr r0,[r10,r0,lsl#2] @ Td0[s0>>24] - mov r1,r1,lsr#24 - - ldr r7,[r10,r7,lsl#2] @ Td3[s1>>0] - ldr r8,[r10,r8,lsl#2] @ Td1[s1>>16] - ldr r9,[r10,r9,lsl#2] @ Td2[s1>>8] - eor r0,r0,r7,ror#24 - ldr r1,[r10,r1,lsl#2] @ Td0[s1>>24] - and r7,lr,r2,lsr#8 @ i0 - eor r5,r8,r5,ror#8 - and r8,lr,r2 @ i1 - eor r6,r9,r6,ror#8 - and r9,lr,r2,lsr#16 - ldr r7,[r10,r7,lsl#2] @ Td2[s2>>8] - eor r1,r1,r4,ror#8 - ldr r8,[r10,r8,lsl#2] @ Td3[s2>>0] - mov r2,r2,lsr#24 - - ldr r9,[r10,r9,lsl#2] @ Td1[s2>>16] - eor r0,r0,r7,ror#16 - ldr r2,[r10,r2,lsl#2] @ Td0[s2>>24] - and r7,lr,r3,lsr#16 @ i0 - eor r1,r1,r8,ror#24 - and r8,lr,r3,lsr#8 @ i1 - eor r6,r9,r6,ror#8 - and r9,lr,r3 @ i2 - ldr r7,[r10,r7,lsl#2] @ Td1[s3>>16] - eor r2,r2,r5,ror#8 - ldr r8,[r10,r8,lsl#2] @ Td2[s3>>8] - mov r3,r3,lsr#24 - - ldr r9,[r10,r9,lsl#2] @ Td3[s3>>0] - eor r0,r0,r7,ror#8 - ldr r7,[r11],#16 - eor r1,r1,r8,ror#16 - ldr r3,[r10,r3,lsl#2] @ Td0[s3>>24] - eor r2,r2,r9,ror#24 - - ldr r4,[r11,#-12] - eor r0,r0,r7 - ldr r5,[r11,#-8] - eor r3,r3,r6,ror#8 - ldr r6,[r11,#-4] - and r7,lr,r0,lsr#16 - eor r1,r1,r4 - and r8,lr,r0,lsr#8 - eor r2,r2,r5 - and r9,lr,r0 - eor r3,r3,r6 - mov r0,r0,lsr#24 - - subs r12,r12,#1 - bne .Ldec_loop - - add r10,r10,#1024 - - ldr r5,[r10,#0] @ prefetch Td4 - ldr r6,[r10,#32] - ldr r4,[r10,#64] - ldr r5,[r10,#96] - ldr r6,[r10,#128] - ldr r4,[r10,#160] - ldr r5,[r10,#192] - ldr r6,[r10,#224] - - ldrb r0,[r10,r0] @ Td4[s0>>24] - ldrb r4,[r10,r7] @ Td4[s0>>16] - and r7,lr,r1 @ i0 - ldrb r5,[r10,r8] @ Td4[s0>>8] - and r8,lr,r1,lsr#16 - ldrb r6,[r10,r9] @ Td4[s0>>0] - and r9,lr,r1,lsr#8 - - add r1,r10,r1,lsr#24 - ldrb r7,[r10,r7] @ Td4[s1>>0] - ldrb r1,[r1] @ Td4[s1>>24] - ldrb r8,[r10,r8] @ Td4[s1>>16] - eor r0,r7,r0,lsl#24 - ldrb r9,[r10,r9] @ Td4[s1>>8] - eor r1,r4,r1,lsl#8 - and r7,lr,r2,lsr#8 @ i0 - eor r5,r5,r8,lsl#8 - and r8,lr,r2 @ i1 - ldrb r7,[r10,r7] @ Td4[s2>>8] - eor r6,r6,r9,lsl#8 - ldrb r8,[r10,r8] @ Td4[s2>>0] - and r9,lr,r2,lsr#16 - - add r2,r10,r2,lsr#24 - ldrb r2,[r2] @ Td4[s2>>24] - eor r0,r0,r7,lsl#8 - ldrb r9,[r10,r9] @ Td4[s2>>16] - eor r1,r8,r1,lsl#16 - and r7,lr,r3,lsr#16 @ i0 - eor r2,r5,r2,lsl#16 - and r8,lr,r3,lsr#8 @ i1 - ldrb r7,[r10,r7] @ Td4[s3>>16] - eor r6,r6,r9,lsl#16 - ldrb r8,[r10,r8] @ Td4[s3>>8] - and r9,lr,r3 @ i2 - - add r3,r10,r3,lsr#24 - ldrb r9,[r10,r9] @ Td4[s3>>0] - ldrb r3,[r3] @ Td4[s3>>24] - eor r0,r0,r7,lsl#16 - ldr r7,[r11,#0] - eor r1,r1,r8,lsl#8 - ldr r4,[r11,#4] - eor r2,r9,r2,lsl#8 - ldr r5,[r11,#8] - eor r3,r6,r3,lsl#24 - ldr r6,[r11,#12] - - eor r0,r0,r7 - eor r1,r1,r4 - eor r2,r2,r5 - eor r3,r3,r6 - - sub r10,r10,#1024 - ldr pc,[sp],#4 @ pop and return -.size _armv4_AES_decrypt,.-_armv4_AES_decrypt -.byte 65,69,83,32,102,111,114,32,65,82,77,118,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 2 -.align 2 - -#endif -#endif \ No newline at end of file diff --git a/third_party/boringssl/linux-arm/crypto/aes/aesv8-armx32.S b/third_party/boringssl/linux-arm/crypto/aes/aesv8-armx32.S deleted file mode 100644 index 6f0ee7d81da9e..0000000000000 --- a/third_party/boringssl/linux-arm/crypto/aes/aesv8-armx32.S +++ /dev/null @@ -1,756 +0,0 @@ -#if defined(__arm__) -#include "arm_arch.h" - -#if __ARM_MAX_ARCH__>=7 -.text -.arch armv7-a -.fpu neon -.code 32 -.align 5 -.Lrcon: -.long 0x01,0x01,0x01,0x01 -.long 0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d @ rotate-n-splat -.long 0x1b,0x1b,0x1b,0x1b - -.globl aes_v8_set_encrypt_key -.type aes_v8_set_encrypt_key,%function -.align 5 -aes_v8_set_encrypt_key: -.Lenc_key: - mov r3,#-1 - cmp r0,#0 - beq .Lenc_key_abort - cmp r2,#0 - beq .Lenc_key_abort - mov r3,#-2 - cmp r1,#128 - blt .Lenc_key_abort - cmp r1,#256 - bgt .Lenc_key_abort - tst r1,#0x3f - bne .Lenc_key_abort - - adr r3,.Lrcon - cmp r1,#192 - - veor q0,q0,q0 - vld1.8 {q3},[r0]! - mov r1,#8 @ reuse r1 - vld1.32 {q1,q2},[r3]! - - blt .Loop128 - beq .L192 - b .L256 - -.align 4 -.Loop128: - vtbl.8 d20,{q3},d4 - vtbl.8 d21,{q3},d5 - vext.8 q9,q0,q3,#12 - vst1.32 {q3},[r2]! -.byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 - subs r1,r1,#1 - - veor q3,q3,q9 - vext.8 q9,q0,q9,#12 - veor q3,q3,q9 - vext.8 q9,q0,q9,#12 - veor q10,q10,q1 - veor q3,q3,q9 - vshl.u8 q1,q1,#1 - veor q3,q3,q10 - bne .Loop128 - - vld1.32 {q1},[r3] - - vtbl.8 d20,{q3},d4 - vtbl.8 d21,{q3},d5 - vext.8 q9,q0,q3,#12 - vst1.32 {q3},[r2]! -.byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 - - veor q3,q3,q9 - vext.8 q9,q0,q9,#12 - veor q3,q3,q9 - vext.8 q9,q0,q9,#12 - veor q10,q10,q1 - veor q3,q3,q9 - vshl.u8 q1,q1,#1 - veor q3,q3,q10 - - vtbl.8 d20,{q3},d4 - vtbl.8 d21,{q3},d5 - vext.8 q9,q0,q3,#12 - vst1.32 {q3},[r2]! -.byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 - - veor q3,q3,q9 - vext.8 q9,q0,q9,#12 - veor q3,q3,q9 - vext.8 q9,q0,q9,#12 - veor q10,q10,q1 - veor q3,q3,q9 - veor q3,q3,q10 - vst1.32 {q3},[r2] - add r2,r2,#0x50 - - mov r12,#10 - b .Ldone - -.align 4 -.L192: - vld1.8 {d16},[r0]! - vmov.i8 q10,#8 @ borrow q10 - vst1.32 {q3},[r2]! - vsub.i8 q2,q2,q10 @ adjust the mask - -.Loop192: - vtbl.8 d20,{q8},d4 - vtbl.8 d21,{q8},d5 - vext.8 q9,q0,q3,#12 - vst1.32 {d16},[r2]! -.byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 - subs r1,r1,#1 - - veor q3,q3,q9 - vext.8 q9,q0,q9,#12 - veor q3,q3,q9 - vext.8 q9,q0,q9,#12 - veor q3,q3,q9 - - vdup.32 q9,d7[1] - veor q9,q9,q8 - veor q10,q10,q1 - vext.8 q8,q0,q8,#12 - vshl.u8 q1,q1,#1 - veor q8,q8,q9 - veor q3,q3,q10 - veor q8,q8,q10 - vst1.32 {q3},[r2]! - bne .Loop192 - - mov r12,#12 - add r2,r2,#0x20 - b .Ldone - -.align 4 -.L256: - vld1.8 {q8},[r0] - mov r1,#7 - mov r12,#14 - vst1.32 {q3},[r2]! - -.Loop256: - vtbl.8 d20,{q8},d4 - vtbl.8 d21,{q8},d5 - vext.8 q9,q0,q3,#12 - vst1.32 {q8},[r2]! -.byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 - subs r1,r1,#1 - - veor q3,q3,q9 - vext.8 q9,q0,q9,#12 - veor q3,q3,q9 - vext.8 q9,q0,q9,#12 - veor q10,q10,q1 - veor q3,q3,q9 - vshl.u8 q1,q1,#1 - veor q3,q3,q10 - vst1.32 {q3},[r2]! - beq .Ldone - - vdup.32 q10,d7[1] - vext.8 q9,q0,q8,#12 -.byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0 - - veor q8,q8,q9 - vext.8 q9,q0,q9,#12 - veor q8,q8,q9 - vext.8 q9,q0,q9,#12 - veor q8,q8,q9 - - veor q8,q8,q10 - b .Loop256 - -.Ldone: - str r12,[r2] - mov r3,#0 - -.Lenc_key_abort: - mov r0,r3 @ return value - - bx lr -.size aes_v8_set_encrypt_key,.-aes_v8_set_encrypt_key - -.globl aes_v8_set_decrypt_key -.type aes_v8_set_decrypt_key,%function -.align 5 -aes_v8_set_decrypt_key: - stmdb sp!,{r4,lr} - bl .Lenc_key - - cmp r0,#0 - bne .Ldec_key_abort - - sub r2,r2,#240 @ restore original r2 - mov r4,#-16 - add r0,r2,r12,lsl#4 @ end of key schedule - - vld1.32 {q0},[r2] - vld1.32 {q1},[r0] - vst1.32 {q0},[r0],r4 - vst1.32 {q1},[r2]! - -.Loop_imc: - vld1.32 {q0},[r2] - vld1.32 {q1},[r0] -.byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 -.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 - vst1.32 {q0},[r0],r4 - vst1.32 {q1},[r2]! - cmp r0,r2 - bhi .Loop_imc - - vld1.32 {q0},[r2] -.byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 - vst1.32 {q0},[r0] - - eor r0,r0,r0 @ return value -.Ldec_key_abort: - ldmia sp!,{r4,pc} -.size aes_v8_set_decrypt_key,.-aes_v8_set_decrypt_key -.globl aes_v8_encrypt -.type aes_v8_encrypt,%function -.align 5 -aes_v8_encrypt: - ldr r3,[r2,#240] - vld1.32 {q0},[r2]! - vld1.8 {q2},[r0] - sub r3,r3,#2 - vld1.32 {q1},[r2]! - -.Loop_enc: -.byte 0x00,0x43,0xb0,0xf3 @ aese q2,q0 -.byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2 - vld1.32 {q0},[r2]! - subs r3,r3,#2 -.byte 0x02,0x43,0xb0,0xf3 @ aese q2,q1 -.byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2 - vld1.32 {q1},[r2]! - bgt .Loop_enc - -.byte 0x00,0x43,0xb0,0xf3 @ aese q2,q0 -.byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2 - vld1.32 {q0},[r2] -.byte 0x02,0x43,0xb0,0xf3 @ aese q2,q1 - veor q2,q2,q0 - - vst1.8 {q2},[r1] - bx lr -.size aes_v8_encrypt,.-aes_v8_encrypt -.globl aes_v8_decrypt -.type aes_v8_decrypt,%function -.align 5 -aes_v8_decrypt: - ldr r3,[r2,#240] - vld1.32 {q0},[r2]! - vld1.8 {q2},[r0] - sub r3,r3,#2 - vld1.32 {q1},[r2]! - -.Loop_dec: -.byte 0x40,0x43,0xb0,0xf3 @ aesd q2,q0 -.byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2 - vld1.32 {q0},[r2]! - subs r3,r3,#2 -.byte 0x42,0x43,0xb0,0xf3 @ aesd q2,q1 -.byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2 - vld1.32 {q1},[r2]! - bgt .Loop_dec - -.byte 0x40,0x43,0xb0,0xf3 @ aesd q2,q0 -.byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2 - vld1.32 {q0},[r2] -.byte 0x42,0x43,0xb0,0xf3 @ aesd q2,q1 - veor q2,q2,q0 - - vst1.8 {q2},[r1] - bx lr -.size aes_v8_decrypt,.-aes_v8_decrypt -.globl aes_v8_cbc_encrypt -.type aes_v8_cbc_encrypt,%function -.align 5 -aes_v8_cbc_encrypt: - mov ip,sp - stmdb sp!,{r4,r5,r6,r7,r8,lr} - vstmdb sp!,{d8,d9,d10,d11,d12,d13,d14,d15} @ ABI specification says so - ldmia ip,{r4,r5} @ load remaining args - subs r2,r2,#16 - mov r8,#16 - blo .Lcbc_abort - moveq r8,#0 - - cmp r5,#0 @ en- or decrypting? - ldr r5,[r3,#240] - and r2,r2,#-16 - vld1.8 {q6},[r4] - vld1.8 {q0},[r0],r8 - - vld1.32 {q8,q9},[r3] @ load key schedule... - sub r5,r5,#6 - add r7,r3,r5,lsl#4 @ pointer to last 7 round keys - sub r5,r5,#2 - vld1.32 {q10,q11},[r7]! - vld1.32 {q12,q13},[r7]! - vld1.32 {q14,q15},[r7]! - vld1.32 {q7},[r7] - - add r7,r3,#32 - mov r6,r5 - beq .Lcbc_dec - - cmp r5,#2 - veor q0,q0,q6 - veor q5,q8,q7 - beq .Lcbc_enc128 - - vld1.32 {q2,q3},[r7] - add r7,r3,#16 - add r6,r3,#16*4 - add r12,r3,#16*5 -.byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - add r14,r3,#16*6 - add r3,r3,#16*7 - b .Lenter_cbc_enc - -.align 4 -.Loop_cbc_enc: -.byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - vst1.8 {q6},[r1]! -.Lenter_cbc_enc: -.byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 -.byte 0x04,0x03,0xb0,0xf3 @ aese q0,q2 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - vld1.32 {q8},[r6] - cmp r5,#4 -.byte 0x06,0x03,0xb0,0xf3 @ aese q0,q3 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - vld1.32 {q9},[r12] - beq .Lcbc_enc192 - -.byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - vld1.32 {q8},[r14] -.byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - vld1.32 {q9},[r3] - nop - -.Lcbc_enc192: -.byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - subs r2,r2,#16 -.byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - moveq r8,#0 -.byte 0x24,0x03,0xb0,0xf3 @ aese q0,q10 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 -.byte 0x26,0x03,0xb0,0xf3 @ aese q0,q11 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - vld1.8 {q8},[r0],r8 -.byte 0x28,0x03,0xb0,0xf3 @ aese q0,q12 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - veor q8,q8,q5 -.byte 0x2a,0x03,0xb0,0xf3 @ aese q0,q13 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - vld1.32 {q9},[r7] @ re-pre-load rndkey[1] -.byte 0x2c,0x03,0xb0,0xf3 @ aese q0,q14 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 -.byte 0x2e,0x03,0xb0,0xf3 @ aese q0,q15 - veor q6,q0,q7 - bhs .Loop_cbc_enc - - vst1.8 {q6},[r1]! - b .Lcbc_done - -.align 5 -.Lcbc_enc128: - vld1.32 {q2,q3},[r7] -.byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - b .Lenter_cbc_enc128 -.Loop_cbc_enc128: -.byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - vst1.8 {q6},[r1]! -.Lenter_cbc_enc128: -.byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - subs r2,r2,#16 -.byte 0x04,0x03,0xb0,0xf3 @ aese q0,q2 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - moveq r8,#0 -.byte 0x06,0x03,0xb0,0xf3 @ aese q0,q3 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 -.byte 0x24,0x03,0xb0,0xf3 @ aese q0,q10 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 -.byte 0x26,0x03,0xb0,0xf3 @ aese q0,q11 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - vld1.8 {q8},[r0],r8 -.byte 0x28,0x03,0xb0,0xf3 @ aese q0,q12 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 -.byte 0x2a,0x03,0xb0,0xf3 @ aese q0,q13 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 -.byte 0x2c,0x03,0xb0,0xf3 @ aese q0,q14 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 - veor q8,q8,q5 -.byte 0x2e,0x03,0xb0,0xf3 @ aese q0,q15 - veor q6,q0,q7 - bhs .Loop_cbc_enc128 - - vst1.8 {q6},[r1]! - b .Lcbc_done -.align 5 -.Lcbc_dec: - vld1.8 {q10},[r0]! - subs r2,r2,#32 @ bias - add r6,r5,#2 - vorr q3,q0,q0 - vorr q1,q0,q0 - vorr q11,q10,q10 - blo .Lcbc_dec_tail - - vorr q1,q10,q10 - vld1.8 {q10},[r0]! - vorr q2,q0,q0 - vorr q3,q1,q1 - vorr q11,q10,q10 - -.Loop3x_cbc_dec: -.byte 0x60,0x03,0xb0,0xf3 @ aesd q0,q8 -.byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 -.byte 0x60,0x23,0xb0,0xf3 @ aesd q1,q8 -.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 -.byte 0x60,0x43,0xf0,0xf3 @ aesd q10,q8 -.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - vld1.32 {q8},[r7]! - subs r6,r6,#2 -.byte 0x62,0x03,0xb0,0xf3 @ aesd q0,q9 -.byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 -.byte 0x62,0x23,0xb0,0xf3 @ aesd q1,q9 -.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 -.byte 0x62,0x43,0xf0,0xf3 @ aesd q10,q9 -.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - vld1.32 {q9},[r7]! - bgt .Loop3x_cbc_dec - -.byte 0x60,0x03,0xb0,0xf3 @ aesd q0,q8 -.byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 -.byte 0x60,0x23,0xb0,0xf3 @ aesd q1,q8 -.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 -.byte 0x60,0x43,0xf0,0xf3 @ aesd q10,q8 -.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - veor q4,q6,q7 - subs r2,r2,#0x30 - veor q5,q2,q7 - movlo r6,r2 @ r6, r6, is zero at this point -.byte 0x62,0x03,0xb0,0xf3 @ aesd q0,q9 -.byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 -.byte 0x62,0x23,0xb0,0xf3 @ aesd q1,q9 -.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 -.byte 0x62,0x43,0xf0,0xf3 @ aesd q10,q9 -.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - veor q9,q3,q7 - add r0,r0,r6 @ r0 is adjusted in such way that - @ at exit from the loop q1-q10 - @ are loaded with last "words" - vorr q6,q11,q11 - mov r7,r3 -.byte 0x68,0x03,0xb0,0xf3 @ aesd q0,q12 -.byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 -.byte 0x68,0x23,0xb0,0xf3 @ aesd q1,q12 -.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 -.byte 0x68,0x43,0xf0,0xf3 @ aesd q10,q12 -.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - vld1.8 {q2},[r0]! -.byte 0x6a,0x03,0xb0,0xf3 @ aesd q0,q13 -.byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 -.byte 0x6a,0x23,0xb0,0xf3 @ aesd q1,q13 -.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 -.byte 0x6a,0x43,0xf0,0xf3 @ aesd q10,q13 -.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - vld1.8 {q3},[r0]! -.byte 0x6c,0x03,0xb0,0xf3 @ aesd q0,q14 -.byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 -.byte 0x6c,0x23,0xb0,0xf3 @ aesd q1,q14 -.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 -.byte 0x6c,0x43,0xf0,0xf3 @ aesd q10,q14 -.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - vld1.8 {q11},[r0]! -.byte 0x6e,0x03,0xb0,0xf3 @ aesd q0,q15 -.byte 0x6e,0x23,0xb0,0xf3 @ aesd q1,q15 -.byte 0x6e,0x43,0xf0,0xf3 @ aesd q10,q15 - vld1.32 {q8},[r7]! @ re-pre-load rndkey[0] - add r6,r5,#2 - veor q4,q4,q0 - veor q5,q5,q1 - veor q10,q10,q9 - vld1.32 {q9},[r7]! @ re-pre-load rndkey[1] - vst1.8 {q4},[r1]! - vorr q0,q2,q2 - vst1.8 {q5},[r1]! - vorr q1,q3,q3 - vst1.8 {q10},[r1]! - vorr q10,q11,q11 - bhs .Loop3x_cbc_dec - - cmn r2,#0x30 - beq .Lcbc_done - nop - -.Lcbc_dec_tail: -.byte 0x60,0x23,0xb0,0xf3 @ aesd q1,q8 -.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 -.byte 0x60,0x43,0xf0,0xf3 @ aesd q10,q8 -.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - vld1.32 {q8},[r7]! - subs r6,r6,#2 -.byte 0x62,0x23,0xb0,0xf3 @ aesd q1,q9 -.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 -.byte 0x62,0x43,0xf0,0xf3 @ aesd q10,q9 -.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - vld1.32 {q9},[r7]! - bgt .Lcbc_dec_tail - -.byte 0x60,0x23,0xb0,0xf3 @ aesd q1,q8 -.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 -.byte 0x60,0x43,0xf0,0xf3 @ aesd q10,q8 -.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 -.byte 0x62,0x23,0xb0,0xf3 @ aesd q1,q9 -.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 -.byte 0x62,0x43,0xf0,0xf3 @ aesd q10,q9 -.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 -.byte 0x68,0x23,0xb0,0xf3 @ aesd q1,q12 -.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 -.byte 0x68,0x43,0xf0,0xf3 @ aesd q10,q12 -.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - cmn r2,#0x20 -.byte 0x6a,0x23,0xb0,0xf3 @ aesd q1,q13 -.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 -.byte 0x6a,0x43,0xf0,0xf3 @ aesd q10,q13 -.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - veor q5,q6,q7 -.byte 0x6c,0x23,0xb0,0xf3 @ aesd q1,q14 -.byte 0xc2,0x23,0xb0,0xf3 @ aesimc q1,q1 -.byte 0x6c,0x43,0xf0,0xf3 @ aesd q10,q14 -.byte 0xe4,0x43,0xf0,0xf3 @ aesimc q10,q10 - veor q9,q3,q7 -.byte 0x6e,0x23,0xb0,0xf3 @ aesd q1,q15 -.byte 0x6e,0x43,0xf0,0xf3 @ aesd q10,q15 - beq .Lcbc_dec_one - veor q5,q5,q1 - veor q9,q9,q10 - vorr q6,q11,q11 - vst1.8 {q5},[r1]! - vst1.8 {q9},[r1]! - b .Lcbc_done - -.Lcbc_dec_one: - veor q5,q5,q10 - vorr q6,q11,q11 - vst1.8 {q5},[r1]! - -.Lcbc_done: - vst1.8 {q6},[r4] -.Lcbc_abort: - vldmia sp!,{d8,d9,d10,d11,d12,d13,d14,d15} - ldmia sp!,{r4,r5,r6,r7,r8,pc} -.size aes_v8_cbc_encrypt,.-aes_v8_cbc_encrypt -.globl aes_v8_ctr32_encrypt_blocks -.type aes_v8_ctr32_encrypt_blocks,%function -.align 5 -aes_v8_ctr32_encrypt_blocks: - mov ip,sp - stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,lr} - vstmdb sp!,{d8,d9,d10,d11,d12,d13,d14,d15} @ ABI specification says so - ldr r4, [ip] @ load remaining arg - ldr r5,[r3,#240] - - ldr r8, [r4, #12] - vld1.32 {q0},[r4] - - vld1.32 {q8,q9},[r3] @ load key schedule... - sub r5,r5,#4 - mov r12,#16 - cmp r2,#2 - add r7,r3,r5,lsl#4 @ pointer to last 5 round keys - sub r5,r5,#2 - vld1.32 {q12,q13},[r7]! - vld1.32 {q14,q15},[r7]! - vld1.32 {q7},[r7] - add r7,r3,#32 - mov r6,r5 - movlo r12,#0 -#ifndef __ARMEB__ - rev r8, r8 -#endif - vorr q1,q0,q0 - add r10, r8, #1 - vorr q10,q0,q0 - add r8, r8, #2 - vorr q6,q0,q0 - rev r10, r10 - vmov.32 d3[1],r10 - bls .Lctr32_tail - rev r12, r8 - sub r2,r2,#3 @ bias - vmov.32 d21[1],r12 - b .Loop3x_ctr32 - -.align 4 -.Loop3x_ctr32: -.byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 -.byte 0x20,0x23,0xb0,0xf3 @ aese q1,q8 -.byte 0x82,0x23,0xb0,0xf3 @ aesmc q1,q1 -.byte 0x20,0x43,0xf0,0xf3 @ aese q10,q8 -.byte 0xa4,0x43,0xf0,0xf3 @ aesmc q10,q10 - vld1.32 {q8},[r7]! - subs r6,r6,#2 -.byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 -.byte 0x22,0x23,0xb0,0xf3 @ aese q1,q9 -.byte 0x82,0x23,0xb0,0xf3 @ aesmc q1,q1 -.byte 0x22,0x43,0xf0,0xf3 @ aese q10,q9 -.byte 0xa4,0x43,0xf0,0xf3 @ aesmc q10,q10 - vld1.32 {q9},[r7]! - bgt .Loop3x_ctr32 - -.byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 -.byte 0x80,0x83,0xb0,0xf3 @ aesmc q4,q0 -.byte 0x20,0x23,0xb0,0xf3 @ aese q1,q8 -.byte 0x82,0xa3,0xb0,0xf3 @ aesmc q5,q1 - vld1.8 {q2},[r0]! - vorr q0,q6,q6 -.byte 0x20,0x43,0xf0,0xf3 @ aese q10,q8 -.byte 0xa4,0x43,0xf0,0xf3 @ aesmc q10,q10 - vld1.8 {q3},[r0]! - vorr q1,q6,q6 -.byte 0x22,0x83,0xb0,0xf3 @ aese q4,q9 -.byte 0x88,0x83,0xb0,0xf3 @ aesmc q4,q4 -.byte 0x22,0xa3,0xb0,0xf3 @ aese q5,q9 -.byte 0x8a,0xa3,0xb0,0xf3 @ aesmc q5,q5 - vld1.8 {q11},[r0]! - mov r7,r3 -.byte 0x22,0x43,0xf0,0xf3 @ aese q10,q9 -.byte 0xa4,0x23,0xf0,0xf3 @ aesmc q9,q10 - vorr q10,q6,q6 - add r9,r8,#1 -.byte 0x28,0x83,0xb0,0xf3 @ aese q4,q12 -.byte 0x88,0x83,0xb0,0xf3 @ aesmc q4,q4 -.byte 0x28,0xa3,0xb0,0xf3 @ aese q5,q12 -.byte 0x8a,0xa3,0xb0,0xf3 @ aesmc q5,q5 - veor q2,q2,q7 - add r10,r8,#2 -.byte 0x28,0x23,0xf0,0xf3 @ aese q9,q12 -.byte 0xa2,0x23,0xf0,0xf3 @ aesmc q9,q9 - veor q3,q3,q7 - add r8,r8,#3 -.byte 0x2a,0x83,0xb0,0xf3 @ aese q4,q13 -.byte 0x88,0x83,0xb0,0xf3 @ aesmc q4,q4 -.byte 0x2a,0xa3,0xb0,0xf3 @ aese q5,q13 -.byte 0x8a,0xa3,0xb0,0xf3 @ aesmc q5,q5 - veor q11,q11,q7 - rev r9,r9 -.byte 0x2a,0x23,0xf0,0xf3 @ aese q9,q13 -.byte 0xa2,0x23,0xf0,0xf3 @ aesmc q9,q9 - vmov.32 d1[1], r9 - rev r10,r10 -.byte 0x2c,0x83,0xb0,0xf3 @ aese q4,q14 -.byte 0x88,0x83,0xb0,0xf3 @ aesmc q4,q4 -.byte 0x2c,0xa3,0xb0,0xf3 @ aese q5,q14 -.byte 0x8a,0xa3,0xb0,0xf3 @ aesmc q5,q5 - vmov.32 d3[1], r10 - rev r12,r8 -.byte 0x2c,0x23,0xf0,0xf3 @ aese q9,q14 -.byte 0xa2,0x23,0xf0,0xf3 @ aesmc q9,q9 - vmov.32 d21[1], r12 - subs r2,r2,#3 -.byte 0x2e,0x83,0xb0,0xf3 @ aese q4,q15 -.byte 0x2e,0xa3,0xb0,0xf3 @ aese q5,q15 -.byte 0x2e,0x23,0xf0,0xf3 @ aese q9,q15 - - veor q2,q2,q4 - vld1.32 {q8},[r7]! @ re-pre-load rndkey[0] - vst1.8 {q2},[r1]! - veor q3,q3,q5 - mov r6,r5 - vst1.8 {q3},[r1]! - veor q11,q11,q9 - vld1.32 {q9},[r7]! @ re-pre-load rndkey[1] - vst1.8 {q11},[r1]! - bhs .Loop3x_ctr32 - - adds r2,r2,#3 - beq .Lctr32_done - cmp r2,#1 - mov r12,#16 - moveq r12,#0 - -.Lctr32_tail: -.byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 -.byte 0x20,0x23,0xb0,0xf3 @ aese q1,q8 -.byte 0x82,0x23,0xb0,0xf3 @ aesmc q1,q1 - vld1.32 {q8},[r7]! - subs r6,r6,#2 -.byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 -.byte 0x22,0x23,0xb0,0xf3 @ aese q1,q9 -.byte 0x82,0x23,0xb0,0xf3 @ aesmc q1,q1 - vld1.32 {q9},[r7]! - bgt .Lctr32_tail - -.byte 0x20,0x03,0xb0,0xf3 @ aese q0,q8 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 -.byte 0x20,0x23,0xb0,0xf3 @ aese q1,q8 -.byte 0x82,0x23,0xb0,0xf3 @ aesmc q1,q1 -.byte 0x22,0x03,0xb0,0xf3 @ aese q0,q9 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 -.byte 0x22,0x23,0xb0,0xf3 @ aese q1,q9 -.byte 0x82,0x23,0xb0,0xf3 @ aesmc q1,q1 - vld1.8 {q2},[r0],r12 -.byte 0x28,0x03,0xb0,0xf3 @ aese q0,q12 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 -.byte 0x28,0x23,0xb0,0xf3 @ aese q1,q12 -.byte 0x82,0x23,0xb0,0xf3 @ aesmc q1,q1 - vld1.8 {q3},[r0] -.byte 0x2a,0x03,0xb0,0xf3 @ aese q0,q13 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 -.byte 0x2a,0x23,0xb0,0xf3 @ aese q1,q13 -.byte 0x82,0x23,0xb0,0xf3 @ aesmc q1,q1 - veor q2,q2,q7 -.byte 0x2c,0x03,0xb0,0xf3 @ aese q0,q14 -.byte 0x80,0x03,0xb0,0xf3 @ aesmc q0,q0 -.byte 0x2c,0x23,0xb0,0xf3 @ aese q1,q14 -.byte 0x82,0x23,0xb0,0xf3 @ aesmc q1,q1 - veor q3,q3,q7 -.byte 0x2e,0x03,0xb0,0xf3 @ aese q0,q15 -.byte 0x2e,0x23,0xb0,0xf3 @ aese q1,q15 - - cmp r2,#1 - veor q2,q2,q0 - veor q3,q3,q1 - vst1.8 {q2},[r1]! - beq .Lctr32_done - vst1.8 {q3},[r1] - -.Lctr32_done: - vldmia sp!,{d8,d9,d10,d11,d12,d13,d14,d15} - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,pc} -.size aes_v8_ctr32_encrypt_blocks,.-aes_v8_ctr32_encrypt_blocks -#endif -#endif \ No newline at end of file diff --git a/third_party/boringssl/linux-arm/crypto/aes/bsaes-armv7.S b/third_party/boringssl/linux-arm/crypto/aes/bsaes-armv7.S deleted file mode 100644 index dd84f3589ddda..0000000000000 --- a/third_party/boringssl/linux-arm/crypto/aes/bsaes-armv7.S +++ /dev/null @@ -1,2579 +0,0 @@ -#if defined(__arm__) - -@ ==================================================================== -@ Written by Andy Polyakov for the OpenSSL -@ project. The module is, however, dual licensed under OpenSSL and -@ CRYPTOGAMS licenses depending on where you obtain it. For further -@ details see http://www.openssl.org/~appro/cryptogams/. -@ -@ Specific modes and adaptation for Linux kernel by Ard Biesheuvel -@ . Permission to use under GPL terms is -@ granted. -@ ==================================================================== - -@ Bit-sliced AES for ARM NEON -@ -@ February 2012. -@ -@ This implementation is direct adaptation of bsaes-x86_64 module for -@ ARM NEON. Except that this module is endian-neutral [in sense that -@ it can be compiled for either endianness] by courtesy of vld1.8's -@ neutrality. Initial version doesn't implement interface to OpenSSL, -@ only low-level primitives and unsupported entry points, just enough -@ to collect performance results, which for Cortex-A8 core are: -@ -@ encrypt 19.5 cycles per byte processed with 128-bit key -@ decrypt 22.1 cycles per byte processed with 128-bit key -@ key conv. 440 cycles per 128-bit key/0.18 of 8x block -@ -@ Snapdragon S4 encrypts byte in 17.6 cycles and decrypts in 19.7, -@ which is [much] worse than anticipated (for further details see -@ http://www.openssl.org/~appro/Snapdragon-S4.html). -@ -@ Cortex-A15 manages in 14.2/16.1 cycles [when integer-only code -@ manages in 20.0 cycles]. -@ -@ When comparing to x86_64 results keep in mind that NEON unit is -@ [mostly] single-issue and thus can't [fully] benefit from -@ instruction-level parallelism. And when comparing to aes-armv4 -@ results keep in mind key schedule conversion overhead (see -@ bsaes-x86_64.pl for further details)... -@ -@ - -@ April-August 2013 -@ -@ Add CBC, CTR and XTS subroutines, adapt for kernel use. -@ -@ - -#if defined(__arm__) -#ifndef __KERNEL__ -# include "arm_arch.h" - -# define VFP_ABI_PUSH vstmdb sp!,{d8-d15} -# define VFP_ABI_POP vldmia sp!,{d8-d15} -# define VFP_ABI_FRAME 0x40 -#else -# define VFP_ABI_PUSH -# define VFP_ABI_POP -# define VFP_ABI_FRAME 0 -# define BSAES_ASM_EXTENDED_KEY -# define XTS_CHAIN_TWEAK -# define __ARM_ARCH__ __LINUX_ARM_ARCH__ -# define __ARM_MAX_ARCH__ 7 -#endif - -#ifdef __thumb__ -# define adrl adr -#endif - -#if __ARM_MAX_ARCH__>=7 -.arch armv7-a -.fpu neon - -.text -.syntax unified @ ARMv7-capable assembler is expected to handle this -#if defined(__thumb2__) && !defined(__APPLE__) -.thumb -#else -.code 32 -#endif - -.type _bsaes_decrypt8,%function -.align 4 -_bsaes_decrypt8: - adr r6,_bsaes_decrypt8 - vldmia r4!, {q9} @ round 0 key -#ifdef __APPLE__ - adr r6,.LM0ISR -#else - add r6,r6,#.LM0ISR-_bsaes_decrypt8 -#endif - - vldmia r6!, {q8} @ .LM0ISR - veor q10, q0, q9 @ xor with round0 key - veor q11, q1, q9 - vtbl.8 d0, {q10}, d16 - vtbl.8 d1, {q10}, d17 - veor q12, q2, q9 - vtbl.8 d2, {q11}, d16 - vtbl.8 d3, {q11}, d17 - veor q13, q3, q9 - vtbl.8 d4, {q12}, d16 - vtbl.8 d5, {q12}, d17 - veor q14, q4, q9 - vtbl.8 d6, {q13}, d16 - vtbl.8 d7, {q13}, d17 - veor q15, q5, q9 - vtbl.8 d8, {q14}, d16 - vtbl.8 d9, {q14}, d17 - veor q10, q6, q9 - vtbl.8 d10, {q15}, d16 - vtbl.8 d11, {q15}, d17 - veor q11, q7, q9 - vtbl.8 d12, {q10}, d16 - vtbl.8 d13, {q10}, d17 - vtbl.8 d14, {q11}, d16 - vtbl.8 d15, {q11}, d17 - vmov.i8 q8,#0x55 @ compose .LBS0 - vmov.i8 q9,#0x33 @ compose .LBS1 - vshr.u64 q10, q6, #1 - vshr.u64 q11, q4, #1 - veor q10, q10, q7 - veor q11, q11, q5 - vand q10, q10, q8 - vand q11, q11, q8 - veor q7, q7, q10 - vshl.u64 q10, q10, #1 - veor q5, q5, q11 - vshl.u64 q11, q11, #1 - veor q6, q6, q10 - veor q4, q4, q11 - vshr.u64 q10, q2, #1 - vshr.u64 q11, q0, #1 - veor q10, q10, q3 - veor q11, q11, q1 - vand q10, q10, q8 - vand q11, q11, q8 - veor q3, q3, q10 - vshl.u64 q10, q10, #1 - veor q1, q1, q11 - vshl.u64 q11, q11, #1 - veor q2, q2, q10 - veor q0, q0, q11 - vmov.i8 q8,#0x0f @ compose .LBS2 - vshr.u64 q10, q5, #2 - vshr.u64 q11, q4, #2 - veor q10, q10, q7 - veor q11, q11, q6 - vand q10, q10, q9 - vand q11, q11, q9 - veor q7, q7, q10 - vshl.u64 q10, q10, #2 - veor q6, q6, q11 - vshl.u64 q11, q11, #2 - veor q5, q5, q10 - veor q4, q4, q11 - vshr.u64 q10, q1, #2 - vshr.u64 q11, q0, #2 - veor q10, q10, q3 - veor q11, q11, q2 - vand q10, q10, q9 - vand q11, q11, q9 - veor q3, q3, q10 - vshl.u64 q10, q10, #2 - veor q2, q2, q11 - vshl.u64 q11, q11, #2 - veor q1, q1, q10 - veor q0, q0, q11 - vshr.u64 q10, q3, #4 - vshr.u64 q11, q2, #4 - veor q10, q10, q7 - veor q11, q11, q6 - vand q10, q10, q8 - vand q11, q11, q8 - veor q7, q7, q10 - vshl.u64 q10, q10, #4 - veor q6, q6, q11 - vshl.u64 q11, q11, #4 - veor q3, q3, q10 - veor q2, q2, q11 - vshr.u64 q10, q1, #4 - vshr.u64 q11, q0, #4 - veor q10, q10, q5 - veor q11, q11, q4 - vand q10, q10, q8 - vand q11, q11, q8 - veor q5, q5, q10 - vshl.u64 q10, q10, #4 - veor q4, q4, q11 - vshl.u64 q11, q11, #4 - veor q1, q1, q10 - veor q0, q0, q11 - sub r5,r5,#1 - b .Ldec_sbox -.align 4 -.Ldec_loop: - vldmia r4!, {q8,q9,q10,q11} - veor q8, q8, q0 - veor q9, q9, q1 - vtbl.8 d0, {q8}, d24 - vtbl.8 d1, {q8}, d25 - vldmia r4!, {q8} - veor q10, q10, q2 - vtbl.8 d2, {q9}, d24 - vtbl.8 d3, {q9}, d25 - vldmia r4!, {q9} - veor q11, q11, q3 - vtbl.8 d4, {q10}, d24 - vtbl.8 d5, {q10}, d25 - vldmia r4!, {q10} - vtbl.8 d6, {q11}, d24 - vtbl.8 d7, {q11}, d25 - vldmia r4!, {q11} - veor q8, q8, q4 - veor q9, q9, q5 - vtbl.8 d8, {q8}, d24 - vtbl.8 d9, {q8}, d25 - veor q10, q10, q6 - vtbl.8 d10, {q9}, d24 - vtbl.8 d11, {q9}, d25 - veor q11, q11, q7 - vtbl.8 d12, {q10}, d24 - vtbl.8 d13, {q10}, d25 - vtbl.8 d14, {q11}, d24 - vtbl.8 d15, {q11}, d25 -.Ldec_sbox: - veor q1, q1, q4 - veor q3, q3, q4 - - veor q4, q4, q7 - veor q1, q1, q6 - veor q2, q2, q7 - veor q6, q6, q4 - - veor q0, q0, q1 - veor q2, q2, q5 - veor q7, q7, q6 - veor q3, q3, q0 - veor q5, q5, q0 - veor q1, q1, q3 - veor q11, q3, q0 - veor q10, q7, q4 - veor q9, q1, q6 - veor q13, q4, q0 - vmov q8, q10 - veor q12, q5, q2 - - vorr q10, q10, q9 - veor q15, q11, q8 - vand q14, q11, q12 - vorr q11, q11, q12 - veor q12, q12, q9 - vand q8, q8, q9 - veor q9, q6, q2 - vand q15, q15, q12 - vand q13, q13, q9 - veor q9, q3, q7 - veor q12, q1, q5 - veor q11, q11, q13 - veor q10, q10, q13 - vand q13, q9, q12 - vorr q9, q9, q12 - veor q11, q11, q15 - veor q8, q8, q13 - veor q10, q10, q14 - veor q9, q9, q15 - veor q8, q8, q14 - vand q12, q4, q6 - veor q9, q9, q14 - vand q13, q0, q2 - vand q14, q7, q1 - vorr q15, q3, q5 - veor q11, q11, q12 - veor q9, q9, q14 - veor q8, q8, q15 - veor q10, q10, q13 - - @ Inv_GF16 0, 1, 2, 3, s0, s1, s2, s3 - - @ new smaller inversion - - vand q14, q11, q9 - vmov q12, q8 - - veor q13, q10, q14 - veor q15, q8, q14 - veor q14, q8, q14 @ q14=q15 - - vbsl q13, q9, q8 - vbsl q15, q11, q10 - veor q11, q11, q10 - - vbsl q12, q13, q14 - vbsl q8, q14, q13 - - vand q14, q12, q15 - veor q9, q9, q8 - - veor q14, q14, q11 - veor q12, q5, q2 - veor q8, q1, q6 - veor q10, q15, q14 - vand q10, q10, q5 - veor q5, q5, q1 - vand q11, q1, q15 - vand q5, q5, q14 - veor q1, q11, q10 - veor q5, q5, q11 - veor q15, q15, q13 - veor q14, q14, q9 - veor q11, q15, q14 - veor q10, q13, q9 - vand q11, q11, q12 - vand q10, q10, q2 - veor q12, q12, q8 - veor q2, q2, q6 - vand q8, q8, q15 - vand q6, q6, q13 - vand q12, q12, q14 - vand q2, q2, q9 - veor q8, q8, q12 - veor q2, q2, q6 - veor q12, q12, q11 - veor q6, q6, q10 - veor q5, q5, q12 - veor q2, q2, q12 - veor q1, q1, q8 - veor q6, q6, q8 - - veor q12, q3, q0 - veor q8, q7, q4 - veor q11, q15, q14 - veor q10, q13, q9 - vand q11, q11, q12 - vand q10, q10, q0 - veor q12, q12, q8 - veor q0, q0, q4 - vand q8, q8, q15 - vand q4, q4, q13 - vand q12, q12, q14 - vand q0, q0, q9 - veor q8, q8, q12 - veor q0, q0, q4 - veor q12, q12, q11 - veor q4, q4, q10 - veor q15, q15, q13 - veor q14, q14, q9 - veor q10, q15, q14 - vand q10, q10, q3 - veor q3, q3, q7 - vand q11, q7, q15 - vand q3, q3, q14 - veor q7, q11, q10 - veor q3, q3, q11 - veor q3, q3, q12 - veor q0, q0, q12 - veor q7, q7, q8 - veor q4, q4, q8 - veor q1, q1, q7 - veor q6, q6, q5 - - veor q4, q4, q1 - veor q2, q2, q7 - veor q5, q5, q7 - veor q4, q4, q2 - veor q7, q7, q0 - veor q4, q4, q5 - veor q3, q3, q6 - veor q6, q6, q1 - veor q3, q3, q4 - - veor q4, q4, q0 - veor q7, q7, q3 - subs r5,r5,#1 - bcc .Ldec_done - @ multiplication by 0x05-0x00-0x04-0x00 - vext.8 q8, q0, q0, #8 - vext.8 q14, q3, q3, #8 - vext.8 q15, q5, q5, #8 - veor q8, q8, q0 - vext.8 q9, q1, q1, #8 - veor q14, q14, q3 - vext.8 q10, q6, q6, #8 - veor q15, q15, q5 - vext.8 q11, q4, q4, #8 - veor q9, q9, q1 - vext.8 q12, q2, q2, #8 - veor q10, q10, q6 - vext.8 q13, q7, q7, #8 - veor q11, q11, q4 - veor q12, q12, q2 - veor q13, q13, q7 - - veor q0, q0, q14 - veor q1, q1, q14 - veor q6, q6, q8 - veor q2, q2, q10 - veor q4, q4, q9 - veor q1, q1, q15 - veor q6, q6, q15 - veor q2, q2, q14 - veor q7, q7, q11 - veor q4, q4, q14 - veor q3, q3, q12 - veor q2, q2, q15 - veor q7, q7, q15 - veor q5, q5, q13 - vext.8 q8, q0, q0, #12 @ x0 <<< 32 - vext.8 q9, q1, q1, #12 - veor q0, q0, q8 @ x0 ^ (x0 <<< 32) - vext.8 q10, q6, q6, #12 - veor q1, q1, q9 - vext.8 q11, q4, q4, #12 - veor q6, q6, q10 - vext.8 q12, q2, q2, #12 - veor q4, q4, q11 - vext.8 q13, q7, q7, #12 - veor q2, q2, q12 - vext.8 q14, q3, q3, #12 - veor q7, q7, q13 - vext.8 q15, q5, q5, #12 - veor q3, q3, q14 - - veor q9, q9, q0 - veor q5, q5, q15 - vext.8 q0, q0, q0, #8 @ (x0 ^ (x0 <<< 32)) <<< 64) - veor q10, q10, q1 - veor q8, q8, q5 - veor q9, q9, q5 - vext.8 q1, q1, q1, #8 - veor q13, q13, q2 - veor q0, q0, q8 - veor q14, q14, q7 - veor q1, q1, q9 - vext.8 q8, q2, q2, #8 - veor q12, q12, q4 - vext.8 q9, q7, q7, #8 - veor q15, q15, q3 - vext.8 q2, q4, q4, #8 - veor q11, q11, q6 - vext.8 q7, q5, q5, #8 - veor q12, q12, q5 - vext.8 q4, q3, q3, #8 - veor q11, q11, q5 - vext.8 q3, q6, q6, #8 - veor q5, q9, q13 - veor q11, q11, q2 - veor q7, q7, q15 - veor q6, q4, q14 - veor q4, q8, q12 - veor q2, q3, q10 - vmov q3, q11 - @ vmov q5, q9 - vldmia r6, {q12} @ .LISR - ite eq @ Thumb2 thing, sanity check in ARM - addeq r6,r6,#0x10 - bne .Ldec_loop - vldmia r6, {q12} @ .LISRM0 - b .Ldec_loop -.align 4 -.Ldec_done: - vmov.i8 q8,#0x55 @ compose .LBS0 - vmov.i8 q9,#0x33 @ compose .LBS1 - vshr.u64 q10, q3, #1 - vshr.u64 q11, q2, #1 - veor q10, q10, q5 - veor q11, q11, q7 - vand q10, q10, q8 - vand q11, q11, q8 - veor q5, q5, q10 - vshl.u64 q10, q10, #1 - veor q7, q7, q11 - vshl.u64 q11, q11, #1 - veor q3, q3, q10 - veor q2, q2, q11 - vshr.u64 q10, q6, #1 - vshr.u64 q11, q0, #1 - veor q10, q10, q4 - veor q11, q11, q1 - vand q10, q10, q8 - vand q11, q11, q8 - veor q4, q4, q10 - vshl.u64 q10, q10, #1 - veor q1, q1, q11 - vshl.u64 q11, q11, #1 - veor q6, q6, q10 - veor q0, q0, q11 - vmov.i8 q8,#0x0f @ compose .LBS2 - vshr.u64 q10, q7, #2 - vshr.u64 q11, q2, #2 - veor q10, q10, q5 - veor q11, q11, q3 - vand q10, q10, q9 - vand q11, q11, q9 - veor q5, q5, q10 - vshl.u64 q10, q10, #2 - veor q3, q3, q11 - vshl.u64 q11, q11, #2 - veor q7, q7, q10 - veor q2, q2, q11 - vshr.u64 q10, q1, #2 - vshr.u64 q11, q0, #2 - veor q10, q10, q4 - veor q11, q11, q6 - vand q10, q10, q9 - vand q11, q11, q9 - veor q4, q4, q10 - vshl.u64 q10, q10, #2 - veor q6, q6, q11 - vshl.u64 q11, q11, #2 - veor q1, q1, q10 - veor q0, q0, q11 - vshr.u64 q10, q4, #4 - vshr.u64 q11, q6, #4 - veor q10, q10, q5 - veor q11, q11, q3 - vand q10, q10, q8 - vand q11, q11, q8 - veor q5, q5, q10 - vshl.u64 q10, q10, #4 - veor q3, q3, q11 - vshl.u64 q11, q11, #4 - veor q4, q4, q10 - veor q6, q6, q11 - vshr.u64 q10, q1, #4 - vshr.u64 q11, q0, #4 - veor q10, q10, q7 - veor q11, q11, q2 - vand q10, q10, q8 - vand q11, q11, q8 - veor q7, q7, q10 - vshl.u64 q10, q10, #4 - veor q2, q2, q11 - vshl.u64 q11, q11, #4 - veor q1, q1, q10 - veor q0, q0, q11 - vldmia r4, {q8} @ last round key - veor q6, q6, q8 - veor q4, q4, q8 - veor q2, q2, q8 - veor q7, q7, q8 - veor q3, q3, q8 - veor q5, q5, q8 - veor q0, q0, q8 - veor q1, q1, q8 - bx lr -.size _bsaes_decrypt8,.-_bsaes_decrypt8 - -.type _bsaes_const,%object -.align 6 -_bsaes_const: -.LM0ISR:@ InvShiftRows constants -.quad 0x0a0e0206070b0f03, 0x0004080c0d010509 -.LISR: -.quad 0x0504070602010003, 0x0f0e0d0c080b0a09 -.LISRM0: -.quad 0x01040b0e0205080f, 0x0306090c00070a0d -.LM0SR:@ ShiftRows constants -.quad 0x0a0e02060f03070b, 0x0004080c05090d01 -.LSR: -.quad 0x0504070600030201, 0x0f0e0d0c0a09080b -.LSRM0: -.quad 0x0304090e00050a0f, 0x01060b0c0207080d -.LM0: -.quad 0x02060a0e03070b0f, 0x0004080c0105090d -.LREVM0SR: -.quad 0x090d01050c000408, 0x03070b0f060a0e02 -.byte 66,105,116,45,115,108,105,99,101,100,32,65,69,83,32,102,111,114,32,78,69,79,78,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 2 -.align 6 -.size _bsaes_const,.-_bsaes_const - -.type _bsaes_encrypt8,%function -.align 4 -_bsaes_encrypt8: - adr r6,_bsaes_encrypt8 - vldmia r4!, {q9} @ round 0 key -#ifdef __APPLE__ - adr r6,.LM0SR -#else - sub r6,r6,#_bsaes_encrypt8-.LM0SR -#endif - - vldmia r6!, {q8} @ .LM0SR -_bsaes_encrypt8_alt: - veor q10, q0, q9 @ xor with round0 key - veor q11, q1, q9 - vtbl.8 d0, {q10}, d16 - vtbl.8 d1, {q10}, d17 - veor q12, q2, q9 - vtbl.8 d2, {q11}, d16 - vtbl.8 d3, {q11}, d17 - veor q13, q3, q9 - vtbl.8 d4, {q12}, d16 - vtbl.8 d5, {q12}, d17 - veor q14, q4, q9 - vtbl.8 d6, {q13}, d16 - vtbl.8 d7, {q13}, d17 - veor q15, q5, q9 - vtbl.8 d8, {q14}, d16 - vtbl.8 d9, {q14}, d17 - veor q10, q6, q9 - vtbl.8 d10, {q15}, d16 - vtbl.8 d11, {q15}, d17 - veor q11, q7, q9 - vtbl.8 d12, {q10}, d16 - vtbl.8 d13, {q10}, d17 - vtbl.8 d14, {q11}, d16 - vtbl.8 d15, {q11}, d17 -_bsaes_encrypt8_bitslice: - vmov.i8 q8,#0x55 @ compose .LBS0 - vmov.i8 q9,#0x33 @ compose .LBS1 - vshr.u64 q10, q6, #1 - vshr.u64 q11, q4, #1 - veor q10, q10, q7 - veor q11, q11, q5 - vand q10, q10, q8 - vand q11, q11, q8 - veor q7, q7, q10 - vshl.u64 q10, q10, #1 - veor q5, q5, q11 - vshl.u64 q11, q11, #1 - veor q6, q6, q10 - veor q4, q4, q11 - vshr.u64 q10, q2, #1 - vshr.u64 q11, q0, #1 - veor q10, q10, q3 - veor q11, q11, q1 - vand q10, q10, q8 - vand q11, q11, q8 - veor q3, q3, q10 - vshl.u64 q10, q10, #1 - veor q1, q1, q11 - vshl.u64 q11, q11, #1 - veor q2, q2, q10 - veor q0, q0, q11 - vmov.i8 q8,#0x0f @ compose .LBS2 - vshr.u64 q10, q5, #2 - vshr.u64 q11, q4, #2 - veor q10, q10, q7 - veor q11, q11, q6 - vand q10, q10, q9 - vand q11, q11, q9 - veor q7, q7, q10 - vshl.u64 q10, q10, #2 - veor q6, q6, q11 - vshl.u64 q11, q11, #2 - veor q5, q5, q10 - veor q4, q4, q11 - vshr.u64 q10, q1, #2 - vshr.u64 q11, q0, #2 - veor q10, q10, q3 - veor q11, q11, q2 - vand q10, q10, q9 - vand q11, q11, q9 - veor q3, q3, q10 - vshl.u64 q10, q10, #2 - veor q2, q2, q11 - vshl.u64 q11, q11, #2 - veor q1, q1, q10 - veor q0, q0, q11 - vshr.u64 q10, q3, #4 - vshr.u64 q11, q2, #4 - veor q10, q10, q7 - veor q11, q11, q6 - vand q10, q10, q8 - vand q11, q11, q8 - veor q7, q7, q10 - vshl.u64 q10, q10, #4 - veor q6, q6, q11 - vshl.u64 q11, q11, #4 - veor q3, q3, q10 - veor q2, q2, q11 - vshr.u64 q10, q1, #4 - vshr.u64 q11, q0, #4 - veor q10, q10, q5 - veor q11, q11, q4 - vand q10, q10, q8 - vand q11, q11, q8 - veor q5, q5, q10 - vshl.u64 q10, q10, #4 - veor q4, q4, q11 - vshl.u64 q11, q11, #4 - veor q1, q1, q10 - veor q0, q0, q11 - sub r5,r5,#1 - b .Lenc_sbox -.align 4 -.Lenc_loop: - vldmia r4!, {q8,q9,q10,q11} - veor q8, q8, q0 - veor q9, q9, q1 - vtbl.8 d0, {q8}, d24 - vtbl.8 d1, {q8}, d25 - vldmia r4!, {q8} - veor q10, q10, q2 - vtbl.8 d2, {q9}, d24 - vtbl.8 d3, {q9}, d25 - vldmia r4!, {q9} - veor q11, q11, q3 - vtbl.8 d4, {q10}, d24 - vtbl.8 d5, {q10}, d25 - vldmia r4!, {q10} - vtbl.8 d6, {q11}, d24 - vtbl.8 d7, {q11}, d25 - vldmia r4!, {q11} - veor q8, q8, q4 - veor q9, q9, q5 - vtbl.8 d8, {q8}, d24 - vtbl.8 d9, {q8}, d25 - veor q10, q10, q6 - vtbl.8 d10, {q9}, d24 - vtbl.8 d11, {q9}, d25 - veor q11, q11, q7 - vtbl.8 d12, {q10}, d24 - vtbl.8 d13, {q10}, d25 - vtbl.8 d14, {q11}, d24 - vtbl.8 d15, {q11}, d25 -.Lenc_sbox: - veor q2, q2, q1 - veor q5, q5, q6 - veor q3, q3, q0 - veor q6, q6, q2 - veor q5, q5, q0 - - veor q6, q6, q3 - veor q3, q3, q7 - veor q7, q7, q5 - veor q3, q3, q4 - veor q4, q4, q5 - - veor q2, q2, q7 - veor q3, q3, q1 - veor q1, q1, q5 - veor q11, q7, q4 - veor q10, q1, q2 - veor q9, q5, q3 - veor q13, q2, q4 - vmov q8, q10 - veor q12, q6, q0 - - vorr q10, q10, q9 - veor q15, q11, q8 - vand q14, q11, q12 - vorr q11, q11, q12 - veor q12, q12, q9 - vand q8, q8, q9 - veor q9, q3, q0 - vand q15, q15, q12 - vand q13, q13, q9 - veor q9, q7, q1 - veor q12, q5, q6 - veor q11, q11, q13 - veor q10, q10, q13 - vand q13, q9, q12 - vorr q9, q9, q12 - veor q11, q11, q15 - veor q8, q8, q13 - veor q10, q10, q14 - veor q9, q9, q15 - veor q8, q8, q14 - vand q12, q2, q3 - veor q9, q9, q14 - vand q13, q4, q0 - vand q14, q1, q5 - vorr q15, q7, q6 - veor q11, q11, q12 - veor q9, q9, q14 - veor q8, q8, q15 - veor q10, q10, q13 - - @ Inv_GF16 0, 1, 2, 3, s0, s1, s2, s3 - - @ new smaller inversion - - vand q14, q11, q9 - vmov q12, q8 - - veor q13, q10, q14 - veor q15, q8, q14 - veor q14, q8, q14 @ q14=q15 - - vbsl q13, q9, q8 - vbsl q15, q11, q10 - veor q11, q11, q10 - - vbsl q12, q13, q14 - vbsl q8, q14, q13 - - vand q14, q12, q15 - veor q9, q9, q8 - - veor q14, q14, q11 - veor q12, q6, q0 - veor q8, q5, q3 - veor q10, q15, q14 - vand q10, q10, q6 - veor q6, q6, q5 - vand q11, q5, q15 - vand q6, q6, q14 - veor q5, q11, q10 - veor q6, q6, q11 - veor q15, q15, q13 - veor q14, q14, q9 - veor q11, q15, q14 - veor q10, q13, q9 - vand q11, q11, q12 - vand q10, q10, q0 - veor q12, q12, q8 - veor q0, q0, q3 - vand q8, q8, q15 - vand q3, q3, q13 - vand q12, q12, q14 - vand q0, q0, q9 - veor q8, q8, q12 - veor q0, q0, q3 - veor q12, q12, q11 - veor q3, q3, q10 - veor q6, q6, q12 - veor q0, q0, q12 - veor q5, q5, q8 - veor q3, q3, q8 - - veor q12, q7, q4 - veor q8, q1, q2 - veor q11, q15, q14 - veor q10, q13, q9 - vand q11, q11, q12 - vand q10, q10, q4 - veor q12, q12, q8 - veor q4, q4, q2 - vand q8, q8, q15 - vand q2, q2, q13 - vand q12, q12, q14 - vand q4, q4, q9 - veor q8, q8, q12 - veor q4, q4, q2 - veor q12, q12, q11 - veor q2, q2, q10 - veor q15, q15, q13 - veor q14, q14, q9 - veor q10, q15, q14 - vand q10, q10, q7 - veor q7, q7, q1 - vand q11, q1, q15 - vand q7, q7, q14 - veor q1, q11, q10 - veor q7, q7, q11 - veor q7, q7, q12 - veor q4, q4, q12 - veor q1, q1, q8 - veor q2, q2, q8 - veor q7, q7, q0 - veor q1, q1, q6 - veor q6, q6, q0 - veor q4, q4, q7 - veor q0, q0, q1 - - veor q1, q1, q5 - veor q5, q5, q2 - veor q2, q2, q3 - veor q3, q3, q5 - veor q4, q4, q5 - - veor q6, q6, q3 - subs r5,r5,#1 - bcc .Lenc_done - vext.8 q8, q0, q0, #12 @ x0 <<< 32 - vext.8 q9, q1, q1, #12 - veor q0, q0, q8 @ x0 ^ (x0 <<< 32) - vext.8 q10, q4, q4, #12 - veor q1, q1, q9 - vext.8 q11, q6, q6, #12 - veor q4, q4, q10 - vext.8 q12, q3, q3, #12 - veor q6, q6, q11 - vext.8 q13, q7, q7, #12 - veor q3, q3, q12 - vext.8 q14, q2, q2, #12 - veor q7, q7, q13 - vext.8 q15, q5, q5, #12 - veor q2, q2, q14 - - veor q9, q9, q0 - veor q5, q5, q15 - vext.8 q0, q0, q0, #8 @ (x0 ^ (x0 <<< 32)) <<< 64) - veor q10, q10, q1 - veor q8, q8, q5 - veor q9, q9, q5 - vext.8 q1, q1, q1, #8 - veor q13, q13, q3 - veor q0, q0, q8 - veor q14, q14, q7 - veor q1, q1, q9 - vext.8 q8, q3, q3, #8 - veor q12, q12, q6 - vext.8 q9, q7, q7, #8 - veor q15, q15, q2 - vext.8 q3, q6, q6, #8 - veor q11, q11, q4 - vext.8 q7, q5, q5, #8 - veor q12, q12, q5 - vext.8 q6, q2, q2, #8 - veor q11, q11, q5 - vext.8 q2, q4, q4, #8 - veor q5, q9, q13 - veor q4, q8, q12 - veor q3, q3, q11 - veor q7, q7, q15 - veor q6, q6, q14 - @ vmov q4, q8 - veor q2, q2, q10 - @ vmov q5, q9 - vldmia r6, {q12} @ .LSR - ite eq @ Thumb2 thing, samity check in ARM - addeq r6,r6,#0x10 - bne .Lenc_loop - vldmia r6, {q12} @ .LSRM0 - b .Lenc_loop -.align 4 -.Lenc_done: - vmov.i8 q8,#0x55 @ compose .LBS0 - vmov.i8 q9,#0x33 @ compose .LBS1 - vshr.u64 q10, q2, #1 - vshr.u64 q11, q3, #1 - veor q10, q10, q5 - veor q11, q11, q7 - vand q10, q10, q8 - vand q11, q11, q8 - veor q5, q5, q10 - vshl.u64 q10, q10, #1 - veor q7, q7, q11 - vshl.u64 q11, q11, #1 - veor q2, q2, q10 - veor q3, q3, q11 - vshr.u64 q10, q4, #1 - vshr.u64 q11, q0, #1 - veor q10, q10, q6 - veor q11, q11, q1 - vand q10, q10, q8 - vand q11, q11, q8 - veor q6, q6, q10 - vshl.u64 q10, q10, #1 - veor q1, q1, q11 - vshl.u64 q11, q11, #1 - veor q4, q4, q10 - veor q0, q0, q11 - vmov.i8 q8,#0x0f @ compose .LBS2 - vshr.u64 q10, q7, #2 - vshr.u64 q11, q3, #2 - veor q10, q10, q5 - veor q11, q11, q2 - vand q10, q10, q9 - vand q11, q11, q9 - veor q5, q5, q10 - vshl.u64 q10, q10, #2 - veor q2, q2, q11 - vshl.u64 q11, q11, #2 - veor q7, q7, q10 - veor q3, q3, q11 - vshr.u64 q10, q1, #2 - vshr.u64 q11, q0, #2 - veor q10, q10, q6 - veor q11, q11, q4 - vand q10, q10, q9 - vand q11, q11, q9 - veor q6, q6, q10 - vshl.u64 q10, q10, #2 - veor q4, q4, q11 - vshl.u64 q11, q11, #2 - veor q1, q1, q10 - veor q0, q0, q11 - vshr.u64 q10, q6, #4 - vshr.u64 q11, q4, #4 - veor q10, q10, q5 - veor q11, q11, q2 - vand q10, q10, q8 - vand q11, q11, q8 - veor q5, q5, q10 - vshl.u64 q10, q10, #4 - veor q2, q2, q11 - vshl.u64 q11, q11, #4 - veor q6, q6, q10 - veor q4, q4, q11 - vshr.u64 q10, q1, #4 - vshr.u64 q11, q0, #4 - veor q10, q10, q7 - veor q11, q11, q3 - vand q10, q10, q8 - vand q11, q11, q8 - veor q7, q7, q10 - vshl.u64 q10, q10, #4 - veor q3, q3, q11 - vshl.u64 q11, q11, #4 - veor q1, q1, q10 - veor q0, q0, q11 - vldmia r4, {q8} @ last round key - veor q4, q4, q8 - veor q6, q6, q8 - veor q3, q3, q8 - veor q7, q7, q8 - veor q2, q2, q8 - veor q5, q5, q8 - veor q0, q0, q8 - veor q1, q1, q8 - bx lr -.size _bsaes_encrypt8,.-_bsaes_encrypt8 -.type _bsaes_key_convert,%function -.align 4 -_bsaes_key_convert: - adr r6,_bsaes_key_convert - vld1.8 {q7}, [r4]! @ load round 0 key -#ifdef __APPLE__ - adr r6,.LM0 -#else - sub r6,r6,#_bsaes_key_convert-.LM0 -#endif - vld1.8 {q15}, [r4]! @ load round 1 key - - vmov.i8 q8, #0x01 @ bit masks - vmov.i8 q9, #0x02 - vmov.i8 q10, #0x04 - vmov.i8 q11, #0x08 - vmov.i8 q12, #0x10 - vmov.i8 q13, #0x20 - vldmia r6, {q14} @ .LM0 - -#ifdef __ARMEL__ - vrev32.8 q7, q7 - vrev32.8 q15, q15 -#endif - sub r5,r5,#1 - vstmia r12!, {q7} @ save round 0 key - b .Lkey_loop - -.align 4 -.Lkey_loop: - vtbl.8 d14,{q15},d28 - vtbl.8 d15,{q15},d29 - vmov.i8 q6, #0x40 - vmov.i8 q15, #0x80 - - vtst.8 q0, q7, q8 - vtst.8 q1, q7, q9 - vtst.8 q2, q7, q10 - vtst.8 q3, q7, q11 - vtst.8 q4, q7, q12 - vtst.8 q5, q7, q13 - vtst.8 q6, q7, q6 - vtst.8 q7, q7, q15 - vld1.8 {q15}, [r4]! @ load next round key - vmvn q0, q0 @ "pnot" - vmvn q1, q1 - vmvn q5, q5 - vmvn q6, q6 -#ifdef __ARMEL__ - vrev32.8 q15, q15 -#endif - subs r5,r5,#1 - vstmia r12!,{q0,q1,q2,q3,q4,q5,q6,q7} @ write bit-sliced round key - bne .Lkey_loop - - vmov.i8 q7,#0x63 @ compose .L63 - @ don't save last round key - bx lr -.size _bsaes_key_convert,.-_bsaes_key_convert - - - -.globl bsaes_cbc_encrypt -.hidden bsaes_cbc_encrypt -.type bsaes_cbc_encrypt,%function -.align 5 -bsaes_cbc_encrypt: -#ifndef __KERNEL__ - cmp r2, #128 -#ifndef __thumb__ - blo AES_cbc_encrypt -#else - bhs 1f - b AES_cbc_encrypt -1: -#endif -#endif - - @ it is up to the caller to make sure we are called with enc == 0 - - mov ip, sp - stmdb sp!, {r4,r5,r6,r7,r8,r9,r10, lr} - VFP_ABI_PUSH - ldr r8, [ip] @ IV is 1st arg on the stack - mov r2, r2, lsr#4 @ len in 16 byte blocks - sub sp, #0x10 @ scratch space to carry over the IV - mov r9, sp @ save sp - - ldr r10, [r3, #240] @ get # of rounds -#ifndef BSAES_ASM_EXTENDED_KEY - @ allocate the key schedule on the stack - sub r12, sp, r10, lsl#7 @ 128 bytes per inner round key - add r12, #96 @ sifze of bit-slices key schedule - - @ populate the key schedule - mov r4, r3 @ pass key - mov r5, r10 @ pass # of rounds - mov sp, r12 @ sp is sp - bl _bsaes_key_convert - vldmia sp, {q6} - vstmia r12, {q15} @ save last round key - veor q7, q7, q6 @ fix up round 0 key - vstmia sp, {q7} -#else - ldr r12, [r3, #244] - eors r12, #1 - beq 0f - - @ populate the key schedule - str r12, [r3, #244] - mov r4, r3 @ pass key - mov r5, r10 @ pass # of rounds - add r12, r3, #248 @ pass key schedule - bl _bsaes_key_convert - add r4, r3, #248 - vldmia r4, {q6} - vstmia r12, {q15} @ save last round key - veor q7, q7, q6 @ fix up round 0 key - vstmia r4, {q7} - -.align 2 - -#endif - - vld1.8 {q15}, [r8] @ load IV - b .Lcbc_dec_loop - -.align 4 -.Lcbc_dec_loop: - subs r2, r2, #0x8 - bmi .Lcbc_dec_loop_finish - - vld1.8 {q0,q1}, [r0]! @ load input - vld1.8 {q2,q3}, [r0]! -#ifndef BSAES_ASM_EXTENDED_KEY - mov r4, sp @ pass the key -#else - add r4, r3, #248 -#endif - vld1.8 {q4,q5}, [r0]! - mov r5, r10 - vld1.8 {q6,q7}, [r0] - sub r0, r0, #0x60 - vstmia r9, {q15} @ put aside IV - - bl _bsaes_decrypt8 - - vldmia r9, {q14} @ reload IV - vld1.8 {q8,q9}, [r0]! @ reload input - veor q0, q0, q14 @ ^= IV - vld1.8 {q10,q11}, [r0]! - veor q1, q1, q8 - veor q6, q6, q9 - vld1.8 {q12,q13}, [r0]! - veor q4, q4, q10 - veor q2, q2, q11 - vld1.8 {q14,q15}, [r0]! - veor q7, q7, q12 - vst1.8 {q0,q1}, [r1]! @ write output - veor q3, q3, q13 - vst1.8 {q6}, [r1]! - veor q5, q5, q14 - vst1.8 {q4}, [r1]! - vst1.8 {q2}, [r1]! - vst1.8 {q7}, [r1]! - vst1.8 {q3}, [r1]! - vst1.8 {q5}, [r1]! - - b .Lcbc_dec_loop - -.Lcbc_dec_loop_finish: - adds r2, r2, #8 - beq .Lcbc_dec_done - - vld1.8 {q0}, [r0]! @ load input - cmp r2, #2 - blo .Lcbc_dec_one - vld1.8 {q1}, [r0]! -#ifndef BSAES_ASM_EXTENDED_KEY - mov r4, sp @ pass the key -#else - add r4, r3, #248 -#endif - mov r5, r10 - vstmia r9, {q15} @ put aside IV - beq .Lcbc_dec_two - vld1.8 {q2}, [r0]! - cmp r2, #4 - blo .Lcbc_dec_three - vld1.8 {q3}, [r0]! - beq .Lcbc_dec_four - vld1.8 {q4}, [r0]! - cmp r2, #6 - blo .Lcbc_dec_five - vld1.8 {q5}, [r0]! - beq .Lcbc_dec_six - vld1.8 {q6}, [r0]! - sub r0, r0, #0x70 - - bl _bsaes_decrypt8 - - vldmia r9, {q14} @ reload IV - vld1.8 {q8,q9}, [r0]! @ reload input - veor q0, q0, q14 @ ^= IV - vld1.8 {q10,q11}, [r0]! - veor q1, q1, q8 - veor q6, q6, q9 - vld1.8 {q12,q13}, [r0]! - veor q4, q4, q10 - veor q2, q2, q11 - vld1.8 {q15}, [r0]! - veor q7, q7, q12 - vst1.8 {q0,q1}, [r1]! @ write output - veor q3, q3, q13 - vst1.8 {q6}, [r1]! - vst1.8 {q4}, [r1]! - vst1.8 {q2}, [r1]! - vst1.8 {q7}, [r1]! - vst1.8 {q3}, [r1]! - b .Lcbc_dec_done -.align 4 -.Lcbc_dec_six: - sub r0, r0, #0x60 - bl _bsaes_decrypt8 - vldmia r9,{q14} @ reload IV - vld1.8 {q8,q9}, [r0]! @ reload input - veor q0, q0, q14 @ ^= IV - vld1.8 {q10,q11}, [r0]! - veor q1, q1, q8 - veor q6, q6, q9 - vld1.8 {q12}, [r0]! - veor q4, q4, q10 - veor q2, q2, q11 - vld1.8 {q15}, [r0]! - veor q7, q7, q12 - vst1.8 {q0,q1}, [r1]! @ write output - vst1.8 {q6}, [r1]! - vst1.8 {q4}, [r1]! - vst1.8 {q2}, [r1]! - vst1.8 {q7}, [r1]! - b .Lcbc_dec_done -.align 4 -.Lcbc_dec_five: - sub r0, r0, #0x50 - bl _bsaes_decrypt8 - vldmia r9, {q14} @ reload IV - vld1.8 {q8,q9}, [r0]! @ reload input - veor q0, q0, q14 @ ^= IV - vld1.8 {q10,q11}, [r0]! - veor q1, q1, q8 - veor q6, q6, q9 - vld1.8 {q15}, [r0]! - veor q4, q4, q10 - vst1.8 {q0,q1}, [r1]! @ write output - veor q2, q2, q11 - vst1.8 {q6}, [r1]! - vst1.8 {q4}, [r1]! - vst1.8 {q2}, [r1]! - b .Lcbc_dec_done -.align 4 -.Lcbc_dec_four: - sub r0, r0, #0x40 - bl _bsaes_decrypt8 - vldmia r9, {q14} @ reload IV - vld1.8 {q8,q9}, [r0]! @ reload input - veor q0, q0, q14 @ ^= IV - vld1.8 {q10}, [r0]! - veor q1, q1, q8 - veor q6, q6, q9 - vld1.8 {q15}, [r0]! - veor q4, q4, q10 - vst1.8 {q0,q1}, [r1]! @ write output - vst1.8 {q6}, [r1]! - vst1.8 {q4}, [r1]! - b .Lcbc_dec_done -.align 4 -.Lcbc_dec_three: - sub r0, r0, #0x30 - bl _bsaes_decrypt8 - vldmia r9, {q14} @ reload IV - vld1.8 {q8,q9}, [r0]! @ reload input - veor q0, q0, q14 @ ^= IV - vld1.8 {q15}, [r0]! - veor q1, q1, q8 - veor q6, q6, q9 - vst1.8 {q0,q1}, [r1]! @ write output - vst1.8 {q6}, [r1]! - b .Lcbc_dec_done -.align 4 -.Lcbc_dec_two: - sub r0, r0, #0x20 - bl _bsaes_decrypt8 - vldmia r9, {q14} @ reload IV - vld1.8 {q8}, [r0]! @ reload input - veor q0, q0, q14 @ ^= IV - vld1.8 {q15}, [r0]! @ reload input - veor q1, q1, q8 - vst1.8 {q0,q1}, [r1]! @ write output - b .Lcbc_dec_done -.align 4 -.Lcbc_dec_one: - sub r0, r0, #0x10 - mov r10, r1 @ save original out pointer - mov r1, r9 @ use the iv scratch space as out buffer - mov r2, r3 - vmov q4,q15 @ just in case ensure that IV - vmov q5,q0 @ and input are preserved - bl AES_decrypt - vld1.8 {q0}, [r9,:64] @ load result - veor q0, q0, q4 @ ^= IV - vmov q15, q5 @ q5 holds input - vst1.8 {q0}, [r10] @ write output - -.Lcbc_dec_done: -#ifndef BSAES_ASM_EXTENDED_KEY - vmov.i32 q0, #0 - vmov.i32 q1, #0 -.Lcbc_dec_bzero:@ wipe key schedule [if any] - vstmia sp!, {q0,q1} - cmp sp, r9 - bne .Lcbc_dec_bzero -#endif - - mov sp, r9 - add sp, #0x10 @ add sp,r9,#0x10 is no good for thumb - vst1.8 {q15}, [r8] @ return IV - VFP_ABI_POP - ldmia sp!, {r4,r5,r6,r7,r8,r9,r10, pc} -.size bsaes_cbc_encrypt,.-bsaes_cbc_encrypt - -.globl bsaes_ctr32_encrypt_blocks -.hidden bsaes_ctr32_encrypt_blocks -.type bsaes_ctr32_encrypt_blocks,%function -.align 5 -bsaes_ctr32_encrypt_blocks: - cmp r2, #8 @ use plain AES for - blo .Lctr_enc_short @ small sizes - - mov ip, sp - stmdb sp!, {r4,r5,r6,r7,r8,r9,r10, lr} - VFP_ABI_PUSH - ldr r8, [ip] @ ctr is 1st arg on the stack - sub sp, sp, #0x10 @ scratch space to carry over the ctr - mov r9, sp @ save sp - - ldr r10, [r3, #240] @ get # of rounds -#ifndef BSAES_ASM_EXTENDED_KEY - @ allocate the key schedule on the stack - sub r12, sp, r10, lsl#7 @ 128 bytes per inner round key - add r12, #96 @ size of bit-sliced key schedule - - @ populate the key schedule - mov r4, r3 @ pass key - mov r5, r10 @ pass # of rounds - mov sp, r12 @ sp is sp - bl _bsaes_key_convert - veor q7,q7,q15 @ fix up last round key - vstmia r12, {q7} @ save last round key - - vld1.8 {q0}, [r8] @ load counter -#ifdef __APPLE__ - mov r8, #:lower16:(.LREVM0SR-.LM0) - add r8, r6, r8 -#else - add r8, r6, #.LREVM0SR-.LM0 @ borrow r8 -#endif - vldmia sp, {q4} @ load round0 key -#else - ldr r12, [r3, #244] - eors r12, #1 - beq 0f - - @ populate the key schedule - str r12, [r3, #244] - mov r4, r3 @ pass key - mov r5, r10 @ pass # of rounds - add r12, r3, #248 @ pass key schedule - bl _bsaes_key_convert - veor q7,q7,q15 @ fix up last round key - vstmia r12, {q7} @ save last round key - -.align 2 - add r12, r3, #248 - vld1.8 {q0}, [r8] @ load counter - adrl r8, .LREVM0SR @ borrow r8 - vldmia r12, {q4} @ load round0 key - sub sp, #0x10 @ place for adjusted round0 key -#endif - - vmov.i32 q8,#1 @ compose 1<<96 - veor q9,q9,q9 - vrev32.8 q0,q0 - vext.8 q8,q9,q8,#4 - vrev32.8 q4,q4 - vadd.u32 q9,q8,q8 @ compose 2<<96 - vstmia sp, {q4} @ save adjusted round0 key - b .Lctr_enc_loop - -.align 4 -.Lctr_enc_loop: - vadd.u32 q10, q8, q9 @ compose 3<<96 - vadd.u32 q1, q0, q8 @ +1 - vadd.u32 q2, q0, q9 @ +2 - vadd.u32 q3, q0, q10 @ +3 - vadd.u32 q4, q1, q10 - vadd.u32 q5, q2, q10 - vadd.u32 q6, q3, q10 - vadd.u32 q7, q4, q10 - vadd.u32 q10, q5, q10 @ next counter - - @ Borrow prologue from _bsaes_encrypt8 to use the opportunity - @ to flip byte order in 32-bit counter - - vldmia sp, {q9} @ load round0 key -#ifndef BSAES_ASM_EXTENDED_KEY - add r4, sp, #0x10 @ pass next round key -#else - add r4, r3, #264 -#endif - vldmia r8, {q8} @ .LREVM0SR - mov r5, r10 @ pass rounds - vstmia r9, {q10} @ save next counter -#ifdef __APPLE__ - mov r6, #:lower16:(.LREVM0SR-.LSR) - sub r6, r8, r6 -#else - sub r6, r8, #.LREVM0SR-.LSR @ pass constants -#endif - - bl _bsaes_encrypt8_alt - - subs r2, r2, #8 - blo .Lctr_enc_loop_done - - vld1.8 {q8,q9}, [r0]! @ load input - vld1.8 {q10,q11}, [r0]! - veor q0, q8 - veor q1, q9 - vld1.8 {q12,q13}, [r0]! - veor q4, q10 - veor q6, q11 - vld1.8 {q14,q15}, [r0]! - veor q3, q12 - vst1.8 {q0,q1}, [r1]! @ write output - veor q7, q13 - veor q2, q14 - vst1.8 {q4}, [r1]! - veor q5, q15 - vst1.8 {q6}, [r1]! - vmov.i32 q8, #1 @ compose 1<<96 - vst1.8 {q3}, [r1]! - veor q9, q9, q9 - vst1.8 {q7}, [r1]! - vext.8 q8, q9, q8, #4 - vst1.8 {q2}, [r1]! - vadd.u32 q9,q8,q8 @ compose 2<<96 - vst1.8 {q5}, [r1]! - vldmia r9, {q0} @ load counter - - bne .Lctr_enc_loop - b .Lctr_enc_done - -.align 4 -.Lctr_enc_loop_done: - add r2, r2, #8 - vld1.8 {q8}, [r0]! @ load input - veor q0, q8 - vst1.8 {q0}, [r1]! @ write output - cmp r2, #2 - blo .Lctr_enc_done - vld1.8 {q9}, [r0]! - veor q1, q9 - vst1.8 {q1}, [r1]! - beq .Lctr_enc_done - vld1.8 {q10}, [r0]! - veor q4, q10 - vst1.8 {q4}, [r1]! - cmp r2, #4 - blo .Lctr_enc_done - vld1.8 {q11}, [r0]! - veor q6, q11 - vst1.8 {q6}, [r1]! - beq .Lctr_enc_done - vld1.8 {q12}, [r0]! - veor q3, q12 - vst1.8 {q3}, [r1]! - cmp r2, #6 - blo .Lctr_enc_done - vld1.8 {q13}, [r0]! - veor q7, q13 - vst1.8 {q7}, [r1]! - beq .Lctr_enc_done - vld1.8 {q14}, [r0] - veor q2, q14 - vst1.8 {q2}, [r1]! - -.Lctr_enc_done: - vmov.i32 q0, #0 - vmov.i32 q1, #0 -#ifndef BSAES_ASM_EXTENDED_KEY -.Lctr_enc_bzero:@ wipe key schedule [if any] - vstmia sp!, {q0,q1} - cmp sp, r9 - bne .Lctr_enc_bzero -#else - vstmia sp, {q0,q1} -#endif - - mov sp, r9 - add sp, #0x10 @ add sp,r9,#0x10 is no good for thumb - VFP_ABI_POP - ldmia sp!, {r4,r5,r6,r7,r8,r9,r10, pc} @ return - -.align 4 -.Lctr_enc_short: - ldr ip, [sp] @ ctr pointer is passed on stack - stmdb sp!, {r4,r5,r6,r7,r8, lr} - - mov r4, r0 @ copy arguments - mov r5, r1 - mov r6, r2 - mov r7, r3 - ldr r8, [ip, #12] @ load counter .LSW - vld1.8 {q1}, [ip] @ load whole counter value -#ifdef __ARMEL__ - rev r8, r8 -#endif - sub sp, sp, #0x10 - vst1.8 {q1}, [sp] @ copy counter value - sub sp, sp, #0x10 - -.Lctr_enc_short_loop: - add r0, sp, #0x10 @ input counter value - mov r1, sp @ output on the stack - mov r2, r7 @ key - - bl AES_encrypt - - vld1.8 {q0}, [r4]! @ load input - vld1.8 {q1}, [sp] @ load encrypted counter - add r8, r8, #1 -#ifdef __ARMEL__ - rev r0, r8 - str r0, [sp, #0x1c] @ next counter value -#else - str r8, [sp, #0x1c] @ next counter value -#endif - veor q0,q0,q1 - vst1.8 {q0}, [r5]! @ store output - subs r6, r6, #1 - bne .Lctr_enc_short_loop - - vmov.i32 q0, #0 - vmov.i32 q1, #0 - vstmia sp!, {q0,q1} - - ldmia sp!, {r4,r5,r6,r7,r8, pc} -.size bsaes_ctr32_encrypt_blocks,.-bsaes_ctr32_encrypt_blocks -.globl bsaes_xts_encrypt -.hidden bsaes_xts_encrypt -.type bsaes_xts_encrypt,%function -.align 4 -bsaes_xts_encrypt: - mov ip, sp - stmdb sp!, {r4,r5,r6,r7,r8,r9,r10, lr} @ 0x20 - VFP_ABI_PUSH - mov r6, sp @ future r3 - - mov r7, r0 - mov r8, r1 - mov r9, r2 - mov r10, r3 - - sub r0, sp, #0x10 @ 0x10 - bic r0, #0xf @ align at 16 bytes - mov sp, r0 - -#ifdef XTS_CHAIN_TWEAK - ldr r0, [ip] @ pointer to input tweak -#else - @ generate initial tweak - ldr r0, [ip, #4] @ iv[] - mov r1, sp - ldr r2, [ip, #0] @ key2 - bl AES_encrypt - mov r0,sp @ pointer to initial tweak -#endif - - ldr r1, [r10, #240] @ get # of rounds - mov r3, r6 -#ifndef BSAES_ASM_EXTENDED_KEY - @ allocate the key schedule on the stack - sub r12, sp, r1, lsl#7 @ 128 bytes per inner round key - @ add r12, #96 @ size of bit-sliced key schedule - sub r12, #48 @ place for tweak[9] - - @ populate the key schedule - mov r4, r10 @ pass key - mov r5, r1 @ pass # of rounds - mov sp, r12 - add r12, #0x90 @ pass key schedule - bl _bsaes_key_convert - veor q7, q7, q15 @ fix up last round key - vstmia r12, {q7} @ save last round key -#else - ldr r12, [r10, #244] - eors r12, #1 - beq 0f - - str r12, [r10, #244] - mov r4, r10 @ pass key - mov r5, r1 @ pass # of rounds - add r12, r10, #248 @ pass key schedule - bl _bsaes_key_convert - veor q7, q7, q15 @ fix up last round key - vstmia r12, {q7} - -.align 2 - sub sp, #0x90 @ place for tweak[9] -#endif - - vld1.8 {q8}, [r0] @ initial tweak - adr r2, .Lxts_magic - - subs r9, #0x80 - blo .Lxts_enc_short - b .Lxts_enc_loop - -.align 4 -.Lxts_enc_loop: - vldmia r2, {q5} @ load XTS magic - vshr.s64 q6, q8, #63 - mov r0, sp - vand q6, q6, q5 - vadd.u64 q9, q8, q8 - vst1.64 {q8}, [r0,:128]! - vswp d13,d12 - vshr.s64 q7, q9, #63 - veor q9, q9, q6 - vand q7, q7, q5 - vadd.u64 q10, q9, q9 - vst1.64 {q9}, [r0,:128]! - vswp d15,d14 - vshr.s64 q6, q10, #63 - veor q10, q10, q7 - vand q6, q6, q5 - vld1.8 {q0}, [r7]! - vadd.u64 q11, q10, q10 - vst1.64 {q10}, [r0,:128]! - vswp d13,d12 - vshr.s64 q7, q11, #63 - veor q11, q11, q6 - vand q7, q7, q5 - vld1.8 {q1}, [r7]! - veor q0, q0, q8 - vadd.u64 q12, q11, q11 - vst1.64 {q11}, [r0,:128]! - vswp d15,d14 - vshr.s64 q6, q12, #63 - veor q12, q12, q7 - vand q6, q6, q5 - vld1.8 {q2}, [r7]! - veor q1, q1, q9 - vadd.u64 q13, q12, q12 - vst1.64 {q12}, [r0,:128]! - vswp d13,d12 - vshr.s64 q7, q13, #63 - veor q13, q13, q6 - vand q7, q7, q5 - vld1.8 {q3}, [r7]! - veor q2, q2, q10 - vadd.u64 q14, q13, q13 - vst1.64 {q13}, [r0,:128]! - vswp d15,d14 - vshr.s64 q6, q14, #63 - veor q14, q14, q7 - vand q6, q6, q5 - vld1.8 {q4}, [r7]! - veor q3, q3, q11 - vadd.u64 q15, q14, q14 - vst1.64 {q14}, [r0,:128]! - vswp d13,d12 - vshr.s64 q7, q15, #63 - veor q15, q15, q6 - vand q7, q7, q5 - vld1.8 {q5}, [r7]! - veor q4, q4, q12 - vadd.u64 q8, q15, q15 - vst1.64 {q15}, [r0,:128]! - vswp d15,d14 - veor q8, q8, q7 - vst1.64 {q8}, [r0,:128] @ next round tweak - - vld1.8 {q6,q7}, [r7]! - veor q5, q5, q13 -#ifndef BSAES_ASM_EXTENDED_KEY - add r4, sp, #0x90 @ pass key schedule -#else - add r4, r10, #248 @ pass key schedule -#endif - veor q6, q6, q14 - mov r5, r1 @ pass rounds - veor q7, q7, q15 - mov r0, sp - - bl _bsaes_encrypt8 - - vld1.64 {q8,q9}, [r0,:128]! - vld1.64 {q10,q11}, [r0,:128]! - veor q0, q0, q8 - vld1.64 {q12,q13}, [r0,:128]! - veor q1, q1, q9 - veor q8, q4, q10 - vst1.8 {q0,q1}, [r8]! - veor q9, q6, q11 - vld1.64 {q14,q15}, [r0,:128]! - veor q10, q3, q12 - vst1.8 {q8,q9}, [r8]! - veor q11, q7, q13 - veor q12, q2, q14 - vst1.8 {q10,q11}, [r8]! - veor q13, q5, q15 - vst1.8 {q12,q13}, [r8]! - - vld1.64 {q8}, [r0,:128] @ next round tweak - - subs r9, #0x80 - bpl .Lxts_enc_loop - -.Lxts_enc_short: - adds r9, #0x70 - bmi .Lxts_enc_done - - vldmia r2, {q5} @ load XTS magic - vshr.s64 q7, q8, #63 - mov r0, sp - vand q7, q7, q5 - vadd.u64 q9, q8, q8 - vst1.64 {q8}, [r0,:128]! - vswp d15,d14 - vshr.s64 q6, q9, #63 - veor q9, q9, q7 - vand q6, q6, q5 - vadd.u64 q10, q9, q9 - vst1.64 {q9}, [r0,:128]! - vswp d13,d12 - vshr.s64 q7, q10, #63 - veor q10, q10, q6 - vand q7, q7, q5 - vld1.8 {q0}, [r7]! - subs r9, #0x10 - bmi .Lxts_enc_1 - vadd.u64 q11, q10, q10 - vst1.64 {q10}, [r0,:128]! - vswp d15,d14 - vshr.s64 q6, q11, #63 - veor q11, q11, q7 - vand q6, q6, q5 - vld1.8 {q1}, [r7]! - subs r9, #0x10 - bmi .Lxts_enc_2 - veor q0, q0, q8 - vadd.u64 q12, q11, q11 - vst1.64 {q11}, [r0,:128]! - vswp d13,d12 - vshr.s64 q7, q12, #63 - veor q12, q12, q6 - vand q7, q7, q5 - vld1.8 {q2}, [r7]! - subs r9, #0x10 - bmi .Lxts_enc_3 - veor q1, q1, q9 - vadd.u64 q13, q12, q12 - vst1.64 {q12}, [r0,:128]! - vswp d15,d14 - vshr.s64 q6, q13, #63 - veor q13, q13, q7 - vand q6, q6, q5 - vld1.8 {q3}, [r7]! - subs r9, #0x10 - bmi .Lxts_enc_4 - veor q2, q2, q10 - vadd.u64 q14, q13, q13 - vst1.64 {q13}, [r0,:128]! - vswp d13,d12 - vshr.s64 q7, q14, #63 - veor q14, q14, q6 - vand q7, q7, q5 - vld1.8 {q4}, [r7]! - subs r9, #0x10 - bmi .Lxts_enc_5 - veor q3, q3, q11 - vadd.u64 q15, q14, q14 - vst1.64 {q14}, [r0,:128]! - vswp d15,d14 - vshr.s64 q6, q15, #63 - veor q15, q15, q7 - vand q6, q6, q5 - vld1.8 {q5}, [r7]! - subs r9, #0x10 - bmi .Lxts_enc_6 - veor q4, q4, q12 - sub r9, #0x10 - vst1.64 {q15}, [r0,:128] @ next round tweak - - vld1.8 {q6}, [r7]! - veor q5, q5, q13 -#ifndef BSAES_ASM_EXTENDED_KEY - add r4, sp, #0x90 @ pass key schedule -#else - add r4, r10, #248 @ pass key schedule -#endif - veor q6, q6, q14 - mov r5, r1 @ pass rounds - mov r0, sp - - bl _bsaes_encrypt8 - - vld1.64 {q8,q9}, [r0,:128]! - vld1.64 {q10,q11}, [r0,:128]! - veor q0, q0, q8 - vld1.64 {q12,q13}, [r0,:128]! - veor q1, q1, q9 - veor q8, q4, q10 - vst1.8 {q0,q1}, [r8]! - veor q9, q6, q11 - vld1.64 {q14}, [r0,:128]! - veor q10, q3, q12 - vst1.8 {q8,q9}, [r8]! - veor q11, q7, q13 - veor q12, q2, q14 - vst1.8 {q10,q11}, [r8]! - vst1.8 {q12}, [r8]! - - vld1.64 {q8}, [r0,:128] @ next round tweak - b .Lxts_enc_done -.align 4 -.Lxts_enc_6: - vst1.64 {q14}, [r0,:128] @ next round tweak - - veor q4, q4, q12 -#ifndef BSAES_ASM_EXTENDED_KEY - add r4, sp, #0x90 @ pass key schedule -#else - add r4, r10, #248 @ pass key schedule -#endif - veor q5, q5, q13 - mov r5, r1 @ pass rounds - mov r0, sp - - bl _bsaes_encrypt8 - - vld1.64 {q8,q9}, [r0,:128]! - vld1.64 {q10,q11}, [r0,:128]! - veor q0, q0, q8 - vld1.64 {q12,q13}, [r0,:128]! - veor q1, q1, q9 - veor q8, q4, q10 - vst1.8 {q0,q1}, [r8]! - veor q9, q6, q11 - veor q10, q3, q12 - vst1.8 {q8,q9}, [r8]! - veor q11, q7, q13 - vst1.8 {q10,q11}, [r8]! - - vld1.64 {q8}, [r0,:128] @ next round tweak - b .Lxts_enc_done - -@ put this in range for both ARM and Thumb mode adr instructions -.align 5 -.Lxts_magic: -.quad 1, 0x87 - -.align 5 -.Lxts_enc_5: - vst1.64 {q13}, [r0,:128] @ next round tweak - - veor q3, q3, q11 -#ifndef BSAES_ASM_EXTENDED_KEY - add r4, sp, #0x90 @ pass key schedule -#else - add r4, r10, #248 @ pass key schedule -#endif - veor q4, q4, q12 - mov r5, r1 @ pass rounds - mov r0, sp - - bl _bsaes_encrypt8 - - vld1.64 {q8,q9}, [r0,:128]! - vld1.64 {q10,q11}, [r0,:128]! - veor q0, q0, q8 - vld1.64 {q12}, [r0,:128]! - veor q1, q1, q9 - veor q8, q4, q10 - vst1.8 {q0,q1}, [r8]! - veor q9, q6, q11 - veor q10, q3, q12 - vst1.8 {q8,q9}, [r8]! - vst1.8 {q10}, [r8]! - - vld1.64 {q8}, [r0,:128] @ next round tweak - b .Lxts_enc_done -.align 4 -.Lxts_enc_4: - vst1.64 {q12}, [r0,:128] @ next round tweak - - veor q2, q2, q10 -#ifndef BSAES_ASM_EXTENDED_KEY - add r4, sp, #0x90 @ pass key schedule -#else - add r4, r10, #248 @ pass key schedule -#endif - veor q3, q3, q11 - mov r5, r1 @ pass rounds - mov r0, sp - - bl _bsaes_encrypt8 - - vld1.64 {q8,q9}, [r0,:128]! - vld1.64 {q10,q11}, [r0,:128]! - veor q0, q0, q8 - veor q1, q1, q9 - veor q8, q4, q10 - vst1.8 {q0,q1}, [r8]! - veor q9, q6, q11 - vst1.8 {q8,q9}, [r8]! - - vld1.64 {q8}, [r0,:128] @ next round tweak - b .Lxts_enc_done -.align 4 -.Lxts_enc_3: - vst1.64 {q11}, [r0,:128] @ next round tweak - - veor q1, q1, q9 -#ifndef BSAES_ASM_EXTENDED_KEY - add r4, sp, #0x90 @ pass key schedule -#else - add r4, r10, #248 @ pass key schedule -#endif - veor q2, q2, q10 - mov r5, r1 @ pass rounds - mov r0, sp - - bl _bsaes_encrypt8 - - vld1.64 {q8,q9}, [r0,:128]! - vld1.64 {q10}, [r0,:128]! - veor q0, q0, q8 - veor q1, q1, q9 - veor q8, q4, q10 - vst1.8 {q0,q1}, [r8]! - vst1.8 {q8}, [r8]! - - vld1.64 {q8}, [r0,:128] @ next round tweak - b .Lxts_enc_done -.align 4 -.Lxts_enc_2: - vst1.64 {q10}, [r0,:128] @ next round tweak - - veor q0, q0, q8 -#ifndef BSAES_ASM_EXTENDED_KEY - add r4, sp, #0x90 @ pass key schedule -#else - add r4, r10, #248 @ pass key schedule -#endif - veor q1, q1, q9 - mov r5, r1 @ pass rounds - mov r0, sp - - bl _bsaes_encrypt8 - - vld1.64 {q8,q9}, [r0,:128]! - veor q0, q0, q8 - veor q1, q1, q9 - vst1.8 {q0,q1}, [r8]! - - vld1.64 {q8}, [r0,:128] @ next round tweak - b .Lxts_enc_done -.align 4 -.Lxts_enc_1: - mov r0, sp - veor q0, q8 - mov r1, sp - vst1.8 {q0}, [sp,:128] - mov r2, r10 - mov r4, r3 @ preserve fp - - bl AES_encrypt - - vld1.8 {q0}, [sp,:128] - veor q0, q0, q8 - vst1.8 {q0}, [r8]! - mov r3, r4 - - vmov q8, q9 @ next round tweak - -.Lxts_enc_done: -#ifndef XTS_CHAIN_TWEAK - adds r9, #0x10 - beq .Lxts_enc_ret - sub r6, r8, #0x10 - -.Lxts_enc_steal: - ldrb r0, [r7], #1 - ldrb r1, [r8, #-0x10] - strb r0, [r8, #-0x10] - strb r1, [r8], #1 - - subs r9, #1 - bhi .Lxts_enc_steal - - vld1.8 {q0}, [r6] - mov r0, sp - veor q0, q0, q8 - mov r1, sp - vst1.8 {q0}, [sp,:128] - mov r2, r10 - mov r4, r3 @ preserve fp - - bl AES_encrypt - - vld1.8 {q0}, [sp,:128] - veor q0, q0, q8 - vst1.8 {q0}, [r6] - mov r3, r4 -#endif - -.Lxts_enc_ret: - bic r0, r3, #0xf - vmov.i32 q0, #0 - vmov.i32 q1, #0 -#ifdef XTS_CHAIN_TWEAK - ldr r1, [r3, #0x20+VFP_ABI_FRAME] @ chain tweak -#endif -.Lxts_enc_bzero:@ wipe key schedule [if any] - vstmia sp!, {q0,q1} - cmp sp, r0 - bne .Lxts_enc_bzero - - mov sp, r3 -#ifdef XTS_CHAIN_TWEAK - vst1.8 {q8}, [r1] -#endif - VFP_ABI_POP - ldmia sp!, {r4,r5,r6,r7,r8,r9,r10, pc} @ return - -.size bsaes_xts_encrypt,.-bsaes_xts_encrypt - -.globl bsaes_xts_decrypt -.hidden bsaes_xts_decrypt -.type bsaes_xts_decrypt,%function -.align 4 -bsaes_xts_decrypt: - mov ip, sp - stmdb sp!, {r4,r5,r6,r7,r8,r9,r10, lr} @ 0x20 - VFP_ABI_PUSH - mov r6, sp @ future r3 - - mov r7, r0 - mov r8, r1 - mov r9, r2 - mov r10, r3 - - sub r0, sp, #0x10 @ 0x10 - bic r0, #0xf @ align at 16 bytes - mov sp, r0 - -#ifdef XTS_CHAIN_TWEAK - ldr r0, [ip] @ pointer to input tweak -#else - @ generate initial tweak - ldr r0, [ip, #4] @ iv[] - mov r1, sp - ldr r2, [ip, #0] @ key2 - bl AES_encrypt - mov r0, sp @ pointer to initial tweak -#endif - - ldr r1, [r10, #240] @ get # of rounds - mov r3, r6 -#ifndef BSAES_ASM_EXTENDED_KEY - @ allocate the key schedule on the stack - sub r12, sp, r1, lsl#7 @ 128 bytes per inner round key - @ add r12, #96 @ size of bit-sliced key schedule - sub r12, #48 @ place for tweak[9] - - @ populate the key schedule - mov r4, r10 @ pass key - mov r5, r1 @ pass # of rounds - mov sp, r12 - add r12, #0x90 @ pass key schedule - bl _bsaes_key_convert - add r4, sp, #0x90 - vldmia r4, {q6} - vstmia r12, {q15} @ save last round key - veor q7, q7, q6 @ fix up round 0 key - vstmia r4, {q7} -#else - ldr r12, [r10, #244] - eors r12, #1 - beq 0f - - str r12, [r10, #244] - mov r4, r10 @ pass key - mov r5, r1 @ pass # of rounds - add r12, r10, #248 @ pass key schedule - bl _bsaes_key_convert - add r4, r10, #248 - vldmia r4, {q6} - vstmia r12, {q15} @ save last round key - veor q7, q7, q6 @ fix up round 0 key - vstmia r4, {q7} - -.align 2 - sub sp, #0x90 @ place for tweak[9] -#endif - vld1.8 {q8}, [r0] @ initial tweak - adr r2, .Lxts_magic - -#ifndef XTS_CHAIN_TWEAK - tst r9, #0xf @ if not multiple of 16 - it ne @ Thumb2 thing, sanity check in ARM - subne r9, #0x10 @ subtract another 16 bytes -#endif - subs r9, #0x80 - - blo .Lxts_dec_short - b .Lxts_dec_loop - -.align 4 -.Lxts_dec_loop: - vldmia r2, {q5} @ load XTS magic - vshr.s64 q6, q8, #63 - mov r0, sp - vand q6, q6, q5 - vadd.u64 q9, q8, q8 - vst1.64 {q8}, [r0,:128]! - vswp d13,d12 - vshr.s64 q7, q9, #63 - veor q9, q9, q6 - vand q7, q7, q5 - vadd.u64 q10, q9, q9 - vst1.64 {q9}, [r0,:128]! - vswp d15,d14 - vshr.s64 q6, q10, #63 - veor q10, q10, q7 - vand q6, q6, q5 - vld1.8 {q0}, [r7]! - vadd.u64 q11, q10, q10 - vst1.64 {q10}, [r0,:128]! - vswp d13,d12 - vshr.s64 q7, q11, #63 - veor q11, q11, q6 - vand q7, q7, q5 - vld1.8 {q1}, [r7]! - veor q0, q0, q8 - vadd.u64 q12, q11, q11 - vst1.64 {q11}, [r0,:128]! - vswp d15,d14 - vshr.s64 q6, q12, #63 - veor q12, q12, q7 - vand q6, q6, q5 - vld1.8 {q2}, [r7]! - veor q1, q1, q9 - vadd.u64 q13, q12, q12 - vst1.64 {q12}, [r0,:128]! - vswp d13,d12 - vshr.s64 q7, q13, #63 - veor q13, q13, q6 - vand q7, q7, q5 - vld1.8 {q3}, [r7]! - veor q2, q2, q10 - vadd.u64 q14, q13, q13 - vst1.64 {q13}, [r0,:128]! - vswp d15,d14 - vshr.s64 q6, q14, #63 - veor q14, q14, q7 - vand q6, q6, q5 - vld1.8 {q4}, [r7]! - veor q3, q3, q11 - vadd.u64 q15, q14, q14 - vst1.64 {q14}, [r0,:128]! - vswp d13,d12 - vshr.s64 q7, q15, #63 - veor q15, q15, q6 - vand q7, q7, q5 - vld1.8 {q5}, [r7]! - veor q4, q4, q12 - vadd.u64 q8, q15, q15 - vst1.64 {q15}, [r0,:128]! - vswp d15,d14 - veor q8, q8, q7 - vst1.64 {q8}, [r0,:128] @ next round tweak - - vld1.8 {q6,q7}, [r7]! - veor q5, q5, q13 -#ifndef BSAES_ASM_EXTENDED_KEY - add r4, sp, #0x90 @ pass key schedule -#else - add r4, r10, #248 @ pass key schedule -#endif - veor q6, q6, q14 - mov r5, r1 @ pass rounds - veor q7, q7, q15 - mov r0, sp - - bl _bsaes_decrypt8 - - vld1.64 {q8,q9}, [r0,:128]! - vld1.64 {q10,q11}, [r0,:128]! - veor q0, q0, q8 - vld1.64 {q12,q13}, [r0,:128]! - veor q1, q1, q9 - veor q8, q6, q10 - vst1.8 {q0,q1}, [r8]! - veor q9, q4, q11 - vld1.64 {q14,q15}, [r0,:128]! - veor q10, q2, q12 - vst1.8 {q8,q9}, [r8]! - veor q11, q7, q13 - veor q12, q3, q14 - vst1.8 {q10,q11}, [r8]! - veor q13, q5, q15 - vst1.8 {q12,q13}, [r8]! - - vld1.64 {q8}, [r0,:128] @ next round tweak - - subs r9, #0x80 - bpl .Lxts_dec_loop - -.Lxts_dec_short: - adds r9, #0x70 - bmi .Lxts_dec_done - - vldmia r2, {q5} @ load XTS magic - vshr.s64 q7, q8, #63 - mov r0, sp - vand q7, q7, q5 - vadd.u64 q9, q8, q8 - vst1.64 {q8}, [r0,:128]! - vswp d15,d14 - vshr.s64 q6, q9, #63 - veor q9, q9, q7 - vand q6, q6, q5 - vadd.u64 q10, q9, q9 - vst1.64 {q9}, [r0,:128]! - vswp d13,d12 - vshr.s64 q7, q10, #63 - veor q10, q10, q6 - vand q7, q7, q5 - vld1.8 {q0}, [r7]! - subs r9, #0x10 - bmi .Lxts_dec_1 - vadd.u64 q11, q10, q10 - vst1.64 {q10}, [r0,:128]! - vswp d15,d14 - vshr.s64 q6, q11, #63 - veor q11, q11, q7 - vand q6, q6, q5 - vld1.8 {q1}, [r7]! - subs r9, #0x10 - bmi .Lxts_dec_2 - veor q0, q0, q8 - vadd.u64 q12, q11, q11 - vst1.64 {q11}, [r0,:128]! - vswp d13,d12 - vshr.s64 q7, q12, #63 - veor q12, q12, q6 - vand q7, q7, q5 - vld1.8 {q2}, [r7]! - subs r9, #0x10 - bmi .Lxts_dec_3 - veor q1, q1, q9 - vadd.u64 q13, q12, q12 - vst1.64 {q12}, [r0,:128]! - vswp d15,d14 - vshr.s64 q6, q13, #63 - veor q13, q13, q7 - vand q6, q6, q5 - vld1.8 {q3}, [r7]! - subs r9, #0x10 - bmi .Lxts_dec_4 - veor q2, q2, q10 - vadd.u64 q14, q13, q13 - vst1.64 {q13}, [r0,:128]! - vswp d13,d12 - vshr.s64 q7, q14, #63 - veor q14, q14, q6 - vand q7, q7, q5 - vld1.8 {q4}, [r7]! - subs r9, #0x10 - bmi .Lxts_dec_5 - veor q3, q3, q11 - vadd.u64 q15, q14, q14 - vst1.64 {q14}, [r0,:128]! - vswp d15,d14 - vshr.s64 q6, q15, #63 - veor q15, q15, q7 - vand q6, q6, q5 - vld1.8 {q5}, [r7]! - subs r9, #0x10 - bmi .Lxts_dec_6 - veor q4, q4, q12 - sub r9, #0x10 - vst1.64 {q15}, [r0,:128] @ next round tweak - - vld1.8 {q6}, [r7]! - veor q5, q5, q13 -#ifndef BSAES_ASM_EXTENDED_KEY - add r4, sp, #0x90 @ pass key schedule -#else - add r4, r10, #248 @ pass key schedule -#endif - veor q6, q6, q14 - mov r5, r1 @ pass rounds - mov r0, sp - - bl _bsaes_decrypt8 - - vld1.64 {q8,q9}, [r0,:128]! - vld1.64 {q10,q11}, [r0,:128]! - veor q0, q0, q8 - vld1.64 {q12,q13}, [r0,:128]! - veor q1, q1, q9 - veor q8, q6, q10 - vst1.8 {q0,q1}, [r8]! - veor q9, q4, q11 - vld1.64 {q14}, [r0,:128]! - veor q10, q2, q12 - vst1.8 {q8,q9}, [r8]! - veor q11, q7, q13 - veor q12, q3, q14 - vst1.8 {q10,q11}, [r8]! - vst1.8 {q12}, [r8]! - - vld1.64 {q8}, [r0,:128] @ next round tweak - b .Lxts_dec_done -.align 4 -.Lxts_dec_6: - vst1.64 {q14}, [r0,:128] @ next round tweak - - veor q4, q4, q12 -#ifndef BSAES_ASM_EXTENDED_KEY - add r4, sp, #0x90 @ pass key schedule -#else - add r4, r10, #248 @ pass key schedule -#endif - veor q5, q5, q13 - mov r5, r1 @ pass rounds - mov r0, sp - - bl _bsaes_decrypt8 - - vld1.64 {q8,q9}, [r0,:128]! - vld1.64 {q10,q11}, [r0,:128]! - veor q0, q0, q8 - vld1.64 {q12,q13}, [r0,:128]! - veor q1, q1, q9 - veor q8, q6, q10 - vst1.8 {q0,q1}, [r8]! - veor q9, q4, q11 - veor q10, q2, q12 - vst1.8 {q8,q9}, [r8]! - veor q11, q7, q13 - vst1.8 {q10,q11}, [r8]! - - vld1.64 {q8}, [r0,:128] @ next round tweak - b .Lxts_dec_done -.align 4 -.Lxts_dec_5: - vst1.64 {q13}, [r0,:128] @ next round tweak - - veor q3, q3, q11 -#ifndef BSAES_ASM_EXTENDED_KEY - add r4, sp, #0x90 @ pass key schedule -#else - add r4, r10, #248 @ pass key schedule -#endif - veor q4, q4, q12 - mov r5, r1 @ pass rounds - mov r0, sp - - bl _bsaes_decrypt8 - - vld1.64 {q8,q9}, [r0,:128]! - vld1.64 {q10,q11}, [r0,:128]! - veor q0, q0, q8 - vld1.64 {q12}, [r0,:128]! - veor q1, q1, q9 - veor q8, q6, q10 - vst1.8 {q0,q1}, [r8]! - veor q9, q4, q11 - veor q10, q2, q12 - vst1.8 {q8,q9}, [r8]! - vst1.8 {q10}, [r8]! - - vld1.64 {q8}, [r0,:128] @ next round tweak - b .Lxts_dec_done -.align 4 -.Lxts_dec_4: - vst1.64 {q12}, [r0,:128] @ next round tweak - - veor q2, q2, q10 -#ifndef BSAES_ASM_EXTENDED_KEY - add r4, sp, #0x90 @ pass key schedule -#else - add r4, r10, #248 @ pass key schedule -#endif - veor q3, q3, q11 - mov r5, r1 @ pass rounds - mov r0, sp - - bl _bsaes_decrypt8 - - vld1.64 {q8,q9}, [r0,:128]! - vld1.64 {q10,q11}, [r0,:128]! - veor q0, q0, q8 - veor q1, q1, q9 - veor q8, q6, q10 - vst1.8 {q0,q1}, [r8]! - veor q9, q4, q11 - vst1.8 {q8,q9}, [r8]! - - vld1.64 {q8}, [r0,:128] @ next round tweak - b .Lxts_dec_done -.align 4 -.Lxts_dec_3: - vst1.64 {q11}, [r0,:128] @ next round tweak - - veor q1, q1, q9 -#ifndef BSAES_ASM_EXTENDED_KEY - add r4, sp, #0x90 @ pass key schedule -#else - add r4, r10, #248 @ pass key schedule -#endif - veor q2, q2, q10 - mov r5, r1 @ pass rounds - mov r0, sp - - bl _bsaes_decrypt8 - - vld1.64 {q8,q9}, [r0,:128]! - vld1.64 {q10}, [r0,:128]! - veor q0, q0, q8 - veor q1, q1, q9 - veor q8, q6, q10 - vst1.8 {q0,q1}, [r8]! - vst1.8 {q8}, [r8]! - - vld1.64 {q8}, [r0,:128] @ next round tweak - b .Lxts_dec_done -.align 4 -.Lxts_dec_2: - vst1.64 {q10}, [r0,:128] @ next round tweak - - veor q0, q0, q8 -#ifndef BSAES_ASM_EXTENDED_KEY - add r4, sp, #0x90 @ pass key schedule -#else - add r4, r10, #248 @ pass key schedule -#endif - veor q1, q1, q9 - mov r5, r1 @ pass rounds - mov r0, sp - - bl _bsaes_decrypt8 - - vld1.64 {q8,q9}, [r0,:128]! - veor q0, q0, q8 - veor q1, q1, q9 - vst1.8 {q0,q1}, [r8]! - - vld1.64 {q8}, [r0,:128] @ next round tweak - b .Lxts_dec_done -.align 4 -.Lxts_dec_1: - mov r0, sp - veor q0, q8 - mov r1, sp - vst1.8 {q0}, [sp,:128] - mov r2, r10 - mov r4, r3 @ preserve fp - mov r5, r2 @ preserve magic - - bl AES_decrypt - - vld1.8 {q0}, [sp,:128] - veor q0, q0, q8 - vst1.8 {q0}, [r8]! - mov r3, r4 - mov r2, r5 - - vmov q8, q9 @ next round tweak - -.Lxts_dec_done: -#ifndef XTS_CHAIN_TWEAK - adds r9, #0x10 - beq .Lxts_dec_ret - - @ calculate one round of extra tweak for the stolen ciphertext - vldmia r2, {q5} - vshr.s64 q6, q8, #63 - vand q6, q6, q5 - vadd.u64 q9, q8, q8 - vswp d13,d12 - veor q9, q9, q6 - - @ perform the final decryption with the last tweak value - vld1.8 {q0}, [r7]! - mov r0, sp - veor q0, q0, q9 - mov r1, sp - vst1.8 {q0}, [sp,:128] - mov r2, r10 - mov r4, r3 @ preserve fp - - bl AES_decrypt - - vld1.8 {q0}, [sp,:128] - veor q0, q0, q9 - vst1.8 {q0}, [r8] - - mov r6, r8 -.Lxts_dec_steal: - ldrb r1, [r8] - ldrb r0, [r7], #1 - strb r1, [r8, #0x10] - strb r0, [r8], #1 - - subs r9, #1 - bhi .Lxts_dec_steal - - vld1.8 {q0}, [r6] - mov r0, sp - veor q0, q8 - mov r1, sp - vst1.8 {q0}, [sp,:128] - mov r2, r10 - - bl AES_decrypt - - vld1.8 {q0}, [sp,:128] - veor q0, q0, q8 - vst1.8 {q0}, [r6] - mov r3, r4 -#endif - -.Lxts_dec_ret: - bic r0, r3, #0xf - vmov.i32 q0, #0 - vmov.i32 q1, #0 -#ifdef XTS_CHAIN_TWEAK - ldr r1, [r3, #0x20+VFP_ABI_FRAME] @ chain tweak -#endif -.Lxts_dec_bzero:@ wipe key schedule [if any] - vstmia sp!, {q0,q1} - cmp sp, r0 - bne .Lxts_dec_bzero - - mov sp, r3 -#ifdef XTS_CHAIN_TWEAK - vst1.8 {q8}, [r1] -#endif - VFP_ABI_POP - ldmia sp!, {r4,r5,r6,r7,r8,r9,r10, pc} @ return - -.size bsaes_xts_decrypt,.-bsaes_xts_decrypt -#endif -#endif -#endif \ No newline at end of file diff --git a/third_party/boringssl/linux-arm/crypto/bn/armv4-mont.S b/third_party/boringssl/linux-arm/crypto/bn/armv4-mont.S deleted file mode 100644 index 68dfb2c1724b0..0000000000000 --- a/third_party/boringssl/linux-arm/crypto/bn/armv4-mont.S +++ /dev/null @@ -1,589 +0,0 @@ -#if defined(__arm__) -#include "arm_arch.h" - -.text -.code 32 - -#if __ARM_MAX_ARCH__>=7 -.align 5 -.LOPENSSL_armcap: -.word OPENSSL_armcap_P-.Lbn_mul_mont -#endif - -.globl bn_mul_mont -.hidden bn_mul_mont -.type bn_mul_mont,%function - -.align 5 -bn_mul_mont: -.Lbn_mul_mont: - ldr ip,[sp,#4] @ load num - stmdb sp!,{r0,r2} @ sp points at argument block -#if __ARM_MAX_ARCH__>=7 - tst ip,#7 - bne .Lialu - adr r0,bn_mul_mont - ldr r2,.LOPENSSL_armcap - ldr r0,[r0,r2] -#ifdef __APPLE__ - ldr r0,[r0] -#endif - tst r0,#1 @ NEON available? - ldmia sp, {r0,r2} - beq .Lialu - add sp,sp,#8 - b bn_mul8x_mont_neon -.align 4 -.Lialu: -#endif - cmp ip,#2 - mov r0,ip @ load num - movlt r0,#0 - addlt sp,sp,#2*4 - blt .Labrt - - stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} @ save 10 registers - - mov r0,r0,lsl#2 @ rescale r0 for byte count - sub sp,sp,r0 @ alloca(4*num) - sub sp,sp,#4 @ +extra dword - sub r0,r0,#4 @ "num=num-1" - add r4,r2,r0 @ &bp[num-1] - - add r0,sp,r0 @ r0 to point at &tp[num-1] - ldr r8,[r0,#14*4] @ &n0 - ldr r2,[r2] @ bp[0] - ldr r5,[r1],#4 @ ap[0],ap++ - ldr r6,[r3],#4 @ np[0],np++ - ldr r8,[r8] @ *n0 - str r4,[r0,#15*4] @ save &bp[num] - - umull r10,r11,r5,r2 @ ap[0]*bp[0] - str r8,[r0,#14*4] @ save n0 value - mul r8,r10,r8 @ "tp[0]"*n0 - mov r12,#0 - umlal r10,r12,r6,r8 @ np[0]*n0+"t[0]" - mov r4,sp - -.L1st: - ldr r5,[r1],#4 @ ap[j],ap++ - mov r10,r11 - ldr r6,[r3],#4 @ np[j],np++ - mov r11,#0 - umlal r10,r11,r5,r2 @ ap[j]*bp[0] - mov r14,#0 - umlal r12,r14,r6,r8 @ np[j]*n0 - adds r12,r12,r10 - str r12,[r4],#4 @ tp[j-1]=,tp++ - adc r12,r14,#0 - cmp r4,r0 - bne .L1st - - adds r12,r12,r11 - ldr r4,[r0,#13*4] @ restore bp - mov r14,#0 - ldr r8,[r0,#14*4] @ restore n0 - adc r14,r14,#0 - str r12,[r0] @ tp[num-1]= - str r14,[r0,#4] @ tp[num]= - -.Louter: - sub r7,r0,sp @ "original" r0-1 value - sub r1,r1,r7 @ "rewind" ap to &ap[1] - ldr r2,[r4,#4]! @ *(++bp) - sub r3,r3,r7 @ "rewind" np to &np[1] - ldr r5,[r1,#-4] @ ap[0] - ldr r10,[sp] @ tp[0] - ldr r6,[r3,#-4] @ np[0] - ldr r7,[sp,#4] @ tp[1] - - mov r11,#0 - umlal r10,r11,r5,r2 @ ap[0]*bp[i]+tp[0] - str r4,[r0,#13*4] @ save bp - mul r8,r10,r8 - mov r12,#0 - umlal r10,r12,r6,r8 @ np[0]*n0+"tp[0]" - mov r4,sp - -.Linner: - ldr r5,[r1],#4 @ ap[j],ap++ - adds r10,r11,r7 @ +=tp[j] - ldr r6,[r3],#4 @ np[j],np++ - mov r11,#0 - umlal r10,r11,r5,r2 @ ap[j]*bp[i] - mov r14,#0 - umlal r12,r14,r6,r8 @ np[j]*n0 - adc r11,r11,#0 - ldr r7,[r4,#8] @ tp[j+1] - adds r12,r12,r10 - str r12,[r4],#4 @ tp[j-1]=,tp++ - adc r12,r14,#0 - cmp r4,r0 - bne .Linner - - adds r12,r12,r11 - mov r14,#0 - ldr r4,[r0,#13*4] @ restore bp - adc r14,r14,#0 - ldr r8,[r0,#14*4] @ restore n0 - adds r12,r12,r7 - ldr r7,[r0,#15*4] @ restore &bp[num] - adc r14,r14,#0 - str r12,[r0] @ tp[num-1]= - str r14,[r0,#4] @ tp[num]= - - cmp r4,r7 - bne .Louter - - ldr r2,[r0,#12*4] @ pull rp - add r0,r0,#4 @ r0 to point at &tp[num] - sub r5,r0,sp @ "original" num value - mov r4,sp @ "rewind" r4 - mov r1,r4 @ "borrow" r1 - sub r3,r3,r5 @ "rewind" r3 to &np[0] - - subs r7,r7,r7 @ "clear" carry flag -.Lsub: ldr r7,[r4],#4 - ldr r6,[r3],#4 - sbcs r7,r7,r6 @ tp[j]-np[j] - str r7,[r2],#4 @ rp[j]= - teq r4,r0 @ preserve carry - bne .Lsub - sbcs r14,r14,#0 @ upmost carry - mov r4,sp @ "rewind" r4 - sub r2,r2,r5 @ "rewind" r2 - - and r1,r4,r14 - bic r3,r2,r14 - orr r1,r1,r3 @ ap=borrow?tp:rp - -.Lcopy: ldr r7,[r1],#4 @ copy or in-place refresh - str sp,[r4],#4 @ zap tp - str r7,[r2],#4 - cmp r4,r0 - bne .Lcopy - - add sp,r0,#4 @ skip over tp[num+1] - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} @ restore registers - add sp,sp,#2*4 @ skip over {r0,r2} - mov r0,#1 -.Labrt: -#if __ARM_ARCH__>=5 - bx lr @ .word 0xe12fff1e -#else - tst lr,#1 - moveq pc,lr @ be binary compatible with V4, yet -.word 0xe12fff1e @ interoperable with Thumb ISA:-) -#endif -.size bn_mul_mont,.-bn_mul_mont -#if __ARM_MAX_ARCH__>=7 -.arch armv7-a -.fpu neon - -.type bn_mul8x_mont_neon,%function -.align 5 -bn_mul8x_mont_neon: - mov ip,sp - stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11} - vstmdb sp!,{d8,d9,d10,d11,d12,d13,d14,d15} @ ABI specification says so - ldmia ip,{r4,r5} @ load rest of parameter block - - sub r7,sp,#16 - vld1.32 {d28[0]}, [r2,:32]! - sub r7,r7,r5,lsl#4 - vld1.32 {d0,d1,d2,d3}, [r1]! @ can't specify :32 :-( - and r7,r7,#-64 - vld1.32 {d30[0]}, [r4,:32] - mov sp,r7 @ alloca - veor d8,d8,d8 - subs r8,r5,#8 - vzip.16 d28,d8 - - vmull.u32 q6,d28,d0[0] - vmull.u32 q7,d28,d0[1] - vmull.u32 q8,d28,d1[0] - vshl.i64 d10,d13,#16 - vmull.u32 q9,d28,d1[1] - - vadd.u64 d10,d10,d12 - veor d8,d8,d8 - vmul.u32 d29,d10,d30 - - vmull.u32 q10,d28,d2[0] - vld1.32 {d4,d5,d6,d7}, [r3]! - vmull.u32 q11,d28,d2[1] - vmull.u32 q12,d28,d3[0] - vzip.16 d29,d8 - vmull.u32 q13,d28,d3[1] - - bne .LNEON_1st - - @ special case for num=8, everything is in register bank... - - vmlal.u32 q6,d29,d4[0] - sub r9,r5,#1 - vmlal.u32 q7,d29,d4[1] - vmlal.u32 q8,d29,d5[0] - vmlal.u32 q9,d29,d5[1] - - vmlal.u32 q10,d29,d6[0] - vmov q5,q6 - vmlal.u32 q11,d29,d6[1] - vmov q6,q7 - vmlal.u32 q12,d29,d7[0] - vmov q7,q8 - vmlal.u32 q13,d29,d7[1] - vmov q8,q9 - vmov q9,q10 - vshr.u64 d10,d10,#16 - vmov q10,q11 - vmov q11,q12 - vadd.u64 d10,d10,d11 - vmov q12,q13 - veor q13,q13 - vshr.u64 d10,d10,#16 - - b .LNEON_outer8 - -.align 4 -.LNEON_outer8: - vld1.32 {d28[0]}, [r2,:32]! - veor d8,d8,d8 - vzip.16 d28,d8 - vadd.u64 d12,d12,d10 - - vmlal.u32 q6,d28,d0[0] - vmlal.u32 q7,d28,d0[1] - vmlal.u32 q8,d28,d1[0] - vshl.i64 d10,d13,#16 - vmlal.u32 q9,d28,d1[1] - - vadd.u64 d10,d10,d12 - veor d8,d8,d8 - subs r9,r9,#1 - vmul.u32 d29,d10,d30 - - vmlal.u32 q10,d28,d2[0] - vmlal.u32 q11,d28,d2[1] - vmlal.u32 q12,d28,d3[0] - vzip.16 d29,d8 - vmlal.u32 q13,d28,d3[1] - - vmlal.u32 q6,d29,d4[0] - vmlal.u32 q7,d29,d4[1] - vmlal.u32 q8,d29,d5[0] - vmlal.u32 q9,d29,d5[1] - - vmlal.u32 q10,d29,d6[0] - vmov q5,q6 - vmlal.u32 q11,d29,d6[1] - vmov q6,q7 - vmlal.u32 q12,d29,d7[0] - vmov q7,q8 - vmlal.u32 q13,d29,d7[1] - vmov q8,q9 - vmov q9,q10 - vshr.u64 d10,d10,#16 - vmov q10,q11 - vmov q11,q12 - vadd.u64 d10,d10,d11 - vmov q12,q13 - veor q13,q13 - vshr.u64 d10,d10,#16 - - bne .LNEON_outer8 - - vadd.u64 d12,d12,d10 - mov r7,sp - vshr.u64 d10,d12,#16 - mov r8,r5 - vadd.u64 d13,d13,d10 - add r6,sp,#16 - vshr.u64 d10,d13,#16 - vzip.16 d12,d13 - - b .LNEON_tail2 - -.align 4 -.LNEON_1st: - vmlal.u32 q6,d29,d4[0] - vld1.32 {d0,d1,d2,d3}, [r1]! - vmlal.u32 q7,d29,d4[1] - subs r8,r8,#8 - vmlal.u32 q8,d29,d5[0] - vmlal.u32 q9,d29,d5[1] - - vmlal.u32 q10,d29,d6[0] - vld1.32 {d4,d5}, [r3]! - vmlal.u32 q11,d29,d6[1] - vst1.64 {q6,q7}, [r7,:256]! - vmlal.u32 q12,d29,d7[0] - vmlal.u32 q13,d29,d7[1] - vst1.64 {q8,q9}, [r7,:256]! - - vmull.u32 q6,d28,d0[0] - vld1.32 {d6,d7}, [r3]! - vmull.u32 q7,d28,d0[1] - vst1.64 {q10,q11}, [r7,:256]! - vmull.u32 q8,d28,d1[0] - vmull.u32 q9,d28,d1[1] - vst1.64 {q12,q13}, [r7,:256]! - - vmull.u32 q10,d28,d2[0] - vmull.u32 q11,d28,d2[1] - vmull.u32 q12,d28,d3[0] - vmull.u32 q13,d28,d3[1] - - bne .LNEON_1st - - vmlal.u32 q6,d29,d4[0] - add r6,sp,#16 - vmlal.u32 q7,d29,d4[1] - sub r1,r1,r5,lsl#2 @ rewind r1 - vmlal.u32 q8,d29,d5[0] - vld1.64 {q5}, [sp,:128] - vmlal.u32 q9,d29,d5[1] - sub r9,r5,#1 - - vmlal.u32 q10,d29,d6[0] - vst1.64 {q6,q7}, [r7,:256]! - vmlal.u32 q11,d29,d6[1] - vshr.u64 d10,d10,#16 - vld1.64 {q6}, [r6, :128]! - vmlal.u32 q12,d29,d7[0] - vst1.64 {q8,q9}, [r7,:256]! - vmlal.u32 q13,d29,d7[1] - - vst1.64 {q10,q11}, [r7,:256]! - vadd.u64 d10,d10,d11 - veor q4,q4,q4 - vst1.64 {q12,q13}, [r7,:256]! - vld1.64 {q7,q8}, [r6, :256]! - vst1.64 {q4}, [r7,:128] - vshr.u64 d10,d10,#16 - - b .LNEON_outer - -.align 4 -.LNEON_outer: - vld1.32 {d28[0]}, [r2,:32]! - sub r3,r3,r5,lsl#2 @ rewind r3 - vld1.32 {d0,d1,d2,d3}, [r1]! - veor d8,d8,d8 - mov r7,sp - vzip.16 d28,d8 - sub r8,r5,#8 - vadd.u64 d12,d12,d10 - - vmlal.u32 q6,d28,d0[0] - vld1.64 {q9,q10},[r6,:256]! - vmlal.u32 q7,d28,d0[1] - vmlal.u32 q8,d28,d1[0] - vld1.64 {q11,q12},[r6,:256]! - vmlal.u32 q9,d28,d1[1] - - vshl.i64 d10,d13,#16 - veor d8,d8,d8 - vadd.u64 d10,d10,d12 - vld1.64 {q13},[r6,:128]! - vmul.u32 d29,d10,d30 - - vmlal.u32 q10,d28,d2[0] - vld1.32 {d4,d5,d6,d7}, [r3]! - vmlal.u32 q11,d28,d2[1] - vmlal.u32 q12,d28,d3[0] - vzip.16 d29,d8 - vmlal.u32 q13,d28,d3[1] - -.LNEON_inner: - vmlal.u32 q6,d29,d4[0] - vld1.32 {d0,d1,d2,d3}, [r1]! - vmlal.u32 q7,d29,d4[1] - subs r8,r8,#8 - vmlal.u32 q8,d29,d5[0] - vmlal.u32 q9,d29,d5[1] - vst1.64 {q6,q7}, [r7,:256]! - - vmlal.u32 q10,d29,d6[0] - vld1.64 {q6}, [r6, :128]! - vmlal.u32 q11,d29,d6[1] - vst1.64 {q8,q9}, [r7,:256]! - vmlal.u32 q12,d29,d7[0] - vld1.64 {q7,q8}, [r6, :256]! - vmlal.u32 q13,d29,d7[1] - vst1.64 {q10,q11}, [r7,:256]! - - vmlal.u32 q6,d28,d0[0] - vld1.64 {q9,q10}, [r6, :256]! - vmlal.u32 q7,d28,d0[1] - vst1.64 {q12,q13}, [r7,:256]! - vmlal.u32 q8,d28,d1[0] - vld1.64 {q11,q12}, [r6, :256]! - vmlal.u32 q9,d28,d1[1] - vld1.32 {d4,d5,d6,d7}, [r3]! - - vmlal.u32 q10,d28,d2[0] - vld1.64 {q13}, [r6, :128]! - vmlal.u32 q11,d28,d2[1] - vmlal.u32 q12,d28,d3[0] - vmlal.u32 q13,d28,d3[1] - - bne .LNEON_inner - - vmlal.u32 q6,d29,d4[0] - add r6,sp,#16 - vmlal.u32 q7,d29,d4[1] - sub r1,r1,r5,lsl#2 @ rewind r1 - vmlal.u32 q8,d29,d5[0] - vld1.64 {q5}, [sp,:128] - vmlal.u32 q9,d29,d5[1] - subs r9,r9,#1 - - vmlal.u32 q10,d29,d6[0] - vst1.64 {q6,q7}, [r7,:256]! - vmlal.u32 q11,d29,d6[1] - vld1.64 {q6}, [r6, :128]! - vshr.u64 d10,d10,#16 - vst1.64 {q8,q9}, [r7,:256]! - vmlal.u32 q12,d29,d7[0] - vld1.64 {q7,q8}, [r6, :256]! - vmlal.u32 q13,d29,d7[1] - - vst1.64 {q10,q11}, [r7,:256]! - vadd.u64 d10,d10,d11 - vst1.64 {q12,q13}, [r7,:256]! - vshr.u64 d10,d10,#16 - - bne .LNEON_outer - - mov r7,sp - mov r8,r5 - -.LNEON_tail: - vadd.u64 d12,d12,d10 - vld1.64 {q9,q10}, [r6, :256]! - vshr.u64 d10,d12,#16 - vadd.u64 d13,d13,d10 - vld1.64 {q11,q12}, [r6, :256]! - vshr.u64 d10,d13,#16 - vld1.64 {q13}, [r6, :128]! - vzip.16 d12,d13 - -.LNEON_tail2: - vadd.u64 d14,d14,d10 - vst1.32 {d12[0]}, [r7, :32]! - vshr.u64 d10,d14,#16 - vadd.u64 d15,d15,d10 - vshr.u64 d10,d15,#16 - vzip.16 d14,d15 - - vadd.u64 d16,d16,d10 - vst1.32 {d14[0]}, [r7, :32]! - vshr.u64 d10,d16,#16 - vadd.u64 d17,d17,d10 - vshr.u64 d10,d17,#16 - vzip.16 d16,d17 - - vadd.u64 d18,d18,d10 - vst1.32 {d16[0]}, [r7, :32]! - vshr.u64 d10,d18,#16 - vadd.u64 d19,d19,d10 - vshr.u64 d10,d19,#16 - vzip.16 d18,d19 - - vadd.u64 d20,d20,d10 - vst1.32 {d18[0]}, [r7, :32]! - vshr.u64 d10,d20,#16 - vadd.u64 d21,d21,d10 - vshr.u64 d10,d21,#16 - vzip.16 d20,d21 - - vadd.u64 d22,d22,d10 - vst1.32 {d20[0]}, [r7, :32]! - vshr.u64 d10,d22,#16 - vadd.u64 d23,d23,d10 - vshr.u64 d10,d23,#16 - vzip.16 d22,d23 - - vadd.u64 d24,d24,d10 - vst1.32 {d22[0]}, [r7, :32]! - vshr.u64 d10,d24,#16 - vadd.u64 d25,d25,d10 - vld1.64 {q6}, [r6, :128]! - vshr.u64 d10,d25,#16 - vzip.16 d24,d25 - - vadd.u64 d26,d26,d10 - vst1.32 {d24[0]}, [r7, :32]! - vshr.u64 d10,d26,#16 - vadd.u64 d27,d27,d10 - vld1.64 {q7,q8}, [r6, :256]! - vshr.u64 d10,d27,#16 - vzip.16 d26,d27 - subs r8,r8,#8 - vst1.32 {d26[0]}, [r7, :32]! - - bne .LNEON_tail - - vst1.32 {d10[0]}, [r7, :32] @ top-most bit - sub r3,r3,r5,lsl#2 @ rewind r3 - subs r1,sp,#0 @ clear carry flag - add r2,sp,r5,lsl#2 - -.LNEON_sub: - ldmia r1!, {r4,r5,r6,r7} - ldmia r3!, {r8,r9,r10,r11} - sbcs r8, r4,r8 - sbcs r9, r5,r9 - sbcs r10,r6,r10 - sbcs r11,r7,r11 - teq r1,r2 @ preserves carry - stmia r0!, {r8,r9,r10,r11} - bne .LNEON_sub - - ldr r10, [r1] @ load top-most bit - veor q0,q0,q0 - sub r11,r2,sp @ this is num*4 - veor q1,q1,q1 - mov r1,sp - sub r0,r0,r11 @ rewind r0 - mov r3,r2 @ second 3/4th of frame - sbcs r10,r10,#0 @ result is carry flag - -.LNEON_copy_n_zap: - ldmia r1!, {r4,r5,r6,r7} - ldmia r0, {r8,r9,r10,r11} - movcc r8, r4 - vst1.64 {q0,q1}, [r3,:256]! @ wipe - movcc r9, r5 - movcc r10,r6 - vst1.64 {q0,q1}, [r3,:256]! @ wipe - movcc r11,r7 - ldmia r1, {r4,r5,r6,r7} - stmia r0!, {r8,r9,r10,r11} - sub r1,r1,#16 - ldmia r0, {r8,r9,r10,r11} - movcc r8, r4 - vst1.64 {q0,q1}, [r1,:256]! @ wipe - movcc r9, r5 - movcc r10,r6 - vst1.64 {q0,q1}, [r3,:256]! @ wipe - movcc r11,r7 - teq r1,r2 @ preserves carry - stmia r0!, {r8,r9,r10,r11} - bne .LNEON_copy_n_zap - - sub sp,ip,#96 - vldmia sp!,{d8,d9,d10,d11,d12,d13,d14,d15} - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11} - bx lr @ .word 0xe12fff1e -.size bn_mul8x_mont_neon,.-bn_mul8x_mont_neon -#endif -.byte 77,111,110,116,103,111,109,101,114,121,32,109,117,108,116,105,112,108,105,99,97,116,105,111,110,32,102,111,114,32,65,82,77,118,52,47,78,69,79,78,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 2 -.align 2 -#if __ARM_MAX_ARCH__>=7 -.comm OPENSSL_armcap_P,4,4 -.hidden OPENSSL_armcap_P -#endif -#endif \ No newline at end of file diff --git a/third_party/boringssl/linux-arm/crypto/modes/ghash-armv4.S b/third_party/boringssl/linux-arm/crypto/modes/ghash-armv4.S deleted file mode 100644 index c6f025d75974f..0000000000000 --- a/third_party/boringssl/linux-arm/crypto/modes/ghash-armv4.S +++ /dev/null @@ -1,541 +0,0 @@ -#if defined(__arm__) -#if defined(__arm__) -#include "arm_arch.h" - -.syntax unified - -.text -.code 32 - -#ifdef __APPLE__ -#define ldrplb ldrbpl -#define ldrneb ldrbne -#endif - -.type rem_4bit,%object -.align 5 -rem_4bit: -.short 0x0000,0x1C20,0x3840,0x2460 -.short 0x7080,0x6CA0,0x48C0,0x54E0 -.short 0xE100,0xFD20,0xD940,0xC560 -.short 0x9180,0x8DA0,0xA9C0,0xB5E0 -.size rem_4bit,.-rem_4bit - -.type rem_4bit_get,%function -rem_4bit_get: - sub r2,pc,#8 - sub r2,r2,#32 @ &rem_4bit - b .Lrem_4bit_got - nop -.size rem_4bit_get,.-rem_4bit_get - -.globl gcm_ghash_4bit -.hidden gcm_ghash_4bit -.type gcm_ghash_4bit,%function -gcm_ghash_4bit: - sub r12,pc,#8 - add r3,r2,r3 @ r3 to point at the end - stmdb sp!,{r3,r4,r5,r6,r7,r8,r9,r10,r11,lr} @ save r3/end too - sub r12,r12,#48 @ &rem_4bit - - ldmia r12,{r4,r5,r6,r7,r8,r9,r10,r11} @ copy rem_4bit ... - stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11} @ ... to stack - - ldrb r12,[r2,#15] - ldrb r14,[r0,#15] -.Louter: - eor r12,r12,r14 - and r14,r12,#0xf0 - and r12,r12,#0x0f - mov r3,#14 - - add r7,r1,r12,lsl#4 - ldmia r7,{r4,r5,r6,r7} @ load Htbl[nlo] - add r11,r1,r14 - ldrb r12,[r2,#14] - - and r14,r4,#0xf @ rem - ldmia r11,{r8,r9,r10,r11} @ load Htbl[nhi] - add r14,r14,r14 - eor r4,r8,r4,lsr#4 - ldrh r8,[sp,r14] @ rem_4bit[rem] - eor r4,r4,r5,lsl#28 - ldrb r14,[r0,#14] - eor r5,r9,r5,lsr#4 - eor r5,r5,r6,lsl#28 - eor r6,r10,r6,lsr#4 - eor r6,r6,r7,lsl#28 - eor r7,r11,r7,lsr#4 - eor r12,r12,r14 - and r14,r12,#0xf0 - and r12,r12,#0x0f - eor r7,r7,r8,lsl#16 - -.Linner: - add r11,r1,r12,lsl#4 - and r12,r4,#0xf @ rem - subs r3,r3,#1 - add r12,r12,r12 - ldmia r11,{r8,r9,r10,r11} @ load Htbl[nlo] - eor r4,r8,r4,lsr#4 - eor r4,r4,r5,lsl#28 - eor r5,r9,r5,lsr#4 - eor r5,r5,r6,lsl#28 - ldrh r8,[sp,r12] @ rem_4bit[rem] - eor r6,r10,r6,lsr#4 - ldrbpl r12,[r2,r3] - eor r6,r6,r7,lsl#28 - eor r7,r11,r7,lsr#4 - - add r11,r1,r14 - and r14,r4,#0xf @ rem - eor r7,r7,r8,lsl#16 @ ^= rem_4bit[rem] - add r14,r14,r14 - ldmia r11,{r8,r9,r10,r11} @ load Htbl[nhi] - eor r4,r8,r4,lsr#4 - ldrbpl r8,[r0,r3] - eor r4,r4,r5,lsl#28 - eor r5,r9,r5,lsr#4 - ldrh r9,[sp,r14] - eor r5,r5,r6,lsl#28 - eor r6,r10,r6,lsr#4 - eor r6,r6,r7,lsl#28 - eorpl r12,r12,r8 - eor r7,r11,r7,lsr#4 - andpl r14,r12,#0xf0 - andpl r12,r12,#0x0f - eor r7,r7,r9,lsl#16 @ ^= rem_4bit[rem] - bpl .Linner - - ldr r3,[sp,#32] @ re-load r3/end - add r2,r2,#16 - mov r14,r4 -#if __ARM_ARCH__>=7 && defined(__ARMEL__) - rev r4,r4 - str r4,[r0,#12] -#elif defined(__ARMEB__) - str r4,[r0,#12] -#else - mov r9,r4,lsr#8 - strb r4,[r0,#12+3] - mov r10,r4,lsr#16 - strb r9,[r0,#12+2] - mov r11,r4,lsr#24 - strb r10,[r0,#12+1] - strb r11,[r0,#12] -#endif - cmp r2,r3 -#if __ARM_ARCH__>=7 && defined(__ARMEL__) - rev r5,r5 - str r5,[r0,#8] -#elif defined(__ARMEB__) - str r5,[r0,#8] -#else - mov r9,r5,lsr#8 - strb r5,[r0,#8+3] - mov r10,r5,lsr#16 - strb r9,[r0,#8+2] - mov r11,r5,lsr#24 - strb r10,[r0,#8+1] - strb r11,[r0,#8] -#endif - ldrbne r12,[r2,#15] -#if __ARM_ARCH__>=7 && defined(__ARMEL__) - rev r6,r6 - str r6,[r0,#4] -#elif defined(__ARMEB__) - str r6,[r0,#4] -#else - mov r9,r6,lsr#8 - strb r6,[r0,#4+3] - mov r10,r6,lsr#16 - strb r9,[r0,#4+2] - mov r11,r6,lsr#24 - strb r10,[r0,#4+1] - strb r11,[r0,#4] -#endif - -#if __ARM_ARCH__>=7 && defined(__ARMEL__) - rev r7,r7 - str r7,[r0,#0] -#elif defined(__ARMEB__) - str r7,[r0,#0] -#else - mov r9,r7,lsr#8 - strb r7,[r0,#0+3] - mov r10,r7,lsr#16 - strb r9,[r0,#0+2] - mov r11,r7,lsr#24 - strb r10,[r0,#0+1] - strb r11,[r0,#0] -#endif - - bne .Louter - - add sp,sp,#36 -#if __ARM_ARCH__>=5 - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,pc} -#else - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,lr} - tst lr,#1 - moveq pc,lr @ be binary compatible with V4, yet -.word 0xe12fff1e @ interoperable with Thumb ISA:-) -#endif -.size gcm_ghash_4bit,.-gcm_ghash_4bit - -.globl gcm_gmult_4bit -.hidden gcm_gmult_4bit -.type gcm_gmult_4bit,%function -gcm_gmult_4bit: - stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11,lr} - ldrb r12,[r0,#15] - b rem_4bit_get -.Lrem_4bit_got: - and r14,r12,#0xf0 - and r12,r12,#0x0f - mov r3,#14 - - add r7,r1,r12,lsl#4 - ldmia r7,{r4,r5,r6,r7} @ load Htbl[nlo] - ldrb r12,[r0,#14] - - add r11,r1,r14 - and r14,r4,#0xf @ rem - ldmia r11,{r8,r9,r10,r11} @ load Htbl[nhi] - add r14,r14,r14 - eor r4,r8,r4,lsr#4 - ldrh r8,[r2,r14] @ rem_4bit[rem] - eor r4,r4,r5,lsl#28 - eor r5,r9,r5,lsr#4 - eor r5,r5,r6,lsl#28 - eor r6,r10,r6,lsr#4 - eor r6,r6,r7,lsl#28 - eor r7,r11,r7,lsr#4 - and r14,r12,#0xf0 - eor r7,r7,r8,lsl#16 - and r12,r12,#0x0f - -.Loop: - add r11,r1,r12,lsl#4 - and r12,r4,#0xf @ rem - subs r3,r3,#1 - add r12,r12,r12 - ldmia r11,{r8,r9,r10,r11} @ load Htbl[nlo] - eor r4,r8,r4,lsr#4 - eor r4,r4,r5,lsl#28 - eor r5,r9,r5,lsr#4 - eor r5,r5,r6,lsl#28 - ldrh r8,[r2,r12] @ rem_4bit[rem] - eor r6,r10,r6,lsr#4 - ldrbpl r12,[r0,r3] - eor r6,r6,r7,lsl#28 - eor r7,r11,r7,lsr#4 - - add r11,r1,r14 - and r14,r4,#0xf @ rem - eor r7,r7,r8,lsl#16 @ ^= rem_4bit[rem] - add r14,r14,r14 - ldmia r11,{r8,r9,r10,r11} @ load Htbl[nhi] - eor r4,r8,r4,lsr#4 - eor r4,r4,r5,lsl#28 - eor r5,r9,r5,lsr#4 - ldrh r8,[r2,r14] @ rem_4bit[rem] - eor r5,r5,r6,lsl#28 - eor r6,r10,r6,lsr#4 - eor r6,r6,r7,lsl#28 - eor r7,r11,r7,lsr#4 - andpl r14,r12,#0xf0 - andpl r12,r12,#0x0f - eor r7,r7,r8,lsl#16 @ ^= rem_4bit[rem] - bpl .Loop -#if __ARM_ARCH__>=7 && defined(__ARMEL__) - rev r4,r4 - str r4,[r0,#12] -#elif defined(__ARMEB__) - str r4,[r0,#12] -#else - mov r9,r4,lsr#8 - strb r4,[r0,#12+3] - mov r10,r4,lsr#16 - strb r9,[r0,#12+2] - mov r11,r4,lsr#24 - strb r10,[r0,#12+1] - strb r11,[r0,#12] -#endif - -#if __ARM_ARCH__>=7 && defined(__ARMEL__) - rev r5,r5 - str r5,[r0,#8] -#elif defined(__ARMEB__) - str r5,[r0,#8] -#else - mov r9,r5,lsr#8 - strb r5,[r0,#8+3] - mov r10,r5,lsr#16 - strb r9,[r0,#8+2] - mov r11,r5,lsr#24 - strb r10,[r0,#8+1] - strb r11,[r0,#8] -#endif - -#if __ARM_ARCH__>=7 && defined(__ARMEL__) - rev r6,r6 - str r6,[r0,#4] -#elif defined(__ARMEB__) - str r6,[r0,#4] -#else - mov r9,r6,lsr#8 - strb r6,[r0,#4+3] - mov r10,r6,lsr#16 - strb r9,[r0,#4+2] - mov r11,r6,lsr#24 - strb r10,[r0,#4+1] - strb r11,[r0,#4] -#endif - -#if __ARM_ARCH__>=7 && defined(__ARMEL__) - rev r7,r7 - str r7,[r0,#0] -#elif defined(__ARMEB__) - str r7,[r0,#0] -#else - mov r9,r7,lsr#8 - strb r7,[r0,#0+3] - mov r10,r7,lsr#16 - strb r9,[r0,#0+2] - mov r11,r7,lsr#24 - strb r10,[r0,#0+1] - strb r11,[r0,#0] -#endif - -#if __ARM_ARCH__>=5 - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,pc} -#else - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,lr} - tst lr,#1 - moveq pc,lr @ be binary compatible with V4, yet -.word 0xe12fff1e @ interoperable with Thumb ISA:-) -#endif -.size gcm_gmult_4bit,.-gcm_gmult_4bit -#if __ARM_MAX_ARCH__>=7 -.arch armv7-a -.fpu neon - -.globl gcm_init_neon -.hidden gcm_init_neon -.type gcm_init_neon,%function -.align 4 -gcm_init_neon: - vld1.64 d7,[r1]! @ load H - vmov.i8 q8,#0xe1 - vld1.64 d6,[r1] - vshl.i64 d17,#57 - vshr.u64 d16,#63 @ t0=0xc2....01 - vdup.8 q9,d7[7] - vshr.u64 d26,d6,#63 - vshr.s8 q9,#7 @ broadcast carry bit - vshl.i64 q3,q3,#1 - vand q8,q8,q9 - vorr d7,d26 @ H<<<=1 - veor q3,q3,q8 @ twisted H - vstmia r0,{q3} - - bx lr @ bx lr -.size gcm_init_neon,.-gcm_init_neon - -.globl gcm_gmult_neon -.hidden gcm_gmult_neon -.type gcm_gmult_neon,%function -.align 4 -gcm_gmult_neon: - vld1.64 d7,[r0]! @ load Xi - vld1.64 d6,[r0]! - vmov.i64 d29,#0x0000ffffffffffff - vldmia r1,{d26,d27} @ load twisted H - vmov.i64 d30,#0x00000000ffffffff -#ifdef __ARMEL__ - vrev64.8 q3,q3 -#endif - vmov.i64 d31,#0x000000000000ffff - veor d28,d26,d27 @ Karatsuba pre-processing - mov r3,#16 - b .Lgmult_neon -.size gcm_gmult_neon,.-gcm_gmult_neon - -.globl gcm_ghash_neon -.hidden gcm_ghash_neon -.type gcm_ghash_neon,%function -.align 4 -gcm_ghash_neon: - vld1.64 d1,[r0]! @ load Xi - vld1.64 d0,[r0]! - vmov.i64 d29,#0x0000ffffffffffff - vldmia r1,{d26,d27} @ load twisted H - vmov.i64 d30,#0x00000000ffffffff -#ifdef __ARMEL__ - vrev64.8 q0,q0 -#endif - vmov.i64 d31,#0x000000000000ffff - veor d28,d26,d27 @ Karatsuba pre-processing - -.Loop_neon: - vld1.64 d7,[r2]! @ load inp - vld1.64 d6,[r2]! -#ifdef __ARMEL__ - vrev64.8 q3,q3 -#endif - veor q3,q0 @ inp^=Xi -.Lgmult_neon: - vext.8 d16, d26, d26, #1 @ A1 - vmull.p8 q8, d16, d6 @ F = A1*B - vext.8 d0, d6, d6, #1 @ B1 - vmull.p8 q0, d26, d0 @ E = A*B1 - vext.8 d18, d26, d26, #2 @ A2 - vmull.p8 q9, d18, d6 @ H = A2*B - vext.8 d22, d6, d6, #2 @ B2 - vmull.p8 q11, d26, d22 @ G = A*B2 - vext.8 d20, d26, d26, #3 @ A3 - veor q8, q8, q0 @ L = E + F - vmull.p8 q10, d20, d6 @ J = A3*B - vext.8 d0, d6, d6, #3 @ B3 - veor q9, q9, q11 @ M = G + H - vmull.p8 q0, d26, d0 @ I = A*B3 - veor d16, d16, d17 @ t0 = (L) (P0 + P1) << 8 - vand d17, d17, d29 - vext.8 d22, d6, d6, #4 @ B4 - veor d18, d18, d19 @ t1 = (M) (P2 + P3) << 16 - vand d19, d19, d30 - vmull.p8 q11, d26, d22 @ K = A*B4 - veor q10, q10, q0 @ N = I + J - veor d16, d16, d17 - veor d18, d18, d19 - veor d20, d20, d21 @ t2 = (N) (P4 + P5) << 24 - vand d21, d21, d31 - vext.8 q8, q8, q8, #15 - veor d22, d22, d23 @ t3 = (K) (P6 + P7) << 32 - vmov.i64 d23, #0 - vext.8 q9, q9, q9, #14 - veor d20, d20, d21 - vmull.p8 q0, d26, d6 @ D = A*B - vext.8 q11, q11, q11, #12 - vext.8 q10, q10, q10, #13 - veor q8, q8, q9 - veor q10, q10, q11 - veor q0, q0, q8 - veor q0, q0, q10 - veor d6,d6,d7 @ Karatsuba pre-processing - vext.8 d16, d28, d28, #1 @ A1 - vmull.p8 q8, d16, d6 @ F = A1*B - vext.8 d2, d6, d6, #1 @ B1 - vmull.p8 q1, d28, d2 @ E = A*B1 - vext.8 d18, d28, d28, #2 @ A2 - vmull.p8 q9, d18, d6 @ H = A2*B - vext.8 d22, d6, d6, #2 @ B2 - vmull.p8 q11, d28, d22 @ G = A*B2 - vext.8 d20, d28, d28, #3 @ A3 - veor q8, q8, q1 @ L = E + F - vmull.p8 q10, d20, d6 @ J = A3*B - vext.8 d2, d6, d6, #3 @ B3 - veor q9, q9, q11 @ M = G + H - vmull.p8 q1, d28, d2 @ I = A*B3 - veor d16, d16, d17 @ t0 = (L) (P0 + P1) << 8 - vand d17, d17, d29 - vext.8 d22, d6, d6, #4 @ B4 - veor d18, d18, d19 @ t1 = (M) (P2 + P3) << 16 - vand d19, d19, d30 - vmull.p8 q11, d28, d22 @ K = A*B4 - veor q10, q10, q1 @ N = I + J - veor d16, d16, d17 - veor d18, d18, d19 - veor d20, d20, d21 @ t2 = (N) (P4 + P5) << 24 - vand d21, d21, d31 - vext.8 q8, q8, q8, #15 - veor d22, d22, d23 @ t3 = (K) (P6 + P7) << 32 - vmov.i64 d23, #0 - vext.8 q9, q9, q9, #14 - veor d20, d20, d21 - vmull.p8 q1, d28, d6 @ D = A*B - vext.8 q11, q11, q11, #12 - vext.8 q10, q10, q10, #13 - veor q8, q8, q9 - veor q10, q10, q11 - veor q1, q1, q8 - veor q1, q1, q10 - vext.8 d16, d27, d27, #1 @ A1 - vmull.p8 q8, d16, d7 @ F = A1*B - vext.8 d4, d7, d7, #1 @ B1 - vmull.p8 q2, d27, d4 @ E = A*B1 - vext.8 d18, d27, d27, #2 @ A2 - vmull.p8 q9, d18, d7 @ H = A2*B - vext.8 d22, d7, d7, #2 @ B2 - vmull.p8 q11, d27, d22 @ G = A*B2 - vext.8 d20, d27, d27, #3 @ A3 - veor q8, q8, q2 @ L = E + F - vmull.p8 q10, d20, d7 @ J = A3*B - vext.8 d4, d7, d7, #3 @ B3 - veor q9, q9, q11 @ M = G + H - vmull.p8 q2, d27, d4 @ I = A*B3 - veor d16, d16, d17 @ t0 = (L) (P0 + P1) << 8 - vand d17, d17, d29 - vext.8 d22, d7, d7, #4 @ B4 - veor d18, d18, d19 @ t1 = (M) (P2 + P3) << 16 - vand d19, d19, d30 - vmull.p8 q11, d27, d22 @ K = A*B4 - veor q10, q10, q2 @ N = I + J - veor d16, d16, d17 - veor d18, d18, d19 - veor d20, d20, d21 @ t2 = (N) (P4 + P5) << 24 - vand d21, d21, d31 - vext.8 q8, q8, q8, #15 - veor d22, d22, d23 @ t3 = (K) (P6 + P7) << 32 - vmov.i64 d23, #0 - vext.8 q9, q9, q9, #14 - veor d20, d20, d21 - vmull.p8 q2, d27, d7 @ D = A*B - vext.8 q11, q11, q11, #12 - vext.8 q10, q10, q10, #13 - veor q8, q8, q9 - veor q10, q10, q11 - veor q2, q2, q8 - veor q2, q2, q10 - veor q1,q1,q0 @ Karatsuba post-processing - veor q1,q1,q2 - veor d1,d1,d2 - veor d4,d4,d3 @ Xh|Xl - 256-bit result - - @ equivalent of reduction_avx from ghash-x86_64.pl - vshl.i64 q9,q0,#57 @ 1st phase - vshl.i64 q10,q0,#62 - veor q10,q10,q9 @ - vshl.i64 q9,q0,#63 - veor q10, q10, q9 @ - veor d1,d1,d20 @ - veor d4,d4,d21 - - vshr.u64 q10,q0,#1 @ 2nd phase - veor q2,q2,q0 - veor q0,q0,q10 @ - vshr.u64 q10,q10,#6 - vshr.u64 q0,q0,#1 @ - veor q0,q0,q2 @ - veor q0,q0,q10 @ - - subs r3,#16 - bne .Loop_neon - -#ifdef __ARMEL__ - vrev64.8 q0,q0 -#endif - sub r0,#16 - vst1.64 d1,[r0]! @ write out Xi - vst1.64 d0,[r0] - - bx lr @ bx lr -.size gcm_ghash_neon,.-gcm_ghash_neon -#endif -.byte 71,72,65,83,72,32,102,111,114,32,65,82,77,118,52,47,78,69,79,78,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 2 -.align 2 - -#endif -#endif \ No newline at end of file diff --git a/third_party/boringssl/linux-arm/crypto/modes/ghashv8-armx32.S b/third_party/boringssl/linux-arm/crypto/modes/ghashv8-armx32.S deleted file mode 100644 index bdbbae90d4da7..0000000000000 --- a/third_party/boringssl/linux-arm/crypto/modes/ghashv8-armx32.S +++ /dev/null @@ -1,233 +0,0 @@ -#if defined(__arm__) -#include "arm_arch.h" - -.text -.fpu neon -.code 32 -.globl gcm_init_v8 -.type gcm_init_v8,%function -.align 4 -gcm_init_v8: - vld1.64 {q9},[r1] @ load input H - vmov.i8 q11,#0xe1 - vshl.i64 q11,q11,#57 @ 0xc2.0 - vext.8 q3,q9,q9,#8 - vshr.u64 q10,q11,#63 - vdup.32 q9,d18[1] - vext.8 q8,q10,q11,#8 @ t0=0xc2....01 - vshr.u64 q10,q3,#63 - vshr.s32 q9,q9,#31 @ broadcast carry bit - vand q10,q10,q8 - vshl.i64 q3,q3,#1 - vext.8 q10,q10,q10,#8 - vand q8,q8,q9 - vorr q3,q3,q10 @ H<<<=1 - veor q12,q3,q8 @ twisted H - vst1.64 {q12},[r0]! @ store Htable[0] - - @ calculate H^2 - vext.8 q8,q12,q12,#8 @ Karatsuba pre-processing -.byte 0xa8,0x0e,0xa8,0xf2 @ pmull q0,q12,q12 - veor q8,q8,q12 -.byte 0xa9,0x4e,0xa9,0xf2 @ pmull2 q2,q12,q12 -.byte 0xa0,0x2e,0xa0,0xf2 @ pmull q1,q8,q8 - - vext.8 q9,q0,q2,#8 @ Karatsuba post-processing - veor q10,q0,q2 - veor q1,q1,q9 - veor q1,q1,q10 -.byte 0x26,0x4e,0xe0,0xf2 @ pmull q10,q0,q11 @ 1st phase - - vmov d4,d3 @ Xh|Xm - 256-bit result - vmov d3,d0 @ Xm is rotated Xl - veor q0,q1,q10 - - vext.8 q10,q0,q0,#8 @ 2nd phase -.byte 0x26,0x0e,0xa0,0xf2 @ pmull q0,q0,q11 - veor q10,q10,q2 - veor q14,q0,q10 - - vext.8 q9,q14,q14,#8 @ Karatsuba pre-processing - veor q9,q9,q14 - vext.8 q13,q8,q9,#8 @ pack Karatsuba pre-processed - vst1.64 {q13,q14},[r0] @ store Htable[1..2] - - bx lr -.size gcm_init_v8,.-gcm_init_v8 -.globl gcm_gmult_v8 -.type gcm_gmult_v8,%function -.align 4 -gcm_gmult_v8: - vld1.64 {q9},[r0] @ load Xi - vmov.i8 q11,#0xe1 - vld1.64 {q12,q13},[r1] @ load twisted H, ... - vshl.u64 q11,q11,#57 -#ifndef __ARMEB__ - vrev64.8 q9,q9 -#endif - vext.8 q3,q9,q9,#8 - -.byte 0x86,0x0e,0xa8,0xf2 @ pmull q0,q12,q3 @ H.lo·Xi.lo - veor q9,q9,q3 @ Karatsuba pre-processing -.byte 0x87,0x4e,0xa9,0xf2 @ pmull2 q2,q12,q3 @ H.hi·Xi.hi -.byte 0xa2,0x2e,0xaa,0xf2 @ pmull q1,q13,q9 @ (H.lo+H.hi)·(Xi.lo+Xi.hi) - - vext.8 q9,q0,q2,#8 @ Karatsuba post-processing - veor q10,q0,q2 - veor q1,q1,q9 - veor q1,q1,q10 -.byte 0x26,0x4e,0xe0,0xf2 @ pmull q10,q0,q11 @ 1st phase of reduction - - vmov d4,d3 @ Xh|Xm - 256-bit result - vmov d3,d0 @ Xm is rotated Xl - veor q0,q1,q10 - - vext.8 q10,q0,q0,#8 @ 2nd phase of reduction -.byte 0x26,0x0e,0xa0,0xf2 @ pmull q0,q0,q11 - veor q10,q10,q2 - veor q0,q0,q10 - -#ifndef __ARMEB__ - vrev64.8 q0,q0 -#endif - vext.8 q0,q0,q0,#8 - vst1.64 {q0},[r0] @ write out Xi - - bx lr -.size gcm_gmult_v8,.-gcm_gmult_v8 -.globl gcm_ghash_v8 -.type gcm_ghash_v8,%function -.align 4 -gcm_ghash_v8: - vstmdb sp!,{d8,d9,d10,d11,d12,d13,d14,d15} @ 32-bit ABI says so - vld1.64 {q0},[r0] @ load [rotated] Xi - @ "[rotated]" means that - @ loaded value would have - @ to be rotated in order to - @ make it appear as in - @ alorithm specification - subs r3,r3,#32 @ see if r3 is 32 or larger - mov r12,#16 @ r12 is used as post- - @ increment for input pointer; - @ as loop is modulo-scheduled - @ r12 is zeroed just in time - @ to preclude oversteping - @ inp[len], which means that - @ last block[s] are actually - @ loaded twice, but last - @ copy is not processed - vld1.64 {q12,q13},[r1]! @ load twisted H, ..., H^2 - vmov.i8 q11,#0xe1 - vld1.64 {q14},[r1] - moveq r12,#0 @ is it time to zero r12? - vext.8 q0,q0,q0,#8 @ rotate Xi - vld1.64 {q8},[r2]! @ load [rotated] I[0] - vshl.u64 q11,q11,#57 @ compose 0xc2.0 constant -#ifndef __ARMEB__ - vrev64.8 q8,q8 - vrev64.8 q0,q0 -#endif - vext.8 q3,q8,q8,#8 @ rotate I[0] - blo .Lodd_tail_v8 @ r3 was less than 32 - vld1.64 {q9},[r2],r12 @ load [rotated] I[1] -#ifndef __ARMEB__ - vrev64.8 q9,q9 -#endif - vext.8 q7,q9,q9,#8 - veor q3,q3,q0 @ I[i]^=Xi -.byte 0x8e,0x8e,0xa8,0xf2 @ pmull q4,q12,q7 @ H·Ii+1 - veor q9,q9,q7 @ Karatsuba pre-processing -.byte 0x8f,0xce,0xa9,0xf2 @ pmull2 q6,q12,q7 - b .Loop_mod2x_v8 - -.align 4 -.Loop_mod2x_v8: - vext.8 q10,q3,q3,#8 - subs r3,r3,#32 @ is there more data? -.byte 0x86,0x0e,0xac,0xf2 @ pmull q0,q14,q3 @ H^2.lo·Xi.lo - movlo r12,#0 @ is it time to zero r12? - -.byte 0xa2,0xae,0xaa,0xf2 @ pmull q5,q13,q9 - veor q10,q10,q3 @ Karatsuba pre-processing -.byte 0x87,0x4e,0xad,0xf2 @ pmull2 q2,q14,q3 @ H^2.hi·Xi.hi - veor q0,q0,q4 @ accumulate -.byte 0xa5,0x2e,0xab,0xf2 @ pmull2 q1,q13,q10 @ (H^2.lo+H^2.hi)·(Xi.lo+Xi.hi) - vld1.64 {q8},[r2],r12 @ load [rotated] I[i+2] - - veor q2,q2,q6 - moveq r12,#0 @ is it time to zero r12? - veor q1,q1,q5 - - vext.8 q9,q0,q2,#8 @ Karatsuba post-processing - veor q10,q0,q2 - veor q1,q1,q9 - vld1.64 {q9},[r2],r12 @ load [rotated] I[i+3] -#ifndef __ARMEB__ - vrev64.8 q8,q8 -#endif - veor q1,q1,q10 -.byte 0x26,0x4e,0xe0,0xf2 @ pmull q10,q0,q11 @ 1st phase of reduction - -#ifndef __ARMEB__ - vrev64.8 q9,q9 -#endif - vmov d4,d3 @ Xh|Xm - 256-bit result - vmov d3,d0 @ Xm is rotated Xl - vext.8 q7,q9,q9,#8 - vext.8 q3,q8,q8,#8 - veor q0,q1,q10 -.byte 0x8e,0x8e,0xa8,0xf2 @ pmull q4,q12,q7 @ H·Ii+1 - veor q3,q3,q2 @ accumulate q3 early - - vext.8 q10,q0,q0,#8 @ 2nd phase of reduction -.byte 0x26,0x0e,0xa0,0xf2 @ pmull q0,q0,q11 - veor q3,q3,q10 - veor q9,q9,q7 @ Karatsuba pre-processing - veor q3,q3,q0 -.byte 0x8f,0xce,0xa9,0xf2 @ pmull2 q6,q12,q7 - bhs .Loop_mod2x_v8 @ there was at least 32 more bytes - - veor q2,q2,q10 - vext.8 q3,q8,q8,#8 @ re-construct q3 - adds r3,r3,#32 @ re-construct r3 - veor q0,q0,q2 @ re-construct q0 - beq .Ldone_v8 @ is r3 zero? -.Lodd_tail_v8: - vext.8 q10,q0,q0,#8 - veor q3,q3,q0 @ inp^=Xi - veor q9,q8,q10 @ q9 is rotated inp^Xi - -.byte 0x86,0x0e,0xa8,0xf2 @ pmull q0,q12,q3 @ H.lo·Xi.lo - veor q9,q9,q3 @ Karatsuba pre-processing -.byte 0x87,0x4e,0xa9,0xf2 @ pmull2 q2,q12,q3 @ H.hi·Xi.hi -.byte 0xa2,0x2e,0xaa,0xf2 @ pmull q1,q13,q9 @ (H.lo+H.hi)·(Xi.lo+Xi.hi) - - vext.8 q9,q0,q2,#8 @ Karatsuba post-processing - veor q10,q0,q2 - veor q1,q1,q9 - veor q1,q1,q10 -.byte 0x26,0x4e,0xe0,0xf2 @ pmull q10,q0,q11 @ 1st phase of reduction - - vmov d4,d3 @ Xh|Xm - 256-bit result - vmov d3,d0 @ Xm is rotated Xl - veor q0,q1,q10 - - vext.8 q10,q0,q0,#8 @ 2nd phase of reduction -.byte 0x26,0x0e,0xa0,0xf2 @ pmull q0,q0,q11 - veor q10,q10,q2 - veor q0,q0,q10 - -.Ldone_v8: -#ifndef __ARMEB__ - vrev64.8 q0,q0 -#endif - vext.8 q0,q0,q0,#8 - vst1.64 {q0},[r0] @ write out Xi - - vldmia sp!,{d8,d9,d10,d11,d12,d13,d14,d15} @ 32-bit ABI says so - bx lr -.size gcm_ghash_v8,.-gcm_ghash_v8 -.byte 71,72,65,83,72,32,102,111,114,32,65,82,77,118,56,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 2 -.align 2 -#endif \ No newline at end of file diff --git a/third_party/boringssl/linux-arm/crypto/sha/sha1-armv4-large.S b/third_party/boringssl/linux-arm/crypto/sha/sha1-armv4-large.S deleted file mode 100644 index 4911458b26277..0000000000000 --- a/third_party/boringssl/linux-arm/crypto/sha/sha1-armv4-large.S +++ /dev/null @@ -1,1462 +0,0 @@ -#if defined(__arm__) -#include "arm_arch.h" - -.text -.code 32 - -.globl sha1_block_data_order -.type sha1_block_data_order,%function - -.align 5 -sha1_block_data_order: -#if __ARM_MAX_ARCH__>=7 - sub r3,pc,#8 @ sha1_block_data_order - ldr r12,.LOPENSSL_armcap - ldr r12,[r3,r12] @ OPENSSL_armcap_P -#ifdef __APPLE__ - ldr r12,[r12] -#endif - tst r12,#ARMV8_SHA1 - bne .LARMv8 - tst r12,#ARMV7_NEON - bne .LNEON -#endif - stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} - add r2,r1,r2,lsl#6 @ r2 to point at the end of r1 - ldmia r0,{r3,r4,r5,r6,r7} -.Lloop: - ldr r8,.LK_00_19 - mov r14,sp - sub sp,sp,#15*4 - mov r5,r5,ror#30 - mov r6,r6,ror#30 - mov r7,r7,ror#30 @ [6] -.L_00_15: -#if __ARM_ARCH__<7 - ldrb r10,[r1,#2] - ldrb r9,[r1,#3] - ldrb r11,[r1,#1] - add r7,r8,r7,ror#2 @ E+=K_00_19 - ldrb r12,[r1],#4 - orr r9,r9,r10,lsl#8 - eor r10,r5,r6 @ F_xx_xx - orr r9,r9,r11,lsl#16 - add r7,r7,r3,ror#27 @ E+=ROR(A,27) - orr r9,r9,r12,lsl#24 -#else - ldr r9,[r1],#4 @ handles unaligned - add r7,r8,r7,ror#2 @ E+=K_00_19 - eor r10,r5,r6 @ F_xx_xx - add r7,r7,r3,ror#27 @ E+=ROR(A,27) -#ifdef __ARMEL__ - rev r9,r9 @ byte swap -#endif -#endif - and r10,r4,r10,ror#2 - add r7,r7,r9 @ E+=X[i] - eor r10,r10,r6,ror#2 @ F_00_19(B,C,D) - str r9,[r14,#-4]! - add r7,r7,r10 @ E+=F_00_19(B,C,D) -#if __ARM_ARCH__<7 - ldrb r10,[r1,#2] - ldrb r9,[r1,#3] - ldrb r11,[r1,#1] - add r6,r8,r6,ror#2 @ E+=K_00_19 - ldrb r12,[r1],#4 - orr r9,r9,r10,lsl#8 - eor r10,r4,r5 @ F_xx_xx - orr r9,r9,r11,lsl#16 - add r6,r6,r7,ror#27 @ E+=ROR(A,27) - orr r9,r9,r12,lsl#24 -#else - ldr r9,[r1],#4 @ handles unaligned - add r6,r8,r6,ror#2 @ E+=K_00_19 - eor r10,r4,r5 @ F_xx_xx - add r6,r6,r7,ror#27 @ E+=ROR(A,27) -#ifdef __ARMEL__ - rev r9,r9 @ byte swap -#endif -#endif - and r10,r3,r10,ror#2 - add r6,r6,r9 @ E+=X[i] - eor r10,r10,r5,ror#2 @ F_00_19(B,C,D) - str r9,[r14,#-4]! - add r6,r6,r10 @ E+=F_00_19(B,C,D) -#if __ARM_ARCH__<7 - ldrb r10,[r1,#2] - ldrb r9,[r1,#3] - ldrb r11,[r1,#1] - add r5,r8,r5,ror#2 @ E+=K_00_19 - ldrb r12,[r1],#4 - orr r9,r9,r10,lsl#8 - eor r10,r3,r4 @ F_xx_xx - orr r9,r9,r11,lsl#16 - add r5,r5,r6,ror#27 @ E+=ROR(A,27) - orr r9,r9,r12,lsl#24 -#else - ldr r9,[r1],#4 @ handles unaligned - add r5,r8,r5,ror#2 @ E+=K_00_19 - eor r10,r3,r4 @ F_xx_xx - add r5,r5,r6,ror#27 @ E+=ROR(A,27) -#ifdef __ARMEL__ - rev r9,r9 @ byte swap -#endif -#endif - and r10,r7,r10,ror#2 - add r5,r5,r9 @ E+=X[i] - eor r10,r10,r4,ror#2 @ F_00_19(B,C,D) - str r9,[r14,#-4]! - add r5,r5,r10 @ E+=F_00_19(B,C,D) -#if __ARM_ARCH__<7 - ldrb r10,[r1,#2] - ldrb r9,[r1,#3] - ldrb r11,[r1,#1] - add r4,r8,r4,ror#2 @ E+=K_00_19 - ldrb r12,[r1],#4 - orr r9,r9,r10,lsl#8 - eor r10,r7,r3 @ F_xx_xx - orr r9,r9,r11,lsl#16 - add r4,r4,r5,ror#27 @ E+=ROR(A,27) - orr r9,r9,r12,lsl#24 -#else - ldr r9,[r1],#4 @ handles unaligned - add r4,r8,r4,ror#2 @ E+=K_00_19 - eor r10,r7,r3 @ F_xx_xx - add r4,r4,r5,ror#27 @ E+=ROR(A,27) -#ifdef __ARMEL__ - rev r9,r9 @ byte swap -#endif -#endif - and r10,r6,r10,ror#2 - add r4,r4,r9 @ E+=X[i] - eor r10,r10,r3,ror#2 @ F_00_19(B,C,D) - str r9,[r14,#-4]! - add r4,r4,r10 @ E+=F_00_19(B,C,D) -#if __ARM_ARCH__<7 - ldrb r10,[r1,#2] - ldrb r9,[r1,#3] - ldrb r11,[r1,#1] - add r3,r8,r3,ror#2 @ E+=K_00_19 - ldrb r12,[r1],#4 - orr r9,r9,r10,lsl#8 - eor r10,r6,r7 @ F_xx_xx - orr r9,r9,r11,lsl#16 - add r3,r3,r4,ror#27 @ E+=ROR(A,27) - orr r9,r9,r12,lsl#24 -#else - ldr r9,[r1],#4 @ handles unaligned - add r3,r8,r3,ror#2 @ E+=K_00_19 - eor r10,r6,r7 @ F_xx_xx - add r3,r3,r4,ror#27 @ E+=ROR(A,27) -#ifdef __ARMEL__ - rev r9,r9 @ byte swap -#endif -#endif - and r10,r5,r10,ror#2 - add r3,r3,r9 @ E+=X[i] - eor r10,r10,r7,ror#2 @ F_00_19(B,C,D) - str r9,[r14,#-4]! - add r3,r3,r10 @ E+=F_00_19(B,C,D) - teq r14,sp - bne .L_00_15 @ [((11+4)*5+2)*3] - sub sp,sp,#25*4 -#if __ARM_ARCH__<7 - ldrb r10,[r1,#2] - ldrb r9,[r1,#3] - ldrb r11,[r1,#1] - add r7,r8,r7,ror#2 @ E+=K_00_19 - ldrb r12,[r1],#4 - orr r9,r9,r10,lsl#8 - eor r10,r5,r6 @ F_xx_xx - orr r9,r9,r11,lsl#16 - add r7,r7,r3,ror#27 @ E+=ROR(A,27) - orr r9,r9,r12,lsl#24 -#else - ldr r9,[r1],#4 @ handles unaligned - add r7,r8,r7,ror#2 @ E+=K_00_19 - eor r10,r5,r6 @ F_xx_xx - add r7,r7,r3,ror#27 @ E+=ROR(A,27) -#ifdef __ARMEL__ - rev r9,r9 @ byte swap -#endif -#endif - and r10,r4,r10,ror#2 - add r7,r7,r9 @ E+=X[i] - eor r10,r10,r6,ror#2 @ F_00_19(B,C,D) - str r9,[r14,#-4]! - add r7,r7,r10 @ E+=F_00_19(B,C,D) - ldr r9,[r14,#15*4] - ldr r10,[r14,#13*4] - ldr r11,[r14,#7*4] - add r6,r8,r6,ror#2 @ E+=K_xx_xx - ldr r12,[r14,#2*4] - eor r9,r9,r10 - eor r11,r11,r12 @ 1 cycle stall - eor r10,r4,r5 @ F_xx_xx - mov r9,r9,ror#31 - add r6,r6,r7,ror#27 @ E+=ROR(A,27) - eor r9,r9,r11,ror#31 - str r9,[r14,#-4]! - and r10,r3,r10,ror#2 @ F_xx_xx - @ F_xx_xx - add r6,r6,r9 @ E+=X[i] - eor r10,r10,r5,ror#2 @ F_00_19(B,C,D) - add r6,r6,r10 @ E+=F_00_19(B,C,D) - ldr r9,[r14,#15*4] - ldr r10,[r14,#13*4] - ldr r11,[r14,#7*4] - add r5,r8,r5,ror#2 @ E+=K_xx_xx - ldr r12,[r14,#2*4] - eor r9,r9,r10 - eor r11,r11,r12 @ 1 cycle stall - eor r10,r3,r4 @ F_xx_xx - mov r9,r9,ror#31 - add r5,r5,r6,ror#27 @ E+=ROR(A,27) - eor r9,r9,r11,ror#31 - str r9,[r14,#-4]! - and r10,r7,r10,ror#2 @ F_xx_xx - @ F_xx_xx - add r5,r5,r9 @ E+=X[i] - eor r10,r10,r4,ror#2 @ F_00_19(B,C,D) - add r5,r5,r10 @ E+=F_00_19(B,C,D) - ldr r9,[r14,#15*4] - ldr r10,[r14,#13*4] - ldr r11,[r14,#7*4] - add r4,r8,r4,ror#2 @ E+=K_xx_xx - ldr r12,[r14,#2*4] - eor r9,r9,r10 - eor r11,r11,r12 @ 1 cycle stall - eor r10,r7,r3 @ F_xx_xx - mov r9,r9,ror#31 - add r4,r4,r5,ror#27 @ E+=ROR(A,27) - eor r9,r9,r11,ror#31 - str r9,[r14,#-4]! - and r10,r6,r10,ror#2 @ F_xx_xx - @ F_xx_xx - add r4,r4,r9 @ E+=X[i] - eor r10,r10,r3,ror#2 @ F_00_19(B,C,D) - add r4,r4,r10 @ E+=F_00_19(B,C,D) - ldr r9,[r14,#15*4] - ldr r10,[r14,#13*4] - ldr r11,[r14,#7*4] - add r3,r8,r3,ror#2 @ E+=K_xx_xx - ldr r12,[r14,#2*4] - eor r9,r9,r10 - eor r11,r11,r12 @ 1 cycle stall - eor r10,r6,r7 @ F_xx_xx - mov r9,r9,ror#31 - add r3,r3,r4,ror#27 @ E+=ROR(A,27) - eor r9,r9,r11,ror#31 - str r9,[r14,#-4]! - and r10,r5,r10,ror#2 @ F_xx_xx - @ F_xx_xx - add r3,r3,r9 @ E+=X[i] - eor r10,r10,r7,ror#2 @ F_00_19(B,C,D) - add r3,r3,r10 @ E+=F_00_19(B,C,D) - - ldr r8,.LK_20_39 @ [+15+16*4] - cmn sp,#0 @ [+3], clear carry to denote 20_39 -.L_20_39_or_60_79: - ldr r9,[r14,#15*4] - ldr r10,[r14,#13*4] - ldr r11,[r14,#7*4] - add r7,r8,r7,ror#2 @ E+=K_xx_xx - ldr r12,[r14,#2*4] - eor r9,r9,r10 - eor r11,r11,r12 @ 1 cycle stall - eor r10,r5,r6 @ F_xx_xx - mov r9,r9,ror#31 - add r7,r7,r3,ror#27 @ E+=ROR(A,27) - eor r9,r9,r11,ror#31 - str r9,[r14,#-4]! - eor r10,r4,r10,ror#2 @ F_xx_xx - @ F_xx_xx - add r7,r7,r9 @ E+=X[i] - add r7,r7,r10 @ E+=F_20_39(B,C,D) - ldr r9,[r14,#15*4] - ldr r10,[r14,#13*4] - ldr r11,[r14,#7*4] - add r6,r8,r6,ror#2 @ E+=K_xx_xx - ldr r12,[r14,#2*4] - eor r9,r9,r10 - eor r11,r11,r12 @ 1 cycle stall - eor r10,r4,r5 @ F_xx_xx - mov r9,r9,ror#31 - add r6,r6,r7,ror#27 @ E+=ROR(A,27) - eor r9,r9,r11,ror#31 - str r9,[r14,#-4]! - eor r10,r3,r10,ror#2 @ F_xx_xx - @ F_xx_xx - add r6,r6,r9 @ E+=X[i] - add r6,r6,r10 @ E+=F_20_39(B,C,D) - ldr r9,[r14,#15*4] - ldr r10,[r14,#13*4] - ldr r11,[r14,#7*4] - add r5,r8,r5,ror#2 @ E+=K_xx_xx - ldr r12,[r14,#2*4] - eor r9,r9,r10 - eor r11,r11,r12 @ 1 cycle stall - eor r10,r3,r4 @ F_xx_xx - mov r9,r9,ror#31 - add r5,r5,r6,ror#27 @ E+=ROR(A,27) - eor r9,r9,r11,ror#31 - str r9,[r14,#-4]! - eor r10,r7,r10,ror#2 @ F_xx_xx - @ F_xx_xx - add r5,r5,r9 @ E+=X[i] - add r5,r5,r10 @ E+=F_20_39(B,C,D) - ldr r9,[r14,#15*4] - ldr r10,[r14,#13*4] - ldr r11,[r14,#7*4] - add r4,r8,r4,ror#2 @ E+=K_xx_xx - ldr r12,[r14,#2*4] - eor r9,r9,r10 - eor r11,r11,r12 @ 1 cycle stall - eor r10,r7,r3 @ F_xx_xx - mov r9,r9,ror#31 - add r4,r4,r5,ror#27 @ E+=ROR(A,27) - eor r9,r9,r11,ror#31 - str r9,[r14,#-4]! - eor r10,r6,r10,ror#2 @ F_xx_xx - @ F_xx_xx - add r4,r4,r9 @ E+=X[i] - add r4,r4,r10 @ E+=F_20_39(B,C,D) - ldr r9,[r14,#15*4] - ldr r10,[r14,#13*4] - ldr r11,[r14,#7*4] - add r3,r8,r3,ror#2 @ E+=K_xx_xx - ldr r12,[r14,#2*4] - eor r9,r9,r10 - eor r11,r11,r12 @ 1 cycle stall - eor r10,r6,r7 @ F_xx_xx - mov r9,r9,ror#31 - add r3,r3,r4,ror#27 @ E+=ROR(A,27) - eor r9,r9,r11,ror#31 - str r9,[r14,#-4]! - eor r10,r5,r10,ror#2 @ F_xx_xx - @ F_xx_xx - add r3,r3,r9 @ E+=X[i] - add r3,r3,r10 @ E+=F_20_39(B,C,D) - teq r14,sp @ preserve carry - bne .L_20_39_or_60_79 @ [+((12+3)*5+2)*4] - bcs .L_done @ [+((12+3)*5+2)*4], spare 300 bytes - - ldr r8,.LK_40_59 - sub sp,sp,#20*4 @ [+2] -.L_40_59: - ldr r9,[r14,#15*4] - ldr r10,[r14,#13*4] - ldr r11,[r14,#7*4] - add r7,r8,r7,ror#2 @ E+=K_xx_xx - ldr r12,[r14,#2*4] - eor r9,r9,r10 - eor r11,r11,r12 @ 1 cycle stall - eor r10,r5,r6 @ F_xx_xx - mov r9,r9,ror#31 - add r7,r7,r3,ror#27 @ E+=ROR(A,27) - eor r9,r9,r11,ror#31 - str r9,[r14,#-4]! - and r10,r4,r10,ror#2 @ F_xx_xx - and r11,r5,r6 @ F_xx_xx - add r7,r7,r9 @ E+=X[i] - add r7,r7,r10 @ E+=F_40_59(B,C,D) - add r7,r7,r11,ror#2 - ldr r9,[r14,#15*4] - ldr r10,[r14,#13*4] - ldr r11,[r14,#7*4] - add r6,r8,r6,ror#2 @ E+=K_xx_xx - ldr r12,[r14,#2*4] - eor r9,r9,r10 - eor r11,r11,r12 @ 1 cycle stall - eor r10,r4,r5 @ F_xx_xx - mov r9,r9,ror#31 - add r6,r6,r7,ror#27 @ E+=ROR(A,27) - eor r9,r9,r11,ror#31 - str r9,[r14,#-4]! - and r10,r3,r10,ror#2 @ F_xx_xx - and r11,r4,r5 @ F_xx_xx - add r6,r6,r9 @ E+=X[i] - add r6,r6,r10 @ E+=F_40_59(B,C,D) - add r6,r6,r11,ror#2 - ldr r9,[r14,#15*4] - ldr r10,[r14,#13*4] - ldr r11,[r14,#7*4] - add r5,r8,r5,ror#2 @ E+=K_xx_xx - ldr r12,[r14,#2*4] - eor r9,r9,r10 - eor r11,r11,r12 @ 1 cycle stall - eor r10,r3,r4 @ F_xx_xx - mov r9,r9,ror#31 - add r5,r5,r6,ror#27 @ E+=ROR(A,27) - eor r9,r9,r11,ror#31 - str r9,[r14,#-4]! - and r10,r7,r10,ror#2 @ F_xx_xx - and r11,r3,r4 @ F_xx_xx - add r5,r5,r9 @ E+=X[i] - add r5,r5,r10 @ E+=F_40_59(B,C,D) - add r5,r5,r11,ror#2 - ldr r9,[r14,#15*4] - ldr r10,[r14,#13*4] - ldr r11,[r14,#7*4] - add r4,r8,r4,ror#2 @ E+=K_xx_xx - ldr r12,[r14,#2*4] - eor r9,r9,r10 - eor r11,r11,r12 @ 1 cycle stall - eor r10,r7,r3 @ F_xx_xx - mov r9,r9,ror#31 - add r4,r4,r5,ror#27 @ E+=ROR(A,27) - eor r9,r9,r11,ror#31 - str r9,[r14,#-4]! - and r10,r6,r10,ror#2 @ F_xx_xx - and r11,r7,r3 @ F_xx_xx - add r4,r4,r9 @ E+=X[i] - add r4,r4,r10 @ E+=F_40_59(B,C,D) - add r4,r4,r11,ror#2 - ldr r9,[r14,#15*4] - ldr r10,[r14,#13*4] - ldr r11,[r14,#7*4] - add r3,r8,r3,ror#2 @ E+=K_xx_xx - ldr r12,[r14,#2*4] - eor r9,r9,r10 - eor r11,r11,r12 @ 1 cycle stall - eor r10,r6,r7 @ F_xx_xx - mov r9,r9,ror#31 - add r3,r3,r4,ror#27 @ E+=ROR(A,27) - eor r9,r9,r11,ror#31 - str r9,[r14,#-4]! - and r10,r5,r10,ror#2 @ F_xx_xx - and r11,r6,r7 @ F_xx_xx - add r3,r3,r9 @ E+=X[i] - add r3,r3,r10 @ E+=F_40_59(B,C,D) - add r3,r3,r11,ror#2 - teq r14,sp - bne .L_40_59 @ [+((12+5)*5+2)*4] - - ldr r8,.LK_60_79 - sub sp,sp,#20*4 - cmp sp,#0 @ set carry to denote 60_79 - b .L_20_39_or_60_79 @ [+4], spare 300 bytes -.L_done: - add sp,sp,#80*4 @ "deallocate" stack frame - ldmia r0,{r8,r9,r10,r11,r12} - add r3,r8,r3 - add r4,r9,r4 - add r5,r10,r5,ror#2 - add r6,r11,r6,ror#2 - add r7,r12,r7,ror#2 - stmia r0,{r3,r4,r5,r6,r7} - teq r1,r2 - bne .Lloop @ [+18], total 1307 - -#if __ARM_ARCH__>=5 - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc} -#else - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} - tst lr,#1 - moveq pc,lr @ be binary compatible with V4, yet -.word 0xe12fff1e @ interoperable with Thumb ISA:-) -#endif -.size sha1_block_data_order,.-sha1_block_data_order - -.align 5 -.LK_00_19:.word 0x5a827999 -.LK_20_39:.word 0x6ed9eba1 -.LK_40_59:.word 0x8f1bbcdc -.LK_60_79:.word 0xca62c1d6 -#if __ARM_MAX_ARCH__>=7 -.LOPENSSL_armcap: -.word OPENSSL_armcap_P-sha1_block_data_order -#endif -.byte 83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,65,82,77,118,52,47,78,69,79,78,47,65,82,77,118,56,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 2 -.align 5 -#if __ARM_MAX_ARCH__>=7 -.arch armv7-a -.fpu neon - -.type sha1_block_data_order_neon,%function -.align 4 -sha1_block_data_order_neon: -.LNEON: - stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} - add r2,r1,r2,lsl#6 @ r2 to point at the end of r1 - @ dmb @ errata #451034 on early Cortex A8 - @ vstmdb sp!,{d8-d15} @ ABI specification says so - mov r14,sp - sub sp,sp,#64 @ alloca - adr r8,.LK_00_19 - bic sp,sp,#15 @ align for 128-bit stores - - ldmia r0,{r3,r4,r5,r6,r7} @ load context - mov r12,sp - - vld1.8 {q0,q1},[r1]! @ handles unaligned - veor q15,q15,q15 - vld1.8 {q2,q3},[r1]! - vld1.32 {d28[],d29[]},[r8,:32]! @ load K_00_19 - vrev32.8 q0,q0 @ yes, even on - vrev32.8 q1,q1 @ big-endian... - vrev32.8 q2,q2 - vadd.i32 q8,q0,q14 - vrev32.8 q3,q3 - vadd.i32 q9,q1,q14 - vst1.32 {q8},[r12,:128]! - vadd.i32 q10,q2,q14 - vst1.32 {q9},[r12,:128]! - vst1.32 {q10},[r12,:128]! - ldr r9,[sp] @ big RAW stall - -.Loop_neon: - vext.8 q8,q0,q1,#8 - bic r10,r6,r4 - add r7,r7,r9 - and r11,r5,r4 - vadd.i32 q13,q3,q14 - ldr r9,[sp,#4] - add r7,r7,r3,ror#27 - vext.8 q12,q3,q15,#4 - eor r11,r11,r10 - mov r4,r4,ror#2 - add r7,r7,r11 - veor q8,q8,q0 - bic r10,r5,r3 - add r6,r6,r9 - veor q12,q12,q2 - and r11,r4,r3 - ldr r9,[sp,#8] - veor q12,q12,q8 - add r6,r6,r7,ror#27 - eor r11,r11,r10 - vst1.32 {q13},[r12,:128]! - sub r12,r12,#64 - mov r3,r3,ror#2 - add r6,r6,r11 - vext.8 q13,q15,q12,#4 - bic r10,r4,r7 - add r5,r5,r9 - vadd.i32 q8,q12,q12 - and r11,r3,r7 - ldr r9,[sp,#12] - vsri.32 q8,q12,#31 - add r5,r5,r6,ror#27 - eor r11,r11,r10 - mov r7,r7,ror#2 - vshr.u32 q12,q13,#30 - add r5,r5,r11 - bic r10,r3,r6 - vshl.u32 q13,q13,#2 - add r4,r4,r9 - and r11,r7,r6 - veor q8,q8,q12 - ldr r9,[sp,#16] - add r4,r4,r5,ror#27 - veor q8,q8,q13 - eor r11,r11,r10 - mov r6,r6,ror#2 - add r4,r4,r11 - vext.8 q9,q1,q2,#8 - bic r10,r7,r5 - add r3,r3,r9 - and r11,r6,r5 - vadd.i32 q13,q8,q14 - ldr r9,[sp,#20] - vld1.32 {d28[],d29[]},[r8,:32]! - add r3,r3,r4,ror#27 - vext.8 q12,q8,q15,#4 - eor r11,r11,r10 - mov r5,r5,ror#2 - add r3,r3,r11 - veor q9,q9,q1 - bic r10,r6,r4 - add r7,r7,r9 - veor q12,q12,q3 - and r11,r5,r4 - ldr r9,[sp,#24] - veor q12,q12,q9 - add r7,r7,r3,ror#27 - eor r11,r11,r10 - vst1.32 {q13},[r12,:128]! - mov r4,r4,ror#2 - add r7,r7,r11 - vext.8 q13,q15,q12,#4 - bic r10,r5,r3 - add r6,r6,r9 - vadd.i32 q9,q12,q12 - and r11,r4,r3 - ldr r9,[sp,#28] - vsri.32 q9,q12,#31 - add r6,r6,r7,ror#27 - eor r11,r11,r10 - mov r3,r3,ror#2 - vshr.u32 q12,q13,#30 - add r6,r6,r11 - bic r10,r4,r7 - vshl.u32 q13,q13,#2 - add r5,r5,r9 - and r11,r3,r7 - veor q9,q9,q12 - ldr r9,[sp,#32] - add r5,r5,r6,ror#27 - veor q9,q9,q13 - eor r11,r11,r10 - mov r7,r7,ror#2 - add r5,r5,r11 - vext.8 q10,q2,q3,#8 - bic r10,r3,r6 - add r4,r4,r9 - and r11,r7,r6 - vadd.i32 q13,q9,q14 - ldr r9,[sp,#36] - add r4,r4,r5,ror#27 - vext.8 q12,q9,q15,#4 - eor r11,r11,r10 - mov r6,r6,ror#2 - add r4,r4,r11 - veor q10,q10,q2 - bic r10,r7,r5 - add r3,r3,r9 - veor q12,q12,q8 - and r11,r6,r5 - ldr r9,[sp,#40] - veor q12,q12,q10 - add r3,r3,r4,ror#27 - eor r11,r11,r10 - vst1.32 {q13},[r12,:128]! - mov r5,r5,ror#2 - add r3,r3,r11 - vext.8 q13,q15,q12,#4 - bic r10,r6,r4 - add r7,r7,r9 - vadd.i32 q10,q12,q12 - and r11,r5,r4 - ldr r9,[sp,#44] - vsri.32 q10,q12,#31 - add r7,r7,r3,ror#27 - eor r11,r11,r10 - mov r4,r4,ror#2 - vshr.u32 q12,q13,#30 - add r7,r7,r11 - bic r10,r5,r3 - vshl.u32 q13,q13,#2 - add r6,r6,r9 - and r11,r4,r3 - veor q10,q10,q12 - ldr r9,[sp,#48] - add r6,r6,r7,ror#27 - veor q10,q10,q13 - eor r11,r11,r10 - mov r3,r3,ror#2 - add r6,r6,r11 - vext.8 q11,q3,q8,#8 - bic r10,r4,r7 - add r5,r5,r9 - and r11,r3,r7 - vadd.i32 q13,q10,q14 - ldr r9,[sp,#52] - add r5,r5,r6,ror#27 - vext.8 q12,q10,q15,#4 - eor r11,r11,r10 - mov r7,r7,ror#2 - add r5,r5,r11 - veor q11,q11,q3 - bic r10,r3,r6 - add r4,r4,r9 - veor q12,q12,q9 - and r11,r7,r6 - ldr r9,[sp,#56] - veor q12,q12,q11 - add r4,r4,r5,ror#27 - eor r11,r11,r10 - vst1.32 {q13},[r12,:128]! - mov r6,r6,ror#2 - add r4,r4,r11 - vext.8 q13,q15,q12,#4 - bic r10,r7,r5 - add r3,r3,r9 - vadd.i32 q11,q12,q12 - and r11,r6,r5 - ldr r9,[sp,#60] - vsri.32 q11,q12,#31 - add r3,r3,r4,ror#27 - eor r11,r11,r10 - mov r5,r5,ror#2 - vshr.u32 q12,q13,#30 - add r3,r3,r11 - bic r10,r6,r4 - vshl.u32 q13,q13,#2 - add r7,r7,r9 - and r11,r5,r4 - veor q11,q11,q12 - ldr r9,[sp,#0] - add r7,r7,r3,ror#27 - veor q11,q11,q13 - eor r11,r11,r10 - mov r4,r4,ror#2 - add r7,r7,r11 - vext.8 q12,q10,q11,#8 - bic r10,r5,r3 - add r6,r6,r9 - and r11,r4,r3 - veor q0,q0,q8 - ldr r9,[sp,#4] - add r6,r6,r7,ror#27 - veor q0,q0,q1 - eor r11,r11,r10 - mov r3,r3,ror#2 - vadd.i32 q13,q11,q14 - add r6,r6,r11 - bic r10,r4,r7 - veor q12,q12,q0 - add r5,r5,r9 - and r11,r3,r7 - vshr.u32 q0,q12,#30 - ldr r9,[sp,#8] - add r5,r5,r6,ror#27 - vst1.32 {q13},[r12,:128]! - sub r12,r12,#64 - eor r11,r11,r10 - mov r7,r7,ror#2 - vsli.32 q0,q12,#2 - add r5,r5,r11 - bic r10,r3,r6 - add r4,r4,r9 - and r11,r7,r6 - ldr r9,[sp,#12] - add r4,r4,r5,ror#27 - eor r11,r11,r10 - mov r6,r6,ror#2 - add r4,r4,r11 - bic r10,r7,r5 - add r3,r3,r9 - and r11,r6,r5 - ldr r9,[sp,#16] - add r3,r3,r4,ror#27 - eor r11,r11,r10 - mov r5,r5,ror#2 - add r3,r3,r11 - vext.8 q12,q11,q0,#8 - eor r10,r4,r6 - add r7,r7,r9 - ldr r9,[sp,#20] - veor q1,q1,q9 - eor r11,r10,r5 - add r7,r7,r3,ror#27 - veor q1,q1,q2 - mov r4,r4,ror#2 - add r7,r7,r11 - vadd.i32 q13,q0,q14 - eor r10,r3,r5 - add r6,r6,r9 - veor q12,q12,q1 - ldr r9,[sp,#24] - eor r11,r10,r4 - vshr.u32 q1,q12,#30 - add r6,r6,r7,ror#27 - mov r3,r3,ror#2 - vst1.32 {q13},[r12,:128]! - add r6,r6,r11 - eor r10,r7,r4 - vsli.32 q1,q12,#2 - add r5,r5,r9 - ldr r9,[sp,#28] - eor r11,r10,r3 - add r5,r5,r6,ror#27 - mov r7,r7,ror#2 - add r5,r5,r11 - eor r10,r6,r3 - add r4,r4,r9 - ldr r9,[sp,#32] - eor r11,r10,r7 - add r4,r4,r5,ror#27 - mov r6,r6,ror#2 - add r4,r4,r11 - vext.8 q12,q0,q1,#8 - eor r10,r5,r7 - add r3,r3,r9 - ldr r9,[sp,#36] - veor q2,q2,q10 - eor r11,r10,r6 - add r3,r3,r4,ror#27 - veor q2,q2,q3 - mov r5,r5,ror#2 - add r3,r3,r11 - vadd.i32 q13,q1,q14 - eor r10,r4,r6 - vld1.32 {d28[],d29[]},[r8,:32]! - add r7,r7,r9 - veor q12,q12,q2 - ldr r9,[sp,#40] - eor r11,r10,r5 - vshr.u32 q2,q12,#30 - add r7,r7,r3,ror#27 - mov r4,r4,ror#2 - vst1.32 {q13},[r12,:128]! - add r7,r7,r11 - eor r10,r3,r5 - vsli.32 q2,q12,#2 - add r6,r6,r9 - ldr r9,[sp,#44] - eor r11,r10,r4 - add r6,r6,r7,ror#27 - mov r3,r3,ror#2 - add r6,r6,r11 - eor r10,r7,r4 - add r5,r5,r9 - ldr r9,[sp,#48] - eor r11,r10,r3 - add r5,r5,r6,ror#27 - mov r7,r7,ror#2 - add r5,r5,r11 - vext.8 q12,q1,q2,#8 - eor r10,r6,r3 - add r4,r4,r9 - ldr r9,[sp,#52] - veor q3,q3,q11 - eor r11,r10,r7 - add r4,r4,r5,ror#27 - veor q3,q3,q8 - mov r6,r6,ror#2 - add r4,r4,r11 - vadd.i32 q13,q2,q14 - eor r10,r5,r7 - add r3,r3,r9 - veor q12,q12,q3 - ldr r9,[sp,#56] - eor r11,r10,r6 - vshr.u32 q3,q12,#30 - add r3,r3,r4,ror#27 - mov r5,r5,ror#2 - vst1.32 {q13},[r12,:128]! - add r3,r3,r11 - eor r10,r4,r6 - vsli.32 q3,q12,#2 - add r7,r7,r9 - ldr r9,[sp,#60] - eor r11,r10,r5 - add r7,r7,r3,ror#27 - mov r4,r4,ror#2 - add r7,r7,r11 - eor r10,r3,r5 - add r6,r6,r9 - ldr r9,[sp,#0] - eor r11,r10,r4 - add r6,r6,r7,ror#27 - mov r3,r3,ror#2 - add r6,r6,r11 - vext.8 q12,q2,q3,#8 - eor r10,r7,r4 - add r5,r5,r9 - ldr r9,[sp,#4] - veor q8,q8,q0 - eor r11,r10,r3 - add r5,r5,r6,ror#27 - veor q8,q8,q9 - mov r7,r7,ror#2 - add r5,r5,r11 - vadd.i32 q13,q3,q14 - eor r10,r6,r3 - add r4,r4,r9 - veor q12,q12,q8 - ldr r9,[sp,#8] - eor r11,r10,r7 - vshr.u32 q8,q12,#30 - add r4,r4,r5,ror#27 - mov r6,r6,ror#2 - vst1.32 {q13},[r12,:128]! - sub r12,r12,#64 - add r4,r4,r11 - eor r10,r5,r7 - vsli.32 q8,q12,#2 - add r3,r3,r9 - ldr r9,[sp,#12] - eor r11,r10,r6 - add r3,r3,r4,ror#27 - mov r5,r5,ror#2 - add r3,r3,r11 - eor r10,r4,r6 - add r7,r7,r9 - ldr r9,[sp,#16] - eor r11,r10,r5 - add r7,r7,r3,ror#27 - mov r4,r4,ror#2 - add r7,r7,r11 - vext.8 q12,q3,q8,#8 - eor r10,r3,r5 - add r6,r6,r9 - ldr r9,[sp,#20] - veor q9,q9,q1 - eor r11,r10,r4 - add r6,r6,r7,ror#27 - veor q9,q9,q10 - mov r3,r3,ror#2 - add r6,r6,r11 - vadd.i32 q13,q8,q14 - eor r10,r7,r4 - add r5,r5,r9 - veor q12,q12,q9 - ldr r9,[sp,#24] - eor r11,r10,r3 - vshr.u32 q9,q12,#30 - add r5,r5,r6,ror#27 - mov r7,r7,ror#2 - vst1.32 {q13},[r12,:128]! - add r5,r5,r11 - eor r10,r6,r3 - vsli.32 q9,q12,#2 - add r4,r4,r9 - ldr r9,[sp,#28] - eor r11,r10,r7 - add r4,r4,r5,ror#27 - mov r6,r6,ror#2 - add r4,r4,r11 - eor r10,r5,r7 - add r3,r3,r9 - ldr r9,[sp,#32] - eor r11,r10,r6 - add r3,r3,r4,ror#27 - mov r5,r5,ror#2 - add r3,r3,r11 - vext.8 q12,q8,q9,#8 - add r7,r7,r9 - and r10,r5,r6 - ldr r9,[sp,#36] - veor q10,q10,q2 - add r7,r7,r3,ror#27 - eor r11,r5,r6 - veor q10,q10,q11 - add r7,r7,r10 - and r11,r11,r4 - vadd.i32 q13,q9,q14 - mov r4,r4,ror#2 - add r7,r7,r11 - veor q12,q12,q10 - add r6,r6,r9 - and r10,r4,r5 - vshr.u32 q10,q12,#30 - ldr r9,[sp,#40] - add r6,r6,r7,ror#27 - vst1.32 {q13},[r12,:128]! - eor r11,r4,r5 - add r6,r6,r10 - vsli.32 q10,q12,#2 - and r11,r11,r3 - mov r3,r3,ror#2 - add r6,r6,r11 - add r5,r5,r9 - and r10,r3,r4 - ldr r9,[sp,#44] - add r5,r5,r6,ror#27 - eor r11,r3,r4 - add r5,r5,r10 - and r11,r11,r7 - mov r7,r7,ror#2 - add r5,r5,r11 - add r4,r4,r9 - and r10,r7,r3 - ldr r9,[sp,#48] - add r4,r4,r5,ror#27 - eor r11,r7,r3 - add r4,r4,r10 - and r11,r11,r6 - mov r6,r6,ror#2 - add r4,r4,r11 - vext.8 q12,q9,q10,#8 - add r3,r3,r9 - and r10,r6,r7 - ldr r9,[sp,#52] - veor q11,q11,q3 - add r3,r3,r4,ror#27 - eor r11,r6,r7 - veor q11,q11,q0 - add r3,r3,r10 - and r11,r11,r5 - vadd.i32 q13,q10,q14 - mov r5,r5,ror#2 - vld1.32 {d28[],d29[]},[r8,:32]! - add r3,r3,r11 - veor q12,q12,q11 - add r7,r7,r9 - and r10,r5,r6 - vshr.u32 q11,q12,#30 - ldr r9,[sp,#56] - add r7,r7,r3,ror#27 - vst1.32 {q13},[r12,:128]! - eor r11,r5,r6 - add r7,r7,r10 - vsli.32 q11,q12,#2 - and r11,r11,r4 - mov r4,r4,ror#2 - add r7,r7,r11 - add r6,r6,r9 - and r10,r4,r5 - ldr r9,[sp,#60] - add r6,r6,r7,ror#27 - eor r11,r4,r5 - add r6,r6,r10 - and r11,r11,r3 - mov r3,r3,ror#2 - add r6,r6,r11 - add r5,r5,r9 - and r10,r3,r4 - ldr r9,[sp,#0] - add r5,r5,r6,ror#27 - eor r11,r3,r4 - add r5,r5,r10 - and r11,r11,r7 - mov r7,r7,ror#2 - add r5,r5,r11 - vext.8 q12,q10,q11,#8 - add r4,r4,r9 - and r10,r7,r3 - ldr r9,[sp,#4] - veor q0,q0,q8 - add r4,r4,r5,ror#27 - eor r11,r7,r3 - veor q0,q0,q1 - add r4,r4,r10 - and r11,r11,r6 - vadd.i32 q13,q11,q14 - mov r6,r6,ror#2 - add r4,r4,r11 - veor q12,q12,q0 - add r3,r3,r9 - and r10,r6,r7 - vshr.u32 q0,q12,#30 - ldr r9,[sp,#8] - add r3,r3,r4,ror#27 - vst1.32 {q13},[r12,:128]! - sub r12,r12,#64 - eor r11,r6,r7 - add r3,r3,r10 - vsli.32 q0,q12,#2 - and r11,r11,r5 - mov r5,r5,ror#2 - add r3,r3,r11 - add r7,r7,r9 - and r10,r5,r6 - ldr r9,[sp,#12] - add r7,r7,r3,ror#27 - eor r11,r5,r6 - add r7,r7,r10 - and r11,r11,r4 - mov r4,r4,ror#2 - add r7,r7,r11 - add r6,r6,r9 - and r10,r4,r5 - ldr r9,[sp,#16] - add r6,r6,r7,ror#27 - eor r11,r4,r5 - add r6,r6,r10 - and r11,r11,r3 - mov r3,r3,ror#2 - add r6,r6,r11 - vext.8 q12,q11,q0,#8 - add r5,r5,r9 - and r10,r3,r4 - ldr r9,[sp,#20] - veor q1,q1,q9 - add r5,r5,r6,ror#27 - eor r11,r3,r4 - veor q1,q1,q2 - add r5,r5,r10 - and r11,r11,r7 - vadd.i32 q13,q0,q14 - mov r7,r7,ror#2 - add r5,r5,r11 - veor q12,q12,q1 - add r4,r4,r9 - and r10,r7,r3 - vshr.u32 q1,q12,#30 - ldr r9,[sp,#24] - add r4,r4,r5,ror#27 - vst1.32 {q13},[r12,:128]! - eor r11,r7,r3 - add r4,r4,r10 - vsli.32 q1,q12,#2 - and r11,r11,r6 - mov r6,r6,ror#2 - add r4,r4,r11 - add r3,r3,r9 - and r10,r6,r7 - ldr r9,[sp,#28] - add r3,r3,r4,ror#27 - eor r11,r6,r7 - add r3,r3,r10 - and r11,r11,r5 - mov r5,r5,ror#2 - add r3,r3,r11 - add r7,r7,r9 - and r10,r5,r6 - ldr r9,[sp,#32] - add r7,r7,r3,ror#27 - eor r11,r5,r6 - add r7,r7,r10 - and r11,r11,r4 - mov r4,r4,ror#2 - add r7,r7,r11 - vext.8 q12,q0,q1,#8 - add r6,r6,r9 - and r10,r4,r5 - ldr r9,[sp,#36] - veor q2,q2,q10 - add r6,r6,r7,ror#27 - eor r11,r4,r5 - veor q2,q2,q3 - add r6,r6,r10 - and r11,r11,r3 - vadd.i32 q13,q1,q14 - mov r3,r3,ror#2 - add r6,r6,r11 - veor q12,q12,q2 - add r5,r5,r9 - and r10,r3,r4 - vshr.u32 q2,q12,#30 - ldr r9,[sp,#40] - add r5,r5,r6,ror#27 - vst1.32 {q13},[r12,:128]! - eor r11,r3,r4 - add r5,r5,r10 - vsli.32 q2,q12,#2 - and r11,r11,r7 - mov r7,r7,ror#2 - add r5,r5,r11 - add r4,r4,r9 - and r10,r7,r3 - ldr r9,[sp,#44] - add r4,r4,r5,ror#27 - eor r11,r7,r3 - add r4,r4,r10 - and r11,r11,r6 - mov r6,r6,ror#2 - add r4,r4,r11 - add r3,r3,r9 - and r10,r6,r7 - ldr r9,[sp,#48] - add r3,r3,r4,ror#27 - eor r11,r6,r7 - add r3,r3,r10 - and r11,r11,r5 - mov r5,r5,ror#2 - add r3,r3,r11 - vext.8 q12,q1,q2,#8 - eor r10,r4,r6 - add r7,r7,r9 - ldr r9,[sp,#52] - veor q3,q3,q11 - eor r11,r10,r5 - add r7,r7,r3,ror#27 - veor q3,q3,q8 - mov r4,r4,ror#2 - add r7,r7,r11 - vadd.i32 q13,q2,q14 - eor r10,r3,r5 - add r6,r6,r9 - veor q12,q12,q3 - ldr r9,[sp,#56] - eor r11,r10,r4 - vshr.u32 q3,q12,#30 - add r6,r6,r7,ror#27 - mov r3,r3,ror#2 - vst1.32 {q13},[r12,:128]! - add r6,r6,r11 - eor r10,r7,r4 - vsli.32 q3,q12,#2 - add r5,r5,r9 - ldr r9,[sp,#60] - eor r11,r10,r3 - add r5,r5,r6,ror#27 - mov r7,r7,ror#2 - add r5,r5,r11 - eor r10,r6,r3 - add r4,r4,r9 - ldr r9,[sp,#0] - eor r11,r10,r7 - add r4,r4,r5,ror#27 - mov r6,r6,ror#2 - add r4,r4,r11 - vadd.i32 q13,q3,q14 - eor r10,r5,r7 - add r3,r3,r9 - vst1.32 {q13},[r12,:128]! - sub r12,r12,#64 - teq r1,r2 - sub r8,r8,#16 - subeq r1,r1,#64 - vld1.8 {q0,q1},[r1]! - ldr r9,[sp,#4] - eor r11,r10,r6 - vld1.8 {q2,q3},[r1]! - add r3,r3,r4,ror#27 - mov r5,r5,ror#2 - vld1.32 {d28[],d29[]},[r8,:32]! - add r3,r3,r11 - eor r10,r4,r6 - vrev32.8 q0,q0 - add r7,r7,r9 - ldr r9,[sp,#8] - eor r11,r10,r5 - add r7,r7,r3,ror#27 - mov r4,r4,ror#2 - add r7,r7,r11 - eor r10,r3,r5 - add r6,r6,r9 - ldr r9,[sp,#12] - eor r11,r10,r4 - add r6,r6,r7,ror#27 - mov r3,r3,ror#2 - add r6,r6,r11 - eor r10,r7,r4 - add r5,r5,r9 - ldr r9,[sp,#16] - eor r11,r10,r3 - add r5,r5,r6,ror#27 - mov r7,r7,ror#2 - add r5,r5,r11 - vrev32.8 q1,q1 - eor r10,r6,r3 - add r4,r4,r9 - vadd.i32 q8,q0,q14 - ldr r9,[sp,#20] - eor r11,r10,r7 - vst1.32 {q8},[r12,:128]! - add r4,r4,r5,ror#27 - mov r6,r6,ror#2 - add r4,r4,r11 - eor r10,r5,r7 - add r3,r3,r9 - ldr r9,[sp,#24] - eor r11,r10,r6 - add r3,r3,r4,ror#27 - mov r5,r5,ror#2 - add r3,r3,r11 - eor r10,r4,r6 - add r7,r7,r9 - ldr r9,[sp,#28] - eor r11,r10,r5 - add r7,r7,r3,ror#27 - mov r4,r4,ror#2 - add r7,r7,r11 - eor r10,r3,r5 - add r6,r6,r9 - ldr r9,[sp,#32] - eor r11,r10,r4 - add r6,r6,r7,ror#27 - mov r3,r3,ror#2 - add r6,r6,r11 - vrev32.8 q2,q2 - eor r10,r7,r4 - add r5,r5,r9 - vadd.i32 q9,q1,q14 - ldr r9,[sp,#36] - eor r11,r10,r3 - vst1.32 {q9},[r12,:128]! - add r5,r5,r6,ror#27 - mov r7,r7,ror#2 - add r5,r5,r11 - eor r10,r6,r3 - add r4,r4,r9 - ldr r9,[sp,#40] - eor r11,r10,r7 - add r4,r4,r5,ror#27 - mov r6,r6,ror#2 - add r4,r4,r11 - eor r10,r5,r7 - add r3,r3,r9 - ldr r9,[sp,#44] - eor r11,r10,r6 - add r3,r3,r4,ror#27 - mov r5,r5,ror#2 - add r3,r3,r11 - eor r10,r4,r6 - add r7,r7,r9 - ldr r9,[sp,#48] - eor r11,r10,r5 - add r7,r7,r3,ror#27 - mov r4,r4,ror#2 - add r7,r7,r11 - vrev32.8 q3,q3 - eor r10,r3,r5 - add r6,r6,r9 - vadd.i32 q10,q2,q14 - ldr r9,[sp,#52] - eor r11,r10,r4 - vst1.32 {q10},[r12,:128]! - add r6,r6,r7,ror#27 - mov r3,r3,ror#2 - add r6,r6,r11 - eor r10,r7,r4 - add r5,r5,r9 - ldr r9,[sp,#56] - eor r11,r10,r3 - add r5,r5,r6,ror#27 - mov r7,r7,ror#2 - add r5,r5,r11 - eor r10,r6,r3 - add r4,r4,r9 - ldr r9,[sp,#60] - eor r11,r10,r7 - add r4,r4,r5,ror#27 - mov r6,r6,ror#2 - add r4,r4,r11 - eor r10,r5,r7 - add r3,r3,r9 - eor r11,r10,r6 - add r3,r3,r4,ror#27 - mov r5,r5,ror#2 - add r3,r3,r11 - ldmia r0,{r9,r10,r11,r12} @ accumulate context - add r3,r3,r9 - ldr r9,[r0,#16] - add r4,r4,r10 - add r5,r5,r11 - add r6,r6,r12 - moveq sp,r14 - add r7,r7,r9 - ldrne r9,[sp] - stmia r0,{r3,r4,r5,r6,r7} - addne r12,sp,#3*16 - bne .Loop_neon - - @ vldmia sp!,{d8-d15} - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc} -.size sha1_block_data_order_neon,.-sha1_block_data_order_neon -#endif -#if __ARM_MAX_ARCH__>=7 -.type sha1_block_data_order_armv8,%function -.align 5 -sha1_block_data_order_armv8: -.LARMv8: - vstmdb sp!,{d8,d9,d10,d11,d12,d13,d14,d15} @ ABI specification says so - - veor q1,q1,q1 - adr r3,.LK_00_19 - vld1.32 {q0},[r0]! - vld1.32 {d2[0]},[r0] - sub r0,r0,#16 - vld1.32 {d16[],d17[]},[r3,:32]! - vld1.32 {d18[],d19[]},[r3,:32]! - vld1.32 {d20[],d21[]},[r3,:32]! - vld1.32 {d22[],d23[]},[r3,:32] - -.Loop_v8: - vld1.8 {q4,q5},[r1]! - vld1.8 {q6,q7},[r1]! - vrev32.8 q4,q4 - vrev32.8 q5,q5 - - vadd.i32 q12,q8,q4 - vrev32.8 q6,q6 - vmov q14,q0 @ offload - subs r2,r2,#1 - - vadd.i32 q13,q8,q5 - vrev32.8 q7,q7 -.byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 0 -.byte 0x68,0x0c,0x02,0xf2 @ sha1c q0,q1,q12 - vadd.i32 q12,q8,q6 -.byte 0x4c,0x8c,0x3a,0xf2 @ sha1su0 q4,q5,q6 -.byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 1 -.byte 0x6a,0x0c,0x06,0xf2 @ sha1c q0,q3,q13 - vadd.i32 q13,q8,q7 -.byte 0x8e,0x83,0xba,0xf3 @ sha1su1 q4,q7 -.byte 0x4e,0xac,0x3c,0xf2 @ sha1su0 q5,q6,q7 -.byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 2 -.byte 0x68,0x0c,0x04,0xf2 @ sha1c q0,q2,q12 - vadd.i32 q12,q8,q4 -.byte 0x88,0xa3,0xba,0xf3 @ sha1su1 q5,q4 -.byte 0x48,0xcc,0x3e,0xf2 @ sha1su0 q6,q7,q4 -.byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 3 -.byte 0x6a,0x0c,0x06,0xf2 @ sha1c q0,q3,q13 - vadd.i32 q13,q9,q5 -.byte 0x8a,0xc3,0xba,0xf3 @ sha1su1 q6,q5 -.byte 0x4a,0xec,0x38,0xf2 @ sha1su0 q7,q4,q5 -.byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 4 -.byte 0x68,0x0c,0x04,0xf2 @ sha1c q0,q2,q12 - vadd.i32 q12,q9,q6 -.byte 0x8c,0xe3,0xba,0xf3 @ sha1su1 q7,q6 -.byte 0x4c,0x8c,0x3a,0xf2 @ sha1su0 q4,q5,q6 -.byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 5 -.byte 0x6a,0x0c,0x16,0xf2 @ sha1p q0,q3,q13 - vadd.i32 q13,q9,q7 -.byte 0x8e,0x83,0xba,0xf3 @ sha1su1 q4,q7 -.byte 0x4e,0xac,0x3c,0xf2 @ sha1su0 q5,q6,q7 -.byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 6 -.byte 0x68,0x0c,0x14,0xf2 @ sha1p q0,q2,q12 - vadd.i32 q12,q9,q4 -.byte 0x88,0xa3,0xba,0xf3 @ sha1su1 q5,q4 -.byte 0x48,0xcc,0x3e,0xf2 @ sha1su0 q6,q7,q4 -.byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 7 -.byte 0x6a,0x0c,0x16,0xf2 @ sha1p q0,q3,q13 - vadd.i32 q13,q9,q5 -.byte 0x8a,0xc3,0xba,0xf3 @ sha1su1 q6,q5 -.byte 0x4a,0xec,0x38,0xf2 @ sha1su0 q7,q4,q5 -.byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 8 -.byte 0x68,0x0c,0x14,0xf2 @ sha1p q0,q2,q12 - vadd.i32 q12,q10,q6 -.byte 0x8c,0xe3,0xba,0xf3 @ sha1su1 q7,q6 -.byte 0x4c,0x8c,0x3a,0xf2 @ sha1su0 q4,q5,q6 -.byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 9 -.byte 0x6a,0x0c,0x16,0xf2 @ sha1p q0,q3,q13 - vadd.i32 q13,q10,q7 -.byte 0x8e,0x83,0xba,0xf3 @ sha1su1 q4,q7 -.byte 0x4e,0xac,0x3c,0xf2 @ sha1su0 q5,q6,q7 -.byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 10 -.byte 0x68,0x0c,0x24,0xf2 @ sha1m q0,q2,q12 - vadd.i32 q12,q10,q4 -.byte 0x88,0xa3,0xba,0xf3 @ sha1su1 q5,q4 -.byte 0x48,0xcc,0x3e,0xf2 @ sha1su0 q6,q7,q4 -.byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 11 -.byte 0x6a,0x0c,0x26,0xf2 @ sha1m q0,q3,q13 - vadd.i32 q13,q10,q5 -.byte 0x8a,0xc3,0xba,0xf3 @ sha1su1 q6,q5 -.byte 0x4a,0xec,0x38,0xf2 @ sha1su0 q7,q4,q5 -.byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 12 -.byte 0x68,0x0c,0x24,0xf2 @ sha1m q0,q2,q12 - vadd.i32 q12,q10,q6 -.byte 0x8c,0xe3,0xba,0xf3 @ sha1su1 q7,q6 -.byte 0x4c,0x8c,0x3a,0xf2 @ sha1su0 q4,q5,q6 -.byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 13 -.byte 0x6a,0x0c,0x26,0xf2 @ sha1m q0,q3,q13 - vadd.i32 q13,q11,q7 -.byte 0x8e,0x83,0xba,0xf3 @ sha1su1 q4,q7 -.byte 0x4e,0xac,0x3c,0xf2 @ sha1su0 q5,q6,q7 -.byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 14 -.byte 0x68,0x0c,0x24,0xf2 @ sha1m q0,q2,q12 - vadd.i32 q12,q11,q4 -.byte 0x88,0xa3,0xba,0xf3 @ sha1su1 q5,q4 -.byte 0x48,0xcc,0x3e,0xf2 @ sha1su0 q6,q7,q4 -.byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 15 -.byte 0x6a,0x0c,0x16,0xf2 @ sha1p q0,q3,q13 - vadd.i32 q13,q11,q5 -.byte 0x8a,0xc3,0xba,0xf3 @ sha1su1 q6,q5 -.byte 0x4a,0xec,0x38,0xf2 @ sha1su0 q7,q4,q5 -.byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 16 -.byte 0x68,0x0c,0x14,0xf2 @ sha1p q0,q2,q12 - vadd.i32 q12,q11,q6 -.byte 0x8c,0xe3,0xba,0xf3 @ sha1su1 q7,q6 -.byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 17 -.byte 0x6a,0x0c,0x16,0xf2 @ sha1p q0,q3,q13 - vadd.i32 q13,q11,q7 - -.byte 0xc0,0x62,0xb9,0xf3 @ sha1h q3,q0 @ 18 -.byte 0x68,0x0c,0x14,0xf2 @ sha1p q0,q2,q12 - -.byte 0xc0,0x42,0xb9,0xf3 @ sha1h q2,q0 @ 19 -.byte 0x6a,0x0c,0x16,0xf2 @ sha1p q0,q3,q13 - - vadd.i32 q1,q1,q2 - vadd.i32 q0,q0,q14 - bne .Loop_v8 - - vst1.32 {q0},[r0]! - vst1.32 {d2[0]},[r0] - - vldmia sp!,{d8,d9,d10,d11,d12,d13,d14,d15} - bx lr @ bx lr -.size sha1_block_data_order_armv8,.-sha1_block_data_order_armv8 -#endif -#if __ARM_MAX_ARCH__>=7 -.comm OPENSSL_armcap_P,4,4 -.hidden OPENSSL_armcap_P -#endif -#endif \ No newline at end of file diff --git a/third_party/boringssl/linux-arm/crypto/sha/sha256-armv4.S b/third_party/boringssl/linux-arm/crypto/sha/sha256-armv4.S deleted file mode 100644 index ac9f2f164d854..0000000000000 --- a/third_party/boringssl/linux-arm/crypto/sha/sha256-armv4.S +++ /dev/null @@ -1,2818 +0,0 @@ -#if defined(__arm__) - -@ ==================================================================== -@ Written by Andy Polyakov for the OpenSSL -@ project. The module is, however, dual licensed under OpenSSL and -@ CRYPTOGAMS licenses depending on where you obtain it. For further -@ details see http://www.openssl.org/~appro/cryptogams/. -@ -@ Permission to use under GPL terms is granted. -@ ==================================================================== - -@ SHA256 block procedure for ARMv4. May 2007. - -@ Performance is ~2x better than gcc 3.4 generated code and in "abso- -@ lute" terms is ~2250 cycles per 64-byte block or ~35 cycles per -@ byte [on single-issue Xscale PXA250 core]. - -@ July 2010. -@ -@ Rescheduling for dual-issue pipeline resulted in 22% improvement on -@ Cortex A8 core and ~20 cycles per processed byte. - -@ February 2011. -@ -@ Profiler-assisted and platform-specific optimization resulted in 16% -@ improvement on Cortex A8 core and ~15.4 cycles per processed byte. - -@ September 2013. -@ -@ Add NEON implementation. On Cortex A8 it was measured to process one -@ byte in 12.5 cycles or 23% faster than integer-only code. Snapdragon -@ S4 does it in 12.5 cycles too, but it's 50% faster than integer-only -@ code (meaning that latter performs sub-optimally, nothing was done -@ about it). - -@ May 2014. -@ -@ Add ARMv8 code path performing at 2.0 cpb on Apple A7. - -#ifndef __KERNEL__ -# include "arm_arch.h" -#else -# define __ARM_ARCH__ __LINUX_ARM_ARCH__ -# define __ARM_MAX_ARCH__ 7 -#endif - -.text -#if __ARM_ARCH__<7 -.code 32 -#else -.syntax unified -# if defined(__thumb2__) && !defined(__APPLE__) -# define adrl adr -.thumb -# else -.code 32 -# endif -#endif - -.type K256,%object -.align 5 -K256: -.word 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5 -.word 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5 -.word 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3 -.word 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174 -.word 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc -.word 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da -.word 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7 -.word 0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967 -.word 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13 -.word 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85 -.word 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3 -.word 0xd192e819,0xd6990624,0xf40e3585,0x106aa070 -.word 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5 -.word 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3 -.word 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208 -.word 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2 -.size K256,.-K256 -.word 0 @ terminator -#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) -.LOPENSSL_armcap: -.word OPENSSL_armcap_P-.Lsha256_block_data_order -#endif -.align 5 - -.globl sha256_block_data_order -.type sha256_block_data_order,%function -sha256_block_data_order: -.Lsha256_block_data_order: -#if __ARM_ARCH__<7 - sub r3,pc,#8 @ sha256_block_data_order -#else - adr r3,sha256_block_data_order -#endif -#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) - ldr r12,.LOPENSSL_armcap - ldr r12,[r3,r12] @ OPENSSL_armcap_P -#ifdef __APPLE__ - ldr r12,[r12] -#endif - tst r12,#ARMV8_SHA256 - bne .LARMv8 - tst r12,#ARMV7_NEON - bne .LNEON -#endif - add r2,r1,r2,lsl#6 @ len to point at the end of inp - stmdb sp!,{r0,r1,r2,r4-r11,lr} - ldmia r0,{r4,r5,r6,r7,r8,r9,r10,r11} - sub r14,r3,#256+32 @ K256 - sub sp,sp,#16*4 @ alloca(X[16]) -.Loop: -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 -# else - ldrb r2,[r1,#3] -# endif - eor r3,r5,r6 @ magic - eor r12,r12,r12 -#if __ARM_ARCH__>=7 - @ ldr r2,[r1],#4 @ 0 -# if 0==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r8,r8,ror#5 - add r4,r4,r12 @ h+=Maj(a,b,c) from the past - eor r0,r0,r8,ror#19 @ Sigma1(e) -# ifndef __ARMEB__ - rev r2,r2 -# endif -#else - @ ldrb r2,[r1,#3] @ 0 - add r4,r4,r12 @ h+=Maj(a,b,c) from the past - ldrb r12,[r1,#2] - ldrb r0,[r1,#1] - orr r2,r2,r12,lsl#8 - ldrb r12,[r1],#4 - orr r2,r2,r0,lsl#16 -# if 0==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r8,r8,ror#5 - orr r2,r2,r12,lsl#24 - eor r0,r0,r8,ror#19 @ Sigma1(e) -#endif - ldr r12,[r14],#4 @ *K256++ - add r11,r11,r2 @ h+=X[i] - str r2,[sp,#0*4] - eor r2,r9,r10 - add r11,r11,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r8 - add r11,r11,r12 @ h+=K256[i] - eor r2,r2,r10 @ Ch(e,f,g) - eor r0,r4,r4,ror#11 - add r11,r11,r2 @ h+=Ch(e,f,g) -#if 0==31 - and r12,r12,#0xff - cmp r12,#0xf2 @ done? -#endif -#if 0<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r12,r4,r5 @ a^b, b^c in next round -#else - ldr r2,[sp,#2*4] @ from future BODY_16_xx - eor r12,r4,r5 @ a^b, b^c in next round - ldr r1,[sp,#15*4] @ from future BODY_16_xx -#endif - eor r0,r0,r4,ror#20 @ Sigma0(a) - and r3,r3,r12 @ (b^c)&=(a^b) - add r7,r7,r11 @ d+=h - eor r3,r3,r5 @ Maj(a,b,c) - add r11,r11,r0,ror#2 @ h+=Sigma0(a) - @ add r11,r11,r3 @ h+=Maj(a,b,c) -#if __ARM_ARCH__>=7 - @ ldr r2,[r1],#4 @ 1 -# if 1==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r7,r7,ror#5 - add r11,r11,r3 @ h+=Maj(a,b,c) from the past - eor r0,r0,r7,ror#19 @ Sigma1(e) -# ifndef __ARMEB__ - rev r2,r2 -# endif -#else - @ ldrb r2,[r1,#3] @ 1 - add r11,r11,r3 @ h+=Maj(a,b,c) from the past - ldrb r3,[r1,#2] - ldrb r0,[r1,#1] - orr r2,r2,r3,lsl#8 - ldrb r3,[r1],#4 - orr r2,r2,r0,lsl#16 -# if 1==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r7,r7,ror#5 - orr r2,r2,r3,lsl#24 - eor r0,r0,r7,ror#19 @ Sigma1(e) -#endif - ldr r3,[r14],#4 @ *K256++ - add r10,r10,r2 @ h+=X[i] - str r2,[sp,#1*4] - eor r2,r8,r9 - add r10,r10,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r7 - add r10,r10,r3 @ h+=K256[i] - eor r2,r2,r9 @ Ch(e,f,g) - eor r0,r11,r11,ror#11 - add r10,r10,r2 @ h+=Ch(e,f,g) -#if 1==31 - and r3,r3,#0xff - cmp r3,#0xf2 @ done? -#endif -#if 1<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r3,r11,r4 @ a^b, b^c in next round -#else - ldr r2,[sp,#3*4] @ from future BODY_16_xx - eor r3,r11,r4 @ a^b, b^c in next round - ldr r1,[sp,#0*4] @ from future BODY_16_xx -#endif - eor r0,r0,r11,ror#20 @ Sigma0(a) - and r12,r12,r3 @ (b^c)&=(a^b) - add r6,r6,r10 @ d+=h - eor r12,r12,r4 @ Maj(a,b,c) - add r10,r10,r0,ror#2 @ h+=Sigma0(a) - @ add r10,r10,r12 @ h+=Maj(a,b,c) -#if __ARM_ARCH__>=7 - @ ldr r2,[r1],#4 @ 2 -# if 2==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r6,r6,ror#5 - add r10,r10,r12 @ h+=Maj(a,b,c) from the past - eor r0,r0,r6,ror#19 @ Sigma1(e) -# ifndef __ARMEB__ - rev r2,r2 -# endif -#else - @ ldrb r2,[r1,#3] @ 2 - add r10,r10,r12 @ h+=Maj(a,b,c) from the past - ldrb r12,[r1,#2] - ldrb r0,[r1,#1] - orr r2,r2,r12,lsl#8 - ldrb r12,[r1],#4 - orr r2,r2,r0,lsl#16 -# if 2==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r6,r6,ror#5 - orr r2,r2,r12,lsl#24 - eor r0,r0,r6,ror#19 @ Sigma1(e) -#endif - ldr r12,[r14],#4 @ *K256++ - add r9,r9,r2 @ h+=X[i] - str r2,[sp,#2*4] - eor r2,r7,r8 - add r9,r9,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r6 - add r9,r9,r12 @ h+=K256[i] - eor r2,r2,r8 @ Ch(e,f,g) - eor r0,r10,r10,ror#11 - add r9,r9,r2 @ h+=Ch(e,f,g) -#if 2==31 - and r12,r12,#0xff - cmp r12,#0xf2 @ done? -#endif -#if 2<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r12,r10,r11 @ a^b, b^c in next round -#else - ldr r2,[sp,#4*4] @ from future BODY_16_xx - eor r12,r10,r11 @ a^b, b^c in next round - ldr r1,[sp,#1*4] @ from future BODY_16_xx -#endif - eor r0,r0,r10,ror#20 @ Sigma0(a) - and r3,r3,r12 @ (b^c)&=(a^b) - add r5,r5,r9 @ d+=h - eor r3,r3,r11 @ Maj(a,b,c) - add r9,r9,r0,ror#2 @ h+=Sigma0(a) - @ add r9,r9,r3 @ h+=Maj(a,b,c) -#if __ARM_ARCH__>=7 - @ ldr r2,[r1],#4 @ 3 -# if 3==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r5,r5,ror#5 - add r9,r9,r3 @ h+=Maj(a,b,c) from the past - eor r0,r0,r5,ror#19 @ Sigma1(e) -# ifndef __ARMEB__ - rev r2,r2 -# endif -#else - @ ldrb r2,[r1,#3] @ 3 - add r9,r9,r3 @ h+=Maj(a,b,c) from the past - ldrb r3,[r1,#2] - ldrb r0,[r1,#1] - orr r2,r2,r3,lsl#8 - ldrb r3,[r1],#4 - orr r2,r2,r0,lsl#16 -# if 3==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r5,r5,ror#5 - orr r2,r2,r3,lsl#24 - eor r0,r0,r5,ror#19 @ Sigma1(e) -#endif - ldr r3,[r14],#4 @ *K256++ - add r8,r8,r2 @ h+=X[i] - str r2,[sp,#3*4] - eor r2,r6,r7 - add r8,r8,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r5 - add r8,r8,r3 @ h+=K256[i] - eor r2,r2,r7 @ Ch(e,f,g) - eor r0,r9,r9,ror#11 - add r8,r8,r2 @ h+=Ch(e,f,g) -#if 3==31 - and r3,r3,#0xff - cmp r3,#0xf2 @ done? -#endif -#if 3<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r3,r9,r10 @ a^b, b^c in next round -#else - ldr r2,[sp,#5*4] @ from future BODY_16_xx - eor r3,r9,r10 @ a^b, b^c in next round - ldr r1,[sp,#2*4] @ from future BODY_16_xx -#endif - eor r0,r0,r9,ror#20 @ Sigma0(a) - and r12,r12,r3 @ (b^c)&=(a^b) - add r4,r4,r8 @ d+=h - eor r12,r12,r10 @ Maj(a,b,c) - add r8,r8,r0,ror#2 @ h+=Sigma0(a) - @ add r8,r8,r12 @ h+=Maj(a,b,c) -#if __ARM_ARCH__>=7 - @ ldr r2,[r1],#4 @ 4 -# if 4==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r4,r4,ror#5 - add r8,r8,r12 @ h+=Maj(a,b,c) from the past - eor r0,r0,r4,ror#19 @ Sigma1(e) -# ifndef __ARMEB__ - rev r2,r2 -# endif -#else - @ ldrb r2,[r1,#3] @ 4 - add r8,r8,r12 @ h+=Maj(a,b,c) from the past - ldrb r12,[r1,#2] - ldrb r0,[r1,#1] - orr r2,r2,r12,lsl#8 - ldrb r12,[r1],#4 - orr r2,r2,r0,lsl#16 -# if 4==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r4,r4,ror#5 - orr r2,r2,r12,lsl#24 - eor r0,r0,r4,ror#19 @ Sigma1(e) -#endif - ldr r12,[r14],#4 @ *K256++ - add r7,r7,r2 @ h+=X[i] - str r2,[sp,#4*4] - eor r2,r5,r6 - add r7,r7,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r4 - add r7,r7,r12 @ h+=K256[i] - eor r2,r2,r6 @ Ch(e,f,g) - eor r0,r8,r8,ror#11 - add r7,r7,r2 @ h+=Ch(e,f,g) -#if 4==31 - and r12,r12,#0xff - cmp r12,#0xf2 @ done? -#endif -#if 4<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r12,r8,r9 @ a^b, b^c in next round -#else - ldr r2,[sp,#6*4] @ from future BODY_16_xx - eor r12,r8,r9 @ a^b, b^c in next round - ldr r1,[sp,#3*4] @ from future BODY_16_xx -#endif - eor r0,r0,r8,ror#20 @ Sigma0(a) - and r3,r3,r12 @ (b^c)&=(a^b) - add r11,r11,r7 @ d+=h - eor r3,r3,r9 @ Maj(a,b,c) - add r7,r7,r0,ror#2 @ h+=Sigma0(a) - @ add r7,r7,r3 @ h+=Maj(a,b,c) -#if __ARM_ARCH__>=7 - @ ldr r2,[r1],#4 @ 5 -# if 5==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r11,r11,ror#5 - add r7,r7,r3 @ h+=Maj(a,b,c) from the past - eor r0,r0,r11,ror#19 @ Sigma1(e) -# ifndef __ARMEB__ - rev r2,r2 -# endif -#else - @ ldrb r2,[r1,#3] @ 5 - add r7,r7,r3 @ h+=Maj(a,b,c) from the past - ldrb r3,[r1,#2] - ldrb r0,[r1,#1] - orr r2,r2,r3,lsl#8 - ldrb r3,[r1],#4 - orr r2,r2,r0,lsl#16 -# if 5==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r11,r11,ror#5 - orr r2,r2,r3,lsl#24 - eor r0,r0,r11,ror#19 @ Sigma1(e) -#endif - ldr r3,[r14],#4 @ *K256++ - add r6,r6,r2 @ h+=X[i] - str r2,[sp,#5*4] - eor r2,r4,r5 - add r6,r6,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r11 - add r6,r6,r3 @ h+=K256[i] - eor r2,r2,r5 @ Ch(e,f,g) - eor r0,r7,r7,ror#11 - add r6,r6,r2 @ h+=Ch(e,f,g) -#if 5==31 - and r3,r3,#0xff - cmp r3,#0xf2 @ done? -#endif -#if 5<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r3,r7,r8 @ a^b, b^c in next round -#else - ldr r2,[sp,#7*4] @ from future BODY_16_xx - eor r3,r7,r8 @ a^b, b^c in next round - ldr r1,[sp,#4*4] @ from future BODY_16_xx -#endif - eor r0,r0,r7,ror#20 @ Sigma0(a) - and r12,r12,r3 @ (b^c)&=(a^b) - add r10,r10,r6 @ d+=h - eor r12,r12,r8 @ Maj(a,b,c) - add r6,r6,r0,ror#2 @ h+=Sigma0(a) - @ add r6,r6,r12 @ h+=Maj(a,b,c) -#if __ARM_ARCH__>=7 - @ ldr r2,[r1],#4 @ 6 -# if 6==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r10,r10,ror#5 - add r6,r6,r12 @ h+=Maj(a,b,c) from the past - eor r0,r0,r10,ror#19 @ Sigma1(e) -# ifndef __ARMEB__ - rev r2,r2 -# endif -#else - @ ldrb r2,[r1,#3] @ 6 - add r6,r6,r12 @ h+=Maj(a,b,c) from the past - ldrb r12,[r1,#2] - ldrb r0,[r1,#1] - orr r2,r2,r12,lsl#8 - ldrb r12,[r1],#4 - orr r2,r2,r0,lsl#16 -# if 6==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r10,r10,ror#5 - orr r2,r2,r12,lsl#24 - eor r0,r0,r10,ror#19 @ Sigma1(e) -#endif - ldr r12,[r14],#4 @ *K256++ - add r5,r5,r2 @ h+=X[i] - str r2,[sp,#6*4] - eor r2,r11,r4 - add r5,r5,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r10 - add r5,r5,r12 @ h+=K256[i] - eor r2,r2,r4 @ Ch(e,f,g) - eor r0,r6,r6,ror#11 - add r5,r5,r2 @ h+=Ch(e,f,g) -#if 6==31 - and r12,r12,#0xff - cmp r12,#0xf2 @ done? -#endif -#if 6<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r12,r6,r7 @ a^b, b^c in next round -#else - ldr r2,[sp,#8*4] @ from future BODY_16_xx - eor r12,r6,r7 @ a^b, b^c in next round - ldr r1,[sp,#5*4] @ from future BODY_16_xx -#endif - eor r0,r0,r6,ror#20 @ Sigma0(a) - and r3,r3,r12 @ (b^c)&=(a^b) - add r9,r9,r5 @ d+=h - eor r3,r3,r7 @ Maj(a,b,c) - add r5,r5,r0,ror#2 @ h+=Sigma0(a) - @ add r5,r5,r3 @ h+=Maj(a,b,c) -#if __ARM_ARCH__>=7 - @ ldr r2,[r1],#4 @ 7 -# if 7==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r9,r9,ror#5 - add r5,r5,r3 @ h+=Maj(a,b,c) from the past - eor r0,r0,r9,ror#19 @ Sigma1(e) -# ifndef __ARMEB__ - rev r2,r2 -# endif -#else - @ ldrb r2,[r1,#3] @ 7 - add r5,r5,r3 @ h+=Maj(a,b,c) from the past - ldrb r3,[r1,#2] - ldrb r0,[r1,#1] - orr r2,r2,r3,lsl#8 - ldrb r3,[r1],#4 - orr r2,r2,r0,lsl#16 -# if 7==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r9,r9,ror#5 - orr r2,r2,r3,lsl#24 - eor r0,r0,r9,ror#19 @ Sigma1(e) -#endif - ldr r3,[r14],#4 @ *K256++ - add r4,r4,r2 @ h+=X[i] - str r2,[sp,#7*4] - eor r2,r10,r11 - add r4,r4,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r9 - add r4,r4,r3 @ h+=K256[i] - eor r2,r2,r11 @ Ch(e,f,g) - eor r0,r5,r5,ror#11 - add r4,r4,r2 @ h+=Ch(e,f,g) -#if 7==31 - and r3,r3,#0xff - cmp r3,#0xf2 @ done? -#endif -#if 7<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r3,r5,r6 @ a^b, b^c in next round -#else - ldr r2,[sp,#9*4] @ from future BODY_16_xx - eor r3,r5,r6 @ a^b, b^c in next round - ldr r1,[sp,#6*4] @ from future BODY_16_xx -#endif - eor r0,r0,r5,ror#20 @ Sigma0(a) - and r12,r12,r3 @ (b^c)&=(a^b) - add r8,r8,r4 @ d+=h - eor r12,r12,r6 @ Maj(a,b,c) - add r4,r4,r0,ror#2 @ h+=Sigma0(a) - @ add r4,r4,r12 @ h+=Maj(a,b,c) -#if __ARM_ARCH__>=7 - @ ldr r2,[r1],#4 @ 8 -# if 8==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r8,r8,ror#5 - add r4,r4,r12 @ h+=Maj(a,b,c) from the past - eor r0,r0,r8,ror#19 @ Sigma1(e) -# ifndef __ARMEB__ - rev r2,r2 -# endif -#else - @ ldrb r2,[r1,#3] @ 8 - add r4,r4,r12 @ h+=Maj(a,b,c) from the past - ldrb r12,[r1,#2] - ldrb r0,[r1,#1] - orr r2,r2,r12,lsl#8 - ldrb r12,[r1],#4 - orr r2,r2,r0,lsl#16 -# if 8==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r8,r8,ror#5 - orr r2,r2,r12,lsl#24 - eor r0,r0,r8,ror#19 @ Sigma1(e) -#endif - ldr r12,[r14],#4 @ *K256++ - add r11,r11,r2 @ h+=X[i] - str r2,[sp,#8*4] - eor r2,r9,r10 - add r11,r11,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r8 - add r11,r11,r12 @ h+=K256[i] - eor r2,r2,r10 @ Ch(e,f,g) - eor r0,r4,r4,ror#11 - add r11,r11,r2 @ h+=Ch(e,f,g) -#if 8==31 - and r12,r12,#0xff - cmp r12,#0xf2 @ done? -#endif -#if 8<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r12,r4,r5 @ a^b, b^c in next round -#else - ldr r2,[sp,#10*4] @ from future BODY_16_xx - eor r12,r4,r5 @ a^b, b^c in next round - ldr r1,[sp,#7*4] @ from future BODY_16_xx -#endif - eor r0,r0,r4,ror#20 @ Sigma0(a) - and r3,r3,r12 @ (b^c)&=(a^b) - add r7,r7,r11 @ d+=h - eor r3,r3,r5 @ Maj(a,b,c) - add r11,r11,r0,ror#2 @ h+=Sigma0(a) - @ add r11,r11,r3 @ h+=Maj(a,b,c) -#if __ARM_ARCH__>=7 - @ ldr r2,[r1],#4 @ 9 -# if 9==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r7,r7,ror#5 - add r11,r11,r3 @ h+=Maj(a,b,c) from the past - eor r0,r0,r7,ror#19 @ Sigma1(e) -# ifndef __ARMEB__ - rev r2,r2 -# endif -#else - @ ldrb r2,[r1,#3] @ 9 - add r11,r11,r3 @ h+=Maj(a,b,c) from the past - ldrb r3,[r1,#2] - ldrb r0,[r1,#1] - orr r2,r2,r3,lsl#8 - ldrb r3,[r1],#4 - orr r2,r2,r0,lsl#16 -# if 9==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r7,r7,ror#5 - orr r2,r2,r3,lsl#24 - eor r0,r0,r7,ror#19 @ Sigma1(e) -#endif - ldr r3,[r14],#4 @ *K256++ - add r10,r10,r2 @ h+=X[i] - str r2,[sp,#9*4] - eor r2,r8,r9 - add r10,r10,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r7 - add r10,r10,r3 @ h+=K256[i] - eor r2,r2,r9 @ Ch(e,f,g) - eor r0,r11,r11,ror#11 - add r10,r10,r2 @ h+=Ch(e,f,g) -#if 9==31 - and r3,r3,#0xff - cmp r3,#0xf2 @ done? -#endif -#if 9<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r3,r11,r4 @ a^b, b^c in next round -#else - ldr r2,[sp,#11*4] @ from future BODY_16_xx - eor r3,r11,r4 @ a^b, b^c in next round - ldr r1,[sp,#8*4] @ from future BODY_16_xx -#endif - eor r0,r0,r11,ror#20 @ Sigma0(a) - and r12,r12,r3 @ (b^c)&=(a^b) - add r6,r6,r10 @ d+=h - eor r12,r12,r4 @ Maj(a,b,c) - add r10,r10,r0,ror#2 @ h+=Sigma0(a) - @ add r10,r10,r12 @ h+=Maj(a,b,c) -#if __ARM_ARCH__>=7 - @ ldr r2,[r1],#4 @ 10 -# if 10==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r6,r6,ror#5 - add r10,r10,r12 @ h+=Maj(a,b,c) from the past - eor r0,r0,r6,ror#19 @ Sigma1(e) -# ifndef __ARMEB__ - rev r2,r2 -# endif -#else - @ ldrb r2,[r1,#3] @ 10 - add r10,r10,r12 @ h+=Maj(a,b,c) from the past - ldrb r12,[r1,#2] - ldrb r0,[r1,#1] - orr r2,r2,r12,lsl#8 - ldrb r12,[r1],#4 - orr r2,r2,r0,lsl#16 -# if 10==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r6,r6,ror#5 - orr r2,r2,r12,lsl#24 - eor r0,r0,r6,ror#19 @ Sigma1(e) -#endif - ldr r12,[r14],#4 @ *K256++ - add r9,r9,r2 @ h+=X[i] - str r2,[sp,#10*4] - eor r2,r7,r8 - add r9,r9,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r6 - add r9,r9,r12 @ h+=K256[i] - eor r2,r2,r8 @ Ch(e,f,g) - eor r0,r10,r10,ror#11 - add r9,r9,r2 @ h+=Ch(e,f,g) -#if 10==31 - and r12,r12,#0xff - cmp r12,#0xf2 @ done? -#endif -#if 10<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r12,r10,r11 @ a^b, b^c in next round -#else - ldr r2,[sp,#12*4] @ from future BODY_16_xx - eor r12,r10,r11 @ a^b, b^c in next round - ldr r1,[sp,#9*4] @ from future BODY_16_xx -#endif - eor r0,r0,r10,ror#20 @ Sigma0(a) - and r3,r3,r12 @ (b^c)&=(a^b) - add r5,r5,r9 @ d+=h - eor r3,r3,r11 @ Maj(a,b,c) - add r9,r9,r0,ror#2 @ h+=Sigma0(a) - @ add r9,r9,r3 @ h+=Maj(a,b,c) -#if __ARM_ARCH__>=7 - @ ldr r2,[r1],#4 @ 11 -# if 11==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r5,r5,ror#5 - add r9,r9,r3 @ h+=Maj(a,b,c) from the past - eor r0,r0,r5,ror#19 @ Sigma1(e) -# ifndef __ARMEB__ - rev r2,r2 -# endif -#else - @ ldrb r2,[r1,#3] @ 11 - add r9,r9,r3 @ h+=Maj(a,b,c) from the past - ldrb r3,[r1,#2] - ldrb r0,[r1,#1] - orr r2,r2,r3,lsl#8 - ldrb r3,[r1],#4 - orr r2,r2,r0,lsl#16 -# if 11==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r5,r5,ror#5 - orr r2,r2,r3,lsl#24 - eor r0,r0,r5,ror#19 @ Sigma1(e) -#endif - ldr r3,[r14],#4 @ *K256++ - add r8,r8,r2 @ h+=X[i] - str r2,[sp,#11*4] - eor r2,r6,r7 - add r8,r8,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r5 - add r8,r8,r3 @ h+=K256[i] - eor r2,r2,r7 @ Ch(e,f,g) - eor r0,r9,r9,ror#11 - add r8,r8,r2 @ h+=Ch(e,f,g) -#if 11==31 - and r3,r3,#0xff - cmp r3,#0xf2 @ done? -#endif -#if 11<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r3,r9,r10 @ a^b, b^c in next round -#else - ldr r2,[sp,#13*4] @ from future BODY_16_xx - eor r3,r9,r10 @ a^b, b^c in next round - ldr r1,[sp,#10*4] @ from future BODY_16_xx -#endif - eor r0,r0,r9,ror#20 @ Sigma0(a) - and r12,r12,r3 @ (b^c)&=(a^b) - add r4,r4,r8 @ d+=h - eor r12,r12,r10 @ Maj(a,b,c) - add r8,r8,r0,ror#2 @ h+=Sigma0(a) - @ add r8,r8,r12 @ h+=Maj(a,b,c) -#if __ARM_ARCH__>=7 - @ ldr r2,[r1],#4 @ 12 -# if 12==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r4,r4,ror#5 - add r8,r8,r12 @ h+=Maj(a,b,c) from the past - eor r0,r0,r4,ror#19 @ Sigma1(e) -# ifndef __ARMEB__ - rev r2,r2 -# endif -#else - @ ldrb r2,[r1,#3] @ 12 - add r8,r8,r12 @ h+=Maj(a,b,c) from the past - ldrb r12,[r1,#2] - ldrb r0,[r1,#1] - orr r2,r2,r12,lsl#8 - ldrb r12,[r1],#4 - orr r2,r2,r0,lsl#16 -# if 12==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r4,r4,ror#5 - orr r2,r2,r12,lsl#24 - eor r0,r0,r4,ror#19 @ Sigma1(e) -#endif - ldr r12,[r14],#4 @ *K256++ - add r7,r7,r2 @ h+=X[i] - str r2,[sp,#12*4] - eor r2,r5,r6 - add r7,r7,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r4 - add r7,r7,r12 @ h+=K256[i] - eor r2,r2,r6 @ Ch(e,f,g) - eor r0,r8,r8,ror#11 - add r7,r7,r2 @ h+=Ch(e,f,g) -#if 12==31 - and r12,r12,#0xff - cmp r12,#0xf2 @ done? -#endif -#if 12<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r12,r8,r9 @ a^b, b^c in next round -#else - ldr r2,[sp,#14*4] @ from future BODY_16_xx - eor r12,r8,r9 @ a^b, b^c in next round - ldr r1,[sp,#11*4] @ from future BODY_16_xx -#endif - eor r0,r0,r8,ror#20 @ Sigma0(a) - and r3,r3,r12 @ (b^c)&=(a^b) - add r11,r11,r7 @ d+=h - eor r3,r3,r9 @ Maj(a,b,c) - add r7,r7,r0,ror#2 @ h+=Sigma0(a) - @ add r7,r7,r3 @ h+=Maj(a,b,c) -#if __ARM_ARCH__>=7 - @ ldr r2,[r1],#4 @ 13 -# if 13==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r11,r11,ror#5 - add r7,r7,r3 @ h+=Maj(a,b,c) from the past - eor r0,r0,r11,ror#19 @ Sigma1(e) -# ifndef __ARMEB__ - rev r2,r2 -# endif -#else - @ ldrb r2,[r1,#3] @ 13 - add r7,r7,r3 @ h+=Maj(a,b,c) from the past - ldrb r3,[r1,#2] - ldrb r0,[r1,#1] - orr r2,r2,r3,lsl#8 - ldrb r3,[r1],#4 - orr r2,r2,r0,lsl#16 -# if 13==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r11,r11,ror#5 - orr r2,r2,r3,lsl#24 - eor r0,r0,r11,ror#19 @ Sigma1(e) -#endif - ldr r3,[r14],#4 @ *K256++ - add r6,r6,r2 @ h+=X[i] - str r2,[sp,#13*4] - eor r2,r4,r5 - add r6,r6,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r11 - add r6,r6,r3 @ h+=K256[i] - eor r2,r2,r5 @ Ch(e,f,g) - eor r0,r7,r7,ror#11 - add r6,r6,r2 @ h+=Ch(e,f,g) -#if 13==31 - and r3,r3,#0xff - cmp r3,#0xf2 @ done? -#endif -#if 13<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r3,r7,r8 @ a^b, b^c in next round -#else - ldr r2,[sp,#15*4] @ from future BODY_16_xx - eor r3,r7,r8 @ a^b, b^c in next round - ldr r1,[sp,#12*4] @ from future BODY_16_xx -#endif - eor r0,r0,r7,ror#20 @ Sigma0(a) - and r12,r12,r3 @ (b^c)&=(a^b) - add r10,r10,r6 @ d+=h - eor r12,r12,r8 @ Maj(a,b,c) - add r6,r6,r0,ror#2 @ h+=Sigma0(a) - @ add r6,r6,r12 @ h+=Maj(a,b,c) -#if __ARM_ARCH__>=7 - @ ldr r2,[r1],#4 @ 14 -# if 14==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r10,r10,ror#5 - add r6,r6,r12 @ h+=Maj(a,b,c) from the past - eor r0,r0,r10,ror#19 @ Sigma1(e) -# ifndef __ARMEB__ - rev r2,r2 -# endif -#else - @ ldrb r2,[r1,#3] @ 14 - add r6,r6,r12 @ h+=Maj(a,b,c) from the past - ldrb r12,[r1,#2] - ldrb r0,[r1,#1] - orr r2,r2,r12,lsl#8 - ldrb r12,[r1],#4 - orr r2,r2,r0,lsl#16 -# if 14==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r10,r10,ror#5 - orr r2,r2,r12,lsl#24 - eor r0,r0,r10,ror#19 @ Sigma1(e) -#endif - ldr r12,[r14],#4 @ *K256++ - add r5,r5,r2 @ h+=X[i] - str r2,[sp,#14*4] - eor r2,r11,r4 - add r5,r5,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r10 - add r5,r5,r12 @ h+=K256[i] - eor r2,r2,r4 @ Ch(e,f,g) - eor r0,r6,r6,ror#11 - add r5,r5,r2 @ h+=Ch(e,f,g) -#if 14==31 - and r12,r12,#0xff - cmp r12,#0xf2 @ done? -#endif -#if 14<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r12,r6,r7 @ a^b, b^c in next round -#else - ldr r2,[sp,#0*4] @ from future BODY_16_xx - eor r12,r6,r7 @ a^b, b^c in next round - ldr r1,[sp,#13*4] @ from future BODY_16_xx -#endif - eor r0,r0,r6,ror#20 @ Sigma0(a) - and r3,r3,r12 @ (b^c)&=(a^b) - add r9,r9,r5 @ d+=h - eor r3,r3,r7 @ Maj(a,b,c) - add r5,r5,r0,ror#2 @ h+=Sigma0(a) - @ add r5,r5,r3 @ h+=Maj(a,b,c) -#if __ARM_ARCH__>=7 - @ ldr r2,[r1],#4 @ 15 -# if 15==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r9,r9,ror#5 - add r5,r5,r3 @ h+=Maj(a,b,c) from the past - eor r0,r0,r9,ror#19 @ Sigma1(e) -# ifndef __ARMEB__ - rev r2,r2 -# endif -#else - @ ldrb r2,[r1,#3] @ 15 - add r5,r5,r3 @ h+=Maj(a,b,c) from the past - ldrb r3,[r1,#2] - ldrb r0,[r1,#1] - orr r2,r2,r3,lsl#8 - ldrb r3,[r1],#4 - orr r2,r2,r0,lsl#16 -# if 15==15 - str r1,[sp,#17*4] @ make room for r1 -# endif - eor r0,r9,r9,ror#5 - orr r2,r2,r3,lsl#24 - eor r0,r0,r9,ror#19 @ Sigma1(e) -#endif - ldr r3,[r14],#4 @ *K256++ - add r4,r4,r2 @ h+=X[i] - str r2,[sp,#15*4] - eor r2,r10,r11 - add r4,r4,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r9 - add r4,r4,r3 @ h+=K256[i] - eor r2,r2,r11 @ Ch(e,f,g) - eor r0,r5,r5,ror#11 - add r4,r4,r2 @ h+=Ch(e,f,g) -#if 15==31 - and r3,r3,#0xff - cmp r3,#0xf2 @ done? -#endif -#if 15<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r3,r5,r6 @ a^b, b^c in next round -#else - ldr r2,[sp,#1*4] @ from future BODY_16_xx - eor r3,r5,r6 @ a^b, b^c in next round - ldr r1,[sp,#14*4] @ from future BODY_16_xx -#endif - eor r0,r0,r5,ror#20 @ Sigma0(a) - and r12,r12,r3 @ (b^c)&=(a^b) - add r8,r8,r4 @ d+=h - eor r12,r12,r6 @ Maj(a,b,c) - add r4,r4,r0,ror#2 @ h+=Sigma0(a) - @ add r4,r4,r12 @ h+=Maj(a,b,c) -.Lrounds_16_xx: - @ ldr r2,[sp,#1*4] @ 16 - @ ldr r1,[sp,#14*4] - mov r0,r2,ror#7 - add r4,r4,r12 @ h+=Maj(a,b,c) from the past - mov r12,r1,ror#17 - eor r0,r0,r2,ror#18 - eor r12,r12,r1,ror#19 - eor r0,r0,r2,lsr#3 @ sigma0(X[i+1]) - ldr r2,[sp,#0*4] - eor r12,r12,r1,lsr#10 @ sigma1(X[i+14]) - ldr r1,[sp,#9*4] - - add r12,r12,r0 - eor r0,r8,r8,ror#5 @ from BODY_00_15 - add r2,r2,r12 - eor r0,r0,r8,ror#19 @ Sigma1(e) - add r2,r2,r1 @ X[i] - ldr r12,[r14],#4 @ *K256++ - add r11,r11,r2 @ h+=X[i] - str r2,[sp,#0*4] - eor r2,r9,r10 - add r11,r11,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r8 - add r11,r11,r12 @ h+=K256[i] - eor r2,r2,r10 @ Ch(e,f,g) - eor r0,r4,r4,ror#11 - add r11,r11,r2 @ h+=Ch(e,f,g) -#if 16==31 - and r12,r12,#0xff - cmp r12,#0xf2 @ done? -#endif -#if 16<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r12,r4,r5 @ a^b, b^c in next round -#else - ldr r2,[sp,#2*4] @ from future BODY_16_xx - eor r12,r4,r5 @ a^b, b^c in next round - ldr r1,[sp,#15*4] @ from future BODY_16_xx -#endif - eor r0,r0,r4,ror#20 @ Sigma0(a) - and r3,r3,r12 @ (b^c)&=(a^b) - add r7,r7,r11 @ d+=h - eor r3,r3,r5 @ Maj(a,b,c) - add r11,r11,r0,ror#2 @ h+=Sigma0(a) - @ add r11,r11,r3 @ h+=Maj(a,b,c) - @ ldr r2,[sp,#2*4] @ 17 - @ ldr r1,[sp,#15*4] - mov r0,r2,ror#7 - add r11,r11,r3 @ h+=Maj(a,b,c) from the past - mov r3,r1,ror#17 - eor r0,r0,r2,ror#18 - eor r3,r3,r1,ror#19 - eor r0,r0,r2,lsr#3 @ sigma0(X[i+1]) - ldr r2,[sp,#1*4] - eor r3,r3,r1,lsr#10 @ sigma1(X[i+14]) - ldr r1,[sp,#10*4] - - add r3,r3,r0 - eor r0,r7,r7,ror#5 @ from BODY_00_15 - add r2,r2,r3 - eor r0,r0,r7,ror#19 @ Sigma1(e) - add r2,r2,r1 @ X[i] - ldr r3,[r14],#4 @ *K256++ - add r10,r10,r2 @ h+=X[i] - str r2,[sp,#1*4] - eor r2,r8,r9 - add r10,r10,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r7 - add r10,r10,r3 @ h+=K256[i] - eor r2,r2,r9 @ Ch(e,f,g) - eor r0,r11,r11,ror#11 - add r10,r10,r2 @ h+=Ch(e,f,g) -#if 17==31 - and r3,r3,#0xff - cmp r3,#0xf2 @ done? -#endif -#if 17<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r3,r11,r4 @ a^b, b^c in next round -#else - ldr r2,[sp,#3*4] @ from future BODY_16_xx - eor r3,r11,r4 @ a^b, b^c in next round - ldr r1,[sp,#0*4] @ from future BODY_16_xx -#endif - eor r0,r0,r11,ror#20 @ Sigma0(a) - and r12,r12,r3 @ (b^c)&=(a^b) - add r6,r6,r10 @ d+=h - eor r12,r12,r4 @ Maj(a,b,c) - add r10,r10,r0,ror#2 @ h+=Sigma0(a) - @ add r10,r10,r12 @ h+=Maj(a,b,c) - @ ldr r2,[sp,#3*4] @ 18 - @ ldr r1,[sp,#0*4] - mov r0,r2,ror#7 - add r10,r10,r12 @ h+=Maj(a,b,c) from the past - mov r12,r1,ror#17 - eor r0,r0,r2,ror#18 - eor r12,r12,r1,ror#19 - eor r0,r0,r2,lsr#3 @ sigma0(X[i+1]) - ldr r2,[sp,#2*4] - eor r12,r12,r1,lsr#10 @ sigma1(X[i+14]) - ldr r1,[sp,#11*4] - - add r12,r12,r0 - eor r0,r6,r6,ror#5 @ from BODY_00_15 - add r2,r2,r12 - eor r0,r0,r6,ror#19 @ Sigma1(e) - add r2,r2,r1 @ X[i] - ldr r12,[r14],#4 @ *K256++ - add r9,r9,r2 @ h+=X[i] - str r2,[sp,#2*4] - eor r2,r7,r8 - add r9,r9,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r6 - add r9,r9,r12 @ h+=K256[i] - eor r2,r2,r8 @ Ch(e,f,g) - eor r0,r10,r10,ror#11 - add r9,r9,r2 @ h+=Ch(e,f,g) -#if 18==31 - and r12,r12,#0xff - cmp r12,#0xf2 @ done? -#endif -#if 18<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r12,r10,r11 @ a^b, b^c in next round -#else - ldr r2,[sp,#4*4] @ from future BODY_16_xx - eor r12,r10,r11 @ a^b, b^c in next round - ldr r1,[sp,#1*4] @ from future BODY_16_xx -#endif - eor r0,r0,r10,ror#20 @ Sigma0(a) - and r3,r3,r12 @ (b^c)&=(a^b) - add r5,r5,r9 @ d+=h - eor r3,r3,r11 @ Maj(a,b,c) - add r9,r9,r0,ror#2 @ h+=Sigma0(a) - @ add r9,r9,r3 @ h+=Maj(a,b,c) - @ ldr r2,[sp,#4*4] @ 19 - @ ldr r1,[sp,#1*4] - mov r0,r2,ror#7 - add r9,r9,r3 @ h+=Maj(a,b,c) from the past - mov r3,r1,ror#17 - eor r0,r0,r2,ror#18 - eor r3,r3,r1,ror#19 - eor r0,r0,r2,lsr#3 @ sigma0(X[i+1]) - ldr r2,[sp,#3*4] - eor r3,r3,r1,lsr#10 @ sigma1(X[i+14]) - ldr r1,[sp,#12*4] - - add r3,r3,r0 - eor r0,r5,r5,ror#5 @ from BODY_00_15 - add r2,r2,r3 - eor r0,r0,r5,ror#19 @ Sigma1(e) - add r2,r2,r1 @ X[i] - ldr r3,[r14],#4 @ *K256++ - add r8,r8,r2 @ h+=X[i] - str r2,[sp,#3*4] - eor r2,r6,r7 - add r8,r8,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r5 - add r8,r8,r3 @ h+=K256[i] - eor r2,r2,r7 @ Ch(e,f,g) - eor r0,r9,r9,ror#11 - add r8,r8,r2 @ h+=Ch(e,f,g) -#if 19==31 - and r3,r3,#0xff - cmp r3,#0xf2 @ done? -#endif -#if 19<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r3,r9,r10 @ a^b, b^c in next round -#else - ldr r2,[sp,#5*4] @ from future BODY_16_xx - eor r3,r9,r10 @ a^b, b^c in next round - ldr r1,[sp,#2*4] @ from future BODY_16_xx -#endif - eor r0,r0,r9,ror#20 @ Sigma0(a) - and r12,r12,r3 @ (b^c)&=(a^b) - add r4,r4,r8 @ d+=h - eor r12,r12,r10 @ Maj(a,b,c) - add r8,r8,r0,ror#2 @ h+=Sigma0(a) - @ add r8,r8,r12 @ h+=Maj(a,b,c) - @ ldr r2,[sp,#5*4] @ 20 - @ ldr r1,[sp,#2*4] - mov r0,r2,ror#7 - add r8,r8,r12 @ h+=Maj(a,b,c) from the past - mov r12,r1,ror#17 - eor r0,r0,r2,ror#18 - eor r12,r12,r1,ror#19 - eor r0,r0,r2,lsr#3 @ sigma0(X[i+1]) - ldr r2,[sp,#4*4] - eor r12,r12,r1,lsr#10 @ sigma1(X[i+14]) - ldr r1,[sp,#13*4] - - add r12,r12,r0 - eor r0,r4,r4,ror#5 @ from BODY_00_15 - add r2,r2,r12 - eor r0,r0,r4,ror#19 @ Sigma1(e) - add r2,r2,r1 @ X[i] - ldr r12,[r14],#4 @ *K256++ - add r7,r7,r2 @ h+=X[i] - str r2,[sp,#4*4] - eor r2,r5,r6 - add r7,r7,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r4 - add r7,r7,r12 @ h+=K256[i] - eor r2,r2,r6 @ Ch(e,f,g) - eor r0,r8,r8,ror#11 - add r7,r7,r2 @ h+=Ch(e,f,g) -#if 20==31 - and r12,r12,#0xff - cmp r12,#0xf2 @ done? -#endif -#if 20<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r12,r8,r9 @ a^b, b^c in next round -#else - ldr r2,[sp,#6*4] @ from future BODY_16_xx - eor r12,r8,r9 @ a^b, b^c in next round - ldr r1,[sp,#3*4] @ from future BODY_16_xx -#endif - eor r0,r0,r8,ror#20 @ Sigma0(a) - and r3,r3,r12 @ (b^c)&=(a^b) - add r11,r11,r7 @ d+=h - eor r3,r3,r9 @ Maj(a,b,c) - add r7,r7,r0,ror#2 @ h+=Sigma0(a) - @ add r7,r7,r3 @ h+=Maj(a,b,c) - @ ldr r2,[sp,#6*4] @ 21 - @ ldr r1,[sp,#3*4] - mov r0,r2,ror#7 - add r7,r7,r3 @ h+=Maj(a,b,c) from the past - mov r3,r1,ror#17 - eor r0,r0,r2,ror#18 - eor r3,r3,r1,ror#19 - eor r0,r0,r2,lsr#3 @ sigma0(X[i+1]) - ldr r2,[sp,#5*4] - eor r3,r3,r1,lsr#10 @ sigma1(X[i+14]) - ldr r1,[sp,#14*4] - - add r3,r3,r0 - eor r0,r11,r11,ror#5 @ from BODY_00_15 - add r2,r2,r3 - eor r0,r0,r11,ror#19 @ Sigma1(e) - add r2,r2,r1 @ X[i] - ldr r3,[r14],#4 @ *K256++ - add r6,r6,r2 @ h+=X[i] - str r2,[sp,#5*4] - eor r2,r4,r5 - add r6,r6,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r11 - add r6,r6,r3 @ h+=K256[i] - eor r2,r2,r5 @ Ch(e,f,g) - eor r0,r7,r7,ror#11 - add r6,r6,r2 @ h+=Ch(e,f,g) -#if 21==31 - and r3,r3,#0xff - cmp r3,#0xf2 @ done? -#endif -#if 21<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r3,r7,r8 @ a^b, b^c in next round -#else - ldr r2,[sp,#7*4] @ from future BODY_16_xx - eor r3,r7,r8 @ a^b, b^c in next round - ldr r1,[sp,#4*4] @ from future BODY_16_xx -#endif - eor r0,r0,r7,ror#20 @ Sigma0(a) - and r12,r12,r3 @ (b^c)&=(a^b) - add r10,r10,r6 @ d+=h - eor r12,r12,r8 @ Maj(a,b,c) - add r6,r6,r0,ror#2 @ h+=Sigma0(a) - @ add r6,r6,r12 @ h+=Maj(a,b,c) - @ ldr r2,[sp,#7*4] @ 22 - @ ldr r1,[sp,#4*4] - mov r0,r2,ror#7 - add r6,r6,r12 @ h+=Maj(a,b,c) from the past - mov r12,r1,ror#17 - eor r0,r0,r2,ror#18 - eor r12,r12,r1,ror#19 - eor r0,r0,r2,lsr#3 @ sigma0(X[i+1]) - ldr r2,[sp,#6*4] - eor r12,r12,r1,lsr#10 @ sigma1(X[i+14]) - ldr r1,[sp,#15*4] - - add r12,r12,r0 - eor r0,r10,r10,ror#5 @ from BODY_00_15 - add r2,r2,r12 - eor r0,r0,r10,ror#19 @ Sigma1(e) - add r2,r2,r1 @ X[i] - ldr r12,[r14],#4 @ *K256++ - add r5,r5,r2 @ h+=X[i] - str r2,[sp,#6*4] - eor r2,r11,r4 - add r5,r5,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r10 - add r5,r5,r12 @ h+=K256[i] - eor r2,r2,r4 @ Ch(e,f,g) - eor r0,r6,r6,ror#11 - add r5,r5,r2 @ h+=Ch(e,f,g) -#if 22==31 - and r12,r12,#0xff - cmp r12,#0xf2 @ done? -#endif -#if 22<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r12,r6,r7 @ a^b, b^c in next round -#else - ldr r2,[sp,#8*4] @ from future BODY_16_xx - eor r12,r6,r7 @ a^b, b^c in next round - ldr r1,[sp,#5*4] @ from future BODY_16_xx -#endif - eor r0,r0,r6,ror#20 @ Sigma0(a) - and r3,r3,r12 @ (b^c)&=(a^b) - add r9,r9,r5 @ d+=h - eor r3,r3,r7 @ Maj(a,b,c) - add r5,r5,r0,ror#2 @ h+=Sigma0(a) - @ add r5,r5,r3 @ h+=Maj(a,b,c) - @ ldr r2,[sp,#8*4] @ 23 - @ ldr r1,[sp,#5*4] - mov r0,r2,ror#7 - add r5,r5,r3 @ h+=Maj(a,b,c) from the past - mov r3,r1,ror#17 - eor r0,r0,r2,ror#18 - eor r3,r3,r1,ror#19 - eor r0,r0,r2,lsr#3 @ sigma0(X[i+1]) - ldr r2,[sp,#7*4] - eor r3,r3,r1,lsr#10 @ sigma1(X[i+14]) - ldr r1,[sp,#0*4] - - add r3,r3,r0 - eor r0,r9,r9,ror#5 @ from BODY_00_15 - add r2,r2,r3 - eor r0,r0,r9,ror#19 @ Sigma1(e) - add r2,r2,r1 @ X[i] - ldr r3,[r14],#4 @ *K256++ - add r4,r4,r2 @ h+=X[i] - str r2,[sp,#7*4] - eor r2,r10,r11 - add r4,r4,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r9 - add r4,r4,r3 @ h+=K256[i] - eor r2,r2,r11 @ Ch(e,f,g) - eor r0,r5,r5,ror#11 - add r4,r4,r2 @ h+=Ch(e,f,g) -#if 23==31 - and r3,r3,#0xff - cmp r3,#0xf2 @ done? -#endif -#if 23<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r3,r5,r6 @ a^b, b^c in next round -#else - ldr r2,[sp,#9*4] @ from future BODY_16_xx - eor r3,r5,r6 @ a^b, b^c in next round - ldr r1,[sp,#6*4] @ from future BODY_16_xx -#endif - eor r0,r0,r5,ror#20 @ Sigma0(a) - and r12,r12,r3 @ (b^c)&=(a^b) - add r8,r8,r4 @ d+=h - eor r12,r12,r6 @ Maj(a,b,c) - add r4,r4,r0,ror#2 @ h+=Sigma0(a) - @ add r4,r4,r12 @ h+=Maj(a,b,c) - @ ldr r2,[sp,#9*4] @ 24 - @ ldr r1,[sp,#6*4] - mov r0,r2,ror#7 - add r4,r4,r12 @ h+=Maj(a,b,c) from the past - mov r12,r1,ror#17 - eor r0,r0,r2,ror#18 - eor r12,r12,r1,ror#19 - eor r0,r0,r2,lsr#3 @ sigma0(X[i+1]) - ldr r2,[sp,#8*4] - eor r12,r12,r1,lsr#10 @ sigma1(X[i+14]) - ldr r1,[sp,#1*4] - - add r12,r12,r0 - eor r0,r8,r8,ror#5 @ from BODY_00_15 - add r2,r2,r12 - eor r0,r0,r8,ror#19 @ Sigma1(e) - add r2,r2,r1 @ X[i] - ldr r12,[r14],#4 @ *K256++ - add r11,r11,r2 @ h+=X[i] - str r2,[sp,#8*4] - eor r2,r9,r10 - add r11,r11,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r8 - add r11,r11,r12 @ h+=K256[i] - eor r2,r2,r10 @ Ch(e,f,g) - eor r0,r4,r4,ror#11 - add r11,r11,r2 @ h+=Ch(e,f,g) -#if 24==31 - and r12,r12,#0xff - cmp r12,#0xf2 @ done? -#endif -#if 24<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r12,r4,r5 @ a^b, b^c in next round -#else - ldr r2,[sp,#10*4] @ from future BODY_16_xx - eor r12,r4,r5 @ a^b, b^c in next round - ldr r1,[sp,#7*4] @ from future BODY_16_xx -#endif - eor r0,r0,r4,ror#20 @ Sigma0(a) - and r3,r3,r12 @ (b^c)&=(a^b) - add r7,r7,r11 @ d+=h - eor r3,r3,r5 @ Maj(a,b,c) - add r11,r11,r0,ror#2 @ h+=Sigma0(a) - @ add r11,r11,r3 @ h+=Maj(a,b,c) - @ ldr r2,[sp,#10*4] @ 25 - @ ldr r1,[sp,#7*4] - mov r0,r2,ror#7 - add r11,r11,r3 @ h+=Maj(a,b,c) from the past - mov r3,r1,ror#17 - eor r0,r0,r2,ror#18 - eor r3,r3,r1,ror#19 - eor r0,r0,r2,lsr#3 @ sigma0(X[i+1]) - ldr r2,[sp,#9*4] - eor r3,r3,r1,lsr#10 @ sigma1(X[i+14]) - ldr r1,[sp,#2*4] - - add r3,r3,r0 - eor r0,r7,r7,ror#5 @ from BODY_00_15 - add r2,r2,r3 - eor r0,r0,r7,ror#19 @ Sigma1(e) - add r2,r2,r1 @ X[i] - ldr r3,[r14],#4 @ *K256++ - add r10,r10,r2 @ h+=X[i] - str r2,[sp,#9*4] - eor r2,r8,r9 - add r10,r10,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r7 - add r10,r10,r3 @ h+=K256[i] - eor r2,r2,r9 @ Ch(e,f,g) - eor r0,r11,r11,ror#11 - add r10,r10,r2 @ h+=Ch(e,f,g) -#if 25==31 - and r3,r3,#0xff - cmp r3,#0xf2 @ done? -#endif -#if 25<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r3,r11,r4 @ a^b, b^c in next round -#else - ldr r2,[sp,#11*4] @ from future BODY_16_xx - eor r3,r11,r4 @ a^b, b^c in next round - ldr r1,[sp,#8*4] @ from future BODY_16_xx -#endif - eor r0,r0,r11,ror#20 @ Sigma0(a) - and r12,r12,r3 @ (b^c)&=(a^b) - add r6,r6,r10 @ d+=h - eor r12,r12,r4 @ Maj(a,b,c) - add r10,r10,r0,ror#2 @ h+=Sigma0(a) - @ add r10,r10,r12 @ h+=Maj(a,b,c) - @ ldr r2,[sp,#11*4] @ 26 - @ ldr r1,[sp,#8*4] - mov r0,r2,ror#7 - add r10,r10,r12 @ h+=Maj(a,b,c) from the past - mov r12,r1,ror#17 - eor r0,r0,r2,ror#18 - eor r12,r12,r1,ror#19 - eor r0,r0,r2,lsr#3 @ sigma0(X[i+1]) - ldr r2,[sp,#10*4] - eor r12,r12,r1,lsr#10 @ sigma1(X[i+14]) - ldr r1,[sp,#3*4] - - add r12,r12,r0 - eor r0,r6,r6,ror#5 @ from BODY_00_15 - add r2,r2,r12 - eor r0,r0,r6,ror#19 @ Sigma1(e) - add r2,r2,r1 @ X[i] - ldr r12,[r14],#4 @ *K256++ - add r9,r9,r2 @ h+=X[i] - str r2,[sp,#10*4] - eor r2,r7,r8 - add r9,r9,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r6 - add r9,r9,r12 @ h+=K256[i] - eor r2,r2,r8 @ Ch(e,f,g) - eor r0,r10,r10,ror#11 - add r9,r9,r2 @ h+=Ch(e,f,g) -#if 26==31 - and r12,r12,#0xff - cmp r12,#0xf2 @ done? -#endif -#if 26<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r12,r10,r11 @ a^b, b^c in next round -#else - ldr r2,[sp,#12*4] @ from future BODY_16_xx - eor r12,r10,r11 @ a^b, b^c in next round - ldr r1,[sp,#9*4] @ from future BODY_16_xx -#endif - eor r0,r0,r10,ror#20 @ Sigma0(a) - and r3,r3,r12 @ (b^c)&=(a^b) - add r5,r5,r9 @ d+=h - eor r3,r3,r11 @ Maj(a,b,c) - add r9,r9,r0,ror#2 @ h+=Sigma0(a) - @ add r9,r9,r3 @ h+=Maj(a,b,c) - @ ldr r2,[sp,#12*4] @ 27 - @ ldr r1,[sp,#9*4] - mov r0,r2,ror#7 - add r9,r9,r3 @ h+=Maj(a,b,c) from the past - mov r3,r1,ror#17 - eor r0,r0,r2,ror#18 - eor r3,r3,r1,ror#19 - eor r0,r0,r2,lsr#3 @ sigma0(X[i+1]) - ldr r2,[sp,#11*4] - eor r3,r3,r1,lsr#10 @ sigma1(X[i+14]) - ldr r1,[sp,#4*4] - - add r3,r3,r0 - eor r0,r5,r5,ror#5 @ from BODY_00_15 - add r2,r2,r3 - eor r0,r0,r5,ror#19 @ Sigma1(e) - add r2,r2,r1 @ X[i] - ldr r3,[r14],#4 @ *K256++ - add r8,r8,r2 @ h+=X[i] - str r2,[sp,#11*4] - eor r2,r6,r7 - add r8,r8,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r5 - add r8,r8,r3 @ h+=K256[i] - eor r2,r2,r7 @ Ch(e,f,g) - eor r0,r9,r9,ror#11 - add r8,r8,r2 @ h+=Ch(e,f,g) -#if 27==31 - and r3,r3,#0xff - cmp r3,#0xf2 @ done? -#endif -#if 27<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r3,r9,r10 @ a^b, b^c in next round -#else - ldr r2,[sp,#13*4] @ from future BODY_16_xx - eor r3,r9,r10 @ a^b, b^c in next round - ldr r1,[sp,#10*4] @ from future BODY_16_xx -#endif - eor r0,r0,r9,ror#20 @ Sigma0(a) - and r12,r12,r3 @ (b^c)&=(a^b) - add r4,r4,r8 @ d+=h - eor r12,r12,r10 @ Maj(a,b,c) - add r8,r8,r0,ror#2 @ h+=Sigma0(a) - @ add r8,r8,r12 @ h+=Maj(a,b,c) - @ ldr r2,[sp,#13*4] @ 28 - @ ldr r1,[sp,#10*4] - mov r0,r2,ror#7 - add r8,r8,r12 @ h+=Maj(a,b,c) from the past - mov r12,r1,ror#17 - eor r0,r0,r2,ror#18 - eor r12,r12,r1,ror#19 - eor r0,r0,r2,lsr#3 @ sigma0(X[i+1]) - ldr r2,[sp,#12*4] - eor r12,r12,r1,lsr#10 @ sigma1(X[i+14]) - ldr r1,[sp,#5*4] - - add r12,r12,r0 - eor r0,r4,r4,ror#5 @ from BODY_00_15 - add r2,r2,r12 - eor r0,r0,r4,ror#19 @ Sigma1(e) - add r2,r2,r1 @ X[i] - ldr r12,[r14],#4 @ *K256++ - add r7,r7,r2 @ h+=X[i] - str r2,[sp,#12*4] - eor r2,r5,r6 - add r7,r7,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r4 - add r7,r7,r12 @ h+=K256[i] - eor r2,r2,r6 @ Ch(e,f,g) - eor r0,r8,r8,ror#11 - add r7,r7,r2 @ h+=Ch(e,f,g) -#if 28==31 - and r12,r12,#0xff - cmp r12,#0xf2 @ done? -#endif -#if 28<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r12,r8,r9 @ a^b, b^c in next round -#else - ldr r2,[sp,#14*4] @ from future BODY_16_xx - eor r12,r8,r9 @ a^b, b^c in next round - ldr r1,[sp,#11*4] @ from future BODY_16_xx -#endif - eor r0,r0,r8,ror#20 @ Sigma0(a) - and r3,r3,r12 @ (b^c)&=(a^b) - add r11,r11,r7 @ d+=h - eor r3,r3,r9 @ Maj(a,b,c) - add r7,r7,r0,ror#2 @ h+=Sigma0(a) - @ add r7,r7,r3 @ h+=Maj(a,b,c) - @ ldr r2,[sp,#14*4] @ 29 - @ ldr r1,[sp,#11*4] - mov r0,r2,ror#7 - add r7,r7,r3 @ h+=Maj(a,b,c) from the past - mov r3,r1,ror#17 - eor r0,r0,r2,ror#18 - eor r3,r3,r1,ror#19 - eor r0,r0,r2,lsr#3 @ sigma0(X[i+1]) - ldr r2,[sp,#13*4] - eor r3,r3,r1,lsr#10 @ sigma1(X[i+14]) - ldr r1,[sp,#6*4] - - add r3,r3,r0 - eor r0,r11,r11,ror#5 @ from BODY_00_15 - add r2,r2,r3 - eor r0,r0,r11,ror#19 @ Sigma1(e) - add r2,r2,r1 @ X[i] - ldr r3,[r14],#4 @ *K256++ - add r6,r6,r2 @ h+=X[i] - str r2,[sp,#13*4] - eor r2,r4,r5 - add r6,r6,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r11 - add r6,r6,r3 @ h+=K256[i] - eor r2,r2,r5 @ Ch(e,f,g) - eor r0,r7,r7,ror#11 - add r6,r6,r2 @ h+=Ch(e,f,g) -#if 29==31 - and r3,r3,#0xff - cmp r3,#0xf2 @ done? -#endif -#if 29<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r3,r7,r8 @ a^b, b^c in next round -#else - ldr r2,[sp,#15*4] @ from future BODY_16_xx - eor r3,r7,r8 @ a^b, b^c in next round - ldr r1,[sp,#12*4] @ from future BODY_16_xx -#endif - eor r0,r0,r7,ror#20 @ Sigma0(a) - and r12,r12,r3 @ (b^c)&=(a^b) - add r10,r10,r6 @ d+=h - eor r12,r12,r8 @ Maj(a,b,c) - add r6,r6,r0,ror#2 @ h+=Sigma0(a) - @ add r6,r6,r12 @ h+=Maj(a,b,c) - @ ldr r2,[sp,#15*4] @ 30 - @ ldr r1,[sp,#12*4] - mov r0,r2,ror#7 - add r6,r6,r12 @ h+=Maj(a,b,c) from the past - mov r12,r1,ror#17 - eor r0,r0,r2,ror#18 - eor r12,r12,r1,ror#19 - eor r0,r0,r2,lsr#3 @ sigma0(X[i+1]) - ldr r2,[sp,#14*4] - eor r12,r12,r1,lsr#10 @ sigma1(X[i+14]) - ldr r1,[sp,#7*4] - - add r12,r12,r0 - eor r0,r10,r10,ror#5 @ from BODY_00_15 - add r2,r2,r12 - eor r0,r0,r10,ror#19 @ Sigma1(e) - add r2,r2,r1 @ X[i] - ldr r12,[r14],#4 @ *K256++ - add r5,r5,r2 @ h+=X[i] - str r2,[sp,#14*4] - eor r2,r11,r4 - add r5,r5,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r10 - add r5,r5,r12 @ h+=K256[i] - eor r2,r2,r4 @ Ch(e,f,g) - eor r0,r6,r6,ror#11 - add r5,r5,r2 @ h+=Ch(e,f,g) -#if 30==31 - and r12,r12,#0xff - cmp r12,#0xf2 @ done? -#endif -#if 30<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r12,r6,r7 @ a^b, b^c in next round -#else - ldr r2,[sp,#0*4] @ from future BODY_16_xx - eor r12,r6,r7 @ a^b, b^c in next round - ldr r1,[sp,#13*4] @ from future BODY_16_xx -#endif - eor r0,r0,r6,ror#20 @ Sigma0(a) - and r3,r3,r12 @ (b^c)&=(a^b) - add r9,r9,r5 @ d+=h - eor r3,r3,r7 @ Maj(a,b,c) - add r5,r5,r0,ror#2 @ h+=Sigma0(a) - @ add r5,r5,r3 @ h+=Maj(a,b,c) - @ ldr r2,[sp,#0*4] @ 31 - @ ldr r1,[sp,#13*4] - mov r0,r2,ror#7 - add r5,r5,r3 @ h+=Maj(a,b,c) from the past - mov r3,r1,ror#17 - eor r0,r0,r2,ror#18 - eor r3,r3,r1,ror#19 - eor r0,r0,r2,lsr#3 @ sigma0(X[i+1]) - ldr r2,[sp,#15*4] - eor r3,r3,r1,lsr#10 @ sigma1(X[i+14]) - ldr r1,[sp,#8*4] - - add r3,r3,r0 - eor r0,r9,r9,ror#5 @ from BODY_00_15 - add r2,r2,r3 - eor r0,r0,r9,ror#19 @ Sigma1(e) - add r2,r2,r1 @ X[i] - ldr r3,[r14],#4 @ *K256++ - add r4,r4,r2 @ h+=X[i] - str r2,[sp,#15*4] - eor r2,r10,r11 - add r4,r4,r0,ror#6 @ h+=Sigma1(e) - and r2,r2,r9 - add r4,r4,r3 @ h+=K256[i] - eor r2,r2,r11 @ Ch(e,f,g) - eor r0,r5,r5,ror#11 - add r4,r4,r2 @ h+=Ch(e,f,g) -#if 31==31 - and r3,r3,#0xff - cmp r3,#0xf2 @ done? -#endif -#if 31<15 -# if __ARM_ARCH__>=7 - ldr r2,[r1],#4 @ prefetch -# else - ldrb r2,[r1,#3] -# endif - eor r3,r5,r6 @ a^b, b^c in next round -#else - ldr r2,[sp,#1*4] @ from future BODY_16_xx - eor r3,r5,r6 @ a^b, b^c in next round - ldr r1,[sp,#14*4] @ from future BODY_16_xx -#endif - eor r0,r0,r5,ror#20 @ Sigma0(a) - and r12,r12,r3 @ (b^c)&=(a^b) - add r8,r8,r4 @ d+=h - eor r12,r12,r6 @ Maj(a,b,c) - add r4,r4,r0,ror#2 @ h+=Sigma0(a) - @ add r4,r4,r12 @ h+=Maj(a,b,c) -#if __ARM_ARCH__>=7 - ite eq @ Thumb2 thing, sanity check in ARM -#endif - ldreq r3,[sp,#16*4] @ pull ctx - bne .Lrounds_16_xx - - add r4,r4,r12 @ h+=Maj(a,b,c) from the past - ldr r0,[r3,#0] - ldr r2,[r3,#4] - ldr r12,[r3,#8] - add r4,r4,r0 - ldr r0,[r3,#12] - add r5,r5,r2 - ldr r2,[r3,#16] - add r6,r6,r12 - ldr r12,[r3,#20] - add r7,r7,r0 - ldr r0,[r3,#24] - add r8,r8,r2 - ldr r2,[r3,#28] - add r9,r9,r12 - ldr r1,[sp,#17*4] @ pull inp - ldr r12,[sp,#18*4] @ pull inp+len - add r10,r10,r0 - add r11,r11,r2 - stmia r3,{r4,r5,r6,r7,r8,r9,r10,r11} - cmp r1,r12 - sub r14,r14,#256 @ rewind Ktbl - bne .Loop - - add sp,sp,#19*4 @ destroy frame -#if __ARM_ARCH__>=5 - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,pc} -#else - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,lr} - tst lr,#1 - moveq pc,lr @ be binary compatible with V4, yet -.word 0xe12fff1e @ interoperable with Thumb ISA:-) -#endif -.size sha256_block_data_order,.-sha256_block_data_order -#if __ARM_MAX_ARCH__>=7 -.arch armv7-a -.fpu neon - -.globl sha256_block_data_order_neon -.type sha256_block_data_order_neon,%function -.align 4 -sha256_block_data_order_neon: -.LNEON: - stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} - - sub r11,sp,#16*4+16 - adrl r14,K256 - bic r11,r11,#15 @ align for 128-bit stores - mov r12,sp - mov sp,r11 @ alloca - add r2,r1,r2,lsl#6 @ len to point at the end of inp - - vld1.8 {q0},[r1]! - vld1.8 {q1},[r1]! - vld1.8 {q2},[r1]! - vld1.8 {q3},[r1]! - vld1.32 {q8},[r14,:128]! - vld1.32 {q9},[r14,:128]! - vld1.32 {q10},[r14,:128]! - vld1.32 {q11},[r14,:128]! - vrev32.8 q0,q0 @ yes, even on - str r0,[sp,#64] - vrev32.8 q1,q1 @ big-endian - str r1,[sp,#68] - mov r1,sp - vrev32.8 q2,q2 - str r2,[sp,#72] - vrev32.8 q3,q3 - str r12,[sp,#76] @ save original sp - vadd.i32 q8,q8,q0 - vadd.i32 q9,q9,q1 - vst1.32 {q8},[r1,:128]! - vadd.i32 q10,q10,q2 - vst1.32 {q9},[r1,:128]! - vadd.i32 q11,q11,q3 - vst1.32 {q10},[r1,:128]! - vst1.32 {q11},[r1,:128]! - - ldmia r0,{r4,r5,r6,r7,r8,r9,r10,r11} - sub r1,r1,#64 - ldr r2,[sp,#0] - eor r12,r12,r12 - eor r3,r5,r6 - b .L_00_48 - -.align 4 -.L_00_48: - vext.8 q8,q0,q1,#4 - add r11,r11,r2 - eor r2,r9,r10 - eor r0,r8,r8,ror#5 - vext.8 q9,q2,q3,#4 - add r4,r4,r12 - and r2,r2,r8 - eor r12,r0,r8,ror#19 - vshr.u32 q10,q8,#7 - eor r0,r4,r4,ror#11 - eor r2,r2,r10 - vadd.i32 q0,q0,q9 - add r11,r11,r12,ror#6 - eor r12,r4,r5 - vshr.u32 q9,q8,#3 - eor r0,r0,r4,ror#20 - add r11,r11,r2 - vsli.32 q10,q8,#25 - ldr r2,[sp,#4] - and r3,r3,r12 - vshr.u32 q11,q8,#18 - add r7,r7,r11 - add r11,r11,r0,ror#2 - eor r3,r3,r5 - veor q9,q9,q10 - add r10,r10,r2 - vsli.32 q11,q8,#14 - eor r2,r8,r9 - eor r0,r7,r7,ror#5 - vshr.u32 d24,d7,#17 - add r11,r11,r3 - and r2,r2,r7 - veor q9,q9,q11 - eor r3,r0,r7,ror#19 - eor r0,r11,r11,ror#11 - vsli.32 d24,d7,#15 - eor r2,r2,r9 - add r10,r10,r3,ror#6 - vshr.u32 d25,d7,#10 - eor r3,r11,r4 - eor r0,r0,r11,ror#20 - vadd.i32 q0,q0,q9 - add r10,r10,r2 - ldr r2,[sp,#8] - veor d25,d25,d24 - and r12,r12,r3 - add r6,r6,r10 - vshr.u32 d24,d7,#19 - add r10,r10,r0,ror#2 - eor r12,r12,r4 - vsli.32 d24,d7,#13 - add r9,r9,r2 - eor r2,r7,r8 - veor d25,d25,d24 - eor r0,r6,r6,ror#5 - add r10,r10,r12 - vadd.i32 d0,d0,d25 - and r2,r2,r6 - eor r12,r0,r6,ror#19 - vshr.u32 d24,d0,#17 - eor r0,r10,r10,ror#11 - eor r2,r2,r8 - vsli.32 d24,d0,#15 - add r9,r9,r12,ror#6 - eor r12,r10,r11 - vshr.u32 d25,d0,#10 - eor r0,r0,r10,ror#20 - add r9,r9,r2 - veor d25,d25,d24 - ldr r2,[sp,#12] - and r3,r3,r12 - vshr.u32 d24,d0,#19 - add r5,r5,r9 - add r9,r9,r0,ror#2 - eor r3,r3,r11 - vld1.32 {q8},[r14,:128]! - add r8,r8,r2 - vsli.32 d24,d0,#13 - eor r2,r6,r7 - eor r0,r5,r5,ror#5 - veor d25,d25,d24 - add r9,r9,r3 - and r2,r2,r5 - vadd.i32 d1,d1,d25 - eor r3,r0,r5,ror#19 - eor r0,r9,r9,ror#11 - vadd.i32 q8,q8,q0 - eor r2,r2,r7 - add r8,r8,r3,ror#6 - eor r3,r9,r10 - eor r0,r0,r9,ror#20 - add r8,r8,r2 - ldr r2,[sp,#16] - and r12,r12,r3 - add r4,r4,r8 - vst1.32 {q8},[r1,:128]! - add r8,r8,r0,ror#2 - eor r12,r12,r10 - vext.8 q8,q1,q2,#4 - add r7,r7,r2 - eor r2,r5,r6 - eor r0,r4,r4,ror#5 - vext.8 q9,q3,q0,#4 - add r8,r8,r12 - and r2,r2,r4 - eor r12,r0,r4,ror#19 - vshr.u32 q10,q8,#7 - eor r0,r8,r8,ror#11 - eor r2,r2,r6 - vadd.i32 q1,q1,q9 - add r7,r7,r12,ror#6 - eor r12,r8,r9 - vshr.u32 q9,q8,#3 - eor r0,r0,r8,ror#20 - add r7,r7,r2 - vsli.32 q10,q8,#25 - ldr r2,[sp,#20] - and r3,r3,r12 - vshr.u32 q11,q8,#18 - add r11,r11,r7 - add r7,r7,r0,ror#2 - eor r3,r3,r9 - veor q9,q9,q10 - add r6,r6,r2 - vsli.32 q11,q8,#14 - eor r2,r4,r5 - eor r0,r11,r11,ror#5 - vshr.u32 d24,d1,#17 - add r7,r7,r3 - and r2,r2,r11 - veor q9,q9,q11 - eor r3,r0,r11,ror#19 - eor r0,r7,r7,ror#11 - vsli.32 d24,d1,#15 - eor r2,r2,r5 - add r6,r6,r3,ror#6 - vshr.u32 d25,d1,#10 - eor r3,r7,r8 - eor r0,r0,r7,ror#20 - vadd.i32 q1,q1,q9 - add r6,r6,r2 - ldr r2,[sp,#24] - veor d25,d25,d24 - and r12,r12,r3 - add r10,r10,r6 - vshr.u32 d24,d1,#19 - add r6,r6,r0,ror#2 - eor r12,r12,r8 - vsli.32 d24,d1,#13 - add r5,r5,r2 - eor r2,r11,r4 - veor d25,d25,d24 - eor r0,r10,r10,ror#5 - add r6,r6,r12 - vadd.i32 d2,d2,d25 - and r2,r2,r10 - eor r12,r0,r10,ror#19 - vshr.u32 d24,d2,#17 - eor r0,r6,r6,ror#11 - eor r2,r2,r4 - vsli.32 d24,d2,#15 - add r5,r5,r12,ror#6 - eor r12,r6,r7 - vshr.u32 d25,d2,#10 - eor r0,r0,r6,ror#20 - add r5,r5,r2 - veor d25,d25,d24 - ldr r2,[sp,#28] - and r3,r3,r12 - vshr.u32 d24,d2,#19 - add r9,r9,r5 - add r5,r5,r0,ror#2 - eor r3,r3,r7 - vld1.32 {q8},[r14,:128]! - add r4,r4,r2 - vsli.32 d24,d2,#13 - eor r2,r10,r11 - eor r0,r9,r9,ror#5 - veor d25,d25,d24 - add r5,r5,r3 - and r2,r2,r9 - vadd.i32 d3,d3,d25 - eor r3,r0,r9,ror#19 - eor r0,r5,r5,ror#11 - vadd.i32 q8,q8,q1 - eor r2,r2,r11 - add r4,r4,r3,ror#6 - eor r3,r5,r6 - eor r0,r0,r5,ror#20 - add r4,r4,r2 - ldr r2,[sp,#32] - and r12,r12,r3 - add r8,r8,r4 - vst1.32 {q8},[r1,:128]! - add r4,r4,r0,ror#2 - eor r12,r12,r6 - vext.8 q8,q2,q3,#4 - add r11,r11,r2 - eor r2,r9,r10 - eor r0,r8,r8,ror#5 - vext.8 q9,q0,q1,#4 - add r4,r4,r12 - and r2,r2,r8 - eor r12,r0,r8,ror#19 - vshr.u32 q10,q8,#7 - eor r0,r4,r4,ror#11 - eor r2,r2,r10 - vadd.i32 q2,q2,q9 - add r11,r11,r12,ror#6 - eor r12,r4,r5 - vshr.u32 q9,q8,#3 - eor r0,r0,r4,ror#20 - add r11,r11,r2 - vsli.32 q10,q8,#25 - ldr r2,[sp,#36] - and r3,r3,r12 - vshr.u32 q11,q8,#18 - add r7,r7,r11 - add r11,r11,r0,ror#2 - eor r3,r3,r5 - veor q9,q9,q10 - add r10,r10,r2 - vsli.32 q11,q8,#14 - eor r2,r8,r9 - eor r0,r7,r7,ror#5 - vshr.u32 d24,d3,#17 - add r11,r11,r3 - and r2,r2,r7 - veor q9,q9,q11 - eor r3,r0,r7,ror#19 - eor r0,r11,r11,ror#11 - vsli.32 d24,d3,#15 - eor r2,r2,r9 - add r10,r10,r3,ror#6 - vshr.u32 d25,d3,#10 - eor r3,r11,r4 - eor r0,r0,r11,ror#20 - vadd.i32 q2,q2,q9 - add r10,r10,r2 - ldr r2,[sp,#40] - veor d25,d25,d24 - and r12,r12,r3 - add r6,r6,r10 - vshr.u32 d24,d3,#19 - add r10,r10,r0,ror#2 - eor r12,r12,r4 - vsli.32 d24,d3,#13 - add r9,r9,r2 - eor r2,r7,r8 - veor d25,d25,d24 - eor r0,r6,r6,ror#5 - add r10,r10,r12 - vadd.i32 d4,d4,d25 - and r2,r2,r6 - eor r12,r0,r6,ror#19 - vshr.u32 d24,d4,#17 - eor r0,r10,r10,ror#11 - eor r2,r2,r8 - vsli.32 d24,d4,#15 - add r9,r9,r12,ror#6 - eor r12,r10,r11 - vshr.u32 d25,d4,#10 - eor r0,r0,r10,ror#20 - add r9,r9,r2 - veor d25,d25,d24 - ldr r2,[sp,#44] - and r3,r3,r12 - vshr.u32 d24,d4,#19 - add r5,r5,r9 - add r9,r9,r0,ror#2 - eor r3,r3,r11 - vld1.32 {q8},[r14,:128]! - add r8,r8,r2 - vsli.32 d24,d4,#13 - eor r2,r6,r7 - eor r0,r5,r5,ror#5 - veor d25,d25,d24 - add r9,r9,r3 - and r2,r2,r5 - vadd.i32 d5,d5,d25 - eor r3,r0,r5,ror#19 - eor r0,r9,r9,ror#11 - vadd.i32 q8,q8,q2 - eor r2,r2,r7 - add r8,r8,r3,ror#6 - eor r3,r9,r10 - eor r0,r0,r9,ror#20 - add r8,r8,r2 - ldr r2,[sp,#48] - and r12,r12,r3 - add r4,r4,r8 - vst1.32 {q8},[r1,:128]! - add r8,r8,r0,ror#2 - eor r12,r12,r10 - vext.8 q8,q3,q0,#4 - add r7,r7,r2 - eor r2,r5,r6 - eor r0,r4,r4,ror#5 - vext.8 q9,q1,q2,#4 - add r8,r8,r12 - and r2,r2,r4 - eor r12,r0,r4,ror#19 - vshr.u32 q10,q8,#7 - eor r0,r8,r8,ror#11 - eor r2,r2,r6 - vadd.i32 q3,q3,q9 - add r7,r7,r12,ror#6 - eor r12,r8,r9 - vshr.u32 q9,q8,#3 - eor r0,r0,r8,ror#20 - add r7,r7,r2 - vsli.32 q10,q8,#25 - ldr r2,[sp,#52] - and r3,r3,r12 - vshr.u32 q11,q8,#18 - add r11,r11,r7 - add r7,r7,r0,ror#2 - eor r3,r3,r9 - veor q9,q9,q10 - add r6,r6,r2 - vsli.32 q11,q8,#14 - eor r2,r4,r5 - eor r0,r11,r11,ror#5 - vshr.u32 d24,d5,#17 - add r7,r7,r3 - and r2,r2,r11 - veor q9,q9,q11 - eor r3,r0,r11,ror#19 - eor r0,r7,r7,ror#11 - vsli.32 d24,d5,#15 - eor r2,r2,r5 - add r6,r6,r3,ror#6 - vshr.u32 d25,d5,#10 - eor r3,r7,r8 - eor r0,r0,r7,ror#20 - vadd.i32 q3,q3,q9 - add r6,r6,r2 - ldr r2,[sp,#56] - veor d25,d25,d24 - and r12,r12,r3 - add r10,r10,r6 - vshr.u32 d24,d5,#19 - add r6,r6,r0,ror#2 - eor r12,r12,r8 - vsli.32 d24,d5,#13 - add r5,r5,r2 - eor r2,r11,r4 - veor d25,d25,d24 - eor r0,r10,r10,ror#5 - add r6,r6,r12 - vadd.i32 d6,d6,d25 - and r2,r2,r10 - eor r12,r0,r10,ror#19 - vshr.u32 d24,d6,#17 - eor r0,r6,r6,ror#11 - eor r2,r2,r4 - vsli.32 d24,d6,#15 - add r5,r5,r12,ror#6 - eor r12,r6,r7 - vshr.u32 d25,d6,#10 - eor r0,r0,r6,ror#20 - add r5,r5,r2 - veor d25,d25,d24 - ldr r2,[sp,#60] - and r3,r3,r12 - vshr.u32 d24,d6,#19 - add r9,r9,r5 - add r5,r5,r0,ror#2 - eor r3,r3,r7 - vld1.32 {q8},[r14,:128]! - add r4,r4,r2 - vsli.32 d24,d6,#13 - eor r2,r10,r11 - eor r0,r9,r9,ror#5 - veor d25,d25,d24 - add r5,r5,r3 - and r2,r2,r9 - vadd.i32 d7,d7,d25 - eor r3,r0,r9,ror#19 - eor r0,r5,r5,ror#11 - vadd.i32 q8,q8,q3 - eor r2,r2,r11 - add r4,r4,r3,ror#6 - eor r3,r5,r6 - eor r0,r0,r5,ror#20 - add r4,r4,r2 - ldr r2,[r14] - and r12,r12,r3 - add r8,r8,r4 - vst1.32 {q8},[r1,:128]! - add r4,r4,r0,ror#2 - eor r12,r12,r6 - teq r2,#0 @ check for K256 terminator - ldr r2,[sp,#0] - sub r1,r1,#64 - bne .L_00_48 - - ldr r1,[sp,#68] - ldr r0,[sp,#72] - sub r14,r14,#256 @ rewind r14 - teq r1,r0 - it eq - subeq r1,r1,#64 @ avoid SEGV - vld1.8 {q0},[r1]! @ load next input block - vld1.8 {q1},[r1]! - vld1.8 {q2},[r1]! - vld1.8 {q3},[r1]! - it ne - strne r1,[sp,#68] - mov r1,sp - add r11,r11,r2 - eor r2,r9,r10 - eor r0,r8,r8,ror#5 - add r4,r4,r12 - vld1.32 {q8},[r14,:128]! - and r2,r2,r8 - eor r12,r0,r8,ror#19 - eor r0,r4,r4,ror#11 - eor r2,r2,r10 - vrev32.8 q0,q0 - add r11,r11,r12,ror#6 - eor r12,r4,r5 - eor r0,r0,r4,ror#20 - add r11,r11,r2 - vadd.i32 q8,q8,q0 - ldr r2,[sp,#4] - and r3,r3,r12 - add r7,r7,r11 - add r11,r11,r0,ror#2 - eor r3,r3,r5 - add r10,r10,r2 - eor r2,r8,r9 - eor r0,r7,r7,ror#5 - add r11,r11,r3 - and r2,r2,r7 - eor r3,r0,r7,ror#19 - eor r0,r11,r11,ror#11 - eor r2,r2,r9 - add r10,r10,r3,ror#6 - eor r3,r11,r4 - eor r0,r0,r11,ror#20 - add r10,r10,r2 - ldr r2,[sp,#8] - and r12,r12,r3 - add r6,r6,r10 - add r10,r10,r0,ror#2 - eor r12,r12,r4 - add r9,r9,r2 - eor r2,r7,r8 - eor r0,r6,r6,ror#5 - add r10,r10,r12 - and r2,r2,r6 - eor r12,r0,r6,ror#19 - eor r0,r10,r10,ror#11 - eor r2,r2,r8 - add r9,r9,r12,ror#6 - eor r12,r10,r11 - eor r0,r0,r10,ror#20 - add r9,r9,r2 - ldr r2,[sp,#12] - and r3,r3,r12 - add r5,r5,r9 - add r9,r9,r0,ror#2 - eor r3,r3,r11 - add r8,r8,r2 - eor r2,r6,r7 - eor r0,r5,r5,ror#5 - add r9,r9,r3 - and r2,r2,r5 - eor r3,r0,r5,ror#19 - eor r0,r9,r9,ror#11 - eor r2,r2,r7 - add r8,r8,r3,ror#6 - eor r3,r9,r10 - eor r0,r0,r9,ror#20 - add r8,r8,r2 - ldr r2,[sp,#16] - and r12,r12,r3 - add r4,r4,r8 - add r8,r8,r0,ror#2 - eor r12,r12,r10 - vst1.32 {q8},[r1,:128]! - add r7,r7,r2 - eor r2,r5,r6 - eor r0,r4,r4,ror#5 - add r8,r8,r12 - vld1.32 {q8},[r14,:128]! - and r2,r2,r4 - eor r12,r0,r4,ror#19 - eor r0,r8,r8,ror#11 - eor r2,r2,r6 - vrev32.8 q1,q1 - add r7,r7,r12,ror#6 - eor r12,r8,r9 - eor r0,r0,r8,ror#20 - add r7,r7,r2 - vadd.i32 q8,q8,q1 - ldr r2,[sp,#20] - and r3,r3,r12 - add r11,r11,r7 - add r7,r7,r0,ror#2 - eor r3,r3,r9 - add r6,r6,r2 - eor r2,r4,r5 - eor r0,r11,r11,ror#5 - add r7,r7,r3 - and r2,r2,r11 - eor r3,r0,r11,ror#19 - eor r0,r7,r7,ror#11 - eor r2,r2,r5 - add r6,r6,r3,ror#6 - eor r3,r7,r8 - eor r0,r0,r7,ror#20 - add r6,r6,r2 - ldr r2,[sp,#24] - and r12,r12,r3 - add r10,r10,r6 - add r6,r6,r0,ror#2 - eor r12,r12,r8 - add r5,r5,r2 - eor r2,r11,r4 - eor r0,r10,r10,ror#5 - add r6,r6,r12 - and r2,r2,r10 - eor r12,r0,r10,ror#19 - eor r0,r6,r6,ror#11 - eor r2,r2,r4 - add r5,r5,r12,ror#6 - eor r12,r6,r7 - eor r0,r0,r6,ror#20 - add r5,r5,r2 - ldr r2,[sp,#28] - and r3,r3,r12 - add r9,r9,r5 - add r5,r5,r0,ror#2 - eor r3,r3,r7 - add r4,r4,r2 - eor r2,r10,r11 - eor r0,r9,r9,ror#5 - add r5,r5,r3 - and r2,r2,r9 - eor r3,r0,r9,ror#19 - eor r0,r5,r5,ror#11 - eor r2,r2,r11 - add r4,r4,r3,ror#6 - eor r3,r5,r6 - eor r0,r0,r5,ror#20 - add r4,r4,r2 - ldr r2,[sp,#32] - and r12,r12,r3 - add r8,r8,r4 - add r4,r4,r0,ror#2 - eor r12,r12,r6 - vst1.32 {q8},[r1,:128]! - add r11,r11,r2 - eor r2,r9,r10 - eor r0,r8,r8,ror#5 - add r4,r4,r12 - vld1.32 {q8},[r14,:128]! - and r2,r2,r8 - eor r12,r0,r8,ror#19 - eor r0,r4,r4,ror#11 - eor r2,r2,r10 - vrev32.8 q2,q2 - add r11,r11,r12,ror#6 - eor r12,r4,r5 - eor r0,r0,r4,ror#20 - add r11,r11,r2 - vadd.i32 q8,q8,q2 - ldr r2,[sp,#36] - and r3,r3,r12 - add r7,r7,r11 - add r11,r11,r0,ror#2 - eor r3,r3,r5 - add r10,r10,r2 - eor r2,r8,r9 - eor r0,r7,r7,ror#5 - add r11,r11,r3 - and r2,r2,r7 - eor r3,r0,r7,ror#19 - eor r0,r11,r11,ror#11 - eor r2,r2,r9 - add r10,r10,r3,ror#6 - eor r3,r11,r4 - eor r0,r0,r11,ror#20 - add r10,r10,r2 - ldr r2,[sp,#40] - and r12,r12,r3 - add r6,r6,r10 - add r10,r10,r0,ror#2 - eor r12,r12,r4 - add r9,r9,r2 - eor r2,r7,r8 - eor r0,r6,r6,ror#5 - add r10,r10,r12 - and r2,r2,r6 - eor r12,r0,r6,ror#19 - eor r0,r10,r10,ror#11 - eor r2,r2,r8 - add r9,r9,r12,ror#6 - eor r12,r10,r11 - eor r0,r0,r10,ror#20 - add r9,r9,r2 - ldr r2,[sp,#44] - and r3,r3,r12 - add r5,r5,r9 - add r9,r9,r0,ror#2 - eor r3,r3,r11 - add r8,r8,r2 - eor r2,r6,r7 - eor r0,r5,r5,ror#5 - add r9,r9,r3 - and r2,r2,r5 - eor r3,r0,r5,ror#19 - eor r0,r9,r9,ror#11 - eor r2,r2,r7 - add r8,r8,r3,ror#6 - eor r3,r9,r10 - eor r0,r0,r9,ror#20 - add r8,r8,r2 - ldr r2,[sp,#48] - and r12,r12,r3 - add r4,r4,r8 - add r8,r8,r0,ror#2 - eor r12,r12,r10 - vst1.32 {q8},[r1,:128]! - add r7,r7,r2 - eor r2,r5,r6 - eor r0,r4,r4,ror#5 - add r8,r8,r12 - vld1.32 {q8},[r14,:128]! - and r2,r2,r4 - eor r12,r0,r4,ror#19 - eor r0,r8,r8,ror#11 - eor r2,r2,r6 - vrev32.8 q3,q3 - add r7,r7,r12,ror#6 - eor r12,r8,r9 - eor r0,r0,r8,ror#20 - add r7,r7,r2 - vadd.i32 q8,q8,q3 - ldr r2,[sp,#52] - and r3,r3,r12 - add r11,r11,r7 - add r7,r7,r0,ror#2 - eor r3,r3,r9 - add r6,r6,r2 - eor r2,r4,r5 - eor r0,r11,r11,ror#5 - add r7,r7,r3 - and r2,r2,r11 - eor r3,r0,r11,ror#19 - eor r0,r7,r7,ror#11 - eor r2,r2,r5 - add r6,r6,r3,ror#6 - eor r3,r7,r8 - eor r0,r0,r7,ror#20 - add r6,r6,r2 - ldr r2,[sp,#56] - and r12,r12,r3 - add r10,r10,r6 - add r6,r6,r0,ror#2 - eor r12,r12,r8 - add r5,r5,r2 - eor r2,r11,r4 - eor r0,r10,r10,ror#5 - add r6,r6,r12 - and r2,r2,r10 - eor r12,r0,r10,ror#19 - eor r0,r6,r6,ror#11 - eor r2,r2,r4 - add r5,r5,r12,ror#6 - eor r12,r6,r7 - eor r0,r0,r6,ror#20 - add r5,r5,r2 - ldr r2,[sp,#60] - and r3,r3,r12 - add r9,r9,r5 - add r5,r5,r0,ror#2 - eor r3,r3,r7 - add r4,r4,r2 - eor r2,r10,r11 - eor r0,r9,r9,ror#5 - add r5,r5,r3 - and r2,r2,r9 - eor r3,r0,r9,ror#19 - eor r0,r5,r5,ror#11 - eor r2,r2,r11 - add r4,r4,r3,ror#6 - eor r3,r5,r6 - eor r0,r0,r5,ror#20 - add r4,r4,r2 - ldr r2,[sp,#64] - and r12,r12,r3 - add r8,r8,r4 - add r4,r4,r0,ror#2 - eor r12,r12,r6 - vst1.32 {q8},[r1,:128]! - ldr r0,[r2,#0] - add r4,r4,r12 @ h+=Maj(a,b,c) from the past - ldr r12,[r2,#4] - ldr r3,[r2,#8] - ldr r1,[r2,#12] - add r4,r4,r0 @ accumulate - ldr r0,[r2,#16] - add r5,r5,r12 - ldr r12,[r2,#20] - add r6,r6,r3 - ldr r3,[r2,#24] - add r7,r7,r1 - ldr r1,[r2,#28] - add r8,r8,r0 - str r4,[r2],#4 - add r9,r9,r12 - str r5,[r2],#4 - add r10,r10,r3 - str r6,[r2],#4 - add r11,r11,r1 - str r7,[r2],#4 - stmia r2,{r8,r9,r10,r11} - - ittte ne - movne r1,sp - ldrne r2,[sp,#0] - eorne r12,r12,r12 - ldreq sp,[sp,#76] @ restore original sp - itt ne - eorne r3,r5,r6 - bne .L_00_48 - - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc} -.size sha256_block_data_order_neon,.-sha256_block_data_order_neon -#endif -#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) - -# if defined(__thumb2__) && !defined(__APPLE__) -# define INST(a,b,c,d) .byte c,d|0xc,a,b -# else -# define INST(a,b,c,d) .byte a,b,c,d -# endif - -.type sha256_block_data_order_armv8,%function -.align 5 -sha256_block_data_order_armv8: -.LARMv8: - vld1.32 {q0,q1},[r0] -# ifdef __APPLE__ - sub r3,r3,#256+32 -# elif defined(__thumb2__) - adr r3,.LARMv8 - sub r3,r3,#.LARMv8-K256 -# else - adrl r3,K256 -# endif - add r2,r1,r2,lsl#6 @ len to point at the end of inp - -.Loop_v8: - vld1.8 {q8,q9},[r1]! - vld1.8 {q10,q11},[r1]! - vld1.32 {q12},[r3]! - vrev32.8 q8,q8 - vrev32.8 q9,q9 - vrev32.8 q10,q10 - vrev32.8 q11,q11 - vmov q14,q0 @ offload - vmov q15,q1 - teq r1,r2 - vld1.32 {q13},[r3]! - vadd.i32 q12,q12,q8 - INST(0xe2,0x03,0xfa,0xf3) @ sha256su0 q8,q9 - vmov q2,q0 - INST(0x68,0x0c,0x02,0xf3) @ sha256h q0,q1,q12 - INST(0x68,0x2c,0x14,0xf3) @ sha256h2 q1,q2,q12 - INST(0xe6,0x0c,0x64,0xf3) @ sha256su1 q8,q10,q11 - vld1.32 {q12},[r3]! - vadd.i32 q13,q13,q9 - INST(0xe4,0x23,0xfa,0xf3) @ sha256su0 q9,q10 - vmov q2,q0 - INST(0x6a,0x0c,0x02,0xf3) @ sha256h q0,q1,q13 - INST(0x6a,0x2c,0x14,0xf3) @ sha256h2 q1,q2,q13 - INST(0xe0,0x2c,0x66,0xf3) @ sha256su1 q9,q11,q8 - vld1.32 {q13},[r3]! - vadd.i32 q12,q12,q10 - INST(0xe6,0x43,0xfa,0xf3) @ sha256su0 q10,q11 - vmov q2,q0 - INST(0x68,0x0c,0x02,0xf3) @ sha256h q0,q1,q12 - INST(0x68,0x2c,0x14,0xf3) @ sha256h2 q1,q2,q12 - INST(0xe2,0x4c,0x60,0xf3) @ sha256su1 q10,q8,q9 - vld1.32 {q12},[r3]! - vadd.i32 q13,q13,q11 - INST(0xe0,0x63,0xfa,0xf3) @ sha256su0 q11,q8 - vmov q2,q0 - INST(0x6a,0x0c,0x02,0xf3) @ sha256h q0,q1,q13 - INST(0x6a,0x2c,0x14,0xf3) @ sha256h2 q1,q2,q13 - INST(0xe4,0x6c,0x62,0xf3) @ sha256su1 q11,q9,q10 - vld1.32 {q13},[r3]! - vadd.i32 q12,q12,q8 - INST(0xe2,0x03,0xfa,0xf3) @ sha256su0 q8,q9 - vmov q2,q0 - INST(0x68,0x0c,0x02,0xf3) @ sha256h q0,q1,q12 - INST(0x68,0x2c,0x14,0xf3) @ sha256h2 q1,q2,q12 - INST(0xe6,0x0c,0x64,0xf3) @ sha256su1 q8,q10,q11 - vld1.32 {q12},[r3]! - vadd.i32 q13,q13,q9 - INST(0xe4,0x23,0xfa,0xf3) @ sha256su0 q9,q10 - vmov q2,q0 - INST(0x6a,0x0c,0x02,0xf3) @ sha256h q0,q1,q13 - INST(0x6a,0x2c,0x14,0xf3) @ sha256h2 q1,q2,q13 - INST(0xe0,0x2c,0x66,0xf3) @ sha256su1 q9,q11,q8 - vld1.32 {q13},[r3]! - vadd.i32 q12,q12,q10 - INST(0xe6,0x43,0xfa,0xf3) @ sha256su0 q10,q11 - vmov q2,q0 - INST(0x68,0x0c,0x02,0xf3) @ sha256h q0,q1,q12 - INST(0x68,0x2c,0x14,0xf3) @ sha256h2 q1,q2,q12 - INST(0xe2,0x4c,0x60,0xf3) @ sha256su1 q10,q8,q9 - vld1.32 {q12},[r3]! - vadd.i32 q13,q13,q11 - INST(0xe0,0x63,0xfa,0xf3) @ sha256su0 q11,q8 - vmov q2,q0 - INST(0x6a,0x0c,0x02,0xf3) @ sha256h q0,q1,q13 - INST(0x6a,0x2c,0x14,0xf3) @ sha256h2 q1,q2,q13 - INST(0xe4,0x6c,0x62,0xf3) @ sha256su1 q11,q9,q10 - vld1.32 {q13},[r3]! - vadd.i32 q12,q12,q8 - INST(0xe2,0x03,0xfa,0xf3) @ sha256su0 q8,q9 - vmov q2,q0 - INST(0x68,0x0c,0x02,0xf3) @ sha256h q0,q1,q12 - INST(0x68,0x2c,0x14,0xf3) @ sha256h2 q1,q2,q12 - INST(0xe6,0x0c,0x64,0xf3) @ sha256su1 q8,q10,q11 - vld1.32 {q12},[r3]! - vadd.i32 q13,q13,q9 - INST(0xe4,0x23,0xfa,0xf3) @ sha256su0 q9,q10 - vmov q2,q0 - INST(0x6a,0x0c,0x02,0xf3) @ sha256h q0,q1,q13 - INST(0x6a,0x2c,0x14,0xf3) @ sha256h2 q1,q2,q13 - INST(0xe0,0x2c,0x66,0xf3) @ sha256su1 q9,q11,q8 - vld1.32 {q13},[r3]! - vadd.i32 q12,q12,q10 - INST(0xe6,0x43,0xfa,0xf3) @ sha256su0 q10,q11 - vmov q2,q0 - INST(0x68,0x0c,0x02,0xf3) @ sha256h q0,q1,q12 - INST(0x68,0x2c,0x14,0xf3) @ sha256h2 q1,q2,q12 - INST(0xe2,0x4c,0x60,0xf3) @ sha256su1 q10,q8,q9 - vld1.32 {q12},[r3]! - vadd.i32 q13,q13,q11 - INST(0xe0,0x63,0xfa,0xf3) @ sha256su0 q11,q8 - vmov q2,q0 - INST(0x6a,0x0c,0x02,0xf3) @ sha256h q0,q1,q13 - INST(0x6a,0x2c,0x14,0xf3) @ sha256h2 q1,q2,q13 - INST(0xe4,0x6c,0x62,0xf3) @ sha256su1 q11,q9,q10 - vld1.32 {q13},[r3]! - vadd.i32 q12,q12,q8 - vmov q2,q0 - INST(0x68,0x0c,0x02,0xf3) @ sha256h q0,q1,q12 - INST(0x68,0x2c,0x14,0xf3) @ sha256h2 q1,q2,q12 - - vld1.32 {q12},[r3]! - vadd.i32 q13,q13,q9 - vmov q2,q0 - INST(0x6a,0x0c,0x02,0xf3) @ sha256h q0,q1,q13 - INST(0x6a,0x2c,0x14,0xf3) @ sha256h2 q1,q2,q13 - - vld1.32 {q13},[r3] - vadd.i32 q12,q12,q10 - sub r3,r3,#256-16 @ rewind - vmov q2,q0 - INST(0x68,0x0c,0x02,0xf3) @ sha256h q0,q1,q12 - INST(0x68,0x2c,0x14,0xf3) @ sha256h2 q1,q2,q12 - - vadd.i32 q13,q13,q11 - vmov q2,q0 - INST(0x6a,0x0c,0x02,0xf3) @ sha256h q0,q1,q13 - INST(0x6a,0x2c,0x14,0xf3) @ sha256h2 q1,q2,q13 - - vadd.i32 q0,q0,q14 - vadd.i32 q1,q1,q15 - it ne - bne .Loop_v8 - - vst1.32 {q0,q1},[r0] - - bx lr @ bx lr -.size sha256_block_data_order_armv8,.-sha256_block_data_order_armv8 -#endif -.byte 83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,65,82,77,118,52,47,78,69,79,78,47,65,82,77,118,56,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 2 -.align 2 -#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) -.comm OPENSSL_armcap_P,4,4 -.hidden OPENSSL_armcap_P -#endif -#endif \ No newline at end of file diff --git a/third_party/boringssl/linux-arm/crypto/sha/sha512-armv4.S b/third_party/boringssl/linux-arm/crypto/sha/sha512-armv4.S deleted file mode 100644 index c794f87fcff76..0000000000000 --- a/third_party/boringssl/linux-arm/crypto/sha/sha512-armv4.S +++ /dev/null @@ -1,1869 +0,0 @@ -#if defined(__arm__) - -@ ==================================================================== -@ Written by Andy Polyakov for the OpenSSL -@ project. The module is, however, dual licensed under OpenSSL and -@ CRYPTOGAMS licenses depending on where you obtain it. For further -@ details see http://www.openssl.org/~appro/cryptogams/. -@ -@ Permission to use under GPL terms is granted. -@ ==================================================================== - -@ SHA512 block procedure for ARMv4. September 2007. - -@ This code is ~4.5 (four and a half) times faster than code generated -@ by gcc 3.4 and it spends ~72 clock cycles per byte [on single-issue -@ Xscale PXA250 core]. -@ -@ July 2010. -@ -@ Rescheduling for dual-issue pipeline resulted in 6% improvement on -@ Cortex A8 core and ~40 cycles per processed byte. - -@ February 2011. -@ -@ Profiler-assisted and platform-specific optimization resulted in 7% -@ improvement on Coxtex A8 core and ~38 cycles per byte. - -@ March 2011. -@ -@ Add NEON implementation. On Cortex A8 it was measured to process -@ one byte in 23.3 cycles or ~60% faster than integer-only code. - -@ August 2012. -@ -@ Improve NEON performance by 12% on Snapdragon S4. In absolute -@ terms it's 22.6 cycles per byte, which is disappointing result. -@ Technical writers asserted that 3-way S4 pipeline can sustain -@ multiple NEON instructions per cycle, but dual NEON issue could -@ not be observed, see http://www.openssl.org/~appro/Snapdragon-S4.html -@ for further details. On side note Cortex-A15 processes one byte in -@ 16 cycles. - -@ Byte order [in]dependence. ========================================= -@ -@ Originally caller was expected to maintain specific *dword* order in -@ h[0-7], namely with most significant dword at *lower* address, which -@ was reflected in below two parameters as 0 and 4. Now caller is -@ expected to maintain native byte order for whole 64-bit values. -#ifndef __KERNEL__ -# include "arm_arch.h" -# define VFP_ABI_PUSH vstmdb sp!,{d8-d15} -# define VFP_ABI_POP vldmia sp!,{d8-d15} -#else -# define __ARM_ARCH__ __LINUX_ARM_ARCH__ -# define __ARM_MAX_ARCH__ 7 -# define VFP_ABI_PUSH -# define VFP_ABI_POP -#endif - -#ifdef __ARMEL__ -# define LO 0 -# define HI 4 -# define WORD64(hi0,lo0,hi1,lo1) .word lo0,hi0, lo1,hi1 -#else -# define HI 0 -# define LO 4 -# define WORD64(hi0,lo0,hi1,lo1) .word hi0,lo0, hi1,lo1 -#endif - -.text -#if __ARM_ARCH__<7 || defined(__APPLE__) -.code 32 -#else -.syntax unified -# ifdef __thumb2__ -# define adrl adr -.thumb -# else -.code 32 -# endif -#endif - -.type K512,%object -.align 5 -K512: - WORD64(0x428a2f98,0xd728ae22, 0x71374491,0x23ef65cd) - WORD64(0xb5c0fbcf,0xec4d3b2f, 0xe9b5dba5,0x8189dbbc) - WORD64(0x3956c25b,0xf348b538, 0x59f111f1,0xb605d019) - WORD64(0x923f82a4,0xaf194f9b, 0xab1c5ed5,0xda6d8118) - WORD64(0xd807aa98,0xa3030242, 0x12835b01,0x45706fbe) - WORD64(0x243185be,0x4ee4b28c, 0x550c7dc3,0xd5ffb4e2) - WORD64(0x72be5d74,0xf27b896f, 0x80deb1fe,0x3b1696b1) - WORD64(0x9bdc06a7,0x25c71235, 0xc19bf174,0xcf692694) - WORD64(0xe49b69c1,0x9ef14ad2, 0xefbe4786,0x384f25e3) - WORD64(0x0fc19dc6,0x8b8cd5b5, 0x240ca1cc,0x77ac9c65) - WORD64(0x2de92c6f,0x592b0275, 0x4a7484aa,0x6ea6e483) - WORD64(0x5cb0a9dc,0xbd41fbd4, 0x76f988da,0x831153b5) - WORD64(0x983e5152,0xee66dfab, 0xa831c66d,0x2db43210) - WORD64(0xb00327c8,0x98fb213f, 0xbf597fc7,0xbeef0ee4) - WORD64(0xc6e00bf3,0x3da88fc2, 0xd5a79147,0x930aa725) - WORD64(0x06ca6351,0xe003826f, 0x14292967,0x0a0e6e70) - WORD64(0x27b70a85,0x46d22ffc, 0x2e1b2138,0x5c26c926) - WORD64(0x4d2c6dfc,0x5ac42aed, 0x53380d13,0x9d95b3df) - WORD64(0x650a7354,0x8baf63de, 0x766a0abb,0x3c77b2a8) - WORD64(0x81c2c92e,0x47edaee6, 0x92722c85,0x1482353b) - WORD64(0xa2bfe8a1,0x4cf10364, 0xa81a664b,0xbc423001) - WORD64(0xc24b8b70,0xd0f89791, 0xc76c51a3,0x0654be30) - WORD64(0xd192e819,0xd6ef5218, 0xd6990624,0x5565a910) - WORD64(0xf40e3585,0x5771202a, 0x106aa070,0x32bbd1b8) - WORD64(0x19a4c116,0xb8d2d0c8, 0x1e376c08,0x5141ab53) - WORD64(0x2748774c,0xdf8eeb99, 0x34b0bcb5,0xe19b48a8) - WORD64(0x391c0cb3,0xc5c95a63, 0x4ed8aa4a,0xe3418acb) - WORD64(0x5b9cca4f,0x7763e373, 0x682e6ff3,0xd6b2b8a3) - WORD64(0x748f82ee,0x5defb2fc, 0x78a5636f,0x43172f60) - WORD64(0x84c87814,0xa1f0ab72, 0x8cc70208,0x1a6439ec) - WORD64(0x90befffa,0x23631e28, 0xa4506ceb,0xde82bde9) - WORD64(0xbef9a3f7,0xb2c67915, 0xc67178f2,0xe372532b) - WORD64(0xca273ece,0xea26619c, 0xd186b8c7,0x21c0c207) - WORD64(0xeada7dd6,0xcde0eb1e, 0xf57d4f7f,0xee6ed178) - WORD64(0x06f067aa,0x72176fba, 0x0a637dc5,0xa2c898a6) - WORD64(0x113f9804,0xbef90dae, 0x1b710b35,0x131c471b) - WORD64(0x28db77f5,0x23047d84, 0x32caab7b,0x40c72493) - WORD64(0x3c9ebe0a,0x15c9bebc, 0x431d67c4,0x9c100d4c) - WORD64(0x4cc5d4be,0xcb3e42b6, 0x597f299c,0xfc657e2a) - WORD64(0x5fcb6fab,0x3ad6faec, 0x6c44198c,0x4a475817) -.size K512,.-K512 -#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) -.LOPENSSL_armcap: -.word OPENSSL_armcap_P-.Lsha512_block_data_order -.skip 32-4 -#else -.skip 32 -#endif - -.globl sha512_block_data_order -.type sha512_block_data_order,%function -sha512_block_data_order: -.Lsha512_block_data_order: -#if __ARM_ARCH__<7 - sub r3,pc,#8 @ sha512_block_data_order -#else - adr r3,sha512_block_data_order -#endif -#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) - ldr r12,.LOPENSSL_armcap - ldr r12,[r3,r12] @ OPENSSL_armcap_P -#ifdef __APPLE__ - ldr r12,[r12] -#endif - tst r12,#1 - bne .LNEON -#endif - add r2,r1,r2,lsl#7 @ len to point at the end of inp - stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} - sub r14,r3,#672 @ K512 - sub sp,sp,#9*8 - - ldr r7,[r0,#32+LO] - ldr r8,[r0,#32+HI] - ldr r9, [r0,#48+LO] - ldr r10, [r0,#48+HI] - ldr r11, [r0,#56+LO] - ldr r12, [r0,#56+HI] -.Loop: - str r9, [sp,#48+0] - str r10, [sp,#48+4] - str r11, [sp,#56+0] - str r12, [sp,#56+4] - ldr r5,[r0,#0+LO] - ldr r6,[r0,#0+HI] - ldr r3,[r0,#8+LO] - ldr r4,[r0,#8+HI] - ldr r9, [r0,#16+LO] - ldr r10, [r0,#16+HI] - ldr r11, [r0,#24+LO] - ldr r12, [r0,#24+HI] - str r3,[sp,#8+0] - str r4,[sp,#8+4] - str r9, [sp,#16+0] - str r10, [sp,#16+4] - str r11, [sp,#24+0] - str r12, [sp,#24+4] - ldr r3,[r0,#40+LO] - ldr r4,[r0,#40+HI] - str r3,[sp,#40+0] - str r4,[sp,#40+4] - -.L00_15: -#if __ARM_ARCH__<7 - ldrb r3,[r1,#7] - ldrb r9, [r1,#6] - ldrb r10, [r1,#5] - ldrb r11, [r1,#4] - ldrb r4,[r1,#3] - ldrb r12, [r1,#2] - orr r3,r3,r9,lsl#8 - ldrb r9, [r1,#1] - orr r3,r3,r10,lsl#16 - ldrb r10, [r1],#8 - orr r3,r3,r11,lsl#24 - orr r4,r4,r12,lsl#8 - orr r4,r4,r9,lsl#16 - orr r4,r4,r10,lsl#24 -#else - ldr r3,[r1,#4] - ldr r4,[r1],#8 -#ifdef __ARMEL__ - rev r3,r3 - rev r4,r4 -#endif -#endif - @ Sigma1(x) (ROTR((x),14) ^ ROTR((x),18) ^ ROTR((x),41)) - @ LO lo>>14^hi<<18 ^ lo>>18^hi<<14 ^ hi>>9^lo<<23 - @ HI hi>>14^lo<<18 ^ hi>>18^lo<<14 ^ lo>>9^hi<<23 - mov r9,r7,lsr#14 - str r3,[sp,#64+0] - mov r10,r8,lsr#14 - str r4,[sp,#64+4] - eor r9,r9,r8,lsl#18 - ldr r11,[sp,#56+0] @ h.lo - eor r10,r10,r7,lsl#18 - ldr r12,[sp,#56+4] @ h.hi - eor r9,r9,r7,lsr#18 - eor r10,r10,r8,lsr#18 - eor r9,r9,r8,lsl#14 - eor r10,r10,r7,lsl#14 - eor r9,r9,r8,lsr#9 - eor r10,r10,r7,lsr#9 - eor r9,r9,r7,lsl#23 - eor r10,r10,r8,lsl#23 @ Sigma1(e) - adds r3,r3,r9 - ldr r9,[sp,#40+0] @ f.lo - adc r4,r4,r10 @ T += Sigma1(e) - ldr r10,[sp,#40+4] @ f.hi - adds r3,r3,r11 - ldr r11,[sp,#48+0] @ g.lo - adc r4,r4,r12 @ T += h - ldr r12,[sp,#48+4] @ g.hi - - eor r9,r9,r11 - str r7,[sp,#32+0] - eor r10,r10,r12 - str r8,[sp,#32+4] - and r9,r9,r7 - str r5,[sp,#0+0] - and r10,r10,r8 - str r6,[sp,#0+4] - eor r9,r9,r11 - ldr r11,[r14,#LO] @ K[i].lo - eor r10,r10,r12 @ Ch(e,f,g) - ldr r12,[r14,#HI] @ K[i].hi - - adds r3,r3,r9 - ldr r7,[sp,#24+0] @ d.lo - adc r4,r4,r10 @ T += Ch(e,f,g) - ldr r8,[sp,#24+4] @ d.hi - adds r3,r3,r11 - and r9,r11,#0xff - adc r4,r4,r12 @ T += K[i] - adds r7,r7,r3 - ldr r11,[sp,#8+0] @ b.lo - adc r8,r8,r4 @ d += T - teq r9,#148 - - ldr r12,[sp,#16+0] @ c.lo -#if __ARM_ARCH__>=7 - it eq @ Thumb2 thing, sanity check in ARM -#endif - orreq r14,r14,#1 - @ Sigma0(x) (ROTR((x),28) ^ ROTR((x),34) ^ ROTR((x),39)) - @ LO lo>>28^hi<<4 ^ hi>>2^lo<<30 ^ hi>>7^lo<<25 - @ HI hi>>28^lo<<4 ^ lo>>2^hi<<30 ^ lo>>7^hi<<25 - mov r9,r5,lsr#28 - mov r10,r6,lsr#28 - eor r9,r9,r6,lsl#4 - eor r10,r10,r5,lsl#4 - eor r9,r9,r6,lsr#2 - eor r10,r10,r5,lsr#2 - eor r9,r9,r5,lsl#30 - eor r10,r10,r6,lsl#30 - eor r9,r9,r6,lsr#7 - eor r10,r10,r5,lsr#7 - eor r9,r9,r5,lsl#25 - eor r10,r10,r6,lsl#25 @ Sigma0(a) - adds r3,r3,r9 - and r9,r5,r11 - adc r4,r4,r10 @ T += Sigma0(a) - - ldr r10,[sp,#8+4] @ b.hi - orr r5,r5,r11 - ldr r11,[sp,#16+4] @ c.hi - and r5,r5,r12 - and r12,r6,r10 - orr r6,r6,r10 - orr r5,r5,r9 @ Maj(a,b,c).lo - and r6,r6,r11 - adds r5,r5,r3 - orr r6,r6,r12 @ Maj(a,b,c).hi - sub sp,sp,#8 - adc r6,r6,r4 @ h += T - tst r14,#1 - add r14,r14,#8 - tst r14,#1 - beq .L00_15 - ldr r9,[sp,#184+0] - ldr r10,[sp,#184+4] - bic r14,r14,#1 -.L16_79: - @ sigma0(x) (ROTR((x),1) ^ ROTR((x),8) ^ ((x)>>7)) - @ LO lo>>1^hi<<31 ^ lo>>8^hi<<24 ^ lo>>7^hi<<25 - @ HI hi>>1^lo<<31 ^ hi>>8^lo<<24 ^ hi>>7 - mov r3,r9,lsr#1 - ldr r11,[sp,#80+0] - mov r4,r10,lsr#1 - ldr r12,[sp,#80+4] - eor r3,r3,r10,lsl#31 - eor r4,r4,r9,lsl#31 - eor r3,r3,r9,lsr#8 - eor r4,r4,r10,lsr#8 - eor r3,r3,r10,lsl#24 - eor r4,r4,r9,lsl#24 - eor r3,r3,r9,lsr#7 - eor r4,r4,r10,lsr#7 - eor r3,r3,r10,lsl#25 - - @ sigma1(x) (ROTR((x),19) ^ ROTR((x),61) ^ ((x)>>6)) - @ LO lo>>19^hi<<13 ^ hi>>29^lo<<3 ^ lo>>6^hi<<26 - @ HI hi>>19^lo<<13 ^ lo>>29^hi<<3 ^ hi>>6 - mov r9,r11,lsr#19 - mov r10,r12,lsr#19 - eor r9,r9,r12,lsl#13 - eor r10,r10,r11,lsl#13 - eor r9,r9,r12,lsr#29 - eor r10,r10,r11,lsr#29 - eor r9,r9,r11,lsl#3 - eor r10,r10,r12,lsl#3 - eor r9,r9,r11,lsr#6 - eor r10,r10,r12,lsr#6 - ldr r11,[sp,#120+0] - eor r9,r9,r12,lsl#26 - - ldr r12,[sp,#120+4] - adds r3,r3,r9 - ldr r9,[sp,#192+0] - adc r4,r4,r10 - - ldr r10,[sp,#192+4] - adds r3,r3,r11 - adc r4,r4,r12 - adds r3,r3,r9 - adc r4,r4,r10 - @ Sigma1(x) (ROTR((x),14) ^ ROTR((x),18) ^ ROTR((x),41)) - @ LO lo>>14^hi<<18 ^ lo>>18^hi<<14 ^ hi>>9^lo<<23 - @ HI hi>>14^lo<<18 ^ hi>>18^lo<<14 ^ lo>>9^hi<<23 - mov r9,r7,lsr#14 - str r3,[sp,#64+0] - mov r10,r8,lsr#14 - str r4,[sp,#64+4] - eor r9,r9,r8,lsl#18 - ldr r11,[sp,#56+0] @ h.lo - eor r10,r10,r7,lsl#18 - ldr r12,[sp,#56+4] @ h.hi - eor r9,r9,r7,lsr#18 - eor r10,r10,r8,lsr#18 - eor r9,r9,r8,lsl#14 - eor r10,r10,r7,lsl#14 - eor r9,r9,r8,lsr#9 - eor r10,r10,r7,lsr#9 - eor r9,r9,r7,lsl#23 - eor r10,r10,r8,lsl#23 @ Sigma1(e) - adds r3,r3,r9 - ldr r9,[sp,#40+0] @ f.lo - adc r4,r4,r10 @ T += Sigma1(e) - ldr r10,[sp,#40+4] @ f.hi - adds r3,r3,r11 - ldr r11,[sp,#48+0] @ g.lo - adc r4,r4,r12 @ T += h - ldr r12,[sp,#48+4] @ g.hi - - eor r9,r9,r11 - str r7,[sp,#32+0] - eor r10,r10,r12 - str r8,[sp,#32+4] - and r9,r9,r7 - str r5,[sp,#0+0] - and r10,r10,r8 - str r6,[sp,#0+4] - eor r9,r9,r11 - ldr r11,[r14,#LO] @ K[i].lo - eor r10,r10,r12 @ Ch(e,f,g) - ldr r12,[r14,#HI] @ K[i].hi - - adds r3,r3,r9 - ldr r7,[sp,#24+0] @ d.lo - adc r4,r4,r10 @ T += Ch(e,f,g) - ldr r8,[sp,#24+4] @ d.hi - adds r3,r3,r11 - and r9,r11,#0xff - adc r4,r4,r12 @ T += K[i] - adds r7,r7,r3 - ldr r11,[sp,#8+0] @ b.lo - adc r8,r8,r4 @ d += T - teq r9,#23 - - ldr r12,[sp,#16+0] @ c.lo -#if __ARM_ARCH__>=7 - it eq @ Thumb2 thing, sanity check in ARM -#endif - orreq r14,r14,#1 - @ Sigma0(x) (ROTR((x),28) ^ ROTR((x),34) ^ ROTR((x),39)) - @ LO lo>>28^hi<<4 ^ hi>>2^lo<<30 ^ hi>>7^lo<<25 - @ HI hi>>28^lo<<4 ^ lo>>2^hi<<30 ^ lo>>7^hi<<25 - mov r9,r5,lsr#28 - mov r10,r6,lsr#28 - eor r9,r9,r6,lsl#4 - eor r10,r10,r5,lsl#4 - eor r9,r9,r6,lsr#2 - eor r10,r10,r5,lsr#2 - eor r9,r9,r5,lsl#30 - eor r10,r10,r6,lsl#30 - eor r9,r9,r6,lsr#7 - eor r10,r10,r5,lsr#7 - eor r9,r9,r5,lsl#25 - eor r10,r10,r6,lsl#25 @ Sigma0(a) - adds r3,r3,r9 - and r9,r5,r11 - adc r4,r4,r10 @ T += Sigma0(a) - - ldr r10,[sp,#8+4] @ b.hi - orr r5,r5,r11 - ldr r11,[sp,#16+4] @ c.hi - and r5,r5,r12 - and r12,r6,r10 - orr r6,r6,r10 - orr r5,r5,r9 @ Maj(a,b,c).lo - and r6,r6,r11 - adds r5,r5,r3 - orr r6,r6,r12 @ Maj(a,b,c).hi - sub sp,sp,#8 - adc r6,r6,r4 @ h += T - tst r14,#1 - add r14,r14,#8 -#if __ARM_ARCH__>=7 - ittt eq @ Thumb2 thing, sanity check in ARM -#endif - ldreq r9,[sp,#184+0] - ldreq r10,[sp,#184+4] - beq .L16_79 - bic r14,r14,#1 - - ldr r3,[sp,#8+0] - ldr r4,[sp,#8+4] - ldr r9, [r0,#0+LO] - ldr r10, [r0,#0+HI] - ldr r11, [r0,#8+LO] - ldr r12, [r0,#8+HI] - adds r9,r5,r9 - str r9, [r0,#0+LO] - adc r10,r6,r10 - str r10, [r0,#0+HI] - adds r11,r3,r11 - str r11, [r0,#8+LO] - adc r12,r4,r12 - str r12, [r0,#8+HI] - - ldr r5,[sp,#16+0] - ldr r6,[sp,#16+4] - ldr r3,[sp,#24+0] - ldr r4,[sp,#24+4] - ldr r9, [r0,#16+LO] - ldr r10, [r0,#16+HI] - ldr r11, [r0,#24+LO] - ldr r12, [r0,#24+HI] - adds r9,r5,r9 - str r9, [r0,#16+LO] - adc r10,r6,r10 - str r10, [r0,#16+HI] - adds r11,r3,r11 - str r11, [r0,#24+LO] - adc r12,r4,r12 - str r12, [r0,#24+HI] - - ldr r3,[sp,#40+0] - ldr r4,[sp,#40+4] - ldr r9, [r0,#32+LO] - ldr r10, [r0,#32+HI] - ldr r11, [r0,#40+LO] - ldr r12, [r0,#40+HI] - adds r7,r7,r9 - str r7,[r0,#32+LO] - adc r8,r8,r10 - str r8,[r0,#32+HI] - adds r11,r3,r11 - str r11, [r0,#40+LO] - adc r12,r4,r12 - str r12, [r0,#40+HI] - - ldr r5,[sp,#48+0] - ldr r6,[sp,#48+4] - ldr r3,[sp,#56+0] - ldr r4,[sp,#56+4] - ldr r9, [r0,#48+LO] - ldr r10, [r0,#48+HI] - ldr r11, [r0,#56+LO] - ldr r12, [r0,#56+HI] - adds r9,r5,r9 - str r9, [r0,#48+LO] - adc r10,r6,r10 - str r10, [r0,#48+HI] - adds r11,r3,r11 - str r11, [r0,#56+LO] - adc r12,r4,r12 - str r12, [r0,#56+HI] - - add sp,sp,#640 - sub r14,r14,#640 - - teq r1,r2 - bne .Loop - - add sp,sp,#8*9 @ destroy frame -#if __ARM_ARCH__>=5 - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc} -#else - ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} - tst lr,#1 - moveq pc,lr @ be binary compatible with V4, yet -.word 0xe12fff1e @ interoperable with Thumb ISA:-) -#endif -.size sha512_block_data_order,.-sha512_block_data_order -#if __ARM_MAX_ARCH__>=7 -.arch armv7-a -.fpu neon - -.globl sha512_block_data_order_neon -.type sha512_block_data_order_neon,%function -.align 4 -sha512_block_data_order_neon: -.LNEON: - dmb @ errata #451034 on early Cortex A8 - add r2,r1,r2,lsl#7 @ len to point at the end of inp - adr r3,K512 - VFP_ABI_PUSH - vldmia r0,{d16,d17,d18,d19,d20,d21,d22,d23} @ load context -.Loop_neon: - vshr.u64 d24,d20,#14 @ 0 -#if 0<16 - vld1.64 {d0},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d20,#18 -#if 0>0 - vadd.i64 d16,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d20,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d20,#50 - vsli.64 d25,d20,#46 - vmov d29,d20 - vsli.64 d26,d20,#23 -#if 0<16 && defined(__ARMEL__) - vrev64.8 d0,d0 -#endif - veor d25,d24 - vbsl d29,d21,d22 @ Ch(e,f,g) - vshr.u64 d24,d16,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d23 - vshr.u64 d25,d16,#34 - vsli.64 d24,d16,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d16,#39 - vadd.i64 d28,d0 - vsli.64 d25,d16,#30 - veor d30,d16,d17 - vsli.64 d26,d16,#25 - veor d23,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d18,d17 @ Maj(a,b,c) - veor d23,d26 @ Sigma0(a) - vadd.i64 d19,d27 - vadd.i64 d30,d27 - @ vadd.i64 d23,d30 - vshr.u64 d24,d19,#14 @ 1 -#if 1<16 - vld1.64 {d1},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d19,#18 -#if 1>0 - vadd.i64 d23,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d19,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d19,#50 - vsli.64 d25,d19,#46 - vmov d29,d19 - vsli.64 d26,d19,#23 -#if 1<16 && defined(__ARMEL__) - vrev64.8 d1,d1 -#endif - veor d25,d24 - vbsl d29,d20,d21 @ Ch(e,f,g) - vshr.u64 d24,d23,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d22 - vshr.u64 d25,d23,#34 - vsli.64 d24,d23,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d23,#39 - vadd.i64 d28,d1 - vsli.64 d25,d23,#30 - veor d30,d23,d16 - vsli.64 d26,d23,#25 - veor d22,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d17,d16 @ Maj(a,b,c) - veor d22,d26 @ Sigma0(a) - vadd.i64 d18,d27 - vadd.i64 d30,d27 - @ vadd.i64 d22,d30 - vshr.u64 d24,d18,#14 @ 2 -#if 2<16 - vld1.64 {d2},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d18,#18 -#if 2>0 - vadd.i64 d22,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d18,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d18,#50 - vsli.64 d25,d18,#46 - vmov d29,d18 - vsli.64 d26,d18,#23 -#if 2<16 && defined(__ARMEL__) - vrev64.8 d2,d2 -#endif - veor d25,d24 - vbsl d29,d19,d20 @ Ch(e,f,g) - vshr.u64 d24,d22,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d21 - vshr.u64 d25,d22,#34 - vsli.64 d24,d22,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d22,#39 - vadd.i64 d28,d2 - vsli.64 d25,d22,#30 - veor d30,d22,d23 - vsli.64 d26,d22,#25 - veor d21,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d16,d23 @ Maj(a,b,c) - veor d21,d26 @ Sigma0(a) - vadd.i64 d17,d27 - vadd.i64 d30,d27 - @ vadd.i64 d21,d30 - vshr.u64 d24,d17,#14 @ 3 -#if 3<16 - vld1.64 {d3},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d17,#18 -#if 3>0 - vadd.i64 d21,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d17,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d17,#50 - vsli.64 d25,d17,#46 - vmov d29,d17 - vsli.64 d26,d17,#23 -#if 3<16 && defined(__ARMEL__) - vrev64.8 d3,d3 -#endif - veor d25,d24 - vbsl d29,d18,d19 @ Ch(e,f,g) - vshr.u64 d24,d21,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d20 - vshr.u64 d25,d21,#34 - vsli.64 d24,d21,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d21,#39 - vadd.i64 d28,d3 - vsli.64 d25,d21,#30 - veor d30,d21,d22 - vsli.64 d26,d21,#25 - veor d20,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d23,d22 @ Maj(a,b,c) - veor d20,d26 @ Sigma0(a) - vadd.i64 d16,d27 - vadd.i64 d30,d27 - @ vadd.i64 d20,d30 - vshr.u64 d24,d16,#14 @ 4 -#if 4<16 - vld1.64 {d4},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d16,#18 -#if 4>0 - vadd.i64 d20,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d16,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d16,#50 - vsli.64 d25,d16,#46 - vmov d29,d16 - vsli.64 d26,d16,#23 -#if 4<16 && defined(__ARMEL__) - vrev64.8 d4,d4 -#endif - veor d25,d24 - vbsl d29,d17,d18 @ Ch(e,f,g) - vshr.u64 d24,d20,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d19 - vshr.u64 d25,d20,#34 - vsli.64 d24,d20,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d20,#39 - vadd.i64 d28,d4 - vsli.64 d25,d20,#30 - veor d30,d20,d21 - vsli.64 d26,d20,#25 - veor d19,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d22,d21 @ Maj(a,b,c) - veor d19,d26 @ Sigma0(a) - vadd.i64 d23,d27 - vadd.i64 d30,d27 - @ vadd.i64 d19,d30 - vshr.u64 d24,d23,#14 @ 5 -#if 5<16 - vld1.64 {d5},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d23,#18 -#if 5>0 - vadd.i64 d19,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d23,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d23,#50 - vsli.64 d25,d23,#46 - vmov d29,d23 - vsli.64 d26,d23,#23 -#if 5<16 && defined(__ARMEL__) - vrev64.8 d5,d5 -#endif - veor d25,d24 - vbsl d29,d16,d17 @ Ch(e,f,g) - vshr.u64 d24,d19,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d18 - vshr.u64 d25,d19,#34 - vsli.64 d24,d19,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d19,#39 - vadd.i64 d28,d5 - vsli.64 d25,d19,#30 - veor d30,d19,d20 - vsli.64 d26,d19,#25 - veor d18,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d21,d20 @ Maj(a,b,c) - veor d18,d26 @ Sigma0(a) - vadd.i64 d22,d27 - vadd.i64 d30,d27 - @ vadd.i64 d18,d30 - vshr.u64 d24,d22,#14 @ 6 -#if 6<16 - vld1.64 {d6},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d22,#18 -#if 6>0 - vadd.i64 d18,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d22,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d22,#50 - vsli.64 d25,d22,#46 - vmov d29,d22 - vsli.64 d26,d22,#23 -#if 6<16 && defined(__ARMEL__) - vrev64.8 d6,d6 -#endif - veor d25,d24 - vbsl d29,d23,d16 @ Ch(e,f,g) - vshr.u64 d24,d18,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d17 - vshr.u64 d25,d18,#34 - vsli.64 d24,d18,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d18,#39 - vadd.i64 d28,d6 - vsli.64 d25,d18,#30 - veor d30,d18,d19 - vsli.64 d26,d18,#25 - veor d17,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d20,d19 @ Maj(a,b,c) - veor d17,d26 @ Sigma0(a) - vadd.i64 d21,d27 - vadd.i64 d30,d27 - @ vadd.i64 d17,d30 - vshr.u64 d24,d21,#14 @ 7 -#if 7<16 - vld1.64 {d7},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d21,#18 -#if 7>0 - vadd.i64 d17,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d21,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d21,#50 - vsli.64 d25,d21,#46 - vmov d29,d21 - vsli.64 d26,d21,#23 -#if 7<16 && defined(__ARMEL__) - vrev64.8 d7,d7 -#endif - veor d25,d24 - vbsl d29,d22,d23 @ Ch(e,f,g) - vshr.u64 d24,d17,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d16 - vshr.u64 d25,d17,#34 - vsli.64 d24,d17,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d17,#39 - vadd.i64 d28,d7 - vsli.64 d25,d17,#30 - veor d30,d17,d18 - vsli.64 d26,d17,#25 - veor d16,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d19,d18 @ Maj(a,b,c) - veor d16,d26 @ Sigma0(a) - vadd.i64 d20,d27 - vadd.i64 d30,d27 - @ vadd.i64 d16,d30 - vshr.u64 d24,d20,#14 @ 8 -#if 8<16 - vld1.64 {d8},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d20,#18 -#if 8>0 - vadd.i64 d16,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d20,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d20,#50 - vsli.64 d25,d20,#46 - vmov d29,d20 - vsli.64 d26,d20,#23 -#if 8<16 && defined(__ARMEL__) - vrev64.8 d8,d8 -#endif - veor d25,d24 - vbsl d29,d21,d22 @ Ch(e,f,g) - vshr.u64 d24,d16,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d23 - vshr.u64 d25,d16,#34 - vsli.64 d24,d16,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d16,#39 - vadd.i64 d28,d8 - vsli.64 d25,d16,#30 - veor d30,d16,d17 - vsli.64 d26,d16,#25 - veor d23,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d18,d17 @ Maj(a,b,c) - veor d23,d26 @ Sigma0(a) - vadd.i64 d19,d27 - vadd.i64 d30,d27 - @ vadd.i64 d23,d30 - vshr.u64 d24,d19,#14 @ 9 -#if 9<16 - vld1.64 {d9},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d19,#18 -#if 9>0 - vadd.i64 d23,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d19,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d19,#50 - vsli.64 d25,d19,#46 - vmov d29,d19 - vsli.64 d26,d19,#23 -#if 9<16 && defined(__ARMEL__) - vrev64.8 d9,d9 -#endif - veor d25,d24 - vbsl d29,d20,d21 @ Ch(e,f,g) - vshr.u64 d24,d23,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d22 - vshr.u64 d25,d23,#34 - vsli.64 d24,d23,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d23,#39 - vadd.i64 d28,d9 - vsli.64 d25,d23,#30 - veor d30,d23,d16 - vsli.64 d26,d23,#25 - veor d22,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d17,d16 @ Maj(a,b,c) - veor d22,d26 @ Sigma0(a) - vadd.i64 d18,d27 - vadd.i64 d30,d27 - @ vadd.i64 d22,d30 - vshr.u64 d24,d18,#14 @ 10 -#if 10<16 - vld1.64 {d10},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d18,#18 -#if 10>0 - vadd.i64 d22,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d18,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d18,#50 - vsli.64 d25,d18,#46 - vmov d29,d18 - vsli.64 d26,d18,#23 -#if 10<16 && defined(__ARMEL__) - vrev64.8 d10,d10 -#endif - veor d25,d24 - vbsl d29,d19,d20 @ Ch(e,f,g) - vshr.u64 d24,d22,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d21 - vshr.u64 d25,d22,#34 - vsli.64 d24,d22,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d22,#39 - vadd.i64 d28,d10 - vsli.64 d25,d22,#30 - veor d30,d22,d23 - vsli.64 d26,d22,#25 - veor d21,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d16,d23 @ Maj(a,b,c) - veor d21,d26 @ Sigma0(a) - vadd.i64 d17,d27 - vadd.i64 d30,d27 - @ vadd.i64 d21,d30 - vshr.u64 d24,d17,#14 @ 11 -#if 11<16 - vld1.64 {d11},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d17,#18 -#if 11>0 - vadd.i64 d21,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d17,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d17,#50 - vsli.64 d25,d17,#46 - vmov d29,d17 - vsli.64 d26,d17,#23 -#if 11<16 && defined(__ARMEL__) - vrev64.8 d11,d11 -#endif - veor d25,d24 - vbsl d29,d18,d19 @ Ch(e,f,g) - vshr.u64 d24,d21,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d20 - vshr.u64 d25,d21,#34 - vsli.64 d24,d21,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d21,#39 - vadd.i64 d28,d11 - vsli.64 d25,d21,#30 - veor d30,d21,d22 - vsli.64 d26,d21,#25 - veor d20,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d23,d22 @ Maj(a,b,c) - veor d20,d26 @ Sigma0(a) - vadd.i64 d16,d27 - vadd.i64 d30,d27 - @ vadd.i64 d20,d30 - vshr.u64 d24,d16,#14 @ 12 -#if 12<16 - vld1.64 {d12},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d16,#18 -#if 12>0 - vadd.i64 d20,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d16,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d16,#50 - vsli.64 d25,d16,#46 - vmov d29,d16 - vsli.64 d26,d16,#23 -#if 12<16 && defined(__ARMEL__) - vrev64.8 d12,d12 -#endif - veor d25,d24 - vbsl d29,d17,d18 @ Ch(e,f,g) - vshr.u64 d24,d20,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d19 - vshr.u64 d25,d20,#34 - vsli.64 d24,d20,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d20,#39 - vadd.i64 d28,d12 - vsli.64 d25,d20,#30 - veor d30,d20,d21 - vsli.64 d26,d20,#25 - veor d19,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d22,d21 @ Maj(a,b,c) - veor d19,d26 @ Sigma0(a) - vadd.i64 d23,d27 - vadd.i64 d30,d27 - @ vadd.i64 d19,d30 - vshr.u64 d24,d23,#14 @ 13 -#if 13<16 - vld1.64 {d13},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d23,#18 -#if 13>0 - vadd.i64 d19,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d23,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d23,#50 - vsli.64 d25,d23,#46 - vmov d29,d23 - vsli.64 d26,d23,#23 -#if 13<16 && defined(__ARMEL__) - vrev64.8 d13,d13 -#endif - veor d25,d24 - vbsl d29,d16,d17 @ Ch(e,f,g) - vshr.u64 d24,d19,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d18 - vshr.u64 d25,d19,#34 - vsli.64 d24,d19,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d19,#39 - vadd.i64 d28,d13 - vsli.64 d25,d19,#30 - veor d30,d19,d20 - vsli.64 d26,d19,#25 - veor d18,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d21,d20 @ Maj(a,b,c) - veor d18,d26 @ Sigma0(a) - vadd.i64 d22,d27 - vadd.i64 d30,d27 - @ vadd.i64 d18,d30 - vshr.u64 d24,d22,#14 @ 14 -#if 14<16 - vld1.64 {d14},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d22,#18 -#if 14>0 - vadd.i64 d18,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d22,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d22,#50 - vsli.64 d25,d22,#46 - vmov d29,d22 - vsli.64 d26,d22,#23 -#if 14<16 && defined(__ARMEL__) - vrev64.8 d14,d14 -#endif - veor d25,d24 - vbsl d29,d23,d16 @ Ch(e,f,g) - vshr.u64 d24,d18,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d17 - vshr.u64 d25,d18,#34 - vsli.64 d24,d18,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d18,#39 - vadd.i64 d28,d14 - vsli.64 d25,d18,#30 - veor d30,d18,d19 - vsli.64 d26,d18,#25 - veor d17,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d20,d19 @ Maj(a,b,c) - veor d17,d26 @ Sigma0(a) - vadd.i64 d21,d27 - vadd.i64 d30,d27 - @ vadd.i64 d17,d30 - vshr.u64 d24,d21,#14 @ 15 -#if 15<16 - vld1.64 {d15},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d21,#18 -#if 15>0 - vadd.i64 d17,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d21,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d21,#50 - vsli.64 d25,d21,#46 - vmov d29,d21 - vsli.64 d26,d21,#23 -#if 15<16 && defined(__ARMEL__) - vrev64.8 d15,d15 -#endif - veor d25,d24 - vbsl d29,d22,d23 @ Ch(e,f,g) - vshr.u64 d24,d17,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d16 - vshr.u64 d25,d17,#34 - vsli.64 d24,d17,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d17,#39 - vadd.i64 d28,d15 - vsli.64 d25,d17,#30 - veor d30,d17,d18 - vsli.64 d26,d17,#25 - veor d16,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d19,d18 @ Maj(a,b,c) - veor d16,d26 @ Sigma0(a) - vadd.i64 d20,d27 - vadd.i64 d30,d27 - @ vadd.i64 d16,d30 - mov r12,#4 -.L16_79_neon: - subs r12,#1 - vshr.u64 q12,q7,#19 - vshr.u64 q13,q7,#61 - vadd.i64 d16,d30 @ h+=Maj from the past - vshr.u64 q15,q7,#6 - vsli.64 q12,q7,#45 - vext.8 q14,q0,q1,#8 @ X[i+1] - vsli.64 q13,q7,#3 - veor q15,q12 - vshr.u64 q12,q14,#1 - veor q15,q13 @ sigma1(X[i+14]) - vshr.u64 q13,q14,#8 - vadd.i64 q0,q15 - vshr.u64 q15,q14,#7 - vsli.64 q12,q14,#63 - vsli.64 q13,q14,#56 - vext.8 q14,q4,q5,#8 @ X[i+9] - veor q15,q12 - vshr.u64 d24,d20,#14 @ from NEON_00_15 - vadd.i64 q0,q14 - vshr.u64 d25,d20,#18 @ from NEON_00_15 - veor q15,q13 @ sigma0(X[i+1]) - vshr.u64 d26,d20,#41 @ from NEON_00_15 - vadd.i64 q0,q15 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d20,#50 - vsli.64 d25,d20,#46 - vmov d29,d20 - vsli.64 d26,d20,#23 -#if 16<16 && defined(__ARMEL__) - vrev64.8 , -#endif - veor d25,d24 - vbsl d29,d21,d22 @ Ch(e,f,g) - vshr.u64 d24,d16,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d23 - vshr.u64 d25,d16,#34 - vsli.64 d24,d16,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d16,#39 - vadd.i64 d28,d0 - vsli.64 d25,d16,#30 - veor d30,d16,d17 - vsli.64 d26,d16,#25 - veor d23,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d18,d17 @ Maj(a,b,c) - veor d23,d26 @ Sigma0(a) - vadd.i64 d19,d27 - vadd.i64 d30,d27 - @ vadd.i64 d23,d30 - vshr.u64 d24,d19,#14 @ 17 -#if 17<16 - vld1.64 {d1},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d19,#18 -#if 17>0 - vadd.i64 d23,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d19,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d19,#50 - vsli.64 d25,d19,#46 - vmov d29,d19 - vsli.64 d26,d19,#23 -#if 17<16 && defined(__ARMEL__) - vrev64.8 , -#endif - veor d25,d24 - vbsl d29,d20,d21 @ Ch(e,f,g) - vshr.u64 d24,d23,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d22 - vshr.u64 d25,d23,#34 - vsli.64 d24,d23,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d23,#39 - vadd.i64 d28,d1 - vsli.64 d25,d23,#30 - veor d30,d23,d16 - vsli.64 d26,d23,#25 - veor d22,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d17,d16 @ Maj(a,b,c) - veor d22,d26 @ Sigma0(a) - vadd.i64 d18,d27 - vadd.i64 d30,d27 - @ vadd.i64 d22,d30 - vshr.u64 q12,q0,#19 - vshr.u64 q13,q0,#61 - vadd.i64 d22,d30 @ h+=Maj from the past - vshr.u64 q15,q0,#6 - vsli.64 q12,q0,#45 - vext.8 q14,q1,q2,#8 @ X[i+1] - vsli.64 q13,q0,#3 - veor q15,q12 - vshr.u64 q12,q14,#1 - veor q15,q13 @ sigma1(X[i+14]) - vshr.u64 q13,q14,#8 - vadd.i64 q1,q15 - vshr.u64 q15,q14,#7 - vsli.64 q12,q14,#63 - vsli.64 q13,q14,#56 - vext.8 q14,q5,q6,#8 @ X[i+9] - veor q15,q12 - vshr.u64 d24,d18,#14 @ from NEON_00_15 - vadd.i64 q1,q14 - vshr.u64 d25,d18,#18 @ from NEON_00_15 - veor q15,q13 @ sigma0(X[i+1]) - vshr.u64 d26,d18,#41 @ from NEON_00_15 - vadd.i64 q1,q15 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d18,#50 - vsli.64 d25,d18,#46 - vmov d29,d18 - vsli.64 d26,d18,#23 -#if 18<16 && defined(__ARMEL__) - vrev64.8 , -#endif - veor d25,d24 - vbsl d29,d19,d20 @ Ch(e,f,g) - vshr.u64 d24,d22,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d21 - vshr.u64 d25,d22,#34 - vsli.64 d24,d22,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d22,#39 - vadd.i64 d28,d2 - vsli.64 d25,d22,#30 - veor d30,d22,d23 - vsli.64 d26,d22,#25 - veor d21,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d16,d23 @ Maj(a,b,c) - veor d21,d26 @ Sigma0(a) - vadd.i64 d17,d27 - vadd.i64 d30,d27 - @ vadd.i64 d21,d30 - vshr.u64 d24,d17,#14 @ 19 -#if 19<16 - vld1.64 {d3},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d17,#18 -#if 19>0 - vadd.i64 d21,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d17,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d17,#50 - vsli.64 d25,d17,#46 - vmov d29,d17 - vsli.64 d26,d17,#23 -#if 19<16 && defined(__ARMEL__) - vrev64.8 , -#endif - veor d25,d24 - vbsl d29,d18,d19 @ Ch(e,f,g) - vshr.u64 d24,d21,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d20 - vshr.u64 d25,d21,#34 - vsli.64 d24,d21,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d21,#39 - vadd.i64 d28,d3 - vsli.64 d25,d21,#30 - veor d30,d21,d22 - vsli.64 d26,d21,#25 - veor d20,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d23,d22 @ Maj(a,b,c) - veor d20,d26 @ Sigma0(a) - vadd.i64 d16,d27 - vadd.i64 d30,d27 - @ vadd.i64 d20,d30 - vshr.u64 q12,q1,#19 - vshr.u64 q13,q1,#61 - vadd.i64 d20,d30 @ h+=Maj from the past - vshr.u64 q15,q1,#6 - vsli.64 q12,q1,#45 - vext.8 q14,q2,q3,#8 @ X[i+1] - vsli.64 q13,q1,#3 - veor q15,q12 - vshr.u64 q12,q14,#1 - veor q15,q13 @ sigma1(X[i+14]) - vshr.u64 q13,q14,#8 - vadd.i64 q2,q15 - vshr.u64 q15,q14,#7 - vsli.64 q12,q14,#63 - vsli.64 q13,q14,#56 - vext.8 q14,q6,q7,#8 @ X[i+9] - veor q15,q12 - vshr.u64 d24,d16,#14 @ from NEON_00_15 - vadd.i64 q2,q14 - vshr.u64 d25,d16,#18 @ from NEON_00_15 - veor q15,q13 @ sigma0(X[i+1]) - vshr.u64 d26,d16,#41 @ from NEON_00_15 - vadd.i64 q2,q15 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d16,#50 - vsli.64 d25,d16,#46 - vmov d29,d16 - vsli.64 d26,d16,#23 -#if 20<16 && defined(__ARMEL__) - vrev64.8 , -#endif - veor d25,d24 - vbsl d29,d17,d18 @ Ch(e,f,g) - vshr.u64 d24,d20,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d19 - vshr.u64 d25,d20,#34 - vsli.64 d24,d20,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d20,#39 - vadd.i64 d28,d4 - vsli.64 d25,d20,#30 - veor d30,d20,d21 - vsli.64 d26,d20,#25 - veor d19,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d22,d21 @ Maj(a,b,c) - veor d19,d26 @ Sigma0(a) - vadd.i64 d23,d27 - vadd.i64 d30,d27 - @ vadd.i64 d19,d30 - vshr.u64 d24,d23,#14 @ 21 -#if 21<16 - vld1.64 {d5},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d23,#18 -#if 21>0 - vadd.i64 d19,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d23,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d23,#50 - vsli.64 d25,d23,#46 - vmov d29,d23 - vsli.64 d26,d23,#23 -#if 21<16 && defined(__ARMEL__) - vrev64.8 , -#endif - veor d25,d24 - vbsl d29,d16,d17 @ Ch(e,f,g) - vshr.u64 d24,d19,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d18 - vshr.u64 d25,d19,#34 - vsli.64 d24,d19,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d19,#39 - vadd.i64 d28,d5 - vsli.64 d25,d19,#30 - veor d30,d19,d20 - vsli.64 d26,d19,#25 - veor d18,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d21,d20 @ Maj(a,b,c) - veor d18,d26 @ Sigma0(a) - vadd.i64 d22,d27 - vadd.i64 d30,d27 - @ vadd.i64 d18,d30 - vshr.u64 q12,q2,#19 - vshr.u64 q13,q2,#61 - vadd.i64 d18,d30 @ h+=Maj from the past - vshr.u64 q15,q2,#6 - vsli.64 q12,q2,#45 - vext.8 q14,q3,q4,#8 @ X[i+1] - vsli.64 q13,q2,#3 - veor q15,q12 - vshr.u64 q12,q14,#1 - veor q15,q13 @ sigma1(X[i+14]) - vshr.u64 q13,q14,#8 - vadd.i64 q3,q15 - vshr.u64 q15,q14,#7 - vsli.64 q12,q14,#63 - vsli.64 q13,q14,#56 - vext.8 q14,q7,q0,#8 @ X[i+9] - veor q15,q12 - vshr.u64 d24,d22,#14 @ from NEON_00_15 - vadd.i64 q3,q14 - vshr.u64 d25,d22,#18 @ from NEON_00_15 - veor q15,q13 @ sigma0(X[i+1]) - vshr.u64 d26,d22,#41 @ from NEON_00_15 - vadd.i64 q3,q15 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d22,#50 - vsli.64 d25,d22,#46 - vmov d29,d22 - vsli.64 d26,d22,#23 -#if 22<16 && defined(__ARMEL__) - vrev64.8 , -#endif - veor d25,d24 - vbsl d29,d23,d16 @ Ch(e,f,g) - vshr.u64 d24,d18,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d17 - vshr.u64 d25,d18,#34 - vsli.64 d24,d18,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d18,#39 - vadd.i64 d28,d6 - vsli.64 d25,d18,#30 - veor d30,d18,d19 - vsli.64 d26,d18,#25 - veor d17,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d20,d19 @ Maj(a,b,c) - veor d17,d26 @ Sigma0(a) - vadd.i64 d21,d27 - vadd.i64 d30,d27 - @ vadd.i64 d17,d30 - vshr.u64 d24,d21,#14 @ 23 -#if 23<16 - vld1.64 {d7},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d21,#18 -#if 23>0 - vadd.i64 d17,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d21,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d21,#50 - vsli.64 d25,d21,#46 - vmov d29,d21 - vsli.64 d26,d21,#23 -#if 23<16 && defined(__ARMEL__) - vrev64.8 , -#endif - veor d25,d24 - vbsl d29,d22,d23 @ Ch(e,f,g) - vshr.u64 d24,d17,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d16 - vshr.u64 d25,d17,#34 - vsli.64 d24,d17,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d17,#39 - vadd.i64 d28,d7 - vsli.64 d25,d17,#30 - veor d30,d17,d18 - vsli.64 d26,d17,#25 - veor d16,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d19,d18 @ Maj(a,b,c) - veor d16,d26 @ Sigma0(a) - vadd.i64 d20,d27 - vadd.i64 d30,d27 - @ vadd.i64 d16,d30 - vshr.u64 q12,q3,#19 - vshr.u64 q13,q3,#61 - vadd.i64 d16,d30 @ h+=Maj from the past - vshr.u64 q15,q3,#6 - vsli.64 q12,q3,#45 - vext.8 q14,q4,q5,#8 @ X[i+1] - vsli.64 q13,q3,#3 - veor q15,q12 - vshr.u64 q12,q14,#1 - veor q15,q13 @ sigma1(X[i+14]) - vshr.u64 q13,q14,#8 - vadd.i64 q4,q15 - vshr.u64 q15,q14,#7 - vsli.64 q12,q14,#63 - vsli.64 q13,q14,#56 - vext.8 q14,q0,q1,#8 @ X[i+9] - veor q15,q12 - vshr.u64 d24,d20,#14 @ from NEON_00_15 - vadd.i64 q4,q14 - vshr.u64 d25,d20,#18 @ from NEON_00_15 - veor q15,q13 @ sigma0(X[i+1]) - vshr.u64 d26,d20,#41 @ from NEON_00_15 - vadd.i64 q4,q15 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d20,#50 - vsli.64 d25,d20,#46 - vmov d29,d20 - vsli.64 d26,d20,#23 -#if 24<16 && defined(__ARMEL__) - vrev64.8 , -#endif - veor d25,d24 - vbsl d29,d21,d22 @ Ch(e,f,g) - vshr.u64 d24,d16,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d23 - vshr.u64 d25,d16,#34 - vsli.64 d24,d16,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d16,#39 - vadd.i64 d28,d8 - vsli.64 d25,d16,#30 - veor d30,d16,d17 - vsli.64 d26,d16,#25 - veor d23,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d18,d17 @ Maj(a,b,c) - veor d23,d26 @ Sigma0(a) - vadd.i64 d19,d27 - vadd.i64 d30,d27 - @ vadd.i64 d23,d30 - vshr.u64 d24,d19,#14 @ 25 -#if 25<16 - vld1.64 {d9},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d19,#18 -#if 25>0 - vadd.i64 d23,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d19,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d19,#50 - vsli.64 d25,d19,#46 - vmov d29,d19 - vsli.64 d26,d19,#23 -#if 25<16 && defined(__ARMEL__) - vrev64.8 , -#endif - veor d25,d24 - vbsl d29,d20,d21 @ Ch(e,f,g) - vshr.u64 d24,d23,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d22 - vshr.u64 d25,d23,#34 - vsli.64 d24,d23,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d23,#39 - vadd.i64 d28,d9 - vsli.64 d25,d23,#30 - veor d30,d23,d16 - vsli.64 d26,d23,#25 - veor d22,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d17,d16 @ Maj(a,b,c) - veor d22,d26 @ Sigma0(a) - vadd.i64 d18,d27 - vadd.i64 d30,d27 - @ vadd.i64 d22,d30 - vshr.u64 q12,q4,#19 - vshr.u64 q13,q4,#61 - vadd.i64 d22,d30 @ h+=Maj from the past - vshr.u64 q15,q4,#6 - vsli.64 q12,q4,#45 - vext.8 q14,q5,q6,#8 @ X[i+1] - vsli.64 q13,q4,#3 - veor q15,q12 - vshr.u64 q12,q14,#1 - veor q15,q13 @ sigma1(X[i+14]) - vshr.u64 q13,q14,#8 - vadd.i64 q5,q15 - vshr.u64 q15,q14,#7 - vsli.64 q12,q14,#63 - vsli.64 q13,q14,#56 - vext.8 q14,q1,q2,#8 @ X[i+9] - veor q15,q12 - vshr.u64 d24,d18,#14 @ from NEON_00_15 - vadd.i64 q5,q14 - vshr.u64 d25,d18,#18 @ from NEON_00_15 - veor q15,q13 @ sigma0(X[i+1]) - vshr.u64 d26,d18,#41 @ from NEON_00_15 - vadd.i64 q5,q15 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d18,#50 - vsli.64 d25,d18,#46 - vmov d29,d18 - vsli.64 d26,d18,#23 -#if 26<16 && defined(__ARMEL__) - vrev64.8 , -#endif - veor d25,d24 - vbsl d29,d19,d20 @ Ch(e,f,g) - vshr.u64 d24,d22,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d21 - vshr.u64 d25,d22,#34 - vsli.64 d24,d22,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d22,#39 - vadd.i64 d28,d10 - vsli.64 d25,d22,#30 - veor d30,d22,d23 - vsli.64 d26,d22,#25 - veor d21,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d16,d23 @ Maj(a,b,c) - veor d21,d26 @ Sigma0(a) - vadd.i64 d17,d27 - vadd.i64 d30,d27 - @ vadd.i64 d21,d30 - vshr.u64 d24,d17,#14 @ 27 -#if 27<16 - vld1.64 {d11},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d17,#18 -#if 27>0 - vadd.i64 d21,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d17,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d17,#50 - vsli.64 d25,d17,#46 - vmov d29,d17 - vsli.64 d26,d17,#23 -#if 27<16 && defined(__ARMEL__) - vrev64.8 , -#endif - veor d25,d24 - vbsl d29,d18,d19 @ Ch(e,f,g) - vshr.u64 d24,d21,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d20 - vshr.u64 d25,d21,#34 - vsli.64 d24,d21,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d21,#39 - vadd.i64 d28,d11 - vsli.64 d25,d21,#30 - veor d30,d21,d22 - vsli.64 d26,d21,#25 - veor d20,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d23,d22 @ Maj(a,b,c) - veor d20,d26 @ Sigma0(a) - vadd.i64 d16,d27 - vadd.i64 d30,d27 - @ vadd.i64 d20,d30 - vshr.u64 q12,q5,#19 - vshr.u64 q13,q5,#61 - vadd.i64 d20,d30 @ h+=Maj from the past - vshr.u64 q15,q5,#6 - vsli.64 q12,q5,#45 - vext.8 q14,q6,q7,#8 @ X[i+1] - vsli.64 q13,q5,#3 - veor q15,q12 - vshr.u64 q12,q14,#1 - veor q15,q13 @ sigma1(X[i+14]) - vshr.u64 q13,q14,#8 - vadd.i64 q6,q15 - vshr.u64 q15,q14,#7 - vsli.64 q12,q14,#63 - vsli.64 q13,q14,#56 - vext.8 q14,q2,q3,#8 @ X[i+9] - veor q15,q12 - vshr.u64 d24,d16,#14 @ from NEON_00_15 - vadd.i64 q6,q14 - vshr.u64 d25,d16,#18 @ from NEON_00_15 - veor q15,q13 @ sigma0(X[i+1]) - vshr.u64 d26,d16,#41 @ from NEON_00_15 - vadd.i64 q6,q15 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d16,#50 - vsli.64 d25,d16,#46 - vmov d29,d16 - vsli.64 d26,d16,#23 -#if 28<16 && defined(__ARMEL__) - vrev64.8 , -#endif - veor d25,d24 - vbsl d29,d17,d18 @ Ch(e,f,g) - vshr.u64 d24,d20,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d19 - vshr.u64 d25,d20,#34 - vsli.64 d24,d20,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d20,#39 - vadd.i64 d28,d12 - vsli.64 d25,d20,#30 - veor d30,d20,d21 - vsli.64 d26,d20,#25 - veor d19,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d22,d21 @ Maj(a,b,c) - veor d19,d26 @ Sigma0(a) - vadd.i64 d23,d27 - vadd.i64 d30,d27 - @ vadd.i64 d19,d30 - vshr.u64 d24,d23,#14 @ 29 -#if 29<16 - vld1.64 {d13},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d23,#18 -#if 29>0 - vadd.i64 d19,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d23,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d23,#50 - vsli.64 d25,d23,#46 - vmov d29,d23 - vsli.64 d26,d23,#23 -#if 29<16 && defined(__ARMEL__) - vrev64.8 , -#endif - veor d25,d24 - vbsl d29,d16,d17 @ Ch(e,f,g) - vshr.u64 d24,d19,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d18 - vshr.u64 d25,d19,#34 - vsli.64 d24,d19,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d19,#39 - vadd.i64 d28,d13 - vsli.64 d25,d19,#30 - veor d30,d19,d20 - vsli.64 d26,d19,#25 - veor d18,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d21,d20 @ Maj(a,b,c) - veor d18,d26 @ Sigma0(a) - vadd.i64 d22,d27 - vadd.i64 d30,d27 - @ vadd.i64 d18,d30 - vshr.u64 q12,q6,#19 - vshr.u64 q13,q6,#61 - vadd.i64 d18,d30 @ h+=Maj from the past - vshr.u64 q15,q6,#6 - vsli.64 q12,q6,#45 - vext.8 q14,q7,q0,#8 @ X[i+1] - vsli.64 q13,q6,#3 - veor q15,q12 - vshr.u64 q12,q14,#1 - veor q15,q13 @ sigma1(X[i+14]) - vshr.u64 q13,q14,#8 - vadd.i64 q7,q15 - vshr.u64 q15,q14,#7 - vsli.64 q12,q14,#63 - vsli.64 q13,q14,#56 - vext.8 q14,q3,q4,#8 @ X[i+9] - veor q15,q12 - vshr.u64 d24,d22,#14 @ from NEON_00_15 - vadd.i64 q7,q14 - vshr.u64 d25,d22,#18 @ from NEON_00_15 - veor q15,q13 @ sigma0(X[i+1]) - vshr.u64 d26,d22,#41 @ from NEON_00_15 - vadd.i64 q7,q15 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d22,#50 - vsli.64 d25,d22,#46 - vmov d29,d22 - vsli.64 d26,d22,#23 -#if 30<16 && defined(__ARMEL__) - vrev64.8 , -#endif - veor d25,d24 - vbsl d29,d23,d16 @ Ch(e,f,g) - vshr.u64 d24,d18,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d17 - vshr.u64 d25,d18,#34 - vsli.64 d24,d18,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d18,#39 - vadd.i64 d28,d14 - vsli.64 d25,d18,#30 - veor d30,d18,d19 - vsli.64 d26,d18,#25 - veor d17,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d20,d19 @ Maj(a,b,c) - veor d17,d26 @ Sigma0(a) - vadd.i64 d21,d27 - vadd.i64 d30,d27 - @ vadd.i64 d17,d30 - vshr.u64 d24,d21,#14 @ 31 -#if 31<16 - vld1.64 {d15},[r1]! @ handles unaligned -#endif - vshr.u64 d25,d21,#18 -#if 31>0 - vadd.i64 d17,d30 @ h+=Maj from the past -#endif - vshr.u64 d26,d21,#41 - vld1.64 {d28},[r3,:64]! @ K[i++] - vsli.64 d24,d21,#50 - vsli.64 d25,d21,#46 - vmov d29,d21 - vsli.64 d26,d21,#23 -#if 31<16 && defined(__ARMEL__) - vrev64.8 , -#endif - veor d25,d24 - vbsl d29,d22,d23 @ Ch(e,f,g) - vshr.u64 d24,d17,#28 - veor d26,d25 @ Sigma1(e) - vadd.i64 d27,d29,d16 - vshr.u64 d25,d17,#34 - vsli.64 d24,d17,#36 - vadd.i64 d27,d26 - vshr.u64 d26,d17,#39 - vadd.i64 d28,d15 - vsli.64 d25,d17,#30 - veor d30,d17,d18 - vsli.64 d26,d17,#25 - veor d16,d24,d25 - vadd.i64 d27,d28 - vbsl d30,d19,d18 @ Maj(a,b,c) - veor d16,d26 @ Sigma0(a) - vadd.i64 d20,d27 - vadd.i64 d30,d27 - @ vadd.i64 d16,d30 - bne .L16_79_neon - - vadd.i64 d16,d30 @ h+=Maj from the past - vldmia r0,{d24,d25,d26,d27,d28,d29,d30,d31} @ load context to temp - vadd.i64 q8,q12 @ vectorized accumulate - vadd.i64 q9,q13 - vadd.i64 q10,q14 - vadd.i64 q11,q15 - vstmia r0,{d16,d17,d18,d19,d20,d21,d22,d23} @ save context - teq r1,r2 - sub r3,#640 @ rewind K512 - bne .Loop_neon - - VFP_ABI_POP - bx lr @ .word 0xe12fff1e -.size sha512_block_data_order_neon,.-sha512_block_data_order_neon -#endif -.byte 83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,65,82,77,118,52,47,78,69,79,78,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 2 -.align 2 -#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) -.comm OPENSSL_armcap_P,4,4 -.hidden OPENSSL_armcap_P -#endif -#endif \ No newline at end of file diff --git a/third_party/boringssl/linux-x86/crypto/aes/aes-586.S b/third_party/boringssl/linux-x86/crypto/aes/aes-586.S deleted file mode 100644 index 74282748ce0da..0000000000000 --- a/third_party/boringssl/linux-x86/crypto/aes/aes-586.S +++ /dev/null @@ -1,3257 +0,0 @@ -#if defined(__i386__) -.file "aes-586.S" -.text -.hidden _x86_AES_encrypt_compact -.type _x86_AES_encrypt_compact,@function -.align 16 -_x86_AES_encrypt_compact: - movl %edi,20(%esp) - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - movl 240(%edi),%esi - leal -2(%esi,%esi,1),%esi - leal (%edi,%esi,8),%esi - movl %esi,24(%esp) - movl -128(%ebp),%edi - movl -96(%ebp),%esi - movl -64(%ebp),%edi - movl -32(%ebp),%esi - movl (%ebp),%edi - movl 32(%ebp),%esi - movl 64(%ebp),%edi - movl 96(%ebp),%esi -.align 16 -.L000loop: - movl %eax,%esi - andl $255,%esi - movzbl -128(%ebp,%esi,1),%esi - movzbl %bh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %ecx,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,4(%esp) - - movl %ebx,%esi - andl $255,%esi - shrl $16,%ebx - movzbl -128(%ebp,%esi,1),%esi - movzbl %ch,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %eax,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,8(%esp) - - movl %ecx,%esi - andl $255,%esi - shrl $24,%ecx - movzbl -128(%ebp,%esi,1),%esi - movzbl %dh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %eax,%edi - shrl $16,%edi - andl $255,%edx - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movzbl %bh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - - andl $255,%edx - movzbl -128(%ebp,%edx,1),%edx - movzbl %ah,%eax - movzbl -128(%ebp,%eax,1),%eax - shll $8,%eax - xorl %eax,%edx - movl 4(%esp),%eax - andl $255,%ebx - movzbl -128(%ebp,%ebx,1),%ebx - shll $16,%ebx - xorl %ebx,%edx - movl 8(%esp),%ebx - movzbl -128(%ebp,%ecx,1),%ecx - shll $24,%ecx - xorl %ecx,%edx - movl %esi,%ecx - - movl $2155905152,%ebp - andl %ecx,%ebp - leal (%ecx,%ecx,1),%edi - movl %ebp,%esi - shrl $7,%ebp - andl $4278124286,%edi - subl %ebp,%esi - movl %ecx,%ebp - andl $454761243,%esi - rorl $16,%ebp - xorl %edi,%esi - movl %ecx,%edi - xorl %esi,%ecx - rorl $24,%edi - xorl %ebp,%esi - roll $24,%ecx - xorl %edi,%esi - movl $2155905152,%ebp - xorl %esi,%ecx - andl %edx,%ebp - leal (%edx,%edx,1),%edi - movl %ebp,%esi - shrl $7,%ebp - andl $4278124286,%edi - subl %ebp,%esi - movl %edx,%ebp - andl $454761243,%esi - rorl $16,%ebp - xorl %edi,%esi - movl %edx,%edi - xorl %esi,%edx - rorl $24,%edi - xorl %ebp,%esi - roll $24,%edx - xorl %edi,%esi - movl $2155905152,%ebp - xorl %esi,%edx - andl %eax,%ebp - leal (%eax,%eax,1),%edi - movl %ebp,%esi - shrl $7,%ebp - andl $4278124286,%edi - subl %ebp,%esi - movl %eax,%ebp - andl $454761243,%esi - rorl $16,%ebp - xorl %edi,%esi - movl %eax,%edi - xorl %esi,%eax - rorl $24,%edi - xorl %ebp,%esi - roll $24,%eax - xorl %edi,%esi - movl $2155905152,%ebp - xorl %esi,%eax - andl %ebx,%ebp - leal (%ebx,%ebx,1),%edi - movl %ebp,%esi - shrl $7,%ebp - andl $4278124286,%edi - subl %ebp,%esi - movl %ebx,%ebp - andl $454761243,%esi - rorl $16,%ebp - xorl %edi,%esi - movl %ebx,%edi - xorl %esi,%ebx - rorl $24,%edi - xorl %ebp,%esi - roll $24,%ebx - xorl %edi,%esi - xorl %esi,%ebx - movl 20(%esp),%edi - movl 28(%esp),%ebp - addl $16,%edi - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - cmpl 24(%esp),%edi - movl %edi,20(%esp) - jb .L000loop - movl %eax,%esi - andl $255,%esi - movzbl -128(%ebp,%esi,1),%esi - movzbl %bh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %ecx,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,4(%esp) - - movl %ebx,%esi - andl $255,%esi - shrl $16,%ebx - movzbl -128(%ebp,%esi,1),%esi - movzbl %ch,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %eax,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,8(%esp) - - movl %ecx,%esi - andl $255,%esi - shrl $24,%ecx - movzbl -128(%ebp,%esi,1),%esi - movzbl %dh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %eax,%edi - shrl $16,%edi - andl $255,%edx - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movzbl %bh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - - movl 20(%esp),%edi - andl $255,%edx - movzbl -128(%ebp,%edx,1),%edx - movzbl %ah,%eax - movzbl -128(%ebp,%eax,1),%eax - shll $8,%eax - xorl %eax,%edx - movl 4(%esp),%eax - andl $255,%ebx - movzbl -128(%ebp,%ebx,1),%ebx - shll $16,%ebx - xorl %ebx,%edx - movl 8(%esp),%ebx - movzbl -128(%ebp,%ecx,1),%ecx - shll $24,%ecx - xorl %ecx,%edx - movl %esi,%ecx - - xorl 16(%edi),%eax - xorl 20(%edi),%ebx - xorl 24(%edi),%ecx - xorl 28(%edi),%edx - ret -.size _x86_AES_encrypt_compact,.-_x86_AES_encrypt_compact -.hidden _sse_AES_encrypt_compact -.type _sse_AES_encrypt_compact,@function -.align 16 -_sse_AES_encrypt_compact: - pxor (%edi),%mm0 - pxor 8(%edi),%mm4 - movl 240(%edi),%esi - leal -2(%esi,%esi,1),%esi - leal (%edi,%esi,8),%esi - movl %esi,24(%esp) - movl $454761243,%eax - movl %eax,8(%esp) - movl %eax,12(%esp) - movl -128(%ebp),%eax - movl -96(%ebp),%ebx - movl -64(%ebp),%ecx - movl -32(%ebp),%edx - movl (%ebp),%eax - movl 32(%ebp),%ebx - movl 64(%ebp),%ecx - movl 96(%ebp),%edx -.align 16 -.L001loop: - pshufw $8,%mm0,%mm1 - pshufw $13,%mm4,%mm5 - movd %mm1,%eax - movd %mm5,%ebx - movl %edi,20(%esp) - movzbl %al,%esi - movzbl %ah,%edx - pshufw $13,%mm0,%mm2 - movzbl -128(%ebp,%esi,1),%ecx - movzbl %bl,%edi - movzbl -128(%ebp,%edx,1),%edx - shrl $16,%eax - shll $8,%edx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bh,%edi - shll $16,%esi - pshufw $8,%mm4,%mm6 - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %ah,%edi - shll $24,%esi - shrl $16,%ebx - orl %esi,%edx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bh,%edi - shll $8,%esi - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %al,%edi - shll $24,%esi - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bl,%edi - movd %mm2,%eax - movd %ecx,%mm0 - movzbl -128(%ebp,%edi,1),%ecx - movzbl %ah,%edi - shll $16,%ecx - movd %mm6,%ebx - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bh,%edi - shll $24,%esi - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bl,%edi - shll $8,%esi - shrl $16,%ebx - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %al,%edi - shrl $16,%eax - movd %ecx,%mm1 - movzbl -128(%ebp,%edi,1),%ecx - movzbl %ah,%edi - shll $16,%ecx - andl $255,%eax - orl %esi,%ecx - punpckldq %mm1,%mm0 - movzbl -128(%ebp,%edi,1),%esi - movzbl %bh,%edi - shll $24,%esi - andl $255,%ebx - movzbl -128(%ebp,%eax,1),%eax - orl %esi,%ecx - shll $16,%eax - movzbl -128(%ebp,%edi,1),%esi - orl %eax,%edx - shll $8,%esi - movzbl -128(%ebp,%ebx,1),%ebx - orl %esi,%ecx - orl %ebx,%edx - movl 20(%esp),%edi - movd %ecx,%mm4 - movd %edx,%mm5 - punpckldq %mm5,%mm4 - addl $16,%edi - cmpl 24(%esp),%edi - ja .L002out - movq 8(%esp),%mm2 - pxor %mm3,%mm3 - pxor %mm7,%mm7 - movq %mm0,%mm1 - movq %mm4,%mm5 - pcmpgtb %mm0,%mm3 - pcmpgtb %mm4,%mm7 - pand %mm2,%mm3 - pand %mm2,%mm7 - pshufw $177,%mm0,%mm2 - pshufw $177,%mm4,%mm6 - paddb %mm0,%mm0 - paddb %mm4,%mm4 - pxor %mm3,%mm0 - pxor %mm7,%mm4 - pshufw $177,%mm2,%mm3 - pshufw $177,%mm6,%mm7 - pxor %mm0,%mm1 - pxor %mm4,%mm5 - pxor %mm2,%mm0 - pxor %mm6,%mm4 - movq %mm3,%mm2 - movq %mm7,%mm6 - pslld $8,%mm3 - pslld $8,%mm7 - psrld $24,%mm2 - psrld $24,%mm6 - pxor %mm3,%mm0 - pxor %mm7,%mm4 - pxor %mm2,%mm0 - pxor %mm6,%mm4 - movq %mm1,%mm3 - movq %mm5,%mm7 - movq (%edi),%mm2 - movq 8(%edi),%mm6 - psrld $8,%mm1 - psrld $8,%mm5 - movl -128(%ebp),%eax - pslld $24,%mm3 - pslld $24,%mm7 - movl -64(%ebp),%ebx - pxor %mm1,%mm0 - pxor %mm5,%mm4 - movl (%ebp),%ecx - pxor %mm3,%mm0 - pxor %mm7,%mm4 - movl 64(%ebp),%edx - pxor %mm2,%mm0 - pxor %mm6,%mm4 - jmp .L001loop -.align 16 -.L002out: - pxor (%edi),%mm0 - pxor 8(%edi),%mm4 - ret -.size _sse_AES_encrypt_compact,.-_sse_AES_encrypt_compact -.hidden _x86_AES_encrypt -.type _x86_AES_encrypt,@function -.align 16 -_x86_AES_encrypt: - movl %edi,20(%esp) - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - movl 240(%edi),%esi - leal -2(%esi,%esi,1),%esi - leal (%edi,%esi,8),%esi - movl %esi,24(%esp) -.align 16 -.L003loop: - movl %eax,%esi - andl $255,%esi - movl (%ebp,%esi,8),%esi - movzbl %bh,%edi - xorl 3(%ebp,%edi,8),%esi - movl %ecx,%edi - shrl $16,%edi - andl $255,%edi - xorl 2(%ebp,%edi,8),%esi - movl %edx,%edi - shrl $24,%edi - xorl 1(%ebp,%edi,8),%esi - movl %esi,4(%esp) - - movl %ebx,%esi - andl $255,%esi - shrl $16,%ebx - movl (%ebp,%esi,8),%esi - movzbl %ch,%edi - xorl 3(%ebp,%edi,8),%esi - movl %edx,%edi - shrl $16,%edi - andl $255,%edi - xorl 2(%ebp,%edi,8),%esi - movl %eax,%edi - shrl $24,%edi - xorl 1(%ebp,%edi,8),%esi - movl %esi,8(%esp) - - movl %ecx,%esi - andl $255,%esi - shrl $24,%ecx - movl (%ebp,%esi,8),%esi - movzbl %dh,%edi - xorl 3(%ebp,%edi,8),%esi - movl %eax,%edi - shrl $16,%edi - andl $255,%edx - andl $255,%edi - xorl 2(%ebp,%edi,8),%esi - movzbl %bh,%edi - xorl 1(%ebp,%edi,8),%esi - - movl 20(%esp),%edi - movl (%ebp,%edx,8),%edx - movzbl %ah,%eax - xorl 3(%ebp,%eax,8),%edx - movl 4(%esp),%eax - andl $255,%ebx - xorl 2(%ebp,%ebx,8),%edx - movl 8(%esp),%ebx - xorl 1(%ebp,%ecx,8),%edx - movl %esi,%ecx - - addl $16,%edi - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - cmpl 24(%esp),%edi - movl %edi,20(%esp) - jb .L003loop - movl %eax,%esi - andl $255,%esi - movl 2(%ebp,%esi,8),%esi - andl $255,%esi - movzbl %bh,%edi - movl (%ebp,%edi,8),%edi - andl $65280,%edi - xorl %edi,%esi - movl %ecx,%edi - shrl $16,%edi - andl $255,%edi - movl (%ebp,%edi,8),%edi - andl $16711680,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $24,%edi - movl 2(%ebp,%edi,8),%edi - andl $4278190080,%edi - xorl %edi,%esi - movl %esi,4(%esp) - movl %ebx,%esi - andl $255,%esi - shrl $16,%ebx - movl 2(%ebp,%esi,8),%esi - andl $255,%esi - movzbl %ch,%edi - movl (%ebp,%edi,8),%edi - andl $65280,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $16,%edi - andl $255,%edi - movl (%ebp,%edi,8),%edi - andl $16711680,%edi - xorl %edi,%esi - movl %eax,%edi - shrl $24,%edi - movl 2(%ebp,%edi,8),%edi - andl $4278190080,%edi - xorl %edi,%esi - movl %esi,8(%esp) - movl %ecx,%esi - andl $255,%esi - shrl $24,%ecx - movl 2(%ebp,%esi,8),%esi - andl $255,%esi - movzbl %dh,%edi - movl (%ebp,%edi,8),%edi - andl $65280,%edi - xorl %edi,%esi - movl %eax,%edi - shrl $16,%edi - andl $255,%edx - andl $255,%edi - movl (%ebp,%edi,8),%edi - andl $16711680,%edi - xorl %edi,%esi - movzbl %bh,%edi - movl 2(%ebp,%edi,8),%edi - andl $4278190080,%edi - xorl %edi,%esi - movl 20(%esp),%edi - andl $255,%edx - movl 2(%ebp,%edx,8),%edx - andl $255,%edx - movzbl %ah,%eax - movl (%ebp,%eax,8),%eax - andl $65280,%eax - xorl %eax,%edx - movl 4(%esp),%eax - andl $255,%ebx - movl (%ebp,%ebx,8),%ebx - andl $16711680,%ebx - xorl %ebx,%edx - movl 8(%esp),%ebx - movl 2(%ebp,%ecx,8),%ecx - andl $4278190080,%ecx - xorl %ecx,%edx - movl %esi,%ecx - addl $16,%edi - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - ret -.align 64 -.LAES_Te: -.long 2774754246,2774754246 -.long 2222750968,2222750968 -.long 2574743534,2574743534 -.long 2373680118,2373680118 -.long 234025727,234025727 -.long 3177933782,3177933782 -.long 2976870366,2976870366 -.long 1422247313,1422247313 -.long 1345335392,1345335392 -.long 50397442,50397442 -.long 2842126286,2842126286 -.long 2099981142,2099981142 -.long 436141799,436141799 -.long 1658312629,1658312629 -.long 3870010189,3870010189 -.long 2591454956,2591454956 -.long 1170918031,1170918031 -.long 2642575903,2642575903 -.long 1086966153,1086966153 -.long 2273148410,2273148410 -.long 368769775,368769775 -.long 3948501426,3948501426 -.long 3376891790,3376891790 -.long 200339707,200339707 -.long 3970805057,3970805057 -.long 1742001331,1742001331 -.long 4255294047,4255294047 -.long 3937382213,3937382213 -.long 3214711843,3214711843 -.long 4154762323,4154762323 -.long 2524082916,2524082916 -.long 1539358875,1539358875 -.long 3266819957,3266819957 -.long 486407649,486407649 -.long 2928907069,2928907069 -.long 1780885068,1780885068 -.long 1513502316,1513502316 -.long 1094664062,1094664062 -.long 49805301,49805301 -.long 1338821763,1338821763 -.long 1546925160,1546925160 -.long 4104496465,4104496465 -.long 887481809,887481809 -.long 150073849,150073849 -.long 2473685474,2473685474 -.long 1943591083,1943591083 -.long 1395732834,1395732834 -.long 1058346282,1058346282 -.long 201589768,201589768 -.long 1388824469,1388824469 -.long 1696801606,1696801606 -.long 1589887901,1589887901 -.long 672667696,672667696 -.long 2711000631,2711000631 -.long 251987210,251987210 -.long 3046808111,3046808111 -.long 151455502,151455502 -.long 907153956,907153956 -.long 2608889883,2608889883 -.long 1038279391,1038279391 -.long 652995533,652995533 -.long 1764173646,1764173646 -.long 3451040383,3451040383 -.long 2675275242,2675275242 -.long 453576978,453576978 -.long 2659418909,2659418909 -.long 1949051992,1949051992 -.long 773462580,773462580 -.long 756751158,756751158 -.long 2993581788,2993581788 -.long 3998898868,3998898868 -.long 4221608027,4221608027 -.long 4132590244,4132590244 -.long 1295727478,1295727478 -.long 1641469623,1641469623 -.long 3467883389,3467883389 -.long 2066295122,2066295122 -.long 1055122397,1055122397 -.long 1898917726,1898917726 -.long 2542044179,2542044179 -.long 4115878822,4115878822 -.long 1758581177,1758581177 -.long 0,0 -.long 753790401,753790401 -.long 1612718144,1612718144 -.long 536673507,536673507 -.long 3367088505,3367088505 -.long 3982187446,3982187446 -.long 3194645204,3194645204 -.long 1187761037,1187761037 -.long 3653156455,3653156455 -.long 1262041458,1262041458 -.long 3729410708,3729410708 -.long 3561770136,3561770136 -.long 3898103984,3898103984 -.long 1255133061,1255133061 -.long 1808847035,1808847035 -.long 720367557,720367557 -.long 3853167183,3853167183 -.long 385612781,385612781 -.long 3309519750,3309519750 -.long 3612167578,3612167578 -.long 1429418854,1429418854 -.long 2491778321,2491778321 -.long 3477423498,3477423498 -.long 284817897,284817897 -.long 100794884,100794884 -.long 2172616702,2172616702 -.long 4031795360,4031795360 -.long 1144798328,1144798328 -.long 3131023141,3131023141 -.long 3819481163,3819481163 -.long 4082192802,4082192802 -.long 4272137053,4272137053 -.long 3225436288,3225436288 -.long 2324664069,2324664069 -.long 2912064063,2912064063 -.long 3164445985,3164445985 -.long 1211644016,1211644016 -.long 83228145,83228145 -.long 3753688163,3753688163 -.long 3249976951,3249976951 -.long 1977277103,1977277103 -.long 1663115586,1663115586 -.long 806359072,806359072 -.long 452984805,452984805 -.long 250868733,250868733 -.long 1842533055,1842533055 -.long 1288555905,1288555905 -.long 336333848,336333848 -.long 890442534,890442534 -.long 804056259,804056259 -.long 3781124030,3781124030 -.long 2727843637,2727843637 -.long 3427026056,3427026056 -.long 957814574,957814574 -.long 1472513171,1472513171 -.long 4071073621,4071073621 -.long 2189328124,2189328124 -.long 1195195770,1195195770 -.long 2892260552,2892260552 -.long 3881655738,3881655738 -.long 723065138,723065138 -.long 2507371494,2507371494 -.long 2690670784,2690670784 -.long 2558624025,2558624025 -.long 3511635870,3511635870 -.long 2145180835,2145180835 -.long 1713513028,1713513028 -.long 2116692564,2116692564 -.long 2878378043,2878378043 -.long 2206763019,2206763019 -.long 3393603212,3393603212 -.long 703524551,703524551 -.long 3552098411,3552098411 -.long 1007948840,1007948840 -.long 2044649127,2044649127 -.long 3797835452,3797835452 -.long 487262998,487262998 -.long 1994120109,1994120109 -.long 1004593371,1004593371 -.long 1446130276,1446130276 -.long 1312438900,1312438900 -.long 503974420,503974420 -.long 3679013266,3679013266 -.long 168166924,168166924 -.long 1814307912,1814307912 -.long 3831258296,3831258296 -.long 1573044895,1573044895 -.long 1859376061,1859376061 -.long 4021070915,4021070915 -.long 2791465668,2791465668 -.long 2828112185,2828112185 -.long 2761266481,2761266481 -.long 937747667,937747667 -.long 2339994098,2339994098 -.long 854058965,854058965 -.long 1137232011,1137232011 -.long 1496790894,1496790894 -.long 3077402074,3077402074 -.long 2358086913,2358086913 -.long 1691735473,1691735473 -.long 3528347292,3528347292 -.long 3769215305,3769215305 -.long 3027004632,3027004632 -.long 4199962284,4199962284 -.long 133494003,133494003 -.long 636152527,636152527 -.long 2942657994,2942657994 -.long 2390391540,2390391540 -.long 3920539207,3920539207 -.long 403179536,403179536 -.long 3585784431,3585784431 -.long 2289596656,2289596656 -.long 1864705354,1864705354 -.long 1915629148,1915629148 -.long 605822008,605822008 -.long 4054230615,4054230615 -.long 3350508659,3350508659 -.long 1371981463,1371981463 -.long 602466507,602466507 -.long 2094914977,2094914977 -.long 2624877800,2624877800 -.long 555687742,555687742 -.long 3712699286,3712699286 -.long 3703422305,3703422305 -.long 2257292045,2257292045 -.long 2240449039,2240449039 -.long 2423288032,2423288032 -.long 1111375484,1111375484 -.long 3300242801,3300242801 -.long 2858837708,2858837708 -.long 3628615824,3628615824 -.long 84083462,84083462 -.long 32962295,32962295 -.long 302911004,302911004 -.long 2741068226,2741068226 -.long 1597322602,1597322602 -.long 4183250862,4183250862 -.long 3501832553,3501832553 -.long 2441512471,2441512471 -.long 1489093017,1489093017 -.long 656219450,656219450 -.long 3114180135,3114180135 -.long 954327513,954327513 -.long 335083755,335083755 -.long 3013122091,3013122091 -.long 856756514,856756514 -.long 3144247762,3144247762 -.long 1893325225,1893325225 -.long 2307821063,2307821063 -.long 2811532339,2811532339 -.long 3063651117,3063651117 -.long 572399164,572399164 -.long 2458355477,2458355477 -.long 552200649,552200649 -.long 1238290055,1238290055 -.long 4283782570,4283782570 -.long 2015897680,2015897680 -.long 2061492133,2061492133 -.long 2408352771,2408352771 -.long 4171342169,4171342169 -.long 2156497161,2156497161 -.long 386731290,386731290 -.long 3669999461,3669999461 -.long 837215959,837215959 -.long 3326231172,3326231172 -.long 3093850320,3093850320 -.long 3275833730,3275833730 -.long 2962856233,2962856233 -.long 1999449434,1999449434 -.long 286199582,286199582 -.long 3417354363,3417354363 -.long 4233385128,4233385128 -.long 3602627437,3602627437 -.long 974525996,974525996 -.byte 99,124,119,123,242,107,111,197 -.byte 48,1,103,43,254,215,171,118 -.byte 202,130,201,125,250,89,71,240 -.byte 173,212,162,175,156,164,114,192 -.byte 183,253,147,38,54,63,247,204 -.byte 52,165,229,241,113,216,49,21 -.byte 4,199,35,195,24,150,5,154 -.byte 7,18,128,226,235,39,178,117 -.byte 9,131,44,26,27,110,90,160 -.byte 82,59,214,179,41,227,47,132 -.byte 83,209,0,237,32,252,177,91 -.byte 106,203,190,57,74,76,88,207 -.byte 208,239,170,251,67,77,51,133 -.byte 69,249,2,127,80,60,159,168 -.byte 81,163,64,143,146,157,56,245 -.byte 188,182,218,33,16,255,243,210 -.byte 205,12,19,236,95,151,68,23 -.byte 196,167,126,61,100,93,25,115 -.byte 96,129,79,220,34,42,144,136 -.byte 70,238,184,20,222,94,11,219 -.byte 224,50,58,10,73,6,36,92 -.byte 194,211,172,98,145,149,228,121 -.byte 231,200,55,109,141,213,78,169 -.byte 108,86,244,234,101,122,174,8 -.byte 186,120,37,46,28,166,180,198 -.byte 232,221,116,31,75,189,139,138 -.byte 112,62,181,102,72,3,246,14 -.byte 97,53,87,185,134,193,29,158 -.byte 225,248,152,17,105,217,142,148 -.byte 155,30,135,233,206,85,40,223 -.byte 140,161,137,13,191,230,66,104 -.byte 65,153,45,15,176,84,187,22 -.byte 99,124,119,123,242,107,111,197 -.byte 48,1,103,43,254,215,171,118 -.byte 202,130,201,125,250,89,71,240 -.byte 173,212,162,175,156,164,114,192 -.byte 183,253,147,38,54,63,247,204 -.byte 52,165,229,241,113,216,49,21 -.byte 4,199,35,195,24,150,5,154 -.byte 7,18,128,226,235,39,178,117 -.byte 9,131,44,26,27,110,90,160 -.byte 82,59,214,179,41,227,47,132 -.byte 83,209,0,237,32,252,177,91 -.byte 106,203,190,57,74,76,88,207 -.byte 208,239,170,251,67,77,51,133 -.byte 69,249,2,127,80,60,159,168 -.byte 81,163,64,143,146,157,56,245 -.byte 188,182,218,33,16,255,243,210 -.byte 205,12,19,236,95,151,68,23 -.byte 196,167,126,61,100,93,25,115 -.byte 96,129,79,220,34,42,144,136 -.byte 70,238,184,20,222,94,11,219 -.byte 224,50,58,10,73,6,36,92 -.byte 194,211,172,98,145,149,228,121 -.byte 231,200,55,109,141,213,78,169 -.byte 108,86,244,234,101,122,174,8 -.byte 186,120,37,46,28,166,180,198 -.byte 232,221,116,31,75,189,139,138 -.byte 112,62,181,102,72,3,246,14 -.byte 97,53,87,185,134,193,29,158 -.byte 225,248,152,17,105,217,142,148 -.byte 155,30,135,233,206,85,40,223 -.byte 140,161,137,13,191,230,66,104 -.byte 65,153,45,15,176,84,187,22 -.byte 99,124,119,123,242,107,111,197 -.byte 48,1,103,43,254,215,171,118 -.byte 202,130,201,125,250,89,71,240 -.byte 173,212,162,175,156,164,114,192 -.byte 183,253,147,38,54,63,247,204 -.byte 52,165,229,241,113,216,49,21 -.byte 4,199,35,195,24,150,5,154 -.byte 7,18,128,226,235,39,178,117 -.byte 9,131,44,26,27,110,90,160 -.byte 82,59,214,179,41,227,47,132 -.byte 83,209,0,237,32,252,177,91 -.byte 106,203,190,57,74,76,88,207 -.byte 208,239,170,251,67,77,51,133 -.byte 69,249,2,127,80,60,159,168 -.byte 81,163,64,143,146,157,56,245 -.byte 188,182,218,33,16,255,243,210 -.byte 205,12,19,236,95,151,68,23 -.byte 196,167,126,61,100,93,25,115 -.byte 96,129,79,220,34,42,144,136 -.byte 70,238,184,20,222,94,11,219 -.byte 224,50,58,10,73,6,36,92 -.byte 194,211,172,98,145,149,228,121 -.byte 231,200,55,109,141,213,78,169 -.byte 108,86,244,234,101,122,174,8 -.byte 186,120,37,46,28,166,180,198 -.byte 232,221,116,31,75,189,139,138 -.byte 112,62,181,102,72,3,246,14 -.byte 97,53,87,185,134,193,29,158 -.byte 225,248,152,17,105,217,142,148 -.byte 155,30,135,233,206,85,40,223 -.byte 140,161,137,13,191,230,66,104 -.byte 65,153,45,15,176,84,187,22 -.byte 99,124,119,123,242,107,111,197 -.byte 48,1,103,43,254,215,171,118 -.byte 202,130,201,125,250,89,71,240 -.byte 173,212,162,175,156,164,114,192 -.byte 183,253,147,38,54,63,247,204 -.byte 52,165,229,241,113,216,49,21 -.byte 4,199,35,195,24,150,5,154 -.byte 7,18,128,226,235,39,178,117 -.byte 9,131,44,26,27,110,90,160 -.byte 82,59,214,179,41,227,47,132 -.byte 83,209,0,237,32,252,177,91 -.byte 106,203,190,57,74,76,88,207 -.byte 208,239,170,251,67,77,51,133 -.byte 69,249,2,127,80,60,159,168 -.byte 81,163,64,143,146,157,56,245 -.byte 188,182,218,33,16,255,243,210 -.byte 205,12,19,236,95,151,68,23 -.byte 196,167,126,61,100,93,25,115 -.byte 96,129,79,220,34,42,144,136 -.byte 70,238,184,20,222,94,11,219 -.byte 224,50,58,10,73,6,36,92 -.byte 194,211,172,98,145,149,228,121 -.byte 231,200,55,109,141,213,78,169 -.byte 108,86,244,234,101,122,174,8 -.byte 186,120,37,46,28,166,180,198 -.byte 232,221,116,31,75,189,139,138 -.byte 112,62,181,102,72,3,246,14 -.byte 97,53,87,185,134,193,29,158 -.byte 225,248,152,17,105,217,142,148 -.byte 155,30,135,233,206,85,40,223 -.byte 140,161,137,13,191,230,66,104 -.byte 65,153,45,15,176,84,187,22 -.long 1,2,4,8 -.long 16,32,64,128 -.long 27,54,0,0 -.long 0,0,0,0 -.size _x86_AES_encrypt,.-_x86_AES_encrypt -.globl asm_AES_encrypt -.hidden asm_AES_encrypt -.type asm_AES_encrypt,@function -.align 16 -asm_AES_encrypt: -.L_asm_AES_encrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl 28(%esp),%edi - movl %esp,%eax - subl $36,%esp - andl $-64,%esp - leal -127(%edi),%ebx - subl %esp,%ebx - negl %ebx - andl $960,%ebx - subl %ebx,%esp - addl $4,%esp - movl %eax,28(%esp) - call .L004pic_point -.L004pic_point: - popl %ebp - leal OPENSSL_ia32cap_P-.L004pic_point(%ebp),%eax - leal .LAES_Te-.L004pic_point(%ebp),%ebp - leal 764(%esp),%ebx - subl %ebp,%ebx - andl $768,%ebx - leal 2176(%ebp,%ebx,1),%ebp - btl $25,(%eax) - jnc .L005x86 - movq (%esi),%mm0 - movq 8(%esi),%mm4 - call _sse_AES_encrypt_compact - movl 28(%esp),%esp - movl 24(%esp),%esi - movq %mm0,(%esi) - movq %mm4,8(%esi) - emms - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.align 16 -.L005x86: - movl %ebp,24(%esp) - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - call _x86_AES_encrypt_compact - movl 28(%esp),%esp - movl 24(%esp),%esi - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %ecx,8(%esi) - movl %edx,12(%esi) - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size asm_AES_encrypt,.-.L_asm_AES_encrypt_begin -.hidden _x86_AES_decrypt_compact -.type _x86_AES_decrypt_compact,@function -.align 16 -_x86_AES_decrypt_compact: - movl %edi,20(%esp) - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - movl 240(%edi),%esi - leal -2(%esi,%esi,1),%esi - leal (%edi,%esi,8),%esi - movl %esi,24(%esp) - movl -128(%ebp),%edi - movl -96(%ebp),%esi - movl -64(%ebp),%edi - movl -32(%ebp),%esi - movl (%ebp),%edi - movl 32(%ebp),%esi - movl 64(%ebp),%edi - movl 96(%ebp),%esi -.align 16 -.L006loop: - movl %eax,%esi - andl $255,%esi - movzbl -128(%ebp,%esi,1),%esi - movzbl %dh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %ecx,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %ebx,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,4(%esp) - movl %ebx,%esi - andl $255,%esi - movzbl -128(%ebp,%esi,1),%esi - movzbl %ah,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %ecx,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,8(%esp) - movl %ecx,%esi - andl $255,%esi - movzbl -128(%ebp,%esi,1),%esi - movzbl %bh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %eax,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - andl $255,%edx - movzbl -128(%ebp,%edx,1),%edx - movzbl %ch,%ecx - movzbl -128(%ebp,%ecx,1),%ecx - shll $8,%ecx - xorl %ecx,%edx - movl %esi,%ecx - shrl $16,%ebx - andl $255,%ebx - movzbl -128(%ebp,%ebx,1),%ebx - shll $16,%ebx - xorl %ebx,%edx - shrl $24,%eax - movzbl -128(%ebp,%eax,1),%eax - shll $24,%eax - xorl %eax,%edx - movl $2155905152,%edi - andl %ecx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%ecx,%ecx,1),%eax - subl %edi,%esi - andl $4278124286,%eax - andl $454761243,%esi - xorl %esi,%eax - movl $2155905152,%edi - andl %eax,%edi - movl %edi,%esi - shrl $7,%edi - leal (%eax,%eax,1),%ebx - subl %edi,%esi - andl $4278124286,%ebx - andl $454761243,%esi - xorl %ecx,%eax - xorl %esi,%ebx - movl $2155905152,%edi - andl %ebx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%ebx,%ebx,1),%ebp - subl %edi,%esi - andl $4278124286,%ebp - andl $454761243,%esi - xorl %ecx,%ebx - roll $8,%ecx - xorl %esi,%ebp - xorl %eax,%ecx - xorl %ebp,%eax - xorl %ebx,%ecx - xorl %ebp,%ebx - roll $24,%eax - xorl %ebp,%ecx - roll $16,%ebx - xorl %eax,%ecx - roll $8,%ebp - xorl %ebx,%ecx - movl 4(%esp),%eax - xorl %ebp,%ecx - movl %ecx,12(%esp) - movl $2155905152,%edi - andl %edx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%edx,%edx,1),%ebx - subl %edi,%esi - andl $4278124286,%ebx - andl $454761243,%esi - xorl %esi,%ebx - movl $2155905152,%edi - andl %ebx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%ebx,%ebx,1),%ecx - subl %edi,%esi - andl $4278124286,%ecx - andl $454761243,%esi - xorl %edx,%ebx - xorl %esi,%ecx - movl $2155905152,%edi - andl %ecx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%ecx,%ecx,1),%ebp - subl %edi,%esi - andl $4278124286,%ebp - andl $454761243,%esi - xorl %edx,%ecx - roll $8,%edx - xorl %esi,%ebp - xorl %ebx,%edx - xorl %ebp,%ebx - xorl %ecx,%edx - xorl %ebp,%ecx - roll $24,%ebx - xorl %ebp,%edx - roll $16,%ecx - xorl %ebx,%edx - roll $8,%ebp - xorl %ecx,%edx - movl 8(%esp),%ebx - xorl %ebp,%edx - movl %edx,16(%esp) - movl $2155905152,%edi - andl %eax,%edi - movl %edi,%esi - shrl $7,%edi - leal (%eax,%eax,1),%ecx - subl %edi,%esi - andl $4278124286,%ecx - andl $454761243,%esi - xorl %esi,%ecx - movl $2155905152,%edi - andl %ecx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%ecx,%ecx,1),%edx - subl %edi,%esi - andl $4278124286,%edx - andl $454761243,%esi - xorl %eax,%ecx - xorl %esi,%edx - movl $2155905152,%edi - andl %edx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%edx,%edx,1),%ebp - subl %edi,%esi - andl $4278124286,%ebp - andl $454761243,%esi - xorl %eax,%edx - roll $8,%eax - xorl %esi,%ebp - xorl %ecx,%eax - xorl %ebp,%ecx - xorl %edx,%eax - xorl %ebp,%edx - roll $24,%ecx - xorl %ebp,%eax - roll $16,%edx - xorl %ecx,%eax - roll $8,%ebp - xorl %edx,%eax - xorl %ebp,%eax - movl $2155905152,%edi - andl %ebx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%ebx,%ebx,1),%ecx - subl %edi,%esi - andl $4278124286,%ecx - andl $454761243,%esi - xorl %esi,%ecx - movl $2155905152,%edi - andl %ecx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%ecx,%ecx,1),%edx - subl %edi,%esi - andl $4278124286,%edx - andl $454761243,%esi - xorl %ebx,%ecx - xorl %esi,%edx - movl $2155905152,%edi - andl %edx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%edx,%edx,1),%ebp - subl %edi,%esi - andl $4278124286,%ebp - andl $454761243,%esi - xorl %ebx,%edx - roll $8,%ebx - xorl %esi,%ebp - xorl %ecx,%ebx - xorl %ebp,%ecx - xorl %edx,%ebx - xorl %ebp,%edx - roll $24,%ecx - xorl %ebp,%ebx - roll $16,%edx - xorl %ecx,%ebx - roll $8,%ebp - xorl %edx,%ebx - movl 12(%esp),%ecx - xorl %ebp,%ebx - movl 16(%esp),%edx - movl 20(%esp),%edi - movl 28(%esp),%ebp - addl $16,%edi - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - cmpl 24(%esp),%edi - movl %edi,20(%esp) - jb .L006loop - movl %eax,%esi - andl $255,%esi - movzbl -128(%ebp,%esi,1),%esi - movzbl %dh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %ecx,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %ebx,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,4(%esp) - movl %ebx,%esi - andl $255,%esi - movzbl -128(%ebp,%esi,1),%esi - movzbl %ah,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %ecx,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,8(%esp) - movl %ecx,%esi - andl $255,%esi - movzbl -128(%ebp,%esi,1),%esi - movzbl %bh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %eax,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl 20(%esp),%edi - andl $255,%edx - movzbl -128(%ebp,%edx,1),%edx - movzbl %ch,%ecx - movzbl -128(%ebp,%ecx,1),%ecx - shll $8,%ecx - xorl %ecx,%edx - movl %esi,%ecx - shrl $16,%ebx - andl $255,%ebx - movzbl -128(%ebp,%ebx,1),%ebx - shll $16,%ebx - xorl %ebx,%edx - movl 8(%esp),%ebx - shrl $24,%eax - movzbl -128(%ebp,%eax,1),%eax - shll $24,%eax - xorl %eax,%edx - movl 4(%esp),%eax - xorl 16(%edi),%eax - xorl 20(%edi),%ebx - xorl 24(%edi),%ecx - xorl 28(%edi),%edx - ret -.size _x86_AES_decrypt_compact,.-_x86_AES_decrypt_compact -.hidden _sse_AES_decrypt_compact -.type _sse_AES_decrypt_compact,@function -.align 16 -_sse_AES_decrypt_compact: - pxor (%edi),%mm0 - pxor 8(%edi),%mm4 - movl 240(%edi),%esi - leal -2(%esi,%esi,1),%esi - leal (%edi,%esi,8),%esi - movl %esi,24(%esp) - movl $454761243,%eax - movl %eax,8(%esp) - movl %eax,12(%esp) - movl -128(%ebp),%eax - movl -96(%ebp),%ebx - movl -64(%ebp),%ecx - movl -32(%ebp),%edx - movl (%ebp),%eax - movl 32(%ebp),%ebx - movl 64(%ebp),%ecx - movl 96(%ebp),%edx -.align 16 -.L007loop: - pshufw $12,%mm0,%mm1 - pshufw $9,%mm4,%mm5 - movd %mm1,%eax - movd %mm5,%ebx - movl %edi,20(%esp) - movzbl %al,%esi - movzbl %ah,%edx - pshufw $6,%mm0,%mm2 - movzbl -128(%ebp,%esi,1),%ecx - movzbl %bl,%edi - movzbl -128(%ebp,%edx,1),%edx - shrl $16,%eax - shll $8,%edx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bh,%edi - shll $16,%esi - pshufw $3,%mm4,%mm6 - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %ah,%edi - shll $24,%esi - shrl $16,%ebx - orl %esi,%edx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bh,%edi - shll $24,%esi - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %al,%edi - shll $8,%esi - movd %mm2,%eax - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bl,%edi - shll $16,%esi - movd %mm6,%ebx - movd %ecx,%mm0 - movzbl -128(%ebp,%edi,1),%ecx - movzbl %al,%edi - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bl,%edi - orl %esi,%edx - movzbl -128(%ebp,%edi,1),%esi - movzbl %ah,%edi - shll $16,%esi - shrl $16,%eax - orl %esi,%edx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bh,%edi - shrl $16,%ebx - shll $8,%esi - movd %edx,%mm1 - movzbl -128(%ebp,%edi,1),%edx - movzbl %bh,%edi - shll $24,%edx - andl $255,%ebx - orl %esi,%edx - punpckldq %mm1,%mm0 - movzbl -128(%ebp,%edi,1),%esi - movzbl %al,%edi - shll $8,%esi - movzbl %ah,%eax - movzbl -128(%ebp,%ebx,1),%ebx - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - orl %ebx,%edx - shll $16,%esi - movzbl -128(%ebp,%eax,1),%eax - orl %esi,%edx - shll $24,%eax - orl %eax,%ecx - movl 20(%esp),%edi - movd %edx,%mm4 - movd %ecx,%mm5 - punpckldq %mm5,%mm4 - addl $16,%edi - cmpl 24(%esp),%edi - ja .L008out - movq %mm0,%mm3 - movq %mm4,%mm7 - pshufw $228,%mm0,%mm2 - pshufw $228,%mm4,%mm6 - movq %mm0,%mm1 - movq %mm4,%mm5 - pshufw $177,%mm0,%mm0 - pshufw $177,%mm4,%mm4 - pslld $8,%mm2 - pslld $8,%mm6 - psrld $8,%mm3 - psrld $8,%mm7 - pxor %mm2,%mm0 - pxor %mm6,%mm4 - pxor %mm3,%mm0 - pxor %mm7,%mm4 - pslld $16,%mm2 - pslld $16,%mm6 - psrld $16,%mm3 - psrld $16,%mm7 - pxor %mm2,%mm0 - pxor %mm6,%mm4 - pxor %mm3,%mm0 - pxor %mm7,%mm4 - movq 8(%esp),%mm3 - pxor %mm2,%mm2 - pxor %mm6,%mm6 - pcmpgtb %mm1,%mm2 - pcmpgtb %mm5,%mm6 - pand %mm3,%mm2 - pand %mm3,%mm6 - paddb %mm1,%mm1 - paddb %mm5,%mm5 - pxor %mm2,%mm1 - pxor %mm6,%mm5 - movq %mm1,%mm3 - movq %mm5,%mm7 - movq %mm1,%mm2 - movq %mm5,%mm6 - pxor %mm1,%mm0 - pxor %mm5,%mm4 - pslld $24,%mm3 - pslld $24,%mm7 - psrld $8,%mm2 - psrld $8,%mm6 - pxor %mm3,%mm0 - pxor %mm7,%mm4 - pxor %mm2,%mm0 - pxor %mm6,%mm4 - movq 8(%esp),%mm2 - pxor %mm3,%mm3 - pxor %mm7,%mm7 - pcmpgtb %mm1,%mm3 - pcmpgtb %mm5,%mm7 - pand %mm2,%mm3 - pand %mm2,%mm7 - paddb %mm1,%mm1 - paddb %mm5,%mm5 - pxor %mm3,%mm1 - pxor %mm7,%mm5 - pshufw $177,%mm1,%mm3 - pshufw $177,%mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm5,%mm4 - pxor %mm3,%mm0 - pxor %mm7,%mm4 - pxor %mm3,%mm3 - pxor %mm7,%mm7 - pcmpgtb %mm1,%mm3 - pcmpgtb %mm5,%mm7 - pand %mm2,%mm3 - pand %mm2,%mm7 - paddb %mm1,%mm1 - paddb %mm5,%mm5 - pxor %mm3,%mm1 - pxor %mm7,%mm5 - pxor %mm1,%mm0 - pxor %mm5,%mm4 - movq %mm1,%mm3 - movq %mm5,%mm7 - pshufw $177,%mm1,%mm2 - pshufw $177,%mm5,%mm6 - pxor %mm2,%mm0 - pxor %mm6,%mm4 - pslld $8,%mm1 - pslld $8,%mm5 - psrld $8,%mm3 - psrld $8,%mm7 - movq (%edi),%mm2 - movq 8(%edi),%mm6 - pxor %mm1,%mm0 - pxor %mm5,%mm4 - pxor %mm3,%mm0 - pxor %mm7,%mm4 - movl -128(%ebp),%eax - pslld $16,%mm1 - pslld $16,%mm5 - movl -64(%ebp),%ebx - psrld $16,%mm3 - psrld $16,%mm7 - movl (%ebp),%ecx - pxor %mm1,%mm0 - pxor %mm5,%mm4 - movl 64(%ebp),%edx - pxor %mm3,%mm0 - pxor %mm7,%mm4 - pxor %mm2,%mm0 - pxor %mm6,%mm4 - jmp .L007loop -.align 16 -.L008out: - pxor (%edi),%mm0 - pxor 8(%edi),%mm4 - ret -.size _sse_AES_decrypt_compact,.-_sse_AES_decrypt_compact -.hidden _x86_AES_decrypt -.type _x86_AES_decrypt,@function -.align 16 -_x86_AES_decrypt: - movl %edi,20(%esp) - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - movl 240(%edi),%esi - leal -2(%esi,%esi,1),%esi - leal (%edi,%esi,8),%esi - movl %esi,24(%esp) -.align 16 -.L009loop: - movl %eax,%esi - andl $255,%esi - movl (%ebp,%esi,8),%esi - movzbl %dh,%edi - xorl 3(%ebp,%edi,8),%esi - movl %ecx,%edi - shrl $16,%edi - andl $255,%edi - xorl 2(%ebp,%edi,8),%esi - movl %ebx,%edi - shrl $24,%edi - xorl 1(%ebp,%edi,8),%esi - movl %esi,4(%esp) - - movl %ebx,%esi - andl $255,%esi - movl (%ebp,%esi,8),%esi - movzbl %ah,%edi - xorl 3(%ebp,%edi,8),%esi - movl %edx,%edi - shrl $16,%edi - andl $255,%edi - xorl 2(%ebp,%edi,8),%esi - movl %ecx,%edi - shrl $24,%edi - xorl 1(%ebp,%edi,8),%esi - movl %esi,8(%esp) - - movl %ecx,%esi - andl $255,%esi - movl (%ebp,%esi,8),%esi - movzbl %bh,%edi - xorl 3(%ebp,%edi,8),%esi - movl %eax,%edi - shrl $16,%edi - andl $255,%edi - xorl 2(%ebp,%edi,8),%esi - movl %edx,%edi - shrl $24,%edi - xorl 1(%ebp,%edi,8),%esi - - movl 20(%esp),%edi - andl $255,%edx - movl (%ebp,%edx,8),%edx - movzbl %ch,%ecx - xorl 3(%ebp,%ecx,8),%edx - movl %esi,%ecx - shrl $16,%ebx - andl $255,%ebx - xorl 2(%ebp,%ebx,8),%edx - movl 8(%esp),%ebx - shrl $24,%eax - xorl 1(%ebp,%eax,8),%edx - movl 4(%esp),%eax - - addl $16,%edi - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - cmpl 24(%esp),%edi - movl %edi,20(%esp) - jb .L009loop - leal 2176(%ebp),%ebp - movl -128(%ebp),%edi - movl -96(%ebp),%esi - movl -64(%ebp),%edi - movl -32(%ebp),%esi - movl (%ebp),%edi - movl 32(%ebp),%esi - movl 64(%ebp),%edi - movl 96(%ebp),%esi - leal -128(%ebp),%ebp - movl %eax,%esi - andl $255,%esi - movzbl (%ebp,%esi,1),%esi - movzbl %dh,%edi - movzbl (%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %ecx,%edi - shrl $16,%edi - andl $255,%edi - movzbl (%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %ebx,%edi - shrl $24,%edi - movzbl (%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,4(%esp) - movl %ebx,%esi - andl $255,%esi - movzbl (%ebp,%esi,1),%esi - movzbl %ah,%edi - movzbl (%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $16,%edi - andl $255,%edi - movzbl (%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %ecx,%edi - shrl $24,%edi - movzbl (%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,8(%esp) - movl %ecx,%esi - andl $255,%esi - movzbl (%ebp,%esi,1),%esi - movzbl %bh,%edi - movzbl (%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %eax,%edi - shrl $16,%edi - andl $255,%edi - movzbl (%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $24,%edi - movzbl (%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl 20(%esp),%edi - andl $255,%edx - movzbl (%ebp,%edx,1),%edx - movzbl %ch,%ecx - movzbl (%ebp,%ecx,1),%ecx - shll $8,%ecx - xorl %ecx,%edx - movl %esi,%ecx - shrl $16,%ebx - andl $255,%ebx - movzbl (%ebp,%ebx,1),%ebx - shll $16,%ebx - xorl %ebx,%edx - movl 8(%esp),%ebx - shrl $24,%eax - movzbl (%ebp,%eax,1),%eax - shll $24,%eax - xorl %eax,%edx - movl 4(%esp),%eax - leal -2048(%ebp),%ebp - addl $16,%edi - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - ret -.align 64 -.LAES_Td: -.long 1353184337,1353184337 -.long 1399144830,1399144830 -.long 3282310938,3282310938 -.long 2522752826,2522752826 -.long 3412831035,3412831035 -.long 4047871263,4047871263 -.long 2874735276,2874735276 -.long 2466505547,2466505547 -.long 1442459680,1442459680 -.long 4134368941,4134368941 -.long 2440481928,2440481928 -.long 625738485,625738485 -.long 4242007375,4242007375 -.long 3620416197,3620416197 -.long 2151953702,2151953702 -.long 2409849525,2409849525 -.long 1230680542,1230680542 -.long 1729870373,1729870373 -.long 2551114309,2551114309 -.long 3787521629,3787521629 -.long 41234371,41234371 -.long 317738113,317738113 -.long 2744600205,2744600205 -.long 3338261355,3338261355 -.long 3881799427,3881799427 -.long 2510066197,2510066197 -.long 3950669247,3950669247 -.long 3663286933,3663286933 -.long 763608788,763608788 -.long 3542185048,3542185048 -.long 694804553,694804553 -.long 1154009486,1154009486 -.long 1787413109,1787413109 -.long 2021232372,2021232372 -.long 1799248025,1799248025 -.long 3715217703,3715217703 -.long 3058688446,3058688446 -.long 397248752,397248752 -.long 1722556617,1722556617 -.long 3023752829,3023752829 -.long 407560035,407560035 -.long 2184256229,2184256229 -.long 1613975959,1613975959 -.long 1165972322,1165972322 -.long 3765920945,3765920945 -.long 2226023355,2226023355 -.long 480281086,480281086 -.long 2485848313,2485848313 -.long 1483229296,1483229296 -.long 436028815,436028815 -.long 2272059028,2272059028 -.long 3086515026,3086515026 -.long 601060267,601060267 -.long 3791801202,3791801202 -.long 1468997603,1468997603 -.long 715871590,715871590 -.long 120122290,120122290 -.long 63092015,63092015 -.long 2591802758,2591802758 -.long 2768779219,2768779219 -.long 4068943920,4068943920 -.long 2997206819,2997206819 -.long 3127509762,3127509762 -.long 1552029421,1552029421 -.long 723308426,723308426 -.long 2461301159,2461301159 -.long 4042393587,4042393587 -.long 2715969870,2715969870 -.long 3455375973,3455375973 -.long 3586000134,3586000134 -.long 526529745,526529745 -.long 2331944644,2331944644 -.long 2639474228,2639474228 -.long 2689987490,2689987490 -.long 853641733,853641733 -.long 1978398372,1978398372 -.long 971801355,971801355 -.long 2867814464,2867814464 -.long 111112542,111112542 -.long 1360031421,1360031421 -.long 4186579262,4186579262 -.long 1023860118,1023860118 -.long 2919579357,2919579357 -.long 1186850381,1186850381 -.long 3045938321,3045938321 -.long 90031217,90031217 -.long 1876166148,1876166148 -.long 4279586912,4279586912 -.long 620468249,620468249 -.long 2548678102,2548678102 -.long 3426959497,3426959497 -.long 2006899047,2006899047 -.long 3175278768,3175278768 -.long 2290845959,2290845959 -.long 945494503,945494503 -.long 3689859193,3689859193 -.long 1191869601,1191869601 -.long 3910091388,3910091388 -.long 3374220536,3374220536 -.long 0,0 -.long 2206629897,2206629897 -.long 1223502642,1223502642 -.long 2893025566,2893025566 -.long 1316117100,1316117100 -.long 4227796733,4227796733 -.long 1446544655,1446544655 -.long 517320253,517320253 -.long 658058550,658058550 -.long 1691946762,1691946762 -.long 564550760,564550760 -.long 3511966619,3511966619 -.long 976107044,976107044 -.long 2976320012,2976320012 -.long 266819475,266819475 -.long 3533106868,3533106868 -.long 2660342555,2660342555 -.long 1338359936,1338359936 -.long 2720062561,2720062561 -.long 1766553434,1766553434 -.long 370807324,370807324 -.long 179999714,179999714 -.long 3844776128,3844776128 -.long 1138762300,1138762300 -.long 488053522,488053522 -.long 185403662,185403662 -.long 2915535858,2915535858 -.long 3114841645,3114841645 -.long 3366526484,3366526484 -.long 2233069911,2233069911 -.long 1275557295,1275557295 -.long 3151862254,3151862254 -.long 4250959779,4250959779 -.long 2670068215,2670068215 -.long 3170202204,3170202204 -.long 3309004356,3309004356 -.long 880737115,880737115 -.long 1982415755,1982415755 -.long 3703972811,3703972811 -.long 1761406390,1761406390 -.long 1676797112,1676797112 -.long 3403428311,3403428311 -.long 277177154,277177154 -.long 1076008723,1076008723 -.long 538035844,538035844 -.long 2099530373,2099530373 -.long 4164795346,4164795346 -.long 288553390,288553390 -.long 1839278535,1839278535 -.long 1261411869,1261411869 -.long 4080055004,4080055004 -.long 3964831245,3964831245 -.long 3504587127,3504587127 -.long 1813426987,1813426987 -.long 2579067049,2579067049 -.long 4199060497,4199060497 -.long 577038663,577038663 -.long 3297574056,3297574056 -.long 440397984,440397984 -.long 3626794326,3626794326 -.long 4019204898,4019204898 -.long 3343796615,3343796615 -.long 3251714265,3251714265 -.long 4272081548,4272081548 -.long 906744984,906744984 -.long 3481400742,3481400742 -.long 685669029,685669029 -.long 646887386,646887386 -.long 2764025151,2764025151 -.long 3835509292,3835509292 -.long 227702864,227702864 -.long 2613862250,2613862250 -.long 1648787028,1648787028 -.long 3256061430,3256061430 -.long 3904428176,3904428176 -.long 1593260334,1593260334 -.long 4121936770,4121936770 -.long 3196083615,3196083615 -.long 2090061929,2090061929 -.long 2838353263,2838353263 -.long 3004310991,3004310991 -.long 999926984,999926984 -.long 2809993232,2809993232 -.long 1852021992,1852021992 -.long 2075868123,2075868123 -.long 158869197,158869197 -.long 4095236462,4095236462 -.long 28809964,28809964 -.long 2828685187,2828685187 -.long 1701746150,1701746150 -.long 2129067946,2129067946 -.long 147831841,147831841 -.long 3873969647,3873969647 -.long 3650873274,3650873274 -.long 3459673930,3459673930 -.long 3557400554,3557400554 -.long 3598495785,3598495785 -.long 2947720241,2947720241 -.long 824393514,824393514 -.long 815048134,815048134 -.long 3227951669,3227951669 -.long 935087732,935087732 -.long 2798289660,2798289660 -.long 2966458592,2966458592 -.long 366520115,366520115 -.long 1251476721,1251476721 -.long 4158319681,4158319681 -.long 240176511,240176511 -.long 804688151,804688151 -.long 2379631990,2379631990 -.long 1303441219,1303441219 -.long 1414376140,1414376140 -.long 3741619940,3741619940 -.long 3820343710,3820343710 -.long 461924940,461924940 -.long 3089050817,3089050817 -.long 2136040774,2136040774 -.long 82468509,82468509 -.long 1563790337,1563790337 -.long 1937016826,1937016826 -.long 776014843,776014843 -.long 1511876531,1511876531 -.long 1389550482,1389550482 -.long 861278441,861278441 -.long 323475053,323475053 -.long 2355222426,2355222426 -.long 2047648055,2047648055 -.long 2383738969,2383738969 -.long 2302415851,2302415851 -.long 3995576782,3995576782 -.long 902390199,902390199 -.long 3991215329,3991215329 -.long 1018251130,1018251130 -.long 1507840668,1507840668 -.long 1064563285,1064563285 -.long 2043548696,2043548696 -.long 3208103795,3208103795 -.long 3939366739,3939366739 -.long 1537932639,1537932639 -.long 342834655,342834655 -.long 2262516856,2262516856 -.long 2180231114,2180231114 -.long 1053059257,1053059257 -.long 741614648,741614648 -.long 1598071746,1598071746 -.long 1925389590,1925389590 -.long 203809468,203809468 -.long 2336832552,2336832552 -.long 1100287487,1100287487 -.long 1895934009,1895934009 -.long 3736275976,3736275976 -.long 2632234200,2632234200 -.long 2428589668,2428589668 -.long 1636092795,1636092795 -.long 1890988757,1890988757 -.long 1952214088,1952214088 -.long 1113045200,1113045200 -.byte 82,9,106,213,48,54,165,56 -.byte 191,64,163,158,129,243,215,251 -.byte 124,227,57,130,155,47,255,135 -.byte 52,142,67,68,196,222,233,203 -.byte 84,123,148,50,166,194,35,61 -.byte 238,76,149,11,66,250,195,78 -.byte 8,46,161,102,40,217,36,178 -.byte 118,91,162,73,109,139,209,37 -.byte 114,248,246,100,134,104,152,22 -.byte 212,164,92,204,93,101,182,146 -.byte 108,112,72,80,253,237,185,218 -.byte 94,21,70,87,167,141,157,132 -.byte 144,216,171,0,140,188,211,10 -.byte 247,228,88,5,184,179,69,6 -.byte 208,44,30,143,202,63,15,2 -.byte 193,175,189,3,1,19,138,107 -.byte 58,145,17,65,79,103,220,234 -.byte 151,242,207,206,240,180,230,115 -.byte 150,172,116,34,231,173,53,133 -.byte 226,249,55,232,28,117,223,110 -.byte 71,241,26,113,29,41,197,137 -.byte 111,183,98,14,170,24,190,27 -.byte 252,86,62,75,198,210,121,32 -.byte 154,219,192,254,120,205,90,244 -.byte 31,221,168,51,136,7,199,49 -.byte 177,18,16,89,39,128,236,95 -.byte 96,81,127,169,25,181,74,13 -.byte 45,229,122,159,147,201,156,239 -.byte 160,224,59,77,174,42,245,176 -.byte 200,235,187,60,131,83,153,97 -.byte 23,43,4,126,186,119,214,38 -.byte 225,105,20,99,85,33,12,125 -.byte 82,9,106,213,48,54,165,56 -.byte 191,64,163,158,129,243,215,251 -.byte 124,227,57,130,155,47,255,135 -.byte 52,142,67,68,196,222,233,203 -.byte 84,123,148,50,166,194,35,61 -.byte 238,76,149,11,66,250,195,78 -.byte 8,46,161,102,40,217,36,178 -.byte 118,91,162,73,109,139,209,37 -.byte 114,248,246,100,134,104,152,22 -.byte 212,164,92,204,93,101,182,146 -.byte 108,112,72,80,253,237,185,218 -.byte 94,21,70,87,167,141,157,132 -.byte 144,216,171,0,140,188,211,10 -.byte 247,228,88,5,184,179,69,6 -.byte 208,44,30,143,202,63,15,2 -.byte 193,175,189,3,1,19,138,107 -.byte 58,145,17,65,79,103,220,234 -.byte 151,242,207,206,240,180,230,115 -.byte 150,172,116,34,231,173,53,133 -.byte 226,249,55,232,28,117,223,110 -.byte 71,241,26,113,29,41,197,137 -.byte 111,183,98,14,170,24,190,27 -.byte 252,86,62,75,198,210,121,32 -.byte 154,219,192,254,120,205,90,244 -.byte 31,221,168,51,136,7,199,49 -.byte 177,18,16,89,39,128,236,95 -.byte 96,81,127,169,25,181,74,13 -.byte 45,229,122,159,147,201,156,239 -.byte 160,224,59,77,174,42,245,176 -.byte 200,235,187,60,131,83,153,97 -.byte 23,43,4,126,186,119,214,38 -.byte 225,105,20,99,85,33,12,125 -.byte 82,9,106,213,48,54,165,56 -.byte 191,64,163,158,129,243,215,251 -.byte 124,227,57,130,155,47,255,135 -.byte 52,142,67,68,196,222,233,203 -.byte 84,123,148,50,166,194,35,61 -.byte 238,76,149,11,66,250,195,78 -.byte 8,46,161,102,40,217,36,178 -.byte 118,91,162,73,109,139,209,37 -.byte 114,248,246,100,134,104,152,22 -.byte 212,164,92,204,93,101,182,146 -.byte 108,112,72,80,253,237,185,218 -.byte 94,21,70,87,167,141,157,132 -.byte 144,216,171,0,140,188,211,10 -.byte 247,228,88,5,184,179,69,6 -.byte 208,44,30,143,202,63,15,2 -.byte 193,175,189,3,1,19,138,107 -.byte 58,145,17,65,79,103,220,234 -.byte 151,242,207,206,240,180,230,115 -.byte 150,172,116,34,231,173,53,133 -.byte 226,249,55,232,28,117,223,110 -.byte 71,241,26,113,29,41,197,137 -.byte 111,183,98,14,170,24,190,27 -.byte 252,86,62,75,198,210,121,32 -.byte 154,219,192,254,120,205,90,244 -.byte 31,221,168,51,136,7,199,49 -.byte 177,18,16,89,39,128,236,95 -.byte 96,81,127,169,25,181,74,13 -.byte 45,229,122,159,147,201,156,239 -.byte 160,224,59,77,174,42,245,176 -.byte 200,235,187,60,131,83,153,97 -.byte 23,43,4,126,186,119,214,38 -.byte 225,105,20,99,85,33,12,125 -.byte 82,9,106,213,48,54,165,56 -.byte 191,64,163,158,129,243,215,251 -.byte 124,227,57,130,155,47,255,135 -.byte 52,142,67,68,196,222,233,203 -.byte 84,123,148,50,166,194,35,61 -.byte 238,76,149,11,66,250,195,78 -.byte 8,46,161,102,40,217,36,178 -.byte 118,91,162,73,109,139,209,37 -.byte 114,248,246,100,134,104,152,22 -.byte 212,164,92,204,93,101,182,146 -.byte 108,112,72,80,253,237,185,218 -.byte 94,21,70,87,167,141,157,132 -.byte 144,216,171,0,140,188,211,10 -.byte 247,228,88,5,184,179,69,6 -.byte 208,44,30,143,202,63,15,2 -.byte 193,175,189,3,1,19,138,107 -.byte 58,145,17,65,79,103,220,234 -.byte 151,242,207,206,240,180,230,115 -.byte 150,172,116,34,231,173,53,133 -.byte 226,249,55,232,28,117,223,110 -.byte 71,241,26,113,29,41,197,137 -.byte 111,183,98,14,170,24,190,27 -.byte 252,86,62,75,198,210,121,32 -.byte 154,219,192,254,120,205,90,244 -.byte 31,221,168,51,136,7,199,49 -.byte 177,18,16,89,39,128,236,95 -.byte 96,81,127,169,25,181,74,13 -.byte 45,229,122,159,147,201,156,239 -.byte 160,224,59,77,174,42,245,176 -.byte 200,235,187,60,131,83,153,97 -.byte 23,43,4,126,186,119,214,38 -.byte 225,105,20,99,85,33,12,125 -.size _x86_AES_decrypt,.-_x86_AES_decrypt -.globl asm_AES_decrypt -.hidden asm_AES_decrypt -.type asm_AES_decrypt,@function -.align 16 -asm_AES_decrypt: -.L_asm_AES_decrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl 28(%esp),%edi - movl %esp,%eax - subl $36,%esp - andl $-64,%esp - leal -127(%edi),%ebx - subl %esp,%ebx - negl %ebx - andl $960,%ebx - subl %ebx,%esp - addl $4,%esp - movl %eax,28(%esp) - call .L010pic_point -.L010pic_point: - popl %ebp - leal OPENSSL_ia32cap_P-.L010pic_point(%ebp),%eax - leal .LAES_Td-.L010pic_point(%ebp),%ebp - leal 764(%esp),%ebx - subl %ebp,%ebx - andl $768,%ebx - leal 2176(%ebp,%ebx,1),%ebp - btl $25,(%eax) - jnc .L011x86 - movq (%esi),%mm0 - movq 8(%esi),%mm4 - call _sse_AES_decrypt_compact - movl 28(%esp),%esp - movl 24(%esp),%esi - movq %mm0,(%esi) - movq %mm4,8(%esi) - emms - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.align 16 -.L011x86: - movl %ebp,24(%esp) - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - call _x86_AES_decrypt_compact - movl 28(%esp),%esp - movl 24(%esp),%esi - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %ecx,8(%esi) - movl %edx,12(%esi) - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size asm_AES_decrypt,.-.L_asm_AES_decrypt_begin -.globl asm_AES_cbc_encrypt -.hidden asm_AES_cbc_encrypt -.type asm_AES_cbc_encrypt,@function -.align 16 -asm_AES_cbc_encrypt: -.L_asm_AES_cbc_encrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 28(%esp),%ecx - cmpl $0,%ecx - je .L012drop_out - call .L013pic_point -.L013pic_point: - popl %ebp - leal OPENSSL_ia32cap_P-.L013pic_point(%ebp),%eax - cmpl $0,40(%esp) - leal .LAES_Te-.L013pic_point(%ebp),%ebp - jne .L014picked_te - leal .LAES_Td-.LAES_Te(%ebp),%ebp -.L014picked_te: - pushfl - cld - cmpl $512,%ecx - jb .L015slow_way - testl $15,%ecx - jnz .L015slow_way - btl $28,(%eax) - jc .L015slow_way - leal -324(%esp),%esi - andl $-64,%esi - movl %ebp,%eax - leal 2304(%ebp),%ebx - movl %esi,%edx - andl $4095,%eax - andl $4095,%ebx - andl $4095,%edx - cmpl %ebx,%edx - jb .L016tbl_break_out - subl %ebx,%edx - subl %edx,%esi - jmp .L017tbl_ok -.align 4 -.L016tbl_break_out: - subl %eax,%edx - andl $4095,%edx - addl $384,%edx - subl %edx,%esi -.align 4 -.L017tbl_ok: - leal 24(%esp),%edx - xchgl %esi,%esp - addl $4,%esp - movl %ebp,24(%esp) - movl %esi,28(%esp) - movl (%edx),%eax - movl 4(%edx),%ebx - movl 12(%edx),%edi - movl 16(%edx),%esi - movl 20(%edx),%edx - movl %eax,32(%esp) - movl %ebx,36(%esp) - movl %ecx,40(%esp) - movl %edi,44(%esp) - movl %esi,48(%esp) - movl $0,316(%esp) - movl %edi,%ebx - movl $61,%ecx - subl %ebp,%ebx - movl %edi,%esi - andl $4095,%ebx - leal 76(%esp),%edi - cmpl $2304,%ebx - jb .L018do_copy - cmpl $3852,%ebx - jb .L019skip_copy -.align 4 -.L018do_copy: - movl %edi,44(%esp) -.long 2784229001 -.L019skip_copy: - movl $16,%edi -.align 4 -.L020prefetch_tbl: - movl (%ebp),%eax - movl 32(%ebp),%ebx - movl 64(%ebp),%ecx - movl 96(%ebp),%esi - leal 128(%ebp),%ebp - subl $1,%edi - jnz .L020prefetch_tbl - subl $2048,%ebp - movl 32(%esp),%esi - movl 48(%esp),%edi - cmpl $0,%edx - je .L021fast_decrypt - movl (%edi),%eax - movl 4(%edi),%ebx -.align 16 -.L022fast_enc_loop: - movl 8(%edi),%ecx - movl 12(%edi),%edx - xorl (%esi),%eax - xorl 4(%esi),%ebx - xorl 8(%esi),%ecx - xorl 12(%esi),%edx - movl 44(%esp),%edi - call _x86_AES_encrypt - movl 32(%esp),%esi - movl 36(%esp),%edi - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - leal 16(%esi),%esi - movl 40(%esp),%ecx - movl %esi,32(%esp) - leal 16(%edi),%edx - movl %edx,36(%esp) - subl $16,%ecx - movl %ecx,40(%esp) - jnz .L022fast_enc_loop - movl 48(%esp),%esi - movl 8(%edi),%ecx - movl 12(%edi),%edx - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %ecx,8(%esi) - movl %edx,12(%esi) - cmpl $0,316(%esp) - movl 44(%esp),%edi - je .L023skip_ezero - movl $60,%ecx - xorl %eax,%eax -.align 4 -.long 2884892297 -.L023skip_ezero: - movl 28(%esp),%esp - popfl -.L012drop_out: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret - pushfl -.align 16 -.L021fast_decrypt: - cmpl 36(%esp),%esi - je .L024fast_dec_in_place - movl %edi,52(%esp) -.align 4 -.align 16 -.L025fast_dec_loop: - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - movl 44(%esp),%edi - call _x86_AES_decrypt - movl 52(%esp),%edi - movl 40(%esp),%esi - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - movl 36(%esp),%edi - movl 32(%esp),%esi - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - movl 40(%esp),%ecx - movl %esi,52(%esp) - leal 16(%esi),%esi - movl %esi,32(%esp) - leal 16(%edi),%edi - movl %edi,36(%esp) - subl $16,%ecx - movl %ecx,40(%esp) - jnz .L025fast_dec_loop - movl 52(%esp),%edi - movl 48(%esp),%esi - movl (%edi),%eax - movl 4(%edi),%ebx - movl 8(%edi),%ecx - movl 12(%edi),%edx - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %ecx,8(%esi) - movl %edx,12(%esi) - jmp .L026fast_dec_out -.align 16 -.L024fast_dec_in_place: -.L027fast_dec_in_place_loop: - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - leal 60(%esp),%edi - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - movl 44(%esp),%edi - call _x86_AES_decrypt - movl 48(%esp),%edi - movl 36(%esp),%esi - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %ecx,8(%esi) - movl %edx,12(%esi) - leal 16(%esi),%esi - movl %esi,36(%esp) - leal 60(%esp),%esi - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - movl 32(%esp),%esi - movl 40(%esp),%ecx - leal 16(%esi),%esi - movl %esi,32(%esp) - subl $16,%ecx - movl %ecx,40(%esp) - jnz .L027fast_dec_in_place_loop -.align 4 -.L026fast_dec_out: - cmpl $0,316(%esp) - movl 44(%esp),%edi - je .L028skip_dzero - movl $60,%ecx - xorl %eax,%eax -.align 4 -.long 2884892297 -.L028skip_dzero: - movl 28(%esp),%esp - popfl - popl %edi - popl %esi - popl %ebx - popl %ebp - ret - pushfl -.align 16 -.L015slow_way: - movl (%eax),%eax - movl 36(%esp),%edi - leal -80(%esp),%esi - andl $-64,%esi - leal -143(%edi),%ebx - subl %esi,%ebx - negl %ebx - andl $960,%ebx - subl %ebx,%esi - leal 768(%esi),%ebx - subl %ebp,%ebx - andl $768,%ebx - leal 2176(%ebp,%ebx,1),%ebp - leal 24(%esp),%edx - xchgl %esi,%esp - addl $4,%esp - movl %ebp,24(%esp) - movl %esi,28(%esp) - movl %eax,52(%esp) - movl (%edx),%eax - movl 4(%edx),%ebx - movl 16(%edx),%esi - movl 20(%edx),%edx - movl %eax,32(%esp) - movl %ebx,36(%esp) - movl %ecx,40(%esp) - movl %edi,44(%esp) - movl %esi,48(%esp) - movl %esi,%edi - movl %eax,%esi - cmpl $0,%edx - je .L029slow_decrypt - cmpl $16,%ecx - movl %ebx,%edx - jb .L030slow_enc_tail - btl $25,52(%esp) - jnc .L031slow_enc_x86 - movq (%edi),%mm0 - movq 8(%edi),%mm4 -.align 16 -.L032slow_enc_loop_sse: - pxor (%esi),%mm0 - pxor 8(%esi),%mm4 - movl 44(%esp),%edi - call _sse_AES_encrypt_compact - movl 32(%esp),%esi - movl 36(%esp),%edi - movl 40(%esp),%ecx - movq %mm0,(%edi) - movq %mm4,8(%edi) - leal 16(%esi),%esi - movl %esi,32(%esp) - leal 16(%edi),%edx - movl %edx,36(%esp) - subl $16,%ecx - cmpl $16,%ecx - movl %ecx,40(%esp) - jae .L032slow_enc_loop_sse - testl $15,%ecx - jnz .L030slow_enc_tail - movl 48(%esp),%esi - movq %mm0,(%esi) - movq %mm4,8(%esi) - emms - movl 28(%esp),%esp - popfl - popl %edi - popl %esi - popl %ebx - popl %ebp - ret - pushfl -.align 16 -.L031slow_enc_x86: - movl (%edi),%eax - movl 4(%edi),%ebx -.align 4 -.L033slow_enc_loop_x86: - movl 8(%edi),%ecx - movl 12(%edi),%edx - xorl (%esi),%eax - xorl 4(%esi),%ebx - xorl 8(%esi),%ecx - xorl 12(%esi),%edx - movl 44(%esp),%edi - call _x86_AES_encrypt_compact - movl 32(%esp),%esi - movl 36(%esp),%edi - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - movl 40(%esp),%ecx - leal 16(%esi),%esi - movl %esi,32(%esp) - leal 16(%edi),%edx - movl %edx,36(%esp) - subl $16,%ecx - cmpl $16,%ecx - movl %ecx,40(%esp) - jae .L033slow_enc_loop_x86 - testl $15,%ecx - jnz .L030slow_enc_tail - movl 48(%esp),%esi - movl 8(%edi),%ecx - movl 12(%edi),%edx - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %ecx,8(%esi) - movl %edx,12(%esi) - movl 28(%esp),%esp - popfl - popl %edi - popl %esi - popl %ebx - popl %ebp - ret - pushfl -.align 16 -.L030slow_enc_tail: - emms - movl %edx,%edi - movl $16,%ebx - subl %ecx,%ebx - cmpl %esi,%edi - je .L034enc_in_place -.align 4 -.long 2767451785 - jmp .L035enc_skip_in_place -.L034enc_in_place: - leal (%edi,%ecx,1),%edi -.L035enc_skip_in_place: - movl %ebx,%ecx - xorl %eax,%eax -.align 4 -.long 2868115081 - movl 48(%esp),%edi - movl %edx,%esi - movl (%edi),%eax - movl 4(%edi),%ebx - movl $16,40(%esp) - jmp .L033slow_enc_loop_x86 -.align 16 -.L029slow_decrypt: - btl $25,52(%esp) - jnc .L036slow_dec_loop_x86 -.align 4 -.L037slow_dec_loop_sse: - movq (%esi),%mm0 - movq 8(%esi),%mm4 - movl 44(%esp),%edi - call _sse_AES_decrypt_compact - movl 32(%esp),%esi - leal 60(%esp),%eax - movl 36(%esp),%ebx - movl 40(%esp),%ecx - movl 48(%esp),%edi - movq (%esi),%mm1 - movq 8(%esi),%mm5 - pxor (%edi),%mm0 - pxor 8(%edi),%mm4 - movq %mm1,(%edi) - movq %mm5,8(%edi) - subl $16,%ecx - jc .L038slow_dec_partial_sse - movq %mm0,(%ebx) - movq %mm4,8(%ebx) - leal 16(%ebx),%ebx - movl %ebx,36(%esp) - leal 16(%esi),%esi - movl %esi,32(%esp) - movl %ecx,40(%esp) - jnz .L037slow_dec_loop_sse - emms - movl 28(%esp),%esp - popfl - popl %edi - popl %esi - popl %ebx - popl %ebp - ret - pushfl -.align 16 -.L038slow_dec_partial_sse: - movq %mm0,(%eax) - movq %mm4,8(%eax) - emms - addl $16,%ecx - movl %ebx,%edi - movl %eax,%esi -.align 4 -.long 2767451785 - movl 28(%esp),%esp - popfl - popl %edi - popl %esi - popl %ebx - popl %ebp - ret - pushfl -.align 16 -.L036slow_dec_loop_x86: - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - leal 60(%esp),%edi - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - movl 44(%esp),%edi - call _x86_AES_decrypt_compact - movl 48(%esp),%edi - movl 40(%esp),%esi - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - subl $16,%esi - jc .L039slow_dec_partial_x86 - movl %esi,40(%esp) - movl 36(%esp),%esi - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %ecx,8(%esi) - movl %edx,12(%esi) - leal 16(%esi),%esi - movl %esi,36(%esp) - leal 60(%esp),%esi - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - movl 32(%esp),%esi - leal 16(%esi),%esi - movl %esi,32(%esp) - jnz .L036slow_dec_loop_x86 - movl 28(%esp),%esp - popfl - popl %edi - popl %esi - popl %ebx - popl %ebp - ret - pushfl -.align 16 -.L039slow_dec_partial_x86: - leal 60(%esp),%esi - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %ecx,8(%esi) - movl %edx,12(%esi) - movl 32(%esp),%esi - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - movl 40(%esp),%ecx - movl 36(%esp),%edi - leal 60(%esp),%esi -.align 4 -.long 2767451785 - movl 28(%esp),%esp - popfl - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size asm_AES_cbc_encrypt,.-.L_asm_AES_cbc_encrypt_begin -.hidden _x86_AES_set_encrypt_key -.type _x86_AES_set_encrypt_key,@function -.align 16 -_x86_AES_set_encrypt_key: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 24(%esp),%esi - movl 32(%esp),%edi - testl $-1,%esi - jz .L040badpointer - testl $-1,%edi - jz .L040badpointer - call .L041pic_point -.L041pic_point: - popl %ebp - leal .LAES_Te-.L041pic_point(%ebp),%ebp - leal 2176(%ebp),%ebp - movl -128(%ebp),%eax - movl -96(%ebp),%ebx - movl -64(%ebp),%ecx - movl -32(%ebp),%edx - movl (%ebp),%eax - movl 32(%ebp),%ebx - movl 64(%ebp),%ecx - movl 96(%ebp),%edx - movl 28(%esp),%ecx - cmpl $128,%ecx - je .L04210rounds - cmpl $192,%ecx - je .L04312rounds - cmpl $256,%ecx - je .L04414rounds - movl $-2,%eax - jmp .L045exit -.L04210rounds: - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - xorl %ecx,%ecx - jmp .L04610shortcut -.align 4 -.L04710loop: - movl (%edi),%eax - movl 12(%edi),%edx -.L04610shortcut: - movzbl %dl,%esi - movzbl -128(%ebp,%esi,1),%ebx - movzbl %dh,%esi - shll $24,%ebx - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - shrl $16,%edx - movzbl %dl,%esi - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - movzbl %dh,%esi - shll $8,%ebx - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - shll $16,%ebx - xorl %ebx,%eax - xorl 896(%ebp,%ecx,4),%eax - movl %eax,16(%edi) - xorl 4(%edi),%eax - movl %eax,20(%edi) - xorl 8(%edi),%eax - movl %eax,24(%edi) - xorl 12(%edi),%eax - movl %eax,28(%edi) - incl %ecx - addl $16,%edi - cmpl $10,%ecx - jl .L04710loop - movl $10,80(%edi) - xorl %eax,%eax - jmp .L045exit -.L04312rounds: - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - movl 16(%esi),%ecx - movl 20(%esi),%edx - movl %ecx,16(%edi) - movl %edx,20(%edi) - xorl %ecx,%ecx - jmp .L04812shortcut -.align 4 -.L04912loop: - movl (%edi),%eax - movl 20(%edi),%edx -.L04812shortcut: - movzbl %dl,%esi - movzbl -128(%ebp,%esi,1),%ebx - movzbl %dh,%esi - shll $24,%ebx - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - shrl $16,%edx - movzbl %dl,%esi - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - movzbl %dh,%esi - shll $8,%ebx - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - shll $16,%ebx - xorl %ebx,%eax - xorl 896(%ebp,%ecx,4),%eax - movl %eax,24(%edi) - xorl 4(%edi),%eax - movl %eax,28(%edi) - xorl 8(%edi),%eax - movl %eax,32(%edi) - xorl 12(%edi),%eax - movl %eax,36(%edi) - cmpl $7,%ecx - je .L05012break - incl %ecx - xorl 16(%edi),%eax - movl %eax,40(%edi) - xorl 20(%edi),%eax - movl %eax,44(%edi) - addl $24,%edi - jmp .L04912loop -.L05012break: - movl $12,72(%edi) - xorl %eax,%eax - jmp .L045exit -.L04414rounds: - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - movl 16(%esi),%eax - movl 20(%esi),%ebx - movl 24(%esi),%ecx - movl 28(%esi),%edx - movl %eax,16(%edi) - movl %ebx,20(%edi) - movl %ecx,24(%edi) - movl %edx,28(%edi) - xorl %ecx,%ecx - jmp .L05114shortcut -.align 4 -.L05214loop: - movl 28(%edi),%edx -.L05114shortcut: - movl (%edi),%eax - movzbl %dl,%esi - movzbl -128(%ebp,%esi,1),%ebx - movzbl %dh,%esi - shll $24,%ebx - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - shrl $16,%edx - movzbl %dl,%esi - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - movzbl %dh,%esi - shll $8,%ebx - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - shll $16,%ebx - xorl %ebx,%eax - xorl 896(%ebp,%ecx,4),%eax - movl %eax,32(%edi) - xorl 4(%edi),%eax - movl %eax,36(%edi) - xorl 8(%edi),%eax - movl %eax,40(%edi) - xorl 12(%edi),%eax - movl %eax,44(%edi) - cmpl $6,%ecx - je .L05314break - incl %ecx - movl %eax,%edx - movl 16(%edi),%eax - movzbl %dl,%esi - movzbl -128(%ebp,%esi,1),%ebx - movzbl %dh,%esi - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - shrl $16,%edx - shll $8,%ebx - movzbl %dl,%esi - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - movzbl %dh,%esi - shll $16,%ebx - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - shll $24,%ebx - xorl %ebx,%eax - movl %eax,48(%edi) - xorl 20(%edi),%eax - movl %eax,52(%edi) - xorl 24(%edi),%eax - movl %eax,56(%edi) - xorl 28(%edi),%eax - movl %eax,60(%edi) - addl $32,%edi - jmp .L05214loop -.L05314break: - movl $14,48(%edi) - xorl %eax,%eax - jmp .L045exit -.L040badpointer: - movl $-1,%eax -.L045exit: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size _x86_AES_set_encrypt_key,.-_x86_AES_set_encrypt_key -.globl asm_AES_set_encrypt_key -.hidden asm_AES_set_encrypt_key -.type asm_AES_set_encrypt_key,@function -.align 16 -asm_AES_set_encrypt_key: -.L_asm_AES_set_encrypt_key_begin: - call _x86_AES_set_encrypt_key - ret -.size asm_AES_set_encrypt_key,.-.L_asm_AES_set_encrypt_key_begin -.globl asm_AES_set_decrypt_key -.hidden asm_AES_set_decrypt_key -.type asm_AES_set_decrypt_key,@function -.align 16 -asm_AES_set_decrypt_key: -.L_asm_AES_set_decrypt_key_begin: - call _x86_AES_set_encrypt_key - cmpl $0,%eax - je .L054proceed - ret -.L054proceed: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 28(%esp),%esi - movl 240(%esi),%ecx - leal (,%ecx,4),%ecx - leal (%esi,%ecx,4),%edi -.align 4 -.L055invert: - movl (%esi),%eax - movl 4(%esi),%ebx - movl (%edi),%ecx - movl 4(%edi),%edx - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,(%esi) - movl %edx,4(%esi) - movl 8(%esi),%eax - movl 12(%esi),%ebx - movl 8(%edi),%ecx - movl 12(%edi),%edx - movl %eax,8(%edi) - movl %ebx,12(%edi) - movl %ecx,8(%esi) - movl %edx,12(%esi) - addl $16,%esi - subl $16,%edi - cmpl %edi,%esi - jne .L055invert - movl 28(%esp),%edi - movl 240(%edi),%esi - leal -2(%esi,%esi,1),%esi - leal (%edi,%esi,8),%esi - movl %esi,28(%esp) - movl 16(%edi),%eax -.align 4 -.L056permute: - addl $16,%edi - movl $2155905152,%ebp - andl %eax,%ebp - leal (%eax,%eax,1),%ebx - movl %ebp,%esi - shrl $7,%ebp - subl %ebp,%esi - andl $4278124286,%ebx - andl $454761243,%esi - xorl %esi,%ebx - movl $2155905152,%ebp - andl %ebx,%ebp - leal (%ebx,%ebx,1),%ecx - movl %ebp,%esi - shrl $7,%ebp - subl %ebp,%esi - andl $4278124286,%ecx - andl $454761243,%esi - xorl %eax,%ebx - xorl %esi,%ecx - movl $2155905152,%ebp - andl %ecx,%ebp - leal (%ecx,%ecx,1),%edx - movl %ebp,%esi - shrl $7,%ebp - xorl %eax,%ecx - subl %ebp,%esi - andl $4278124286,%edx - andl $454761243,%esi - roll $8,%eax - xorl %esi,%edx - movl 4(%edi),%ebp - xorl %ebx,%eax - xorl %edx,%ebx - xorl %ecx,%eax - roll $24,%ebx - xorl %edx,%ecx - xorl %edx,%eax - roll $16,%ecx - xorl %ebx,%eax - roll $8,%edx - xorl %ecx,%eax - movl %ebp,%ebx - xorl %edx,%eax - movl %eax,(%edi) - movl $2155905152,%ebp - andl %ebx,%ebp - leal (%ebx,%ebx,1),%ecx - movl %ebp,%esi - shrl $7,%ebp - subl %ebp,%esi - andl $4278124286,%ecx - andl $454761243,%esi - xorl %esi,%ecx - movl $2155905152,%ebp - andl %ecx,%ebp - leal (%ecx,%ecx,1),%edx - movl %ebp,%esi - shrl $7,%ebp - subl %ebp,%esi - andl $4278124286,%edx - andl $454761243,%esi - xorl %ebx,%ecx - xorl %esi,%edx - movl $2155905152,%ebp - andl %edx,%ebp - leal (%edx,%edx,1),%eax - movl %ebp,%esi - shrl $7,%ebp - xorl %ebx,%edx - subl %ebp,%esi - andl $4278124286,%eax - andl $454761243,%esi - roll $8,%ebx - xorl %esi,%eax - movl 8(%edi),%ebp - xorl %ecx,%ebx - xorl %eax,%ecx - xorl %edx,%ebx - roll $24,%ecx - xorl %eax,%edx - xorl %eax,%ebx - roll $16,%edx - xorl %ecx,%ebx - roll $8,%eax - xorl %edx,%ebx - movl %ebp,%ecx - xorl %eax,%ebx - movl %ebx,4(%edi) - movl $2155905152,%ebp - andl %ecx,%ebp - leal (%ecx,%ecx,1),%edx - movl %ebp,%esi - shrl $7,%ebp - subl %ebp,%esi - andl $4278124286,%edx - andl $454761243,%esi - xorl %esi,%edx - movl $2155905152,%ebp - andl %edx,%ebp - leal (%edx,%edx,1),%eax - movl %ebp,%esi - shrl $7,%ebp - subl %ebp,%esi - andl $4278124286,%eax - andl $454761243,%esi - xorl %ecx,%edx - xorl %esi,%eax - movl $2155905152,%ebp - andl %eax,%ebp - leal (%eax,%eax,1),%ebx - movl %ebp,%esi - shrl $7,%ebp - xorl %ecx,%eax - subl %ebp,%esi - andl $4278124286,%ebx - andl $454761243,%esi - roll $8,%ecx - xorl %esi,%ebx - movl 12(%edi),%ebp - xorl %edx,%ecx - xorl %ebx,%edx - xorl %eax,%ecx - roll $24,%edx - xorl %ebx,%eax - xorl %ebx,%ecx - roll $16,%eax - xorl %edx,%ecx - roll $8,%ebx - xorl %eax,%ecx - movl %ebp,%edx - xorl %ebx,%ecx - movl %ecx,8(%edi) - movl $2155905152,%ebp - andl %edx,%ebp - leal (%edx,%edx,1),%eax - movl %ebp,%esi - shrl $7,%ebp - subl %ebp,%esi - andl $4278124286,%eax - andl $454761243,%esi - xorl %esi,%eax - movl $2155905152,%ebp - andl %eax,%ebp - leal (%eax,%eax,1),%ebx - movl %ebp,%esi - shrl $7,%ebp - subl %ebp,%esi - andl $4278124286,%ebx - andl $454761243,%esi - xorl %edx,%eax - xorl %esi,%ebx - movl $2155905152,%ebp - andl %ebx,%ebp - leal (%ebx,%ebx,1),%ecx - movl %ebp,%esi - shrl $7,%ebp - xorl %edx,%ebx - subl %ebp,%esi - andl $4278124286,%ecx - andl $454761243,%esi - roll $8,%edx - xorl %esi,%ecx - movl 16(%edi),%ebp - xorl %eax,%edx - xorl %ecx,%eax - xorl %ebx,%edx - roll $24,%eax - xorl %ecx,%ebx - xorl %ecx,%edx - roll $16,%ebx - xorl %eax,%edx - roll $8,%ecx - xorl %ebx,%edx - movl %ebp,%eax - xorl %ecx,%edx - movl %edx,12(%edi) - cmpl 28(%esp),%edi - jb .L056permute - xorl %eax,%eax - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size asm_AES_set_decrypt_key,.-.L_asm_AES_set_decrypt_key_begin -.byte 65,69,83,32,102,111,114,32,120,56,54,44,32,67,82,89 -.byte 80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114 -.byte 111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -#endif diff --git a/third_party/boringssl/linux-x86/crypto/aes/aesni-x86.S b/third_party/boringssl/linux-x86/crypto/aes/aesni-x86.S deleted file mode 100644 index aec110d4b11ee..0000000000000 --- a/third_party/boringssl/linux-x86/crypto/aes/aesni-x86.S +++ /dev/null @@ -1,2469 +0,0 @@ -#if defined(__i386__) -.file "src/crypto/aes/asm/aesni-x86.S" -.text -.globl aesni_encrypt -.hidden aesni_encrypt -.type aesni_encrypt,@function -.align 16 -aesni_encrypt: -.L_aesni_encrypt_begin: - movl 4(%esp),%eax - movl 12(%esp),%edx - movups (%eax),%xmm2 - movl 240(%edx),%ecx - movl 8(%esp),%eax - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -.L000enc1_loop_1: -.byte 102,15,56,220,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz .L000enc1_loop_1 -.byte 102,15,56,221,209 - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - movups %xmm2,(%eax) - pxor %xmm2,%xmm2 - ret -.size aesni_encrypt,.-.L_aesni_encrypt_begin -.globl aesni_decrypt -.hidden aesni_decrypt -.type aesni_decrypt,@function -.align 16 -aesni_decrypt: -.L_aesni_decrypt_begin: - movl 4(%esp),%eax - movl 12(%esp),%edx - movups (%eax),%xmm2 - movl 240(%edx),%ecx - movl 8(%esp),%eax - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -.L001dec1_loop_2: -.byte 102,15,56,222,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz .L001dec1_loop_2 -.byte 102,15,56,223,209 - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - movups %xmm2,(%eax) - pxor %xmm2,%xmm2 - ret -.size aesni_decrypt,.-.L_aesni_decrypt_begin -.hidden _aesni_encrypt2 -.type _aesni_encrypt2,@function -.align 16 -_aesni_encrypt2: - movups (%edx),%xmm0 - shll $4,%ecx - movups 16(%edx),%xmm1 - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - movups 32(%edx),%xmm0 - leal 32(%edx,%ecx,1),%edx - negl %ecx - addl $16,%ecx -.L002enc2_loop: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 - movups -16(%edx,%ecx,1),%xmm0 - jnz .L002enc2_loop -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 - ret -.size _aesni_encrypt2,.-_aesni_encrypt2 -.hidden _aesni_decrypt2 -.type _aesni_decrypt2,@function -.align 16 -_aesni_decrypt2: - movups (%edx),%xmm0 - shll $4,%ecx - movups 16(%edx),%xmm1 - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - movups 32(%edx),%xmm0 - leal 32(%edx,%ecx,1),%edx - negl %ecx - addl $16,%ecx -.L003dec2_loop: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 - movups -16(%edx,%ecx,1),%xmm0 - jnz .L003dec2_loop -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,223,208 -.byte 102,15,56,223,216 - ret -.size _aesni_decrypt2,.-_aesni_decrypt2 -.hidden _aesni_encrypt3 -.type _aesni_encrypt3,@function -.align 16 -_aesni_encrypt3: - movups (%edx),%xmm0 - shll $4,%ecx - movups 16(%edx),%xmm1 - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - pxor %xmm0,%xmm4 - movups 32(%edx),%xmm0 - leal 32(%edx,%ecx,1),%edx - negl %ecx - addl $16,%ecx -.L004enc3_loop: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 - movups -16(%edx,%ecx,1),%xmm0 - jnz .L004enc3_loop -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 -.byte 102,15,56,221,224 - ret -.size _aesni_encrypt3,.-_aesni_encrypt3 -.hidden _aesni_decrypt3 -.type _aesni_decrypt3,@function -.align 16 -_aesni_decrypt3: - movups (%edx),%xmm0 - shll $4,%ecx - movups 16(%edx),%xmm1 - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - pxor %xmm0,%xmm4 - movups 32(%edx),%xmm0 - leal 32(%edx,%ecx,1),%edx - negl %ecx - addl $16,%ecx -.L005dec3_loop: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 - movups -16(%edx,%ecx,1),%xmm0 - jnz .L005dec3_loop -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,223,208 -.byte 102,15,56,223,216 -.byte 102,15,56,223,224 - ret -.size _aesni_decrypt3,.-_aesni_decrypt3 -.hidden _aesni_encrypt4 -.type _aesni_encrypt4,@function -.align 16 -_aesni_encrypt4: - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - shll $4,%ecx - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - pxor %xmm0,%xmm4 - pxor %xmm0,%xmm5 - movups 32(%edx),%xmm0 - leal 32(%edx,%ecx,1),%edx - negl %ecx -.byte 15,31,64,0 - addl $16,%ecx -.L006enc4_loop: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 - movups -16(%edx,%ecx,1),%xmm0 - jnz .L006enc4_loop -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 -.byte 102,15,56,221,224 -.byte 102,15,56,221,232 - ret -.size _aesni_encrypt4,.-_aesni_encrypt4 -.hidden _aesni_decrypt4 -.type _aesni_decrypt4,@function -.align 16 -_aesni_decrypt4: - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - shll $4,%ecx - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - pxor %xmm0,%xmm4 - pxor %xmm0,%xmm5 - movups 32(%edx),%xmm0 - leal 32(%edx,%ecx,1),%edx - negl %ecx -.byte 15,31,64,0 - addl $16,%ecx -.L007dec4_loop: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 - movups -16(%edx,%ecx,1),%xmm0 - jnz .L007dec4_loop -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,223,208 -.byte 102,15,56,223,216 -.byte 102,15,56,223,224 -.byte 102,15,56,223,232 - ret -.size _aesni_decrypt4,.-_aesni_decrypt4 -.hidden _aesni_encrypt6 -.type _aesni_encrypt6,@function -.align 16 -_aesni_encrypt6: - movups (%edx),%xmm0 - shll $4,%ecx - movups 16(%edx),%xmm1 - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - pxor %xmm0,%xmm4 -.byte 102,15,56,220,209 - pxor %xmm0,%xmm5 - pxor %xmm0,%xmm6 -.byte 102,15,56,220,217 - leal 32(%edx,%ecx,1),%edx - negl %ecx -.byte 102,15,56,220,225 - pxor %xmm0,%xmm7 - movups (%edx,%ecx,1),%xmm0 - addl $16,%ecx - jmp .L008_aesni_encrypt6_inner -.align 16 -.L009enc6_loop: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.L008_aesni_encrypt6_inner: -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.L_aesni_encrypt6_enter: - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 - movups -16(%edx,%ecx,1),%xmm0 - jnz .L009enc6_loop -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 -.byte 102,15,56,221,224 -.byte 102,15,56,221,232 -.byte 102,15,56,221,240 -.byte 102,15,56,221,248 - ret -.size _aesni_encrypt6,.-_aesni_encrypt6 -.hidden _aesni_decrypt6 -.type _aesni_decrypt6,@function -.align 16 -_aesni_decrypt6: - movups (%edx),%xmm0 - shll $4,%ecx - movups 16(%edx),%xmm1 - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - pxor %xmm0,%xmm4 -.byte 102,15,56,222,209 - pxor %xmm0,%xmm5 - pxor %xmm0,%xmm6 -.byte 102,15,56,222,217 - leal 32(%edx,%ecx,1),%edx - negl %ecx -.byte 102,15,56,222,225 - pxor %xmm0,%xmm7 - movups (%edx,%ecx,1),%xmm0 - addl $16,%ecx - jmp .L010_aesni_decrypt6_inner -.align 16 -.L011dec6_loop: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.L010_aesni_decrypt6_inner: -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.L_aesni_decrypt6_enter: - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 - movups -16(%edx,%ecx,1),%xmm0 - jnz .L011dec6_loop -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,15,56,223,208 -.byte 102,15,56,223,216 -.byte 102,15,56,223,224 -.byte 102,15,56,223,232 -.byte 102,15,56,223,240 -.byte 102,15,56,223,248 - ret -.size _aesni_decrypt6,.-_aesni_decrypt6 -.globl aesni_ecb_encrypt -.hidden aesni_ecb_encrypt -.type aesni_ecb_encrypt,@function -.align 16 -aesni_ecb_encrypt: -.L_aesni_ecb_encrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%eax - movl 32(%esp),%edx - movl 36(%esp),%ebx - andl $-16,%eax - jz .L012ecb_ret - movl 240(%edx),%ecx - testl %ebx,%ebx - jz .L013ecb_decrypt - movl %edx,%ebp - movl %ecx,%ebx - cmpl $96,%eax - jb .L014ecb_enc_tail - movdqu (%esi),%xmm2 - movdqu 16(%esi),%xmm3 - movdqu 32(%esi),%xmm4 - movdqu 48(%esi),%xmm5 - movdqu 64(%esi),%xmm6 - movdqu 80(%esi),%xmm7 - leal 96(%esi),%esi - subl $96,%eax - jmp .L015ecb_enc_loop6_enter -.align 16 -.L016ecb_enc_loop6: - movups %xmm2,(%edi) - movdqu (%esi),%xmm2 - movups %xmm3,16(%edi) - movdqu 16(%esi),%xmm3 - movups %xmm4,32(%edi) - movdqu 32(%esi),%xmm4 - movups %xmm5,48(%edi) - movdqu 48(%esi),%xmm5 - movups %xmm6,64(%edi) - movdqu 64(%esi),%xmm6 - movups %xmm7,80(%edi) - leal 96(%edi),%edi - movdqu 80(%esi),%xmm7 - leal 96(%esi),%esi -.L015ecb_enc_loop6_enter: - call _aesni_encrypt6 - movl %ebp,%edx - movl %ebx,%ecx - subl $96,%eax - jnc .L016ecb_enc_loop6 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - movups %xmm6,64(%edi) - movups %xmm7,80(%edi) - leal 96(%edi),%edi - addl $96,%eax - jz .L012ecb_ret -.L014ecb_enc_tail: - movups (%esi),%xmm2 - cmpl $32,%eax - jb .L017ecb_enc_one - movups 16(%esi),%xmm3 - je .L018ecb_enc_two - movups 32(%esi),%xmm4 - cmpl $64,%eax - jb .L019ecb_enc_three - movups 48(%esi),%xmm5 - je .L020ecb_enc_four - movups 64(%esi),%xmm6 - xorps %xmm7,%xmm7 - call _aesni_encrypt6 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - movups %xmm6,64(%edi) - jmp .L012ecb_ret -.align 16 -.L017ecb_enc_one: - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -.L021enc1_loop_3: -.byte 102,15,56,220,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz .L021enc1_loop_3 -.byte 102,15,56,221,209 - movups %xmm2,(%edi) - jmp .L012ecb_ret -.align 16 -.L018ecb_enc_two: - call _aesni_encrypt2 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - jmp .L012ecb_ret -.align 16 -.L019ecb_enc_three: - call _aesni_encrypt3 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - jmp .L012ecb_ret -.align 16 -.L020ecb_enc_four: - call _aesni_encrypt4 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - jmp .L012ecb_ret -.align 16 -.L013ecb_decrypt: - movl %edx,%ebp - movl %ecx,%ebx - cmpl $96,%eax - jb .L022ecb_dec_tail - movdqu (%esi),%xmm2 - movdqu 16(%esi),%xmm3 - movdqu 32(%esi),%xmm4 - movdqu 48(%esi),%xmm5 - movdqu 64(%esi),%xmm6 - movdqu 80(%esi),%xmm7 - leal 96(%esi),%esi - subl $96,%eax - jmp .L023ecb_dec_loop6_enter -.align 16 -.L024ecb_dec_loop6: - movups %xmm2,(%edi) - movdqu (%esi),%xmm2 - movups %xmm3,16(%edi) - movdqu 16(%esi),%xmm3 - movups %xmm4,32(%edi) - movdqu 32(%esi),%xmm4 - movups %xmm5,48(%edi) - movdqu 48(%esi),%xmm5 - movups %xmm6,64(%edi) - movdqu 64(%esi),%xmm6 - movups %xmm7,80(%edi) - leal 96(%edi),%edi - movdqu 80(%esi),%xmm7 - leal 96(%esi),%esi -.L023ecb_dec_loop6_enter: - call _aesni_decrypt6 - movl %ebp,%edx - movl %ebx,%ecx - subl $96,%eax - jnc .L024ecb_dec_loop6 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - movups %xmm6,64(%edi) - movups %xmm7,80(%edi) - leal 96(%edi),%edi - addl $96,%eax - jz .L012ecb_ret -.L022ecb_dec_tail: - movups (%esi),%xmm2 - cmpl $32,%eax - jb .L025ecb_dec_one - movups 16(%esi),%xmm3 - je .L026ecb_dec_two - movups 32(%esi),%xmm4 - cmpl $64,%eax - jb .L027ecb_dec_three - movups 48(%esi),%xmm5 - je .L028ecb_dec_four - movups 64(%esi),%xmm6 - xorps %xmm7,%xmm7 - call _aesni_decrypt6 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - movups %xmm6,64(%edi) - jmp .L012ecb_ret -.align 16 -.L025ecb_dec_one: - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -.L029dec1_loop_4: -.byte 102,15,56,222,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz .L029dec1_loop_4 -.byte 102,15,56,223,209 - movups %xmm2,(%edi) - jmp .L012ecb_ret -.align 16 -.L026ecb_dec_two: - call _aesni_decrypt2 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - jmp .L012ecb_ret -.align 16 -.L027ecb_dec_three: - call _aesni_decrypt3 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - jmp .L012ecb_ret -.align 16 -.L028ecb_dec_four: - call _aesni_decrypt4 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) -.L012ecb_ret: - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size aesni_ecb_encrypt,.-.L_aesni_ecb_encrypt_begin -.globl aesni_ccm64_encrypt_blocks -.hidden aesni_ccm64_encrypt_blocks -.type aesni_ccm64_encrypt_blocks,@function -.align 16 -aesni_ccm64_encrypt_blocks: -.L_aesni_ccm64_encrypt_blocks_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%eax - movl 32(%esp),%edx - movl 36(%esp),%ebx - movl 40(%esp),%ecx - movl %esp,%ebp - subl $60,%esp - andl $-16,%esp - movl %ebp,48(%esp) - movdqu (%ebx),%xmm7 - movdqu (%ecx),%xmm3 - movl 240(%edx),%ecx - movl $202182159,(%esp) - movl $134810123,4(%esp) - movl $67438087,8(%esp) - movl $66051,12(%esp) - movl $1,%ebx - xorl %ebp,%ebp - movl %ebx,16(%esp) - movl %ebp,20(%esp) - movl %ebp,24(%esp) - movl %ebp,28(%esp) - shll $4,%ecx - movl $16,%ebx - leal (%edx),%ebp - movdqa (%esp),%xmm5 - movdqa %xmm7,%xmm2 - leal 32(%edx,%ecx,1),%edx - subl %ecx,%ebx -.byte 102,15,56,0,253 -.L030ccm64_enc_outer: - movups (%ebp),%xmm0 - movl %ebx,%ecx - movups (%esi),%xmm6 - xorps %xmm0,%xmm2 - movups 16(%ebp),%xmm1 - xorps %xmm6,%xmm0 - xorps %xmm0,%xmm3 - movups 32(%ebp),%xmm0 -.L031ccm64_enc2_loop: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 - movups -16(%edx,%ecx,1),%xmm0 - jnz .L031ccm64_enc2_loop -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - paddq 16(%esp),%xmm7 - decl %eax -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 - leal 16(%esi),%esi - xorps %xmm2,%xmm6 - movdqa %xmm7,%xmm2 - movups %xmm6,(%edi) -.byte 102,15,56,0,213 - leal 16(%edi),%edi - jnz .L030ccm64_enc_outer - movl 48(%esp),%esp - movl 40(%esp),%edi - movups %xmm3,(%edi) - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size aesni_ccm64_encrypt_blocks,.-.L_aesni_ccm64_encrypt_blocks_begin -.globl aesni_ccm64_decrypt_blocks -.hidden aesni_ccm64_decrypt_blocks -.type aesni_ccm64_decrypt_blocks,@function -.align 16 -aesni_ccm64_decrypt_blocks: -.L_aesni_ccm64_decrypt_blocks_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%eax - movl 32(%esp),%edx - movl 36(%esp),%ebx - movl 40(%esp),%ecx - movl %esp,%ebp - subl $60,%esp - andl $-16,%esp - movl %ebp,48(%esp) - movdqu (%ebx),%xmm7 - movdqu (%ecx),%xmm3 - movl 240(%edx),%ecx - movl $202182159,(%esp) - movl $134810123,4(%esp) - movl $67438087,8(%esp) - movl $66051,12(%esp) - movl $1,%ebx - xorl %ebp,%ebp - movl %ebx,16(%esp) - movl %ebp,20(%esp) - movl %ebp,24(%esp) - movl %ebp,28(%esp) - movdqa (%esp),%xmm5 - movdqa %xmm7,%xmm2 - movl %edx,%ebp - movl %ecx,%ebx -.byte 102,15,56,0,253 - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -.L032enc1_loop_5: -.byte 102,15,56,220,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz .L032enc1_loop_5 -.byte 102,15,56,221,209 - shll $4,%ebx - movl $16,%ecx - movups (%esi),%xmm6 - paddq 16(%esp),%xmm7 - leal 16(%esi),%esi - subl %ebx,%ecx - leal 32(%ebp,%ebx,1),%edx - movl %ecx,%ebx - jmp .L033ccm64_dec_outer -.align 16 -.L033ccm64_dec_outer: - xorps %xmm2,%xmm6 - movdqa %xmm7,%xmm2 - movups %xmm6,(%edi) - leal 16(%edi),%edi -.byte 102,15,56,0,213 - subl $1,%eax - jz .L034ccm64_dec_break - movups (%ebp),%xmm0 - movl %ebx,%ecx - movups 16(%ebp),%xmm1 - xorps %xmm0,%xmm6 - xorps %xmm0,%xmm2 - xorps %xmm6,%xmm3 - movups 32(%ebp),%xmm0 -.L035ccm64_dec2_loop: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 - movups -16(%edx,%ecx,1),%xmm0 - jnz .L035ccm64_dec2_loop - movups (%esi),%xmm6 - paddq 16(%esp),%xmm7 -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 - leal 16(%esi),%esi - jmp .L033ccm64_dec_outer -.align 16 -.L034ccm64_dec_break: - movl 240(%ebp),%ecx - movl %ebp,%edx - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - xorps %xmm0,%xmm6 - leal 32(%edx),%edx - xorps %xmm6,%xmm3 -.L036enc1_loop_6: -.byte 102,15,56,220,217 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz .L036enc1_loop_6 -.byte 102,15,56,221,217 - movl 48(%esp),%esp - movl 40(%esp),%edi - movups %xmm3,(%edi) - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size aesni_ccm64_decrypt_blocks,.-.L_aesni_ccm64_decrypt_blocks_begin -.globl aesni_ctr32_encrypt_blocks -.hidden aesni_ctr32_encrypt_blocks -.type aesni_ctr32_encrypt_blocks,@function -.align 16 -aesni_ctr32_encrypt_blocks: -.L_aesni_ctr32_encrypt_blocks_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%eax - movl 32(%esp),%edx - movl 36(%esp),%ebx - movl %esp,%ebp - subl $88,%esp - andl $-16,%esp - movl %ebp,80(%esp) - cmpl $1,%eax - je .L037ctr32_one_shortcut - movdqu (%ebx),%xmm7 - movl $202182159,(%esp) - movl $134810123,4(%esp) - movl $67438087,8(%esp) - movl $66051,12(%esp) - movl $6,%ecx - xorl %ebp,%ebp - movl %ecx,16(%esp) - movl %ecx,20(%esp) - movl %ecx,24(%esp) - movl %ebp,28(%esp) -.byte 102,15,58,22,251,3 -.byte 102,15,58,34,253,3 - movl 240(%edx),%ecx - bswap %ebx - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - movdqa (%esp),%xmm2 -.byte 102,15,58,34,195,0 - leal 3(%ebx),%ebp -.byte 102,15,58,34,205,0 - incl %ebx -.byte 102,15,58,34,195,1 - incl %ebp -.byte 102,15,58,34,205,1 - incl %ebx -.byte 102,15,58,34,195,2 - incl %ebp -.byte 102,15,58,34,205,2 - movdqa %xmm0,48(%esp) -.byte 102,15,56,0,194 - movdqu (%edx),%xmm6 - movdqa %xmm1,64(%esp) -.byte 102,15,56,0,202 - pshufd $192,%xmm0,%xmm2 - pshufd $128,%xmm0,%xmm3 - cmpl $6,%eax - jb .L038ctr32_tail - pxor %xmm6,%xmm7 - shll $4,%ecx - movl $16,%ebx - movdqa %xmm7,32(%esp) - movl %edx,%ebp - subl %ecx,%ebx - leal 32(%edx,%ecx,1),%edx - subl $6,%eax - jmp .L039ctr32_loop6 -.align 16 -.L039ctr32_loop6: - pshufd $64,%xmm0,%xmm4 - movdqa 32(%esp),%xmm0 - pshufd $192,%xmm1,%xmm5 - pxor %xmm0,%xmm2 - pshufd $128,%xmm1,%xmm6 - pxor %xmm0,%xmm3 - pshufd $64,%xmm1,%xmm7 - movups 16(%ebp),%xmm1 - pxor %xmm0,%xmm4 - pxor %xmm0,%xmm5 -.byte 102,15,56,220,209 - pxor %xmm0,%xmm6 - pxor %xmm0,%xmm7 -.byte 102,15,56,220,217 - movups 32(%ebp),%xmm0 - movl %ebx,%ecx -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 - call .L_aesni_encrypt6_enter - movups (%esi),%xmm1 - movups 16(%esi),%xmm0 - xorps %xmm1,%xmm2 - movups 32(%esi),%xmm1 - xorps %xmm0,%xmm3 - movups %xmm2,(%edi) - movdqa 16(%esp),%xmm0 - xorps %xmm1,%xmm4 - movdqa 64(%esp),%xmm1 - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - paddd %xmm0,%xmm1 - paddd 48(%esp),%xmm0 - movdqa (%esp),%xmm2 - movups 48(%esi),%xmm3 - movups 64(%esi),%xmm4 - xorps %xmm3,%xmm5 - movups 80(%esi),%xmm3 - leal 96(%esi),%esi - movdqa %xmm0,48(%esp) -.byte 102,15,56,0,194 - xorps %xmm4,%xmm6 - movups %xmm5,48(%edi) - xorps %xmm3,%xmm7 - movdqa %xmm1,64(%esp) -.byte 102,15,56,0,202 - movups %xmm6,64(%edi) - pshufd $192,%xmm0,%xmm2 - movups %xmm7,80(%edi) - leal 96(%edi),%edi - pshufd $128,%xmm0,%xmm3 - subl $6,%eax - jnc .L039ctr32_loop6 - addl $6,%eax - jz .L040ctr32_ret - movdqu (%ebp),%xmm7 - movl %ebp,%edx - pxor 32(%esp),%xmm7 - movl 240(%ebp),%ecx -.L038ctr32_tail: - por %xmm7,%xmm2 - cmpl $2,%eax - jb .L041ctr32_one - pshufd $64,%xmm0,%xmm4 - por %xmm7,%xmm3 - je .L042ctr32_two - pshufd $192,%xmm1,%xmm5 - por %xmm7,%xmm4 - cmpl $4,%eax - jb .L043ctr32_three - pshufd $128,%xmm1,%xmm6 - por %xmm7,%xmm5 - je .L044ctr32_four - por %xmm7,%xmm6 - call _aesni_encrypt6 - movups (%esi),%xmm1 - movups 16(%esi),%xmm0 - xorps %xmm1,%xmm2 - movups 32(%esi),%xmm1 - xorps %xmm0,%xmm3 - movups 48(%esi),%xmm0 - xorps %xmm1,%xmm4 - movups 64(%esi),%xmm1 - xorps %xmm0,%xmm5 - movups %xmm2,(%edi) - xorps %xmm1,%xmm6 - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - movups %xmm6,64(%edi) - jmp .L040ctr32_ret -.align 16 -.L037ctr32_one_shortcut: - movups (%ebx),%xmm2 - movl 240(%edx),%ecx -.L041ctr32_one: - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -.L045enc1_loop_7: -.byte 102,15,56,220,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz .L045enc1_loop_7 -.byte 102,15,56,221,209 - movups (%esi),%xmm6 - xorps %xmm2,%xmm6 - movups %xmm6,(%edi) - jmp .L040ctr32_ret -.align 16 -.L042ctr32_two: - call _aesni_encrypt2 - movups (%esi),%xmm5 - movups 16(%esi),%xmm6 - xorps %xmm5,%xmm2 - xorps %xmm6,%xmm3 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - jmp .L040ctr32_ret -.align 16 -.L043ctr32_three: - call _aesni_encrypt3 - movups (%esi),%xmm5 - movups 16(%esi),%xmm6 - xorps %xmm5,%xmm2 - movups 32(%esi),%xmm7 - xorps %xmm6,%xmm3 - movups %xmm2,(%edi) - xorps %xmm7,%xmm4 - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - jmp .L040ctr32_ret -.align 16 -.L044ctr32_four: - call _aesni_encrypt4 - movups (%esi),%xmm6 - movups 16(%esi),%xmm7 - movups 32(%esi),%xmm1 - xorps %xmm6,%xmm2 - movups 48(%esi),%xmm0 - xorps %xmm7,%xmm3 - movups %xmm2,(%edi) - xorps %xmm1,%xmm4 - movups %xmm3,16(%edi) - xorps %xmm0,%xmm5 - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) -.L040ctr32_ret: - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - movdqa %xmm0,32(%esp) - pxor %xmm5,%xmm5 - movdqa %xmm0,48(%esp) - pxor %xmm6,%xmm6 - movdqa %xmm0,64(%esp) - pxor %xmm7,%xmm7 - movl 80(%esp),%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size aesni_ctr32_encrypt_blocks,.-.L_aesni_ctr32_encrypt_blocks_begin -.globl aesni_xts_encrypt -.hidden aesni_xts_encrypt -.type aesni_xts_encrypt,@function -.align 16 -aesni_xts_encrypt: -.L_aesni_xts_encrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 36(%esp),%edx - movl 40(%esp),%esi - movl 240(%edx),%ecx - movups (%esi),%xmm2 - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -.L046enc1_loop_8: -.byte 102,15,56,220,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz .L046enc1_loop_8 -.byte 102,15,56,221,209 - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%eax - movl 32(%esp),%edx - movl %esp,%ebp - subl $120,%esp - movl 240(%edx),%ecx - andl $-16,%esp - movl $135,96(%esp) - movl $0,100(%esp) - movl $1,104(%esp) - movl $0,108(%esp) - movl %eax,112(%esp) - movl %ebp,116(%esp) - movdqa %xmm2,%xmm1 - pxor %xmm0,%xmm0 - movdqa 96(%esp),%xmm3 - pcmpgtd %xmm1,%xmm0 - andl $-16,%eax - movl %edx,%ebp - movl %ecx,%ebx - subl $96,%eax - jc .L047xts_enc_short - shll $4,%ecx - movl $16,%ebx - subl %ecx,%ebx - leal 32(%edx,%ecx,1),%edx - jmp .L048xts_enc_loop6 -.align 16 -.L048xts_enc_loop6: - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,16(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,32(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,48(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - pshufd $19,%xmm0,%xmm7 - movdqa %xmm1,64(%esp) - paddq %xmm1,%xmm1 - movups (%ebp),%xmm0 - pand %xmm3,%xmm7 - movups (%esi),%xmm2 - pxor %xmm1,%xmm7 - movl %ebx,%ecx - movdqu 16(%esi),%xmm3 - xorps %xmm0,%xmm2 - movdqu 32(%esi),%xmm4 - pxor %xmm0,%xmm3 - movdqu 48(%esi),%xmm5 - pxor %xmm0,%xmm4 - movdqu 64(%esi),%xmm6 - pxor %xmm0,%xmm5 - movdqu 80(%esi),%xmm1 - pxor %xmm0,%xmm6 - leal 96(%esi),%esi - pxor (%esp),%xmm2 - movdqa %xmm7,80(%esp) - pxor %xmm1,%xmm7 - movups 16(%ebp),%xmm1 - pxor 16(%esp),%xmm3 - pxor 32(%esp),%xmm4 -.byte 102,15,56,220,209 - pxor 48(%esp),%xmm5 - pxor 64(%esp),%xmm6 -.byte 102,15,56,220,217 - pxor %xmm0,%xmm7 - movups 32(%ebp),%xmm0 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 - call .L_aesni_encrypt6_enter - movdqa 80(%esp),%xmm1 - pxor %xmm0,%xmm0 - xorps (%esp),%xmm2 - pcmpgtd %xmm1,%xmm0 - xorps 16(%esp),%xmm3 - movups %xmm2,(%edi) - xorps 32(%esp),%xmm4 - movups %xmm3,16(%edi) - xorps 48(%esp),%xmm5 - movups %xmm4,32(%edi) - xorps 64(%esp),%xmm6 - movups %xmm5,48(%edi) - xorps %xmm1,%xmm7 - movups %xmm6,64(%edi) - pshufd $19,%xmm0,%xmm2 - movups %xmm7,80(%edi) - leal 96(%edi),%edi - movdqa 96(%esp),%xmm3 - pxor %xmm0,%xmm0 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - subl $96,%eax - jnc .L048xts_enc_loop6 - movl 240(%ebp),%ecx - movl %ebp,%edx - movl %ecx,%ebx -.L047xts_enc_short: - addl $96,%eax - jz .L049xts_enc_done6x - movdqa %xmm1,%xmm5 - cmpl $32,%eax - jb .L050xts_enc_one - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - je .L051xts_enc_two - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,%xmm6 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - cmpl $64,%eax - jb .L052xts_enc_three - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,%xmm7 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - movdqa %xmm5,(%esp) - movdqa %xmm6,16(%esp) - je .L053xts_enc_four - movdqa %xmm7,32(%esp) - pshufd $19,%xmm0,%xmm7 - movdqa %xmm1,48(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm7 - pxor %xmm1,%xmm7 - movdqu (%esi),%xmm2 - movdqu 16(%esi),%xmm3 - movdqu 32(%esi),%xmm4 - pxor (%esp),%xmm2 - movdqu 48(%esi),%xmm5 - pxor 16(%esp),%xmm3 - movdqu 64(%esi),%xmm6 - pxor 32(%esp),%xmm4 - leal 80(%esi),%esi - pxor 48(%esp),%xmm5 - movdqa %xmm7,64(%esp) - pxor %xmm7,%xmm6 - call _aesni_encrypt6 - movaps 64(%esp),%xmm1 - xorps (%esp),%xmm2 - xorps 16(%esp),%xmm3 - xorps 32(%esp),%xmm4 - movups %xmm2,(%edi) - xorps 48(%esp),%xmm5 - movups %xmm3,16(%edi) - xorps %xmm1,%xmm6 - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - movups %xmm6,64(%edi) - leal 80(%edi),%edi - jmp .L054xts_enc_done -.align 16 -.L050xts_enc_one: - movups (%esi),%xmm2 - leal 16(%esi),%esi - xorps %xmm5,%xmm2 - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -.L055enc1_loop_9: -.byte 102,15,56,220,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz .L055enc1_loop_9 -.byte 102,15,56,221,209 - xorps %xmm5,%xmm2 - movups %xmm2,(%edi) - leal 16(%edi),%edi - movdqa %xmm5,%xmm1 - jmp .L054xts_enc_done -.align 16 -.L051xts_enc_two: - movaps %xmm1,%xmm6 - movups (%esi),%xmm2 - movups 16(%esi),%xmm3 - leal 32(%esi),%esi - xorps %xmm5,%xmm2 - xorps %xmm6,%xmm3 - call _aesni_encrypt2 - xorps %xmm5,%xmm2 - xorps %xmm6,%xmm3 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - leal 32(%edi),%edi - movdqa %xmm6,%xmm1 - jmp .L054xts_enc_done -.align 16 -.L052xts_enc_three: - movaps %xmm1,%xmm7 - movups (%esi),%xmm2 - movups 16(%esi),%xmm3 - movups 32(%esi),%xmm4 - leal 48(%esi),%esi - xorps %xmm5,%xmm2 - xorps %xmm6,%xmm3 - xorps %xmm7,%xmm4 - call _aesni_encrypt3 - xorps %xmm5,%xmm2 - xorps %xmm6,%xmm3 - xorps %xmm7,%xmm4 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - leal 48(%edi),%edi - movdqa %xmm7,%xmm1 - jmp .L054xts_enc_done -.align 16 -.L053xts_enc_four: - movaps %xmm1,%xmm6 - movups (%esi),%xmm2 - movups 16(%esi),%xmm3 - movups 32(%esi),%xmm4 - xorps (%esp),%xmm2 - movups 48(%esi),%xmm5 - leal 64(%esi),%esi - xorps 16(%esp),%xmm3 - xorps %xmm7,%xmm4 - xorps %xmm6,%xmm5 - call _aesni_encrypt4 - xorps (%esp),%xmm2 - xorps 16(%esp),%xmm3 - xorps %xmm7,%xmm4 - movups %xmm2,(%edi) - xorps %xmm6,%xmm5 - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - leal 64(%edi),%edi - movdqa %xmm6,%xmm1 - jmp .L054xts_enc_done -.align 16 -.L049xts_enc_done6x: - movl 112(%esp),%eax - andl $15,%eax - jz .L056xts_enc_ret - movdqa %xmm1,%xmm5 - movl %eax,112(%esp) - jmp .L057xts_enc_steal -.align 16 -.L054xts_enc_done: - movl 112(%esp),%eax - pxor %xmm0,%xmm0 - andl $15,%eax - jz .L056xts_enc_ret - pcmpgtd %xmm1,%xmm0 - movl %eax,112(%esp) - pshufd $19,%xmm0,%xmm5 - paddq %xmm1,%xmm1 - pand 96(%esp),%xmm5 - pxor %xmm1,%xmm5 -.L057xts_enc_steal: - movzbl (%esi),%ecx - movzbl -16(%edi),%edx - leal 1(%esi),%esi - movb %cl,-16(%edi) - movb %dl,(%edi) - leal 1(%edi),%edi - subl $1,%eax - jnz .L057xts_enc_steal - subl 112(%esp),%edi - movl %ebp,%edx - movl %ebx,%ecx - movups -16(%edi),%xmm2 - xorps %xmm5,%xmm2 - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -.L058enc1_loop_10: -.byte 102,15,56,220,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz .L058enc1_loop_10 -.byte 102,15,56,221,209 - xorps %xmm5,%xmm2 - movups %xmm2,-16(%edi) -.L056xts_enc_ret: - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - movdqa %xmm0,(%esp) - pxor %xmm3,%xmm3 - movdqa %xmm0,16(%esp) - pxor %xmm4,%xmm4 - movdqa %xmm0,32(%esp) - pxor %xmm5,%xmm5 - movdqa %xmm0,48(%esp) - pxor %xmm6,%xmm6 - movdqa %xmm0,64(%esp) - pxor %xmm7,%xmm7 - movdqa %xmm0,80(%esp) - movl 116(%esp),%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size aesni_xts_encrypt,.-.L_aesni_xts_encrypt_begin -.globl aesni_xts_decrypt -.hidden aesni_xts_decrypt -.type aesni_xts_decrypt,@function -.align 16 -aesni_xts_decrypt: -.L_aesni_xts_decrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 36(%esp),%edx - movl 40(%esp),%esi - movl 240(%edx),%ecx - movups (%esi),%xmm2 - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -.L059enc1_loop_11: -.byte 102,15,56,220,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz .L059enc1_loop_11 -.byte 102,15,56,221,209 - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%eax - movl 32(%esp),%edx - movl %esp,%ebp - subl $120,%esp - andl $-16,%esp - xorl %ebx,%ebx - testl $15,%eax - setnz %bl - shll $4,%ebx - subl %ebx,%eax - movl $135,96(%esp) - movl $0,100(%esp) - movl $1,104(%esp) - movl $0,108(%esp) - movl %eax,112(%esp) - movl %ebp,116(%esp) - movl 240(%edx),%ecx - movl %edx,%ebp - movl %ecx,%ebx - movdqa %xmm2,%xmm1 - pxor %xmm0,%xmm0 - movdqa 96(%esp),%xmm3 - pcmpgtd %xmm1,%xmm0 - andl $-16,%eax - subl $96,%eax - jc .L060xts_dec_short - shll $4,%ecx - movl $16,%ebx - subl %ecx,%ebx - leal 32(%edx,%ecx,1),%edx - jmp .L061xts_dec_loop6 -.align 16 -.L061xts_dec_loop6: - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,16(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,32(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,48(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - pshufd $19,%xmm0,%xmm7 - movdqa %xmm1,64(%esp) - paddq %xmm1,%xmm1 - movups (%ebp),%xmm0 - pand %xmm3,%xmm7 - movups (%esi),%xmm2 - pxor %xmm1,%xmm7 - movl %ebx,%ecx - movdqu 16(%esi),%xmm3 - xorps %xmm0,%xmm2 - movdqu 32(%esi),%xmm4 - pxor %xmm0,%xmm3 - movdqu 48(%esi),%xmm5 - pxor %xmm0,%xmm4 - movdqu 64(%esi),%xmm6 - pxor %xmm0,%xmm5 - movdqu 80(%esi),%xmm1 - pxor %xmm0,%xmm6 - leal 96(%esi),%esi - pxor (%esp),%xmm2 - movdqa %xmm7,80(%esp) - pxor %xmm1,%xmm7 - movups 16(%ebp),%xmm1 - pxor 16(%esp),%xmm3 - pxor 32(%esp),%xmm4 -.byte 102,15,56,222,209 - pxor 48(%esp),%xmm5 - pxor 64(%esp),%xmm6 -.byte 102,15,56,222,217 - pxor %xmm0,%xmm7 - movups 32(%ebp),%xmm0 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 - call .L_aesni_decrypt6_enter - movdqa 80(%esp),%xmm1 - pxor %xmm0,%xmm0 - xorps (%esp),%xmm2 - pcmpgtd %xmm1,%xmm0 - xorps 16(%esp),%xmm3 - movups %xmm2,(%edi) - xorps 32(%esp),%xmm4 - movups %xmm3,16(%edi) - xorps 48(%esp),%xmm5 - movups %xmm4,32(%edi) - xorps 64(%esp),%xmm6 - movups %xmm5,48(%edi) - xorps %xmm1,%xmm7 - movups %xmm6,64(%edi) - pshufd $19,%xmm0,%xmm2 - movups %xmm7,80(%edi) - leal 96(%edi),%edi - movdqa 96(%esp),%xmm3 - pxor %xmm0,%xmm0 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - subl $96,%eax - jnc .L061xts_dec_loop6 - movl 240(%ebp),%ecx - movl %ebp,%edx - movl %ecx,%ebx -.L060xts_dec_short: - addl $96,%eax - jz .L062xts_dec_done6x - movdqa %xmm1,%xmm5 - cmpl $32,%eax - jb .L063xts_dec_one - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - je .L064xts_dec_two - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,%xmm6 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - cmpl $64,%eax - jb .L065xts_dec_three - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,%xmm7 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - movdqa %xmm5,(%esp) - movdqa %xmm6,16(%esp) - je .L066xts_dec_four - movdqa %xmm7,32(%esp) - pshufd $19,%xmm0,%xmm7 - movdqa %xmm1,48(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm7 - pxor %xmm1,%xmm7 - movdqu (%esi),%xmm2 - movdqu 16(%esi),%xmm3 - movdqu 32(%esi),%xmm4 - pxor (%esp),%xmm2 - movdqu 48(%esi),%xmm5 - pxor 16(%esp),%xmm3 - movdqu 64(%esi),%xmm6 - pxor 32(%esp),%xmm4 - leal 80(%esi),%esi - pxor 48(%esp),%xmm5 - movdqa %xmm7,64(%esp) - pxor %xmm7,%xmm6 - call _aesni_decrypt6 - movaps 64(%esp),%xmm1 - xorps (%esp),%xmm2 - xorps 16(%esp),%xmm3 - xorps 32(%esp),%xmm4 - movups %xmm2,(%edi) - xorps 48(%esp),%xmm5 - movups %xmm3,16(%edi) - xorps %xmm1,%xmm6 - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - movups %xmm6,64(%edi) - leal 80(%edi),%edi - jmp .L067xts_dec_done -.align 16 -.L063xts_dec_one: - movups (%esi),%xmm2 - leal 16(%esi),%esi - xorps %xmm5,%xmm2 - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -.L068dec1_loop_12: -.byte 102,15,56,222,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz .L068dec1_loop_12 -.byte 102,15,56,223,209 - xorps %xmm5,%xmm2 - movups %xmm2,(%edi) - leal 16(%edi),%edi - movdqa %xmm5,%xmm1 - jmp .L067xts_dec_done -.align 16 -.L064xts_dec_two: - movaps %xmm1,%xmm6 - movups (%esi),%xmm2 - movups 16(%esi),%xmm3 - leal 32(%esi),%esi - xorps %xmm5,%xmm2 - xorps %xmm6,%xmm3 - call _aesni_decrypt2 - xorps %xmm5,%xmm2 - xorps %xmm6,%xmm3 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - leal 32(%edi),%edi - movdqa %xmm6,%xmm1 - jmp .L067xts_dec_done -.align 16 -.L065xts_dec_three: - movaps %xmm1,%xmm7 - movups (%esi),%xmm2 - movups 16(%esi),%xmm3 - movups 32(%esi),%xmm4 - leal 48(%esi),%esi - xorps %xmm5,%xmm2 - xorps %xmm6,%xmm3 - xorps %xmm7,%xmm4 - call _aesni_decrypt3 - xorps %xmm5,%xmm2 - xorps %xmm6,%xmm3 - xorps %xmm7,%xmm4 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - leal 48(%edi),%edi - movdqa %xmm7,%xmm1 - jmp .L067xts_dec_done -.align 16 -.L066xts_dec_four: - movaps %xmm1,%xmm6 - movups (%esi),%xmm2 - movups 16(%esi),%xmm3 - movups 32(%esi),%xmm4 - xorps (%esp),%xmm2 - movups 48(%esi),%xmm5 - leal 64(%esi),%esi - xorps 16(%esp),%xmm3 - xorps %xmm7,%xmm4 - xorps %xmm6,%xmm5 - call _aesni_decrypt4 - xorps (%esp),%xmm2 - xorps 16(%esp),%xmm3 - xorps %xmm7,%xmm4 - movups %xmm2,(%edi) - xorps %xmm6,%xmm5 - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - leal 64(%edi),%edi - movdqa %xmm6,%xmm1 - jmp .L067xts_dec_done -.align 16 -.L062xts_dec_done6x: - movl 112(%esp),%eax - andl $15,%eax - jz .L069xts_dec_ret - movl %eax,112(%esp) - jmp .L070xts_dec_only_one_more -.align 16 -.L067xts_dec_done: - movl 112(%esp),%eax - pxor %xmm0,%xmm0 - andl $15,%eax - jz .L069xts_dec_ret - pcmpgtd %xmm1,%xmm0 - movl %eax,112(%esp) - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa 96(%esp),%xmm3 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 -.L070xts_dec_only_one_more: - pshufd $19,%xmm0,%xmm5 - movdqa %xmm1,%xmm6 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm5 - pxor %xmm1,%xmm5 - movl %ebp,%edx - movl %ebx,%ecx - movups (%esi),%xmm2 - xorps %xmm5,%xmm2 - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -.L071dec1_loop_13: -.byte 102,15,56,222,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz .L071dec1_loop_13 -.byte 102,15,56,223,209 - xorps %xmm5,%xmm2 - movups %xmm2,(%edi) -.L072xts_dec_steal: - movzbl 16(%esi),%ecx - movzbl (%edi),%edx - leal 1(%esi),%esi - movb %cl,(%edi) - movb %dl,16(%edi) - leal 1(%edi),%edi - subl $1,%eax - jnz .L072xts_dec_steal - subl 112(%esp),%edi - movl %ebp,%edx - movl %ebx,%ecx - movups (%edi),%xmm2 - xorps %xmm6,%xmm2 - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -.L073dec1_loop_14: -.byte 102,15,56,222,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz .L073dec1_loop_14 -.byte 102,15,56,223,209 - xorps %xmm6,%xmm2 - movups %xmm2,(%edi) -.L069xts_dec_ret: - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - movdqa %xmm0,(%esp) - pxor %xmm3,%xmm3 - movdqa %xmm0,16(%esp) - pxor %xmm4,%xmm4 - movdqa %xmm0,32(%esp) - pxor %xmm5,%xmm5 - movdqa %xmm0,48(%esp) - pxor %xmm6,%xmm6 - movdqa %xmm0,64(%esp) - pxor %xmm7,%xmm7 - movdqa %xmm0,80(%esp) - movl 116(%esp),%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size aesni_xts_decrypt,.-.L_aesni_xts_decrypt_begin -.globl aesni_cbc_encrypt -.hidden aesni_cbc_encrypt -.type aesni_cbc_encrypt,@function -.align 16 -aesni_cbc_encrypt: -.L_aesni_cbc_encrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl %esp,%ebx - movl 24(%esp),%edi - subl $24,%ebx - movl 28(%esp),%eax - andl $-16,%ebx - movl 32(%esp),%edx - movl 36(%esp),%ebp - testl %eax,%eax - jz .L074cbc_abort - cmpl $0,40(%esp) - xchgl %esp,%ebx - movups (%ebp),%xmm7 - movl 240(%edx),%ecx - movl %edx,%ebp - movl %ebx,16(%esp) - movl %ecx,%ebx - je .L075cbc_decrypt - movaps %xmm7,%xmm2 - cmpl $16,%eax - jb .L076cbc_enc_tail - subl $16,%eax - jmp .L077cbc_enc_loop -.align 16 -.L077cbc_enc_loop: - movups (%esi),%xmm7 - leal 16(%esi),%esi - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - xorps %xmm0,%xmm7 - leal 32(%edx),%edx - xorps %xmm7,%xmm2 -.L078enc1_loop_15: -.byte 102,15,56,220,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz .L078enc1_loop_15 -.byte 102,15,56,221,209 - movl %ebx,%ecx - movl %ebp,%edx - movups %xmm2,(%edi) - leal 16(%edi),%edi - subl $16,%eax - jnc .L077cbc_enc_loop - addl $16,%eax - jnz .L076cbc_enc_tail - movaps %xmm2,%xmm7 - pxor %xmm2,%xmm2 - jmp .L079cbc_ret -.L076cbc_enc_tail: - movl %eax,%ecx -.long 2767451785 - movl $16,%ecx - subl %eax,%ecx - xorl %eax,%eax -.long 2868115081 - leal -16(%edi),%edi - movl %ebx,%ecx - movl %edi,%esi - movl %ebp,%edx - jmp .L077cbc_enc_loop -.align 16 -.L075cbc_decrypt: - cmpl $80,%eax - jbe .L080cbc_dec_tail - movaps %xmm7,(%esp) - subl $80,%eax - jmp .L081cbc_dec_loop6_enter -.align 16 -.L082cbc_dec_loop6: - movaps %xmm0,(%esp) - movups %xmm7,(%edi) - leal 16(%edi),%edi -.L081cbc_dec_loop6_enter: - movdqu (%esi),%xmm2 - movdqu 16(%esi),%xmm3 - movdqu 32(%esi),%xmm4 - movdqu 48(%esi),%xmm5 - movdqu 64(%esi),%xmm6 - movdqu 80(%esi),%xmm7 - call _aesni_decrypt6 - movups (%esi),%xmm1 - movups 16(%esi),%xmm0 - xorps (%esp),%xmm2 - xorps %xmm1,%xmm3 - movups 32(%esi),%xmm1 - xorps %xmm0,%xmm4 - movups 48(%esi),%xmm0 - xorps %xmm1,%xmm5 - movups 64(%esi),%xmm1 - xorps %xmm0,%xmm6 - movups 80(%esi),%xmm0 - xorps %xmm1,%xmm7 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - leal 96(%esi),%esi - movups %xmm4,32(%edi) - movl %ebx,%ecx - movups %xmm5,48(%edi) - movl %ebp,%edx - movups %xmm6,64(%edi) - leal 80(%edi),%edi - subl $96,%eax - ja .L082cbc_dec_loop6 - movaps %xmm7,%xmm2 - movaps %xmm0,%xmm7 - addl $80,%eax - jle .L083cbc_dec_clear_tail_collected - movups %xmm2,(%edi) - leal 16(%edi),%edi -.L080cbc_dec_tail: - movups (%esi),%xmm2 - movaps %xmm2,%xmm6 - cmpl $16,%eax - jbe .L084cbc_dec_one - movups 16(%esi),%xmm3 - movaps %xmm3,%xmm5 - cmpl $32,%eax - jbe .L085cbc_dec_two - movups 32(%esi),%xmm4 - cmpl $48,%eax - jbe .L086cbc_dec_three - movups 48(%esi),%xmm5 - cmpl $64,%eax - jbe .L087cbc_dec_four - movups 64(%esi),%xmm6 - movaps %xmm7,(%esp) - movups (%esi),%xmm2 - xorps %xmm7,%xmm7 - call _aesni_decrypt6 - movups (%esi),%xmm1 - movups 16(%esi),%xmm0 - xorps (%esp),%xmm2 - xorps %xmm1,%xmm3 - movups 32(%esi),%xmm1 - xorps %xmm0,%xmm4 - movups 48(%esi),%xmm0 - xorps %xmm1,%xmm5 - movups 64(%esi),%xmm7 - xorps %xmm0,%xmm6 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - pxor %xmm3,%xmm3 - movups %xmm4,32(%edi) - pxor %xmm4,%xmm4 - movups %xmm5,48(%edi) - pxor %xmm5,%xmm5 - leal 64(%edi),%edi - movaps %xmm6,%xmm2 - pxor %xmm6,%xmm6 - subl $80,%eax - jmp .L088cbc_dec_tail_collected -.align 16 -.L084cbc_dec_one: - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -.L089dec1_loop_16: -.byte 102,15,56,222,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz .L089dec1_loop_16 -.byte 102,15,56,223,209 - xorps %xmm7,%xmm2 - movaps %xmm6,%xmm7 - subl $16,%eax - jmp .L088cbc_dec_tail_collected -.align 16 -.L085cbc_dec_two: - call _aesni_decrypt2 - xorps %xmm7,%xmm2 - xorps %xmm6,%xmm3 - movups %xmm2,(%edi) - movaps %xmm3,%xmm2 - pxor %xmm3,%xmm3 - leal 16(%edi),%edi - movaps %xmm5,%xmm7 - subl $32,%eax - jmp .L088cbc_dec_tail_collected -.align 16 -.L086cbc_dec_three: - call _aesni_decrypt3 - xorps %xmm7,%xmm2 - xorps %xmm6,%xmm3 - xorps %xmm5,%xmm4 - movups %xmm2,(%edi) - movaps %xmm4,%xmm2 - pxor %xmm4,%xmm4 - movups %xmm3,16(%edi) - pxor %xmm3,%xmm3 - leal 32(%edi),%edi - movups 32(%esi),%xmm7 - subl $48,%eax - jmp .L088cbc_dec_tail_collected -.align 16 -.L087cbc_dec_four: - call _aesni_decrypt4 - movups 16(%esi),%xmm1 - movups 32(%esi),%xmm0 - xorps %xmm7,%xmm2 - movups 48(%esi),%xmm7 - xorps %xmm6,%xmm3 - movups %xmm2,(%edi) - xorps %xmm1,%xmm4 - movups %xmm3,16(%edi) - pxor %xmm3,%xmm3 - xorps %xmm0,%xmm5 - movups %xmm4,32(%edi) - pxor %xmm4,%xmm4 - leal 48(%edi),%edi - movaps %xmm5,%xmm2 - pxor %xmm5,%xmm5 - subl $64,%eax - jmp .L088cbc_dec_tail_collected -.align 16 -.L083cbc_dec_clear_tail_collected: - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 -.L088cbc_dec_tail_collected: - andl $15,%eax - jnz .L090cbc_dec_tail_partial - movups %xmm2,(%edi) - pxor %xmm0,%xmm0 - jmp .L079cbc_ret -.align 16 -.L090cbc_dec_tail_partial: - movaps %xmm2,(%esp) - pxor %xmm0,%xmm0 - movl $16,%ecx - movl %esp,%esi - subl %eax,%ecx -.long 2767451785 - movdqa %xmm2,(%esp) -.L079cbc_ret: - movl 16(%esp),%esp - movl 36(%esp),%ebp - pxor %xmm2,%xmm2 - pxor %xmm1,%xmm1 - movups %xmm7,(%ebp) - pxor %xmm7,%xmm7 -.L074cbc_abort: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size aesni_cbc_encrypt,.-.L_aesni_cbc_encrypt_begin -.hidden _aesni_set_encrypt_key -.type _aesni_set_encrypt_key,@function -.align 16 -_aesni_set_encrypt_key: - pushl %ebp - pushl %ebx - testl %eax,%eax - jz .L091bad_pointer - testl %edx,%edx - jz .L091bad_pointer - call .L092pic -.L092pic: - popl %ebx - leal .Lkey_const-.L092pic(%ebx),%ebx - leal OPENSSL_ia32cap_P-.Lkey_const(%ebx),%ebp - movups (%eax),%xmm0 - xorps %xmm4,%xmm4 - movl 4(%ebp),%ebp - leal 16(%edx),%edx - andl $268437504,%ebp - cmpl $256,%ecx - je .L09314rounds - cmpl $192,%ecx - je .L09412rounds - cmpl $128,%ecx - jne .L095bad_keybits -.align 16 -.L09610rounds: - cmpl $268435456,%ebp - je .L09710rounds_alt - movl $9,%ecx - movups %xmm0,-16(%edx) -.byte 102,15,58,223,200,1 - call .L098key_128_cold -.byte 102,15,58,223,200,2 - call .L099key_128 -.byte 102,15,58,223,200,4 - call .L099key_128 -.byte 102,15,58,223,200,8 - call .L099key_128 -.byte 102,15,58,223,200,16 - call .L099key_128 -.byte 102,15,58,223,200,32 - call .L099key_128 -.byte 102,15,58,223,200,64 - call .L099key_128 -.byte 102,15,58,223,200,128 - call .L099key_128 -.byte 102,15,58,223,200,27 - call .L099key_128 -.byte 102,15,58,223,200,54 - call .L099key_128 - movups %xmm0,(%edx) - movl %ecx,80(%edx) - jmp .L100good_key -.align 16 -.L099key_128: - movups %xmm0,(%edx) - leal 16(%edx),%edx -.L098key_128_cold: - shufps $16,%xmm0,%xmm4 - xorps %xmm4,%xmm0 - shufps $140,%xmm0,%xmm4 - xorps %xmm4,%xmm0 - shufps $255,%xmm1,%xmm1 - xorps %xmm1,%xmm0 - ret -.align 16 -.L09710rounds_alt: - movdqa (%ebx),%xmm5 - movl $8,%ecx - movdqa 32(%ebx),%xmm4 - movdqa %xmm0,%xmm2 - movdqu %xmm0,-16(%edx) -.L101loop_key128: -.byte 102,15,56,0,197 -.byte 102,15,56,221,196 - pslld $1,%xmm4 - leal 16(%edx),%edx - movdqa %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm3,%xmm2 - pxor %xmm2,%xmm0 - movdqu %xmm0,-16(%edx) - movdqa %xmm0,%xmm2 - decl %ecx - jnz .L101loop_key128 - movdqa 48(%ebx),%xmm4 -.byte 102,15,56,0,197 -.byte 102,15,56,221,196 - pslld $1,%xmm4 - movdqa %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm3,%xmm2 - pxor %xmm2,%xmm0 - movdqu %xmm0,(%edx) - movdqa %xmm0,%xmm2 -.byte 102,15,56,0,197 -.byte 102,15,56,221,196 - movdqa %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm3,%xmm2 - pxor %xmm2,%xmm0 - movdqu %xmm0,16(%edx) - movl $9,%ecx - movl %ecx,96(%edx) - jmp .L100good_key -.align 16 -.L09412rounds: - movq 16(%eax),%xmm2 - cmpl $268435456,%ebp - je .L10212rounds_alt - movl $11,%ecx - movups %xmm0,-16(%edx) -.byte 102,15,58,223,202,1 - call .L103key_192a_cold -.byte 102,15,58,223,202,2 - call .L104key_192b -.byte 102,15,58,223,202,4 - call .L105key_192a -.byte 102,15,58,223,202,8 - call .L104key_192b -.byte 102,15,58,223,202,16 - call .L105key_192a -.byte 102,15,58,223,202,32 - call .L104key_192b -.byte 102,15,58,223,202,64 - call .L105key_192a -.byte 102,15,58,223,202,128 - call .L104key_192b - movups %xmm0,(%edx) - movl %ecx,48(%edx) - jmp .L100good_key -.align 16 -.L105key_192a: - movups %xmm0,(%edx) - leal 16(%edx),%edx -.align 16 -.L103key_192a_cold: - movaps %xmm2,%xmm5 -.L106key_192b_warm: - shufps $16,%xmm0,%xmm4 - movdqa %xmm2,%xmm3 - xorps %xmm4,%xmm0 - shufps $140,%xmm0,%xmm4 - pslldq $4,%xmm3 - xorps %xmm4,%xmm0 - pshufd $85,%xmm1,%xmm1 - pxor %xmm3,%xmm2 - pxor %xmm1,%xmm0 - pshufd $255,%xmm0,%xmm3 - pxor %xmm3,%xmm2 - ret -.align 16 -.L104key_192b: - movaps %xmm0,%xmm3 - shufps $68,%xmm0,%xmm5 - movups %xmm5,(%edx) - shufps $78,%xmm2,%xmm3 - movups %xmm3,16(%edx) - leal 32(%edx),%edx - jmp .L106key_192b_warm -.align 16 -.L10212rounds_alt: - movdqa 16(%ebx),%xmm5 - movdqa 32(%ebx),%xmm4 - movl $8,%ecx - movdqu %xmm0,-16(%edx) -.L107loop_key192: - movq %xmm2,(%edx) - movdqa %xmm2,%xmm1 -.byte 102,15,56,0,213 -.byte 102,15,56,221,212 - pslld $1,%xmm4 - leal 24(%edx),%edx - movdqa %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm3,%xmm0 - pshufd $255,%xmm0,%xmm3 - pxor %xmm1,%xmm3 - pslldq $4,%xmm1 - pxor %xmm1,%xmm3 - pxor %xmm2,%xmm0 - pxor %xmm3,%xmm2 - movdqu %xmm0,-16(%edx) - decl %ecx - jnz .L107loop_key192 - movl $11,%ecx - movl %ecx,32(%edx) - jmp .L100good_key -.align 16 -.L09314rounds: - movups 16(%eax),%xmm2 - leal 16(%edx),%edx - cmpl $268435456,%ebp - je .L10814rounds_alt - movl $13,%ecx - movups %xmm0,-32(%edx) - movups %xmm2,-16(%edx) -.byte 102,15,58,223,202,1 - call .L109key_256a_cold -.byte 102,15,58,223,200,1 - call .L110key_256b -.byte 102,15,58,223,202,2 - call .L111key_256a -.byte 102,15,58,223,200,2 - call .L110key_256b -.byte 102,15,58,223,202,4 - call .L111key_256a -.byte 102,15,58,223,200,4 - call .L110key_256b -.byte 102,15,58,223,202,8 - call .L111key_256a -.byte 102,15,58,223,200,8 - call .L110key_256b -.byte 102,15,58,223,202,16 - call .L111key_256a -.byte 102,15,58,223,200,16 - call .L110key_256b -.byte 102,15,58,223,202,32 - call .L111key_256a -.byte 102,15,58,223,200,32 - call .L110key_256b -.byte 102,15,58,223,202,64 - call .L111key_256a - movups %xmm0,(%edx) - movl %ecx,16(%edx) - xorl %eax,%eax - jmp .L100good_key -.align 16 -.L111key_256a: - movups %xmm2,(%edx) - leal 16(%edx),%edx -.L109key_256a_cold: - shufps $16,%xmm0,%xmm4 - xorps %xmm4,%xmm0 - shufps $140,%xmm0,%xmm4 - xorps %xmm4,%xmm0 - shufps $255,%xmm1,%xmm1 - xorps %xmm1,%xmm0 - ret -.align 16 -.L110key_256b: - movups %xmm0,(%edx) - leal 16(%edx),%edx - shufps $16,%xmm2,%xmm4 - xorps %xmm4,%xmm2 - shufps $140,%xmm2,%xmm4 - xorps %xmm4,%xmm2 - shufps $170,%xmm1,%xmm1 - xorps %xmm1,%xmm2 - ret -.align 16 -.L10814rounds_alt: - movdqa (%ebx),%xmm5 - movdqa 32(%ebx),%xmm4 - movl $7,%ecx - movdqu %xmm0,-32(%edx) - movdqa %xmm2,%xmm1 - movdqu %xmm2,-16(%edx) -.L112loop_key256: -.byte 102,15,56,0,213 -.byte 102,15,56,221,212 - movdqa %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm3,%xmm0 - pslld $1,%xmm4 - pxor %xmm2,%xmm0 - movdqu %xmm0,(%edx) - decl %ecx - jz .L113done_key256 - pshufd $255,%xmm0,%xmm2 - pxor %xmm3,%xmm3 -.byte 102,15,56,221,211 - movdqa %xmm1,%xmm3 - pslldq $4,%xmm1 - pxor %xmm1,%xmm3 - pslldq $4,%xmm1 - pxor %xmm1,%xmm3 - pslldq $4,%xmm1 - pxor %xmm3,%xmm1 - pxor %xmm1,%xmm2 - movdqu %xmm2,16(%edx) - leal 32(%edx),%edx - movdqa %xmm2,%xmm1 - jmp .L112loop_key256 -.L113done_key256: - movl $13,%ecx - movl %ecx,16(%edx) -.L100good_key: - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - xorl %eax,%eax - popl %ebx - popl %ebp - ret -.align 4 -.L091bad_pointer: - movl $-1,%eax - popl %ebx - popl %ebp - ret -.align 4 -.L095bad_keybits: - pxor %xmm0,%xmm0 - movl $-2,%eax - popl %ebx - popl %ebp - ret -.size _aesni_set_encrypt_key,.-_aesni_set_encrypt_key -.globl aesni_set_encrypt_key -.hidden aesni_set_encrypt_key -.type aesni_set_encrypt_key,@function -.align 16 -aesni_set_encrypt_key: -.L_aesni_set_encrypt_key_begin: - movl 4(%esp),%eax - movl 8(%esp),%ecx - movl 12(%esp),%edx - call _aesni_set_encrypt_key - ret -.size aesni_set_encrypt_key,.-.L_aesni_set_encrypt_key_begin -.globl aesni_set_decrypt_key -.hidden aesni_set_decrypt_key -.type aesni_set_decrypt_key,@function -.align 16 -aesni_set_decrypt_key: -.L_aesni_set_decrypt_key_begin: - movl 4(%esp),%eax - movl 8(%esp),%ecx - movl 12(%esp),%edx - call _aesni_set_encrypt_key - movl 12(%esp),%edx - shll $4,%ecx - testl %eax,%eax - jnz .L114dec_key_ret - leal 16(%edx,%ecx,1),%eax - movups (%edx),%xmm0 - movups (%eax),%xmm1 - movups %xmm0,(%eax) - movups %xmm1,(%edx) - leal 16(%edx),%edx - leal -16(%eax),%eax -.L115dec_key_inverse: - movups (%edx),%xmm0 - movups (%eax),%xmm1 -.byte 102,15,56,219,192 -.byte 102,15,56,219,201 - leal 16(%edx),%edx - leal -16(%eax),%eax - movups %xmm0,16(%eax) - movups %xmm1,-16(%edx) - cmpl %edx,%eax - ja .L115dec_key_inverse - movups (%edx),%xmm0 -.byte 102,15,56,219,192 - movups %xmm0,(%edx) - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - xorl %eax,%eax -.L114dec_key_ret: - ret -.size aesni_set_decrypt_key,.-.L_aesni_set_decrypt_key_begin -.align 64 -.Lkey_const: -.long 202313229,202313229,202313229,202313229 -.long 67569157,67569157,67569157,67569157 -.long 1,1,1,1 -.long 27,27,27,27 -.byte 65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69 -.byte 83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83 -.byte 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115 -.byte 115,108,46,111,114,103,62,0 -#endif diff --git a/third_party/boringssl/linux-x86/crypto/aes/vpaes-x86.S b/third_party/boringssl/linux-x86/crypto/aes/vpaes-x86.S deleted file mode 100644 index 9aede39484420..0000000000000 --- a/third_party/boringssl/linux-x86/crypto/aes/vpaes-x86.S +++ /dev/null @@ -1,676 +0,0 @@ -#if defined(__i386__) -.file "vpaes-x86.S" -.text -.align 64 -.L_vpaes_consts: -.long 218628480,235210255,168496130,67568393 -.long 252381056,17041926,33884169,51187212 -.long 252645135,252645135,252645135,252645135 -.long 1512730624,3266504856,1377990664,3401244816 -.long 830229760,1275146365,2969422977,3447763452 -.long 3411033600,2979783055,338359620,2782886510 -.long 4209124096,907596821,221174255,1006095553 -.long 191964160,3799684038,3164090317,1589111125 -.long 182528256,1777043520,2877432650,3265356744 -.long 1874708224,3503451415,3305285752,363511674 -.long 1606117888,3487855781,1093350906,2384367825 -.long 197121,67569157,134941193,202313229 -.long 67569157,134941193,202313229,197121 -.long 134941193,202313229,197121,67569157 -.long 202313229,197121,67569157,134941193 -.long 33619971,100992007,168364043,235736079 -.long 235736079,33619971,100992007,168364043 -.long 168364043,235736079,33619971,100992007 -.long 100992007,168364043,235736079,33619971 -.long 50462976,117835012,185207048,252579084 -.long 252314880,51251460,117574920,184942860 -.long 184682752,252054788,50987272,118359308 -.long 118099200,185467140,251790600,50727180 -.long 2946363062,528716217,1300004225,1881839624 -.long 1532713819,1532713819,1532713819,1532713819 -.long 3602276352,4288629033,3737020424,4153884961 -.long 1354558464,32357713,2958822624,3775749553 -.long 1201988352,132424512,1572796698,503232858 -.long 2213177600,1597421020,4103937655,675398315 -.long 2749646592,4273543773,1511898873,121693092 -.long 3040248576,1103263732,2871565598,1608280554 -.long 2236667136,2588920351,482954393,64377734 -.long 3069987328,291237287,2117370568,3650299247 -.long 533321216,3573750986,2572112006,1401264716 -.long 1339849704,2721158661,548607111,3445553514 -.long 2128193280,3054596040,2183486460,1257083700 -.long 655635200,1165381986,3923443150,2344132524 -.long 190078720,256924420,290342170,357187870 -.long 1610966272,2263057382,4103205268,309794674 -.long 2592527872,2233205587,1335446729,3402964816 -.long 3973531904,3225098121,3002836325,1918774430 -.long 3870401024,2102906079,2284471353,4117666579 -.long 617007872,1021508343,366931923,691083277 -.long 2528395776,3491914898,2968704004,1613121270 -.long 3445188352,3247741094,844474987,4093578302 -.long 651481088,1190302358,1689581232,574775300 -.long 4289380608,206939853,2555985458,2489840491 -.long 2130264064,327674451,3566485037,3349835193 -.long 2470714624,316102159,3636825756,3393945945 -.byte 86,101,99,116,111,114,32,80,101,114,109,117,116,97,116,105 -.byte 111,110,32,65,69,83,32,102,111,114,32,120,56,54,47,83 -.byte 83,83,69,51,44,32,77,105,107,101,32,72,97,109,98,117 -.byte 114,103,32,40,83,116,97,110,102,111,114,100,32,85,110,105 -.byte 118,101,114,115,105,116,121,41,0 -.align 64 -.hidden _vpaes_preheat -.type _vpaes_preheat,@function -.align 16 -_vpaes_preheat: - addl (%esp),%ebp - movdqa -48(%ebp),%xmm7 - movdqa -16(%ebp),%xmm6 - ret -.size _vpaes_preheat,.-_vpaes_preheat -.hidden _vpaes_encrypt_core -.type _vpaes_encrypt_core,@function -.align 16 -_vpaes_encrypt_core: - movl $16,%ecx - movl 240(%edx),%eax - movdqa %xmm6,%xmm1 - movdqa (%ebp),%xmm2 - pandn %xmm0,%xmm1 - pand %xmm6,%xmm0 - movdqu (%edx),%xmm5 -.byte 102,15,56,0,208 - movdqa 16(%ebp),%xmm0 - pxor %xmm5,%xmm2 - psrld $4,%xmm1 - addl $16,%edx -.byte 102,15,56,0,193 - leal 192(%ebp),%ebx - pxor %xmm2,%xmm0 - jmp .L000enc_entry -.align 16 -.L001enc_loop: - movdqa 32(%ebp),%xmm4 - movdqa 48(%ebp),%xmm0 -.byte 102,15,56,0,226 -.byte 102,15,56,0,195 - pxor %xmm5,%xmm4 - movdqa 64(%ebp),%xmm5 - pxor %xmm4,%xmm0 - movdqa -64(%ebx,%ecx,1),%xmm1 -.byte 102,15,56,0,234 - movdqa 80(%ebp),%xmm2 - movdqa (%ebx,%ecx,1),%xmm4 -.byte 102,15,56,0,211 - movdqa %xmm0,%xmm3 - pxor %xmm5,%xmm2 -.byte 102,15,56,0,193 - addl $16,%edx - pxor %xmm2,%xmm0 -.byte 102,15,56,0,220 - addl $16,%ecx - pxor %xmm0,%xmm3 -.byte 102,15,56,0,193 - andl $48,%ecx - subl $1,%eax - pxor %xmm3,%xmm0 -.L000enc_entry: - movdqa %xmm6,%xmm1 - movdqa -32(%ebp),%xmm5 - pandn %xmm0,%xmm1 - psrld $4,%xmm1 - pand %xmm6,%xmm0 -.byte 102,15,56,0,232 - movdqa %xmm7,%xmm3 - pxor %xmm1,%xmm0 -.byte 102,15,56,0,217 - movdqa %xmm7,%xmm4 - pxor %xmm5,%xmm3 -.byte 102,15,56,0,224 - movdqa %xmm7,%xmm2 - pxor %xmm5,%xmm4 -.byte 102,15,56,0,211 - movdqa %xmm7,%xmm3 - pxor %xmm0,%xmm2 -.byte 102,15,56,0,220 - movdqu (%edx),%xmm5 - pxor %xmm1,%xmm3 - jnz .L001enc_loop - movdqa 96(%ebp),%xmm4 - movdqa 112(%ebp),%xmm0 -.byte 102,15,56,0,226 - pxor %xmm5,%xmm4 -.byte 102,15,56,0,195 - movdqa 64(%ebx,%ecx,1),%xmm1 - pxor %xmm4,%xmm0 -.byte 102,15,56,0,193 - ret -.size _vpaes_encrypt_core,.-_vpaes_encrypt_core -.hidden _vpaes_decrypt_core -.type _vpaes_decrypt_core,@function -.align 16 -_vpaes_decrypt_core: - leal 608(%ebp),%ebx - movl 240(%edx),%eax - movdqa %xmm6,%xmm1 - movdqa -64(%ebx),%xmm2 - pandn %xmm0,%xmm1 - movl %eax,%ecx - psrld $4,%xmm1 - movdqu (%edx),%xmm5 - shll $4,%ecx - pand %xmm6,%xmm0 -.byte 102,15,56,0,208 - movdqa -48(%ebx),%xmm0 - xorl $48,%ecx -.byte 102,15,56,0,193 - andl $48,%ecx - pxor %xmm5,%xmm2 - movdqa 176(%ebp),%xmm5 - pxor %xmm2,%xmm0 - addl $16,%edx - leal -352(%ebx,%ecx,1),%ecx - jmp .L002dec_entry -.align 16 -.L003dec_loop: - movdqa -32(%ebx),%xmm4 - movdqa -16(%ebx),%xmm1 -.byte 102,15,56,0,226 -.byte 102,15,56,0,203 - pxor %xmm4,%xmm0 - movdqa (%ebx),%xmm4 - pxor %xmm1,%xmm0 - movdqa 16(%ebx),%xmm1 -.byte 102,15,56,0,226 -.byte 102,15,56,0,197 -.byte 102,15,56,0,203 - pxor %xmm4,%xmm0 - movdqa 32(%ebx),%xmm4 - pxor %xmm1,%xmm0 - movdqa 48(%ebx),%xmm1 -.byte 102,15,56,0,226 -.byte 102,15,56,0,197 -.byte 102,15,56,0,203 - pxor %xmm4,%xmm0 - movdqa 64(%ebx),%xmm4 - pxor %xmm1,%xmm0 - movdqa 80(%ebx),%xmm1 -.byte 102,15,56,0,226 -.byte 102,15,56,0,197 -.byte 102,15,56,0,203 - pxor %xmm4,%xmm0 - addl $16,%edx -.byte 102,15,58,15,237,12 - pxor %xmm1,%xmm0 - subl $1,%eax -.L002dec_entry: - movdqa %xmm6,%xmm1 - movdqa -32(%ebp),%xmm2 - pandn %xmm0,%xmm1 - pand %xmm6,%xmm0 - psrld $4,%xmm1 -.byte 102,15,56,0,208 - movdqa %xmm7,%xmm3 - pxor %xmm1,%xmm0 -.byte 102,15,56,0,217 - movdqa %xmm7,%xmm4 - pxor %xmm2,%xmm3 -.byte 102,15,56,0,224 - pxor %xmm2,%xmm4 - movdqa %xmm7,%xmm2 -.byte 102,15,56,0,211 - movdqa %xmm7,%xmm3 - pxor %xmm0,%xmm2 -.byte 102,15,56,0,220 - movdqu (%edx),%xmm0 - pxor %xmm1,%xmm3 - jnz .L003dec_loop - movdqa 96(%ebx),%xmm4 -.byte 102,15,56,0,226 - pxor %xmm0,%xmm4 - movdqa 112(%ebx),%xmm0 - movdqa (%ecx),%xmm2 -.byte 102,15,56,0,195 - pxor %xmm4,%xmm0 -.byte 102,15,56,0,194 - ret -.size _vpaes_decrypt_core,.-_vpaes_decrypt_core -.hidden _vpaes_schedule_core -.type _vpaes_schedule_core,@function -.align 16 -_vpaes_schedule_core: - addl (%esp),%ebp - movdqu (%esi),%xmm0 - movdqa 320(%ebp),%xmm2 - movdqa %xmm0,%xmm3 - leal (%ebp),%ebx - movdqa %xmm2,4(%esp) - call _vpaes_schedule_transform - movdqa %xmm0,%xmm7 - testl %edi,%edi - jnz .L004schedule_am_decrypting - movdqu %xmm0,(%edx) - jmp .L005schedule_go -.L004schedule_am_decrypting: - movdqa 256(%ebp,%ecx,1),%xmm1 -.byte 102,15,56,0,217 - movdqu %xmm3,(%edx) - xorl $48,%ecx -.L005schedule_go: - cmpl $192,%eax - ja .L006schedule_256 - je .L007schedule_192 -.L008schedule_128: - movl $10,%eax -.L009loop_schedule_128: - call _vpaes_schedule_round - decl %eax - jz .L010schedule_mangle_last - call _vpaes_schedule_mangle - jmp .L009loop_schedule_128 -.align 16 -.L007schedule_192: - movdqu 8(%esi),%xmm0 - call _vpaes_schedule_transform - movdqa %xmm0,%xmm6 - pxor %xmm4,%xmm4 - movhlps %xmm4,%xmm6 - movl $4,%eax -.L011loop_schedule_192: - call _vpaes_schedule_round -.byte 102,15,58,15,198,8 - call _vpaes_schedule_mangle - call _vpaes_schedule_192_smear - call _vpaes_schedule_mangle - call _vpaes_schedule_round - decl %eax - jz .L010schedule_mangle_last - call _vpaes_schedule_mangle - call _vpaes_schedule_192_smear - jmp .L011loop_schedule_192 -.align 16 -.L006schedule_256: - movdqu 16(%esi),%xmm0 - call _vpaes_schedule_transform - movl $7,%eax -.L012loop_schedule_256: - call _vpaes_schedule_mangle - movdqa %xmm0,%xmm6 - call _vpaes_schedule_round - decl %eax - jz .L010schedule_mangle_last - call _vpaes_schedule_mangle - pshufd $255,%xmm0,%xmm0 - movdqa %xmm7,20(%esp) - movdqa %xmm6,%xmm7 - call .L_vpaes_schedule_low_round - movdqa 20(%esp),%xmm7 - jmp .L012loop_schedule_256 -.align 16 -.L010schedule_mangle_last: - leal 384(%ebp),%ebx - testl %edi,%edi - jnz .L013schedule_mangle_last_dec - movdqa 256(%ebp,%ecx,1),%xmm1 -.byte 102,15,56,0,193 - leal 352(%ebp),%ebx - addl $32,%edx -.L013schedule_mangle_last_dec: - addl $-16,%edx - pxor 336(%ebp),%xmm0 - call _vpaes_schedule_transform - movdqu %xmm0,(%edx) - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - ret -.size _vpaes_schedule_core,.-_vpaes_schedule_core -.hidden _vpaes_schedule_192_smear -.type _vpaes_schedule_192_smear,@function -.align 16 -_vpaes_schedule_192_smear: - pshufd $128,%xmm6,%xmm1 - pshufd $254,%xmm7,%xmm0 - pxor %xmm1,%xmm6 - pxor %xmm1,%xmm1 - pxor %xmm0,%xmm6 - movdqa %xmm6,%xmm0 - movhlps %xmm1,%xmm6 - ret -.size _vpaes_schedule_192_smear,.-_vpaes_schedule_192_smear -.hidden _vpaes_schedule_round -.type _vpaes_schedule_round,@function -.align 16 -_vpaes_schedule_round: - movdqa 8(%esp),%xmm2 - pxor %xmm1,%xmm1 -.byte 102,15,58,15,202,15 -.byte 102,15,58,15,210,15 - pxor %xmm1,%xmm7 - pshufd $255,%xmm0,%xmm0 -.byte 102,15,58,15,192,1 - movdqa %xmm2,8(%esp) -.L_vpaes_schedule_low_round: - movdqa %xmm7,%xmm1 - pslldq $4,%xmm7 - pxor %xmm1,%xmm7 - movdqa %xmm7,%xmm1 - pslldq $8,%xmm7 - pxor %xmm1,%xmm7 - pxor 336(%ebp),%xmm7 - movdqa -16(%ebp),%xmm4 - movdqa -48(%ebp),%xmm5 - movdqa %xmm4,%xmm1 - pandn %xmm0,%xmm1 - psrld $4,%xmm1 - pand %xmm4,%xmm0 - movdqa -32(%ebp),%xmm2 -.byte 102,15,56,0,208 - pxor %xmm1,%xmm0 - movdqa %xmm5,%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 - movdqa %xmm5,%xmm4 -.byte 102,15,56,0,224 - pxor %xmm2,%xmm4 - movdqa %xmm5,%xmm2 -.byte 102,15,56,0,211 - pxor %xmm0,%xmm2 - movdqa %xmm5,%xmm3 -.byte 102,15,56,0,220 - pxor %xmm1,%xmm3 - movdqa 32(%ebp),%xmm4 -.byte 102,15,56,0,226 - movdqa 48(%ebp),%xmm0 -.byte 102,15,56,0,195 - pxor %xmm4,%xmm0 - pxor %xmm7,%xmm0 - movdqa %xmm0,%xmm7 - ret -.size _vpaes_schedule_round,.-_vpaes_schedule_round -.hidden _vpaes_schedule_transform -.type _vpaes_schedule_transform,@function -.align 16 -_vpaes_schedule_transform: - movdqa -16(%ebp),%xmm2 - movdqa %xmm2,%xmm1 - pandn %xmm0,%xmm1 - psrld $4,%xmm1 - pand %xmm2,%xmm0 - movdqa (%ebx),%xmm2 -.byte 102,15,56,0,208 - movdqa 16(%ebx),%xmm0 -.byte 102,15,56,0,193 - pxor %xmm2,%xmm0 - ret -.size _vpaes_schedule_transform,.-_vpaes_schedule_transform -.hidden _vpaes_schedule_mangle -.type _vpaes_schedule_mangle,@function -.align 16 -_vpaes_schedule_mangle: - movdqa %xmm0,%xmm4 - movdqa 128(%ebp),%xmm5 - testl %edi,%edi - jnz .L014schedule_mangle_dec - addl $16,%edx - pxor 336(%ebp),%xmm4 -.byte 102,15,56,0,229 - movdqa %xmm4,%xmm3 -.byte 102,15,56,0,229 - pxor %xmm4,%xmm3 -.byte 102,15,56,0,229 - pxor %xmm4,%xmm3 - jmp .L015schedule_mangle_both -.align 16 -.L014schedule_mangle_dec: - movdqa -16(%ebp),%xmm2 - leal 416(%ebp),%esi - movdqa %xmm2,%xmm1 - pandn %xmm4,%xmm1 - psrld $4,%xmm1 - pand %xmm2,%xmm4 - movdqa (%esi),%xmm2 -.byte 102,15,56,0,212 - movdqa 16(%esi),%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 -.byte 102,15,56,0,221 - movdqa 32(%esi),%xmm2 -.byte 102,15,56,0,212 - pxor %xmm3,%xmm2 - movdqa 48(%esi),%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 -.byte 102,15,56,0,221 - movdqa 64(%esi),%xmm2 -.byte 102,15,56,0,212 - pxor %xmm3,%xmm2 - movdqa 80(%esi),%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 -.byte 102,15,56,0,221 - movdqa 96(%esi),%xmm2 -.byte 102,15,56,0,212 - pxor %xmm3,%xmm2 - movdqa 112(%esi),%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 - addl $-16,%edx -.L015schedule_mangle_both: - movdqa 256(%ebp,%ecx,1),%xmm1 -.byte 102,15,56,0,217 - addl $-16,%ecx - andl $48,%ecx - movdqu %xmm3,(%edx) - ret -.size _vpaes_schedule_mangle,.-_vpaes_schedule_mangle -.globl vpaes_set_encrypt_key -.hidden vpaes_set_encrypt_key -.type vpaes_set_encrypt_key,@function -.align 16 -vpaes_set_encrypt_key: -.L_vpaes_set_encrypt_key_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - leal -56(%esp),%ebx - movl 24(%esp),%eax - andl $-16,%ebx - movl 28(%esp),%edx - xchgl %esp,%ebx - movl %ebx,48(%esp) - movl %eax,%ebx - shrl $5,%ebx - addl $5,%ebx - movl %ebx,240(%edx) - movl $48,%ecx - movl $0,%edi - leal .L_vpaes_consts+0x30-.L016pic_point,%ebp - call _vpaes_schedule_core -.L016pic_point: - movl 48(%esp),%esp - xorl %eax,%eax - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size vpaes_set_encrypt_key,.-.L_vpaes_set_encrypt_key_begin -.globl vpaes_set_decrypt_key -.hidden vpaes_set_decrypt_key -.type vpaes_set_decrypt_key,@function -.align 16 -vpaes_set_decrypt_key: -.L_vpaes_set_decrypt_key_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - leal -56(%esp),%ebx - movl 24(%esp),%eax - andl $-16,%ebx - movl 28(%esp),%edx - xchgl %esp,%ebx - movl %ebx,48(%esp) - movl %eax,%ebx - shrl $5,%ebx - addl $5,%ebx - movl %ebx,240(%edx) - shll $4,%ebx - leal 16(%edx,%ebx,1),%edx - movl $1,%edi - movl %eax,%ecx - shrl $1,%ecx - andl $32,%ecx - xorl $32,%ecx - leal .L_vpaes_consts+0x30-.L017pic_point,%ebp - call _vpaes_schedule_core -.L017pic_point: - movl 48(%esp),%esp - xorl %eax,%eax - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size vpaes_set_decrypt_key,.-.L_vpaes_set_decrypt_key_begin -.globl vpaes_encrypt -.hidden vpaes_encrypt -.type vpaes_encrypt,@function -.align 16 -vpaes_encrypt: -.L_vpaes_encrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - leal .L_vpaes_consts+0x30-.L018pic_point,%ebp - call _vpaes_preheat -.L018pic_point: - movl 20(%esp),%esi - leal -56(%esp),%ebx - movl 24(%esp),%edi - andl $-16,%ebx - movl 28(%esp),%edx - xchgl %esp,%ebx - movl %ebx,48(%esp) - movdqu (%esi),%xmm0 - call _vpaes_encrypt_core - movdqu %xmm0,(%edi) - movl 48(%esp),%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size vpaes_encrypt,.-.L_vpaes_encrypt_begin -.globl vpaes_decrypt -.hidden vpaes_decrypt -.type vpaes_decrypt,@function -.align 16 -vpaes_decrypt: -.L_vpaes_decrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - leal .L_vpaes_consts+0x30-.L019pic_point,%ebp - call _vpaes_preheat -.L019pic_point: - movl 20(%esp),%esi - leal -56(%esp),%ebx - movl 24(%esp),%edi - andl $-16,%ebx - movl 28(%esp),%edx - xchgl %esp,%ebx - movl %ebx,48(%esp) - movdqu (%esi),%xmm0 - call _vpaes_decrypt_core - movdqu %xmm0,(%edi) - movl 48(%esp),%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size vpaes_decrypt,.-.L_vpaes_decrypt_begin -.globl vpaes_cbc_encrypt -.hidden vpaes_cbc_encrypt -.type vpaes_cbc_encrypt,@function -.align 16 -vpaes_cbc_encrypt: -.L_vpaes_cbc_encrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%eax - movl 32(%esp),%edx - subl $16,%eax - jc .L020cbc_abort - leal -56(%esp),%ebx - movl 36(%esp),%ebp - andl $-16,%ebx - movl 40(%esp),%ecx - xchgl %esp,%ebx - movdqu (%ebp),%xmm1 - subl %esi,%edi - movl %ebx,48(%esp) - movl %edi,(%esp) - movl %edx,4(%esp) - movl %ebp,8(%esp) - movl %eax,%edi - leal .L_vpaes_consts+0x30-.L021pic_point,%ebp - call _vpaes_preheat -.L021pic_point: - cmpl $0,%ecx - je .L022cbc_dec_loop - jmp .L023cbc_enc_loop -.align 16 -.L023cbc_enc_loop: - movdqu (%esi),%xmm0 - pxor %xmm1,%xmm0 - call _vpaes_encrypt_core - movl (%esp),%ebx - movl 4(%esp),%edx - movdqa %xmm0,%xmm1 - movdqu %xmm0,(%ebx,%esi,1) - leal 16(%esi),%esi - subl $16,%edi - jnc .L023cbc_enc_loop - jmp .L024cbc_done -.align 16 -.L022cbc_dec_loop: - movdqu (%esi),%xmm0 - movdqa %xmm1,16(%esp) - movdqa %xmm0,32(%esp) - call _vpaes_decrypt_core - movl (%esp),%ebx - movl 4(%esp),%edx - pxor 16(%esp),%xmm0 - movdqa 32(%esp),%xmm1 - movdqu %xmm0,(%ebx,%esi,1) - leal 16(%esi),%esi - subl $16,%edi - jnc .L022cbc_dec_loop -.L024cbc_done: - movl 8(%esp),%ebx - movl 48(%esp),%esp - movdqu %xmm1,(%ebx) -.L020cbc_abort: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size vpaes_cbc_encrypt,.-.L_vpaes_cbc_encrypt_begin -#endif diff --git a/third_party/boringssl/linux-x86/crypto/bn/bn-586.S b/third_party/boringssl/linux-x86/crypto/bn/bn-586.S deleted file mode 100644 index 773beff9c11f2..0000000000000 --- a/third_party/boringssl/linux-x86/crypto/bn/bn-586.S +++ /dev/null @@ -1,1538 +0,0 @@ -#if defined(__i386__) -.file "src/crypto/bn/asm/bn-586.S" -.text -.globl bn_mul_add_words -.hidden bn_mul_add_words -.type bn_mul_add_words,@function -.align 16 -bn_mul_add_words: -.L_bn_mul_add_words_begin: - call .L000PIC_me_up -.L000PIC_me_up: - popl %eax - leal OPENSSL_ia32cap_P-.L000PIC_me_up(%eax),%eax - btl $26,(%eax) - jnc .L001maw_non_sse2 - movl 4(%esp),%eax - movl 8(%esp),%edx - movl 12(%esp),%ecx - movd 16(%esp),%mm0 - pxor %mm1,%mm1 - jmp .L002maw_sse2_entry -.align 16 -.L003maw_sse2_unrolled: - movd (%eax),%mm3 - paddq %mm3,%mm1 - movd (%edx),%mm2 - pmuludq %mm0,%mm2 - movd 4(%edx),%mm4 - pmuludq %mm0,%mm4 - movd 8(%edx),%mm6 - pmuludq %mm0,%mm6 - movd 12(%edx),%mm7 - pmuludq %mm0,%mm7 - paddq %mm2,%mm1 - movd 4(%eax),%mm3 - paddq %mm4,%mm3 - movd 8(%eax),%mm5 - paddq %mm6,%mm5 - movd 12(%eax),%mm4 - paddq %mm4,%mm7 - movd %mm1,(%eax) - movd 16(%edx),%mm2 - pmuludq %mm0,%mm2 - psrlq $32,%mm1 - movd 20(%edx),%mm4 - pmuludq %mm0,%mm4 - paddq %mm3,%mm1 - movd 24(%edx),%mm6 - pmuludq %mm0,%mm6 - movd %mm1,4(%eax) - psrlq $32,%mm1 - movd 28(%edx),%mm3 - addl $32,%edx - pmuludq %mm0,%mm3 - paddq %mm5,%mm1 - movd 16(%eax),%mm5 - paddq %mm5,%mm2 - movd %mm1,8(%eax) - psrlq $32,%mm1 - paddq %mm7,%mm1 - movd 20(%eax),%mm5 - paddq %mm5,%mm4 - movd %mm1,12(%eax) - psrlq $32,%mm1 - paddq %mm2,%mm1 - movd 24(%eax),%mm5 - paddq %mm5,%mm6 - movd %mm1,16(%eax) - psrlq $32,%mm1 - paddq %mm4,%mm1 - movd 28(%eax),%mm5 - paddq %mm5,%mm3 - movd %mm1,20(%eax) - psrlq $32,%mm1 - paddq %mm6,%mm1 - movd %mm1,24(%eax) - psrlq $32,%mm1 - paddq %mm3,%mm1 - movd %mm1,28(%eax) - leal 32(%eax),%eax - psrlq $32,%mm1 - subl $8,%ecx - jz .L004maw_sse2_exit -.L002maw_sse2_entry: - testl $4294967288,%ecx - jnz .L003maw_sse2_unrolled -.align 4 -.L005maw_sse2_loop: - movd (%edx),%mm2 - movd (%eax),%mm3 - pmuludq %mm0,%mm2 - leal 4(%edx),%edx - paddq %mm3,%mm1 - paddq %mm2,%mm1 - movd %mm1,(%eax) - subl $1,%ecx - psrlq $32,%mm1 - leal 4(%eax),%eax - jnz .L005maw_sse2_loop -.L004maw_sse2_exit: - movd %mm1,%eax - emms - ret -.align 16 -.L001maw_non_sse2: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - - xorl %esi,%esi - movl 20(%esp),%edi - movl 28(%esp),%ecx - movl 24(%esp),%ebx - andl $4294967288,%ecx - movl 32(%esp),%ebp - pushl %ecx - jz .L006maw_finish -.align 16 -.L007maw_loop: - - movl (%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl (%edi),%eax - adcl $0,%edx - movl %eax,(%edi) - movl %edx,%esi - - movl 4(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 4(%edi),%eax - adcl $0,%edx - movl %eax,4(%edi) - movl %edx,%esi - - movl 8(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 8(%edi),%eax - adcl $0,%edx - movl %eax,8(%edi) - movl %edx,%esi - - movl 12(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 12(%edi),%eax - adcl $0,%edx - movl %eax,12(%edi) - movl %edx,%esi - - movl 16(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 16(%edi),%eax - adcl $0,%edx - movl %eax,16(%edi) - movl %edx,%esi - - movl 20(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 20(%edi),%eax - adcl $0,%edx - movl %eax,20(%edi) - movl %edx,%esi - - movl 24(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 24(%edi),%eax - adcl $0,%edx - movl %eax,24(%edi) - movl %edx,%esi - - movl 28(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 28(%edi),%eax - adcl $0,%edx - movl %eax,28(%edi) - movl %edx,%esi - - subl $8,%ecx - leal 32(%ebx),%ebx - leal 32(%edi),%edi - jnz .L007maw_loop -.L006maw_finish: - movl 32(%esp),%ecx - andl $7,%ecx - jnz .L008maw_finish2 - jmp .L009maw_end -.L008maw_finish2: - - movl (%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl (%edi),%eax - adcl $0,%edx - decl %ecx - movl %eax,(%edi) - movl %edx,%esi - jz .L009maw_end - - movl 4(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 4(%edi),%eax - adcl $0,%edx - decl %ecx - movl %eax,4(%edi) - movl %edx,%esi - jz .L009maw_end - - movl 8(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 8(%edi),%eax - adcl $0,%edx - decl %ecx - movl %eax,8(%edi) - movl %edx,%esi - jz .L009maw_end - - movl 12(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 12(%edi),%eax - adcl $0,%edx - decl %ecx - movl %eax,12(%edi) - movl %edx,%esi - jz .L009maw_end - - movl 16(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 16(%edi),%eax - adcl $0,%edx - decl %ecx - movl %eax,16(%edi) - movl %edx,%esi - jz .L009maw_end - - movl 20(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 20(%edi),%eax - adcl $0,%edx - decl %ecx - movl %eax,20(%edi) - movl %edx,%esi - jz .L009maw_end - - movl 24(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 24(%edi),%eax - adcl $0,%edx - movl %eax,24(%edi) - movl %edx,%esi -.L009maw_end: - movl %esi,%eax - popl %ecx - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size bn_mul_add_words,.-.L_bn_mul_add_words_begin -.globl bn_mul_words -.hidden bn_mul_words -.type bn_mul_words,@function -.align 16 -bn_mul_words: -.L_bn_mul_words_begin: - call .L010PIC_me_up -.L010PIC_me_up: - popl %eax - leal OPENSSL_ia32cap_P-.L010PIC_me_up(%eax),%eax - btl $26,(%eax) - jnc .L011mw_non_sse2 - movl 4(%esp),%eax - movl 8(%esp),%edx - movl 12(%esp),%ecx - movd 16(%esp),%mm0 - pxor %mm1,%mm1 -.align 16 -.L012mw_sse2_loop: - movd (%edx),%mm2 - pmuludq %mm0,%mm2 - leal 4(%edx),%edx - paddq %mm2,%mm1 - movd %mm1,(%eax) - subl $1,%ecx - psrlq $32,%mm1 - leal 4(%eax),%eax - jnz .L012mw_sse2_loop - movd %mm1,%eax - emms - ret -.align 16 -.L011mw_non_sse2: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - - xorl %esi,%esi - movl 20(%esp),%edi - movl 24(%esp),%ebx - movl 28(%esp),%ebp - movl 32(%esp),%ecx - andl $4294967288,%ebp - jz .L013mw_finish -.L014mw_loop: - - movl (%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,(%edi) - movl %edx,%esi - - movl 4(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,4(%edi) - movl %edx,%esi - - movl 8(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,8(%edi) - movl %edx,%esi - - movl 12(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,12(%edi) - movl %edx,%esi - - movl 16(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,16(%edi) - movl %edx,%esi - - movl 20(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,20(%edi) - movl %edx,%esi - - movl 24(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,24(%edi) - movl %edx,%esi - - movl 28(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,28(%edi) - movl %edx,%esi - - addl $32,%ebx - addl $32,%edi - subl $8,%ebp - jz .L013mw_finish - jmp .L014mw_loop -.L013mw_finish: - movl 28(%esp),%ebp - andl $7,%ebp - jnz .L015mw_finish2 - jmp .L016mw_end -.L015mw_finish2: - - movl (%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,(%edi) - movl %edx,%esi - decl %ebp - jz .L016mw_end - - movl 4(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,4(%edi) - movl %edx,%esi - decl %ebp - jz .L016mw_end - - movl 8(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,8(%edi) - movl %edx,%esi - decl %ebp - jz .L016mw_end - - movl 12(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,12(%edi) - movl %edx,%esi - decl %ebp - jz .L016mw_end - - movl 16(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,16(%edi) - movl %edx,%esi - decl %ebp - jz .L016mw_end - - movl 20(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,20(%edi) - movl %edx,%esi - decl %ebp - jz .L016mw_end - - movl 24(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,24(%edi) - movl %edx,%esi -.L016mw_end: - movl %esi,%eax - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size bn_mul_words,.-.L_bn_mul_words_begin -.globl bn_sqr_words -.hidden bn_sqr_words -.type bn_sqr_words,@function -.align 16 -bn_sqr_words: -.L_bn_sqr_words_begin: - call .L017PIC_me_up -.L017PIC_me_up: - popl %eax - leal OPENSSL_ia32cap_P-.L017PIC_me_up(%eax),%eax - btl $26,(%eax) - jnc .L018sqr_non_sse2 - movl 4(%esp),%eax - movl 8(%esp),%edx - movl 12(%esp),%ecx -.align 16 -.L019sqr_sse2_loop: - movd (%edx),%mm0 - pmuludq %mm0,%mm0 - leal 4(%edx),%edx - movq %mm0,(%eax) - subl $1,%ecx - leal 8(%eax),%eax - jnz .L019sqr_sse2_loop - emms - ret -.align 16 -.L018sqr_non_sse2: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%ebx - andl $4294967288,%ebx - jz .L020sw_finish -.L021sw_loop: - - movl (%edi),%eax - mull %eax - movl %eax,(%esi) - movl %edx,4(%esi) - - movl 4(%edi),%eax - mull %eax - movl %eax,8(%esi) - movl %edx,12(%esi) - - movl 8(%edi),%eax - mull %eax - movl %eax,16(%esi) - movl %edx,20(%esi) - - movl 12(%edi),%eax - mull %eax - movl %eax,24(%esi) - movl %edx,28(%esi) - - movl 16(%edi),%eax - mull %eax - movl %eax,32(%esi) - movl %edx,36(%esi) - - movl 20(%edi),%eax - mull %eax - movl %eax,40(%esi) - movl %edx,44(%esi) - - movl 24(%edi),%eax - mull %eax - movl %eax,48(%esi) - movl %edx,52(%esi) - - movl 28(%edi),%eax - mull %eax - movl %eax,56(%esi) - movl %edx,60(%esi) - - addl $32,%edi - addl $64,%esi - subl $8,%ebx - jnz .L021sw_loop -.L020sw_finish: - movl 28(%esp),%ebx - andl $7,%ebx - jz .L022sw_end - - movl (%edi),%eax - mull %eax - movl %eax,(%esi) - decl %ebx - movl %edx,4(%esi) - jz .L022sw_end - - movl 4(%edi),%eax - mull %eax - movl %eax,8(%esi) - decl %ebx - movl %edx,12(%esi) - jz .L022sw_end - - movl 8(%edi),%eax - mull %eax - movl %eax,16(%esi) - decl %ebx - movl %edx,20(%esi) - jz .L022sw_end - - movl 12(%edi),%eax - mull %eax - movl %eax,24(%esi) - decl %ebx - movl %edx,28(%esi) - jz .L022sw_end - - movl 16(%edi),%eax - mull %eax - movl %eax,32(%esi) - decl %ebx - movl %edx,36(%esi) - jz .L022sw_end - - movl 20(%edi),%eax - mull %eax - movl %eax,40(%esi) - decl %ebx - movl %edx,44(%esi) - jz .L022sw_end - - movl 24(%edi),%eax - mull %eax - movl %eax,48(%esi) - movl %edx,52(%esi) -.L022sw_end: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size bn_sqr_words,.-.L_bn_sqr_words_begin -.globl bn_div_words -.hidden bn_div_words -.type bn_div_words,@function -.align 16 -bn_div_words: -.L_bn_div_words_begin: - movl 4(%esp),%edx - movl 8(%esp),%eax - movl 12(%esp),%ecx - divl %ecx - ret -.size bn_div_words,.-.L_bn_div_words_begin -.globl bn_add_words -.hidden bn_add_words -.type bn_add_words,@function -.align 16 -bn_add_words: -.L_bn_add_words_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - - movl 20(%esp),%ebx - movl 24(%esp),%esi - movl 28(%esp),%edi - movl 32(%esp),%ebp - xorl %eax,%eax - andl $4294967288,%ebp - jz .L023aw_finish -.L024aw_loop: - - movl (%esi),%ecx - movl (%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - - movl 4(%esi),%ecx - movl 4(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - movl %ecx,4(%ebx) - - movl 8(%esi),%ecx - movl 8(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - movl %ecx,8(%ebx) - - movl 12(%esi),%ecx - movl 12(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - movl %ecx,12(%ebx) - - movl 16(%esi),%ecx - movl 16(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - movl %ecx,16(%ebx) - - movl 20(%esi),%ecx - movl 20(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - movl %ecx,20(%ebx) - - movl 24(%esi),%ecx - movl 24(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - movl %ecx,24(%ebx) - - movl 28(%esi),%ecx - movl 28(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - movl %ecx,28(%ebx) - - addl $32,%esi - addl $32,%edi - addl $32,%ebx - subl $8,%ebp - jnz .L024aw_loop -.L023aw_finish: - movl 32(%esp),%ebp - andl $7,%ebp - jz .L025aw_end - - movl (%esi),%ecx - movl (%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,(%ebx) - jz .L025aw_end - - movl 4(%esi),%ecx - movl 4(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,4(%ebx) - jz .L025aw_end - - movl 8(%esi),%ecx - movl 8(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,8(%ebx) - jz .L025aw_end - - movl 12(%esi),%ecx - movl 12(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,12(%ebx) - jz .L025aw_end - - movl 16(%esi),%ecx - movl 16(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,16(%ebx) - jz .L025aw_end - - movl 20(%esi),%ecx - movl 20(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,20(%ebx) - jz .L025aw_end - - movl 24(%esi),%ecx - movl 24(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - movl %ecx,24(%ebx) -.L025aw_end: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size bn_add_words,.-.L_bn_add_words_begin -.globl bn_sub_words -.hidden bn_sub_words -.type bn_sub_words,@function -.align 16 -bn_sub_words: -.L_bn_sub_words_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - - movl 20(%esp),%ebx - movl 24(%esp),%esi - movl 28(%esp),%edi - movl 32(%esp),%ebp - xorl %eax,%eax - andl $4294967288,%ebp - jz .L026aw_finish -.L027aw_loop: - - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - - movl 4(%esi),%ecx - movl 4(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,4(%ebx) - - movl 8(%esi),%ecx - movl 8(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,8(%ebx) - - movl 12(%esi),%ecx - movl 12(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,12(%ebx) - - movl 16(%esi),%ecx - movl 16(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,16(%ebx) - - movl 20(%esi),%ecx - movl 20(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,20(%ebx) - - movl 24(%esi),%ecx - movl 24(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,24(%ebx) - - movl 28(%esi),%ecx - movl 28(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,28(%ebx) - - addl $32,%esi - addl $32,%edi - addl $32,%ebx - subl $8,%ebp - jnz .L027aw_loop -.L026aw_finish: - movl 32(%esp),%ebp - andl $7,%ebp - jz .L028aw_end - - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,(%ebx) - jz .L028aw_end - - movl 4(%esi),%ecx - movl 4(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,4(%ebx) - jz .L028aw_end - - movl 8(%esi),%ecx - movl 8(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,8(%ebx) - jz .L028aw_end - - movl 12(%esi),%ecx - movl 12(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,12(%ebx) - jz .L028aw_end - - movl 16(%esi),%ecx - movl 16(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,16(%ebx) - jz .L028aw_end - - movl 20(%esi),%ecx - movl 20(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,20(%ebx) - jz .L028aw_end - - movl 24(%esi),%ecx - movl 24(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,24(%ebx) -.L028aw_end: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size bn_sub_words,.-.L_bn_sub_words_begin -.globl bn_sub_part_words -.hidden bn_sub_part_words -.type bn_sub_part_words,@function -.align 16 -bn_sub_part_words: -.L_bn_sub_part_words_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - - movl 20(%esp),%ebx - movl 24(%esp),%esi - movl 28(%esp),%edi - movl 32(%esp),%ebp - xorl %eax,%eax - andl $4294967288,%ebp - jz .L029aw_finish -.L030aw_loop: - - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - - movl 4(%esi),%ecx - movl 4(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,4(%ebx) - - movl 8(%esi),%ecx - movl 8(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,8(%ebx) - - movl 12(%esi),%ecx - movl 12(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,12(%ebx) - - movl 16(%esi),%ecx - movl 16(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,16(%ebx) - - movl 20(%esi),%ecx - movl 20(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,20(%ebx) - - movl 24(%esi),%ecx - movl 24(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,24(%ebx) - - movl 28(%esi),%ecx - movl 28(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,28(%ebx) - - addl $32,%esi - addl $32,%edi - addl $32,%ebx - subl $8,%ebp - jnz .L030aw_loop -.L029aw_finish: - movl 32(%esp),%ebp - andl $7,%ebp - jz .L031aw_end - - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - addl $4,%esi - addl $4,%edi - addl $4,%ebx - decl %ebp - jz .L031aw_end - - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - addl $4,%esi - addl $4,%edi - addl $4,%ebx - decl %ebp - jz .L031aw_end - - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - addl $4,%esi - addl $4,%edi - addl $4,%ebx - decl %ebp - jz .L031aw_end - - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - addl $4,%esi - addl $4,%edi - addl $4,%ebx - decl %ebp - jz .L031aw_end - - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - addl $4,%esi - addl $4,%edi - addl $4,%ebx - decl %ebp - jz .L031aw_end - - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - addl $4,%esi - addl $4,%edi - addl $4,%ebx - decl %ebp - jz .L031aw_end - - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - addl $4,%esi - addl $4,%edi - addl $4,%ebx -.L031aw_end: - cmpl $0,36(%esp) - je .L032pw_end - movl 36(%esp),%ebp - cmpl $0,%ebp - je .L032pw_end - jge .L033pw_pos - - movl $0,%edx - subl %ebp,%edx - movl %edx,%ebp - andl $4294967288,%ebp - jz .L034pw_neg_finish -.L035pw_neg_loop: - - movl $0,%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - - movl $0,%ecx - movl 4(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,4(%ebx) - - movl $0,%ecx - movl 8(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,8(%ebx) - - movl $0,%ecx - movl 12(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,12(%ebx) - - movl $0,%ecx - movl 16(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,16(%ebx) - - movl $0,%ecx - movl 20(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,20(%ebx) - - movl $0,%ecx - movl 24(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,24(%ebx) - - movl $0,%ecx - movl 28(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,28(%ebx) - - addl $32,%edi - addl $32,%ebx - subl $8,%ebp - jnz .L035pw_neg_loop -.L034pw_neg_finish: - movl 36(%esp),%edx - movl $0,%ebp - subl %edx,%ebp - andl $7,%ebp - jz .L032pw_end - - movl $0,%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,(%ebx) - jz .L032pw_end - - movl $0,%ecx - movl 4(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,4(%ebx) - jz .L032pw_end - - movl $0,%ecx - movl 8(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,8(%ebx) - jz .L032pw_end - - movl $0,%ecx - movl 12(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,12(%ebx) - jz .L032pw_end - - movl $0,%ecx - movl 16(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,16(%ebx) - jz .L032pw_end - - movl $0,%ecx - movl 20(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,20(%ebx) - jz .L032pw_end - - movl $0,%ecx - movl 24(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,24(%ebx) - jmp .L032pw_end -.L033pw_pos: - andl $4294967288,%ebp - jz .L036pw_pos_finish -.L037pw_pos_loop: - - movl (%esi),%ecx - subl %eax,%ecx - movl %ecx,(%ebx) - jnc .L038pw_nc0 - - movl 4(%esi),%ecx - subl %eax,%ecx - movl %ecx,4(%ebx) - jnc .L039pw_nc1 - - movl 8(%esi),%ecx - subl %eax,%ecx - movl %ecx,8(%ebx) - jnc .L040pw_nc2 - - movl 12(%esi),%ecx - subl %eax,%ecx - movl %ecx,12(%ebx) - jnc .L041pw_nc3 - - movl 16(%esi),%ecx - subl %eax,%ecx - movl %ecx,16(%ebx) - jnc .L042pw_nc4 - - movl 20(%esi),%ecx - subl %eax,%ecx - movl %ecx,20(%ebx) - jnc .L043pw_nc5 - - movl 24(%esi),%ecx - subl %eax,%ecx - movl %ecx,24(%ebx) - jnc .L044pw_nc6 - - movl 28(%esi),%ecx - subl %eax,%ecx - movl %ecx,28(%ebx) - jnc .L045pw_nc7 - - addl $32,%esi - addl $32,%ebx - subl $8,%ebp - jnz .L037pw_pos_loop -.L036pw_pos_finish: - movl 36(%esp),%ebp - andl $7,%ebp - jz .L032pw_end - - movl (%esi),%ecx - subl %eax,%ecx - movl %ecx,(%ebx) - jnc .L046pw_tail_nc0 - decl %ebp - jz .L032pw_end - - movl 4(%esi),%ecx - subl %eax,%ecx - movl %ecx,4(%ebx) - jnc .L047pw_tail_nc1 - decl %ebp - jz .L032pw_end - - movl 8(%esi),%ecx - subl %eax,%ecx - movl %ecx,8(%ebx) - jnc .L048pw_tail_nc2 - decl %ebp - jz .L032pw_end - - movl 12(%esi),%ecx - subl %eax,%ecx - movl %ecx,12(%ebx) - jnc .L049pw_tail_nc3 - decl %ebp - jz .L032pw_end - - movl 16(%esi),%ecx - subl %eax,%ecx - movl %ecx,16(%ebx) - jnc .L050pw_tail_nc4 - decl %ebp - jz .L032pw_end - - movl 20(%esi),%ecx - subl %eax,%ecx - movl %ecx,20(%ebx) - jnc .L051pw_tail_nc5 - decl %ebp - jz .L032pw_end - - movl 24(%esi),%ecx - subl %eax,%ecx - movl %ecx,24(%ebx) - jnc .L052pw_tail_nc6 - movl $1,%eax - jmp .L032pw_end -.L053pw_nc_loop: - movl (%esi),%ecx - movl %ecx,(%ebx) -.L038pw_nc0: - movl 4(%esi),%ecx - movl %ecx,4(%ebx) -.L039pw_nc1: - movl 8(%esi),%ecx - movl %ecx,8(%ebx) -.L040pw_nc2: - movl 12(%esi),%ecx - movl %ecx,12(%ebx) -.L041pw_nc3: - movl 16(%esi),%ecx - movl %ecx,16(%ebx) -.L042pw_nc4: - movl 20(%esi),%ecx - movl %ecx,20(%ebx) -.L043pw_nc5: - movl 24(%esi),%ecx - movl %ecx,24(%ebx) -.L044pw_nc6: - movl 28(%esi),%ecx - movl %ecx,28(%ebx) -.L045pw_nc7: - - addl $32,%esi - addl $32,%ebx - subl $8,%ebp - jnz .L053pw_nc_loop - movl 36(%esp),%ebp - andl $7,%ebp - jz .L054pw_nc_end - movl (%esi),%ecx - movl %ecx,(%ebx) -.L046pw_tail_nc0: - decl %ebp - jz .L054pw_nc_end - movl 4(%esi),%ecx - movl %ecx,4(%ebx) -.L047pw_tail_nc1: - decl %ebp - jz .L054pw_nc_end - movl 8(%esi),%ecx - movl %ecx,8(%ebx) -.L048pw_tail_nc2: - decl %ebp - jz .L054pw_nc_end - movl 12(%esi),%ecx - movl %ecx,12(%ebx) -.L049pw_tail_nc3: - decl %ebp - jz .L054pw_nc_end - movl 16(%esi),%ecx - movl %ecx,16(%ebx) -.L050pw_tail_nc4: - decl %ebp - jz .L054pw_nc_end - movl 20(%esi),%ecx - movl %ecx,20(%ebx) -.L051pw_tail_nc5: - decl %ebp - jz .L054pw_nc_end - movl 24(%esi),%ecx - movl %ecx,24(%ebx) -.L052pw_tail_nc6: -.L054pw_nc_end: - movl $0,%eax -.L032pw_end: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size bn_sub_part_words,.-.L_bn_sub_part_words_begin -#endif diff --git a/third_party/boringssl/linux-x86/crypto/bn/co-586.S b/third_party/boringssl/linux-x86/crypto/bn/co-586.S deleted file mode 100644 index e41c3a1dffdac..0000000000000 --- a/third_party/boringssl/linux-x86/crypto/bn/co-586.S +++ /dev/null @@ -1,1260 +0,0 @@ -#if defined(__i386__) -.file "src/crypto/bn/asm/co-586.S" -.text -.globl bn_mul_comba8 -.hidden bn_mul_comba8 -.type bn_mul_comba8,@function -.align 16 -bn_mul_comba8: -.L_bn_mul_comba8_begin: - pushl %esi - movl 12(%esp),%esi - pushl %edi - movl 20(%esp),%edi - pushl %ebp - pushl %ebx - xorl %ebx,%ebx - movl (%esi),%eax - xorl %ecx,%ecx - movl (%edi),%edx - - xorl %ebp,%ebp - - mull %edx - addl %eax,%ebx - movl 20(%esp),%eax - adcl %edx,%ecx - movl (%edi),%edx - adcl $0,%ebp - movl %ebx,(%eax) - movl 4(%esi),%eax - - - xorl %ebx,%ebx - - mull %edx - addl %eax,%ecx - movl (%esi),%eax - adcl %edx,%ebp - movl 4(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl 20(%esp),%eax - adcl %edx,%ebp - movl (%edi),%edx - adcl $0,%ebx - movl %ecx,4(%eax) - movl 8(%esi),%eax - - - xorl %ecx,%ecx - - mull %edx - addl %eax,%ebp - movl 4(%esi),%eax - adcl %edx,%ebx - movl 4(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl (%esi),%eax - adcl %edx,%ebx - movl 8(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl 20(%esp),%eax - adcl %edx,%ebx - movl (%edi),%edx - adcl $0,%ecx - movl %ebp,8(%eax) - movl 12(%esi),%eax - - - xorl %ebp,%ebp - - mull %edx - addl %eax,%ebx - movl 8(%esi),%eax - adcl %edx,%ecx - movl 4(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl 4(%esi),%eax - adcl %edx,%ecx - movl 8(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl (%esi),%eax - adcl %edx,%ecx - movl 12(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl 20(%esp),%eax - adcl %edx,%ecx - movl (%edi),%edx - adcl $0,%ebp - movl %ebx,12(%eax) - movl 16(%esi),%eax - - - xorl %ebx,%ebx - - mull %edx - addl %eax,%ecx - movl 12(%esi),%eax - adcl %edx,%ebp - movl 4(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl 8(%esi),%eax - adcl %edx,%ebp - movl 8(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl 4(%esi),%eax - adcl %edx,%ebp - movl 12(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl (%esi),%eax - adcl %edx,%ebp - movl 16(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl 20(%esp),%eax - adcl %edx,%ebp - movl (%edi),%edx - adcl $0,%ebx - movl %ecx,16(%eax) - movl 20(%esi),%eax - - - xorl %ecx,%ecx - - mull %edx - addl %eax,%ebp - movl 16(%esi),%eax - adcl %edx,%ebx - movl 4(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl 12(%esi),%eax - adcl %edx,%ebx - movl 8(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl 8(%esi),%eax - adcl %edx,%ebx - movl 12(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl 4(%esi),%eax - adcl %edx,%ebx - movl 16(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl (%esi),%eax - adcl %edx,%ebx - movl 20(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl 20(%esp),%eax - adcl %edx,%ebx - movl (%edi),%edx - adcl $0,%ecx - movl %ebp,20(%eax) - movl 24(%esi),%eax - - - xorl %ebp,%ebp - - mull %edx - addl %eax,%ebx - movl 20(%esi),%eax - adcl %edx,%ecx - movl 4(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl 16(%esi),%eax - adcl %edx,%ecx - movl 8(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl 12(%esi),%eax - adcl %edx,%ecx - movl 12(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl 8(%esi),%eax - adcl %edx,%ecx - movl 16(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl 4(%esi),%eax - adcl %edx,%ecx - movl 20(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl (%esi),%eax - adcl %edx,%ecx - movl 24(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl 20(%esp),%eax - adcl %edx,%ecx - movl (%edi),%edx - adcl $0,%ebp - movl %ebx,24(%eax) - movl 28(%esi),%eax - - - xorl %ebx,%ebx - - mull %edx - addl %eax,%ecx - movl 24(%esi),%eax - adcl %edx,%ebp - movl 4(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl 20(%esi),%eax - adcl %edx,%ebp - movl 8(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl 16(%esi),%eax - adcl %edx,%ebp - movl 12(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl 12(%esi),%eax - adcl %edx,%ebp - movl 16(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl 8(%esi),%eax - adcl %edx,%ebp - movl 20(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl 4(%esi),%eax - adcl %edx,%ebp - movl 24(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl (%esi),%eax - adcl %edx,%ebp - movl 28(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl 20(%esp),%eax - adcl %edx,%ebp - movl 4(%edi),%edx - adcl $0,%ebx - movl %ecx,28(%eax) - movl 28(%esi),%eax - - - xorl %ecx,%ecx - - mull %edx - addl %eax,%ebp - movl 24(%esi),%eax - adcl %edx,%ebx - movl 8(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl 20(%esi),%eax - adcl %edx,%ebx - movl 12(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl 16(%esi),%eax - adcl %edx,%ebx - movl 16(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl 12(%esi),%eax - adcl %edx,%ebx - movl 20(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl 8(%esi),%eax - adcl %edx,%ebx - movl 24(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl 4(%esi),%eax - adcl %edx,%ebx - movl 28(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl 20(%esp),%eax - adcl %edx,%ebx - movl 8(%edi),%edx - adcl $0,%ecx - movl %ebp,32(%eax) - movl 28(%esi),%eax - - - xorl %ebp,%ebp - - mull %edx - addl %eax,%ebx - movl 24(%esi),%eax - adcl %edx,%ecx - movl 12(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl 20(%esi),%eax - adcl %edx,%ecx - movl 16(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl 16(%esi),%eax - adcl %edx,%ecx - movl 20(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl 12(%esi),%eax - adcl %edx,%ecx - movl 24(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl 8(%esi),%eax - adcl %edx,%ecx - movl 28(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl 20(%esp),%eax - adcl %edx,%ecx - movl 12(%edi),%edx - adcl $0,%ebp - movl %ebx,36(%eax) - movl 28(%esi),%eax - - - xorl %ebx,%ebx - - mull %edx - addl %eax,%ecx - movl 24(%esi),%eax - adcl %edx,%ebp - movl 16(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl 20(%esi),%eax - adcl %edx,%ebp - movl 20(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl 16(%esi),%eax - adcl %edx,%ebp - movl 24(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl 12(%esi),%eax - adcl %edx,%ebp - movl 28(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl 20(%esp),%eax - adcl %edx,%ebp - movl 16(%edi),%edx - adcl $0,%ebx - movl %ecx,40(%eax) - movl 28(%esi),%eax - - - xorl %ecx,%ecx - - mull %edx - addl %eax,%ebp - movl 24(%esi),%eax - adcl %edx,%ebx - movl 20(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl 20(%esi),%eax - adcl %edx,%ebx - movl 24(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl 16(%esi),%eax - adcl %edx,%ebx - movl 28(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl 20(%esp),%eax - adcl %edx,%ebx - movl 20(%edi),%edx - adcl $0,%ecx - movl %ebp,44(%eax) - movl 28(%esi),%eax - - - xorl %ebp,%ebp - - mull %edx - addl %eax,%ebx - movl 24(%esi),%eax - adcl %edx,%ecx - movl 24(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl 20(%esi),%eax - adcl %edx,%ecx - movl 28(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl 20(%esp),%eax - adcl %edx,%ecx - movl 24(%edi),%edx - adcl $0,%ebp - movl %ebx,48(%eax) - movl 28(%esi),%eax - - - xorl %ebx,%ebx - - mull %edx - addl %eax,%ecx - movl 24(%esi),%eax - adcl %edx,%ebp - movl 28(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl 20(%esp),%eax - adcl %edx,%ebp - movl 28(%edi),%edx - adcl $0,%ebx - movl %ecx,52(%eax) - movl 28(%esi),%eax - - - xorl %ecx,%ecx - - mull %edx - addl %eax,%ebp - movl 20(%esp),%eax - adcl %edx,%ebx - adcl $0,%ecx - movl %ebp,56(%eax) - - - movl %ebx,60(%eax) - popl %ebx - popl %ebp - popl %edi - popl %esi - ret -.size bn_mul_comba8,.-.L_bn_mul_comba8_begin -.globl bn_mul_comba4 -.hidden bn_mul_comba4 -.type bn_mul_comba4,@function -.align 16 -bn_mul_comba4: -.L_bn_mul_comba4_begin: - pushl %esi - movl 12(%esp),%esi - pushl %edi - movl 20(%esp),%edi - pushl %ebp - pushl %ebx - xorl %ebx,%ebx - movl (%esi),%eax - xorl %ecx,%ecx - movl (%edi),%edx - - xorl %ebp,%ebp - - mull %edx - addl %eax,%ebx - movl 20(%esp),%eax - adcl %edx,%ecx - movl (%edi),%edx - adcl $0,%ebp - movl %ebx,(%eax) - movl 4(%esi),%eax - - - xorl %ebx,%ebx - - mull %edx - addl %eax,%ecx - movl (%esi),%eax - adcl %edx,%ebp - movl 4(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl 20(%esp),%eax - adcl %edx,%ebp - movl (%edi),%edx - adcl $0,%ebx - movl %ecx,4(%eax) - movl 8(%esi),%eax - - - xorl %ecx,%ecx - - mull %edx - addl %eax,%ebp - movl 4(%esi),%eax - adcl %edx,%ebx - movl 4(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl (%esi),%eax - adcl %edx,%ebx - movl 8(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl 20(%esp),%eax - adcl %edx,%ebx - movl (%edi),%edx - adcl $0,%ecx - movl %ebp,8(%eax) - movl 12(%esi),%eax - - - xorl %ebp,%ebp - - mull %edx - addl %eax,%ebx - movl 8(%esi),%eax - adcl %edx,%ecx - movl 4(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl 4(%esi),%eax - adcl %edx,%ecx - movl 8(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl (%esi),%eax - adcl %edx,%ecx - movl 12(%edi),%edx - adcl $0,%ebp - - mull %edx - addl %eax,%ebx - movl 20(%esp),%eax - adcl %edx,%ecx - movl 4(%edi),%edx - adcl $0,%ebp - movl %ebx,12(%eax) - movl 12(%esi),%eax - - - xorl %ebx,%ebx - - mull %edx - addl %eax,%ecx - movl 8(%esi),%eax - adcl %edx,%ebp - movl 8(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl 4(%esi),%eax - adcl %edx,%ebp - movl 12(%edi),%edx - adcl $0,%ebx - - mull %edx - addl %eax,%ecx - movl 20(%esp),%eax - adcl %edx,%ebp - movl 8(%edi),%edx - adcl $0,%ebx - movl %ecx,16(%eax) - movl 12(%esi),%eax - - - xorl %ecx,%ecx - - mull %edx - addl %eax,%ebp - movl 8(%esi),%eax - adcl %edx,%ebx - movl 12(%edi),%edx - adcl $0,%ecx - - mull %edx - addl %eax,%ebp - movl 20(%esp),%eax - adcl %edx,%ebx - movl 12(%edi),%edx - adcl $0,%ecx - movl %ebp,20(%eax) - movl 12(%esi),%eax - - - xorl %ebp,%ebp - - mull %edx - addl %eax,%ebx - movl 20(%esp),%eax - adcl %edx,%ecx - adcl $0,%ebp - movl %ebx,24(%eax) - - - movl %ecx,28(%eax) - popl %ebx - popl %ebp - popl %edi - popl %esi - ret -.size bn_mul_comba4,.-.L_bn_mul_comba4_begin -.globl bn_sqr_comba8 -.hidden bn_sqr_comba8 -.type bn_sqr_comba8,@function -.align 16 -bn_sqr_comba8: -.L_bn_sqr_comba8_begin: - pushl %esi - pushl %edi - pushl %ebp - pushl %ebx - movl 20(%esp),%edi - movl 24(%esp),%esi - xorl %ebx,%ebx - xorl %ecx,%ecx - movl (%esi),%eax - - xorl %ebp,%ebp - - mull %eax - addl %eax,%ebx - adcl %edx,%ecx - movl (%esi),%edx - adcl $0,%ebp - movl %ebx,(%edi) - movl 4(%esi),%eax - - - xorl %ebx,%ebx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 8(%esi),%eax - adcl $0,%ebx - movl %ecx,4(%edi) - movl (%esi),%edx - - - xorl %ecx,%ecx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 4(%esi),%eax - adcl $0,%ecx - - mull %eax - addl %eax,%ebp - adcl %edx,%ebx - movl (%esi),%edx - adcl $0,%ecx - movl %ebp,8(%edi) - movl 12(%esi),%eax - - - xorl %ebp,%ebp - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 8(%esi),%eax - adcl $0,%ebp - movl 4(%esi),%edx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 16(%esi),%eax - adcl $0,%ebp - movl %ebx,12(%edi) - movl (%esi),%edx - - - xorl %ebx,%ebx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 12(%esi),%eax - adcl $0,%ebx - movl 4(%esi),%edx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 8(%esi),%eax - adcl $0,%ebx - - mull %eax - addl %eax,%ecx - adcl %edx,%ebp - movl (%esi),%edx - adcl $0,%ebx - movl %ecx,16(%edi) - movl 20(%esi),%eax - - - xorl %ecx,%ecx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 16(%esi),%eax - adcl $0,%ecx - movl 4(%esi),%edx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 12(%esi),%eax - adcl $0,%ecx - movl 8(%esi),%edx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 24(%esi),%eax - adcl $0,%ecx - movl %ebp,20(%edi) - movl (%esi),%edx - - - xorl %ebp,%ebp - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 20(%esi),%eax - adcl $0,%ebp - movl 4(%esi),%edx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 16(%esi),%eax - adcl $0,%ebp - movl 8(%esi),%edx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 12(%esi),%eax - adcl $0,%ebp - - mull %eax - addl %eax,%ebx - adcl %edx,%ecx - movl (%esi),%edx - adcl $0,%ebp - movl %ebx,24(%edi) - movl 28(%esi),%eax - - - xorl %ebx,%ebx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 24(%esi),%eax - adcl $0,%ebx - movl 4(%esi),%edx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 20(%esi),%eax - adcl $0,%ebx - movl 8(%esi),%edx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 16(%esi),%eax - adcl $0,%ebx - movl 12(%esi),%edx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 28(%esi),%eax - adcl $0,%ebx - movl %ecx,28(%edi) - movl 4(%esi),%edx - - - xorl %ecx,%ecx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 24(%esi),%eax - adcl $0,%ecx - movl 8(%esi),%edx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 20(%esi),%eax - adcl $0,%ecx - movl 12(%esi),%edx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 16(%esi),%eax - adcl $0,%ecx - - mull %eax - addl %eax,%ebp - adcl %edx,%ebx - movl 8(%esi),%edx - adcl $0,%ecx - movl %ebp,32(%edi) - movl 28(%esi),%eax - - - xorl %ebp,%ebp - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 24(%esi),%eax - adcl $0,%ebp - movl 12(%esi),%edx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 20(%esi),%eax - adcl $0,%ebp - movl 16(%esi),%edx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 28(%esi),%eax - adcl $0,%ebp - movl %ebx,36(%edi) - movl 12(%esi),%edx - - - xorl %ebx,%ebx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 24(%esi),%eax - adcl $0,%ebx - movl 16(%esi),%edx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 20(%esi),%eax - adcl $0,%ebx - - mull %eax - addl %eax,%ecx - adcl %edx,%ebp - movl 16(%esi),%edx - adcl $0,%ebx - movl %ecx,40(%edi) - movl 28(%esi),%eax - - - xorl %ecx,%ecx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 24(%esi),%eax - adcl $0,%ecx - movl 20(%esi),%edx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 28(%esi),%eax - adcl $0,%ecx - movl %ebp,44(%edi) - movl 20(%esi),%edx - - - xorl %ebp,%ebp - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 24(%esi),%eax - adcl $0,%ebp - - mull %eax - addl %eax,%ebx - adcl %edx,%ecx - movl 24(%esi),%edx - adcl $0,%ebp - movl %ebx,48(%edi) - movl 28(%esi),%eax - - - xorl %ebx,%ebx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 28(%esi),%eax - adcl $0,%ebx - movl %ecx,52(%edi) - - - xorl %ecx,%ecx - - mull %eax - addl %eax,%ebp - adcl %edx,%ebx - adcl $0,%ecx - movl %ebp,56(%edi) - - movl %ebx,60(%edi) - popl %ebx - popl %ebp - popl %edi - popl %esi - ret -.size bn_sqr_comba8,.-.L_bn_sqr_comba8_begin -.globl bn_sqr_comba4 -.hidden bn_sqr_comba4 -.type bn_sqr_comba4,@function -.align 16 -bn_sqr_comba4: -.L_bn_sqr_comba4_begin: - pushl %esi - pushl %edi - pushl %ebp - pushl %ebx - movl 20(%esp),%edi - movl 24(%esp),%esi - xorl %ebx,%ebx - xorl %ecx,%ecx - movl (%esi),%eax - - xorl %ebp,%ebp - - mull %eax - addl %eax,%ebx - adcl %edx,%ecx - movl (%esi),%edx - adcl $0,%ebp - movl %ebx,(%edi) - movl 4(%esi),%eax - - - xorl %ebx,%ebx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 8(%esi),%eax - adcl $0,%ebx - movl %ecx,4(%edi) - movl (%esi),%edx - - - xorl %ecx,%ecx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 4(%esi),%eax - adcl $0,%ecx - - mull %eax - addl %eax,%ebp - adcl %edx,%ebx - movl (%esi),%edx - adcl $0,%ecx - movl %ebp,8(%edi) - movl 12(%esi),%eax - - - xorl %ebp,%ebp - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 8(%esi),%eax - adcl $0,%ebp - movl 4(%esi),%edx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 12(%esi),%eax - adcl $0,%ebp - movl %ebx,12(%edi) - movl 4(%esi),%edx - - - xorl %ebx,%ebx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 8(%esi),%eax - adcl $0,%ebx - - mull %eax - addl %eax,%ecx - adcl %edx,%ebp - movl 8(%esi),%edx - adcl $0,%ebx - movl %ecx,16(%edi) - movl 12(%esi),%eax - - - xorl %ecx,%ecx - - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 12(%esi),%eax - adcl $0,%ecx - movl %ebp,20(%edi) - - - xorl %ebp,%ebp - - mull %eax - addl %eax,%ebx - adcl %edx,%ecx - adcl $0,%ebp - movl %ebx,24(%edi) - - movl %ecx,28(%edi) - popl %ebx - popl %ebp - popl %edi - popl %esi - ret -.size bn_sqr_comba4,.-.L_bn_sqr_comba4_begin -#endif diff --git a/third_party/boringssl/linux-x86/crypto/bn/x86-mont.S b/third_party/boringssl/linux-x86/crypto/bn/x86-mont.S deleted file mode 100644 index 1569b2cff1738..0000000000000 --- a/third_party/boringssl/linux-x86/crypto/bn/x86-mont.S +++ /dev/null @@ -1,460 +0,0 @@ -#if defined(__i386__) -.file "src/crypto/bn/asm/x86-mont.S" -.text -.globl bn_mul_mont -.hidden bn_mul_mont -.type bn_mul_mont,@function -.align 16 -bn_mul_mont: -.L_bn_mul_mont_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - xorl %eax,%eax - movl 40(%esp),%edi - cmpl $4,%edi - jl .L000just_leave - leal 20(%esp),%esi - leal 24(%esp),%edx - movl %esp,%ebp - addl $2,%edi - negl %edi - leal -32(%esp,%edi,4),%esp - negl %edi - movl %esp,%eax - subl %edx,%eax - andl $2047,%eax - subl %eax,%esp - xorl %esp,%edx - andl $2048,%edx - xorl $2048,%edx - subl %edx,%esp - andl $-64,%esp - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - movl 16(%esi),%esi - movl (%esi),%esi - movl %eax,4(%esp) - movl %ebx,8(%esp) - movl %ecx,12(%esp) - movl %edx,16(%esp) - movl %esi,20(%esp) - leal -3(%edi),%ebx - movl %ebp,24(%esp) - call .L001PIC_me_up -.L001PIC_me_up: - popl %eax - leal OPENSSL_ia32cap_P-.L001PIC_me_up(%eax),%eax - btl $26,(%eax) - jnc .L002non_sse2 - movl $-1,%eax - movd %eax,%mm7 - movl 8(%esp),%esi - movl 12(%esp),%edi - movl 16(%esp),%ebp - xorl %edx,%edx - xorl %ecx,%ecx - movd (%edi),%mm4 - movd (%esi),%mm5 - movd (%ebp),%mm3 - pmuludq %mm4,%mm5 - movq %mm5,%mm2 - movq %mm5,%mm0 - pand %mm7,%mm0 - pmuludq 20(%esp),%mm5 - pmuludq %mm5,%mm3 - paddq %mm0,%mm3 - movd 4(%ebp),%mm1 - movd 4(%esi),%mm0 - psrlq $32,%mm2 - psrlq $32,%mm3 - incl %ecx -.align 16 -.L0031st: - pmuludq %mm4,%mm0 - pmuludq %mm5,%mm1 - paddq %mm0,%mm2 - paddq %mm1,%mm3 - movq %mm2,%mm0 - pand %mm7,%mm0 - movd 4(%ebp,%ecx,4),%mm1 - paddq %mm0,%mm3 - movd 4(%esi,%ecx,4),%mm0 - psrlq $32,%mm2 - movd %mm3,28(%esp,%ecx,4) - psrlq $32,%mm3 - leal 1(%ecx),%ecx - cmpl %ebx,%ecx - jl .L0031st - pmuludq %mm4,%mm0 - pmuludq %mm5,%mm1 - paddq %mm0,%mm2 - paddq %mm1,%mm3 - movq %mm2,%mm0 - pand %mm7,%mm0 - paddq %mm0,%mm3 - movd %mm3,28(%esp,%ecx,4) - psrlq $32,%mm2 - psrlq $32,%mm3 - paddq %mm2,%mm3 - movq %mm3,32(%esp,%ebx,4) - incl %edx -.L004outer: - xorl %ecx,%ecx - movd (%edi,%edx,4),%mm4 - movd (%esi),%mm5 - movd 32(%esp),%mm6 - movd (%ebp),%mm3 - pmuludq %mm4,%mm5 - paddq %mm6,%mm5 - movq %mm5,%mm0 - movq %mm5,%mm2 - pand %mm7,%mm0 - pmuludq 20(%esp),%mm5 - pmuludq %mm5,%mm3 - paddq %mm0,%mm3 - movd 36(%esp),%mm6 - movd 4(%ebp),%mm1 - movd 4(%esi),%mm0 - psrlq $32,%mm2 - psrlq $32,%mm3 - paddq %mm6,%mm2 - incl %ecx - decl %ebx -.L005inner: - pmuludq %mm4,%mm0 - pmuludq %mm5,%mm1 - paddq %mm0,%mm2 - paddq %mm1,%mm3 - movq %mm2,%mm0 - movd 36(%esp,%ecx,4),%mm6 - pand %mm7,%mm0 - movd 4(%ebp,%ecx,4),%mm1 - paddq %mm0,%mm3 - movd 4(%esi,%ecx,4),%mm0 - psrlq $32,%mm2 - movd %mm3,28(%esp,%ecx,4) - psrlq $32,%mm3 - paddq %mm6,%mm2 - decl %ebx - leal 1(%ecx),%ecx - jnz .L005inner - movl %ecx,%ebx - pmuludq %mm4,%mm0 - pmuludq %mm5,%mm1 - paddq %mm0,%mm2 - paddq %mm1,%mm3 - movq %mm2,%mm0 - pand %mm7,%mm0 - paddq %mm0,%mm3 - movd %mm3,28(%esp,%ecx,4) - psrlq $32,%mm2 - psrlq $32,%mm3 - movd 36(%esp,%ebx,4),%mm6 - paddq %mm2,%mm3 - paddq %mm6,%mm3 - movq %mm3,32(%esp,%ebx,4) - leal 1(%edx),%edx - cmpl %ebx,%edx - jle .L004outer - emms - jmp .L006common_tail -.align 16 -.L002non_sse2: - movl 8(%esp),%esi - leal 1(%ebx),%ebp - movl 12(%esp),%edi - xorl %ecx,%ecx - movl %esi,%edx - andl $1,%ebp - subl %edi,%edx - leal 4(%edi,%ebx,4),%eax - orl %edx,%ebp - movl (%edi),%edi - jz .L007bn_sqr_mont - movl %eax,28(%esp) - movl (%esi),%eax - xorl %edx,%edx -.align 16 -.L008mull: - movl %edx,%ebp - mull %edi - addl %eax,%ebp - leal 1(%ecx),%ecx - adcl $0,%edx - movl (%esi,%ecx,4),%eax - cmpl %ebx,%ecx - movl %ebp,28(%esp,%ecx,4) - jl .L008mull - movl %edx,%ebp - mull %edi - movl 20(%esp),%edi - addl %ebp,%eax - movl 16(%esp),%esi - adcl $0,%edx - imull 32(%esp),%edi - movl %eax,32(%esp,%ebx,4) - xorl %ecx,%ecx - movl %edx,36(%esp,%ebx,4) - movl %ecx,40(%esp,%ebx,4) - movl (%esi),%eax - mull %edi - addl 32(%esp),%eax - movl 4(%esi),%eax - adcl $0,%edx - incl %ecx - jmp .L0092ndmadd -.align 16 -.L0101stmadd: - movl %edx,%ebp - mull %edi - addl 32(%esp,%ecx,4),%ebp - leal 1(%ecx),%ecx - adcl $0,%edx - addl %eax,%ebp - movl (%esi,%ecx,4),%eax - adcl $0,%edx - cmpl %ebx,%ecx - movl %ebp,28(%esp,%ecx,4) - jl .L0101stmadd - movl %edx,%ebp - mull %edi - addl 32(%esp,%ebx,4),%eax - movl 20(%esp),%edi - adcl $0,%edx - movl 16(%esp),%esi - addl %eax,%ebp - adcl $0,%edx - imull 32(%esp),%edi - xorl %ecx,%ecx - addl 36(%esp,%ebx,4),%edx - movl %ebp,32(%esp,%ebx,4) - adcl $0,%ecx - movl (%esi),%eax - movl %edx,36(%esp,%ebx,4) - movl %ecx,40(%esp,%ebx,4) - mull %edi - addl 32(%esp),%eax - movl 4(%esi),%eax - adcl $0,%edx - movl $1,%ecx -.align 16 -.L0092ndmadd: - movl %edx,%ebp - mull %edi - addl 32(%esp,%ecx,4),%ebp - leal 1(%ecx),%ecx - adcl $0,%edx - addl %eax,%ebp - movl (%esi,%ecx,4),%eax - adcl $0,%edx - cmpl %ebx,%ecx - movl %ebp,24(%esp,%ecx,4) - jl .L0092ndmadd - movl %edx,%ebp - mull %edi - addl 32(%esp,%ebx,4),%ebp - adcl $0,%edx - addl %eax,%ebp - adcl $0,%edx - movl %ebp,28(%esp,%ebx,4) - xorl %eax,%eax - movl 12(%esp),%ecx - addl 36(%esp,%ebx,4),%edx - adcl 40(%esp,%ebx,4),%eax - leal 4(%ecx),%ecx - movl %edx,32(%esp,%ebx,4) - cmpl 28(%esp),%ecx - movl %eax,36(%esp,%ebx,4) - je .L006common_tail - movl (%ecx),%edi - movl 8(%esp),%esi - movl %ecx,12(%esp) - xorl %ecx,%ecx - xorl %edx,%edx - movl (%esi),%eax - jmp .L0101stmadd -.align 16 -.L007bn_sqr_mont: - movl %ebx,(%esp) - movl %ecx,12(%esp) - movl %edi,%eax - mull %edi - movl %eax,32(%esp) - movl %edx,%ebx - shrl $1,%edx - andl $1,%ebx - incl %ecx -.align 16 -.L011sqr: - movl (%esi,%ecx,4),%eax - movl %edx,%ebp - mull %edi - addl %ebp,%eax - leal 1(%ecx),%ecx - adcl $0,%edx - leal (%ebx,%eax,2),%ebp - shrl $31,%eax - cmpl (%esp),%ecx - movl %eax,%ebx - movl %ebp,28(%esp,%ecx,4) - jl .L011sqr - movl (%esi,%ecx,4),%eax - movl %edx,%ebp - mull %edi - addl %ebp,%eax - movl 20(%esp),%edi - adcl $0,%edx - movl 16(%esp),%esi - leal (%ebx,%eax,2),%ebp - imull 32(%esp),%edi - shrl $31,%eax - movl %ebp,32(%esp,%ecx,4) - leal (%eax,%edx,2),%ebp - movl (%esi),%eax - shrl $31,%edx - movl %ebp,36(%esp,%ecx,4) - movl %edx,40(%esp,%ecx,4) - mull %edi - addl 32(%esp),%eax - movl %ecx,%ebx - adcl $0,%edx - movl 4(%esi),%eax - movl $1,%ecx -.align 16 -.L0123rdmadd: - movl %edx,%ebp - mull %edi - addl 32(%esp,%ecx,4),%ebp - adcl $0,%edx - addl %eax,%ebp - movl 4(%esi,%ecx,4),%eax - adcl $0,%edx - movl %ebp,28(%esp,%ecx,4) - movl %edx,%ebp - mull %edi - addl 36(%esp,%ecx,4),%ebp - leal 2(%ecx),%ecx - adcl $0,%edx - addl %eax,%ebp - movl (%esi,%ecx,4),%eax - adcl $0,%edx - cmpl %ebx,%ecx - movl %ebp,24(%esp,%ecx,4) - jl .L0123rdmadd - movl %edx,%ebp - mull %edi - addl 32(%esp,%ebx,4),%ebp - adcl $0,%edx - addl %eax,%ebp - adcl $0,%edx - movl %ebp,28(%esp,%ebx,4) - movl 12(%esp),%ecx - xorl %eax,%eax - movl 8(%esp),%esi - addl 36(%esp,%ebx,4),%edx - adcl 40(%esp,%ebx,4),%eax - movl %edx,32(%esp,%ebx,4) - cmpl %ebx,%ecx - movl %eax,36(%esp,%ebx,4) - je .L006common_tail - movl 4(%esi,%ecx,4),%edi - leal 1(%ecx),%ecx - movl %edi,%eax - movl %ecx,12(%esp) - mull %edi - addl 32(%esp,%ecx,4),%eax - adcl $0,%edx - movl %eax,32(%esp,%ecx,4) - xorl %ebp,%ebp - cmpl %ebx,%ecx - leal 1(%ecx),%ecx - je .L013sqrlast - movl %edx,%ebx - shrl $1,%edx - andl $1,%ebx -.align 16 -.L014sqradd: - movl (%esi,%ecx,4),%eax - movl %edx,%ebp - mull %edi - addl %ebp,%eax - leal (%eax,%eax,1),%ebp - adcl $0,%edx - shrl $31,%eax - addl 32(%esp,%ecx,4),%ebp - leal 1(%ecx),%ecx - adcl $0,%eax - addl %ebx,%ebp - adcl $0,%eax - cmpl (%esp),%ecx - movl %ebp,28(%esp,%ecx,4) - movl %eax,%ebx - jle .L014sqradd - movl %edx,%ebp - addl %edx,%edx - shrl $31,%ebp - addl %ebx,%edx - adcl $0,%ebp -.L013sqrlast: - movl 20(%esp),%edi - movl 16(%esp),%esi - imull 32(%esp),%edi - addl 32(%esp,%ecx,4),%edx - movl (%esi),%eax - adcl $0,%ebp - movl %edx,32(%esp,%ecx,4) - movl %ebp,36(%esp,%ecx,4) - mull %edi - addl 32(%esp),%eax - leal -1(%ecx),%ebx - adcl $0,%edx - movl $1,%ecx - movl 4(%esi),%eax - jmp .L0123rdmadd -.align 16 -.L006common_tail: - movl 16(%esp),%ebp - movl 4(%esp),%edi - leal 32(%esp),%esi - movl (%esi),%eax - movl %ebx,%ecx - xorl %edx,%edx -.align 16 -.L015sub: - sbbl (%ebp,%edx,4),%eax - movl %eax,(%edi,%edx,4) - decl %ecx - movl 4(%esi,%edx,4),%eax - leal 1(%edx),%edx - jge .L015sub - sbbl $0,%eax -.align 16 -.L016copy: - movl (%esi,%ebx,4),%edx - movl (%edi,%ebx,4),%ebp - xorl %ebp,%edx - andl %eax,%edx - xorl %ebp,%edx - movl %ecx,(%esi,%ebx,4) - movl %edx,(%edi,%ebx,4) - decl %ebx - jge .L016copy - movl 24(%esp),%esp - movl $1,%eax -.L000just_leave: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size bn_mul_mont,.-.L_bn_mul_mont_begin -.byte 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105 -.byte 112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56 -.byte 54,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121 -.byte 32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46 -.byte 111,114,103,62,0 -#endif diff --git a/third_party/boringssl/linux-x86/crypto/cpu-x86-asm.S b/third_party/boringssl/linux-x86/crypto/cpu-x86-asm.S deleted file mode 100644 index 24a8dd4d4247f..0000000000000 --- a/third_party/boringssl/linux-x86/crypto/cpu-x86-asm.S +++ /dev/null @@ -1,322 +0,0 @@ -#if defined(__i386__) -.file "crypto/cpu-x86-asm.S" -.text -.globl OPENSSL_ia32_cpuid -.hidden OPENSSL_ia32_cpuid -.type OPENSSL_ia32_cpuid,@function -.align 16 -OPENSSL_ia32_cpuid: -.L_OPENSSL_ia32_cpuid_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - xorl %edx,%edx - pushfl - popl %eax - movl %eax,%ecx - xorl $2097152,%eax - pushl %eax - popfl - pushfl - popl %eax - xorl %eax,%ecx - xorl %eax,%eax - btl $21,%ecx - jnc .L000nocpuid - movl 20(%esp),%esi - movl %eax,8(%esi) - .byte 0x0f,0xa2 - movl %eax,%edi - xorl %eax,%eax - cmpl $1970169159,%ebx - setne %al - movl %eax,%ebp - cmpl $1231384169,%edx - setne %al - orl %eax,%ebp - cmpl $1818588270,%ecx - setne %al - orl %eax,%ebp - jz .L001intel - cmpl $1752462657,%ebx - setne %al - movl %eax,%esi - cmpl $1769238117,%edx - setne %al - orl %eax,%esi - cmpl $1145913699,%ecx - setne %al - orl %eax,%esi - jnz .L001intel - movl $2147483648,%eax - .byte 0x0f,0xa2 - cmpl $2147483649,%eax - jb .L001intel - movl %eax,%esi - movl $2147483649,%eax - .byte 0x0f,0xa2 - orl %ecx,%ebp - andl $2049,%ebp - cmpl $2147483656,%esi - jb .L001intel - movl $2147483656,%eax - .byte 0x0f,0xa2 - movzbl %cl,%esi - incl %esi - movl $1,%eax - xorl %ecx,%ecx - .byte 0x0f,0xa2 - btl $28,%edx - jnc .L002generic - shrl $16,%ebx - andl $255,%ebx - cmpl %esi,%ebx - ja .L002generic - andl $4026531839,%edx - jmp .L002generic -.L001intel: - cmpl $7,%edi - jb .L003cacheinfo - movl 20(%esp),%esi - movl $7,%eax - xorl %ecx,%ecx - .byte 0x0f,0xa2 - movl %ebx,8(%esi) -.L003cacheinfo: - cmpl $4,%edi - movl $-1,%edi - jb .L004nocacheinfo - movl $4,%eax - movl $0,%ecx - .byte 0x0f,0xa2 - movl %eax,%edi - shrl $14,%edi - andl $4095,%edi -.L004nocacheinfo: - movl $1,%eax - xorl %ecx,%ecx - .byte 0x0f,0xa2 - andl $3220176895,%edx - cmpl $0,%ebp - jne .L005notintel - orl $1073741824,%edx -.L005notintel: - btl $28,%edx - jnc .L002generic - andl $4026531839,%edx - cmpl $0,%edi - je .L002generic - orl $268435456,%edx - shrl $16,%ebx - cmpb $1,%bl - ja .L002generic - andl $4026531839,%edx -.L002generic: - andl $2048,%ebp - andl $4294965247,%ecx - movl %edx,%esi - orl %ecx,%ebp - btl $27,%ecx - jnc .L006clear_avx - xorl %ecx,%ecx -.byte 15,1,208 - andl $6,%eax - cmpl $6,%eax - je .L007done - cmpl $2,%eax - je .L006clear_avx -.L008clear_xmm: - andl $4261412861,%ebp - andl $4278190079,%esi -.L006clear_avx: - andl $4026525695,%ebp - movl 20(%esp),%edi - andl $4294967263,8(%edi) -.L007done: - movl %esi,%eax - movl %ebp,%edx -.L000nocpuid: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size OPENSSL_ia32_cpuid,.-.L_OPENSSL_ia32_cpuid_begin -.globl OPENSSL_rdtsc -.hidden OPENSSL_rdtsc -.type OPENSSL_rdtsc,@function -.align 16 -OPENSSL_rdtsc: -.L_OPENSSL_rdtsc_begin: - xorl %eax,%eax - xorl %edx,%edx - call .L009PIC_me_up -.L009PIC_me_up: - popl %ecx - leal OPENSSL_ia32cap_P-.L009PIC_me_up(%ecx),%ecx - btl $4,(%ecx) - jnc .L010notsc - .byte 0x0f,0x31 -.L010notsc: - ret -.size OPENSSL_rdtsc,.-.L_OPENSSL_rdtsc_begin -.globl OPENSSL_instrument_halt -.hidden OPENSSL_instrument_halt -.type OPENSSL_instrument_halt,@function -.align 16 -OPENSSL_instrument_halt: -.L_OPENSSL_instrument_halt_begin: - call .L011PIC_me_up -.L011PIC_me_up: - popl %ecx - leal OPENSSL_ia32cap_P-.L011PIC_me_up(%ecx),%ecx - btl $4,(%ecx) - jnc .L012nohalt -.long 2421723150 - andl $3,%eax - jnz .L012nohalt - pushfl - popl %eax - btl $9,%eax - jnc .L012nohalt - .byte 0x0f,0x31 - pushl %edx - pushl %eax - hlt - .byte 0x0f,0x31 - subl (%esp),%eax - sbbl 4(%esp),%edx - addl $8,%esp - ret -.L012nohalt: - xorl %eax,%eax - xorl %edx,%edx - ret -.size OPENSSL_instrument_halt,.-.L_OPENSSL_instrument_halt_begin -.globl OPENSSL_far_spin -.hidden OPENSSL_far_spin -.type OPENSSL_far_spin,@function -.align 16 -OPENSSL_far_spin: -.L_OPENSSL_far_spin_begin: - pushfl - popl %eax - btl $9,%eax - jnc .L013nospin - movl 4(%esp),%eax - movl 8(%esp),%ecx -.long 2430111262 - xorl %eax,%eax - movl (%ecx),%edx - jmp .L014spin -.align 16 -.L014spin: - incl %eax - cmpl (%ecx),%edx - je .L014spin -.long 529567888 - ret -.L013nospin: - xorl %eax,%eax - xorl %edx,%edx - ret -.size OPENSSL_far_spin,.-.L_OPENSSL_far_spin_begin -.globl OPENSSL_wipe_cpu -.hidden OPENSSL_wipe_cpu -.type OPENSSL_wipe_cpu,@function -.align 16 -OPENSSL_wipe_cpu: -.L_OPENSSL_wipe_cpu_begin: - xorl %eax,%eax - xorl %edx,%edx - call .L015PIC_me_up -.L015PIC_me_up: - popl %ecx - leal OPENSSL_ia32cap_P-.L015PIC_me_up(%ecx),%ecx - movl (%ecx),%ecx - btl $1,(%ecx) - jnc .L016no_x87 - andl $83886080,%ecx - cmpl $83886080,%ecx - jne .L017no_sse2 - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 -.L017no_sse2: -.long 4007259865,4007259865,4007259865,4007259865,2430851995 -.L016no_x87: - leal 4(%esp),%eax - ret -.size OPENSSL_wipe_cpu,.-.L_OPENSSL_wipe_cpu_begin -.globl OPENSSL_atomic_add -.hidden OPENSSL_atomic_add -.type OPENSSL_atomic_add,@function -.align 16 -OPENSSL_atomic_add: -.L_OPENSSL_atomic_add_begin: - movl 4(%esp),%edx - movl 8(%esp),%ecx - pushl %ebx - nop - movl (%edx),%eax -.L018spin: - leal (%eax,%ecx,1),%ebx - nop -.long 447811568 - jne .L018spin - movl %ebx,%eax - popl %ebx - ret -.size OPENSSL_atomic_add,.-.L_OPENSSL_atomic_add_begin -.globl OPENSSL_indirect_call -.hidden OPENSSL_indirect_call -.type OPENSSL_indirect_call,@function -.align 16 -OPENSSL_indirect_call: -.L_OPENSSL_indirect_call_begin: - pushl %ebp - movl %esp,%ebp - subl $28,%esp - movl 12(%ebp),%ecx - movl %ecx,(%esp) - movl 16(%ebp),%edx - movl %edx,4(%esp) - movl 20(%ebp),%eax - movl %eax,8(%esp) - movl 24(%ebp),%eax - movl %eax,12(%esp) - movl 28(%ebp),%eax - movl %eax,16(%esp) - movl 32(%ebp),%eax - movl %eax,20(%esp) - movl 36(%ebp),%eax - movl %eax,24(%esp) - call *8(%ebp) - movl %ebp,%esp - popl %ebp - ret -.size OPENSSL_indirect_call,.-.L_OPENSSL_indirect_call_begin -.globl OPENSSL_ia32_rdrand -.hidden OPENSSL_ia32_rdrand -.type OPENSSL_ia32_rdrand,@function -.align 16 -OPENSSL_ia32_rdrand: -.L_OPENSSL_ia32_rdrand_begin: - movl $8,%ecx -.L019loop: -.byte 15,199,240 - jc .L020break - loop .L019loop -.L020break: - cmpl $0,%eax - cmovel %ecx,%eax - ret -.size OPENSSL_ia32_rdrand,.-.L_OPENSSL_ia32_rdrand_begin -.hidden OPENSSL_ia32cap_P -#endif diff --git a/third_party/boringssl/linux-x86/crypto/md5/md5-586.S b/third_party/boringssl/linux-x86/crypto/md5/md5-586.S deleted file mode 100644 index 734b941a82b0c..0000000000000 --- a/third_party/boringssl/linux-x86/crypto/md5/md5-586.S +++ /dev/null @@ -1,682 +0,0 @@ -#if defined(__i386__) -.file "src/crypto/md5/asm/md5-586.S" -.text -.globl md5_block_asm_data_order -.hidden md5_block_asm_data_order -.type md5_block_asm_data_order,@function -.align 16 -md5_block_asm_data_order: -.L_md5_block_asm_data_order_begin: - pushl %esi - pushl %edi - movl 12(%esp),%edi - movl 16(%esp),%esi - movl 20(%esp),%ecx - pushl %ebp - shll $6,%ecx - pushl %ebx - addl %esi,%ecx - subl $64,%ecx - movl (%edi),%eax - pushl %ecx - movl 4(%edi),%ebx - movl 8(%edi),%ecx - movl 12(%edi),%edx -.L000start: - - - movl %ecx,%edi - movl (%esi),%ebp - - xorl %edx,%edi - andl %ebx,%edi - leal 3614090360(%eax,%ebp,1),%eax - xorl %edx,%edi - addl %edi,%eax - movl %ebx,%edi - roll $7,%eax - movl 4(%esi),%ebp - addl %ebx,%eax - - xorl %ecx,%edi - andl %eax,%edi - leal 3905402710(%edx,%ebp,1),%edx - xorl %ecx,%edi - addl %edi,%edx - movl %eax,%edi - roll $12,%edx - movl 8(%esi),%ebp - addl %eax,%edx - - xorl %ebx,%edi - andl %edx,%edi - leal 606105819(%ecx,%ebp,1),%ecx - xorl %ebx,%edi - addl %edi,%ecx - movl %edx,%edi - roll $17,%ecx - movl 12(%esi),%ebp - addl %edx,%ecx - - xorl %eax,%edi - andl %ecx,%edi - leal 3250441966(%ebx,%ebp,1),%ebx - xorl %eax,%edi - addl %edi,%ebx - movl %ecx,%edi - roll $22,%ebx - movl 16(%esi),%ebp - addl %ecx,%ebx - - xorl %edx,%edi - andl %ebx,%edi - leal 4118548399(%eax,%ebp,1),%eax - xorl %edx,%edi - addl %edi,%eax - movl %ebx,%edi - roll $7,%eax - movl 20(%esi),%ebp - addl %ebx,%eax - - xorl %ecx,%edi - andl %eax,%edi - leal 1200080426(%edx,%ebp,1),%edx - xorl %ecx,%edi - addl %edi,%edx - movl %eax,%edi - roll $12,%edx - movl 24(%esi),%ebp - addl %eax,%edx - - xorl %ebx,%edi - andl %edx,%edi - leal 2821735955(%ecx,%ebp,1),%ecx - xorl %ebx,%edi - addl %edi,%ecx - movl %edx,%edi - roll $17,%ecx - movl 28(%esi),%ebp - addl %edx,%ecx - - xorl %eax,%edi - andl %ecx,%edi - leal 4249261313(%ebx,%ebp,1),%ebx - xorl %eax,%edi - addl %edi,%ebx - movl %ecx,%edi - roll $22,%ebx - movl 32(%esi),%ebp - addl %ecx,%ebx - - xorl %edx,%edi - andl %ebx,%edi - leal 1770035416(%eax,%ebp,1),%eax - xorl %edx,%edi - addl %edi,%eax - movl %ebx,%edi - roll $7,%eax - movl 36(%esi),%ebp - addl %ebx,%eax - - xorl %ecx,%edi - andl %eax,%edi - leal 2336552879(%edx,%ebp,1),%edx - xorl %ecx,%edi - addl %edi,%edx - movl %eax,%edi - roll $12,%edx - movl 40(%esi),%ebp - addl %eax,%edx - - xorl %ebx,%edi - andl %edx,%edi - leal 4294925233(%ecx,%ebp,1),%ecx - xorl %ebx,%edi - addl %edi,%ecx - movl %edx,%edi - roll $17,%ecx - movl 44(%esi),%ebp - addl %edx,%ecx - - xorl %eax,%edi - andl %ecx,%edi - leal 2304563134(%ebx,%ebp,1),%ebx - xorl %eax,%edi - addl %edi,%ebx - movl %ecx,%edi - roll $22,%ebx - movl 48(%esi),%ebp - addl %ecx,%ebx - - xorl %edx,%edi - andl %ebx,%edi - leal 1804603682(%eax,%ebp,1),%eax - xorl %edx,%edi - addl %edi,%eax - movl %ebx,%edi - roll $7,%eax - movl 52(%esi),%ebp - addl %ebx,%eax - - xorl %ecx,%edi - andl %eax,%edi - leal 4254626195(%edx,%ebp,1),%edx - xorl %ecx,%edi - addl %edi,%edx - movl %eax,%edi - roll $12,%edx - movl 56(%esi),%ebp - addl %eax,%edx - - xorl %ebx,%edi - andl %edx,%edi - leal 2792965006(%ecx,%ebp,1),%ecx - xorl %ebx,%edi - addl %edi,%ecx - movl %edx,%edi - roll $17,%ecx - movl 60(%esi),%ebp - addl %edx,%ecx - - xorl %eax,%edi - andl %ecx,%edi - leal 1236535329(%ebx,%ebp,1),%ebx - xorl %eax,%edi - addl %edi,%ebx - movl %ecx,%edi - roll $22,%ebx - movl 4(%esi),%ebp - addl %ecx,%ebx - - - - leal 4129170786(%eax,%ebp,1),%eax - xorl %ebx,%edi - andl %edx,%edi - movl 24(%esi),%ebp - xorl %ecx,%edi - addl %edi,%eax - movl %ebx,%edi - roll $5,%eax - addl %ebx,%eax - - leal 3225465664(%edx,%ebp,1),%edx - xorl %eax,%edi - andl %ecx,%edi - movl 44(%esi),%ebp - xorl %ebx,%edi - addl %edi,%edx - movl %eax,%edi - roll $9,%edx - addl %eax,%edx - - leal 643717713(%ecx,%ebp,1),%ecx - xorl %edx,%edi - andl %ebx,%edi - movl (%esi),%ebp - xorl %eax,%edi - addl %edi,%ecx - movl %edx,%edi - roll $14,%ecx - addl %edx,%ecx - - leal 3921069994(%ebx,%ebp,1),%ebx - xorl %ecx,%edi - andl %eax,%edi - movl 20(%esi),%ebp - xorl %edx,%edi - addl %edi,%ebx - movl %ecx,%edi - roll $20,%ebx - addl %ecx,%ebx - - leal 3593408605(%eax,%ebp,1),%eax - xorl %ebx,%edi - andl %edx,%edi - movl 40(%esi),%ebp - xorl %ecx,%edi - addl %edi,%eax - movl %ebx,%edi - roll $5,%eax - addl %ebx,%eax - - leal 38016083(%edx,%ebp,1),%edx - xorl %eax,%edi - andl %ecx,%edi - movl 60(%esi),%ebp - xorl %ebx,%edi - addl %edi,%edx - movl %eax,%edi - roll $9,%edx - addl %eax,%edx - - leal 3634488961(%ecx,%ebp,1),%ecx - xorl %edx,%edi - andl %ebx,%edi - movl 16(%esi),%ebp - xorl %eax,%edi - addl %edi,%ecx - movl %edx,%edi - roll $14,%ecx - addl %edx,%ecx - - leal 3889429448(%ebx,%ebp,1),%ebx - xorl %ecx,%edi - andl %eax,%edi - movl 36(%esi),%ebp - xorl %edx,%edi - addl %edi,%ebx - movl %ecx,%edi - roll $20,%ebx - addl %ecx,%ebx - - leal 568446438(%eax,%ebp,1),%eax - xorl %ebx,%edi - andl %edx,%edi - movl 56(%esi),%ebp - xorl %ecx,%edi - addl %edi,%eax - movl %ebx,%edi - roll $5,%eax - addl %ebx,%eax - - leal 3275163606(%edx,%ebp,1),%edx - xorl %eax,%edi - andl %ecx,%edi - movl 12(%esi),%ebp - xorl %ebx,%edi - addl %edi,%edx - movl %eax,%edi - roll $9,%edx - addl %eax,%edx - - leal 4107603335(%ecx,%ebp,1),%ecx - xorl %edx,%edi - andl %ebx,%edi - movl 32(%esi),%ebp - xorl %eax,%edi - addl %edi,%ecx - movl %edx,%edi - roll $14,%ecx - addl %edx,%ecx - - leal 1163531501(%ebx,%ebp,1),%ebx - xorl %ecx,%edi - andl %eax,%edi - movl 52(%esi),%ebp - xorl %edx,%edi - addl %edi,%ebx - movl %ecx,%edi - roll $20,%ebx - addl %ecx,%ebx - - leal 2850285829(%eax,%ebp,1),%eax - xorl %ebx,%edi - andl %edx,%edi - movl 8(%esi),%ebp - xorl %ecx,%edi - addl %edi,%eax - movl %ebx,%edi - roll $5,%eax - addl %ebx,%eax - - leal 4243563512(%edx,%ebp,1),%edx - xorl %eax,%edi - andl %ecx,%edi - movl 28(%esi),%ebp - xorl %ebx,%edi - addl %edi,%edx - movl %eax,%edi - roll $9,%edx - addl %eax,%edx - - leal 1735328473(%ecx,%ebp,1),%ecx - xorl %edx,%edi - andl %ebx,%edi - movl 48(%esi),%ebp - xorl %eax,%edi - addl %edi,%ecx - movl %edx,%edi - roll $14,%ecx - addl %edx,%ecx - - leal 2368359562(%ebx,%ebp,1),%ebx - xorl %ecx,%edi - andl %eax,%edi - movl 20(%esi),%ebp - xorl %edx,%edi - addl %edi,%ebx - movl %ecx,%edi - roll $20,%ebx - addl %ecx,%ebx - - - - xorl %edx,%edi - xorl %ebx,%edi - leal 4294588738(%eax,%ebp,1),%eax - addl %edi,%eax - roll $4,%eax - movl 32(%esi),%ebp - movl %ebx,%edi - - leal 2272392833(%edx,%ebp,1),%edx - addl %ebx,%eax - xorl %ecx,%edi - xorl %eax,%edi - movl 44(%esi),%ebp - addl %edi,%edx - movl %eax,%edi - roll $11,%edx - addl %eax,%edx - - xorl %ebx,%edi - xorl %edx,%edi - leal 1839030562(%ecx,%ebp,1),%ecx - addl %edi,%ecx - roll $16,%ecx - movl 56(%esi),%ebp - movl %edx,%edi - - leal 4259657740(%ebx,%ebp,1),%ebx - addl %edx,%ecx - xorl %eax,%edi - xorl %ecx,%edi - movl 4(%esi),%ebp - addl %edi,%ebx - movl %ecx,%edi - roll $23,%ebx - addl %ecx,%ebx - - xorl %edx,%edi - xorl %ebx,%edi - leal 2763975236(%eax,%ebp,1),%eax - addl %edi,%eax - roll $4,%eax - movl 16(%esi),%ebp - movl %ebx,%edi - - leal 1272893353(%edx,%ebp,1),%edx - addl %ebx,%eax - xorl %ecx,%edi - xorl %eax,%edi - movl 28(%esi),%ebp - addl %edi,%edx - movl %eax,%edi - roll $11,%edx - addl %eax,%edx - - xorl %ebx,%edi - xorl %edx,%edi - leal 4139469664(%ecx,%ebp,1),%ecx - addl %edi,%ecx - roll $16,%ecx - movl 40(%esi),%ebp - movl %edx,%edi - - leal 3200236656(%ebx,%ebp,1),%ebx - addl %edx,%ecx - xorl %eax,%edi - xorl %ecx,%edi - movl 52(%esi),%ebp - addl %edi,%ebx - movl %ecx,%edi - roll $23,%ebx - addl %ecx,%ebx - - xorl %edx,%edi - xorl %ebx,%edi - leal 681279174(%eax,%ebp,1),%eax - addl %edi,%eax - roll $4,%eax - movl (%esi),%ebp - movl %ebx,%edi - - leal 3936430074(%edx,%ebp,1),%edx - addl %ebx,%eax - xorl %ecx,%edi - xorl %eax,%edi - movl 12(%esi),%ebp - addl %edi,%edx - movl %eax,%edi - roll $11,%edx - addl %eax,%edx - - xorl %ebx,%edi - xorl %edx,%edi - leal 3572445317(%ecx,%ebp,1),%ecx - addl %edi,%ecx - roll $16,%ecx - movl 24(%esi),%ebp - movl %edx,%edi - - leal 76029189(%ebx,%ebp,1),%ebx - addl %edx,%ecx - xorl %eax,%edi - xorl %ecx,%edi - movl 36(%esi),%ebp - addl %edi,%ebx - movl %ecx,%edi - roll $23,%ebx - addl %ecx,%ebx - - xorl %edx,%edi - xorl %ebx,%edi - leal 3654602809(%eax,%ebp,1),%eax - addl %edi,%eax - roll $4,%eax - movl 48(%esi),%ebp - movl %ebx,%edi - - leal 3873151461(%edx,%ebp,1),%edx - addl %ebx,%eax - xorl %ecx,%edi - xorl %eax,%edi - movl 60(%esi),%ebp - addl %edi,%edx - movl %eax,%edi - roll $11,%edx - addl %eax,%edx - - xorl %ebx,%edi - xorl %edx,%edi - leal 530742520(%ecx,%ebp,1),%ecx - addl %edi,%ecx - roll $16,%ecx - movl 8(%esi),%ebp - movl %edx,%edi - - leal 3299628645(%ebx,%ebp,1),%ebx - addl %edx,%ecx - xorl %eax,%edi - xorl %ecx,%edi - movl (%esi),%ebp - addl %edi,%ebx - movl $-1,%edi - roll $23,%ebx - addl %ecx,%ebx - - - - xorl %edx,%edi - orl %ebx,%edi - leal 4096336452(%eax,%ebp,1),%eax - xorl %ecx,%edi - movl 28(%esi),%ebp - addl %edi,%eax - movl $-1,%edi - roll $6,%eax - xorl %ecx,%edi - addl %ebx,%eax - - orl %eax,%edi - leal 1126891415(%edx,%ebp,1),%edx - xorl %ebx,%edi - movl 56(%esi),%ebp - addl %edi,%edx - movl $-1,%edi - roll $10,%edx - xorl %ebx,%edi - addl %eax,%edx - - orl %edx,%edi - leal 2878612391(%ecx,%ebp,1),%ecx - xorl %eax,%edi - movl 20(%esi),%ebp - addl %edi,%ecx - movl $-1,%edi - roll $15,%ecx - xorl %eax,%edi - addl %edx,%ecx - - orl %ecx,%edi - leal 4237533241(%ebx,%ebp,1),%ebx - xorl %edx,%edi - movl 48(%esi),%ebp - addl %edi,%ebx - movl $-1,%edi - roll $21,%ebx - xorl %edx,%edi - addl %ecx,%ebx - - orl %ebx,%edi - leal 1700485571(%eax,%ebp,1),%eax - xorl %ecx,%edi - movl 12(%esi),%ebp - addl %edi,%eax - movl $-1,%edi - roll $6,%eax - xorl %ecx,%edi - addl %ebx,%eax - - orl %eax,%edi - leal 2399980690(%edx,%ebp,1),%edx - xorl %ebx,%edi - movl 40(%esi),%ebp - addl %edi,%edx - movl $-1,%edi - roll $10,%edx - xorl %ebx,%edi - addl %eax,%edx - - orl %edx,%edi - leal 4293915773(%ecx,%ebp,1),%ecx - xorl %eax,%edi - movl 4(%esi),%ebp - addl %edi,%ecx - movl $-1,%edi - roll $15,%ecx - xorl %eax,%edi - addl %edx,%ecx - - orl %ecx,%edi - leal 2240044497(%ebx,%ebp,1),%ebx - xorl %edx,%edi - movl 32(%esi),%ebp - addl %edi,%ebx - movl $-1,%edi - roll $21,%ebx - xorl %edx,%edi - addl %ecx,%ebx - - orl %ebx,%edi - leal 1873313359(%eax,%ebp,1),%eax - xorl %ecx,%edi - movl 60(%esi),%ebp - addl %edi,%eax - movl $-1,%edi - roll $6,%eax - xorl %ecx,%edi - addl %ebx,%eax - - orl %eax,%edi - leal 4264355552(%edx,%ebp,1),%edx - xorl %ebx,%edi - movl 24(%esi),%ebp - addl %edi,%edx - movl $-1,%edi - roll $10,%edx - xorl %ebx,%edi - addl %eax,%edx - - orl %edx,%edi - leal 2734768916(%ecx,%ebp,1),%ecx - xorl %eax,%edi - movl 52(%esi),%ebp - addl %edi,%ecx - movl $-1,%edi - roll $15,%ecx - xorl %eax,%edi - addl %edx,%ecx - - orl %ecx,%edi - leal 1309151649(%ebx,%ebp,1),%ebx - xorl %edx,%edi - movl 16(%esi),%ebp - addl %edi,%ebx - movl $-1,%edi - roll $21,%ebx - xorl %edx,%edi - addl %ecx,%ebx - - orl %ebx,%edi - leal 4149444226(%eax,%ebp,1),%eax - xorl %ecx,%edi - movl 44(%esi),%ebp - addl %edi,%eax - movl $-1,%edi - roll $6,%eax - xorl %ecx,%edi - addl %ebx,%eax - - orl %eax,%edi - leal 3174756917(%edx,%ebp,1),%edx - xorl %ebx,%edi - movl 8(%esi),%ebp - addl %edi,%edx - movl $-1,%edi - roll $10,%edx - xorl %ebx,%edi - addl %eax,%edx - - orl %edx,%edi - leal 718787259(%ecx,%ebp,1),%ecx - xorl %eax,%edi - movl 36(%esi),%ebp - addl %edi,%ecx - movl $-1,%edi - roll $15,%ecx - xorl %eax,%edi - addl %edx,%ecx - - orl %ecx,%edi - leal 3951481745(%ebx,%ebp,1),%ebx - xorl %edx,%edi - movl 24(%esp),%ebp - addl %edi,%ebx - addl $64,%esi - roll $21,%ebx - movl (%ebp),%edi - addl %ecx,%ebx - addl %edi,%eax - movl 4(%ebp),%edi - addl %edi,%ebx - movl 8(%ebp),%edi - addl %edi,%ecx - movl 12(%ebp),%edi - addl %edi,%edx - movl %eax,(%ebp) - movl %ebx,4(%ebp) - movl (%esp),%edi - movl %ecx,8(%ebp) - movl %edx,12(%ebp) - cmpl %esi,%edi - jae .L000start - popl %eax - popl %ebx - popl %ebp - popl %edi - popl %esi - ret -.size md5_block_asm_data_order,.-.L_md5_block_asm_data_order_begin -#endif diff --git a/third_party/boringssl/linux-x86/crypto/modes/ghash-x86.S b/third_party/boringssl/linux-x86/crypto/modes/ghash-x86.S deleted file mode 100644 index 28720889a18e0..0000000000000 --- a/third_party/boringssl/linux-x86/crypto/modes/ghash-x86.S +++ /dev/null @@ -1,1274 +0,0 @@ -#if defined(__i386__) -.file "ghash-x86.S" -.text -.globl gcm_gmult_4bit_x86 -.hidden gcm_gmult_4bit_x86 -.type gcm_gmult_4bit_x86,@function -.align 16 -gcm_gmult_4bit_x86: -.L_gcm_gmult_4bit_x86_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - subl $84,%esp - movl 104(%esp),%edi - movl 108(%esp),%esi - movl (%edi),%ebp - movl 4(%edi),%edx - movl 8(%edi),%ecx - movl 12(%edi),%ebx - movl $0,16(%esp) - movl $471859200,20(%esp) - movl $943718400,24(%esp) - movl $610271232,28(%esp) - movl $1887436800,32(%esp) - movl $1822425088,36(%esp) - movl $1220542464,40(%esp) - movl $1423966208,44(%esp) - movl $3774873600,48(%esp) - movl $4246732800,52(%esp) - movl $3644850176,56(%esp) - movl $3311403008,60(%esp) - movl $2441084928,64(%esp) - movl $2376073216,68(%esp) - movl $2847932416,72(%esp) - movl $3051356160,76(%esp) - movl %ebp,(%esp) - movl %edx,4(%esp) - movl %ecx,8(%esp) - movl %ebx,12(%esp) - shrl $20,%ebx - andl $240,%ebx - movl 4(%esi,%ebx,1),%ebp - movl (%esi,%ebx,1),%edx - movl 12(%esi,%ebx,1),%ecx - movl 8(%esi,%ebx,1),%ebx - xorl %eax,%eax - movl $15,%edi - jmp .L000x86_loop -.align 16 -.L000x86_loop: - movb %bl,%al - shrdl $4,%ecx,%ebx - andb $15,%al - shrdl $4,%edx,%ecx - shrdl $4,%ebp,%edx - shrl $4,%ebp - xorl 16(%esp,%eax,4),%ebp - movb (%esp,%edi,1),%al - andb $240,%al - xorl 8(%esi,%eax,1),%ebx - xorl 12(%esi,%eax,1),%ecx - xorl (%esi,%eax,1),%edx - xorl 4(%esi,%eax,1),%ebp - decl %edi - js .L001x86_break - movb %bl,%al - shrdl $4,%ecx,%ebx - andb $15,%al - shrdl $4,%edx,%ecx - shrdl $4,%ebp,%edx - shrl $4,%ebp - xorl 16(%esp,%eax,4),%ebp - movb (%esp,%edi,1),%al - shlb $4,%al - xorl 8(%esi,%eax,1),%ebx - xorl 12(%esi,%eax,1),%ecx - xorl (%esi,%eax,1),%edx - xorl 4(%esi,%eax,1),%ebp - jmp .L000x86_loop -.align 16 -.L001x86_break: - bswap %ebx - bswap %ecx - bswap %edx - bswap %ebp - movl 104(%esp),%edi - movl %ebx,12(%edi) - movl %ecx,8(%edi) - movl %edx,4(%edi) - movl %ebp,(%edi) - addl $84,%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size gcm_gmult_4bit_x86,.-.L_gcm_gmult_4bit_x86_begin -.globl gcm_ghash_4bit_x86 -.hidden gcm_ghash_4bit_x86 -.type gcm_ghash_4bit_x86,@function -.align 16 -gcm_ghash_4bit_x86: -.L_gcm_ghash_4bit_x86_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - subl $84,%esp - movl 104(%esp),%ebx - movl 108(%esp),%esi - movl 112(%esp),%edi - movl 116(%esp),%ecx - addl %edi,%ecx - movl %ecx,116(%esp) - movl (%ebx),%ebp - movl 4(%ebx),%edx - movl 8(%ebx),%ecx - movl 12(%ebx),%ebx - movl $0,16(%esp) - movl $471859200,20(%esp) - movl $943718400,24(%esp) - movl $610271232,28(%esp) - movl $1887436800,32(%esp) - movl $1822425088,36(%esp) - movl $1220542464,40(%esp) - movl $1423966208,44(%esp) - movl $3774873600,48(%esp) - movl $4246732800,52(%esp) - movl $3644850176,56(%esp) - movl $3311403008,60(%esp) - movl $2441084928,64(%esp) - movl $2376073216,68(%esp) - movl $2847932416,72(%esp) - movl $3051356160,76(%esp) -.align 16 -.L002x86_outer_loop: - xorl 12(%edi),%ebx - xorl 8(%edi),%ecx - xorl 4(%edi),%edx - xorl (%edi),%ebp - movl %ebx,12(%esp) - movl %ecx,8(%esp) - movl %edx,4(%esp) - movl %ebp,(%esp) - shrl $20,%ebx - andl $240,%ebx - movl 4(%esi,%ebx,1),%ebp - movl (%esi,%ebx,1),%edx - movl 12(%esi,%ebx,1),%ecx - movl 8(%esi,%ebx,1),%ebx - xorl %eax,%eax - movl $15,%edi - jmp .L003x86_loop -.align 16 -.L003x86_loop: - movb %bl,%al - shrdl $4,%ecx,%ebx - andb $15,%al - shrdl $4,%edx,%ecx - shrdl $4,%ebp,%edx - shrl $4,%ebp - xorl 16(%esp,%eax,4),%ebp - movb (%esp,%edi,1),%al - andb $240,%al - xorl 8(%esi,%eax,1),%ebx - xorl 12(%esi,%eax,1),%ecx - xorl (%esi,%eax,1),%edx - xorl 4(%esi,%eax,1),%ebp - decl %edi - js .L004x86_break - movb %bl,%al - shrdl $4,%ecx,%ebx - andb $15,%al - shrdl $4,%edx,%ecx - shrdl $4,%ebp,%edx - shrl $4,%ebp - xorl 16(%esp,%eax,4),%ebp - movb (%esp,%edi,1),%al - shlb $4,%al - xorl 8(%esi,%eax,1),%ebx - xorl 12(%esi,%eax,1),%ecx - xorl (%esi,%eax,1),%edx - xorl 4(%esi,%eax,1),%ebp - jmp .L003x86_loop -.align 16 -.L004x86_break: - bswap %ebx - bswap %ecx - bswap %edx - bswap %ebp - movl 112(%esp),%edi - leal 16(%edi),%edi - cmpl 116(%esp),%edi - movl %edi,112(%esp) - jb .L002x86_outer_loop - movl 104(%esp),%edi - movl %ebx,12(%edi) - movl %ecx,8(%edi) - movl %edx,4(%edi) - movl %ebp,(%edi) - addl $84,%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size gcm_ghash_4bit_x86,.-.L_gcm_ghash_4bit_x86_begin -.globl gcm_gmult_4bit_mmx -.hidden gcm_gmult_4bit_mmx -.type gcm_gmult_4bit_mmx,@function -.align 16 -gcm_gmult_4bit_mmx: -.L_gcm_gmult_4bit_mmx_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%edi - movl 24(%esp),%esi - call .L005pic_point -.L005pic_point: - popl %eax - leal .Lrem_4bit-.L005pic_point(%eax),%eax - movzbl 15(%edi),%ebx - xorl %ecx,%ecx - movl %ebx,%edx - movb %dl,%cl - movl $14,%ebp - shlb $4,%cl - andl $240,%edx - movq 8(%esi,%ecx,1),%mm0 - movq (%esi,%ecx,1),%mm1 - movd %mm0,%ebx - jmp .L006mmx_loop -.align 16 -.L006mmx_loop: - psrlq $4,%mm0 - andl $15,%ebx - movq %mm1,%mm2 - psrlq $4,%mm1 - pxor 8(%esi,%edx,1),%mm0 - movb (%edi,%ebp,1),%cl - psllq $60,%mm2 - pxor (%eax,%ebx,8),%mm1 - decl %ebp - movd %mm0,%ebx - pxor (%esi,%edx,1),%mm1 - movl %ecx,%edx - pxor %mm2,%mm0 - js .L007mmx_break - shlb $4,%cl - andl $15,%ebx - psrlq $4,%mm0 - andl $240,%edx - movq %mm1,%mm2 - psrlq $4,%mm1 - pxor 8(%esi,%ecx,1),%mm0 - psllq $60,%mm2 - pxor (%eax,%ebx,8),%mm1 - movd %mm0,%ebx - pxor (%esi,%ecx,1),%mm1 - pxor %mm2,%mm0 - jmp .L006mmx_loop -.align 16 -.L007mmx_break: - shlb $4,%cl - andl $15,%ebx - psrlq $4,%mm0 - andl $240,%edx - movq %mm1,%mm2 - psrlq $4,%mm1 - pxor 8(%esi,%ecx,1),%mm0 - psllq $60,%mm2 - pxor (%eax,%ebx,8),%mm1 - movd %mm0,%ebx - pxor (%esi,%ecx,1),%mm1 - pxor %mm2,%mm0 - psrlq $4,%mm0 - andl $15,%ebx - movq %mm1,%mm2 - psrlq $4,%mm1 - pxor 8(%esi,%edx,1),%mm0 - psllq $60,%mm2 - pxor (%eax,%ebx,8),%mm1 - movd %mm0,%ebx - pxor (%esi,%edx,1),%mm1 - pxor %mm2,%mm0 - psrlq $32,%mm0 - movd %mm1,%edx - psrlq $32,%mm1 - movd %mm0,%ecx - movd %mm1,%ebp - bswap %ebx - bswap %edx - bswap %ecx - bswap %ebp - emms - movl %ebx,12(%edi) - movl %edx,4(%edi) - movl %ecx,8(%edi) - movl %ebp,(%edi) - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size gcm_gmult_4bit_mmx,.-.L_gcm_gmult_4bit_mmx_begin -.globl gcm_ghash_4bit_mmx -.hidden gcm_ghash_4bit_mmx -.type gcm_ghash_4bit_mmx,@function -.align 16 -gcm_ghash_4bit_mmx: -.L_gcm_ghash_4bit_mmx_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%eax - movl 24(%esp),%ebx - movl 28(%esp),%ecx - movl 32(%esp),%edx - movl %esp,%ebp - call .L008pic_point -.L008pic_point: - popl %esi - leal .Lrem_8bit-.L008pic_point(%esi),%esi - subl $544,%esp - andl $-64,%esp - subl $16,%esp - addl %ecx,%edx - movl %eax,544(%esp) - movl %edx,552(%esp) - movl %ebp,556(%esp) - addl $128,%ebx - leal 144(%esp),%edi - leal 400(%esp),%ebp - movl -120(%ebx),%edx - movq -120(%ebx),%mm0 - movq -128(%ebx),%mm3 - shll $4,%edx - movb %dl,(%esp) - movl -104(%ebx),%edx - movq -104(%ebx),%mm2 - movq -112(%ebx),%mm5 - movq %mm0,-128(%edi) - psrlq $4,%mm0 - movq %mm3,(%edi) - movq %mm3,%mm7 - psrlq $4,%mm3 - shll $4,%edx - movb %dl,1(%esp) - movl -88(%ebx),%edx - movq -88(%ebx),%mm1 - psllq $60,%mm7 - movq -96(%ebx),%mm4 - por %mm7,%mm0 - movq %mm2,-120(%edi) - psrlq $4,%mm2 - movq %mm5,8(%edi) - movq %mm5,%mm6 - movq %mm0,-128(%ebp) - psrlq $4,%mm5 - movq %mm3,(%ebp) - shll $4,%edx - movb %dl,2(%esp) - movl -72(%ebx),%edx - movq -72(%ebx),%mm0 - psllq $60,%mm6 - movq -80(%ebx),%mm3 - por %mm6,%mm2 - movq %mm1,-112(%edi) - psrlq $4,%mm1 - movq %mm4,16(%edi) - movq %mm4,%mm7 - movq %mm2,-120(%ebp) - psrlq $4,%mm4 - movq %mm5,8(%ebp) - shll $4,%edx - movb %dl,3(%esp) - movl -56(%ebx),%edx - movq -56(%ebx),%mm2 - psllq $60,%mm7 - movq -64(%ebx),%mm5 - por %mm7,%mm1 - movq %mm0,-104(%edi) - psrlq $4,%mm0 - movq %mm3,24(%edi) - movq %mm3,%mm6 - movq %mm1,-112(%ebp) - psrlq $4,%mm3 - movq %mm4,16(%ebp) - shll $4,%edx - movb %dl,4(%esp) - movl -40(%ebx),%edx - movq -40(%ebx),%mm1 - psllq $60,%mm6 - movq -48(%ebx),%mm4 - por %mm6,%mm0 - movq %mm2,-96(%edi) - psrlq $4,%mm2 - movq %mm5,32(%edi) - movq %mm5,%mm7 - movq %mm0,-104(%ebp) - psrlq $4,%mm5 - movq %mm3,24(%ebp) - shll $4,%edx - movb %dl,5(%esp) - movl -24(%ebx),%edx - movq -24(%ebx),%mm0 - psllq $60,%mm7 - movq -32(%ebx),%mm3 - por %mm7,%mm2 - movq %mm1,-88(%edi) - psrlq $4,%mm1 - movq %mm4,40(%edi) - movq %mm4,%mm6 - movq %mm2,-96(%ebp) - psrlq $4,%mm4 - movq %mm5,32(%ebp) - shll $4,%edx - movb %dl,6(%esp) - movl -8(%ebx),%edx - movq -8(%ebx),%mm2 - psllq $60,%mm6 - movq -16(%ebx),%mm5 - por %mm6,%mm1 - movq %mm0,-80(%edi) - psrlq $4,%mm0 - movq %mm3,48(%edi) - movq %mm3,%mm7 - movq %mm1,-88(%ebp) - psrlq $4,%mm3 - movq %mm4,40(%ebp) - shll $4,%edx - movb %dl,7(%esp) - movl 8(%ebx),%edx - movq 8(%ebx),%mm1 - psllq $60,%mm7 - movq (%ebx),%mm4 - por %mm7,%mm0 - movq %mm2,-72(%edi) - psrlq $4,%mm2 - movq %mm5,56(%edi) - movq %mm5,%mm6 - movq %mm0,-80(%ebp) - psrlq $4,%mm5 - movq %mm3,48(%ebp) - shll $4,%edx - movb %dl,8(%esp) - movl 24(%ebx),%edx - movq 24(%ebx),%mm0 - psllq $60,%mm6 - movq 16(%ebx),%mm3 - por %mm6,%mm2 - movq %mm1,-64(%edi) - psrlq $4,%mm1 - movq %mm4,64(%edi) - movq %mm4,%mm7 - movq %mm2,-72(%ebp) - psrlq $4,%mm4 - movq %mm5,56(%ebp) - shll $4,%edx - movb %dl,9(%esp) - movl 40(%ebx),%edx - movq 40(%ebx),%mm2 - psllq $60,%mm7 - movq 32(%ebx),%mm5 - por %mm7,%mm1 - movq %mm0,-56(%edi) - psrlq $4,%mm0 - movq %mm3,72(%edi) - movq %mm3,%mm6 - movq %mm1,-64(%ebp) - psrlq $4,%mm3 - movq %mm4,64(%ebp) - shll $4,%edx - movb %dl,10(%esp) - movl 56(%ebx),%edx - movq 56(%ebx),%mm1 - psllq $60,%mm6 - movq 48(%ebx),%mm4 - por %mm6,%mm0 - movq %mm2,-48(%edi) - psrlq $4,%mm2 - movq %mm5,80(%edi) - movq %mm5,%mm7 - movq %mm0,-56(%ebp) - psrlq $4,%mm5 - movq %mm3,72(%ebp) - shll $4,%edx - movb %dl,11(%esp) - movl 72(%ebx),%edx - movq 72(%ebx),%mm0 - psllq $60,%mm7 - movq 64(%ebx),%mm3 - por %mm7,%mm2 - movq %mm1,-40(%edi) - psrlq $4,%mm1 - movq %mm4,88(%edi) - movq %mm4,%mm6 - movq %mm2,-48(%ebp) - psrlq $4,%mm4 - movq %mm5,80(%ebp) - shll $4,%edx - movb %dl,12(%esp) - movl 88(%ebx),%edx - movq 88(%ebx),%mm2 - psllq $60,%mm6 - movq 80(%ebx),%mm5 - por %mm6,%mm1 - movq %mm0,-32(%edi) - psrlq $4,%mm0 - movq %mm3,96(%edi) - movq %mm3,%mm7 - movq %mm1,-40(%ebp) - psrlq $4,%mm3 - movq %mm4,88(%ebp) - shll $4,%edx - movb %dl,13(%esp) - movl 104(%ebx),%edx - movq 104(%ebx),%mm1 - psllq $60,%mm7 - movq 96(%ebx),%mm4 - por %mm7,%mm0 - movq %mm2,-24(%edi) - psrlq $4,%mm2 - movq %mm5,104(%edi) - movq %mm5,%mm6 - movq %mm0,-32(%ebp) - psrlq $4,%mm5 - movq %mm3,96(%ebp) - shll $4,%edx - movb %dl,14(%esp) - movl 120(%ebx),%edx - movq 120(%ebx),%mm0 - psllq $60,%mm6 - movq 112(%ebx),%mm3 - por %mm6,%mm2 - movq %mm1,-16(%edi) - psrlq $4,%mm1 - movq %mm4,112(%edi) - movq %mm4,%mm7 - movq %mm2,-24(%ebp) - psrlq $4,%mm4 - movq %mm5,104(%ebp) - shll $4,%edx - movb %dl,15(%esp) - psllq $60,%mm7 - por %mm7,%mm1 - movq %mm0,-8(%edi) - psrlq $4,%mm0 - movq %mm3,120(%edi) - movq %mm3,%mm6 - movq %mm1,-16(%ebp) - psrlq $4,%mm3 - movq %mm4,112(%ebp) - psllq $60,%mm6 - por %mm6,%mm0 - movq %mm0,-8(%ebp) - movq %mm3,120(%ebp) - movq (%eax),%mm6 - movl 8(%eax),%ebx - movl 12(%eax),%edx -.align 16 -.L009outer: - xorl 12(%ecx),%edx - xorl 8(%ecx),%ebx - pxor (%ecx),%mm6 - leal 16(%ecx),%ecx - movl %ebx,536(%esp) - movq %mm6,528(%esp) - movl %ecx,548(%esp) - xorl %eax,%eax - roll $8,%edx - movb %dl,%al - movl %eax,%ebp - andb $15,%al - shrl $4,%ebp - pxor %mm0,%mm0 - roll $8,%edx - pxor %mm1,%mm1 - pxor %mm2,%mm2 - movq 16(%esp,%eax,8),%mm7 - movq 144(%esp,%eax,8),%mm6 - movb %dl,%al - movd %mm7,%ebx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%edi - psrlq $8,%mm6 - pxor 272(%esp,%ebp,8),%mm7 - andb $15,%al - psllq $56,%mm3 - shrl $4,%edi - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%ebp,8),%mm6 - xorb (%esp,%ebp,1),%bl - movb %dl,%al - movd %mm7,%ecx - movzbl %bl,%ebx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%ebp - psrlq $8,%mm6 - pxor 272(%esp,%edi,8),%mm7 - andb $15,%al - psllq $56,%mm3 - shrl $4,%ebp - pinsrw $2,(%esi,%ebx,2),%mm2 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%edi,8),%mm6 - xorb (%esp,%edi,1),%cl - movb %dl,%al - movl 536(%esp),%edx - movd %mm7,%ebx - movzbl %cl,%ecx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%edi - psrlq $8,%mm6 - pxor 272(%esp,%ebp,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm2,%mm6 - shrl $4,%edi - pinsrw $2,(%esi,%ecx,2),%mm1 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%ebp,8),%mm6 - xorb (%esp,%ebp,1),%bl - movb %dl,%al - movd %mm7,%ecx - movzbl %bl,%ebx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%ebp - psrlq $8,%mm6 - pxor 272(%esp,%edi,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm1,%mm6 - shrl $4,%ebp - pinsrw $2,(%esi,%ebx,2),%mm0 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%edi,8),%mm6 - xorb (%esp,%edi,1),%cl - movb %dl,%al - movd %mm7,%ebx - movzbl %cl,%ecx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%edi - psrlq $8,%mm6 - pxor 272(%esp,%ebp,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm0,%mm6 - shrl $4,%edi - pinsrw $2,(%esi,%ecx,2),%mm2 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%ebp,8),%mm6 - xorb (%esp,%ebp,1),%bl - movb %dl,%al - movd %mm7,%ecx - movzbl %bl,%ebx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%ebp - psrlq $8,%mm6 - pxor 272(%esp,%edi,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm2,%mm6 - shrl $4,%ebp - pinsrw $2,(%esi,%ebx,2),%mm1 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%edi,8),%mm6 - xorb (%esp,%edi,1),%cl - movb %dl,%al - movl 532(%esp),%edx - movd %mm7,%ebx - movzbl %cl,%ecx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%edi - psrlq $8,%mm6 - pxor 272(%esp,%ebp,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm1,%mm6 - shrl $4,%edi - pinsrw $2,(%esi,%ecx,2),%mm0 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%ebp,8),%mm6 - xorb (%esp,%ebp,1),%bl - movb %dl,%al - movd %mm7,%ecx - movzbl %bl,%ebx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%ebp - psrlq $8,%mm6 - pxor 272(%esp,%edi,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm0,%mm6 - shrl $4,%ebp - pinsrw $2,(%esi,%ebx,2),%mm2 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%edi,8),%mm6 - xorb (%esp,%edi,1),%cl - movb %dl,%al - movd %mm7,%ebx - movzbl %cl,%ecx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%edi - psrlq $8,%mm6 - pxor 272(%esp,%ebp,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm2,%mm6 - shrl $4,%edi - pinsrw $2,(%esi,%ecx,2),%mm1 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%ebp,8),%mm6 - xorb (%esp,%ebp,1),%bl - movb %dl,%al - movd %mm7,%ecx - movzbl %bl,%ebx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%ebp - psrlq $8,%mm6 - pxor 272(%esp,%edi,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm1,%mm6 - shrl $4,%ebp - pinsrw $2,(%esi,%ebx,2),%mm0 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%edi,8),%mm6 - xorb (%esp,%edi,1),%cl - movb %dl,%al - movl 528(%esp),%edx - movd %mm7,%ebx - movzbl %cl,%ecx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%edi - psrlq $8,%mm6 - pxor 272(%esp,%ebp,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm0,%mm6 - shrl $4,%edi - pinsrw $2,(%esi,%ecx,2),%mm2 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%ebp,8),%mm6 - xorb (%esp,%ebp,1),%bl - movb %dl,%al - movd %mm7,%ecx - movzbl %bl,%ebx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%ebp - psrlq $8,%mm6 - pxor 272(%esp,%edi,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm2,%mm6 - shrl $4,%ebp - pinsrw $2,(%esi,%ebx,2),%mm1 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%edi,8),%mm6 - xorb (%esp,%edi,1),%cl - movb %dl,%al - movd %mm7,%ebx - movzbl %cl,%ecx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%edi - psrlq $8,%mm6 - pxor 272(%esp,%ebp,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm1,%mm6 - shrl $4,%edi - pinsrw $2,(%esi,%ecx,2),%mm0 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%ebp,8),%mm6 - xorb (%esp,%ebp,1),%bl - movb %dl,%al - movd %mm7,%ecx - movzbl %bl,%ebx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%ebp - psrlq $8,%mm6 - pxor 272(%esp,%edi,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm0,%mm6 - shrl $4,%ebp - pinsrw $2,(%esi,%ebx,2),%mm2 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%edi,8),%mm6 - xorb (%esp,%edi,1),%cl - movb %dl,%al - movl 524(%esp),%edx - movd %mm7,%ebx - movzbl %cl,%ecx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%edi - psrlq $8,%mm6 - pxor 272(%esp,%ebp,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm2,%mm6 - shrl $4,%edi - pinsrw $2,(%esi,%ecx,2),%mm1 - pxor 16(%esp,%eax,8),%mm7 - pxor 144(%esp,%eax,8),%mm6 - xorb (%esp,%ebp,1),%bl - pxor %mm3,%mm7 - pxor 400(%esp,%ebp,8),%mm6 - movzbl %bl,%ebx - pxor %mm2,%mm2 - psllq $4,%mm1 - movd %mm7,%ecx - psrlq $4,%mm7 - movq %mm6,%mm3 - psrlq $4,%mm6 - shll $4,%ecx - pxor 16(%esp,%edi,8),%mm7 - psllq $60,%mm3 - movzbl %cl,%ecx - pxor %mm3,%mm7 - pxor 144(%esp,%edi,8),%mm6 - pinsrw $2,(%esi,%ebx,2),%mm0 - pxor %mm1,%mm6 - movd %mm7,%edx - pinsrw $3,(%esi,%ecx,2),%mm2 - psllq $12,%mm0 - pxor %mm0,%mm6 - psrlq $32,%mm7 - pxor %mm2,%mm6 - movl 548(%esp),%ecx - movd %mm7,%ebx - movq %mm6,%mm3 - psllw $8,%mm6 - psrlw $8,%mm3 - por %mm3,%mm6 - bswap %edx - pshufw $27,%mm6,%mm6 - bswap %ebx - cmpl 552(%esp),%ecx - jne .L009outer - movl 544(%esp),%eax - movl %edx,12(%eax) - movl %ebx,8(%eax) - movq %mm6,(%eax) - movl 556(%esp),%esp - emms - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size gcm_ghash_4bit_mmx,.-.L_gcm_ghash_4bit_mmx_begin -.globl gcm_init_clmul -.hidden gcm_init_clmul -.type gcm_init_clmul,@function -.align 16 -gcm_init_clmul: -.L_gcm_init_clmul_begin: - movl 4(%esp),%edx - movl 8(%esp),%eax - call .L010pic -.L010pic: - popl %ecx - leal .Lbswap-.L010pic(%ecx),%ecx - movdqu (%eax),%xmm2 - pshufd $78,%xmm2,%xmm2 - pshufd $255,%xmm2,%xmm4 - movdqa %xmm2,%xmm3 - psllq $1,%xmm2 - pxor %xmm5,%xmm5 - psrlq $63,%xmm3 - pcmpgtd %xmm4,%xmm5 - pslldq $8,%xmm3 - por %xmm3,%xmm2 - pand 16(%ecx),%xmm5 - pxor %xmm5,%xmm2 - movdqa %xmm2,%xmm0 - movdqa %xmm0,%xmm1 - pshufd $78,%xmm0,%xmm3 - pshufd $78,%xmm2,%xmm4 - pxor %xmm0,%xmm3 - pxor %xmm2,%xmm4 -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,220,0 - xorps %xmm0,%xmm3 - xorps %xmm1,%xmm3 - movdqa %xmm3,%xmm4 - psrldq $8,%xmm3 - pslldq $8,%xmm4 - pxor %xmm3,%xmm1 - pxor %xmm4,%xmm0 - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 - pshufd $78,%xmm2,%xmm3 - pshufd $78,%xmm0,%xmm4 - pxor %xmm2,%xmm3 - movdqu %xmm2,(%edx) - pxor %xmm0,%xmm4 - movdqu %xmm0,16(%edx) -.byte 102,15,58,15,227,8 - movdqu %xmm4,32(%edx) - ret -.size gcm_init_clmul,.-.L_gcm_init_clmul_begin -.globl gcm_gmult_clmul -.hidden gcm_gmult_clmul -.type gcm_gmult_clmul,@function -.align 16 -gcm_gmult_clmul: -.L_gcm_gmult_clmul_begin: - movl 4(%esp),%eax - movl 8(%esp),%edx - call .L011pic -.L011pic: - popl %ecx - leal .Lbswap-.L011pic(%ecx),%ecx - movdqu (%eax),%xmm0 - movdqa (%ecx),%xmm5 - movups (%edx),%xmm2 -.byte 102,15,56,0,197 - movups 32(%edx),%xmm4 - movdqa %xmm0,%xmm1 - pshufd $78,%xmm0,%xmm3 - pxor %xmm0,%xmm3 -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,220,0 - xorps %xmm0,%xmm3 - xorps %xmm1,%xmm3 - movdqa %xmm3,%xmm4 - psrldq $8,%xmm3 - pslldq $8,%xmm4 - pxor %xmm3,%xmm1 - pxor %xmm4,%xmm0 - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 -.byte 102,15,56,0,197 - movdqu %xmm0,(%eax) - ret -.size gcm_gmult_clmul,.-.L_gcm_gmult_clmul_begin -.globl gcm_ghash_clmul -.hidden gcm_ghash_clmul -.type gcm_ghash_clmul,@function -.align 16 -gcm_ghash_clmul: -.L_gcm_ghash_clmul_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%eax - movl 24(%esp),%edx - movl 28(%esp),%esi - movl 32(%esp),%ebx - call .L012pic -.L012pic: - popl %ecx - leal .Lbswap-.L012pic(%ecx),%ecx - movdqu (%eax),%xmm0 - movdqa (%ecx),%xmm5 - movdqu (%edx),%xmm2 -.byte 102,15,56,0,197 - subl $16,%ebx - jz .L013odd_tail - movdqu (%esi),%xmm3 - movdqu 16(%esi),%xmm6 -.byte 102,15,56,0,221 -.byte 102,15,56,0,245 - movdqu 32(%edx),%xmm5 - pxor %xmm3,%xmm0 - pshufd $78,%xmm6,%xmm3 - movdqa %xmm6,%xmm7 - pxor %xmm6,%xmm3 - leal 32(%esi),%esi -.byte 102,15,58,68,242,0 -.byte 102,15,58,68,250,17 -.byte 102,15,58,68,221,0 - movups 16(%edx),%xmm2 - nop - subl $32,%ebx - jbe .L014even_tail - jmp .L015mod_loop -.align 32 -.L015mod_loop: - pshufd $78,%xmm0,%xmm4 - movdqa %xmm0,%xmm1 - pxor %xmm0,%xmm4 - nop -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,229,16 - movups (%edx),%xmm2 - xorps %xmm6,%xmm0 - movdqa (%ecx),%xmm5 - xorps %xmm7,%xmm1 - movdqu (%esi),%xmm7 - pxor %xmm0,%xmm3 - movdqu 16(%esi),%xmm6 - pxor %xmm1,%xmm3 -.byte 102,15,56,0,253 - pxor %xmm3,%xmm4 - movdqa %xmm4,%xmm3 - psrldq $8,%xmm4 - pslldq $8,%xmm3 - pxor %xmm4,%xmm1 - pxor %xmm3,%xmm0 -.byte 102,15,56,0,245 - pxor %xmm7,%xmm1 - movdqa %xmm6,%xmm7 - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 -.byte 102,15,58,68,242,0 - movups 32(%edx),%xmm5 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - pshufd $78,%xmm7,%xmm3 - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm7,%xmm3 - pxor %xmm4,%xmm1 -.byte 102,15,58,68,250,17 - movups 16(%edx),%xmm2 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 -.byte 102,15,58,68,221,0 - leal 32(%esi),%esi - subl $32,%ebx - ja .L015mod_loop -.L014even_tail: - pshufd $78,%xmm0,%xmm4 - movdqa %xmm0,%xmm1 - pxor %xmm0,%xmm4 -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,229,16 - movdqa (%ecx),%xmm5 - xorps %xmm6,%xmm0 - xorps %xmm7,%xmm1 - pxor %xmm0,%xmm3 - pxor %xmm1,%xmm3 - pxor %xmm3,%xmm4 - movdqa %xmm4,%xmm3 - psrldq $8,%xmm4 - pslldq $8,%xmm3 - pxor %xmm4,%xmm1 - pxor %xmm3,%xmm0 - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 - testl %ebx,%ebx - jnz .L016done - movups (%edx),%xmm2 -.L013odd_tail: - movdqu (%esi),%xmm3 -.byte 102,15,56,0,221 - pxor %xmm3,%xmm0 - movdqa %xmm0,%xmm1 - pshufd $78,%xmm0,%xmm3 - pshufd $78,%xmm2,%xmm4 - pxor %xmm0,%xmm3 - pxor %xmm2,%xmm4 -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,220,0 - xorps %xmm0,%xmm3 - xorps %xmm1,%xmm3 - movdqa %xmm3,%xmm4 - psrldq $8,%xmm3 - pslldq $8,%xmm4 - pxor %xmm3,%xmm1 - pxor %xmm4,%xmm0 - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 -.L016done: -.byte 102,15,56,0,197 - movdqu %xmm0,(%eax) - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size gcm_ghash_clmul,.-.L_gcm_ghash_clmul_begin -.align 64 -.Lbswap: -.byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -.byte 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,194 -.align 64 -.Lrem_8bit: -.value 0,450,900,582,1800,1738,1164,1358 -.value 3600,4050,3476,3158,2328,2266,2716,2910 -.value 7200,7650,8100,7782,6952,6890,6316,6510 -.value 4656,5106,4532,4214,5432,5370,5820,6014 -.value 14400,14722,15300,14854,16200,16010,15564,15630 -.value 13904,14226,13780,13334,12632,12442,13020,13086 -.value 9312,9634,10212,9766,9064,8874,8428,8494 -.value 10864,11186,10740,10294,11640,11450,12028,12094 -.value 28800,28994,29444,29382,30600,30282,29708,30158 -.value 32400,32594,32020,31958,31128,30810,31260,31710 -.value 27808,28002,28452,28390,27560,27242,26668,27118 -.value 25264,25458,24884,24822,26040,25722,26172,26622 -.value 18624,18690,19268,19078,20424,19978,19532,19854 -.value 18128,18194,17748,17558,16856,16410,16988,17310 -.value 21728,21794,22372,22182,21480,21034,20588,20910 -.value 23280,23346,22900,22710,24056,23610,24188,24510 -.value 57600,57538,57988,58182,58888,59338,58764,58446 -.value 61200,61138,60564,60758,59416,59866,60316,59998 -.value 64800,64738,65188,65382,64040,64490,63916,63598 -.value 62256,62194,61620,61814,62520,62970,63420,63102 -.value 55616,55426,56004,56070,56904,57226,56780,56334 -.value 55120,54930,54484,54550,53336,53658,54236,53790 -.value 50528,50338,50916,50982,49768,50090,49644,49198 -.value 52080,51890,51444,51510,52344,52666,53244,52798 -.value 37248,36930,37380,37830,38536,38730,38156,38094 -.value 40848,40530,39956,40406,39064,39258,39708,39646 -.value 36256,35938,36388,36838,35496,35690,35116,35054 -.value 33712,33394,32820,33270,33976,34170,34620,34558 -.value 43456,43010,43588,43910,44744,44810,44364,44174 -.value 42960,42514,42068,42390,41176,41242,41820,41630 -.value 46560,46114,46692,47014,45800,45866,45420,45230 -.value 48112,47666,47220,47542,48376,48442,49020,48830 -.align 64 -.Lrem_4bit: -.long 0,0,0,471859200,0,943718400,0,610271232 -.long 0,1887436800,0,1822425088,0,1220542464,0,1423966208 -.long 0,3774873600,0,4246732800,0,3644850176,0,3311403008 -.long 0,2441084928,0,2376073216,0,2847932416,0,3051356160 -.byte 71,72,65,83,72,32,102,111,114,32,120,56,54,44,32,67 -.byte 82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112 -.byte 112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62 -.byte 0 -#endif diff --git a/third_party/boringssl/linux-x86/crypto/rc4/rc4-586.S b/third_party/boringssl/linux-x86/crypto/rc4/rc4-586.S deleted file mode 100644 index a5cce47c09d0f..0000000000000 --- a/third_party/boringssl/linux-x86/crypto/rc4/rc4-586.S +++ /dev/null @@ -1,385 +0,0 @@ -#if defined(__i386__) -.file "rc4-586.S" -.text -.globl asm_RC4 -.hidden asm_RC4 -.type asm_RC4,@function -.align 16 -asm_RC4: -.L_asm_RC4_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%edi - movl 24(%esp),%edx - movl 28(%esp),%esi - movl 32(%esp),%ebp - xorl %eax,%eax - xorl %ebx,%ebx - cmpl $0,%edx - je .L000abort - movb (%edi),%al - movb 4(%edi),%bl - addl $8,%edi - leal (%esi,%edx,1),%ecx - subl %esi,%ebp - movl %ecx,24(%esp) - incb %al - cmpl $-1,256(%edi) - je .L001RC4_CHAR - movl (%edi,%eax,4),%ecx - andl $-4,%edx - jz .L002loop1 - movl %ebp,32(%esp) - testl $-8,%edx - jz .L003go4loop4 - call .L004PIC_me_up -.L004PIC_me_up: - popl %ebp - leal OPENSSL_ia32cap_P-.L004PIC_me_up(%ebp),%ebp - btl $26,(%ebp) - jnc .L003go4loop4 - movl 32(%esp),%ebp - andl $-8,%edx - leal -8(%esi,%edx,1),%edx - movl %edx,-4(%edi) - addb %cl,%bl - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - incl %eax - addl %ecx,%edx - movzbl %al,%eax - movzbl %dl,%edx - movq (%esi),%mm0 - movl (%edi,%eax,4),%ecx - movd (%edi,%edx,4),%mm2 - jmp .L005loop_mmx_enter -.align 16 -.L006loop_mmx: - addb %cl,%bl - psllq $56,%mm1 - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - incl %eax - addl %ecx,%edx - movzbl %al,%eax - movzbl %dl,%edx - pxor %mm1,%mm2 - movq (%esi),%mm0 - movq %mm2,-8(%ebp,%esi,1) - movl (%edi,%eax,4),%ecx - movd (%edi,%edx,4),%mm2 -.L005loop_mmx_enter: - addb %cl,%bl - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - incl %eax - addl %ecx,%edx - movzbl %al,%eax - movzbl %dl,%edx - pxor %mm0,%mm2 - movl (%edi,%eax,4),%ecx - movd (%edi,%edx,4),%mm1 - addb %cl,%bl - psllq $8,%mm1 - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - incl %eax - addl %ecx,%edx - movzbl %al,%eax - movzbl %dl,%edx - pxor %mm1,%mm2 - movl (%edi,%eax,4),%ecx - movd (%edi,%edx,4),%mm1 - addb %cl,%bl - psllq $16,%mm1 - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - incl %eax - addl %ecx,%edx - movzbl %al,%eax - movzbl %dl,%edx - pxor %mm1,%mm2 - movl (%edi,%eax,4),%ecx - movd (%edi,%edx,4),%mm1 - addb %cl,%bl - psllq $24,%mm1 - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - incl %eax - addl %ecx,%edx - movzbl %al,%eax - movzbl %dl,%edx - pxor %mm1,%mm2 - movl (%edi,%eax,4),%ecx - movd (%edi,%edx,4),%mm1 - addb %cl,%bl - psllq $32,%mm1 - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - incl %eax - addl %ecx,%edx - movzbl %al,%eax - movzbl %dl,%edx - pxor %mm1,%mm2 - movl (%edi,%eax,4),%ecx - movd (%edi,%edx,4),%mm1 - addb %cl,%bl - psllq $40,%mm1 - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - incl %eax - addl %ecx,%edx - movzbl %al,%eax - movzbl %dl,%edx - pxor %mm1,%mm2 - movl (%edi,%eax,4),%ecx - movd (%edi,%edx,4),%mm1 - addb %cl,%bl - psllq $48,%mm1 - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - incl %eax - addl %ecx,%edx - movzbl %al,%eax - movzbl %dl,%edx - pxor %mm1,%mm2 - movl (%edi,%eax,4),%ecx - movd (%edi,%edx,4),%mm1 - movl %ebx,%edx - xorl %ebx,%ebx - movb %dl,%bl - cmpl -4(%edi),%esi - leal 8(%esi),%esi - jb .L006loop_mmx - psllq $56,%mm1 - pxor %mm1,%mm2 - movq %mm2,-8(%ebp,%esi,1) - emms - cmpl 24(%esp),%esi - je .L007done - jmp .L002loop1 -.align 16 -.L003go4loop4: - leal -4(%esi,%edx,1),%edx - movl %edx,28(%esp) -.L008loop4: - addb %cl,%bl - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - addl %ecx,%edx - incb %al - andl $255,%edx - movl (%edi,%eax,4),%ecx - movl (%edi,%edx,4),%ebp - addb %cl,%bl - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - addl %ecx,%edx - incb %al - andl $255,%edx - rorl $8,%ebp - movl (%edi,%eax,4),%ecx - orl (%edi,%edx,4),%ebp - addb %cl,%bl - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - addl %ecx,%edx - incb %al - andl $255,%edx - rorl $8,%ebp - movl (%edi,%eax,4),%ecx - orl (%edi,%edx,4),%ebp - addb %cl,%bl - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - addl %ecx,%edx - incb %al - andl $255,%edx - rorl $8,%ebp - movl 32(%esp),%ecx - orl (%edi,%edx,4),%ebp - rorl $8,%ebp - xorl (%esi),%ebp - cmpl 28(%esp),%esi - movl %ebp,(%ecx,%esi,1) - leal 4(%esi),%esi - movl (%edi,%eax,4),%ecx - jb .L008loop4 - cmpl 24(%esp),%esi - je .L007done - movl 32(%esp),%ebp -.align 16 -.L002loop1: - addb %cl,%bl - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - addl %ecx,%edx - incb %al - andl $255,%edx - movl (%edi,%edx,4),%edx - xorb (%esi),%dl - leal 1(%esi),%esi - movl (%edi,%eax,4),%ecx - cmpl 24(%esp),%esi - movb %dl,-1(%ebp,%esi,1) - jb .L002loop1 - jmp .L007done -.align 16 -.L001RC4_CHAR: - movzbl (%edi,%eax,1),%ecx -.L009cloop1: - addb %cl,%bl - movzbl (%edi,%ebx,1),%edx - movb %cl,(%edi,%ebx,1) - movb %dl,(%edi,%eax,1) - addb %cl,%dl - movzbl (%edi,%edx,1),%edx - addb $1,%al - xorb (%esi),%dl - leal 1(%esi),%esi - movzbl (%edi,%eax,1),%ecx - cmpl 24(%esp),%esi - movb %dl,-1(%ebp,%esi,1) - jb .L009cloop1 -.L007done: - decb %al - movl %ebx,-4(%edi) - movb %al,-8(%edi) -.L000abort: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size asm_RC4,.-.L_asm_RC4_begin -.globl asm_RC4_set_key -.hidden asm_RC4_set_key -.type asm_RC4_set_key,@function -.align 16 -asm_RC4_set_key: -.L_asm_RC4_set_key_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%edi - movl 24(%esp),%ebp - movl 28(%esp),%esi - call .L010PIC_me_up -.L010PIC_me_up: - popl %edx - leal OPENSSL_ia32cap_P-.L010PIC_me_up(%edx),%edx - leal 8(%edi),%edi - leal (%esi,%ebp,1),%esi - negl %ebp - xorl %eax,%eax - movl %ebp,-4(%edi) - btl $20,(%edx) - jc .L011c1stloop -.align 16 -.L012w1stloop: - movl %eax,(%edi,%eax,4) - addb $1,%al - jnc .L012w1stloop - xorl %ecx,%ecx - xorl %edx,%edx -.align 16 -.L013w2ndloop: - movl (%edi,%ecx,4),%eax - addb (%esi,%ebp,1),%dl - addb %al,%dl - addl $1,%ebp - movl (%edi,%edx,4),%ebx - jnz .L014wnowrap - movl -4(%edi),%ebp -.L014wnowrap: - movl %eax,(%edi,%edx,4) - movl %ebx,(%edi,%ecx,4) - addb $1,%cl - jnc .L013w2ndloop - jmp .L015exit -.align 16 -.L011c1stloop: - movb %al,(%edi,%eax,1) - addb $1,%al - jnc .L011c1stloop - xorl %ecx,%ecx - xorl %edx,%edx - xorl %ebx,%ebx -.align 16 -.L016c2ndloop: - movb (%edi,%ecx,1),%al - addb (%esi,%ebp,1),%dl - addb %al,%dl - addl $1,%ebp - movb (%edi,%edx,1),%bl - jnz .L017cnowrap - movl -4(%edi),%ebp -.L017cnowrap: - movb %al,(%edi,%edx,1) - movb %bl,(%edi,%ecx,1) - addb $1,%cl - jnc .L016c2ndloop - movl $-1,256(%edi) -.L015exit: - xorl %eax,%eax - movl %eax,-8(%edi) - movl %eax,-4(%edi) - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size asm_RC4_set_key,.-.L_asm_RC4_set_key_begin -.globl RC4_options -.hidden RC4_options -.type RC4_options,@function -.align 16 -RC4_options: -.L_RC4_options_begin: - call .L018pic_point -.L018pic_point: - popl %eax - leal .L019opts-.L018pic_point(%eax),%eax - call .L020PIC_me_up -.L020PIC_me_up: - popl %edx - leal OPENSSL_ia32cap_P-.L020PIC_me_up(%edx),%edx - movl (%edx),%edx - btl $20,%edx - jc .L0211xchar - btl $26,%edx - jnc .L022ret - addl $25,%eax - ret -.L0211xchar: - addl $12,%eax -.L022ret: - ret -.align 64 -.L019opts: -.byte 114,99,52,40,52,120,44,105,110,116,41,0 -.byte 114,99,52,40,49,120,44,99,104,97,114,41,0 -.byte 114,99,52,40,56,120,44,109,109,120,41,0 -.byte 82,67,52,32,102,111,114,32,120,56,54,44,32,67,82,89 -.byte 80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114 -.byte 111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 64 -.size RC4_options,.-.L_RC4_options_begin -#endif diff --git a/third_party/boringssl/linux-x86/crypto/sha/sha1-586.S b/third_party/boringssl/linux-x86/crypto/sha/sha1-586.S deleted file mode 100644 index 808ccac5178f7..0000000000000 --- a/third_party/boringssl/linux-x86/crypto/sha/sha1-586.S +++ /dev/null @@ -1,2799 +0,0 @@ -#if defined(__i386__) -.file "sha1-586.S" -.text -.globl sha1_block_data_order -.hidden sha1_block_data_order -.type sha1_block_data_order,@function -.align 16 -sha1_block_data_order: -.L_sha1_block_data_order_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - call .L000pic_point -.L000pic_point: - popl %ebp - leal OPENSSL_ia32cap_P-.L000pic_point(%ebp),%esi - leal .LK_XX_XX-.L000pic_point(%ebp),%ebp - movl (%esi),%eax - movl 4(%esi),%edx - testl $512,%edx - jz .L001x86 - movl 8(%esi),%ecx - testl $16777216,%eax - jz .L001x86 - testl $536870912,%ecx - jnz .Lshaext_shortcut - jmp .Lssse3_shortcut -.align 16 -.L001x86: - movl 20(%esp),%ebp - movl 24(%esp),%esi - movl 28(%esp),%eax - subl $76,%esp - shll $6,%eax - addl %esi,%eax - movl %eax,104(%esp) - movl 16(%ebp),%edi - jmp .L002loop -.align 16 -.L002loop: - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - movl %eax,(%esp) - movl %ebx,4(%esp) - movl %ecx,8(%esp) - movl %edx,12(%esp) - movl 16(%esi),%eax - movl 20(%esi),%ebx - movl 24(%esi),%ecx - movl 28(%esi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - movl %eax,16(%esp) - movl %ebx,20(%esp) - movl %ecx,24(%esp) - movl %edx,28(%esp) - movl 32(%esi),%eax - movl 36(%esi),%ebx - movl 40(%esi),%ecx - movl 44(%esi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - movl %eax,32(%esp) - movl %ebx,36(%esp) - movl %ecx,40(%esp) - movl %edx,44(%esp) - movl 48(%esi),%eax - movl 52(%esi),%ebx - movl 56(%esi),%ecx - movl 60(%esi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - movl %eax,48(%esp) - movl %ebx,52(%esp) - movl %ecx,56(%esp) - movl %edx,60(%esp) - movl %esi,100(%esp) - movl (%ebp),%eax - movl 4(%ebp),%ebx - movl 8(%ebp),%ecx - movl 12(%ebp),%edx - - movl %ecx,%esi - movl %eax,%ebp - roll $5,%ebp - xorl %edx,%esi - addl %edi,%ebp - movl (%esp),%edi - andl %ebx,%esi - rorl $2,%ebx - xorl %edx,%esi - leal 1518500249(%ebp,%edi,1),%ebp - addl %esi,%ebp - - movl %ebx,%edi - movl %ebp,%esi - roll $5,%ebp - xorl %ecx,%edi - addl %edx,%ebp - movl 4(%esp),%edx - andl %eax,%edi - rorl $2,%eax - xorl %ecx,%edi - leal 1518500249(%ebp,%edx,1),%ebp - addl %edi,%ebp - - movl %eax,%edx - movl %ebp,%edi - roll $5,%ebp - xorl %ebx,%edx - addl %ecx,%ebp - movl 8(%esp),%ecx - andl %esi,%edx - rorl $2,%esi - xorl %ebx,%edx - leal 1518500249(%ebp,%ecx,1),%ebp - addl %edx,%ebp - - movl %esi,%ecx - movl %ebp,%edx - roll $5,%ebp - xorl %eax,%ecx - addl %ebx,%ebp - movl 12(%esp),%ebx - andl %edi,%ecx - rorl $2,%edi - xorl %eax,%ecx - leal 1518500249(%ebp,%ebx,1),%ebp - addl %ecx,%ebp - - movl %edi,%ebx - movl %ebp,%ecx - roll $5,%ebp - xorl %esi,%ebx - addl %eax,%ebp - movl 16(%esp),%eax - andl %edx,%ebx - rorl $2,%edx - xorl %esi,%ebx - leal 1518500249(%ebp,%eax,1),%ebp - addl %ebx,%ebp - - movl %edx,%eax - movl %ebp,%ebx - roll $5,%ebp - xorl %edi,%eax - addl %esi,%ebp - movl 20(%esp),%esi - andl %ecx,%eax - rorl $2,%ecx - xorl %edi,%eax - leal 1518500249(%ebp,%esi,1),%ebp - addl %eax,%ebp - - movl %ecx,%esi - movl %ebp,%eax - roll $5,%ebp - xorl %edx,%esi - addl %edi,%ebp - movl 24(%esp),%edi - andl %ebx,%esi - rorl $2,%ebx - xorl %edx,%esi - leal 1518500249(%ebp,%edi,1),%ebp - addl %esi,%ebp - - movl %ebx,%edi - movl %ebp,%esi - roll $5,%ebp - xorl %ecx,%edi - addl %edx,%ebp - movl 28(%esp),%edx - andl %eax,%edi - rorl $2,%eax - xorl %ecx,%edi - leal 1518500249(%ebp,%edx,1),%ebp - addl %edi,%ebp - - movl %eax,%edx - movl %ebp,%edi - roll $5,%ebp - xorl %ebx,%edx - addl %ecx,%ebp - movl 32(%esp),%ecx - andl %esi,%edx - rorl $2,%esi - xorl %ebx,%edx - leal 1518500249(%ebp,%ecx,1),%ebp - addl %edx,%ebp - - movl %esi,%ecx - movl %ebp,%edx - roll $5,%ebp - xorl %eax,%ecx - addl %ebx,%ebp - movl 36(%esp),%ebx - andl %edi,%ecx - rorl $2,%edi - xorl %eax,%ecx - leal 1518500249(%ebp,%ebx,1),%ebp - addl %ecx,%ebp - - movl %edi,%ebx - movl %ebp,%ecx - roll $5,%ebp - xorl %esi,%ebx - addl %eax,%ebp - movl 40(%esp),%eax - andl %edx,%ebx - rorl $2,%edx - xorl %esi,%ebx - leal 1518500249(%ebp,%eax,1),%ebp - addl %ebx,%ebp - - movl %edx,%eax - movl %ebp,%ebx - roll $5,%ebp - xorl %edi,%eax - addl %esi,%ebp - movl 44(%esp),%esi - andl %ecx,%eax - rorl $2,%ecx - xorl %edi,%eax - leal 1518500249(%ebp,%esi,1),%ebp - addl %eax,%ebp - - movl %ecx,%esi - movl %ebp,%eax - roll $5,%ebp - xorl %edx,%esi - addl %edi,%ebp - movl 48(%esp),%edi - andl %ebx,%esi - rorl $2,%ebx - xorl %edx,%esi - leal 1518500249(%ebp,%edi,1),%ebp - addl %esi,%ebp - - movl %ebx,%edi - movl %ebp,%esi - roll $5,%ebp - xorl %ecx,%edi - addl %edx,%ebp - movl 52(%esp),%edx - andl %eax,%edi - rorl $2,%eax - xorl %ecx,%edi - leal 1518500249(%ebp,%edx,1),%ebp - addl %edi,%ebp - - movl %eax,%edx - movl %ebp,%edi - roll $5,%ebp - xorl %ebx,%edx - addl %ecx,%ebp - movl 56(%esp),%ecx - andl %esi,%edx - rorl $2,%esi - xorl %ebx,%edx - leal 1518500249(%ebp,%ecx,1),%ebp - addl %edx,%ebp - - movl %esi,%ecx - movl %ebp,%edx - roll $5,%ebp - xorl %eax,%ecx - addl %ebx,%ebp - movl 60(%esp),%ebx - andl %edi,%ecx - rorl $2,%edi - xorl %eax,%ecx - leal 1518500249(%ebp,%ebx,1),%ebp - movl (%esp),%ebx - addl %ebp,%ecx - - movl %edi,%ebp - xorl 8(%esp),%ebx - xorl %esi,%ebp - xorl 32(%esp),%ebx - andl %edx,%ebp - xorl 52(%esp),%ebx - roll $1,%ebx - xorl %esi,%ebp - addl %ebp,%eax - movl %ecx,%ebp - rorl $2,%edx - movl %ebx,(%esp) - roll $5,%ebp - leal 1518500249(%ebx,%eax,1),%ebx - movl 4(%esp),%eax - addl %ebp,%ebx - - movl %edx,%ebp - xorl 12(%esp),%eax - xorl %edi,%ebp - xorl 36(%esp),%eax - andl %ecx,%ebp - xorl 56(%esp),%eax - roll $1,%eax - xorl %edi,%ebp - addl %ebp,%esi - movl %ebx,%ebp - rorl $2,%ecx - movl %eax,4(%esp) - roll $5,%ebp - leal 1518500249(%eax,%esi,1),%eax - movl 8(%esp),%esi - addl %ebp,%eax - - movl %ecx,%ebp - xorl 16(%esp),%esi - xorl %edx,%ebp - xorl 40(%esp),%esi - andl %ebx,%ebp - xorl 60(%esp),%esi - roll $1,%esi - xorl %edx,%ebp - addl %ebp,%edi - movl %eax,%ebp - rorl $2,%ebx - movl %esi,8(%esp) - roll $5,%ebp - leal 1518500249(%esi,%edi,1),%esi - movl 12(%esp),%edi - addl %ebp,%esi - - movl %ebx,%ebp - xorl 20(%esp),%edi - xorl %ecx,%ebp - xorl 44(%esp),%edi - andl %eax,%ebp - xorl (%esp),%edi - roll $1,%edi - xorl %ecx,%ebp - addl %ebp,%edx - movl %esi,%ebp - rorl $2,%eax - movl %edi,12(%esp) - roll $5,%ebp - leal 1518500249(%edi,%edx,1),%edi - movl 16(%esp),%edx - addl %ebp,%edi - - movl %esi,%ebp - xorl 24(%esp),%edx - xorl %eax,%ebp - xorl 48(%esp),%edx - xorl %ebx,%ebp - xorl 4(%esp),%edx - roll $1,%edx - addl %ebp,%ecx - rorl $2,%esi - movl %edi,%ebp - roll $5,%ebp - movl %edx,16(%esp) - leal 1859775393(%edx,%ecx,1),%edx - movl 20(%esp),%ecx - addl %ebp,%edx - - movl %edi,%ebp - xorl 28(%esp),%ecx - xorl %esi,%ebp - xorl 52(%esp),%ecx - xorl %eax,%ebp - xorl 8(%esp),%ecx - roll $1,%ecx - addl %ebp,%ebx - rorl $2,%edi - movl %edx,%ebp - roll $5,%ebp - movl %ecx,20(%esp) - leal 1859775393(%ecx,%ebx,1),%ecx - movl 24(%esp),%ebx - addl %ebp,%ecx - - movl %edx,%ebp - xorl 32(%esp),%ebx - xorl %edi,%ebp - xorl 56(%esp),%ebx - xorl %esi,%ebp - xorl 12(%esp),%ebx - roll $1,%ebx - addl %ebp,%eax - rorl $2,%edx - movl %ecx,%ebp - roll $5,%ebp - movl %ebx,24(%esp) - leal 1859775393(%ebx,%eax,1),%ebx - movl 28(%esp),%eax - addl %ebp,%ebx - - movl %ecx,%ebp - xorl 36(%esp),%eax - xorl %edx,%ebp - xorl 60(%esp),%eax - xorl %edi,%ebp - xorl 16(%esp),%eax - roll $1,%eax - addl %ebp,%esi - rorl $2,%ecx - movl %ebx,%ebp - roll $5,%ebp - movl %eax,28(%esp) - leal 1859775393(%eax,%esi,1),%eax - movl 32(%esp),%esi - addl %ebp,%eax - - movl %ebx,%ebp - xorl 40(%esp),%esi - xorl %ecx,%ebp - xorl (%esp),%esi - xorl %edx,%ebp - xorl 20(%esp),%esi - roll $1,%esi - addl %ebp,%edi - rorl $2,%ebx - movl %eax,%ebp - roll $5,%ebp - movl %esi,32(%esp) - leal 1859775393(%esi,%edi,1),%esi - movl 36(%esp),%edi - addl %ebp,%esi - - movl %eax,%ebp - xorl 44(%esp),%edi - xorl %ebx,%ebp - xorl 4(%esp),%edi - xorl %ecx,%ebp - xorl 24(%esp),%edi - roll $1,%edi - addl %ebp,%edx - rorl $2,%eax - movl %esi,%ebp - roll $5,%ebp - movl %edi,36(%esp) - leal 1859775393(%edi,%edx,1),%edi - movl 40(%esp),%edx - addl %ebp,%edi - - movl %esi,%ebp - xorl 48(%esp),%edx - xorl %eax,%ebp - xorl 8(%esp),%edx - xorl %ebx,%ebp - xorl 28(%esp),%edx - roll $1,%edx - addl %ebp,%ecx - rorl $2,%esi - movl %edi,%ebp - roll $5,%ebp - movl %edx,40(%esp) - leal 1859775393(%edx,%ecx,1),%edx - movl 44(%esp),%ecx - addl %ebp,%edx - - movl %edi,%ebp - xorl 52(%esp),%ecx - xorl %esi,%ebp - xorl 12(%esp),%ecx - xorl %eax,%ebp - xorl 32(%esp),%ecx - roll $1,%ecx - addl %ebp,%ebx - rorl $2,%edi - movl %edx,%ebp - roll $5,%ebp - movl %ecx,44(%esp) - leal 1859775393(%ecx,%ebx,1),%ecx - movl 48(%esp),%ebx - addl %ebp,%ecx - - movl %edx,%ebp - xorl 56(%esp),%ebx - xorl %edi,%ebp - xorl 16(%esp),%ebx - xorl %esi,%ebp - xorl 36(%esp),%ebx - roll $1,%ebx - addl %ebp,%eax - rorl $2,%edx - movl %ecx,%ebp - roll $5,%ebp - movl %ebx,48(%esp) - leal 1859775393(%ebx,%eax,1),%ebx - movl 52(%esp),%eax - addl %ebp,%ebx - - movl %ecx,%ebp - xorl 60(%esp),%eax - xorl %edx,%ebp - xorl 20(%esp),%eax - xorl %edi,%ebp - xorl 40(%esp),%eax - roll $1,%eax - addl %ebp,%esi - rorl $2,%ecx - movl %ebx,%ebp - roll $5,%ebp - movl %eax,52(%esp) - leal 1859775393(%eax,%esi,1),%eax - movl 56(%esp),%esi - addl %ebp,%eax - - movl %ebx,%ebp - xorl (%esp),%esi - xorl %ecx,%ebp - xorl 24(%esp),%esi - xorl %edx,%ebp - xorl 44(%esp),%esi - roll $1,%esi - addl %ebp,%edi - rorl $2,%ebx - movl %eax,%ebp - roll $5,%ebp - movl %esi,56(%esp) - leal 1859775393(%esi,%edi,1),%esi - movl 60(%esp),%edi - addl %ebp,%esi - - movl %eax,%ebp - xorl 4(%esp),%edi - xorl %ebx,%ebp - xorl 28(%esp),%edi - xorl %ecx,%ebp - xorl 48(%esp),%edi - roll $1,%edi - addl %ebp,%edx - rorl $2,%eax - movl %esi,%ebp - roll $5,%ebp - movl %edi,60(%esp) - leal 1859775393(%edi,%edx,1),%edi - movl (%esp),%edx - addl %ebp,%edi - - movl %esi,%ebp - xorl 8(%esp),%edx - xorl %eax,%ebp - xorl 32(%esp),%edx - xorl %ebx,%ebp - xorl 52(%esp),%edx - roll $1,%edx - addl %ebp,%ecx - rorl $2,%esi - movl %edi,%ebp - roll $5,%ebp - movl %edx,(%esp) - leal 1859775393(%edx,%ecx,1),%edx - movl 4(%esp),%ecx - addl %ebp,%edx - - movl %edi,%ebp - xorl 12(%esp),%ecx - xorl %esi,%ebp - xorl 36(%esp),%ecx - xorl %eax,%ebp - xorl 56(%esp),%ecx - roll $1,%ecx - addl %ebp,%ebx - rorl $2,%edi - movl %edx,%ebp - roll $5,%ebp - movl %ecx,4(%esp) - leal 1859775393(%ecx,%ebx,1),%ecx - movl 8(%esp),%ebx - addl %ebp,%ecx - - movl %edx,%ebp - xorl 16(%esp),%ebx - xorl %edi,%ebp - xorl 40(%esp),%ebx - xorl %esi,%ebp - xorl 60(%esp),%ebx - roll $1,%ebx - addl %ebp,%eax - rorl $2,%edx - movl %ecx,%ebp - roll $5,%ebp - movl %ebx,8(%esp) - leal 1859775393(%ebx,%eax,1),%ebx - movl 12(%esp),%eax - addl %ebp,%ebx - - movl %ecx,%ebp - xorl 20(%esp),%eax - xorl %edx,%ebp - xorl 44(%esp),%eax - xorl %edi,%ebp - xorl (%esp),%eax - roll $1,%eax - addl %ebp,%esi - rorl $2,%ecx - movl %ebx,%ebp - roll $5,%ebp - movl %eax,12(%esp) - leal 1859775393(%eax,%esi,1),%eax - movl 16(%esp),%esi - addl %ebp,%eax - - movl %ebx,%ebp - xorl 24(%esp),%esi - xorl %ecx,%ebp - xorl 48(%esp),%esi - xorl %edx,%ebp - xorl 4(%esp),%esi - roll $1,%esi - addl %ebp,%edi - rorl $2,%ebx - movl %eax,%ebp - roll $5,%ebp - movl %esi,16(%esp) - leal 1859775393(%esi,%edi,1),%esi - movl 20(%esp),%edi - addl %ebp,%esi - - movl %eax,%ebp - xorl 28(%esp),%edi - xorl %ebx,%ebp - xorl 52(%esp),%edi - xorl %ecx,%ebp - xorl 8(%esp),%edi - roll $1,%edi - addl %ebp,%edx - rorl $2,%eax - movl %esi,%ebp - roll $5,%ebp - movl %edi,20(%esp) - leal 1859775393(%edi,%edx,1),%edi - movl 24(%esp),%edx - addl %ebp,%edi - - movl %esi,%ebp - xorl 32(%esp),%edx - xorl %eax,%ebp - xorl 56(%esp),%edx - xorl %ebx,%ebp - xorl 12(%esp),%edx - roll $1,%edx - addl %ebp,%ecx - rorl $2,%esi - movl %edi,%ebp - roll $5,%ebp - movl %edx,24(%esp) - leal 1859775393(%edx,%ecx,1),%edx - movl 28(%esp),%ecx - addl %ebp,%edx - - movl %edi,%ebp - xorl 36(%esp),%ecx - xorl %esi,%ebp - xorl 60(%esp),%ecx - xorl %eax,%ebp - xorl 16(%esp),%ecx - roll $1,%ecx - addl %ebp,%ebx - rorl $2,%edi - movl %edx,%ebp - roll $5,%ebp - movl %ecx,28(%esp) - leal 1859775393(%ecx,%ebx,1),%ecx - movl 32(%esp),%ebx - addl %ebp,%ecx - - movl %edi,%ebp - xorl 40(%esp),%ebx - xorl %esi,%ebp - xorl (%esp),%ebx - andl %edx,%ebp - xorl 20(%esp),%ebx - roll $1,%ebx - addl %eax,%ebp - rorl $2,%edx - movl %ecx,%eax - roll $5,%eax - movl %ebx,32(%esp) - leal 2400959708(%ebx,%ebp,1),%ebx - movl %edi,%ebp - addl %eax,%ebx - andl %esi,%ebp - movl 36(%esp),%eax - addl %ebp,%ebx - - movl %edx,%ebp - xorl 44(%esp),%eax - xorl %edi,%ebp - xorl 4(%esp),%eax - andl %ecx,%ebp - xorl 24(%esp),%eax - roll $1,%eax - addl %esi,%ebp - rorl $2,%ecx - movl %ebx,%esi - roll $5,%esi - movl %eax,36(%esp) - leal 2400959708(%eax,%ebp,1),%eax - movl %edx,%ebp - addl %esi,%eax - andl %edi,%ebp - movl 40(%esp),%esi - addl %ebp,%eax - - movl %ecx,%ebp - xorl 48(%esp),%esi - xorl %edx,%ebp - xorl 8(%esp),%esi - andl %ebx,%ebp - xorl 28(%esp),%esi - roll $1,%esi - addl %edi,%ebp - rorl $2,%ebx - movl %eax,%edi - roll $5,%edi - movl %esi,40(%esp) - leal 2400959708(%esi,%ebp,1),%esi - movl %ecx,%ebp - addl %edi,%esi - andl %edx,%ebp - movl 44(%esp),%edi - addl %ebp,%esi - - movl %ebx,%ebp - xorl 52(%esp),%edi - xorl %ecx,%ebp - xorl 12(%esp),%edi - andl %eax,%ebp - xorl 32(%esp),%edi - roll $1,%edi - addl %edx,%ebp - rorl $2,%eax - movl %esi,%edx - roll $5,%edx - movl %edi,44(%esp) - leal 2400959708(%edi,%ebp,1),%edi - movl %ebx,%ebp - addl %edx,%edi - andl %ecx,%ebp - movl 48(%esp),%edx - addl %ebp,%edi - - movl %eax,%ebp - xorl 56(%esp),%edx - xorl %ebx,%ebp - xorl 16(%esp),%edx - andl %esi,%ebp - xorl 36(%esp),%edx - roll $1,%edx - addl %ecx,%ebp - rorl $2,%esi - movl %edi,%ecx - roll $5,%ecx - movl %edx,48(%esp) - leal 2400959708(%edx,%ebp,1),%edx - movl %eax,%ebp - addl %ecx,%edx - andl %ebx,%ebp - movl 52(%esp),%ecx - addl %ebp,%edx - - movl %esi,%ebp - xorl 60(%esp),%ecx - xorl %eax,%ebp - xorl 20(%esp),%ecx - andl %edi,%ebp - xorl 40(%esp),%ecx - roll $1,%ecx - addl %ebx,%ebp - rorl $2,%edi - movl %edx,%ebx - roll $5,%ebx - movl %ecx,52(%esp) - leal 2400959708(%ecx,%ebp,1),%ecx - movl %esi,%ebp - addl %ebx,%ecx - andl %eax,%ebp - movl 56(%esp),%ebx - addl %ebp,%ecx - - movl %edi,%ebp - xorl (%esp),%ebx - xorl %esi,%ebp - xorl 24(%esp),%ebx - andl %edx,%ebp - xorl 44(%esp),%ebx - roll $1,%ebx - addl %eax,%ebp - rorl $2,%edx - movl %ecx,%eax - roll $5,%eax - movl %ebx,56(%esp) - leal 2400959708(%ebx,%ebp,1),%ebx - movl %edi,%ebp - addl %eax,%ebx - andl %esi,%ebp - movl 60(%esp),%eax - addl %ebp,%ebx - - movl %edx,%ebp - xorl 4(%esp),%eax - xorl %edi,%ebp - xorl 28(%esp),%eax - andl %ecx,%ebp - xorl 48(%esp),%eax - roll $1,%eax - addl %esi,%ebp - rorl $2,%ecx - movl %ebx,%esi - roll $5,%esi - movl %eax,60(%esp) - leal 2400959708(%eax,%ebp,1),%eax - movl %edx,%ebp - addl %esi,%eax - andl %edi,%ebp - movl (%esp),%esi - addl %ebp,%eax - - movl %ecx,%ebp - xorl 8(%esp),%esi - xorl %edx,%ebp - xorl 32(%esp),%esi - andl %ebx,%ebp - xorl 52(%esp),%esi - roll $1,%esi - addl %edi,%ebp - rorl $2,%ebx - movl %eax,%edi - roll $5,%edi - movl %esi,(%esp) - leal 2400959708(%esi,%ebp,1),%esi - movl %ecx,%ebp - addl %edi,%esi - andl %edx,%ebp - movl 4(%esp),%edi - addl %ebp,%esi - - movl %ebx,%ebp - xorl 12(%esp),%edi - xorl %ecx,%ebp - xorl 36(%esp),%edi - andl %eax,%ebp - xorl 56(%esp),%edi - roll $1,%edi - addl %edx,%ebp - rorl $2,%eax - movl %esi,%edx - roll $5,%edx - movl %edi,4(%esp) - leal 2400959708(%edi,%ebp,1),%edi - movl %ebx,%ebp - addl %edx,%edi - andl %ecx,%ebp - movl 8(%esp),%edx - addl %ebp,%edi - - movl %eax,%ebp - xorl 16(%esp),%edx - xorl %ebx,%ebp - xorl 40(%esp),%edx - andl %esi,%ebp - xorl 60(%esp),%edx - roll $1,%edx - addl %ecx,%ebp - rorl $2,%esi - movl %edi,%ecx - roll $5,%ecx - movl %edx,8(%esp) - leal 2400959708(%edx,%ebp,1),%edx - movl %eax,%ebp - addl %ecx,%edx - andl %ebx,%ebp - movl 12(%esp),%ecx - addl %ebp,%edx - - movl %esi,%ebp - xorl 20(%esp),%ecx - xorl %eax,%ebp - xorl 44(%esp),%ecx - andl %edi,%ebp - xorl (%esp),%ecx - roll $1,%ecx - addl %ebx,%ebp - rorl $2,%edi - movl %edx,%ebx - roll $5,%ebx - movl %ecx,12(%esp) - leal 2400959708(%ecx,%ebp,1),%ecx - movl %esi,%ebp - addl %ebx,%ecx - andl %eax,%ebp - movl 16(%esp),%ebx - addl %ebp,%ecx - - movl %edi,%ebp - xorl 24(%esp),%ebx - xorl %esi,%ebp - xorl 48(%esp),%ebx - andl %edx,%ebp - xorl 4(%esp),%ebx - roll $1,%ebx - addl %eax,%ebp - rorl $2,%edx - movl %ecx,%eax - roll $5,%eax - movl %ebx,16(%esp) - leal 2400959708(%ebx,%ebp,1),%ebx - movl %edi,%ebp - addl %eax,%ebx - andl %esi,%ebp - movl 20(%esp),%eax - addl %ebp,%ebx - - movl %edx,%ebp - xorl 28(%esp),%eax - xorl %edi,%ebp - xorl 52(%esp),%eax - andl %ecx,%ebp - xorl 8(%esp),%eax - roll $1,%eax - addl %esi,%ebp - rorl $2,%ecx - movl %ebx,%esi - roll $5,%esi - movl %eax,20(%esp) - leal 2400959708(%eax,%ebp,1),%eax - movl %edx,%ebp - addl %esi,%eax - andl %edi,%ebp - movl 24(%esp),%esi - addl %ebp,%eax - - movl %ecx,%ebp - xorl 32(%esp),%esi - xorl %edx,%ebp - xorl 56(%esp),%esi - andl %ebx,%ebp - xorl 12(%esp),%esi - roll $1,%esi - addl %edi,%ebp - rorl $2,%ebx - movl %eax,%edi - roll $5,%edi - movl %esi,24(%esp) - leal 2400959708(%esi,%ebp,1),%esi - movl %ecx,%ebp - addl %edi,%esi - andl %edx,%ebp - movl 28(%esp),%edi - addl %ebp,%esi - - movl %ebx,%ebp - xorl 36(%esp),%edi - xorl %ecx,%ebp - xorl 60(%esp),%edi - andl %eax,%ebp - xorl 16(%esp),%edi - roll $1,%edi - addl %edx,%ebp - rorl $2,%eax - movl %esi,%edx - roll $5,%edx - movl %edi,28(%esp) - leal 2400959708(%edi,%ebp,1),%edi - movl %ebx,%ebp - addl %edx,%edi - andl %ecx,%ebp - movl 32(%esp),%edx - addl %ebp,%edi - - movl %eax,%ebp - xorl 40(%esp),%edx - xorl %ebx,%ebp - xorl (%esp),%edx - andl %esi,%ebp - xorl 20(%esp),%edx - roll $1,%edx - addl %ecx,%ebp - rorl $2,%esi - movl %edi,%ecx - roll $5,%ecx - movl %edx,32(%esp) - leal 2400959708(%edx,%ebp,1),%edx - movl %eax,%ebp - addl %ecx,%edx - andl %ebx,%ebp - movl 36(%esp),%ecx - addl %ebp,%edx - - movl %esi,%ebp - xorl 44(%esp),%ecx - xorl %eax,%ebp - xorl 4(%esp),%ecx - andl %edi,%ebp - xorl 24(%esp),%ecx - roll $1,%ecx - addl %ebx,%ebp - rorl $2,%edi - movl %edx,%ebx - roll $5,%ebx - movl %ecx,36(%esp) - leal 2400959708(%ecx,%ebp,1),%ecx - movl %esi,%ebp - addl %ebx,%ecx - andl %eax,%ebp - movl 40(%esp),%ebx - addl %ebp,%ecx - - movl %edi,%ebp - xorl 48(%esp),%ebx - xorl %esi,%ebp - xorl 8(%esp),%ebx - andl %edx,%ebp - xorl 28(%esp),%ebx - roll $1,%ebx - addl %eax,%ebp - rorl $2,%edx - movl %ecx,%eax - roll $5,%eax - movl %ebx,40(%esp) - leal 2400959708(%ebx,%ebp,1),%ebx - movl %edi,%ebp - addl %eax,%ebx - andl %esi,%ebp - movl 44(%esp),%eax - addl %ebp,%ebx - - movl %edx,%ebp - xorl 52(%esp),%eax - xorl %edi,%ebp - xorl 12(%esp),%eax - andl %ecx,%ebp - xorl 32(%esp),%eax - roll $1,%eax - addl %esi,%ebp - rorl $2,%ecx - movl %ebx,%esi - roll $5,%esi - movl %eax,44(%esp) - leal 2400959708(%eax,%ebp,1),%eax - movl %edx,%ebp - addl %esi,%eax - andl %edi,%ebp - movl 48(%esp),%esi - addl %ebp,%eax - - movl %ebx,%ebp - xorl 56(%esp),%esi - xorl %ecx,%ebp - xorl 16(%esp),%esi - xorl %edx,%ebp - xorl 36(%esp),%esi - roll $1,%esi - addl %ebp,%edi - rorl $2,%ebx - movl %eax,%ebp - roll $5,%ebp - movl %esi,48(%esp) - leal 3395469782(%esi,%edi,1),%esi - movl 52(%esp),%edi - addl %ebp,%esi - - movl %eax,%ebp - xorl 60(%esp),%edi - xorl %ebx,%ebp - xorl 20(%esp),%edi - xorl %ecx,%ebp - xorl 40(%esp),%edi - roll $1,%edi - addl %ebp,%edx - rorl $2,%eax - movl %esi,%ebp - roll $5,%ebp - movl %edi,52(%esp) - leal 3395469782(%edi,%edx,1),%edi - movl 56(%esp),%edx - addl %ebp,%edi - - movl %esi,%ebp - xorl (%esp),%edx - xorl %eax,%ebp - xorl 24(%esp),%edx - xorl %ebx,%ebp - xorl 44(%esp),%edx - roll $1,%edx - addl %ebp,%ecx - rorl $2,%esi - movl %edi,%ebp - roll $5,%ebp - movl %edx,56(%esp) - leal 3395469782(%edx,%ecx,1),%edx - movl 60(%esp),%ecx - addl %ebp,%edx - - movl %edi,%ebp - xorl 4(%esp),%ecx - xorl %esi,%ebp - xorl 28(%esp),%ecx - xorl %eax,%ebp - xorl 48(%esp),%ecx - roll $1,%ecx - addl %ebp,%ebx - rorl $2,%edi - movl %edx,%ebp - roll $5,%ebp - movl %ecx,60(%esp) - leal 3395469782(%ecx,%ebx,1),%ecx - movl (%esp),%ebx - addl %ebp,%ecx - - movl %edx,%ebp - xorl 8(%esp),%ebx - xorl %edi,%ebp - xorl 32(%esp),%ebx - xorl %esi,%ebp - xorl 52(%esp),%ebx - roll $1,%ebx - addl %ebp,%eax - rorl $2,%edx - movl %ecx,%ebp - roll $5,%ebp - movl %ebx,(%esp) - leal 3395469782(%ebx,%eax,1),%ebx - movl 4(%esp),%eax - addl %ebp,%ebx - - movl %ecx,%ebp - xorl 12(%esp),%eax - xorl %edx,%ebp - xorl 36(%esp),%eax - xorl %edi,%ebp - xorl 56(%esp),%eax - roll $1,%eax - addl %ebp,%esi - rorl $2,%ecx - movl %ebx,%ebp - roll $5,%ebp - movl %eax,4(%esp) - leal 3395469782(%eax,%esi,1),%eax - movl 8(%esp),%esi - addl %ebp,%eax - - movl %ebx,%ebp - xorl 16(%esp),%esi - xorl %ecx,%ebp - xorl 40(%esp),%esi - xorl %edx,%ebp - xorl 60(%esp),%esi - roll $1,%esi - addl %ebp,%edi - rorl $2,%ebx - movl %eax,%ebp - roll $5,%ebp - movl %esi,8(%esp) - leal 3395469782(%esi,%edi,1),%esi - movl 12(%esp),%edi - addl %ebp,%esi - - movl %eax,%ebp - xorl 20(%esp),%edi - xorl %ebx,%ebp - xorl 44(%esp),%edi - xorl %ecx,%ebp - xorl (%esp),%edi - roll $1,%edi - addl %ebp,%edx - rorl $2,%eax - movl %esi,%ebp - roll $5,%ebp - movl %edi,12(%esp) - leal 3395469782(%edi,%edx,1),%edi - movl 16(%esp),%edx - addl %ebp,%edi - - movl %esi,%ebp - xorl 24(%esp),%edx - xorl %eax,%ebp - xorl 48(%esp),%edx - xorl %ebx,%ebp - xorl 4(%esp),%edx - roll $1,%edx - addl %ebp,%ecx - rorl $2,%esi - movl %edi,%ebp - roll $5,%ebp - movl %edx,16(%esp) - leal 3395469782(%edx,%ecx,1),%edx - movl 20(%esp),%ecx - addl %ebp,%edx - - movl %edi,%ebp - xorl 28(%esp),%ecx - xorl %esi,%ebp - xorl 52(%esp),%ecx - xorl %eax,%ebp - xorl 8(%esp),%ecx - roll $1,%ecx - addl %ebp,%ebx - rorl $2,%edi - movl %edx,%ebp - roll $5,%ebp - movl %ecx,20(%esp) - leal 3395469782(%ecx,%ebx,1),%ecx - movl 24(%esp),%ebx - addl %ebp,%ecx - - movl %edx,%ebp - xorl 32(%esp),%ebx - xorl %edi,%ebp - xorl 56(%esp),%ebx - xorl %esi,%ebp - xorl 12(%esp),%ebx - roll $1,%ebx - addl %ebp,%eax - rorl $2,%edx - movl %ecx,%ebp - roll $5,%ebp - movl %ebx,24(%esp) - leal 3395469782(%ebx,%eax,1),%ebx - movl 28(%esp),%eax - addl %ebp,%ebx - - movl %ecx,%ebp - xorl 36(%esp),%eax - xorl %edx,%ebp - xorl 60(%esp),%eax - xorl %edi,%ebp - xorl 16(%esp),%eax - roll $1,%eax - addl %ebp,%esi - rorl $2,%ecx - movl %ebx,%ebp - roll $5,%ebp - movl %eax,28(%esp) - leal 3395469782(%eax,%esi,1),%eax - movl 32(%esp),%esi - addl %ebp,%eax - - movl %ebx,%ebp - xorl 40(%esp),%esi - xorl %ecx,%ebp - xorl (%esp),%esi - xorl %edx,%ebp - xorl 20(%esp),%esi - roll $1,%esi - addl %ebp,%edi - rorl $2,%ebx - movl %eax,%ebp - roll $5,%ebp - movl %esi,32(%esp) - leal 3395469782(%esi,%edi,1),%esi - movl 36(%esp),%edi - addl %ebp,%esi - - movl %eax,%ebp - xorl 44(%esp),%edi - xorl %ebx,%ebp - xorl 4(%esp),%edi - xorl %ecx,%ebp - xorl 24(%esp),%edi - roll $1,%edi - addl %ebp,%edx - rorl $2,%eax - movl %esi,%ebp - roll $5,%ebp - movl %edi,36(%esp) - leal 3395469782(%edi,%edx,1),%edi - movl 40(%esp),%edx - addl %ebp,%edi - - movl %esi,%ebp - xorl 48(%esp),%edx - xorl %eax,%ebp - xorl 8(%esp),%edx - xorl %ebx,%ebp - xorl 28(%esp),%edx - roll $1,%edx - addl %ebp,%ecx - rorl $2,%esi - movl %edi,%ebp - roll $5,%ebp - movl %edx,40(%esp) - leal 3395469782(%edx,%ecx,1),%edx - movl 44(%esp),%ecx - addl %ebp,%edx - - movl %edi,%ebp - xorl 52(%esp),%ecx - xorl %esi,%ebp - xorl 12(%esp),%ecx - xorl %eax,%ebp - xorl 32(%esp),%ecx - roll $1,%ecx - addl %ebp,%ebx - rorl $2,%edi - movl %edx,%ebp - roll $5,%ebp - movl %ecx,44(%esp) - leal 3395469782(%ecx,%ebx,1),%ecx - movl 48(%esp),%ebx - addl %ebp,%ecx - - movl %edx,%ebp - xorl 56(%esp),%ebx - xorl %edi,%ebp - xorl 16(%esp),%ebx - xorl %esi,%ebp - xorl 36(%esp),%ebx - roll $1,%ebx - addl %ebp,%eax - rorl $2,%edx - movl %ecx,%ebp - roll $5,%ebp - movl %ebx,48(%esp) - leal 3395469782(%ebx,%eax,1),%ebx - movl 52(%esp),%eax - addl %ebp,%ebx - - movl %ecx,%ebp - xorl 60(%esp),%eax - xorl %edx,%ebp - xorl 20(%esp),%eax - xorl %edi,%ebp - xorl 40(%esp),%eax - roll $1,%eax - addl %ebp,%esi - rorl $2,%ecx - movl %ebx,%ebp - roll $5,%ebp - leal 3395469782(%eax,%esi,1),%eax - movl 56(%esp),%esi - addl %ebp,%eax - - movl %ebx,%ebp - xorl (%esp),%esi - xorl %ecx,%ebp - xorl 24(%esp),%esi - xorl %edx,%ebp - xorl 44(%esp),%esi - roll $1,%esi - addl %ebp,%edi - rorl $2,%ebx - movl %eax,%ebp - roll $5,%ebp - leal 3395469782(%esi,%edi,1),%esi - movl 60(%esp),%edi - addl %ebp,%esi - - movl %eax,%ebp - xorl 4(%esp),%edi - xorl %ebx,%ebp - xorl 28(%esp),%edi - xorl %ecx,%ebp - xorl 48(%esp),%edi - roll $1,%edi - addl %ebp,%edx - rorl $2,%eax - movl %esi,%ebp - roll $5,%ebp - leal 3395469782(%edi,%edx,1),%edi - addl %ebp,%edi - movl 96(%esp),%ebp - movl 100(%esp),%edx - addl (%ebp),%edi - addl 4(%ebp),%esi - addl 8(%ebp),%eax - addl 12(%ebp),%ebx - addl 16(%ebp),%ecx - movl %edi,(%ebp) - addl $64,%edx - movl %esi,4(%ebp) - cmpl 104(%esp),%edx - movl %eax,8(%ebp) - movl %ecx,%edi - movl %ebx,12(%ebp) - movl %edx,%esi - movl %ecx,16(%ebp) - jb .L002loop - addl $76,%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size sha1_block_data_order,.-.L_sha1_block_data_order_begin -.hidden _sha1_block_data_order_shaext -.type _sha1_block_data_order_shaext,@function -.align 16 -_sha1_block_data_order_shaext: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - call .L003pic_point -.L003pic_point: - popl %ebp - leal .LK_XX_XX-.L003pic_point(%ebp),%ebp -.Lshaext_shortcut: - movl 20(%esp),%edi - movl %esp,%ebx - movl 24(%esp),%esi - movl 28(%esp),%ecx - subl $32,%esp - movdqu (%edi),%xmm0 - movd 16(%edi),%xmm1 - andl $-32,%esp - movdqa 80(%ebp),%xmm3 - movdqu (%esi),%xmm4 - pshufd $27,%xmm0,%xmm0 - movdqu 16(%esi),%xmm5 - pshufd $27,%xmm1,%xmm1 - movdqu 32(%esi),%xmm6 -.byte 102,15,56,0,227 - movdqu 48(%esi),%xmm7 -.byte 102,15,56,0,235 -.byte 102,15,56,0,243 -.byte 102,15,56,0,251 - jmp .L004loop_shaext -.align 16 -.L004loop_shaext: - decl %ecx - leal 64(%esi),%eax - movdqa %xmm1,(%esp) - paddd %xmm4,%xmm1 - cmovnel %eax,%esi - movdqa %xmm0,16(%esp) -.byte 15,56,201,229 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,0 -.byte 15,56,200,213 - pxor %xmm6,%xmm4 -.byte 15,56,201,238 -.byte 15,56,202,231 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,0 -.byte 15,56,200,206 - pxor %xmm7,%xmm5 -.byte 15,56,202,236 -.byte 15,56,201,247 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,0 -.byte 15,56,200,215 - pxor %xmm4,%xmm6 -.byte 15,56,201,252 -.byte 15,56,202,245 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,0 -.byte 15,56,200,204 - pxor %xmm5,%xmm7 -.byte 15,56,202,254 -.byte 15,56,201,229 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,0 -.byte 15,56,200,213 - pxor %xmm6,%xmm4 -.byte 15,56,201,238 -.byte 15,56,202,231 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,1 -.byte 15,56,200,206 - pxor %xmm7,%xmm5 -.byte 15,56,202,236 -.byte 15,56,201,247 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,1 -.byte 15,56,200,215 - pxor %xmm4,%xmm6 -.byte 15,56,201,252 -.byte 15,56,202,245 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,1 -.byte 15,56,200,204 - pxor %xmm5,%xmm7 -.byte 15,56,202,254 -.byte 15,56,201,229 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,1 -.byte 15,56,200,213 - pxor %xmm6,%xmm4 -.byte 15,56,201,238 -.byte 15,56,202,231 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,1 -.byte 15,56,200,206 - pxor %xmm7,%xmm5 -.byte 15,56,202,236 -.byte 15,56,201,247 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,2 -.byte 15,56,200,215 - pxor %xmm4,%xmm6 -.byte 15,56,201,252 -.byte 15,56,202,245 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,2 -.byte 15,56,200,204 - pxor %xmm5,%xmm7 -.byte 15,56,202,254 -.byte 15,56,201,229 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,2 -.byte 15,56,200,213 - pxor %xmm6,%xmm4 -.byte 15,56,201,238 -.byte 15,56,202,231 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,2 -.byte 15,56,200,206 - pxor %xmm7,%xmm5 -.byte 15,56,202,236 -.byte 15,56,201,247 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,2 -.byte 15,56,200,215 - pxor %xmm4,%xmm6 -.byte 15,56,201,252 -.byte 15,56,202,245 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,3 -.byte 15,56,200,204 - pxor %xmm5,%xmm7 -.byte 15,56,202,254 - movdqu (%esi),%xmm4 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,3 -.byte 15,56,200,213 - movdqu 16(%esi),%xmm5 -.byte 102,15,56,0,227 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,3 -.byte 15,56,200,206 - movdqu 32(%esi),%xmm6 -.byte 102,15,56,0,235 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,3 -.byte 15,56,200,215 - movdqu 48(%esi),%xmm7 -.byte 102,15,56,0,243 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,3 - movdqa (%esp),%xmm2 -.byte 102,15,56,0,251 -.byte 15,56,200,202 - paddd 16(%esp),%xmm0 - jnz .L004loop_shaext - pshufd $27,%xmm0,%xmm0 - pshufd $27,%xmm1,%xmm1 - movdqu %xmm0,(%edi) - movd %xmm1,16(%edi) - movl %ebx,%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size _sha1_block_data_order_shaext,.-_sha1_block_data_order_shaext -.hidden _sha1_block_data_order_ssse3 -.type _sha1_block_data_order_ssse3,@function -.align 16 -_sha1_block_data_order_ssse3: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - call .L005pic_point -.L005pic_point: - popl %ebp - leal .LK_XX_XX-.L005pic_point(%ebp),%ebp -.Lssse3_shortcut: - movdqa (%ebp),%xmm7 - movdqa 16(%ebp),%xmm0 - movdqa 32(%ebp),%xmm1 - movdqa 48(%ebp),%xmm2 - movdqa 64(%ebp),%xmm6 - movl 20(%esp),%edi - movl 24(%esp),%ebp - movl 28(%esp),%edx - movl %esp,%esi - subl $208,%esp - andl $-64,%esp - movdqa %xmm0,112(%esp) - movdqa %xmm1,128(%esp) - movdqa %xmm2,144(%esp) - shll $6,%edx - movdqa %xmm7,160(%esp) - addl %ebp,%edx - movdqa %xmm6,176(%esp) - addl $64,%ebp - movl %edi,192(%esp) - movl %ebp,196(%esp) - movl %edx,200(%esp) - movl %esi,204(%esp) - movl (%edi),%eax - movl 4(%edi),%ebx - movl 8(%edi),%ecx - movl 12(%edi),%edx - movl 16(%edi),%edi - movl %ebx,%esi - movdqu -64(%ebp),%xmm0 - movdqu -48(%ebp),%xmm1 - movdqu -32(%ebp),%xmm2 - movdqu -16(%ebp),%xmm3 -.byte 102,15,56,0,198 -.byte 102,15,56,0,206 -.byte 102,15,56,0,214 - movdqa %xmm7,96(%esp) -.byte 102,15,56,0,222 - paddd %xmm7,%xmm0 - paddd %xmm7,%xmm1 - paddd %xmm7,%xmm2 - movdqa %xmm0,(%esp) - psubd %xmm7,%xmm0 - movdqa %xmm1,16(%esp) - psubd %xmm7,%xmm1 - movdqa %xmm2,32(%esp) - movl %ecx,%ebp - psubd %xmm7,%xmm2 - xorl %edx,%ebp - pshufd $238,%xmm0,%xmm4 - andl %ebp,%esi - jmp .L006loop -.align 16 -.L006loop: - rorl $2,%ebx - xorl %edx,%esi - movl %eax,%ebp - punpcklqdq %xmm1,%xmm4 - movdqa %xmm3,%xmm6 - addl (%esp),%edi - xorl %ecx,%ebx - paddd %xmm3,%xmm7 - movdqa %xmm0,64(%esp) - roll $5,%eax - addl %esi,%edi - psrldq $4,%xmm6 - andl %ebx,%ebp - xorl %ecx,%ebx - pxor %xmm0,%xmm4 - addl %eax,%edi - rorl $7,%eax - pxor %xmm2,%xmm6 - xorl %ecx,%ebp - movl %edi,%esi - addl 4(%esp),%edx - pxor %xmm6,%xmm4 - xorl %ebx,%eax - roll $5,%edi - movdqa %xmm7,48(%esp) - addl %ebp,%edx - andl %eax,%esi - movdqa %xmm4,%xmm0 - xorl %ebx,%eax - addl %edi,%edx - rorl $7,%edi - movdqa %xmm4,%xmm6 - xorl %ebx,%esi - pslldq $12,%xmm0 - paddd %xmm4,%xmm4 - movl %edx,%ebp - addl 8(%esp),%ecx - psrld $31,%xmm6 - xorl %eax,%edi - roll $5,%edx - movdqa %xmm0,%xmm7 - addl %esi,%ecx - andl %edi,%ebp - xorl %eax,%edi - psrld $30,%xmm0 - addl %edx,%ecx - rorl $7,%edx - por %xmm6,%xmm4 - xorl %eax,%ebp - movl %ecx,%esi - addl 12(%esp),%ebx - pslld $2,%xmm7 - xorl %edi,%edx - roll $5,%ecx - pxor %xmm0,%xmm4 - movdqa 96(%esp),%xmm0 - addl %ebp,%ebx - andl %edx,%esi - pxor %xmm7,%xmm4 - pshufd $238,%xmm1,%xmm5 - xorl %edi,%edx - addl %ecx,%ebx - rorl $7,%ecx - xorl %edi,%esi - movl %ebx,%ebp - punpcklqdq %xmm2,%xmm5 - movdqa %xmm4,%xmm7 - addl 16(%esp),%eax - xorl %edx,%ecx - paddd %xmm4,%xmm0 - movdqa %xmm1,80(%esp) - roll $5,%ebx - addl %esi,%eax - psrldq $4,%xmm7 - andl %ecx,%ebp - xorl %edx,%ecx - pxor %xmm1,%xmm5 - addl %ebx,%eax - rorl $7,%ebx - pxor %xmm3,%xmm7 - xorl %edx,%ebp - movl %eax,%esi - addl 20(%esp),%edi - pxor %xmm7,%xmm5 - xorl %ecx,%ebx - roll $5,%eax - movdqa %xmm0,(%esp) - addl %ebp,%edi - andl %ebx,%esi - movdqa %xmm5,%xmm1 - xorl %ecx,%ebx - addl %eax,%edi - rorl $7,%eax - movdqa %xmm5,%xmm7 - xorl %ecx,%esi - pslldq $12,%xmm1 - paddd %xmm5,%xmm5 - movl %edi,%ebp - addl 24(%esp),%edx - psrld $31,%xmm7 - xorl %ebx,%eax - roll $5,%edi - movdqa %xmm1,%xmm0 - addl %esi,%edx - andl %eax,%ebp - xorl %ebx,%eax - psrld $30,%xmm1 - addl %edi,%edx - rorl $7,%edi - por %xmm7,%xmm5 - xorl %ebx,%ebp - movl %edx,%esi - addl 28(%esp),%ecx - pslld $2,%xmm0 - xorl %eax,%edi - roll $5,%edx - pxor %xmm1,%xmm5 - movdqa 112(%esp),%xmm1 - addl %ebp,%ecx - andl %edi,%esi - pxor %xmm0,%xmm5 - pshufd $238,%xmm2,%xmm6 - xorl %eax,%edi - addl %edx,%ecx - rorl $7,%edx - xorl %eax,%esi - movl %ecx,%ebp - punpcklqdq %xmm3,%xmm6 - movdqa %xmm5,%xmm0 - addl 32(%esp),%ebx - xorl %edi,%edx - paddd %xmm5,%xmm1 - movdqa %xmm2,96(%esp) - roll $5,%ecx - addl %esi,%ebx - psrldq $4,%xmm0 - andl %edx,%ebp - xorl %edi,%edx - pxor %xmm2,%xmm6 - addl %ecx,%ebx - rorl $7,%ecx - pxor %xmm4,%xmm0 - xorl %edi,%ebp - movl %ebx,%esi - addl 36(%esp),%eax - pxor %xmm0,%xmm6 - xorl %edx,%ecx - roll $5,%ebx - movdqa %xmm1,16(%esp) - addl %ebp,%eax - andl %ecx,%esi - movdqa %xmm6,%xmm2 - xorl %edx,%ecx - addl %ebx,%eax - rorl $7,%ebx - movdqa %xmm6,%xmm0 - xorl %edx,%esi - pslldq $12,%xmm2 - paddd %xmm6,%xmm6 - movl %eax,%ebp - addl 40(%esp),%edi - psrld $31,%xmm0 - xorl %ecx,%ebx - roll $5,%eax - movdqa %xmm2,%xmm1 - addl %esi,%edi - andl %ebx,%ebp - xorl %ecx,%ebx - psrld $30,%xmm2 - addl %eax,%edi - rorl $7,%eax - por %xmm0,%xmm6 - xorl %ecx,%ebp - movdqa 64(%esp),%xmm0 - movl %edi,%esi - addl 44(%esp),%edx - pslld $2,%xmm1 - xorl %ebx,%eax - roll $5,%edi - pxor %xmm2,%xmm6 - movdqa 112(%esp),%xmm2 - addl %ebp,%edx - andl %eax,%esi - pxor %xmm1,%xmm6 - pshufd $238,%xmm3,%xmm7 - xorl %ebx,%eax - addl %edi,%edx - rorl $7,%edi - xorl %ebx,%esi - movl %edx,%ebp - punpcklqdq %xmm4,%xmm7 - movdqa %xmm6,%xmm1 - addl 48(%esp),%ecx - xorl %eax,%edi - paddd %xmm6,%xmm2 - movdqa %xmm3,64(%esp) - roll $5,%edx - addl %esi,%ecx - psrldq $4,%xmm1 - andl %edi,%ebp - xorl %eax,%edi - pxor %xmm3,%xmm7 - addl %edx,%ecx - rorl $7,%edx - pxor %xmm5,%xmm1 - xorl %eax,%ebp - movl %ecx,%esi - addl 52(%esp),%ebx - pxor %xmm1,%xmm7 - xorl %edi,%edx - roll $5,%ecx - movdqa %xmm2,32(%esp) - addl %ebp,%ebx - andl %edx,%esi - movdqa %xmm7,%xmm3 - xorl %edi,%edx - addl %ecx,%ebx - rorl $7,%ecx - movdqa %xmm7,%xmm1 - xorl %edi,%esi - pslldq $12,%xmm3 - paddd %xmm7,%xmm7 - movl %ebx,%ebp - addl 56(%esp),%eax - psrld $31,%xmm1 - xorl %edx,%ecx - roll $5,%ebx - movdqa %xmm3,%xmm2 - addl %esi,%eax - andl %ecx,%ebp - xorl %edx,%ecx - psrld $30,%xmm3 - addl %ebx,%eax - rorl $7,%ebx - por %xmm1,%xmm7 - xorl %edx,%ebp - movdqa 80(%esp),%xmm1 - movl %eax,%esi - addl 60(%esp),%edi - pslld $2,%xmm2 - xorl %ecx,%ebx - roll $5,%eax - pxor %xmm3,%xmm7 - movdqa 112(%esp),%xmm3 - addl %ebp,%edi - andl %ebx,%esi - pxor %xmm2,%xmm7 - pshufd $238,%xmm6,%xmm2 - xorl %ecx,%ebx - addl %eax,%edi - rorl $7,%eax - pxor %xmm4,%xmm0 - punpcklqdq %xmm7,%xmm2 - xorl %ecx,%esi - movl %edi,%ebp - addl (%esp),%edx - pxor %xmm1,%xmm0 - movdqa %xmm4,80(%esp) - xorl %ebx,%eax - roll $5,%edi - movdqa %xmm3,%xmm4 - addl %esi,%edx - paddd %xmm7,%xmm3 - andl %eax,%ebp - pxor %xmm2,%xmm0 - xorl %ebx,%eax - addl %edi,%edx - rorl $7,%edi - xorl %ebx,%ebp - movdqa %xmm0,%xmm2 - movdqa %xmm3,48(%esp) - movl %edx,%esi - addl 4(%esp),%ecx - xorl %eax,%edi - roll $5,%edx - pslld $2,%xmm0 - addl %ebp,%ecx - andl %edi,%esi - psrld $30,%xmm2 - xorl %eax,%edi - addl %edx,%ecx - rorl $7,%edx - xorl %eax,%esi - movl %ecx,%ebp - addl 8(%esp),%ebx - xorl %edi,%edx - roll $5,%ecx - por %xmm2,%xmm0 - addl %esi,%ebx - andl %edx,%ebp - movdqa 96(%esp),%xmm2 - xorl %edi,%edx - addl %ecx,%ebx - addl 12(%esp),%eax - xorl %edi,%ebp - movl %ebx,%esi - pshufd $238,%xmm7,%xmm3 - roll $5,%ebx - addl %ebp,%eax - xorl %edx,%esi - rorl $7,%ecx - addl %ebx,%eax - addl 16(%esp),%edi - pxor %xmm5,%xmm1 - punpcklqdq %xmm0,%xmm3 - xorl %ecx,%esi - movl %eax,%ebp - roll $5,%eax - pxor %xmm2,%xmm1 - movdqa %xmm5,96(%esp) - addl %esi,%edi - xorl %ecx,%ebp - movdqa %xmm4,%xmm5 - rorl $7,%ebx - paddd %xmm0,%xmm4 - addl %eax,%edi - pxor %xmm3,%xmm1 - addl 20(%esp),%edx - xorl %ebx,%ebp - movl %edi,%esi - roll $5,%edi - movdqa %xmm1,%xmm3 - movdqa %xmm4,(%esp) - addl %ebp,%edx - xorl %ebx,%esi - rorl $7,%eax - addl %edi,%edx - pslld $2,%xmm1 - addl 24(%esp),%ecx - xorl %eax,%esi - psrld $30,%xmm3 - movl %edx,%ebp - roll $5,%edx - addl %esi,%ecx - xorl %eax,%ebp - rorl $7,%edi - addl %edx,%ecx - por %xmm3,%xmm1 - addl 28(%esp),%ebx - xorl %edi,%ebp - movdqa 64(%esp),%xmm3 - movl %ecx,%esi - roll $5,%ecx - addl %ebp,%ebx - xorl %edi,%esi - rorl $7,%edx - pshufd $238,%xmm0,%xmm4 - addl %ecx,%ebx - addl 32(%esp),%eax - pxor %xmm6,%xmm2 - punpcklqdq %xmm1,%xmm4 - xorl %edx,%esi - movl %ebx,%ebp - roll $5,%ebx - pxor %xmm3,%xmm2 - movdqa %xmm6,64(%esp) - addl %esi,%eax - xorl %edx,%ebp - movdqa 128(%esp),%xmm6 - rorl $7,%ecx - paddd %xmm1,%xmm5 - addl %ebx,%eax - pxor %xmm4,%xmm2 - addl 36(%esp),%edi - xorl %ecx,%ebp - movl %eax,%esi - roll $5,%eax - movdqa %xmm2,%xmm4 - movdqa %xmm5,16(%esp) - addl %ebp,%edi - xorl %ecx,%esi - rorl $7,%ebx - addl %eax,%edi - pslld $2,%xmm2 - addl 40(%esp),%edx - xorl %ebx,%esi - psrld $30,%xmm4 - movl %edi,%ebp - roll $5,%edi - addl %esi,%edx - xorl %ebx,%ebp - rorl $7,%eax - addl %edi,%edx - por %xmm4,%xmm2 - addl 44(%esp),%ecx - xorl %eax,%ebp - movdqa 80(%esp),%xmm4 - movl %edx,%esi - roll $5,%edx - addl %ebp,%ecx - xorl %eax,%esi - rorl $7,%edi - pshufd $238,%xmm1,%xmm5 - addl %edx,%ecx - addl 48(%esp),%ebx - pxor %xmm7,%xmm3 - punpcklqdq %xmm2,%xmm5 - xorl %edi,%esi - movl %ecx,%ebp - roll $5,%ecx - pxor %xmm4,%xmm3 - movdqa %xmm7,80(%esp) - addl %esi,%ebx - xorl %edi,%ebp - movdqa %xmm6,%xmm7 - rorl $7,%edx - paddd %xmm2,%xmm6 - addl %ecx,%ebx - pxor %xmm5,%xmm3 - addl 52(%esp),%eax - xorl %edx,%ebp - movl %ebx,%esi - roll $5,%ebx - movdqa %xmm3,%xmm5 - movdqa %xmm6,32(%esp) - addl %ebp,%eax - xorl %edx,%esi - rorl $7,%ecx - addl %ebx,%eax - pslld $2,%xmm3 - addl 56(%esp),%edi - xorl %ecx,%esi - psrld $30,%xmm5 - movl %eax,%ebp - roll $5,%eax - addl %esi,%edi - xorl %ecx,%ebp - rorl $7,%ebx - addl %eax,%edi - por %xmm5,%xmm3 - addl 60(%esp),%edx - xorl %ebx,%ebp - movdqa 96(%esp),%xmm5 - movl %edi,%esi - roll $5,%edi - addl %ebp,%edx - xorl %ebx,%esi - rorl $7,%eax - pshufd $238,%xmm2,%xmm6 - addl %edi,%edx - addl (%esp),%ecx - pxor %xmm0,%xmm4 - punpcklqdq %xmm3,%xmm6 - xorl %eax,%esi - movl %edx,%ebp - roll $5,%edx - pxor %xmm5,%xmm4 - movdqa %xmm0,96(%esp) - addl %esi,%ecx - xorl %eax,%ebp - movdqa %xmm7,%xmm0 - rorl $7,%edi - paddd %xmm3,%xmm7 - addl %edx,%ecx - pxor %xmm6,%xmm4 - addl 4(%esp),%ebx - xorl %edi,%ebp - movl %ecx,%esi - roll $5,%ecx - movdqa %xmm4,%xmm6 - movdqa %xmm7,48(%esp) - addl %ebp,%ebx - xorl %edi,%esi - rorl $7,%edx - addl %ecx,%ebx - pslld $2,%xmm4 - addl 8(%esp),%eax - xorl %edx,%esi - psrld $30,%xmm6 - movl %ebx,%ebp - roll $5,%ebx - addl %esi,%eax - xorl %edx,%ebp - rorl $7,%ecx - addl %ebx,%eax - por %xmm6,%xmm4 - addl 12(%esp),%edi - xorl %ecx,%ebp - movdqa 64(%esp),%xmm6 - movl %eax,%esi - roll $5,%eax - addl %ebp,%edi - xorl %ecx,%esi - rorl $7,%ebx - pshufd $238,%xmm3,%xmm7 - addl %eax,%edi - addl 16(%esp),%edx - pxor %xmm1,%xmm5 - punpcklqdq %xmm4,%xmm7 - xorl %ebx,%esi - movl %edi,%ebp - roll $5,%edi - pxor %xmm6,%xmm5 - movdqa %xmm1,64(%esp) - addl %esi,%edx - xorl %ebx,%ebp - movdqa %xmm0,%xmm1 - rorl $7,%eax - paddd %xmm4,%xmm0 - addl %edi,%edx - pxor %xmm7,%xmm5 - addl 20(%esp),%ecx - xorl %eax,%ebp - movl %edx,%esi - roll $5,%edx - movdqa %xmm5,%xmm7 - movdqa %xmm0,(%esp) - addl %ebp,%ecx - xorl %eax,%esi - rorl $7,%edi - addl %edx,%ecx - pslld $2,%xmm5 - addl 24(%esp),%ebx - xorl %edi,%esi - psrld $30,%xmm7 - movl %ecx,%ebp - roll $5,%ecx - addl %esi,%ebx - xorl %edi,%ebp - rorl $7,%edx - addl %ecx,%ebx - por %xmm7,%xmm5 - addl 28(%esp),%eax - movdqa 80(%esp),%xmm7 - rorl $7,%ecx - movl %ebx,%esi - xorl %edx,%ebp - roll $5,%ebx - pshufd $238,%xmm4,%xmm0 - addl %ebp,%eax - xorl %ecx,%esi - xorl %edx,%ecx - addl %ebx,%eax - addl 32(%esp),%edi - pxor %xmm2,%xmm6 - punpcklqdq %xmm5,%xmm0 - andl %ecx,%esi - xorl %edx,%ecx - rorl $7,%ebx - pxor %xmm7,%xmm6 - movdqa %xmm2,80(%esp) - movl %eax,%ebp - xorl %ecx,%esi - roll $5,%eax - movdqa %xmm1,%xmm2 - addl %esi,%edi - paddd %xmm5,%xmm1 - xorl %ebx,%ebp - pxor %xmm0,%xmm6 - xorl %ecx,%ebx - addl %eax,%edi - addl 36(%esp),%edx - andl %ebx,%ebp - movdqa %xmm6,%xmm0 - movdqa %xmm1,16(%esp) - xorl %ecx,%ebx - rorl $7,%eax - movl %edi,%esi - xorl %ebx,%ebp - roll $5,%edi - pslld $2,%xmm6 - addl %ebp,%edx - xorl %eax,%esi - psrld $30,%xmm0 - xorl %ebx,%eax - addl %edi,%edx - addl 40(%esp),%ecx - andl %eax,%esi - xorl %ebx,%eax - rorl $7,%edi - por %xmm0,%xmm6 - movl %edx,%ebp - xorl %eax,%esi - movdqa 96(%esp),%xmm0 - roll $5,%edx - addl %esi,%ecx - xorl %edi,%ebp - xorl %eax,%edi - addl %edx,%ecx - pshufd $238,%xmm5,%xmm1 - addl 44(%esp),%ebx - andl %edi,%ebp - xorl %eax,%edi - rorl $7,%edx - movl %ecx,%esi - xorl %edi,%ebp - roll $5,%ecx - addl %ebp,%ebx - xorl %edx,%esi - xorl %edi,%edx - addl %ecx,%ebx - addl 48(%esp),%eax - pxor %xmm3,%xmm7 - punpcklqdq %xmm6,%xmm1 - andl %edx,%esi - xorl %edi,%edx - rorl $7,%ecx - pxor %xmm0,%xmm7 - movdqa %xmm3,96(%esp) - movl %ebx,%ebp - xorl %edx,%esi - roll $5,%ebx - movdqa 144(%esp),%xmm3 - addl %esi,%eax - paddd %xmm6,%xmm2 - xorl %ecx,%ebp - pxor %xmm1,%xmm7 - xorl %edx,%ecx - addl %ebx,%eax - addl 52(%esp),%edi - andl %ecx,%ebp - movdqa %xmm7,%xmm1 - movdqa %xmm2,32(%esp) - xorl %edx,%ecx - rorl $7,%ebx - movl %eax,%esi - xorl %ecx,%ebp - roll $5,%eax - pslld $2,%xmm7 - addl %ebp,%edi - xorl %ebx,%esi - psrld $30,%xmm1 - xorl %ecx,%ebx - addl %eax,%edi - addl 56(%esp),%edx - andl %ebx,%esi - xorl %ecx,%ebx - rorl $7,%eax - por %xmm1,%xmm7 - movl %edi,%ebp - xorl %ebx,%esi - movdqa 64(%esp),%xmm1 - roll $5,%edi - addl %esi,%edx - xorl %eax,%ebp - xorl %ebx,%eax - addl %edi,%edx - pshufd $238,%xmm6,%xmm2 - addl 60(%esp),%ecx - andl %eax,%ebp - xorl %ebx,%eax - rorl $7,%edi - movl %edx,%esi - xorl %eax,%ebp - roll $5,%edx - addl %ebp,%ecx - xorl %edi,%esi - xorl %eax,%edi - addl %edx,%ecx - addl (%esp),%ebx - pxor %xmm4,%xmm0 - punpcklqdq %xmm7,%xmm2 - andl %edi,%esi - xorl %eax,%edi - rorl $7,%edx - pxor %xmm1,%xmm0 - movdqa %xmm4,64(%esp) - movl %ecx,%ebp - xorl %edi,%esi - roll $5,%ecx - movdqa %xmm3,%xmm4 - addl %esi,%ebx - paddd %xmm7,%xmm3 - xorl %edx,%ebp - pxor %xmm2,%xmm0 - xorl %edi,%edx - addl %ecx,%ebx - addl 4(%esp),%eax - andl %edx,%ebp - movdqa %xmm0,%xmm2 - movdqa %xmm3,48(%esp) - xorl %edi,%edx - rorl $7,%ecx - movl %ebx,%esi - xorl %edx,%ebp - roll $5,%ebx - pslld $2,%xmm0 - addl %ebp,%eax - xorl %ecx,%esi - psrld $30,%xmm2 - xorl %edx,%ecx - addl %ebx,%eax - addl 8(%esp),%edi - andl %ecx,%esi - xorl %edx,%ecx - rorl $7,%ebx - por %xmm2,%xmm0 - movl %eax,%ebp - xorl %ecx,%esi - movdqa 80(%esp),%xmm2 - roll $5,%eax - addl %esi,%edi - xorl %ebx,%ebp - xorl %ecx,%ebx - addl %eax,%edi - pshufd $238,%xmm7,%xmm3 - addl 12(%esp),%edx - andl %ebx,%ebp - xorl %ecx,%ebx - rorl $7,%eax - movl %edi,%esi - xorl %ebx,%ebp - roll $5,%edi - addl %ebp,%edx - xorl %eax,%esi - xorl %ebx,%eax - addl %edi,%edx - addl 16(%esp),%ecx - pxor %xmm5,%xmm1 - punpcklqdq %xmm0,%xmm3 - andl %eax,%esi - xorl %ebx,%eax - rorl $7,%edi - pxor %xmm2,%xmm1 - movdqa %xmm5,80(%esp) - movl %edx,%ebp - xorl %eax,%esi - roll $5,%edx - movdqa %xmm4,%xmm5 - addl %esi,%ecx - paddd %xmm0,%xmm4 - xorl %edi,%ebp - pxor %xmm3,%xmm1 - xorl %eax,%edi - addl %edx,%ecx - addl 20(%esp),%ebx - andl %edi,%ebp - movdqa %xmm1,%xmm3 - movdqa %xmm4,(%esp) - xorl %eax,%edi - rorl $7,%edx - movl %ecx,%esi - xorl %edi,%ebp - roll $5,%ecx - pslld $2,%xmm1 - addl %ebp,%ebx - xorl %edx,%esi - psrld $30,%xmm3 - xorl %edi,%edx - addl %ecx,%ebx - addl 24(%esp),%eax - andl %edx,%esi - xorl %edi,%edx - rorl $7,%ecx - por %xmm3,%xmm1 - movl %ebx,%ebp - xorl %edx,%esi - movdqa 96(%esp),%xmm3 - roll $5,%ebx - addl %esi,%eax - xorl %ecx,%ebp - xorl %edx,%ecx - addl %ebx,%eax - pshufd $238,%xmm0,%xmm4 - addl 28(%esp),%edi - andl %ecx,%ebp - xorl %edx,%ecx - rorl $7,%ebx - movl %eax,%esi - xorl %ecx,%ebp - roll $5,%eax - addl %ebp,%edi - xorl %ebx,%esi - xorl %ecx,%ebx - addl %eax,%edi - addl 32(%esp),%edx - pxor %xmm6,%xmm2 - punpcklqdq %xmm1,%xmm4 - andl %ebx,%esi - xorl %ecx,%ebx - rorl $7,%eax - pxor %xmm3,%xmm2 - movdqa %xmm6,96(%esp) - movl %edi,%ebp - xorl %ebx,%esi - roll $5,%edi - movdqa %xmm5,%xmm6 - addl %esi,%edx - paddd %xmm1,%xmm5 - xorl %eax,%ebp - pxor %xmm4,%xmm2 - xorl %ebx,%eax - addl %edi,%edx - addl 36(%esp),%ecx - andl %eax,%ebp - movdqa %xmm2,%xmm4 - movdqa %xmm5,16(%esp) - xorl %ebx,%eax - rorl $7,%edi - movl %edx,%esi - xorl %eax,%ebp - roll $5,%edx - pslld $2,%xmm2 - addl %ebp,%ecx - xorl %edi,%esi - psrld $30,%xmm4 - xorl %eax,%edi - addl %edx,%ecx - addl 40(%esp),%ebx - andl %edi,%esi - xorl %eax,%edi - rorl $7,%edx - por %xmm4,%xmm2 - movl %ecx,%ebp - xorl %edi,%esi - movdqa 64(%esp),%xmm4 - roll $5,%ecx - addl %esi,%ebx - xorl %edx,%ebp - xorl %edi,%edx - addl %ecx,%ebx - pshufd $238,%xmm1,%xmm5 - addl 44(%esp),%eax - andl %edx,%ebp - xorl %edi,%edx - rorl $7,%ecx - movl %ebx,%esi - xorl %edx,%ebp - roll $5,%ebx - addl %ebp,%eax - xorl %edx,%esi - addl %ebx,%eax - addl 48(%esp),%edi - pxor %xmm7,%xmm3 - punpcklqdq %xmm2,%xmm5 - xorl %ecx,%esi - movl %eax,%ebp - roll $5,%eax - pxor %xmm4,%xmm3 - movdqa %xmm7,64(%esp) - addl %esi,%edi - xorl %ecx,%ebp - movdqa %xmm6,%xmm7 - rorl $7,%ebx - paddd %xmm2,%xmm6 - addl %eax,%edi - pxor %xmm5,%xmm3 - addl 52(%esp),%edx - xorl %ebx,%ebp - movl %edi,%esi - roll $5,%edi - movdqa %xmm3,%xmm5 - movdqa %xmm6,32(%esp) - addl %ebp,%edx - xorl %ebx,%esi - rorl $7,%eax - addl %edi,%edx - pslld $2,%xmm3 - addl 56(%esp),%ecx - xorl %eax,%esi - psrld $30,%xmm5 - movl %edx,%ebp - roll $5,%edx - addl %esi,%ecx - xorl %eax,%ebp - rorl $7,%edi - addl %edx,%ecx - por %xmm5,%xmm3 - addl 60(%esp),%ebx - xorl %edi,%ebp - movl %ecx,%esi - roll $5,%ecx - addl %ebp,%ebx - xorl %edi,%esi - rorl $7,%edx - addl %ecx,%ebx - addl (%esp),%eax - xorl %edx,%esi - movl %ebx,%ebp - roll $5,%ebx - addl %esi,%eax - xorl %edx,%ebp - rorl $7,%ecx - paddd %xmm3,%xmm7 - addl %ebx,%eax - addl 4(%esp),%edi - xorl %ecx,%ebp - movl %eax,%esi - movdqa %xmm7,48(%esp) - roll $5,%eax - addl %ebp,%edi - xorl %ecx,%esi - rorl $7,%ebx - addl %eax,%edi - addl 8(%esp),%edx - xorl %ebx,%esi - movl %edi,%ebp - roll $5,%edi - addl %esi,%edx - xorl %ebx,%ebp - rorl $7,%eax - addl %edi,%edx - addl 12(%esp),%ecx - xorl %eax,%ebp - movl %edx,%esi - roll $5,%edx - addl %ebp,%ecx - xorl %eax,%esi - rorl $7,%edi - addl %edx,%ecx - movl 196(%esp),%ebp - cmpl 200(%esp),%ebp - je .L007done - movdqa 160(%esp),%xmm7 - movdqa 176(%esp),%xmm6 - movdqu (%ebp),%xmm0 - movdqu 16(%ebp),%xmm1 - movdqu 32(%ebp),%xmm2 - movdqu 48(%ebp),%xmm3 - addl $64,%ebp -.byte 102,15,56,0,198 - movl %ebp,196(%esp) - movdqa %xmm7,96(%esp) - addl 16(%esp),%ebx - xorl %edi,%esi - movl %ecx,%ebp - roll $5,%ecx - addl %esi,%ebx - xorl %edi,%ebp - rorl $7,%edx -.byte 102,15,56,0,206 - addl %ecx,%ebx - addl 20(%esp),%eax - xorl %edx,%ebp - movl %ebx,%esi - paddd %xmm7,%xmm0 - roll $5,%ebx - addl %ebp,%eax - xorl %edx,%esi - rorl $7,%ecx - movdqa %xmm0,(%esp) - addl %ebx,%eax - addl 24(%esp),%edi - xorl %ecx,%esi - movl %eax,%ebp - psubd %xmm7,%xmm0 - roll $5,%eax - addl %esi,%edi - xorl %ecx,%ebp - rorl $7,%ebx - addl %eax,%edi - addl 28(%esp),%edx - xorl %ebx,%ebp - movl %edi,%esi - roll $5,%edi - addl %ebp,%edx - xorl %ebx,%esi - rorl $7,%eax - addl %edi,%edx - addl 32(%esp),%ecx - xorl %eax,%esi - movl %edx,%ebp - roll $5,%edx - addl %esi,%ecx - xorl %eax,%ebp - rorl $7,%edi -.byte 102,15,56,0,214 - addl %edx,%ecx - addl 36(%esp),%ebx - xorl %edi,%ebp - movl %ecx,%esi - paddd %xmm7,%xmm1 - roll $5,%ecx - addl %ebp,%ebx - xorl %edi,%esi - rorl $7,%edx - movdqa %xmm1,16(%esp) - addl %ecx,%ebx - addl 40(%esp),%eax - xorl %edx,%esi - movl %ebx,%ebp - psubd %xmm7,%xmm1 - roll $5,%ebx - addl %esi,%eax - xorl %edx,%ebp - rorl $7,%ecx - addl %ebx,%eax - addl 44(%esp),%edi - xorl %ecx,%ebp - movl %eax,%esi - roll $5,%eax - addl %ebp,%edi - xorl %ecx,%esi - rorl $7,%ebx - addl %eax,%edi - addl 48(%esp),%edx - xorl %ebx,%esi - movl %edi,%ebp - roll $5,%edi - addl %esi,%edx - xorl %ebx,%ebp - rorl $7,%eax -.byte 102,15,56,0,222 - addl %edi,%edx - addl 52(%esp),%ecx - xorl %eax,%ebp - movl %edx,%esi - paddd %xmm7,%xmm2 - roll $5,%edx - addl %ebp,%ecx - xorl %eax,%esi - rorl $7,%edi - movdqa %xmm2,32(%esp) - addl %edx,%ecx - addl 56(%esp),%ebx - xorl %edi,%esi - movl %ecx,%ebp - psubd %xmm7,%xmm2 - roll $5,%ecx - addl %esi,%ebx - xorl %edi,%ebp - rorl $7,%edx - addl %ecx,%ebx - addl 60(%esp),%eax - xorl %edx,%ebp - movl %ebx,%esi - roll $5,%ebx - addl %ebp,%eax - rorl $7,%ecx - addl %ebx,%eax - movl 192(%esp),%ebp - addl (%ebp),%eax - addl 4(%ebp),%esi - addl 8(%ebp),%ecx - movl %eax,(%ebp) - addl 12(%ebp),%edx - movl %esi,4(%ebp) - addl 16(%ebp),%edi - movl %ecx,8(%ebp) - movl %ecx,%ebx - movl %edx,12(%ebp) - xorl %edx,%ebx - movl %edi,16(%ebp) - movl %esi,%ebp - pshufd $238,%xmm0,%xmm4 - andl %ebx,%esi - movl %ebp,%ebx - jmp .L006loop -.align 16 -.L007done: - addl 16(%esp),%ebx - xorl %edi,%esi - movl %ecx,%ebp - roll $5,%ecx - addl %esi,%ebx - xorl %edi,%ebp - rorl $7,%edx - addl %ecx,%ebx - addl 20(%esp),%eax - xorl %edx,%ebp - movl %ebx,%esi - roll $5,%ebx - addl %ebp,%eax - xorl %edx,%esi - rorl $7,%ecx - addl %ebx,%eax - addl 24(%esp),%edi - xorl %ecx,%esi - movl %eax,%ebp - roll $5,%eax - addl %esi,%edi - xorl %ecx,%ebp - rorl $7,%ebx - addl %eax,%edi - addl 28(%esp),%edx - xorl %ebx,%ebp - movl %edi,%esi - roll $5,%edi - addl %ebp,%edx - xorl %ebx,%esi - rorl $7,%eax - addl %edi,%edx - addl 32(%esp),%ecx - xorl %eax,%esi - movl %edx,%ebp - roll $5,%edx - addl %esi,%ecx - xorl %eax,%ebp - rorl $7,%edi - addl %edx,%ecx - addl 36(%esp),%ebx - xorl %edi,%ebp - movl %ecx,%esi - roll $5,%ecx - addl %ebp,%ebx - xorl %edi,%esi - rorl $7,%edx - addl %ecx,%ebx - addl 40(%esp),%eax - xorl %edx,%esi - movl %ebx,%ebp - roll $5,%ebx - addl %esi,%eax - xorl %edx,%ebp - rorl $7,%ecx - addl %ebx,%eax - addl 44(%esp),%edi - xorl %ecx,%ebp - movl %eax,%esi - roll $5,%eax - addl %ebp,%edi - xorl %ecx,%esi - rorl $7,%ebx - addl %eax,%edi - addl 48(%esp),%edx - xorl %ebx,%esi - movl %edi,%ebp - roll $5,%edi - addl %esi,%edx - xorl %ebx,%ebp - rorl $7,%eax - addl %edi,%edx - addl 52(%esp),%ecx - xorl %eax,%ebp - movl %edx,%esi - roll $5,%edx - addl %ebp,%ecx - xorl %eax,%esi - rorl $7,%edi - addl %edx,%ecx - addl 56(%esp),%ebx - xorl %edi,%esi - movl %ecx,%ebp - roll $5,%ecx - addl %esi,%ebx - xorl %edi,%ebp - rorl $7,%edx - addl %ecx,%ebx - addl 60(%esp),%eax - xorl %edx,%ebp - movl %ebx,%esi - roll $5,%ebx - addl %ebp,%eax - rorl $7,%ecx - addl %ebx,%eax - movl 192(%esp),%ebp - addl (%ebp),%eax - movl 204(%esp),%esp - addl 4(%ebp),%esi - addl 8(%ebp),%ecx - movl %eax,(%ebp) - addl 12(%ebp),%edx - movl %esi,4(%ebp) - addl 16(%ebp),%edi - movl %ecx,8(%ebp) - movl %edx,12(%ebp) - movl %edi,16(%ebp) - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size _sha1_block_data_order_ssse3,.-_sha1_block_data_order_ssse3 -.align 64 -.LK_XX_XX: -.long 1518500249,1518500249,1518500249,1518500249 -.long 1859775393,1859775393,1859775393,1859775393 -.long 2400959708,2400959708,2400959708,2400959708 -.long 3395469782,3395469782,3395469782,3395469782 -.long 66051,67438087,134810123,202182159 -.byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -.byte 83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115 -.byte 102,111,114,109,32,102,111,114,32,120,56,54,44,32,67,82 -.byte 89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112 -.byte 114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -#endif diff --git a/third_party/boringssl/linux-x86/crypto/sha/sha256-586.S b/third_party/boringssl/linux-x86/crypto/sha/sha256-586.S deleted file mode 100644 index 08d948432bc22..0000000000000 --- a/third_party/boringssl/linux-x86/crypto/sha/sha256-586.S +++ /dev/null @@ -1,4579 +0,0 @@ -#if defined(__i386__) -.file "sha512-586.S" -.text -.globl sha256_block_data_order -.hidden sha256_block_data_order -.type sha256_block_data_order,@function -.align 16 -sha256_block_data_order: -.L_sha256_block_data_order_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%eax - movl %esp,%ebx - call .L000pic_point -.L000pic_point: - popl %ebp - leal .L001K256-.L000pic_point(%ebp),%ebp - subl $16,%esp - andl $-64,%esp - shll $6,%eax - addl %edi,%eax - movl %esi,(%esp) - movl %edi,4(%esp) - movl %eax,8(%esp) - movl %ebx,12(%esp) - leal OPENSSL_ia32cap_P-.L001K256(%ebp),%edx - movl (%edx),%ecx - movl 4(%edx),%ebx - testl $1048576,%ecx - jnz .L002loop - movl 8(%edx),%edx - testl $16777216,%ecx - jz .L003no_xmm - andl $1073741824,%ecx - andl $268435968,%ebx - testl $536870912,%edx - jnz .L004shaext - orl %ebx,%ecx - andl $1342177280,%ecx - cmpl $1342177280,%ecx - testl $512,%ebx - jnz .L005SSSE3 -.L003no_xmm: - subl %edi,%eax - cmpl $256,%eax - jae .L006unrolled - jmp .L002loop -.align 16 -.L002loop: - movl (%edi),%eax - movl 4(%edi),%ebx - movl 8(%edi),%ecx - bswap %eax - movl 12(%edi),%edx - bswap %ebx - pushl %eax - bswap %ecx - pushl %ebx - bswap %edx - pushl %ecx - pushl %edx - movl 16(%edi),%eax - movl 20(%edi),%ebx - movl 24(%edi),%ecx - bswap %eax - movl 28(%edi),%edx - bswap %ebx - pushl %eax - bswap %ecx - pushl %ebx - bswap %edx - pushl %ecx - pushl %edx - movl 32(%edi),%eax - movl 36(%edi),%ebx - movl 40(%edi),%ecx - bswap %eax - movl 44(%edi),%edx - bswap %ebx - pushl %eax - bswap %ecx - pushl %ebx - bswap %edx - pushl %ecx - pushl %edx - movl 48(%edi),%eax - movl 52(%edi),%ebx - movl 56(%edi),%ecx - bswap %eax - movl 60(%edi),%edx - bswap %ebx - pushl %eax - bswap %ecx - pushl %ebx - bswap %edx - pushl %ecx - pushl %edx - addl $64,%edi - leal -36(%esp),%esp - movl %edi,104(%esp) - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edi - movl %ebx,8(%esp) - xorl %ecx,%ebx - movl %ecx,12(%esp) - movl %edi,16(%esp) - movl %ebx,(%esp) - movl 16(%esi),%edx - movl 20(%esi),%ebx - movl 24(%esi),%ecx - movl 28(%esi),%edi - movl %ebx,24(%esp) - movl %ecx,28(%esp) - movl %edi,32(%esp) -.align 16 -.L00700_15: - movl %edx,%ecx - movl 24(%esp),%esi - rorl $14,%ecx - movl 28(%esp),%edi - xorl %edx,%ecx - xorl %edi,%esi - movl 96(%esp),%ebx - rorl $5,%ecx - andl %edx,%esi - movl %edx,20(%esp) - xorl %ecx,%edx - addl 32(%esp),%ebx - xorl %edi,%esi - rorl $6,%edx - movl %eax,%ecx - addl %esi,%ebx - rorl $9,%ecx - addl %edx,%ebx - movl 8(%esp),%edi - xorl %eax,%ecx - movl %eax,4(%esp) - leal -4(%esp),%esp - rorl $11,%ecx - movl (%ebp),%esi - xorl %eax,%ecx - movl 20(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %esi,%ebx - movl %eax,(%esp) - addl %ebx,%edx - andl 4(%esp),%eax - addl %ecx,%ebx - xorl %edi,%eax - addl $4,%ebp - addl %ebx,%eax - cmpl $3248222580,%esi - jne .L00700_15 - movl 156(%esp),%ecx - jmp .L00816_63 -.align 16 -.L00816_63: - movl %ecx,%ebx - movl 104(%esp),%esi - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 160(%esp),%ebx - shrl $10,%edi - addl 124(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 24(%esp),%esi - rorl $14,%ecx - addl %edi,%ebx - movl 28(%esp),%edi - xorl %edx,%ecx - xorl %edi,%esi - movl %ebx,96(%esp) - rorl $5,%ecx - andl %edx,%esi - movl %edx,20(%esp) - xorl %ecx,%edx - addl 32(%esp),%ebx - xorl %edi,%esi - rorl $6,%edx - movl %eax,%ecx - addl %esi,%ebx - rorl $9,%ecx - addl %edx,%ebx - movl 8(%esp),%edi - xorl %eax,%ecx - movl %eax,4(%esp) - leal -4(%esp),%esp - rorl $11,%ecx - movl (%ebp),%esi - xorl %eax,%ecx - movl 20(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %esi,%ebx - movl %eax,(%esp) - addl %ebx,%edx - andl 4(%esp),%eax - addl %ecx,%ebx - xorl %edi,%eax - movl 156(%esp),%ecx - addl $4,%ebp - addl %ebx,%eax - cmpl $3329325298,%esi - jne .L00816_63 - movl 356(%esp),%esi - movl 8(%esp),%ebx - movl 16(%esp),%ecx - addl (%esi),%eax - addl 4(%esi),%ebx - addl 8(%esi),%edi - addl 12(%esi),%ecx - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %edi,8(%esi) - movl %ecx,12(%esi) - movl 24(%esp),%eax - movl 28(%esp),%ebx - movl 32(%esp),%ecx - movl 360(%esp),%edi - addl 16(%esi),%edx - addl 20(%esi),%eax - addl 24(%esi),%ebx - addl 28(%esi),%ecx - movl %edx,16(%esi) - movl %eax,20(%esi) - movl %ebx,24(%esi) - movl %ecx,28(%esi) - leal 356(%esp),%esp - subl $256,%ebp - cmpl 8(%esp),%edi - jb .L002loop - movl 12(%esp),%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.align 64 -.L001K256: -.long 1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298 -.long 66051,67438087,134810123,202182159 -.byte 83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97 -.byte 110,115,102,111,114,109,32,102,111,114,32,120,56,54,44,32 -.byte 67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97 -.byte 112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103 -.byte 62,0 -.align 16 -.L006unrolled: - leal -96(%esp),%esp - movl (%esi),%eax - movl 4(%esi),%ebp - movl 8(%esi),%ecx - movl 12(%esi),%ebx - movl %ebp,4(%esp) - xorl %ecx,%ebp - movl %ecx,8(%esp) - movl %ebx,12(%esp) - movl 16(%esi),%edx - movl 20(%esi),%ebx - movl 24(%esi),%ecx - movl 28(%esi),%esi - movl %ebx,20(%esp) - movl %ecx,24(%esp) - movl %esi,28(%esp) - jmp .L009grand_loop -.align 16 -.L009grand_loop: - movl (%edi),%ebx - movl 4(%edi),%ecx - bswap %ebx - movl 8(%edi),%esi - bswap %ecx - movl %ebx,32(%esp) - bswap %esi - movl %ecx,36(%esp) - movl %esi,40(%esp) - movl 12(%edi),%ebx - movl 16(%edi),%ecx - bswap %ebx - movl 20(%edi),%esi - bswap %ecx - movl %ebx,44(%esp) - bswap %esi - movl %ecx,48(%esp) - movl %esi,52(%esp) - movl 24(%edi),%ebx - movl 28(%edi),%ecx - bswap %ebx - movl 32(%edi),%esi - bswap %ecx - movl %ebx,56(%esp) - bswap %esi - movl %ecx,60(%esp) - movl %esi,64(%esp) - movl 36(%edi),%ebx - movl 40(%edi),%ecx - bswap %ebx - movl 44(%edi),%esi - bswap %ecx - movl %ebx,68(%esp) - bswap %esi - movl %ecx,72(%esp) - movl %esi,76(%esp) - movl 48(%edi),%ebx - movl 52(%edi),%ecx - bswap %ebx - movl 56(%edi),%esi - bswap %ecx - movl %ebx,80(%esp) - bswap %esi - movl %ecx,84(%esp) - movl %esi,88(%esp) - movl 60(%edi),%ebx - addl $64,%edi - bswap %ebx - movl %edi,100(%esp) - movl %ebx,92(%esp) - movl %edx,%ecx - movl 20(%esp),%esi - rorl $14,%edx - movl 24(%esp),%edi - xorl %ecx,%edx - movl 32(%esp),%ebx - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - addl 28(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 4(%esp),%edi - xorl %eax,%ecx - movl %eax,(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 1116352408(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - rorl $2,%ecx - addl %edx,%ebp - addl 12(%esp),%edx - addl %ecx,%ebp - movl %edx,%esi - movl 16(%esp),%ecx - rorl $14,%edx - movl 20(%esp),%edi - xorl %esi,%edx - movl 36(%esp),%ebx - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,12(%esp) - xorl %esi,%edx - addl 24(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl (%esp),%edi - xorl %ebp,%esi - movl %ebp,28(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 1899447441(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - rorl $2,%esi - addl %edx,%eax - addl 8(%esp),%edx - addl %esi,%eax - movl %edx,%ecx - movl 12(%esp),%esi - rorl $14,%edx - movl 16(%esp),%edi - xorl %ecx,%edx - movl 40(%esp),%ebx - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - addl 20(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 28(%esp),%edi - xorl %eax,%ecx - movl %eax,24(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 3049323471(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - rorl $2,%ecx - addl %edx,%ebp - addl 4(%esp),%edx - addl %ecx,%ebp - movl %edx,%esi - movl 8(%esp),%ecx - rorl $14,%edx - movl 12(%esp),%edi - xorl %esi,%edx - movl 44(%esp),%ebx - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,4(%esp) - xorl %esi,%edx - addl 16(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 24(%esp),%edi - xorl %ebp,%esi - movl %ebp,20(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 3921009573(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - rorl $2,%esi - addl %edx,%eax - addl (%esp),%edx - addl %esi,%eax - movl %edx,%ecx - movl 4(%esp),%esi - rorl $14,%edx - movl 8(%esp),%edi - xorl %ecx,%edx - movl 48(%esp),%ebx - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - addl 12(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 20(%esp),%edi - xorl %eax,%ecx - movl %eax,16(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 961987163(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - rorl $2,%ecx - addl %edx,%ebp - addl 28(%esp),%edx - addl %ecx,%ebp - movl %edx,%esi - movl (%esp),%ecx - rorl $14,%edx - movl 4(%esp),%edi - xorl %esi,%edx - movl 52(%esp),%ebx - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,28(%esp) - xorl %esi,%edx - addl 8(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 16(%esp),%edi - xorl %ebp,%esi - movl %ebp,12(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 1508970993(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - rorl $2,%esi - addl %edx,%eax - addl 24(%esp),%edx - addl %esi,%eax - movl %edx,%ecx - movl 28(%esp),%esi - rorl $14,%edx - movl (%esp),%edi - xorl %ecx,%edx - movl 56(%esp),%ebx - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - addl 4(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 12(%esp),%edi - xorl %eax,%ecx - movl %eax,8(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 2453635748(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - rorl $2,%ecx - addl %edx,%ebp - addl 20(%esp),%edx - addl %ecx,%ebp - movl %edx,%esi - movl 24(%esp),%ecx - rorl $14,%edx - movl 28(%esp),%edi - xorl %esi,%edx - movl 60(%esp),%ebx - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,20(%esp) - xorl %esi,%edx - addl (%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 8(%esp),%edi - xorl %ebp,%esi - movl %ebp,4(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 2870763221(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - rorl $2,%esi - addl %edx,%eax - addl 16(%esp),%edx - addl %esi,%eax - movl %edx,%ecx - movl 20(%esp),%esi - rorl $14,%edx - movl 24(%esp),%edi - xorl %ecx,%edx - movl 64(%esp),%ebx - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - addl 28(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 4(%esp),%edi - xorl %eax,%ecx - movl %eax,(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 3624381080(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - rorl $2,%ecx - addl %edx,%ebp - addl 12(%esp),%edx - addl %ecx,%ebp - movl %edx,%esi - movl 16(%esp),%ecx - rorl $14,%edx - movl 20(%esp),%edi - xorl %esi,%edx - movl 68(%esp),%ebx - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,12(%esp) - xorl %esi,%edx - addl 24(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl (%esp),%edi - xorl %ebp,%esi - movl %ebp,28(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 310598401(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - rorl $2,%esi - addl %edx,%eax - addl 8(%esp),%edx - addl %esi,%eax - movl %edx,%ecx - movl 12(%esp),%esi - rorl $14,%edx - movl 16(%esp),%edi - xorl %ecx,%edx - movl 72(%esp),%ebx - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - addl 20(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 28(%esp),%edi - xorl %eax,%ecx - movl %eax,24(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 607225278(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - rorl $2,%ecx - addl %edx,%ebp - addl 4(%esp),%edx - addl %ecx,%ebp - movl %edx,%esi - movl 8(%esp),%ecx - rorl $14,%edx - movl 12(%esp),%edi - xorl %esi,%edx - movl 76(%esp),%ebx - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,4(%esp) - xorl %esi,%edx - addl 16(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 24(%esp),%edi - xorl %ebp,%esi - movl %ebp,20(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 1426881987(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - rorl $2,%esi - addl %edx,%eax - addl (%esp),%edx - addl %esi,%eax - movl %edx,%ecx - movl 4(%esp),%esi - rorl $14,%edx - movl 8(%esp),%edi - xorl %ecx,%edx - movl 80(%esp),%ebx - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - addl 12(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 20(%esp),%edi - xorl %eax,%ecx - movl %eax,16(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 1925078388(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - rorl $2,%ecx - addl %edx,%ebp - addl 28(%esp),%edx - addl %ecx,%ebp - movl %edx,%esi - movl (%esp),%ecx - rorl $14,%edx - movl 4(%esp),%edi - xorl %esi,%edx - movl 84(%esp),%ebx - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,28(%esp) - xorl %esi,%edx - addl 8(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 16(%esp),%edi - xorl %ebp,%esi - movl %ebp,12(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 2162078206(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - rorl $2,%esi - addl %edx,%eax - addl 24(%esp),%edx - addl %esi,%eax - movl %edx,%ecx - movl 28(%esp),%esi - rorl $14,%edx - movl (%esp),%edi - xorl %ecx,%edx - movl 88(%esp),%ebx - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - addl 4(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 12(%esp),%edi - xorl %eax,%ecx - movl %eax,8(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 2614888103(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - rorl $2,%ecx - addl %edx,%ebp - addl 20(%esp),%edx - addl %ecx,%ebp - movl %edx,%esi - movl 24(%esp),%ecx - rorl $14,%edx - movl 28(%esp),%edi - xorl %esi,%edx - movl 92(%esp),%ebx - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,20(%esp) - xorl %esi,%edx - addl (%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 8(%esp),%edi - xorl %ebp,%esi - movl %ebp,4(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 3248222580(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 36(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 16(%esp),%edx - addl %esi,%eax - movl 88(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 32(%esp),%ebx - shrl $10,%edi - addl 68(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 20(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 24(%esp),%edi - xorl %ecx,%edx - movl %ebx,32(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - addl 28(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 4(%esp),%edi - xorl %eax,%ecx - movl %eax,(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 3835390401(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 40(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 12(%esp),%edx - addl %ecx,%ebp - movl 92(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 36(%esp),%ebx - shrl $10,%edi - addl 72(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 16(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 20(%esp),%edi - xorl %esi,%edx - movl %ebx,36(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,12(%esp) - xorl %esi,%edx - addl 24(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl (%esp),%edi - xorl %ebp,%esi - movl %ebp,28(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 4022224774(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 44(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 8(%esp),%edx - addl %esi,%eax - movl 32(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 40(%esp),%ebx - shrl $10,%edi - addl 76(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 12(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 16(%esp),%edi - xorl %ecx,%edx - movl %ebx,40(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - addl 20(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 28(%esp),%edi - xorl %eax,%ecx - movl %eax,24(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 264347078(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 48(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 4(%esp),%edx - addl %ecx,%ebp - movl 36(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 44(%esp),%ebx - shrl $10,%edi - addl 80(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 8(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 12(%esp),%edi - xorl %esi,%edx - movl %ebx,44(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,4(%esp) - xorl %esi,%edx - addl 16(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 24(%esp),%edi - xorl %ebp,%esi - movl %ebp,20(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 604807628(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 52(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl (%esp),%edx - addl %esi,%eax - movl 40(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 48(%esp),%ebx - shrl $10,%edi - addl 84(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 4(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 8(%esp),%edi - xorl %ecx,%edx - movl %ebx,48(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - addl 12(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 20(%esp),%edi - xorl %eax,%ecx - movl %eax,16(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 770255983(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 56(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 28(%esp),%edx - addl %ecx,%ebp - movl 44(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 52(%esp),%ebx - shrl $10,%edi - addl 88(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl (%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 4(%esp),%edi - xorl %esi,%edx - movl %ebx,52(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,28(%esp) - xorl %esi,%edx - addl 8(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 16(%esp),%edi - xorl %ebp,%esi - movl %ebp,12(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 1249150122(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 60(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 24(%esp),%edx - addl %esi,%eax - movl 48(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 56(%esp),%ebx - shrl $10,%edi - addl 92(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 28(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl (%esp),%edi - xorl %ecx,%edx - movl %ebx,56(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - addl 4(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 12(%esp),%edi - xorl %eax,%ecx - movl %eax,8(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 1555081692(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 64(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 20(%esp),%edx - addl %ecx,%ebp - movl 52(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 60(%esp),%ebx - shrl $10,%edi - addl 32(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 24(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 28(%esp),%edi - xorl %esi,%edx - movl %ebx,60(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,20(%esp) - xorl %esi,%edx - addl (%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 8(%esp),%edi - xorl %ebp,%esi - movl %ebp,4(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 1996064986(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 68(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 16(%esp),%edx - addl %esi,%eax - movl 56(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 64(%esp),%ebx - shrl $10,%edi - addl 36(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 20(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 24(%esp),%edi - xorl %ecx,%edx - movl %ebx,64(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - addl 28(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 4(%esp),%edi - xorl %eax,%ecx - movl %eax,(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 2554220882(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 72(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 12(%esp),%edx - addl %ecx,%ebp - movl 60(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 68(%esp),%ebx - shrl $10,%edi - addl 40(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 16(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 20(%esp),%edi - xorl %esi,%edx - movl %ebx,68(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,12(%esp) - xorl %esi,%edx - addl 24(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl (%esp),%edi - xorl %ebp,%esi - movl %ebp,28(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 2821834349(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 76(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 8(%esp),%edx - addl %esi,%eax - movl 64(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 72(%esp),%ebx - shrl $10,%edi - addl 44(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 12(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 16(%esp),%edi - xorl %ecx,%edx - movl %ebx,72(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - addl 20(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 28(%esp),%edi - xorl %eax,%ecx - movl %eax,24(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 2952996808(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 80(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 4(%esp),%edx - addl %ecx,%ebp - movl 68(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 76(%esp),%ebx - shrl $10,%edi - addl 48(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 8(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 12(%esp),%edi - xorl %esi,%edx - movl %ebx,76(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,4(%esp) - xorl %esi,%edx - addl 16(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 24(%esp),%edi - xorl %ebp,%esi - movl %ebp,20(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 3210313671(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 84(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl (%esp),%edx - addl %esi,%eax - movl 72(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 80(%esp),%ebx - shrl $10,%edi - addl 52(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 4(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 8(%esp),%edi - xorl %ecx,%edx - movl %ebx,80(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - addl 12(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 20(%esp),%edi - xorl %eax,%ecx - movl %eax,16(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 3336571891(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 88(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 28(%esp),%edx - addl %ecx,%ebp - movl 76(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 84(%esp),%ebx - shrl $10,%edi - addl 56(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl (%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 4(%esp),%edi - xorl %esi,%edx - movl %ebx,84(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,28(%esp) - xorl %esi,%edx - addl 8(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 16(%esp),%edi - xorl %ebp,%esi - movl %ebp,12(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 3584528711(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 92(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 24(%esp),%edx - addl %esi,%eax - movl 80(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 88(%esp),%ebx - shrl $10,%edi - addl 60(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 28(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl (%esp),%edi - xorl %ecx,%edx - movl %ebx,88(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - addl 4(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 12(%esp),%edi - xorl %eax,%ecx - movl %eax,8(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 113926993(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 32(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 20(%esp),%edx - addl %ecx,%ebp - movl 84(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 92(%esp),%ebx - shrl $10,%edi - addl 64(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 24(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 28(%esp),%edi - xorl %esi,%edx - movl %ebx,92(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,20(%esp) - xorl %esi,%edx - addl (%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 8(%esp),%edi - xorl %ebp,%esi - movl %ebp,4(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 338241895(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 36(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 16(%esp),%edx - addl %esi,%eax - movl 88(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 32(%esp),%ebx - shrl $10,%edi - addl 68(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 20(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 24(%esp),%edi - xorl %ecx,%edx - movl %ebx,32(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - addl 28(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 4(%esp),%edi - xorl %eax,%ecx - movl %eax,(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 666307205(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 40(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 12(%esp),%edx - addl %ecx,%ebp - movl 92(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 36(%esp),%ebx - shrl $10,%edi - addl 72(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 16(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 20(%esp),%edi - xorl %esi,%edx - movl %ebx,36(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,12(%esp) - xorl %esi,%edx - addl 24(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl (%esp),%edi - xorl %ebp,%esi - movl %ebp,28(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 773529912(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 44(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 8(%esp),%edx - addl %esi,%eax - movl 32(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 40(%esp),%ebx - shrl $10,%edi - addl 76(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 12(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 16(%esp),%edi - xorl %ecx,%edx - movl %ebx,40(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - addl 20(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 28(%esp),%edi - xorl %eax,%ecx - movl %eax,24(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 1294757372(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 48(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 4(%esp),%edx - addl %ecx,%ebp - movl 36(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 44(%esp),%ebx - shrl $10,%edi - addl 80(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 8(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 12(%esp),%edi - xorl %esi,%edx - movl %ebx,44(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,4(%esp) - xorl %esi,%edx - addl 16(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 24(%esp),%edi - xorl %ebp,%esi - movl %ebp,20(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 1396182291(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 52(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl (%esp),%edx - addl %esi,%eax - movl 40(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 48(%esp),%ebx - shrl $10,%edi - addl 84(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 4(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 8(%esp),%edi - xorl %ecx,%edx - movl %ebx,48(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - addl 12(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 20(%esp),%edi - xorl %eax,%ecx - movl %eax,16(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 1695183700(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 56(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 28(%esp),%edx - addl %ecx,%ebp - movl 44(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 52(%esp),%ebx - shrl $10,%edi - addl 88(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl (%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 4(%esp),%edi - xorl %esi,%edx - movl %ebx,52(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,28(%esp) - xorl %esi,%edx - addl 8(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 16(%esp),%edi - xorl %ebp,%esi - movl %ebp,12(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 1986661051(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 60(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 24(%esp),%edx - addl %esi,%eax - movl 48(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 56(%esp),%ebx - shrl $10,%edi - addl 92(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 28(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl (%esp),%edi - xorl %ecx,%edx - movl %ebx,56(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - addl 4(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 12(%esp),%edi - xorl %eax,%ecx - movl %eax,8(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 2177026350(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 64(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 20(%esp),%edx - addl %ecx,%ebp - movl 52(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 60(%esp),%ebx - shrl $10,%edi - addl 32(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 24(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 28(%esp),%edi - xorl %esi,%edx - movl %ebx,60(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,20(%esp) - xorl %esi,%edx - addl (%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 8(%esp),%edi - xorl %ebp,%esi - movl %ebp,4(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 2456956037(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 68(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 16(%esp),%edx - addl %esi,%eax - movl 56(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 64(%esp),%ebx - shrl $10,%edi - addl 36(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 20(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 24(%esp),%edi - xorl %ecx,%edx - movl %ebx,64(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - addl 28(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 4(%esp),%edi - xorl %eax,%ecx - movl %eax,(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 2730485921(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 72(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 12(%esp),%edx - addl %ecx,%ebp - movl 60(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 68(%esp),%ebx - shrl $10,%edi - addl 40(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 16(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 20(%esp),%edi - xorl %esi,%edx - movl %ebx,68(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,12(%esp) - xorl %esi,%edx - addl 24(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl (%esp),%edi - xorl %ebp,%esi - movl %ebp,28(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 2820302411(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 76(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 8(%esp),%edx - addl %esi,%eax - movl 64(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 72(%esp),%ebx - shrl $10,%edi - addl 44(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 12(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 16(%esp),%edi - xorl %ecx,%edx - movl %ebx,72(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - addl 20(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 28(%esp),%edi - xorl %eax,%ecx - movl %eax,24(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 3259730800(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 80(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 4(%esp),%edx - addl %ecx,%ebp - movl 68(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 76(%esp),%ebx - shrl $10,%edi - addl 48(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 8(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 12(%esp),%edi - xorl %esi,%edx - movl %ebx,76(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,4(%esp) - xorl %esi,%edx - addl 16(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 24(%esp),%edi - xorl %ebp,%esi - movl %ebp,20(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 3345764771(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 84(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl (%esp),%edx - addl %esi,%eax - movl 72(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 80(%esp),%ebx - shrl $10,%edi - addl 52(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 4(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 8(%esp),%edi - xorl %ecx,%edx - movl %ebx,80(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - addl 12(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 20(%esp),%edi - xorl %eax,%ecx - movl %eax,16(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 3516065817(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 88(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 28(%esp),%edx - addl %ecx,%ebp - movl 76(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 84(%esp),%ebx - shrl $10,%edi - addl 56(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl (%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 4(%esp),%edi - xorl %esi,%edx - movl %ebx,84(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,28(%esp) - xorl %esi,%edx - addl 8(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 16(%esp),%edi - xorl %ebp,%esi - movl %ebp,12(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 3600352804(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 92(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 24(%esp),%edx - addl %esi,%eax - movl 80(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 88(%esp),%ebx - shrl $10,%edi - addl 60(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 28(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl (%esp),%edi - xorl %ecx,%edx - movl %ebx,88(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - addl 4(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 12(%esp),%edi - xorl %eax,%ecx - movl %eax,8(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 4094571909(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 32(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 20(%esp),%edx - addl %ecx,%ebp - movl 84(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 92(%esp),%ebx - shrl $10,%edi - addl 64(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 24(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 28(%esp),%edi - xorl %esi,%edx - movl %ebx,92(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,20(%esp) - xorl %esi,%edx - addl (%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 8(%esp),%edi - xorl %ebp,%esi - movl %ebp,4(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 275423344(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 36(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 16(%esp),%edx - addl %esi,%eax - movl 88(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 32(%esp),%ebx - shrl $10,%edi - addl 68(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 20(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 24(%esp),%edi - xorl %ecx,%edx - movl %ebx,32(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - addl 28(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 4(%esp),%edi - xorl %eax,%ecx - movl %eax,(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 430227734(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 40(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 12(%esp),%edx - addl %ecx,%ebp - movl 92(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 36(%esp),%ebx - shrl $10,%edi - addl 72(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 16(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 20(%esp),%edi - xorl %esi,%edx - movl %ebx,36(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,12(%esp) - xorl %esi,%edx - addl 24(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl (%esp),%edi - xorl %ebp,%esi - movl %ebp,28(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 506948616(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 44(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 8(%esp),%edx - addl %esi,%eax - movl 32(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 40(%esp),%ebx - shrl $10,%edi - addl 76(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 12(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 16(%esp),%edi - xorl %ecx,%edx - movl %ebx,40(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - addl 20(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 28(%esp),%edi - xorl %eax,%ecx - movl %eax,24(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 659060556(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 48(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 4(%esp),%edx - addl %ecx,%ebp - movl 36(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 44(%esp),%ebx - shrl $10,%edi - addl 80(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 8(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 12(%esp),%edi - xorl %esi,%edx - movl %ebx,44(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,4(%esp) - xorl %esi,%edx - addl 16(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 24(%esp),%edi - xorl %ebp,%esi - movl %ebp,20(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 883997877(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 52(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl (%esp),%edx - addl %esi,%eax - movl 40(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 48(%esp),%ebx - shrl $10,%edi - addl 84(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 4(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 8(%esp),%edi - xorl %ecx,%edx - movl %ebx,48(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - addl 12(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 20(%esp),%edi - xorl %eax,%ecx - movl %eax,16(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 958139571(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 56(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 28(%esp),%edx - addl %ecx,%ebp - movl 44(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 52(%esp),%ebx - shrl $10,%edi - addl 88(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl (%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 4(%esp),%edi - xorl %esi,%edx - movl %ebx,52(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,28(%esp) - xorl %esi,%edx - addl 8(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 16(%esp),%edi - xorl %ebp,%esi - movl %ebp,12(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 1322822218(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 60(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 24(%esp),%edx - addl %esi,%eax - movl 48(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 56(%esp),%ebx - shrl $10,%edi - addl 92(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 28(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl (%esp),%edi - xorl %ecx,%edx - movl %ebx,56(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - addl 4(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 12(%esp),%edi - xorl %eax,%ecx - movl %eax,8(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 1537002063(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 64(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 20(%esp),%edx - addl %ecx,%ebp - movl 52(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 60(%esp),%ebx - shrl $10,%edi - addl 32(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 24(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 28(%esp),%edi - xorl %esi,%edx - movl %ebx,60(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,20(%esp) - xorl %esi,%edx - addl (%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 8(%esp),%edi - xorl %ebp,%esi - movl %ebp,4(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 1747873779(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 68(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 16(%esp),%edx - addl %esi,%eax - movl 56(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 64(%esp),%ebx - shrl $10,%edi - addl 36(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 20(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 24(%esp),%edi - xorl %ecx,%edx - movl %ebx,64(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - addl 28(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 4(%esp),%edi - xorl %eax,%ecx - movl %eax,(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 1955562222(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 72(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 12(%esp),%edx - addl %ecx,%ebp - movl 60(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 68(%esp),%ebx - shrl $10,%edi - addl 40(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 16(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 20(%esp),%edi - xorl %esi,%edx - movl %ebx,68(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,12(%esp) - xorl %esi,%edx - addl 24(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl (%esp),%edi - xorl %ebp,%esi - movl %ebp,28(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 2024104815(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 76(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 8(%esp),%edx - addl %esi,%eax - movl 64(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 72(%esp),%ebx - shrl $10,%edi - addl 44(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 12(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 16(%esp),%edi - xorl %ecx,%edx - movl %ebx,72(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - addl 20(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 28(%esp),%edi - xorl %eax,%ecx - movl %eax,24(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 2227730452(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 80(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 4(%esp),%edx - addl %ecx,%ebp - movl 68(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 76(%esp),%ebx - shrl $10,%edi - addl 48(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 8(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 12(%esp),%edi - xorl %esi,%edx - movl %ebx,76(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,4(%esp) - xorl %esi,%edx - addl 16(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 24(%esp),%edi - xorl %ebp,%esi - movl %ebp,20(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 2361852424(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 84(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl (%esp),%edx - addl %esi,%eax - movl 72(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 80(%esp),%ebx - shrl $10,%edi - addl 52(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 4(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 8(%esp),%edi - xorl %ecx,%edx - movl %ebx,80(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - addl 12(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 20(%esp),%edi - xorl %eax,%ecx - movl %eax,16(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 2428436474(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 88(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 28(%esp),%edx - addl %ecx,%ebp - movl 76(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 84(%esp),%ebx - shrl $10,%edi - addl 56(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl (%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 4(%esp),%edi - xorl %esi,%edx - movl %ebx,84(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,28(%esp) - xorl %esi,%edx - addl 8(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 16(%esp),%edi - xorl %ebp,%esi - movl %ebp,12(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 2756734187(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 92(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 24(%esp),%edx - addl %esi,%eax - movl 80(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 88(%esp),%ebx - shrl $10,%edi - addl 60(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 28(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl (%esp),%edi - xorl %ecx,%edx - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - addl 4(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 12(%esp),%edi - xorl %eax,%ecx - movl %eax,8(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 3204031479(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 32(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 20(%esp),%edx - addl %ecx,%ebp - movl 84(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 92(%esp),%ebx - shrl $10,%edi - addl 64(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 24(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 28(%esp),%edi - xorl %esi,%edx - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,20(%esp) - xorl %esi,%edx - addl (%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 8(%esp),%edi - xorl %ebp,%esi - movl %ebp,4(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 3329325298(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - rorl $2,%esi - addl %edx,%eax - addl 16(%esp),%edx - addl %esi,%eax - movl 96(%esp),%esi - xorl %edi,%ebp - movl 12(%esp),%ecx - addl (%esi),%eax - addl 4(%esi),%ebp - addl 8(%esi),%edi - addl 12(%esi),%ecx - movl %eax,(%esi) - movl %ebp,4(%esi) - movl %edi,8(%esi) - movl %ecx,12(%esi) - movl %ebp,4(%esp) - xorl %edi,%ebp - movl %edi,8(%esp) - movl %ecx,12(%esp) - movl 20(%esp),%edi - movl 24(%esp),%ebx - movl 28(%esp),%ecx - addl 16(%esi),%edx - addl 20(%esi),%edi - addl 24(%esi),%ebx - addl 28(%esi),%ecx - movl %edx,16(%esi) - movl %edi,20(%esi) - movl %ebx,24(%esi) - movl %ecx,28(%esi) - movl %edi,20(%esp) - movl 100(%esp),%edi - movl %ebx,24(%esp) - movl %ecx,28(%esp) - cmpl 104(%esp),%edi - jb .L009grand_loop - movl 108(%esp),%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.align 32 -.L004shaext: - subl $32,%esp - movdqu (%esi),%xmm1 - leal 128(%ebp),%ebp - movdqu 16(%esi),%xmm2 - movdqa 128(%ebp),%xmm7 - pshufd $27,%xmm1,%xmm0 - pshufd $177,%xmm1,%xmm1 - pshufd $27,%xmm2,%xmm2 -.byte 102,15,58,15,202,8 - punpcklqdq %xmm0,%xmm2 - jmp .L010loop_shaext -.align 16 -.L010loop_shaext: - movdqu (%edi),%xmm3 - movdqu 16(%edi),%xmm4 - movdqu 32(%edi),%xmm5 -.byte 102,15,56,0,223 - movdqu 48(%edi),%xmm6 - movdqa %xmm2,16(%esp) - movdqa -128(%ebp),%xmm0 - paddd %xmm3,%xmm0 -.byte 102,15,56,0,231 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - nop - movdqa %xmm1,(%esp) -.byte 15,56,203,202 - movdqa -112(%ebp),%xmm0 - paddd %xmm4,%xmm0 -.byte 102,15,56,0,239 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - leal 64(%edi),%edi -.byte 15,56,204,220 -.byte 15,56,203,202 - movdqa -96(%ebp),%xmm0 - paddd %xmm5,%xmm0 -.byte 102,15,56,0,247 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm6,%xmm7 -.byte 102,15,58,15,253,4 - nop - paddd %xmm7,%xmm3 -.byte 15,56,204,229 -.byte 15,56,203,202 - movdqa -80(%ebp),%xmm0 - paddd %xmm6,%xmm0 -.byte 15,56,205,222 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm3,%xmm7 -.byte 102,15,58,15,254,4 - nop - paddd %xmm7,%xmm4 -.byte 15,56,204,238 -.byte 15,56,203,202 - movdqa -64(%ebp),%xmm0 - paddd %xmm3,%xmm0 -.byte 15,56,205,227 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm4,%xmm7 -.byte 102,15,58,15,251,4 - nop - paddd %xmm7,%xmm5 -.byte 15,56,204,243 -.byte 15,56,203,202 - movdqa -48(%ebp),%xmm0 - paddd %xmm4,%xmm0 -.byte 15,56,205,236 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm5,%xmm7 -.byte 102,15,58,15,252,4 - nop - paddd %xmm7,%xmm6 -.byte 15,56,204,220 -.byte 15,56,203,202 - movdqa -32(%ebp),%xmm0 - paddd %xmm5,%xmm0 -.byte 15,56,205,245 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm6,%xmm7 -.byte 102,15,58,15,253,4 - nop - paddd %xmm7,%xmm3 -.byte 15,56,204,229 -.byte 15,56,203,202 - movdqa -16(%ebp),%xmm0 - paddd %xmm6,%xmm0 -.byte 15,56,205,222 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm3,%xmm7 -.byte 102,15,58,15,254,4 - nop - paddd %xmm7,%xmm4 -.byte 15,56,204,238 -.byte 15,56,203,202 - movdqa (%ebp),%xmm0 - paddd %xmm3,%xmm0 -.byte 15,56,205,227 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm4,%xmm7 -.byte 102,15,58,15,251,4 - nop - paddd %xmm7,%xmm5 -.byte 15,56,204,243 -.byte 15,56,203,202 - movdqa 16(%ebp),%xmm0 - paddd %xmm4,%xmm0 -.byte 15,56,205,236 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm5,%xmm7 -.byte 102,15,58,15,252,4 - nop - paddd %xmm7,%xmm6 -.byte 15,56,204,220 -.byte 15,56,203,202 - movdqa 32(%ebp),%xmm0 - paddd %xmm5,%xmm0 -.byte 15,56,205,245 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm6,%xmm7 -.byte 102,15,58,15,253,4 - nop - paddd %xmm7,%xmm3 -.byte 15,56,204,229 -.byte 15,56,203,202 - movdqa 48(%ebp),%xmm0 - paddd %xmm6,%xmm0 -.byte 15,56,205,222 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm3,%xmm7 -.byte 102,15,58,15,254,4 - nop - paddd %xmm7,%xmm4 -.byte 15,56,204,238 -.byte 15,56,203,202 - movdqa 64(%ebp),%xmm0 - paddd %xmm3,%xmm0 -.byte 15,56,205,227 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm4,%xmm7 -.byte 102,15,58,15,251,4 - nop - paddd %xmm7,%xmm5 -.byte 15,56,204,243 -.byte 15,56,203,202 - movdqa 80(%ebp),%xmm0 - paddd %xmm4,%xmm0 -.byte 15,56,205,236 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm5,%xmm7 -.byte 102,15,58,15,252,4 -.byte 15,56,203,202 - paddd %xmm7,%xmm6 - movdqa 96(%ebp),%xmm0 - paddd %xmm5,%xmm0 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 -.byte 15,56,205,245 - movdqa 128(%ebp),%xmm7 -.byte 15,56,203,202 - movdqa 112(%ebp),%xmm0 - paddd %xmm6,%xmm0 - nop -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - cmpl %edi,%eax - nop -.byte 15,56,203,202 - paddd 16(%esp),%xmm2 - paddd (%esp),%xmm1 - jnz .L010loop_shaext - pshufd $177,%xmm2,%xmm2 - pshufd $27,%xmm1,%xmm7 - pshufd $177,%xmm1,%xmm1 - punpckhqdq %xmm2,%xmm1 -.byte 102,15,58,15,215,8 - movl 44(%esp),%esp - movdqu %xmm1,(%esi) - movdqu %xmm2,16(%esi) - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.align 32 -.L005SSSE3: - leal -96(%esp),%esp - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edi - movl %ebx,4(%esp) - xorl %ecx,%ebx - movl %ecx,8(%esp) - movl %edi,12(%esp) - movl 16(%esi),%edx - movl 20(%esi),%edi - movl 24(%esi),%ecx - movl 28(%esi),%esi - movl %edi,20(%esp) - movl 100(%esp),%edi - movl %ecx,24(%esp) - movl %esi,28(%esp) - movdqa 256(%ebp),%xmm7 - jmp .L011grand_ssse3 -.align 16 -.L011grand_ssse3: - movdqu (%edi),%xmm0 - movdqu 16(%edi),%xmm1 - movdqu 32(%edi),%xmm2 - movdqu 48(%edi),%xmm3 - addl $64,%edi -.byte 102,15,56,0,199 - movl %edi,100(%esp) -.byte 102,15,56,0,207 - movdqa (%ebp),%xmm4 -.byte 102,15,56,0,215 - movdqa 16(%ebp),%xmm5 - paddd %xmm0,%xmm4 -.byte 102,15,56,0,223 - movdqa 32(%ebp),%xmm6 - paddd %xmm1,%xmm5 - movdqa 48(%ebp),%xmm7 - movdqa %xmm4,32(%esp) - paddd %xmm2,%xmm6 - movdqa %xmm5,48(%esp) - paddd %xmm3,%xmm7 - movdqa %xmm6,64(%esp) - movdqa %xmm7,80(%esp) - jmp .L012ssse3_00_47 -.align 16 -.L012ssse3_00_47: - addl $64,%ebp - movl %edx,%ecx - movdqa %xmm1,%xmm4 - rorl $14,%edx - movl 20(%esp),%esi - movdqa %xmm3,%xmm7 - xorl %ecx,%edx - movl 24(%esp),%edi -.byte 102,15,58,15,224,4 - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi -.byte 102,15,58,15,250,4 - movl %ecx,16(%esp) - xorl %ecx,%edx - xorl %esi,%edi - movdqa %xmm4,%xmm5 - rorl $6,%edx - movl %eax,%ecx - movdqa %xmm4,%xmm6 - addl %edi,%edx - movl 4(%esp),%edi - psrld $3,%xmm4 - movl %eax,%esi - rorl $9,%ecx - paddd %xmm7,%xmm0 - movl %eax,(%esp) - xorl %eax,%ecx - psrld $7,%xmm6 - xorl %edi,%eax - addl 28(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - pshufd $250,%xmm3,%xmm7 - xorl %esi,%ecx - addl 32(%esp),%edx - pslld $14,%xmm5 - xorl %edi,%ebx - rorl $2,%ecx - pxor %xmm6,%xmm4 - addl %edx,%ebx - addl 12(%esp),%edx - psrld $11,%xmm6 - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - pxor %xmm5,%xmm4 - movl 16(%esp),%esi - xorl %ecx,%edx - pslld $11,%xmm5 - movl 20(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - pxor %xmm6,%xmm4 - andl %ecx,%esi - movl %ecx,12(%esp) - movdqa %xmm7,%xmm6 - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - pxor %xmm5,%xmm4 - movl %ebx,%ecx - addl %edi,%edx - psrld $10,%xmm7 - movl (%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - paddd %xmm4,%xmm0 - movl %ebx,28(%esp) - xorl %ebx,%ecx - psrlq $17,%xmm6 - xorl %edi,%ebx - addl 24(%esp),%edx - rorl $11,%ecx - pxor %xmm6,%xmm7 - andl %ebx,%eax - xorl %esi,%ecx - psrlq $2,%xmm6 - addl 36(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - pxor %xmm6,%xmm7 - addl %edx,%eax - addl 8(%esp),%edx - pshufd $128,%xmm7,%xmm7 - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 12(%esp),%esi - xorl %ecx,%edx - movl 16(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - psrldq $8,%xmm7 - movl %ecx,8(%esp) - xorl %ecx,%edx - xorl %esi,%edi - paddd %xmm7,%xmm0 - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 28(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,24(%esp) - pshufd $80,%xmm0,%xmm7 - xorl %eax,%ecx - xorl %edi,%eax - addl 20(%esp),%edx - movdqa %xmm7,%xmm6 - rorl $11,%ecx - psrld $10,%xmm7 - andl %eax,%ebx - psrlq $17,%xmm6 - xorl %esi,%ecx - addl 40(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - pxor %xmm6,%xmm7 - addl %edx,%ebx - addl 4(%esp),%edx - psrlq $2,%xmm6 - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - pxor %xmm6,%xmm7 - movl 8(%esp),%esi - xorl %ecx,%edx - movl 12(%esp),%edi - pshufd $8,%xmm7,%xmm7 - xorl %edi,%esi - rorl $5,%edx - movdqa (%ebp),%xmm6 - andl %ecx,%esi - movl %ecx,4(%esp) - pslldq $8,%xmm7 - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 24(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - paddd %xmm7,%xmm0 - movl %ebx,20(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl 16(%esp),%edx - paddd %xmm0,%xmm6 - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 44(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl (%esp),%edx - addl %ecx,%eax - movdqa %xmm6,32(%esp) - movl %edx,%ecx - movdqa %xmm2,%xmm4 - rorl $14,%edx - movl 4(%esp),%esi - movdqa %xmm0,%xmm7 - xorl %ecx,%edx - movl 8(%esp),%edi -.byte 102,15,58,15,225,4 - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi -.byte 102,15,58,15,251,4 - movl %ecx,(%esp) - xorl %ecx,%edx - xorl %esi,%edi - movdqa %xmm4,%xmm5 - rorl $6,%edx - movl %eax,%ecx - movdqa %xmm4,%xmm6 - addl %edi,%edx - movl 20(%esp),%edi - psrld $3,%xmm4 - movl %eax,%esi - rorl $9,%ecx - paddd %xmm7,%xmm1 - movl %eax,16(%esp) - xorl %eax,%ecx - psrld $7,%xmm6 - xorl %edi,%eax - addl 12(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - pshufd $250,%xmm0,%xmm7 - xorl %esi,%ecx - addl 48(%esp),%edx - pslld $14,%xmm5 - xorl %edi,%ebx - rorl $2,%ecx - pxor %xmm6,%xmm4 - addl %edx,%ebx - addl 28(%esp),%edx - psrld $11,%xmm6 - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - pxor %xmm5,%xmm4 - movl (%esp),%esi - xorl %ecx,%edx - pslld $11,%xmm5 - movl 4(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - pxor %xmm6,%xmm4 - andl %ecx,%esi - movl %ecx,28(%esp) - movdqa %xmm7,%xmm6 - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - pxor %xmm5,%xmm4 - movl %ebx,%ecx - addl %edi,%edx - psrld $10,%xmm7 - movl 16(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - paddd %xmm4,%xmm1 - movl %ebx,12(%esp) - xorl %ebx,%ecx - psrlq $17,%xmm6 - xorl %edi,%ebx - addl 8(%esp),%edx - rorl $11,%ecx - pxor %xmm6,%xmm7 - andl %ebx,%eax - xorl %esi,%ecx - psrlq $2,%xmm6 - addl 52(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - pxor %xmm6,%xmm7 - addl %edx,%eax - addl 24(%esp),%edx - pshufd $128,%xmm7,%xmm7 - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 28(%esp),%esi - xorl %ecx,%edx - movl (%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - psrldq $8,%xmm7 - movl %ecx,24(%esp) - xorl %ecx,%edx - xorl %esi,%edi - paddd %xmm7,%xmm1 - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 12(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,8(%esp) - pshufd $80,%xmm1,%xmm7 - xorl %eax,%ecx - xorl %edi,%eax - addl 4(%esp),%edx - movdqa %xmm7,%xmm6 - rorl $11,%ecx - psrld $10,%xmm7 - andl %eax,%ebx - psrlq $17,%xmm6 - xorl %esi,%ecx - addl 56(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - pxor %xmm6,%xmm7 - addl %edx,%ebx - addl 20(%esp),%edx - psrlq $2,%xmm6 - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - pxor %xmm6,%xmm7 - movl 24(%esp),%esi - xorl %ecx,%edx - movl 28(%esp),%edi - pshufd $8,%xmm7,%xmm7 - xorl %edi,%esi - rorl $5,%edx - movdqa 16(%ebp),%xmm6 - andl %ecx,%esi - movl %ecx,20(%esp) - pslldq $8,%xmm7 - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 8(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - paddd %xmm7,%xmm1 - movl %ebx,4(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl (%esp),%edx - paddd %xmm1,%xmm6 - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 60(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl 16(%esp),%edx - addl %ecx,%eax - movdqa %xmm6,48(%esp) - movl %edx,%ecx - movdqa %xmm3,%xmm4 - rorl $14,%edx - movl 20(%esp),%esi - movdqa %xmm1,%xmm7 - xorl %ecx,%edx - movl 24(%esp),%edi -.byte 102,15,58,15,226,4 - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi -.byte 102,15,58,15,248,4 - movl %ecx,16(%esp) - xorl %ecx,%edx - xorl %esi,%edi - movdqa %xmm4,%xmm5 - rorl $6,%edx - movl %eax,%ecx - movdqa %xmm4,%xmm6 - addl %edi,%edx - movl 4(%esp),%edi - psrld $3,%xmm4 - movl %eax,%esi - rorl $9,%ecx - paddd %xmm7,%xmm2 - movl %eax,(%esp) - xorl %eax,%ecx - psrld $7,%xmm6 - xorl %edi,%eax - addl 28(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - pshufd $250,%xmm1,%xmm7 - xorl %esi,%ecx - addl 64(%esp),%edx - pslld $14,%xmm5 - xorl %edi,%ebx - rorl $2,%ecx - pxor %xmm6,%xmm4 - addl %edx,%ebx - addl 12(%esp),%edx - psrld $11,%xmm6 - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - pxor %xmm5,%xmm4 - movl 16(%esp),%esi - xorl %ecx,%edx - pslld $11,%xmm5 - movl 20(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - pxor %xmm6,%xmm4 - andl %ecx,%esi - movl %ecx,12(%esp) - movdqa %xmm7,%xmm6 - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - pxor %xmm5,%xmm4 - movl %ebx,%ecx - addl %edi,%edx - psrld $10,%xmm7 - movl (%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - paddd %xmm4,%xmm2 - movl %ebx,28(%esp) - xorl %ebx,%ecx - psrlq $17,%xmm6 - xorl %edi,%ebx - addl 24(%esp),%edx - rorl $11,%ecx - pxor %xmm6,%xmm7 - andl %ebx,%eax - xorl %esi,%ecx - psrlq $2,%xmm6 - addl 68(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - pxor %xmm6,%xmm7 - addl %edx,%eax - addl 8(%esp),%edx - pshufd $128,%xmm7,%xmm7 - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 12(%esp),%esi - xorl %ecx,%edx - movl 16(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - psrldq $8,%xmm7 - movl %ecx,8(%esp) - xorl %ecx,%edx - xorl %esi,%edi - paddd %xmm7,%xmm2 - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 28(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,24(%esp) - pshufd $80,%xmm2,%xmm7 - xorl %eax,%ecx - xorl %edi,%eax - addl 20(%esp),%edx - movdqa %xmm7,%xmm6 - rorl $11,%ecx - psrld $10,%xmm7 - andl %eax,%ebx - psrlq $17,%xmm6 - xorl %esi,%ecx - addl 72(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - pxor %xmm6,%xmm7 - addl %edx,%ebx - addl 4(%esp),%edx - psrlq $2,%xmm6 - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - pxor %xmm6,%xmm7 - movl 8(%esp),%esi - xorl %ecx,%edx - movl 12(%esp),%edi - pshufd $8,%xmm7,%xmm7 - xorl %edi,%esi - rorl $5,%edx - movdqa 32(%ebp),%xmm6 - andl %ecx,%esi - movl %ecx,4(%esp) - pslldq $8,%xmm7 - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 24(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - paddd %xmm7,%xmm2 - movl %ebx,20(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl 16(%esp),%edx - paddd %xmm2,%xmm6 - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 76(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl (%esp),%edx - addl %ecx,%eax - movdqa %xmm6,64(%esp) - movl %edx,%ecx - movdqa %xmm0,%xmm4 - rorl $14,%edx - movl 4(%esp),%esi - movdqa %xmm2,%xmm7 - xorl %ecx,%edx - movl 8(%esp),%edi -.byte 102,15,58,15,227,4 - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi -.byte 102,15,58,15,249,4 - movl %ecx,(%esp) - xorl %ecx,%edx - xorl %esi,%edi - movdqa %xmm4,%xmm5 - rorl $6,%edx - movl %eax,%ecx - movdqa %xmm4,%xmm6 - addl %edi,%edx - movl 20(%esp),%edi - psrld $3,%xmm4 - movl %eax,%esi - rorl $9,%ecx - paddd %xmm7,%xmm3 - movl %eax,16(%esp) - xorl %eax,%ecx - psrld $7,%xmm6 - xorl %edi,%eax - addl 12(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - pshufd $250,%xmm2,%xmm7 - xorl %esi,%ecx - addl 80(%esp),%edx - pslld $14,%xmm5 - xorl %edi,%ebx - rorl $2,%ecx - pxor %xmm6,%xmm4 - addl %edx,%ebx - addl 28(%esp),%edx - psrld $11,%xmm6 - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - pxor %xmm5,%xmm4 - movl (%esp),%esi - xorl %ecx,%edx - pslld $11,%xmm5 - movl 4(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - pxor %xmm6,%xmm4 - andl %ecx,%esi - movl %ecx,28(%esp) - movdqa %xmm7,%xmm6 - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - pxor %xmm5,%xmm4 - movl %ebx,%ecx - addl %edi,%edx - psrld $10,%xmm7 - movl 16(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - paddd %xmm4,%xmm3 - movl %ebx,12(%esp) - xorl %ebx,%ecx - psrlq $17,%xmm6 - xorl %edi,%ebx - addl 8(%esp),%edx - rorl $11,%ecx - pxor %xmm6,%xmm7 - andl %ebx,%eax - xorl %esi,%ecx - psrlq $2,%xmm6 - addl 84(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - pxor %xmm6,%xmm7 - addl %edx,%eax - addl 24(%esp),%edx - pshufd $128,%xmm7,%xmm7 - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 28(%esp),%esi - xorl %ecx,%edx - movl (%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - psrldq $8,%xmm7 - movl %ecx,24(%esp) - xorl %ecx,%edx - xorl %esi,%edi - paddd %xmm7,%xmm3 - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 12(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,8(%esp) - pshufd $80,%xmm3,%xmm7 - xorl %eax,%ecx - xorl %edi,%eax - addl 4(%esp),%edx - movdqa %xmm7,%xmm6 - rorl $11,%ecx - psrld $10,%xmm7 - andl %eax,%ebx - psrlq $17,%xmm6 - xorl %esi,%ecx - addl 88(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - pxor %xmm6,%xmm7 - addl %edx,%ebx - addl 20(%esp),%edx - psrlq $2,%xmm6 - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - pxor %xmm6,%xmm7 - movl 24(%esp),%esi - xorl %ecx,%edx - movl 28(%esp),%edi - pshufd $8,%xmm7,%xmm7 - xorl %edi,%esi - rorl $5,%edx - movdqa 48(%ebp),%xmm6 - andl %ecx,%esi - movl %ecx,20(%esp) - pslldq $8,%xmm7 - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 8(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - paddd %xmm7,%xmm3 - movl %ebx,4(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl (%esp),%edx - paddd %xmm3,%xmm6 - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 92(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl 16(%esp),%edx - addl %ecx,%eax - movdqa %xmm6,80(%esp) - cmpl $66051,64(%ebp) - jne .L012ssse3_00_47 - movl %edx,%ecx - rorl $14,%edx - movl 20(%esp),%esi - xorl %ecx,%edx - movl 24(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 4(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,(%esp) - xorl %eax,%ecx - xorl %edi,%eax - addl 28(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - xorl %esi,%ecx - addl 32(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - addl %edx,%ebx - addl 12(%esp),%edx - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - movl 16(%esp),%esi - xorl %ecx,%edx - movl 20(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,12(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl (%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - movl %ebx,28(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl 24(%esp),%edx - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 36(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl 8(%esp),%edx - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 12(%esp),%esi - xorl %ecx,%edx - movl 16(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 28(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,24(%esp) - xorl %eax,%ecx - xorl %edi,%eax - addl 20(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - xorl %esi,%ecx - addl 40(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - addl %edx,%ebx - addl 4(%esp),%edx - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - movl 8(%esp),%esi - xorl %ecx,%edx - movl 12(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,4(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 24(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - movl %ebx,20(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl 16(%esp),%edx - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 44(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl (%esp),%edx - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 4(%esp),%esi - xorl %ecx,%edx - movl 8(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 20(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,16(%esp) - xorl %eax,%ecx - xorl %edi,%eax - addl 12(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - xorl %esi,%ecx - addl 48(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - addl %edx,%ebx - addl 28(%esp),%edx - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - movl (%esp),%esi - xorl %ecx,%edx - movl 4(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,28(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 16(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - movl %ebx,12(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl 8(%esp),%edx - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 52(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl 24(%esp),%edx - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 28(%esp),%esi - xorl %ecx,%edx - movl (%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 12(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,8(%esp) - xorl %eax,%ecx - xorl %edi,%eax - addl 4(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - xorl %esi,%ecx - addl 56(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - addl %edx,%ebx - addl 20(%esp),%edx - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - movl 24(%esp),%esi - xorl %ecx,%edx - movl 28(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,20(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 8(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - movl %ebx,4(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl (%esp),%edx - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 60(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl 16(%esp),%edx - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 20(%esp),%esi - xorl %ecx,%edx - movl 24(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 4(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,(%esp) - xorl %eax,%ecx - xorl %edi,%eax - addl 28(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - xorl %esi,%ecx - addl 64(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - addl %edx,%ebx - addl 12(%esp),%edx - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - movl 16(%esp),%esi - xorl %ecx,%edx - movl 20(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,12(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl (%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - movl %ebx,28(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl 24(%esp),%edx - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 68(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl 8(%esp),%edx - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 12(%esp),%esi - xorl %ecx,%edx - movl 16(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 28(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,24(%esp) - xorl %eax,%ecx - xorl %edi,%eax - addl 20(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - xorl %esi,%ecx - addl 72(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - addl %edx,%ebx - addl 4(%esp),%edx - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - movl 8(%esp),%esi - xorl %ecx,%edx - movl 12(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,4(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 24(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - movl %ebx,20(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl 16(%esp),%edx - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 76(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl (%esp),%edx - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 4(%esp),%esi - xorl %ecx,%edx - movl 8(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 20(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,16(%esp) - xorl %eax,%ecx - xorl %edi,%eax - addl 12(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - xorl %esi,%ecx - addl 80(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - addl %edx,%ebx - addl 28(%esp),%edx - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - movl (%esp),%esi - xorl %ecx,%edx - movl 4(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,28(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 16(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - movl %ebx,12(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl 8(%esp),%edx - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 84(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl 24(%esp),%edx - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 28(%esp),%esi - xorl %ecx,%edx - movl (%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 12(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,8(%esp) - xorl %eax,%ecx - xorl %edi,%eax - addl 4(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - xorl %esi,%ecx - addl 88(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - addl %edx,%ebx - addl 20(%esp),%edx - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - movl 24(%esp),%esi - xorl %ecx,%edx - movl 28(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,20(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 8(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - movl %ebx,4(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl (%esp),%edx - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 92(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl 16(%esp),%edx - addl %ecx,%eax - movl 96(%esp),%esi - xorl %edi,%ebx - movl 12(%esp),%ecx - addl (%esi),%eax - addl 4(%esi),%ebx - addl 8(%esi),%edi - addl 12(%esi),%ecx - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %edi,8(%esi) - movl %ecx,12(%esi) - movl %ebx,4(%esp) - xorl %edi,%ebx - movl %edi,8(%esp) - movl %ecx,12(%esp) - movl 20(%esp),%edi - movl 24(%esp),%ecx - addl 16(%esi),%edx - addl 20(%esi),%edi - addl 24(%esi),%ecx - movl %edx,16(%esi) - movl %edi,20(%esi) - movl %edi,20(%esp) - movl 28(%esp),%edi - movl %ecx,24(%esi) - addl 28(%esi),%edi - movl %ecx,24(%esp) - movl %edi,28(%esi) - movl %edi,28(%esp) - movl 100(%esp),%edi - movdqa 64(%ebp),%xmm7 - subl $192,%ebp - cmpl 104(%esp),%edi - jb .L011grand_ssse3 - movl 108(%esp),%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.size sha256_block_data_order,.-.L_sha256_block_data_order_begin -#endif diff --git a/third_party/boringssl/linux-x86/crypto/sha/sha512-586.S b/third_party/boringssl/linux-x86/crypto/sha/sha512-586.S deleted file mode 100644 index a9284000b35a0..0000000000000 --- a/third_party/boringssl/linux-x86/crypto/sha/sha512-586.S +++ /dev/null @@ -1,2831 +0,0 @@ -#if defined(__i386__) -.file "sha512-586.S" -.text -.globl sha512_block_data_order -.hidden sha512_block_data_order -.type sha512_block_data_order,@function -.align 16 -sha512_block_data_order: -.L_sha512_block_data_order_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%eax - movl %esp,%ebx - call .L000pic_point -.L000pic_point: - popl %ebp - leal .L001K512-.L000pic_point(%ebp),%ebp - subl $16,%esp - andl $-64,%esp - shll $7,%eax - addl %edi,%eax - movl %esi,(%esp) - movl %edi,4(%esp) - movl %eax,8(%esp) - movl %ebx,12(%esp) - leal OPENSSL_ia32cap_P-.L001K512(%ebp),%edx - movl (%edx),%ecx - testl $67108864,%ecx - jz .L002loop_x86 - movl 4(%edx),%edx - movq (%esi),%mm0 - andl $16777216,%ecx - movq 8(%esi),%mm1 - andl $512,%edx - movq 16(%esi),%mm2 - orl %edx,%ecx - movq 24(%esi),%mm3 - movq 32(%esi),%mm4 - movq 40(%esi),%mm5 - movq 48(%esi),%mm6 - movq 56(%esi),%mm7 - cmpl $16777728,%ecx - je .L003SSSE3 - subl $80,%esp - jmp .L004loop_sse2 -.align 16 -.L004loop_sse2: - movq %mm1,8(%esp) - movq %mm2,16(%esp) - movq %mm3,24(%esp) - movq %mm5,40(%esp) - movq %mm6,48(%esp) - pxor %mm1,%mm2 - movq %mm7,56(%esp) - movq %mm0,%mm3 - movl (%edi),%eax - movl 4(%edi),%ebx - addl $8,%edi - movl $15,%edx - bswap %eax - bswap %ebx - jmp .L00500_14_sse2 -.align 16 -.L00500_14_sse2: - movd %eax,%mm1 - movl (%edi),%eax - movd %ebx,%mm7 - movl 4(%edi),%ebx - addl $8,%edi - bswap %eax - bswap %ebx - punpckldq %mm1,%mm7 - movq %mm4,%mm1 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,32(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - movq %mm3,%mm0 - movq %mm7,72(%esp) - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 56(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - paddq (%ebp),%mm7 - pxor %mm4,%mm3 - movq 24(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 8(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - subl $8,%esp - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 40(%esp),%mm5 - paddq %mm2,%mm3 - movq %mm0,%mm2 - addl $8,%ebp - paddq %mm6,%mm3 - movq 48(%esp),%mm6 - decl %edx - jnz .L00500_14_sse2 - movd %eax,%mm1 - movd %ebx,%mm7 - punpckldq %mm1,%mm7 - movq %mm4,%mm1 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,32(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - movq %mm3,%mm0 - movq %mm7,72(%esp) - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 56(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - paddq (%ebp),%mm7 - pxor %mm4,%mm3 - movq 24(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 8(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - subl $8,%esp - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 192(%esp),%mm7 - paddq %mm2,%mm3 - movq %mm0,%mm2 - addl $8,%ebp - paddq %mm6,%mm3 - pxor %mm0,%mm0 - movl $32,%edx - jmp .L00616_79_sse2 -.align 16 -.L00616_79_sse2: - movq 88(%esp),%mm5 - movq %mm7,%mm1 - psrlq $1,%mm7 - movq %mm5,%mm6 - psrlq $6,%mm5 - psllq $56,%mm1 - paddq %mm3,%mm0 - movq %mm7,%mm3 - psrlq $6,%mm7 - pxor %mm1,%mm3 - psllq $7,%mm1 - pxor %mm7,%mm3 - psrlq $1,%mm7 - pxor %mm1,%mm3 - movq %mm5,%mm1 - psrlq $13,%mm5 - pxor %mm3,%mm7 - psllq $3,%mm6 - pxor %mm5,%mm1 - paddq 200(%esp),%mm7 - pxor %mm6,%mm1 - psrlq $42,%mm5 - paddq 128(%esp),%mm7 - pxor %mm5,%mm1 - psllq $42,%mm6 - movq 40(%esp),%mm5 - pxor %mm6,%mm1 - movq 48(%esp),%mm6 - paddq %mm1,%mm7 - movq %mm4,%mm1 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,32(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - movq %mm7,72(%esp) - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 56(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - paddq (%ebp),%mm7 - pxor %mm4,%mm3 - movq 24(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 8(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - subl $8,%esp - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 192(%esp),%mm7 - paddq %mm6,%mm2 - addl $8,%ebp - movq 88(%esp),%mm5 - movq %mm7,%mm1 - psrlq $1,%mm7 - movq %mm5,%mm6 - psrlq $6,%mm5 - psllq $56,%mm1 - paddq %mm3,%mm2 - movq %mm7,%mm3 - psrlq $6,%mm7 - pxor %mm1,%mm3 - psllq $7,%mm1 - pxor %mm7,%mm3 - psrlq $1,%mm7 - pxor %mm1,%mm3 - movq %mm5,%mm1 - psrlq $13,%mm5 - pxor %mm3,%mm7 - psllq $3,%mm6 - pxor %mm5,%mm1 - paddq 200(%esp),%mm7 - pxor %mm6,%mm1 - psrlq $42,%mm5 - paddq 128(%esp),%mm7 - pxor %mm5,%mm1 - psllq $42,%mm6 - movq 40(%esp),%mm5 - pxor %mm6,%mm1 - movq 48(%esp),%mm6 - paddq %mm1,%mm7 - movq %mm4,%mm1 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,32(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - movq %mm7,72(%esp) - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 56(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - paddq (%ebp),%mm7 - pxor %mm4,%mm3 - movq 24(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 8(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - subl $8,%esp - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 192(%esp),%mm7 - paddq %mm6,%mm0 - addl $8,%ebp - decl %edx - jnz .L00616_79_sse2 - paddq %mm3,%mm0 - movq 8(%esp),%mm1 - movq 24(%esp),%mm3 - movq 40(%esp),%mm5 - movq 48(%esp),%mm6 - movq 56(%esp),%mm7 - pxor %mm1,%mm2 - paddq (%esi),%mm0 - paddq 8(%esi),%mm1 - paddq 16(%esi),%mm2 - paddq 24(%esi),%mm3 - paddq 32(%esi),%mm4 - paddq 40(%esi),%mm5 - paddq 48(%esi),%mm6 - paddq 56(%esi),%mm7 - movl $640,%eax - movq %mm0,(%esi) - movq %mm1,8(%esi) - movq %mm2,16(%esi) - movq %mm3,24(%esi) - movq %mm4,32(%esi) - movq %mm5,40(%esi) - movq %mm6,48(%esi) - movq %mm7,56(%esi) - leal (%esp,%eax,1),%esp - subl %eax,%ebp - cmpl 88(%esp),%edi - jb .L004loop_sse2 - movl 92(%esp),%esp - emms - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.align 32 -.L003SSSE3: - leal -64(%esp),%edx - subl $256,%esp - movdqa 640(%ebp),%xmm1 - movdqu (%edi),%xmm0 -.byte 102,15,56,0,193 - movdqa (%ebp),%xmm3 - movdqa %xmm1,%xmm2 - movdqu 16(%edi),%xmm1 - paddq %xmm0,%xmm3 -.byte 102,15,56,0,202 - movdqa %xmm3,-128(%edx) - movdqa 16(%ebp),%xmm4 - movdqa %xmm2,%xmm3 - movdqu 32(%edi),%xmm2 - paddq %xmm1,%xmm4 -.byte 102,15,56,0,211 - movdqa %xmm4,-112(%edx) - movdqa 32(%ebp),%xmm5 - movdqa %xmm3,%xmm4 - movdqu 48(%edi),%xmm3 - paddq %xmm2,%xmm5 -.byte 102,15,56,0,220 - movdqa %xmm5,-96(%edx) - movdqa 48(%ebp),%xmm6 - movdqa %xmm4,%xmm5 - movdqu 64(%edi),%xmm4 - paddq %xmm3,%xmm6 -.byte 102,15,56,0,229 - movdqa %xmm6,-80(%edx) - movdqa 64(%ebp),%xmm7 - movdqa %xmm5,%xmm6 - movdqu 80(%edi),%xmm5 - paddq %xmm4,%xmm7 -.byte 102,15,56,0,238 - movdqa %xmm7,-64(%edx) - movdqa %xmm0,(%edx) - movdqa 80(%ebp),%xmm0 - movdqa %xmm6,%xmm7 - movdqu 96(%edi),%xmm6 - paddq %xmm5,%xmm0 -.byte 102,15,56,0,247 - movdqa %xmm0,-48(%edx) - movdqa %xmm1,16(%edx) - movdqa 96(%ebp),%xmm1 - movdqa %xmm7,%xmm0 - movdqu 112(%edi),%xmm7 - paddq %xmm6,%xmm1 -.byte 102,15,56,0,248 - movdqa %xmm1,-32(%edx) - movdqa %xmm2,32(%edx) - movdqa 112(%ebp),%xmm2 - movdqa (%edx),%xmm0 - paddq %xmm7,%xmm2 - movdqa %xmm2,-16(%edx) - nop -.align 32 -.L007loop_ssse3: - movdqa 16(%edx),%xmm2 - movdqa %xmm3,48(%edx) - leal 128(%ebp),%ebp - movq %mm1,8(%esp) - movl %edi,%ebx - movq %mm2,16(%esp) - leal 128(%edi),%edi - movq %mm3,24(%esp) - cmpl %eax,%edi - movq %mm5,40(%esp) - cmovbl %edi,%ebx - movq %mm6,48(%esp) - movl $4,%ecx - pxor %mm1,%mm2 - movq %mm7,56(%esp) - pxor %mm3,%mm3 - jmp .L00800_47_ssse3 -.align 32 -.L00800_47_ssse3: - movdqa %xmm5,%xmm3 - movdqa %xmm2,%xmm1 -.byte 102,15,58,15,208,8 - movdqa %xmm4,(%edx) -.byte 102,15,58,15,220,8 - movdqa %xmm2,%xmm4 - psrlq $7,%xmm2 - paddq %xmm3,%xmm0 - movdqa %xmm4,%xmm3 - psrlq $1,%xmm4 - psllq $56,%xmm3 - pxor %xmm4,%xmm2 - psrlq $7,%xmm4 - pxor %xmm3,%xmm2 - psllq $7,%xmm3 - pxor %xmm4,%xmm2 - movdqa %xmm7,%xmm4 - pxor %xmm3,%xmm2 - movdqa %xmm7,%xmm3 - psrlq $6,%xmm4 - paddq %xmm2,%xmm0 - movdqa %xmm7,%xmm2 - psrlq $19,%xmm3 - psllq $3,%xmm2 - pxor %xmm3,%xmm4 - psrlq $42,%xmm3 - pxor %xmm2,%xmm4 - psllq $42,%xmm2 - pxor %xmm3,%xmm4 - movdqa 32(%edx),%xmm3 - pxor %xmm2,%xmm4 - movdqa (%ebp),%xmm2 - movq %mm4,%mm1 - paddq %xmm4,%xmm0 - movq -128(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,32(%esp) - paddq %xmm0,%xmm2 - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 56(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 24(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 8(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 32(%esp),%mm5 - paddq %mm6,%mm2 - movq 40(%esp),%mm6 - movq %mm4,%mm1 - movq -120(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,24(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,56(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 48(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 16(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq (%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 24(%esp),%mm5 - paddq %mm6,%mm0 - movq 32(%esp),%mm6 - movdqa %xmm2,-128(%edx) - movdqa %xmm6,%xmm4 - movdqa %xmm3,%xmm2 -.byte 102,15,58,15,217,8 - movdqa %xmm5,16(%edx) -.byte 102,15,58,15,229,8 - movdqa %xmm3,%xmm5 - psrlq $7,%xmm3 - paddq %xmm4,%xmm1 - movdqa %xmm5,%xmm4 - psrlq $1,%xmm5 - psllq $56,%xmm4 - pxor %xmm5,%xmm3 - psrlq $7,%xmm5 - pxor %xmm4,%xmm3 - psllq $7,%xmm4 - pxor %xmm5,%xmm3 - movdqa %xmm0,%xmm5 - pxor %xmm4,%xmm3 - movdqa %xmm0,%xmm4 - psrlq $6,%xmm5 - paddq %xmm3,%xmm1 - movdqa %xmm0,%xmm3 - psrlq $19,%xmm4 - psllq $3,%xmm3 - pxor %xmm4,%xmm5 - psrlq $42,%xmm4 - pxor %xmm3,%xmm5 - psllq $42,%xmm3 - pxor %xmm4,%xmm5 - movdqa 48(%edx),%xmm4 - pxor %xmm3,%xmm5 - movdqa 16(%ebp),%xmm3 - movq %mm4,%mm1 - paddq %xmm5,%xmm1 - movq -112(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,16(%esp) - paddq %xmm1,%xmm3 - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,48(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 40(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 8(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 56(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 16(%esp),%mm5 - paddq %mm6,%mm2 - movq 24(%esp),%mm6 - movq %mm4,%mm1 - movq -104(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,8(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,40(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 32(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq (%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 48(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 8(%esp),%mm5 - paddq %mm6,%mm0 - movq 16(%esp),%mm6 - movdqa %xmm3,-112(%edx) - movdqa %xmm7,%xmm5 - movdqa %xmm4,%xmm3 -.byte 102,15,58,15,226,8 - movdqa %xmm6,32(%edx) -.byte 102,15,58,15,238,8 - movdqa %xmm4,%xmm6 - psrlq $7,%xmm4 - paddq %xmm5,%xmm2 - movdqa %xmm6,%xmm5 - psrlq $1,%xmm6 - psllq $56,%xmm5 - pxor %xmm6,%xmm4 - psrlq $7,%xmm6 - pxor %xmm5,%xmm4 - psllq $7,%xmm5 - pxor %xmm6,%xmm4 - movdqa %xmm1,%xmm6 - pxor %xmm5,%xmm4 - movdqa %xmm1,%xmm5 - psrlq $6,%xmm6 - paddq %xmm4,%xmm2 - movdqa %xmm1,%xmm4 - psrlq $19,%xmm5 - psllq $3,%xmm4 - pxor %xmm5,%xmm6 - psrlq $42,%xmm5 - pxor %xmm4,%xmm6 - psllq $42,%xmm4 - pxor %xmm5,%xmm6 - movdqa (%edx),%xmm5 - pxor %xmm4,%xmm6 - movdqa 32(%ebp),%xmm4 - movq %mm4,%mm1 - paddq %xmm6,%xmm2 - movq -96(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,(%esp) - paddq %xmm2,%xmm4 - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,32(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 24(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 56(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 40(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq (%esp),%mm5 - paddq %mm6,%mm2 - movq 8(%esp),%mm6 - movq %mm4,%mm1 - movq -88(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,56(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,24(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 16(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 48(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 32(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 56(%esp),%mm5 - paddq %mm6,%mm0 - movq (%esp),%mm6 - movdqa %xmm4,-96(%edx) - movdqa %xmm0,%xmm6 - movdqa %xmm5,%xmm4 -.byte 102,15,58,15,235,8 - movdqa %xmm7,48(%edx) -.byte 102,15,58,15,247,8 - movdqa %xmm5,%xmm7 - psrlq $7,%xmm5 - paddq %xmm6,%xmm3 - movdqa %xmm7,%xmm6 - psrlq $1,%xmm7 - psllq $56,%xmm6 - pxor %xmm7,%xmm5 - psrlq $7,%xmm7 - pxor %xmm6,%xmm5 - psllq $7,%xmm6 - pxor %xmm7,%xmm5 - movdqa %xmm2,%xmm7 - pxor %xmm6,%xmm5 - movdqa %xmm2,%xmm6 - psrlq $6,%xmm7 - paddq %xmm5,%xmm3 - movdqa %xmm2,%xmm5 - psrlq $19,%xmm6 - psllq $3,%xmm5 - pxor %xmm6,%xmm7 - psrlq $42,%xmm6 - pxor %xmm5,%xmm7 - psllq $42,%xmm5 - pxor %xmm6,%xmm7 - movdqa 16(%edx),%xmm6 - pxor %xmm5,%xmm7 - movdqa 48(%ebp),%xmm5 - movq %mm4,%mm1 - paddq %xmm7,%xmm3 - movq -80(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,48(%esp) - paddq %xmm3,%xmm5 - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,16(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 8(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 40(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 24(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 48(%esp),%mm5 - paddq %mm6,%mm2 - movq 56(%esp),%mm6 - movq %mm4,%mm1 - movq -72(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,40(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,8(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq (%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 32(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 16(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 40(%esp),%mm5 - paddq %mm6,%mm0 - movq 48(%esp),%mm6 - movdqa %xmm5,-80(%edx) - movdqa %xmm1,%xmm7 - movdqa %xmm6,%xmm5 -.byte 102,15,58,15,244,8 - movdqa %xmm0,(%edx) -.byte 102,15,58,15,248,8 - movdqa %xmm6,%xmm0 - psrlq $7,%xmm6 - paddq %xmm7,%xmm4 - movdqa %xmm0,%xmm7 - psrlq $1,%xmm0 - psllq $56,%xmm7 - pxor %xmm0,%xmm6 - psrlq $7,%xmm0 - pxor %xmm7,%xmm6 - psllq $7,%xmm7 - pxor %xmm0,%xmm6 - movdqa %xmm3,%xmm0 - pxor %xmm7,%xmm6 - movdqa %xmm3,%xmm7 - psrlq $6,%xmm0 - paddq %xmm6,%xmm4 - movdqa %xmm3,%xmm6 - psrlq $19,%xmm7 - psllq $3,%xmm6 - pxor %xmm7,%xmm0 - psrlq $42,%xmm7 - pxor %xmm6,%xmm0 - psllq $42,%xmm6 - pxor %xmm7,%xmm0 - movdqa 32(%edx),%xmm7 - pxor %xmm6,%xmm0 - movdqa 64(%ebp),%xmm6 - movq %mm4,%mm1 - paddq %xmm0,%xmm4 - movq -64(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,32(%esp) - paddq %xmm4,%xmm6 - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 56(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 24(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 8(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 32(%esp),%mm5 - paddq %mm6,%mm2 - movq 40(%esp),%mm6 - movq %mm4,%mm1 - movq -56(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,24(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,56(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 48(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 16(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq (%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 24(%esp),%mm5 - paddq %mm6,%mm0 - movq 32(%esp),%mm6 - movdqa %xmm6,-64(%edx) - movdqa %xmm2,%xmm0 - movdqa %xmm7,%xmm6 -.byte 102,15,58,15,253,8 - movdqa %xmm1,16(%edx) -.byte 102,15,58,15,193,8 - movdqa %xmm7,%xmm1 - psrlq $7,%xmm7 - paddq %xmm0,%xmm5 - movdqa %xmm1,%xmm0 - psrlq $1,%xmm1 - psllq $56,%xmm0 - pxor %xmm1,%xmm7 - psrlq $7,%xmm1 - pxor %xmm0,%xmm7 - psllq $7,%xmm0 - pxor %xmm1,%xmm7 - movdqa %xmm4,%xmm1 - pxor %xmm0,%xmm7 - movdqa %xmm4,%xmm0 - psrlq $6,%xmm1 - paddq %xmm7,%xmm5 - movdqa %xmm4,%xmm7 - psrlq $19,%xmm0 - psllq $3,%xmm7 - pxor %xmm0,%xmm1 - psrlq $42,%xmm0 - pxor %xmm7,%xmm1 - psllq $42,%xmm7 - pxor %xmm0,%xmm1 - movdqa 48(%edx),%xmm0 - pxor %xmm7,%xmm1 - movdqa 80(%ebp),%xmm7 - movq %mm4,%mm1 - paddq %xmm1,%xmm5 - movq -48(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,16(%esp) - paddq %xmm5,%xmm7 - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,48(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 40(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 8(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 56(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 16(%esp),%mm5 - paddq %mm6,%mm2 - movq 24(%esp),%mm6 - movq %mm4,%mm1 - movq -40(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,8(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,40(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 32(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq (%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 48(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 8(%esp),%mm5 - paddq %mm6,%mm0 - movq 16(%esp),%mm6 - movdqa %xmm7,-48(%edx) - movdqa %xmm3,%xmm1 - movdqa %xmm0,%xmm7 -.byte 102,15,58,15,198,8 - movdqa %xmm2,32(%edx) -.byte 102,15,58,15,202,8 - movdqa %xmm0,%xmm2 - psrlq $7,%xmm0 - paddq %xmm1,%xmm6 - movdqa %xmm2,%xmm1 - psrlq $1,%xmm2 - psllq $56,%xmm1 - pxor %xmm2,%xmm0 - psrlq $7,%xmm2 - pxor %xmm1,%xmm0 - psllq $7,%xmm1 - pxor %xmm2,%xmm0 - movdqa %xmm5,%xmm2 - pxor %xmm1,%xmm0 - movdqa %xmm5,%xmm1 - psrlq $6,%xmm2 - paddq %xmm0,%xmm6 - movdqa %xmm5,%xmm0 - psrlq $19,%xmm1 - psllq $3,%xmm0 - pxor %xmm1,%xmm2 - psrlq $42,%xmm1 - pxor %xmm0,%xmm2 - psllq $42,%xmm0 - pxor %xmm1,%xmm2 - movdqa (%edx),%xmm1 - pxor %xmm0,%xmm2 - movdqa 96(%ebp),%xmm0 - movq %mm4,%mm1 - paddq %xmm2,%xmm6 - movq -32(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,(%esp) - paddq %xmm6,%xmm0 - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,32(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 24(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 56(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 40(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq (%esp),%mm5 - paddq %mm6,%mm2 - movq 8(%esp),%mm6 - movq %mm4,%mm1 - movq -24(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,56(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,24(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 16(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 48(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 32(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 56(%esp),%mm5 - paddq %mm6,%mm0 - movq (%esp),%mm6 - movdqa %xmm0,-32(%edx) - movdqa %xmm4,%xmm2 - movdqa %xmm1,%xmm0 -.byte 102,15,58,15,207,8 - movdqa %xmm3,48(%edx) -.byte 102,15,58,15,211,8 - movdqa %xmm1,%xmm3 - psrlq $7,%xmm1 - paddq %xmm2,%xmm7 - movdqa %xmm3,%xmm2 - psrlq $1,%xmm3 - psllq $56,%xmm2 - pxor %xmm3,%xmm1 - psrlq $7,%xmm3 - pxor %xmm2,%xmm1 - psllq $7,%xmm2 - pxor %xmm3,%xmm1 - movdqa %xmm6,%xmm3 - pxor %xmm2,%xmm1 - movdqa %xmm6,%xmm2 - psrlq $6,%xmm3 - paddq %xmm1,%xmm7 - movdqa %xmm6,%xmm1 - psrlq $19,%xmm2 - psllq $3,%xmm1 - pxor %xmm2,%xmm3 - psrlq $42,%xmm2 - pxor %xmm1,%xmm3 - psllq $42,%xmm1 - pxor %xmm2,%xmm3 - movdqa 16(%edx),%xmm2 - pxor %xmm1,%xmm3 - movdqa 112(%ebp),%xmm1 - movq %mm4,%mm1 - paddq %xmm3,%xmm7 - movq -16(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,48(%esp) - paddq %xmm7,%xmm1 - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,16(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 8(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 40(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 24(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 48(%esp),%mm5 - paddq %mm6,%mm2 - movq 56(%esp),%mm6 - movq %mm4,%mm1 - movq -8(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,40(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,8(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq (%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 32(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 16(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 40(%esp),%mm5 - paddq %mm6,%mm0 - movq 48(%esp),%mm6 - movdqa %xmm1,-16(%edx) - leal 128(%ebp),%ebp - decl %ecx - jnz .L00800_47_ssse3 - movdqa (%ebp),%xmm1 - leal -640(%ebp),%ebp - movdqu (%ebx),%xmm0 -.byte 102,15,56,0,193 - movdqa (%ebp),%xmm3 - movdqa %xmm1,%xmm2 - movdqu 16(%ebx),%xmm1 - paddq %xmm0,%xmm3 -.byte 102,15,56,0,202 - movq %mm4,%mm1 - movq -128(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,32(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 56(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 24(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 8(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 32(%esp),%mm5 - paddq %mm6,%mm2 - movq 40(%esp),%mm6 - movq %mm4,%mm1 - movq -120(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,24(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,56(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 48(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 16(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq (%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 24(%esp),%mm5 - paddq %mm6,%mm0 - movq 32(%esp),%mm6 - movdqa %xmm3,-128(%edx) - movdqa 16(%ebp),%xmm4 - movdqa %xmm2,%xmm3 - movdqu 32(%ebx),%xmm2 - paddq %xmm1,%xmm4 -.byte 102,15,56,0,211 - movq %mm4,%mm1 - movq -112(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,16(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,48(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 40(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 8(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 56(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 16(%esp),%mm5 - paddq %mm6,%mm2 - movq 24(%esp),%mm6 - movq %mm4,%mm1 - movq -104(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,8(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,40(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 32(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq (%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 48(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 8(%esp),%mm5 - paddq %mm6,%mm0 - movq 16(%esp),%mm6 - movdqa %xmm4,-112(%edx) - movdqa 32(%ebp),%xmm5 - movdqa %xmm3,%xmm4 - movdqu 48(%ebx),%xmm3 - paddq %xmm2,%xmm5 -.byte 102,15,56,0,220 - movq %mm4,%mm1 - movq -96(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,32(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 24(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 56(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 40(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq (%esp),%mm5 - paddq %mm6,%mm2 - movq 8(%esp),%mm6 - movq %mm4,%mm1 - movq -88(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,56(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,24(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 16(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 48(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 32(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 56(%esp),%mm5 - paddq %mm6,%mm0 - movq (%esp),%mm6 - movdqa %xmm5,-96(%edx) - movdqa 48(%ebp),%xmm6 - movdqa %xmm4,%xmm5 - movdqu 64(%ebx),%xmm4 - paddq %xmm3,%xmm6 -.byte 102,15,56,0,229 - movq %mm4,%mm1 - movq -80(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,48(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,16(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 8(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 40(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 24(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 48(%esp),%mm5 - paddq %mm6,%mm2 - movq 56(%esp),%mm6 - movq %mm4,%mm1 - movq -72(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,40(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,8(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq (%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 32(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 16(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 40(%esp),%mm5 - paddq %mm6,%mm0 - movq 48(%esp),%mm6 - movdqa %xmm6,-80(%edx) - movdqa 64(%ebp),%xmm7 - movdqa %xmm5,%xmm6 - movdqu 80(%ebx),%xmm5 - paddq %xmm4,%xmm7 -.byte 102,15,56,0,238 - movq %mm4,%mm1 - movq -64(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,32(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 56(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 24(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 8(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 32(%esp),%mm5 - paddq %mm6,%mm2 - movq 40(%esp),%mm6 - movq %mm4,%mm1 - movq -56(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,24(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,56(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 48(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 16(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq (%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 24(%esp),%mm5 - paddq %mm6,%mm0 - movq 32(%esp),%mm6 - movdqa %xmm7,-64(%edx) - movdqa %xmm0,(%edx) - movdqa 80(%ebp),%xmm0 - movdqa %xmm6,%xmm7 - movdqu 96(%ebx),%xmm6 - paddq %xmm5,%xmm0 -.byte 102,15,56,0,247 - movq %mm4,%mm1 - movq -48(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,16(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,48(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 40(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 8(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 56(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 16(%esp),%mm5 - paddq %mm6,%mm2 - movq 24(%esp),%mm6 - movq %mm4,%mm1 - movq -40(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,8(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,40(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 32(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq (%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 48(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 8(%esp),%mm5 - paddq %mm6,%mm0 - movq 16(%esp),%mm6 - movdqa %xmm0,-48(%edx) - movdqa %xmm1,16(%edx) - movdqa 96(%ebp),%xmm1 - movdqa %xmm7,%xmm0 - movdqu 112(%ebx),%xmm7 - paddq %xmm6,%xmm1 -.byte 102,15,56,0,248 - movq %mm4,%mm1 - movq -32(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,32(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 24(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 56(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 40(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq (%esp),%mm5 - paddq %mm6,%mm2 - movq 8(%esp),%mm6 - movq %mm4,%mm1 - movq -24(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,56(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,24(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 16(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 48(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 32(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 56(%esp),%mm5 - paddq %mm6,%mm0 - movq (%esp),%mm6 - movdqa %xmm1,-32(%edx) - movdqa %xmm2,32(%edx) - movdqa 112(%ebp),%xmm2 - movdqa (%edx),%xmm0 - paddq %xmm7,%xmm2 - movq %mm4,%mm1 - movq -16(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,48(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,16(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 8(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 40(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 24(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 48(%esp),%mm5 - paddq %mm6,%mm2 - movq 56(%esp),%mm6 - movq %mm4,%mm1 - movq -8(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,40(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,8(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq (%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 32(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 16(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 40(%esp),%mm5 - paddq %mm6,%mm0 - movq 48(%esp),%mm6 - movdqa %xmm2,-16(%edx) - movq 8(%esp),%mm1 - paddq %mm3,%mm0 - movq 24(%esp),%mm3 - movq 56(%esp),%mm7 - pxor %mm1,%mm2 - paddq (%esi),%mm0 - paddq 8(%esi),%mm1 - paddq 16(%esi),%mm2 - paddq 24(%esi),%mm3 - paddq 32(%esi),%mm4 - paddq 40(%esi),%mm5 - paddq 48(%esi),%mm6 - paddq 56(%esi),%mm7 - movq %mm0,(%esi) - movq %mm1,8(%esi) - movq %mm2,16(%esi) - movq %mm3,24(%esi) - movq %mm4,32(%esi) - movq %mm5,40(%esi) - movq %mm6,48(%esi) - movq %mm7,56(%esi) - cmpl %eax,%edi - jb .L007loop_ssse3 - movl 76(%edx),%esp - emms - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.align 16 -.L002loop_x86: - movl (%edi),%eax - movl 4(%edi),%ebx - movl 8(%edi),%ecx - movl 12(%edi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - movl 16(%edi),%eax - movl 20(%edi),%ebx - movl 24(%edi),%ecx - movl 28(%edi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - movl 32(%edi),%eax - movl 36(%edi),%ebx - movl 40(%edi),%ecx - movl 44(%edi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - movl 48(%edi),%eax - movl 52(%edi),%ebx - movl 56(%edi),%ecx - movl 60(%edi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - movl 64(%edi),%eax - movl 68(%edi),%ebx - movl 72(%edi),%ecx - movl 76(%edi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - movl 80(%edi),%eax - movl 84(%edi),%ebx - movl 88(%edi),%ecx - movl 92(%edi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - movl 96(%edi),%eax - movl 100(%edi),%ebx - movl 104(%edi),%ecx - movl 108(%edi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - movl 112(%edi),%eax - movl 116(%edi),%ebx - movl 120(%edi),%ecx - movl 124(%edi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - addl $128,%edi - subl $72,%esp - movl %edi,204(%esp) - leal 8(%esp),%edi - movl $16,%ecx -.long 2784229001 -.align 16 -.L00900_15_x86: - movl 40(%esp),%ecx - movl 44(%esp),%edx - movl %ecx,%esi - shrl $9,%ecx - movl %edx,%edi - shrl $9,%edx - movl %ecx,%ebx - shll $14,%esi - movl %edx,%eax - shll $14,%edi - xorl %esi,%ebx - shrl $5,%ecx - xorl %edi,%eax - shrl $5,%edx - xorl %ecx,%eax - shll $4,%esi - xorl %edx,%ebx - shll $4,%edi - xorl %esi,%ebx - shrl $4,%ecx - xorl %edi,%eax - shrl $4,%edx - xorl %ecx,%eax - shll $5,%esi - xorl %edx,%ebx - shll $5,%edi - xorl %esi,%eax - xorl %edi,%ebx - movl 48(%esp),%ecx - movl 52(%esp),%edx - movl 56(%esp),%esi - movl 60(%esp),%edi - addl 64(%esp),%eax - adcl 68(%esp),%ebx - xorl %esi,%ecx - xorl %edi,%edx - andl 40(%esp),%ecx - andl 44(%esp),%edx - addl 192(%esp),%eax - adcl 196(%esp),%ebx - xorl %esi,%ecx - xorl %edi,%edx - movl (%ebp),%esi - movl 4(%ebp),%edi - addl %ecx,%eax - adcl %edx,%ebx - movl 32(%esp),%ecx - movl 36(%esp),%edx - addl %esi,%eax - adcl %edi,%ebx - movl %eax,(%esp) - movl %ebx,4(%esp) - addl %ecx,%eax - adcl %edx,%ebx - movl 8(%esp),%ecx - movl 12(%esp),%edx - movl %eax,32(%esp) - movl %ebx,36(%esp) - movl %ecx,%esi - shrl $2,%ecx - movl %edx,%edi - shrl $2,%edx - movl %ecx,%ebx - shll $4,%esi - movl %edx,%eax - shll $4,%edi - xorl %esi,%ebx - shrl $5,%ecx - xorl %edi,%eax - shrl $5,%edx - xorl %ecx,%ebx - shll $21,%esi - xorl %edx,%eax - shll $21,%edi - xorl %esi,%eax - shrl $21,%ecx - xorl %edi,%ebx - shrl $21,%edx - xorl %ecx,%eax - shll $5,%esi - xorl %edx,%ebx - shll $5,%edi - xorl %esi,%eax - xorl %edi,%ebx - movl 8(%esp),%ecx - movl 12(%esp),%edx - movl 16(%esp),%esi - movl 20(%esp),%edi - addl (%esp),%eax - adcl 4(%esp),%ebx - orl %esi,%ecx - orl %edi,%edx - andl 24(%esp),%ecx - andl 28(%esp),%edx - andl 8(%esp),%esi - andl 12(%esp),%edi - orl %esi,%ecx - orl %edi,%edx - addl %ecx,%eax - adcl %edx,%ebx - movl %eax,(%esp) - movl %ebx,4(%esp) - movb (%ebp),%dl - subl $8,%esp - leal 8(%ebp),%ebp - cmpb $148,%dl - jne .L00900_15_x86 -.align 16 -.L01016_79_x86: - movl 312(%esp),%ecx - movl 316(%esp),%edx - movl %ecx,%esi - shrl $1,%ecx - movl %edx,%edi - shrl $1,%edx - movl %ecx,%eax - shll $24,%esi - movl %edx,%ebx - shll $24,%edi - xorl %esi,%ebx - shrl $6,%ecx - xorl %edi,%eax - shrl $6,%edx - xorl %ecx,%eax - shll $7,%esi - xorl %edx,%ebx - shll $1,%edi - xorl %esi,%ebx - shrl $1,%ecx - xorl %edi,%eax - shrl $1,%edx - xorl %ecx,%eax - shll $6,%edi - xorl %edx,%ebx - xorl %edi,%eax - movl %eax,(%esp) - movl %ebx,4(%esp) - movl 208(%esp),%ecx - movl 212(%esp),%edx - movl %ecx,%esi - shrl $6,%ecx - movl %edx,%edi - shrl $6,%edx - movl %ecx,%eax - shll $3,%esi - movl %edx,%ebx - shll $3,%edi - xorl %esi,%eax - shrl $13,%ecx - xorl %edi,%ebx - shrl $13,%edx - xorl %ecx,%eax - shll $10,%esi - xorl %edx,%ebx - shll $10,%edi - xorl %esi,%ebx - shrl $10,%ecx - xorl %edi,%eax - shrl $10,%edx - xorl %ecx,%ebx - shll $13,%edi - xorl %edx,%eax - xorl %edi,%eax - movl 320(%esp),%ecx - movl 324(%esp),%edx - addl (%esp),%eax - adcl 4(%esp),%ebx - movl 248(%esp),%esi - movl 252(%esp),%edi - addl %ecx,%eax - adcl %edx,%ebx - addl %esi,%eax - adcl %edi,%ebx - movl %eax,192(%esp) - movl %ebx,196(%esp) - movl 40(%esp),%ecx - movl 44(%esp),%edx - movl %ecx,%esi - shrl $9,%ecx - movl %edx,%edi - shrl $9,%edx - movl %ecx,%ebx - shll $14,%esi - movl %edx,%eax - shll $14,%edi - xorl %esi,%ebx - shrl $5,%ecx - xorl %edi,%eax - shrl $5,%edx - xorl %ecx,%eax - shll $4,%esi - xorl %edx,%ebx - shll $4,%edi - xorl %esi,%ebx - shrl $4,%ecx - xorl %edi,%eax - shrl $4,%edx - xorl %ecx,%eax - shll $5,%esi - xorl %edx,%ebx - shll $5,%edi - xorl %esi,%eax - xorl %edi,%ebx - movl 48(%esp),%ecx - movl 52(%esp),%edx - movl 56(%esp),%esi - movl 60(%esp),%edi - addl 64(%esp),%eax - adcl 68(%esp),%ebx - xorl %esi,%ecx - xorl %edi,%edx - andl 40(%esp),%ecx - andl 44(%esp),%edx - addl 192(%esp),%eax - adcl 196(%esp),%ebx - xorl %esi,%ecx - xorl %edi,%edx - movl (%ebp),%esi - movl 4(%ebp),%edi - addl %ecx,%eax - adcl %edx,%ebx - movl 32(%esp),%ecx - movl 36(%esp),%edx - addl %esi,%eax - adcl %edi,%ebx - movl %eax,(%esp) - movl %ebx,4(%esp) - addl %ecx,%eax - adcl %edx,%ebx - movl 8(%esp),%ecx - movl 12(%esp),%edx - movl %eax,32(%esp) - movl %ebx,36(%esp) - movl %ecx,%esi - shrl $2,%ecx - movl %edx,%edi - shrl $2,%edx - movl %ecx,%ebx - shll $4,%esi - movl %edx,%eax - shll $4,%edi - xorl %esi,%ebx - shrl $5,%ecx - xorl %edi,%eax - shrl $5,%edx - xorl %ecx,%ebx - shll $21,%esi - xorl %edx,%eax - shll $21,%edi - xorl %esi,%eax - shrl $21,%ecx - xorl %edi,%ebx - shrl $21,%edx - xorl %ecx,%eax - shll $5,%esi - xorl %edx,%ebx - shll $5,%edi - xorl %esi,%eax - xorl %edi,%ebx - movl 8(%esp),%ecx - movl 12(%esp),%edx - movl 16(%esp),%esi - movl 20(%esp),%edi - addl (%esp),%eax - adcl 4(%esp),%ebx - orl %esi,%ecx - orl %edi,%edx - andl 24(%esp),%ecx - andl 28(%esp),%edx - andl 8(%esp),%esi - andl 12(%esp),%edi - orl %esi,%ecx - orl %edi,%edx - addl %ecx,%eax - adcl %edx,%ebx - movl %eax,(%esp) - movl %ebx,4(%esp) - movb (%ebp),%dl - subl $8,%esp - leal 8(%ebp),%ebp - cmpb $23,%dl - jne .L01016_79_x86 - movl 840(%esp),%esi - movl 844(%esp),%edi - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - addl 8(%esp),%eax - adcl 12(%esp),%ebx - movl %eax,(%esi) - movl %ebx,4(%esi) - addl 16(%esp),%ecx - adcl 20(%esp),%edx - movl %ecx,8(%esi) - movl %edx,12(%esi) - movl 16(%esi),%eax - movl 20(%esi),%ebx - movl 24(%esi),%ecx - movl 28(%esi),%edx - addl 24(%esp),%eax - adcl 28(%esp),%ebx - movl %eax,16(%esi) - movl %ebx,20(%esi) - addl 32(%esp),%ecx - adcl 36(%esp),%edx - movl %ecx,24(%esi) - movl %edx,28(%esi) - movl 32(%esi),%eax - movl 36(%esi),%ebx - movl 40(%esi),%ecx - movl 44(%esi),%edx - addl 40(%esp),%eax - adcl 44(%esp),%ebx - movl %eax,32(%esi) - movl %ebx,36(%esi) - addl 48(%esp),%ecx - adcl 52(%esp),%edx - movl %ecx,40(%esi) - movl %edx,44(%esi) - movl 48(%esi),%eax - movl 52(%esi),%ebx - movl 56(%esi),%ecx - movl 60(%esi),%edx - addl 56(%esp),%eax - adcl 60(%esp),%ebx - movl %eax,48(%esi) - movl %ebx,52(%esi) - addl 64(%esp),%ecx - adcl 68(%esp),%edx - movl %ecx,56(%esi) - movl %edx,60(%esi) - addl $840,%esp - subl $640,%ebp - cmpl 8(%esp),%edi - jb .L002loop_x86 - movl 12(%esp),%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.align 64 -.L001K512: -.long 3609767458,1116352408 -.long 602891725,1899447441 -.long 3964484399,3049323471 -.long 2173295548,3921009573 -.long 4081628472,961987163 -.long 3053834265,1508970993 -.long 2937671579,2453635748 -.long 3664609560,2870763221 -.long 2734883394,3624381080 -.long 1164996542,310598401 -.long 1323610764,607225278 -.long 3590304994,1426881987 -.long 4068182383,1925078388 -.long 991336113,2162078206 -.long 633803317,2614888103 -.long 3479774868,3248222580 -.long 2666613458,3835390401 -.long 944711139,4022224774 -.long 2341262773,264347078 -.long 2007800933,604807628 -.long 1495990901,770255983 -.long 1856431235,1249150122 -.long 3175218132,1555081692 -.long 2198950837,1996064986 -.long 3999719339,2554220882 -.long 766784016,2821834349 -.long 2566594879,2952996808 -.long 3203337956,3210313671 -.long 1034457026,3336571891 -.long 2466948901,3584528711 -.long 3758326383,113926993 -.long 168717936,338241895 -.long 1188179964,666307205 -.long 1546045734,773529912 -.long 1522805485,1294757372 -.long 2643833823,1396182291 -.long 2343527390,1695183700 -.long 1014477480,1986661051 -.long 1206759142,2177026350 -.long 344077627,2456956037 -.long 1290863460,2730485921 -.long 3158454273,2820302411 -.long 3505952657,3259730800 -.long 106217008,3345764771 -.long 3606008344,3516065817 -.long 1432725776,3600352804 -.long 1467031594,4094571909 -.long 851169720,275423344 -.long 3100823752,430227734 -.long 1363258195,506948616 -.long 3750685593,659060556 -.long 3785050280,883997877 -.long 3318307427,958139571 -.long 3812723403,1322822218 -.long 2003034995,1537002063 -.long 3602036899,1747873779 -.long 1575990012,1955562222 -.long 1125592928,2024104815 -.long 2716904306,2227730452 -.long 442776044,2361852424 -.long 593698344,2428436474 -.long 3733110249,2756734187 -.long 2999351573,3204031479 -.long 3815920427,3329325298 -.long 3928383900,3391569614 -.long 566280711,3515267271 -.long 3454069534,3940187606 -.long 4000239992,4118630271 -.long 1914138554,116418474 -.long 2731055270,174292421 -.long 3203993006,289380356 -.long 320620315,460393269 -.long 587496836,685471733 -.long 1086792851,852142971 -.long 365543100,1017036298 -.long 2618297676,1126000580 -.long 3409855158,1288033470 -.long 4234509866,1501505948 -.long 987167468,1607167915 -.long 1246189591,1816402316 -.long 67438087,66051 -.long 202182159,134810123 -.size sha512_block_data_order,.-.L_sha512_block_data_order_begin -.byte 83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97 -.byte 110,115,102,111,114,109,32,102,111,114,32,120,56,54,44,32 -.byte 67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97 -.byte 112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103 -.byte 62,0 -#endif diff --git a/third_party/boringssl/linux-x86_64/crypto/aes/aes-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/aes/aes-x86_64.S deleted file mode 100644 index 5f4b057ffad4a..0000000000000 --- a/third_party/boringssl/linux-x86_64/crypto/aes/aes-x86_64.S +++ /dev/null @@ -1,2536 +0,0 @@ -#if defined(__x86_64__) -.text -.type _x86_64_AES_encrypt,@function -.align 16 -_x86_64_AES_encrypt: - xorl 0(%r15),%eax - xorl 4(%r15),%ebx - xorl 8(%r15),%ecx - xorl 12(%r15),%edx - - movl 240(%r15),%r13d - subl $1,%r13d - jmp .Lenc_loop -.align 16 -.Lenc_loop: - - movzbl %al,%esi - movzbl %bl,%edi - movzbl %cl,%ebp - movl 0(%r14,%rsi,8),%r10d - movl 0(%r14,%rdi,8),%r11d - movl 0(%r14,%rbp,8),%r12d - - movzbl %bh,%esi - movzbl %ch,%edi - movzbl %dl,%ebp - xorl 3(%r14,%rsi,8),%r10d - xorl 3(%r14,%rdi,8),%r11d - movl 0(%r14,%rbp,8),%r8d - - movzbl %dh,%esi - shrl $16,%ecx - movzbl %ah,%ebp - xorl 3(%r14,%rsi,8),%r12d - shrl $16,%edx - xorl 3(%r14,%rbp,8),%r8d - - shrl $16,%ebx - leaq 16(%r15),%r15 - shrl $16,%eax - - movzbl %cl,%esi - movzbl %dl,%edi - movzbl %al,%ebp - xorl 2(%r14,%rsi,8),%r10d - xorl 2(%r14,%rdi,8),%r11d - xorl 2(%r14,%rbp,8),%r12d - - movzbl %dh,%esi - movzbl %ah,%edi - movzbl %bl,%ebp - xorl 1(%r14,%rsi,8),%r10d - xorl 1(%r14,%rdi,8),%r11d - xorl 2(%r14,%rbp,8),%r8d - - movl 12(%r15),%edx - movzbl %bh,%edi - movzbl %ch,%ebp - movl 0(%r15),%eax - xorl 1(%r14,%rdi,8),%r12d - xorl 1(%r14,%rbp,8),%r8d - - movl 4(%r15),%ebx - movl 8(%r15),%ecx - xorl %r10d,%eax - xorl %r11d,%ebx - xorl %r12d,%ecx - xorl %r8d,%edx - subl $1,%r13d - jnz .Lenc_loop - movzbl %al,%esi - movzbl %bl,%edi - movzbl %cl,%ebp - movzbl 2(%r14,%rsi,8),%r10d - movzbl 2(%r14,%rdi,8),%r11d - movzbl 2(%r14,%rbp,8),%r12d - - movzbl %dl,%esi - movzbl %bh,%edi - movzbl %ch,%ebp - movzbl 2(%r14,%rsi,8),%r8d - movl 0(%r14,%rdi,8),%edi - movl 0(%r14,%rbp,8),%ebp - - andl $65280,%edi - andl $65280,%ebp - - xorl %edi,%r10d - xorl %ebp,%r11d - shrl $16,%ecx - - movzbl %dh,%esi - movzbl %ah,%edi - shrl $16,%edx - movl 0(%r14,%rsi,8),%esi - movl 0(%r14,%rdi,8),%edi - - andl $65280,%esi - andl $65280,%edi - shrl $16,%ebx - xorl %esi,%r12d - xorl %edi,%r8d - shrl $16,%eax - - movzbl %cl,%esi - movzbl %dl,%edi - movzbl %al,%ebp - movl 0(%r14,%rsi,8),%esi - movl 0(%r14,%rdi,8),%edi - movl 0(%r14,%rbp,8),%ebp - - andl $16711680,%esi - andl $16711680,%edi - andl $16711680,%ebp - - xorl %esi,%r10d - xorl %edi,%r11d - xorl %ebp,%r12d - - movzbl %bl,%esi - movzbl %dh,%edi - movzbl %ah,%ebp - movl 0(%r14,%rsi,8),%esi - movl 2(%r14,%rdi,8),%edi - movl 2(%r14,%rbp,8),%ebp - - andl $16711680,%esi - andl $4278190080,%edi - andl $4278190080,%ebp - - xorl %esi,%r8d - xorl %edi,%r10d - xorl %ebp,%r11d - - movzbl %bh,%esi - movzbl %ch,%edi - movl 16+12(%r15),%edx - movl 2(%r14,%rsi,8),%esi - movl 2(%r14,%rdi,8),%edi - movl 16+0(%r15),%eax - - andl $4278190080,%esi - andl $4278190080,%edi - - xorl %esi,%r12d - xorl %edi,%r8d - - movl 16+4(%r15),%ebx - movl 16+8(%r15),%ecx - xorl %r10d,%eax - xorl %r11d,%ebx - xorl %r12d,%ecx - xorl %r8d,%edx -.byte 0xf3,0xc3 -.size _x86_64_AES_encrypt,.-_x86_64_AES_encrypt -.type _x86_64_AES_encrypt_compact,@function -.align 16 -_x86_64_AES_encrypt_compact: - leaq 128(%r14),%r8 - movl 0-128(%r8),%edi - movl 32-128(%r8),%ebp - movl 64-128(%r8),%r10d - movl 96-128(%r8),%r11d - movl 128-128(%r8),%edi - movl 160-128(%r8),%ebp - movl 192-128(%r8),%r10d - movl 224-128(%r8),%r11d - jmp .Lenc_loop_compact -.align 16 -.Lenc_loop_compact: - xorl 0(%r15),%eax - xorl 4(%r15),%ebx - xorl 8(%r15),%ecx - xorl 12(%r15),%edx - leaq 16(%r15),%r15 - movzbl %al,%r10d - movzbl %bl,%r11d - movzbl %cl,%r12d - movzbl %dl,%r8d - movzbl %bh,%esi - movzbl %ch,%edi - shrl $16,%ecx - movzbl %dh,%ebp - movzbl (%r14,%r10,1),%r10d - movzbl (%r14,%r11,1),%r11d - movzbl (%r14,%r12,1),%r12d - movzbl (%r14,%r8,1),%r8d - - movzbl (%r14,%rsi,1),%r9d - movzbl %ah,%esi - movzbl (%r14,%rdi,1),%r13d - movzbl %cl,%edi - movzbl (%r14,%rbp,1),%ebp - movzbl (%r14,%rsi,1),%esi - - shll $8,%r9d - shrl $16,%edx - shll $8,%r13d - xorl %r9d,%r10d - shrl $16,%eax - movzbl %dl,%r9d - shrl $16,%ebx - xorl %r13d,%r11d - shll $8,%ebp - movzbl %al,%r13d - movzbl (%r14,%rdi,1),%edi - xorl %ebp,%r12d - - shll $8,%esi - movzbl %bl,%ebp - shll $16,%edi - xorl %esi,%r8d - movzbl (%r14,%r9,1),%r9d - movzbl %dh,%esi - movzbl (%r14,%r13,1),%r13d - xorl %edi,%r10d - - shrl $8,%ecx - movzbl %ah,%edi - shll $16,%r9d - shrl $8,%ebx - shll $16,%r13d - xorl %r9d,%r11d - movzbl (%r14,%rbp,1),%ebp - movzbl (%r14,%rsi,1),%esi - movzbl (%r14,%rdi,1),%edi - movzbl (%r14,%rcx,1),%edx - movzbl (%r14,%rbx,1),%ecx - - shll $16,%ebp - xorl %r13d,%r12d - shll $24,%esi - xorl %ebp,%r8d - shll $24,%edi - xorl %esi,%r10d - shll $24,%edx - xorl %edi,%r11d - shll $24,%ecx - movl %r10d,%eax - movl %r11d,%ebx - xorl %r12d,%ecx - xorl %r8d,%edx - cmpq 16(%rsp),%r15 - je .Lenc_compact_done - movl $2155905152,%r10d - movl $2155905152,%r11d - andl %eax,%r10d - andl %ebx,%r11d - movl %r10d,%esi - movl %r11d,%edi - shrl $7,%r10d - leal (%rax,%rax,1),%r8d - shrl $7,%r11d - leal (%rbx,%rbx,1),%r9d - subl %r10d,%esi - subl %r11d,%edi - andl $4278124286,%r8d - andl $4278124286,%r9d - andl $454761243,%esi - andl $454761243,%edi - movl %eax,%r10d - movl %ebx,%r11d - xorl %esi,%r8d - xorl %edi,%r9d - - xorl %r8d,%eax - xorl %r9d,%ebx - movl $2155905152,%r12d - roll $24,%eax - movl $2155905152,%ebp - roll $24,%ebx - andl %ecx,%r12d - andl %edx,%ebp - xorl %r8d,%eax - xorl %r9d,%ebx - movl %r12d,%esi - rorl $16,%r10d - movl %ebp,%edi - rorl $16,%r11d - leal (%rcx,%rcx,1),%r8d - shrl $7,%r12d - xorl %r10d,%eax - shrl $7,%ebp - xorl %r11d,%ebx - rorl $8,%r10d - leal (%rdx,%rdx,1),%r9d - rorl $8,%r11d - subl %r12d,%esi - subl %ebp,%edi - xorl %r10d,%eax - xorl %r11d,%ebx - - andl $4278124286,%r8d - andl $4278124286,%r9d - andl $454761243,%esi - andl $454761243,%edi - movl %ecx,%r12d - movl %edx,%ebp - xorl %esi,%r8d - xorl %edi,%r9d - - rorl $16,%r12d - xorl %r8d,%ecx - rorl $16,%ebp - xorl %r9d,%edx - roll $24,%ecx - movl 0(%r14),%esi - roll $24,%edx - xorl %r8d,%ecx - movl 64(%r14),%edi - xorl %r9d,%edx - movl 128(%r14),%r8d - xorl %r12d,%ecx - rorl $8,%r12d - xorl %ebp,%edx - rorl $8,%ebp - xorl %r12d,%ecx - movl 192(%r14),%r9d - xorl %ebp,%edx - jmp .Lenc_loop_compact -.align 16 -.Lenc_compact_done: - xorl 0(%r15),%eax - xorl 4(%r15),%ebx - xorl 8(%r15),%ecx - xorl 12(%r15),%edx -.byte 0xf3,0xc3 -.size _x86_64_AES_encrypt_compact,.-_x86_64_AES_encrypt_compact -.align 16 -.globl asm_AES_encrypt -.hidden asm_AES_encrypt -.type asm_AES_encrypt,@function -.hidden asm_AES_encrypt -asm_AES_encrypt: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - - movq %rsp,%r10 - leaq -63(%rdx),%rcx - andq $-64,%rsp - subq %rsp,%rcx - negq %rcx - andq $960,%rcx - subq %rcx,%rsp - subq $32,%rsp - - movq %rsi,16(%rsp) - movq %r10,24(%rsp) -.Lenc_prologue: - - movq %rdx,%r15 - movl 240(%r15),%r13d - - movl 0(%rdi),%eax - movl 4(%rdi),%ebx - movl 8(%rdi),%ecx - movl 12(%rdi),%edx - - shll $4,%r13d - leaq (%r15,%r13,1),%rbp - movq %r15,(%rsp) - movq %rbp,8(%rsp) - - - leaq .LAES_Te+2048(%rip),%r14 - leaq 768(%rsp),%rbp - subq %r14,%rbp - andq $768,%rbp - leaq (%r14,%rbp,1),%r14 - - call _x86_64_AES_encrypt_compact - - movq 16(%rsp),%r9 - movq 24(%rsp),%rsi - movl %eax,0(%r9) - movl %ebx,4(%r9) - movl %ecx,8(%r9) - movl %edx,12(%r9) - - movq (%rsi),%r15 - movq 8(%rsi),%r14 - movq 16(%rsi),%r13 - movq 24(%rsi),%r12 - movq 32(%rsi),%rbp - movq 40(%rsi),%rbx - leaq 48(%rsi),%rsp -.Lenc_epilogue: - .byte 0xf3,0xc3 -.size asm_AES_encrypt,.-asm_AES_encrypt -.type _x86_64_AES_decrypt,@function -.align 16 -_x86_64_AES_decrypt: - xorl 0(%r15),%eax - xorl 4(%r15),%ebx - xorl 8(%r15),%ecx - xorl 12(%r15),%edx - - movl 240(%r15),%r13d - subl $1,%r13d - jmp .Ldec_loop -.align 16 -.Ldec_loop: - - movzbl %al,%esi - movzbl %bl,%edi - movzbl %cl,%ebp - movl 0(%r14,%rsi,8),%r10d - movl 0(%r14,%rdi,8),%r11d - movl 0(%r14,%rbp,8),%r12d - - movzbl %dh,%esi - movzbl %ah,%edi - movzbl %dl,%ebp - xorl 3(%r14,%rsi,8),%r10d - xorl 3(%r14,%rdi,8),%r11d - movl 0(%r14,%rbp,8),%r8d - - movzbl %bh,%esi - shrl $16,%eax - movzbl %ch,%ebp - xorl 3(%r14,%rsi,8),%r12d - shrl $16,%edx - xorl 3(%r14,%rbp,8),%r8d - - shrl $16,%ebx - leaq 16(%r15),%r15 - shrl $16,%ecx - - movzbl %cl,%esi - movzbl %dl,%edi - movzbl %al,%ebp - xorl 2(%r14,%rsi,8),%r10d - xorl 2(%r14,%rdi,8),%r11d - xorl 2(%r14,%rbp,8),%r12d - - movzbl %bh,%esi - movzbl %ch,%edi - movzbl %bl,%ebp - xorl 1(%r14,%rsi,8),%r10d - xorl 1(%r14,%rdi,8),%r11d - xorl 2(%r14,%rbp,8),%r8d - - movzbl %dh,%esi - movl 12(%r15),%edx - movzbl %ah,%ebp - xorl 1(%r14,%rsi,8),%r12d - movl 0(%r15),%eax - xorl 1(%r14,%rbp,8),%r8d - - xorl %r10d,%eax - movl 4(%r15),%ebx - movl 8(%r15),%ecx - xorl %r12d,%ecx - xorl %r11d,%ebx - xorl %r8d,%edx - subl $1,%r13d - jnz .Ldec_loop - leaq 2048(%r14),%r14 - movzbl %al,%esi - movzbl %bl,%edi - movzbl %cl,%ebp - movzbl (%r14,%rsi,1),%r10d - movzbl (%r14,%rdi,1),%r11d - movzbl (%r14,%rbp,1),%r12d - - movzbl %dl,%esi - movzbl %dh,%edi - movzbl %ah,%ebp - movzbl (%r14,%rsi,1),%r8d - movzbl (%r14,%rdi,1),%edi - movzbl (%r14,%rbp,1),%ebp - - shll $8,%edi - shll $8,%ebp - - xorl %edi,%r10d - xorl %ebp,%r11d - shrl $16,%edx - - movzbl %bh,%esi - movzbl %ch,%edi - shrl $16,%eax - movzbl (%r14,%rsi,1),%esi - movzbl (%r14,%rdi,1),%edi - - shll $8,%esi - shll $8,%edi - shrl $16,%ebx - xorl %esi,%r12d - xorl %edi,%r8d - shrl $16,%ecx - - movzbl %cl,%esi - movzbl %dl,%edi - movzbl %al,%ebp - movzbl (%r14,%rsi,1),%esi - movzbl (%r14,%rdi,1),%edi - movzbl (%r14,%rbp,1),%ebp - - shll $16,%esi - shll $16,%edi - shll $16,%ebp - - xorl %esi,%r10d - xorl %edi,%r11d - xorl %ebp,%r12d - - movzbl %bl,%esi - movzbl %bh,%edi - movzbl %ch,%ebp - movzbl (%r14,%rsi,1),%esi - movzbl (%r14,%rdi,1),%edi - movzbl (%r14,%rbp,1),%ebp - - shll $16,%esi - shll $24,%edi - shll $24,%ebp - - xorl %esi,%r8d - xorl %edi,%r10d - xorl %ebp,%r11d - - movzbl %dh,%esi - movzbl %ah,%edi - movl 16+12(%r15),%edx - movzbl (%r14,%rsi,1),%esi - movzbl (%r14,%rdi,1),%edi - movl 16+0(%r15),%eax - - shll $24,%esi - shll $24,%edi - - xorl %esi,%r12d - xorl %edi,%r8d - - movl 16+4(%r15),%ebx - movl 16+8(%r15),%ecx - leaq -2048(%r14),%r14 - xorl %r10d,%eax - xorl %r11d,%ebx - xorl %r12d,%ecx - xorl %r8d,%edx -.byte 0xf3,0xc3 -.size _x86_64_AES_decrypt,.-_x86_64_AES_decrypt -.type _x86_64_AES_decrypt_compact,@function -.align 16 -_x86_64_AES_decrypt_compact: - leaq 128(%r14),%r8 - movl 0-128(%r8),%edi - movl 32-128(%r8),%ebp - movl 64-128(%r8),%r10d - movl 96-128(%r8),%r11d - movl 128-128(%r8),%edi - movl 160-128(%r8),%ebp - movl 192-128(%r8),%r10d - movl 224-128(%r8),%r11d - jmp .Ldec_loop_compact - -.align 16 -.Ldec_loop_compact: - xorl 0(%r15),%eax - xorl 4(%r15),%ebx - xorl 8(%r15),%ecx - xorl 12(%r15),%edx - leaq 16(%r15),%r15 - movzbl %al,%r10d - movzbl %bl,%r11d - movzbl %cl,%r12d - movzbl %dl,%r8d - movzbl %dh,%esi - movzbl %ah,%edi - shrl $16,%edx - movzbl %bh,%ebp - movzbl (%r14,%r10,1),%r10d - movzbl (%r14,%r11,1),%r11d - movzbl (%r14,%r12,1),%r12d - movzbl (%r14,%r8,1),%r8d - - movzbl (%r14,%rsi,1),%r9d - movzbl %ch,%esi - movzbl (%r14,%rdi,1),%r13d - movzbl (%r14,%rbp,1),%ebp - movzbl (%r14,%rsi,1),%esi - - shrl $16,%ecx - shll $8,%r13d - shll $8,%r9d - movzbl %cl,%edi - shrl $16,%eax - xorl %r9d,%r10d - shrl $16,%ebx - movzbl %dl,%r9d - - shll $8,%ebp - xorl %r13d,%r11d - shll $8,%esi - movzbl %al,%r13d - movzbl (%r14,%rdi,1),%edi - xorl %ebp,%r12d - movzbl %bl,%ebp - - shll $16,%edi - xorl %esi,%r8d - movzbl (%r14,%r9,1),%r9d - movzbl %bh,%esi - movzbl (%r14,%rbp,1),%ebp - xorl %edi,%r10d - movzbl (%r14,%r13,1),%r13d - movzbl %ch,%edi - - shll $16,%ebp - shll $16,%r9d - shll $16,%r13d - xorl %ebp,%r8d - movzbl %dh,%ebp - xorl %r9d,%r11d - shrl $8,%eax - xorl %r13d,%r12d - - movzbl (%r14,%rsi,1),%esi - movzbl (%r14,%rdi,1),%ebx - movzbl (%r14,%rbp,1),%ecx - movzbl (%r14,%rax,1),%edx - - movl %r10d,%eax - shll $24,%esi - shll $24,%ebx - shll $24,%ecx - xorl %esi,%eax - shll $24,%edx - xorl %r11d,%ebx - xorl %r12d,%ecx - xorl %r8d,%edx - cmpq 16(%rsp),%r15 - je .Ldec_compact_done - - movq 256+0(%r14),%rsi - shlq $32,%rbx - shlq $32,%rdx - movq 256+8(%r14),%rdi - orq %rbx,%rax - orq %rdx,%rcx - movq 256+16(%r14),%rbp - movq %rsi,%r9 - movq %rsi,%r12 - andq %rax,%r9 - andq %rcx,%r12 - movq %r9,%rbx - movq %r12,%rdx - shrq $7,%r9 - leaq (%rax,%rax,1),%r8 - shrq $7,%r12 - leaq (%rcx,%rcx,1),%r11 - subq %r9,%rbx - subq %r12,%rdx - andq %rdi,%r8 - andq %rdi,%r11 - andq %rbp,%rbx - andq %rbp,%rdx - xorq %rbx,%r8 - xorq %rdx,%r11 - movq %rsi,%r10 - movq %rsi,%r13 - - andq %r8,%r10 - andq %r11,%r13 - movq %r10,%rbx - movq %r13,%rdx - shrq $7,%r10 - leaq (%r8,%r8,1),%r9 - shrq $7,%r13 - leaq (%r11,%r11,1),%r12 - subq %r10,%rbx - subq %r13,%rdx - andq %rdi,%r9 - andq %rdi,%r12 - andq %rbp,%rbx - andq %rbp,%rdx - xorq %rbx,%r9 - xorq %rdx,%r12 - movq %rsi,%r10 - movq %rsi,%r13 - - andq %r9,%r10 - andq %r12,%r13 - movq %r10,%rbx - movq %r13,%rdx - shrq $7,%r10 - xorq %rax,%r8 - shrq $7,%r13 - xorq %rcx,%r11 - subq %r10,%rbx - subq %r13,%rdx - leaq (%r9,%r9,1),%r10 - leaq (%r12,%r12,1),%r13 - xorq %rax,%r9 - xorq %rcx,%r12 - andq %rdi,%r10 - andq %rdi,%r13 - andq %rbp,%rbx - andq %rbp,%rdx - xorq %rbx,%r10 - xorq %rdx,%r13 - - xorq %r10,%rax - xorq %r13,%rcx - xorq %r10,%r8 - xorq %r13,%r11 - movq %rax,%rbx - movq %rcx,%rdx - xorq %r10,%r9 - shrq $32,%rbx - xorq %r13,%r12 - shrq $32,%rdx - xorq %r8,%r10 - roll $8,%eax - xorq %r11,%r13 - roll $8,%ecx - xorq %r9,%r10 - roll $8,%ebx - xorq %r12,%r13 - - roll $8,%edx - xorl %r10d,%eax - shrq $32,%r10 - xorl %r13d,%ecx - shrq $32,%r13 - xorl %r10d,%ebx - xorl %r13d,%edx - - movq %r8,%r10 - roll $24,%r8d - movq %r11,%r13 - roll $24,%r11d - shrq $32,%r10 - xorl %r8d,%eax - shrq $32,%r13 - xorl %r11d,%ecx - roll $24,%r10d - movq %r9,%r8 - roll $24,%r13d - movq %r12,%r11 - shrq $32,%r8 - xorl %r10d,%ebx - shrq $32,%r11 - xorl %r13d,%edx - - movq 0(%r14),%rsi - roll $16,%r9d - movq 64(%r14),%rdi - roll $16,%r12d - movq 128(%r14),%rbp - roll $16,%r8d - movq 192(%r14),%r10 - xorl %r9d,%eax - roll $16,%r11d - xorl %r12d,%ecx - movq 256(%r14),%r13 - xorl %r8d,%ebx - xorl %r11d,%edx - jmp .Ldec_loop_compact -.align 16 -.Ldec_compact_done: - xorl 0(%r15),%eax - xorl 4(%r15),%ebx - xorl 8(%r15),%ecx - xorl 12(%r15),%edx -.byte 0xf3,0xc3 -.size _x86_64_AES_decrypt_compact,.-_x86_64_AES_decrypt_compact -.align 16 -.globl asm_AES_decrypt -.hidden asm_AES_decrypt -.type asm_AES_decrypt,@function -.hidden asm_AES_decrypt -asm_AES_decrypt: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - - movq %rsp,%r10 - leaq -63(%rdx),%rcx - andq $-64,%rsp - subq %rsp,%rcx - negq %rcx - andq $960,%rcx - subq %rcx,%rsp - subq $32,%rsp - - movq %rsi,16(%rsp) - movq %r10,24(%rsp) -.Ldec_prologue: - - movq %rdx,%r15 - movl 240(%r15),%r13d - - movl 0(%rdi),%eax - movl 4(%rdi),%ebx - movl 8(%rdi),%ecx - movl 12(%rdi),%edx - - shll $4,%r13d - leaq (%r15,%r13,1),%rbp - movq %r15,(%rsp) - movq %rbp,8(%rsp) - - - leaq .LAES_Td+2048(%rip),%r14 - leaq 768(%rsp),%rbp - subq %r14,%rbp - andq $768,%rbp - leaq (%r14,%rbp,1),%r14 - shrq $3,%rbp - addq %rbp,%r14 - - call _x86_64_AES_decrypt_compact - - movq 16(%rsp),%r9 - movq 24(%rsp),%rsi - movl %eax,0(%r9) - movl %ebx,4(%r9) - movl %ecx,8(%r9) - movl %edx,12(%r9) - - movq (%rsi),%r15 - movq 8(%rsi),%r14 - movq 16(%rsi),%r13 - movq 24(%rsi),%r12 - movq 32(%rsi),%rbp - movq 40(%rsi),%rbx - leaq 48(%rsi),%rsp -.Ldec_epilogue: - .byte 0xf3,0xc3 -.size asm_AES_decrypt,.-asm_AES_decrypt -.align 16 -.globl asm_AES_set_encrypt_key -.hidden asm_AES_set_encrypt_key -.type asm_AES_set_encrypt_key,@function -asm_AES_set_encrypt_key: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - subq $8,%rsp -.Lenc_key_prologue: - - call _x86_64_AES_set_encrypt_key - - movq 40(%rsp),%rbp - movq 48(%rsp),%rbx - addq $56,%rsp -.Lenc_key_epilogue: - .byte 0xf3,0xc3 -.size asm_AES_set_encrypt_key,.-asm_AES_set_encrypt_key - -.type _x86_64_AES_set_encrypt_key,@function -.align 16 -_x86_64_AES_set_encrypt_key: - movl %esi,%ecx - movq %rdi,%rsi - movq %rdx,%rdi - - testq $-1,%rsi - jz .Lbadpointer - testq $-1,%rdi - jz .Lbadpointer - - leaq .LAES_Te(%rip),%rbp - leaq 2048+128(%rbp),%rbp - - - movl 0-128(%rbp),%eax - movl 32-128(%rbp),%ebx - movl 64-128(%rbp),%r8d - movl 96-128(%rbp),%edx - movl 128-128(%rbp),%eax - movl 160-128(%rbp),%ebx - movl 192-128(%rbp),%r8d - movl 224-128(%rbp),%edx - - cmpl $128,%ecx - je .L10rounds - cmpl $192,%ecx - je .L12rounds - cmpl $256,%ecx - je .L14rounds - movq $-2,%rax - jmp .Lexit - -.L10rounds: - movq 0(%rsi),%rax - movq 8(%rsi),%rdx - movq %rax,0(%rdi) - movq %rdx,8(%rdi) - - shrq $32,%rdx - xorl %ecx,%ecx - jmp .L10shortcut -.align 4 -.L10loop: - movl 0(%rdi),%eax - movl 12(%rdi),%edx -.L10shortcut: - movzbl %dl,%esi - movzbl -128(%rbp,%rsi,1),%ebx - movzbl %dh,%esi - shll $24,%ebx - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - shrl $16,%edx - movzbl %dl,%esi - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - movzbl %dh,%esi - shll $8,%ebx - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - shll $16,%ebx - xorl %ebx,%eax - - xorl 1024-128(%rbp,%rcx,4),%eax - movl %eax,16(%rdi) - xorl 4(%rdi),%eax - movl %eax,20(%rdi) - xorl 8(%rdi),%eax - movl %eax,24(%rdi) - xorl 12(%rdi),%eax - movl %eax,28(%rdi) - addl $1,%ecx - leaq 16(%rdi),%rdi - cmpl $10,%ecx - jl .L10loop - - movl $10,80(%rdi) - xorq %rax,%rax - jmp .Lexit - -.L12rounds: - movq 0(%rsi),%rax - movq 8(%rsi),%rbx - movq 16(%rsi),%rdx - movq %rax,0(%rdi) - movq %rbx,8(%rdi) - movq %rdx,16(%rdi) - - shrq $32,%rdx - xorl %ecx,%ecx - jmp .L12shortcut -.align 4 -.L12loop: - movl 0(%rdi),%eax - movl 20(%rdi),%edx -.L12shortcut: - movzbl %dl,%esi - movzbl -128(%rbp,%rsi,1),%ebx - movzbl %dh,%esi - shll $24,%ebx - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - shrl $16,%edx - movzbl %dl,%esi - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - movzbl %dh,%esi - shll $8,%ebx - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - shll $16,%ebx - xorl %ebx,%eax - - xorl 1024-128(%rbp,%rcx,4),%eax - movl %eax,24(%rdi) - xorl 4(%rdi),%eax - movl %eax,28(%rdi) - xorl 8(%rdi),%eax - movl %eax,32(%rdi) - xorl 12(%rdi),%eax - movl %eax,36(%rdi) - - cmpl $7,%ecx - je .L12break - addl $1,%ecx - - xorl 16(%rdi),%eax - movl %eax,40(%rdi) - xorl 20(%rdi),%eax - movl %eax,44(%rdi) - - leaq 24(%rdi),%rdi - jmp .L12loop -.L12break: - movl $12,72(%rdi) - xorq %rax,%rax - jmp .Lexit - -.L14rounds: - movq 0(%rsi),%rax - movq 8(%rsi),%rbx - movq 16(%rsi),%rcx - movq 24(%rsi),%rdx - movq %rax,0(%rdi) - movq %rbx,8(%rdi) - movq %rcx,16(%rdi) - movq %rdx,24(%rdi) - - shrq $32,%rdx - xorl %ecx,%ecx - jmp .L14shortcut -.align 4 -.L14loop: - movl 0(%rdi),%eax - movl 28(%rdi),%edx -.L14shortcut: - movzbl %dl,%esi - movzbl -128(%rbp,%rsi,1),%ebx - movzbl %dh,%esi - shll $24,%ebx - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - shrl $16,%edx - movzbl %dl,%esi - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - movzbl %dh,%esi - shll $8,%ebx - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - shll $16,%ebx - xorl %ebx,%eax - - xorl 1024-128(%rbp,%rcx,4),%eax - movl %eax,32(%rdi) - xorl 4(%rdi),%eax - movl %eax,36(%rdi) - xorl 8(%rdi),%eax - movl %eax,40(%rdi) - xorl 12(%rdi),%eax - movl %eax,44(%rdi) - - cmpl $6,%ecx - je .L14break - addl $1,%ecx - - movl %eax,%edx - movl 16(%rdi),%eax - movzbl %dl,%esi - movzbl -128(%rbp,%rsi,1),%ebx - movzbl %dh,%esi - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - shrl $16,%edx - shll $8,%ebx - movzbl %dl,%esi - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - movzbl %dh,%esi - shll $16,%ebx - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - shll $24,%ebx - xorl %ebx,%eax - - movl %eax,48(%rdi) - xorl 20(%rdi),%eax - movl %eax,52(%rdi) - xorl 24(%rdi),%eax - movl %eax,56(%rdi) - xorl 28(%rdi),%eax - movl %eax,60(%rdi) - - leaq 32(%rdi),%rdi - jmp .L14loop -.L14break: - movl $14,48(%rdi) - xorq %rax,%rax - jmp .Lexit - -.Lbadpointer: - movq $-1,%rax -.Lexit: -.byte 0xf3,0xc3 -.size _x86_64_AES_set_encrypt_key,.-_x86_64_AES_set_encrypt_key -.align 16 -.globl asm_AES_set_decrypt_key -.hidden asm_AES_set_decrypt_key -.type asm_AES_set_decrypt_key,@function -asm_AES_set_decrypt_key: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - pushq %rdx -.Ldec_key_prologue: - - call _x86_64_AES_set_encrypt_key - movq (%rsp),%r8 - cmpl $0,%eax - jne .Labort - - movl 240(%r8),%r14d - xorq %rdi,%rdi - leaq (%rdi,%r14,4),%rcx - movq %r8,%rsi - leaq (%r8,%rcx,4),%rdi -.align 4 -.Linvert: - movq 0(%rsi),%rax - movq 8(%rsi),%rbx - movq 0(%rdi),%rcx - movq 8(%rdi),%rdx - movq %rax,0(%rdi) - movq %rbx,8(%rdi) - movq %rcx,0(%rsi) - movq %rdx,8(%rsi) - leaq 16(%rsi),%rsi - leaq -16(%rdi),%rdi - cmpq %rsi,%rdi - jne .Linvert - - leaq .LAES_Te+2048+1024(%rip),%rax - - movq 40(%rax),%rsi - movq 48(%rax),%rdi - movq 56(%rax),%rbp - - movq %r8,%r15 - subl $1,%r14d -.align 4 -.Lpermute: - leaq 16(%r15),%r15 - movq 0(%r15),%rax - movq 8(%r15),%rcx - movq %rsi,%r9 - movq %rsi,%r12 - andq %rax,%r9 - andq %rcx,%r12 - movq %r9,%rbx - movq %r12,%rdx - shrq $7,%r9 - leaq (%rax,%rax,1),%r8 - shrq $7,%r12 - leaq (%rcx,%rcx,1),%r11 - subq %r9,%rbx - subq %r12,%rdx - andq %rdi,%r8 - andq %rdi,%r11 - andq %rbp,%rbx - andq %rbp,%rdx - xorq %rbx,%r8 - xorq %rdx,%r11 - movq %rsi,%r10 - movq %rsi,%r13 - - andq %r8,%r10 - andq %r11,%r13 - movq %r10,%rbx - movq %r13,%rdx - shrq $7,%r10 - leaq (%r8,%r8,1),%r9 - shrq $7,%r13 - leaq (%r11,%r11,1),%r12 - subq %r10,%rbx - subq %r13,%rdx - andq %rdi,%r9 - andq %rdi,%r12 - andq %rbp,%rbx - andq %rbp,%rdx - xorq %rbx,%r9 - xorq %rdx,%r12 - movq %rsi,%r10 - movq %rsi,%r13 - - andq %r9,%r10 - andq %r12,%r13 - movq %r10,%rbx - movq %r13,%rdx - shrq $7,%r10 - xorq %rax,%r8 - shrq $7,%r13 - xorq %rcx,%r11 - subq %r10,%rbx - subq %r13,%rdx - leaq (%r9,%r9,1),%r10 - leaq (%r12,%r12,1),%r13 - xorq %rax,%r9 - xorq %rcx,%r12 - andq %rdi,%r10 - andq %rdi,%r13 - andq %rbp,%rbx - andq %rbp,%rdx - xorq %rbx,%r10 - xorq %rdx,%r13 - - xorq %r10,%rax - xorq %r13,%rcx - xorq %r10,%r8 - xorq %r13,%r11 - movq %rax,%rbx - movq %rcx,%rdx - xorq %r10,%r9 - shrq $32,%rbx - xorq %r13,%r12 - shrq $32,%rdx - xorq %r8,%r10 - roll $8,%eax - xorq %r11,%r13 - roll $8,%ecx - xorq %r9,%r10 - roll $8,%ebx - xorq %r12,%r13 - - roll $8,%edx - xorl %r10d,%eax - shrq $32,%r10 - xorl %r13d,%ecx - shrq $32,%r13 - xorl %r10d,%ebx - xorl %r13d,%edx - - movq %r8,%r10 - roll $24,%r8d - movq %r11,%r13 - roll $24,%r11d - shrq $32,%r10 - xorl %r8d,%eax - shrq $32,%r13 - xorl %r11d,%ecx - roll $24,%r10d - movq %r9,%r8 - roll $24,%r13d - movq %r12,%r11 - shrq $32,%r8 - xorl %r10d,%ebx - shrq $32,%r11 - xorl %r13d,%edx - - - roll $16,%r9d - - roll $16,%r12d - - roll $16,%r8d - - xorl %r9d,%eax - roll $16,%r11d - xorl %r12d,%ecx - - xorl %r8d,%ebx - xorl %r11d,%edx - movl %eax,0(%r15) - movl %ebx,4(%r15) - movl %ecx,8(%r15) - movl %edx,12(%r15) - subl $1,%r14d - jnz .Lpermute - - xorq %rax,%rax -.Labort: - movq 8(%rsp),%r15 - movq 16(%rsp),%r14 - movq 24(%rsp),%r13 - movq 32(%rsp),%r12 - movq 40(%rsp),%rbp - movq 48(%rsp),%rbx - addq $56,%rsp -.Ldec_key_epilogue: - .byte 0xf3,0xc3 -.size asm_AES_set_decrypt_key,.-asm_AES_set_decrypt_key -.align 16 -.globl asm_AES_cbc_encrypt -.hidden asm_AES_cbc_encrypt -.type asm_AES_cbc_encrypt,@function -.extern OPENSSL_ia32cap_P -.hidden OPENSSL_ia32cap_P -.hidden asm_AES_cbc_encrypt -asm_AES_cbc_encrypt: - cmpq $0,%rdx - je .Lcbc_epilogue - pushfq - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 -.Lcbc_prologue: - - cld - movl %r9d,%r9d - - leaq .LAES_Te(%rip),%r14 - cmpq $0,%r9 - jne .Lcbc_picked_te - leaq .LAES_Td(%rip),%r14 -.Lcbc_picked_te: - - movl OPENSSL_ia32cap_P(%rip),%r10d - cmpq $512,%rdx - jb .Lcbc_slow_prologue - testq $15,%rdx - jnz .Lcbc_slow_prologue - btl $28,%r10d - jc .Lcbc_slow_prologue - - - leaq -88-248(%rsp),%r15 - andq $-64,%r15 - - - movq %r14,%r10 - leaq 2304(%r14),%r11 - movq %r15,%r12 - andq $4095,%r10 - andq $4095,%r11 - andq $4095,%r12 - - cmpq %r11,%r12 - jb .Lcbc_te_break_out - subq %r11,%r12 - subq %r12,%r15 - jmp .Lcbc_te_ok -.Lcbc_te_break_out: - subq %r10,%r12 - andq $4095,%r12 - addq $320,%r12 - subq %r12,%r15 -.align 4 -.Lcbc_te_ok: - - xchgq %rsp,%r15 - - movq %r15,16(%rsp) -.Lcbc_fast_body: - movq %rdi,24(%rsp) - movq %rsi,32(%rsp) - movq %rdx,40(%rsp) - movq %rcx,48(%rsp) - movq %r8,56(%rsp) - movl $0,80+240(%rsp) - movq %r8,%rbp - movq %r9,%rbx - movq %rsi,%r9 - movq %rdi,%r8 - movq %rcx,%r15 - - movl 240(%r15),%eax - - movq %r15,%r10 - subq %r14,%r10 - andq $4095,%r10 - cmpq $2304,%r10 - jb .Lcbc_do_ecopy - cmpq $4096-248,%r10 - jb .Lcbc_skip_ecopy -.align 4 -.Lcbc_do_ecopy: - movq %r15,%rsi - leaq 80(%rsp),%rdi - leaq 80(%rsp),%r15 - movl $30,%ecx -.long 0x90A548F3 - movl %eax,(%rdi) -.Lcbc_skip_ecopy: - movq %r15,0(%rsp) - - movl $18,%ecx -.align 4 -.Lcbc_prefetch_te: - movq 0(%r14),%r10 - movq 32(%r14),%r11 - movq 64(%r14),%r12 - movq 96(%r14),%r13 - leaq 128(%r14),%r14 - subl $1,%ecx - jnz .Lcbc_prefetch_te - leaq -2304(%r14),%r14 - - cmpq $0,%rbx - je .LFAST_DECRYPT - - - movl 0(%rbp),%eax - movl 4(%rbp),%ebx - movl 8(%rbp),%ecx - movl 12(%rbp),%edx - -.align 4 -.Lcbc_fast_enc_loop: - xorl 0(%r8),%eax - xorl 4(%r8),%ebx - xorl 8(%r8),%ecx - xorl 12(%r8),%edx - movq 0(%rsp),%r15 - movq %r8,24(%rsp) - - call _x86_64_AES_encrypt - - movq 24(%rsp),%r8 - movq 40(%rsp),%r10 - movl %eax,0(%r9) - movl %ebx,4(%r9) - movl %ecx,8(%r9) - movl %edx,12(%r9) - - leaq 16(%r8),%r8 - leaq 16(%r9),%r9 - subq $16,%r10 - testq $-16,%r10 - movq %r10,40(%rsp) - jnz .Lcbc_fast_enc_loop - movq 56(%rsp),%rbp - movl %eax,0(%rbp) - movl %ebx,4(%rbp) - movl %ecx,8(%rbp) - movl %edx,12(%rbp) - - jmp .Lcbc_fast_cleanup - - -.align 16 -.LFAST_DECRYPT: - cmpq %r8,%r9 - je .Lcbc_fast_dec_in_place - - movq %rbp,64(%rsp) -.align 4 -.Lcbc_fast_dec_loop: - movl 0(%r8),%eax - movl 4(%r8),%ebx - movl 8(%r8),%ecx - movl 12(%r8),%edx - movq 0(%rsp),%r15 - movq %r8,24(%rsp) - - call _x86_64_AES_decrypt - - movq 64(%rsp),%rbp - movq 24(%rsp),%r8 - movq 40(%rsp),%r10 - xorl 0(%rbp),%eax - xorl 4(%rbp),%ebx - xorl 8(%rbp),%ecx - xorl 12(%rbp),%edx - movq %r8,%rbp - - subq $16,%r10 - movq %r10,40(%rsp) - movq %rbp,64(%rsp) - - movl %eax,0(%r9) - movl %ebx,4(%r9) - movl %ecx,8(%r9) - movl %edx,12(%r9) - - leaq 16(%r8),%r8 - leaq 16(%r9),%r9 - jnz .Lcbc_fast_dec_loop - movq 56(%rsp),%r12 - movq 0(%rbp),%r10 - movq 8(%rbp),%r11 - movq %r10,0(%r12) - movq %r11,8(%r12) - jmp .Lcbc_fast_cleanup - -.align 16 -.Lcbc_fast_dec_in_place: - movq 0(%rbp),%r10 - movq 8(%rbp),%r11 - movq %r10,0+64(%rsp) - movq %r11,8+64(%rsp) -.align 4 -.Lcbc_fast_dec_in_place_loop: - movl 0(%r8),%eax - movl 4(%r8),%ebx - movl 8(%r8),%ecx - movl 12(%r8),%edx - movq 0(%rsp),%r15 - movq %r8,24(%rsp) - - call _x86_64_AES_decrypt - - movq 24(%rsp),%r8 - movq 40(%rsp),%r10 - xorl 0+64(%rsp),%eax - xorl 4+64(%rsp),%ebx - xorl 8+64(%rsp),%ecx - xorl 12+64(%rsp),%edx - - movq 0(%r8),%r11 - movq 8(%r8),%r12 - subq $16,%r10 - jz .Lcbc_fast_dec_in_place_done - - movq %r11,0+64(%rsp) - movq %r12,8+64(%rsp) - - movl %eax,0(%r9) - movl %ebx,4(%r9) - movl %ecx,8(%r9) - movl %edx,12(%r9) - - leaq 16(%r8),%r8 - leaq 16(%r9),%r9 - movq %r10,40(%rsp) - jmp .Lcbc_fast_dec_in_place_loop -.Lcbc_fast_dec_in_place_done: - movq 56(%rsp),%rdi - movq %r11,0(%rdi) - movq %r12,8(%rdi) - - movl %eax,0(%r9) - movl %ebx,4(%r9) - movl %ecx,8(%r9) - movl %edx,12(%r9) - -.align 4 -.Lcbc_fast_cleanup: - cmpl $0,80+240(%rsp) - leaq 80(%rsp),%rdi - je .Lcbc_exit - movl $30,%ecx - xorq %rax,%rax -.long 0x90AB48F3 - - jmp .Lcbc_exit - - -.align 16 -.Lcbc_slow_prologue: - - leaq -88(%rsp),%rbp - andq $-64,%rbp - - leaq -88-63(%rcx),%r10 - subq %rbp,%r10 - negq %r10 - andq $960,%r10 - subq %r10,%rbp - - xchgq %rsp,%rbp - - movq %rbp,16(%rsp) -.Lcbc_slow_body: - - - - - movq %r8,56(%rsp) - movq %r8,%rbp - movq %r9,%rbx - movq %rsi,%r9 - movq %rdi,%r8 - movq %rcx,%r15 - movq %rdx,%r10 - - movl 240(%r15),%eax - movq %r15,0(%rsp) - shll $4,%eax - leaq (%r15,%rax,1),%rax - movq %rax,8(%rsp) - - - leaq 2048(%r14),%r14 - leaq 768-8(%rsp),%rax - subq %r14,%rax - andq $768,%rax - leaq (%r14,%rax,1),%r14 - - cmpq $0,%rbx - je .LSLOW_DECRYPT - - - testq $-16,%r10 - movl 0(%rbp),%eax - movl 4(%rbp),%ebx - movl 8(%rbp),%ecx - movl 12(%rbp),%edx - jz .Lcbc_slow_enc_tail - -.align 4 -.Lcbc_slow_enc_loop: - xorl 0(%r8),%eax - xorl 4(%r8),%ebx - xorl 8(%r8),%ecx - xorl 12(%r8),%edx - movq 0(%rsp),%r15 - movq %r8,24(%rsp) - movq %r9,32(%rsp) - movq %r10,40(%rsp) - - call _x86_64_AES_encrypt_compact - - movq 24(%rsp),%r8 - movq 32(%rsp),%r9 - movq 40(%rsp),%r10 - movl %eax,0(%r9) - movl %ebx,4(%r9) - movl %ecx,8(%r9) - movl %edx,12(%r9) - - leaq 16(%r8),%r8 - leaq 16(%r9),%r9 - subq $16,%r10 - testq $-16,%r10 - jnz .Lcbc_slow_enc_loop - testq $15,%r10 - jnz .Lcbc_slow_enc_tail - movq 56(%rsp),%rbp - movl %eax,0(%rbp) - movl %ebx,4(%rbp) - movl %ecx,8(%rbp) - movl %edx,12(%rbp) - - jmp .Lcbc_exit - -.align 4 -.Lcbc_slow_enc_tail: - movq %rax,%r11 - movq %rcx,%r12 - movq %r10,%rcx - movq %r8,%rsi - movq %r9,%rdi -.long 0x9066A4F3 - movq $16,%rcx - subq %r10,%rcx - xorq %rax,%rax -.long 0x9066AAF3 - movq %r9,%r8 - movq $16,%r10 - movq %r11,%rax - movq %r12,%rcx - jmp .Lcbc_slow_enc_loop - -.align 16 -.LSLOW_DECRYPT: - shrq $3,%rax - addq %rax,%r14 - - movq 0(%rbp),%r11 - movq 8(%rbp),%r12 - movq %r11,0+64(%rsp) - movq %r12,8+64(%rsp) - -.align 4 -.Lcbc_slow_dec_loop: - movl 0(%r8),%eax - movl 4(%r8),%ebx - movl 8(%r8),%ecx - movl 12(%r8),%edx - movq 0(%rsp),%r15 - movq %r8,24(%rsp) - movq %r9,32(%rsp) - movq %r10,40(%rsp) - - call _x86_64_AES_decrypt_compact - - movq 24(%rsp),%r8 - movq 32(%rsp),%r9 - movq 40(%rsp),%r10 - xorl 0+64(%rsp),%eax - xorl 4+64(%rsp),%ebx - xorl 8+64(%rsp),%ecx - xorl 12+64(%rsp),%edx - - movq 0(%r8),%r11 - movq 8(%r8),%r12 - subq $16,%r10 - jc .Lcbc_slow_dec_partial - jz .Lcbc_slow_dec_done - - movq %r11,0+64(%rsp) - movq %r12,8+64(%rsp) - - movl %eax,0(%r9) - movl %ebx,4(%r9) - movl %ecx,8(%r9) - movl %edx,12(%r9) - - leaq 16(%r8),%r8 - leaq 16(%r9),%r9 - jmp .Lcbc_slow_dec_loop -.Lcbc_slow_dec_done: - movq 56(%rsp),%rdi - movq %r11,0(%rdi) - movq %r12,8(%rdi) - - movl %eax,0(%r9) - movl %ebx,4(%r9) - movl %ecx,8(%r9) - movl %edx,12(%r9) - - jmp .Lcbc_exit - -.align 4 -.Lcbc_slow_dec_partial: - movq 56(%rsp),%rdi - movq %r11,0(%rdi) - movq %r12,8(%rdi) - - movl %eax,0+64(%rsp) - movl %ebx,4+64(%rsp) - movl %ecx,8+64(%rsp) - movl %edx,12+64(%rsp) - - movq %r9,%rdi - leaq 64(%rsp),%rsi - leaq 16(%r10),%rcx -.long 0x9066A4F3 - jmp .Lcbc_exit - -.align 16 -.Lcbc_exit: - movq 16(%rsp),%rsi - movq (%rsi),%r15 - movq 8(%rsi),%r14 - movq 16(%rsi),%r13 - movq 24(%rsi),%r12 - movq 32(%rsi),%rbp - movq 40(%rsi),%rbx - leaq 48(%rsi),%rsp -.Lcbc_popfq: - popfq -.Lcbc_epilogue: - .byte 0xf3,0xc3 -.size asm_AES_cbc_encrypt,.-asm_AES_cbc_encrypt -.align 64 -.LAES_Te: -.long 0xa56363c6,0xa56363c6 -.long 0x847c7cf8,0x847c7cf8 -.long 0x997777ee,0x997777ee -.long 0x8d7b7bf6,0x8d7b7bf6 -.long 0x0df2f2ff,0x0df2f2ff -.long 0xbd6b6bd6,0xbd6b6bd6 -.long 0xb16f6fde,0xb16f6fde -.long 0x54c5c591,0x54c5c591 -.long 0x50303060,0x50303060 -.long 0x03010102,0x03010102 -.long 0xa96767ce,0xa96767ce -.long 0x7d2b2b56,0x7d2b2b56 -.long 0x19fefee7,0x19fefee7 -.long 0x62d7d7b5,0x62d7d7b5 -.long 0xe6abab4d,0xe6abab4d -.long 0x9a7676ec,0x9a7676ec -.long 0x45caca8f,0x45caca8f -.long 0x9d82821f,0x9d82821f -.long 0x40c9c989,0x40c9c989 -.long 0x877d7dfa,0x877d7dfa -.long 0x15fafaef,0x15fafaef -.long 0xeb5959b2,0xeb5959b2 -.long 0xc947478e,0xc947478e -.long 0x0bf0f0fb,0x0bf0f0fb -.long 0xecadad41,0xecadad41 -.long 0x67d4d4b3,0x67d4d4b3 -.long 0xfda2a25f,0xfda2a25f -.long 0xeaafaf45,0xeaafaf45 -.long 0xbf9c9c23,0xbf9c9c23 -.long 0xf7a4a453,0xf7a4a453 -.long 0x967272e4,0x967272e4 -.long 0x5bc0c09b,0x5bc0c09b -.long 0xc2b7b775,0xc2b7b775 -.long 0x1cfdfde1,0x1cfdfde1 -.long 0xae93933d,0xae93933d -.long 0x6a26264c,0x6a26264c -.long 0x5a36366c,0x5a36366c -.long 0x413f3f7e,0x413f3f7e -.long 0x02f7f7f5,0x02f7f7f5 -.long 0x4fcccc83,0x4fcccc83 -.long 0x5c343468,0x5c343468 -.long 0xf4a5a551,0xf4a5a551 -.long 0x34e5e5d1,0x34e5e5d1 -.long 0x08f1f1f9,0x08f1f1f9 -.long 0x937171e2,0x937171e2 -.long 0x73d8d8ab,0x73d8d8ab -.long 0x53313162,0x53313162 -.long 0x3f15152a,0x3f15152a -.long 0x0c040408,0x0c040408 -.long 0x52c7c795,0x52c7c795 -.long 0x65232346,0x65232346 -.long 0x5ec3c39d,0x5ec3c39d -.long 0x28181830,0x28181830 -.long 0xa1969637,0xa1969637 -.long 0x0f05050a,0x0f05050a -.long 0xb59a9a2f,0xb59a9a2f -.long 0x0907070e,0x0907070e -.long 0x36121224,0x36121224 -.long 0x9b80801b,0x9b80801b -.long 0x3de2e2df,0x3de2e2df -.long 0x26ebebcd,0x26ebebcd -.long 0x6927274e,0x6927274e -.long 0xcdb2b27f,0xcdb2b27f -.long 0x9f7575ea,0x9f7575ea -.long 0x1b090912,0x1b090912 -.long 0x9e83831d,0x9e83831d -.long 0x742c2c58,0x742c2c58 -.long 0x2e1a1a34,0x2e1a1a34 -.long 0x2d1b1b36,0x2d1b1b36 -.long 0xb26e6edc,0xb26e6edc -.long 0xee5a5ab4,0xee5a5ab4 -.long 0xfba0a05b,0xfba0a05b -.long 0xf65252a4,0xf65252a4 -.long 0x4d3b3b76,0x4d3b3b76 -.long 0x61d6d6b7,0x61d6d6b7 -.long 0xceb3b37d,0xceb3b37d -.long 0x7b292952,0x7b292952 -.long 0x3ee3e3dd,0x3ee3e3dd -.long 0x712f2f5e,0x712f2f5e -.long 0x97848413,0x97848413 -.long 0xf55353a6,0xf55353a6 -.long 0x68d1d1b9,0x68d1d1b9 -.long 0x00000000,0x00000000 -.long 0x2cededc1,0x2cededc1 -.long 0x60202040,0x60202040 -.long 0x1ffcfce3,0x1ffcfce3 -.long 0xc8b1b179,0xc8b1b179 -.long 0xed5b5bb6,0xed5b5bb6 -.long 0xbe6a6ad4,0xbe6a6ad4 -.long 0x46cbcb8d,0x46cbcb8d -.long 0xd9bebe67,0xd9bebe67 -.long 0x4b393972,0x4b393972 -.long 0xde4a4a94,0xde4a4a94 -.long 0xd44c4c98,0xd44c4c98 -.long 0xe85858b0,0xe85858b0 -.long 0x4acfcf85,0x4acfcf85 -.long 0x6bd0d0bb,0x6bd0d0bb -.long 0x2aefefc5,0x2aefefc5 -.long 0xe5aaaa4f,0xe5aaaa4f -.long 0x16fbfbed,0x16fbfbed -.long 0xc5434386,0xc5434386 -.long 0xd74d4d9a,0xd74d4d9a -.long 0x55333366,0x55333366 -.long 0x94858511,0x94858511 -.long 0xcf45458a,0xcf45458a -.long 0x10f9f9e9,0x10f9f9e9 -.long 0x06020204,0x06020204 -.long 0x817f7ffe,0x817f7ffe -.long 0xf05050a0,0xf05050a0 -.long 0x443c3c78,0x443c3c78 -.long 0xba9f9f25,0xba9f9f25 -.long 0xe3a8a84b,0xe3a8a84b -.long 0xf35151a2,0xf35151a2 -.long 0xfea3a35d,0xfea3a35d -.long 0xc0404080,0xc0404080 -.long 0x8a8f8f05,0x8a8f8f05 -.long 0xad92923f,0xad92923f -.long 0xbc9d9d21,0xbc9d9d21 -.long 0x48383870,0x48383870 -.long 0x04f5f5f1,0x04f5f5f1 -.long 0xdfbcbc63,0xdfbcbc63 -.long 0xc1b6b677,0xc1b6b677 -.long 0x75dadaaf,0x75dadaaf -.long 0x63212142,0x63212142 -.long 0x30101020,0x30101020 -.long 0x1affffe5,0x1affffe5 -.long 0x0ef3f3fd,0x0ef3f3fd -.long 0x6dd2d2bf,0x6dd2d2bf -.long 0x4ccdcd81,0x4ccdcd81 -.long 0x140c0c18,0x140c0c18 -.long 0x35131326,0x35131326 -.long 0x2fececc3,0x2fececc3 -.long 0xe15f5fbe,0xe15f5fbe -.long 0xa2979735,0xa2979735 -.long 0xcc444488,0xcc444488 -.long 0x3917172e,0x3917172e -.long 0x57c4c493,0x57c4c493 -.long 0xf2a7a755,0xf2a7a755 -.long 0x827e7efc,0x827e7efc -.long 0x473d3d7a,0x473d3d7a -.long 0xac6464c8,0xac6464c8 -.long 0xe75d5dba,0xe75d5dba -.long 0x2b191932,0x2b191932 -.long 0x957373e6,0x957373e6 -.long 0xa06060c0,0xa06060c0 -.long 0x98818119,0x98818119 -.long 0xd14f4f9e,0xd14f4f9e -.long 0x7fdcdca3,0x7fdcdca3 -.long 0x66222244,0x66222244 -.long 0x7e2a2a54,0x7e2a2a54 -.long 0xab90903b,0xab90903b -.long 0x8388880b,0x8388880b -.long 0xca46468c,0xca46468c -.long 0x29eeeec7,0x29eeeec7 -.long 0xd3b8b86b,0xd3b8b86b -.long 0x3c141428,0x3c141428 -.long 0x79dedea7,0x79dedea7 -.long 0xe25e5ebc,0xe25e5ebc -.long 0x1d0b0b16,0x1d0b0b16 -.long 0x76dbdbad,0x76dbdbad -.long 0x3be0e0db,0x3be0e0db -.long 0x56323264,0x56323264 -.long 0x4e3a3a74,0x4e3a3a74 -.long 0x1e0a0a14,0x1e0a0a14 -.long 0xdb494992,0xdb494992 -.long 0x0a06060c,0x0a06060c -.long 0x6c242448,0x6c242448 -.long 0xe45c5cb8,0xe45c5cb8 -.long 0x5dc2c29f,0x5dc2c29f -.long 0x6ed3d3bd,0x6ed3d3bd -.long 0xefacac43,0xefacac43 -.long 0xa66262c4,0xa66262c4 -.long 0xa8919139,0xa8919139 -.long 0xa4959531,0xa4959531 -.long 0x37e4e4d3,0x37e4e4d3 -.long 0x8b7979f2,0x8b7979f2 -.long 0x32e7e7d5,0x32e7e7d5 -.long 0x43c8c88b,0x43c8c88b -.long 0x5937376e,0x5937376e -.long 0xb76d6dda,0xb76d6dda -.long 0x8c8d8d01,0x8c8d8d01 -.long 0x64d5d5b1,0x64d5d5b1 -.long 0xd24e4e9c,0xd24e4e9c -.long 0xe0a9a949,0xe0a9a949 -.long 0xb46c6cd8,0xb46c6cd8 -.long 0xfa5656ac,0xfa5656ac -.long 0x07f4f4f3,0x07f4f4f3 -.long 0x25eaeacf,0x25eaeacf -.long 0xaf6565ca,0xaf6565ca -.long 0x8e7a7af4,0x8e7a7af4 -.long 0xe9aeae47,0xe9aeae47 -.long 0x18080810,0x18080810 -.long 0xd5baba6f,0xd5baba6f -.long 0x887878f0,0x887878f0 -.long 0x6f25254a,0x6f25254a -.long 0x722e2e5c,0x722e2e5c -.long 0x241c1c38,0x241c1c38 -.long 0xf1a6a657,0xf1a6a657 -.long 0xc7b4b473,0xc7b4b473 -.long 0x51c6c697,0x51c6c697 -.long 0x23e8e8cb,0x23e8e8cb -.long 0x7cdddda1,0x7cdddda1 -.long 0x9c7474e8,0x9c7474e8 -.long 0x211f1f3e,0x211f1f3e -.long 0xdd4b4b96,0xdd4b4b96 -.long 0xdcbdbd61,0xdcbdbd61 -.long 0x868b8b0d,0x868b8b0d -.long 0x858a8a0f,0x858a8a0f -.long 0x907070e0,0x907070e0 -.long 0x423e3e7c,0x423e3e7c -.long 0xc4b5b571,0xc4b5b571 -.long 0xaa6666cc,0xaa6666cc -.long 0xd8484890,0xd8484890 -.long 0x05030306,0x05030306 -.long 0x01f6f6f7,0x01f6f6f7 -.long 0x120e0e1c,0x120e0e1c -.long 0xa36161c2,0xa36161c2 -.long 0x5f35356a,0x5f35356a -.long 0xf95757ae,0xf95757ae -.long 0xd0b9b969,0xd0b9b969 -.long 0x91868617,0x91868617 -.long 0x58c1c199,0x58c1c199 -.long 0x271d1d3a,0x271d1d3a -.long 0xb99e9e27,0xb99e9e27 -.long 0x38e1e1d9,0x38e1e1d9 -.long 0x13f8f8eb,0x13f8f8eb -.long 0xb398982b,0xb398982b -.long 0x33111122,0x33111122 -.long 0xbb6969d2,0xbb6969d2 -.long 0x70d9d9a9,0x70d9d9a9 -.long 0x898e8e07,0x898e8e07 -.long 0xa7949433,0xa7949433 -.long 0xb69b9b2d,0xb69b9b2d -.long 0x221e1e3c,0x221e1e3c -.long 0x92878715,0x92878715 -.long 0x20e9e9c9,0x20e9e9c9 -.long 0x49cece87,0x49cece87 -.long 0xff5555aa,0xff5555aa -.long 0x78282850,0x78282850 -.long 0x7adfdfa5,0x7adfdfa5 -.long 0x8f8c8c03,0x8f8c8c03 -.long 0xf8a1a159,0xf8a1a159 -.long 0x80898909,0x80898909 -.long 0x170d0d1a,0x170d0d1a -.long 0xdabfbf65,0xdabfbf65 -.long 0x31e6e6d7,0x31e6e6d7 -.long 0xc6424284,0xc6424284 -.long 0xb86868d0,0xb86868d0 -.long 0xc3414182,0xc3414182 -.long 0xb0999929,0xb0999929 -.long 0x772d2d5a,0x772d2d5a -.long 0x110f0f1e,0x110f0f1e -.long 0xcbb0b07b,0xcbb0b07b -.long 0xfc5454a8,0xfc5454a8 -.long 0xd6bbbb6d,0xd6bbbb6d -.long 0x3a16162c,0x3a16162c -.byte 0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5 -.byte 0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76 -.byte 0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0 -.byte 0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0 -.byte 0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc -.byte 0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15 -.byte 0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a -.byte 0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75 -.byte 0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0 -.byte 0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84 -.byte 0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b -.byte 0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf -.byte 0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85 -.byte 0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8 -.byte 0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5 -.byte 0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2 -.byte 0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17 -.byte 0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73 -.byte 0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88 -.byte 0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb -.byte 0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c -.byte 0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79 -.byte 0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9 -.byte 0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08 -.byte 0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6 -.byte 0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a -.byte 0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e -.byte 0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e -.byte 0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94 -.byte 0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf -.byte 0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68 -.byte 0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16 -.byte 0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5 -.byte 0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76 -.byte 0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0 -.byte 0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0 -.byte 0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc -.byte 0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15 -.byte 0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a -.byte 0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75 -.byte 0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0 -.byte 0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84 -.byte 0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b -.byte 0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf -.byte 0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85 -.byte 0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8 -.byte 0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5 -.byte 0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2 -.byte 0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17 -.byte 0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73 -.byte 0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88 -.byte 0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb -.byte 0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c -.byte 0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79 -.byte 0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9 -.byte 0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08 -.byte 0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6 -.byte 0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a -.byte 0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e -.byte 0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e -.byte 0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94 -.byte 0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf -.byte 0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68 -.byte 0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16 -.byte 0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5 -.byte 0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76 -.byte 0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0 -.byte 0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0 -.byte 0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc -.byte 0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15 -.byte 0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a -.byte 0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75 -.byte 0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0 -.byte 0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84 -.byte 0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b -.byte 0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf -.byte 0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85 -.byte 0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8 -.byte 0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5 -.byte 0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2 -.byte 0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17 -.byte 0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73 -.byte 0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88 -.byte 0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb -.byte 0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c -.byte 0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79 -.byte 0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9 -.byte 0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08 -.byte 0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6 -.byte 0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a -.byte 0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e -.byte 0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e -.byte 0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94 -.byte 0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf -.byte 0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68 -.byte 0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16 -.byte 0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5 -.byte 0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76 -.byte 0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0 -.byte 0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0 -.byte 0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc -.byte 0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15 -.byte 0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a -.byte 0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75 -.byte 0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0 -.byte 0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84 -.byte 0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b -.byte 0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf -.byte 0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85 -.byte 0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8 -.byte 0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5 -.byte 0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2 -.byte 0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17 -.byte 0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73 -.byte 0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88 -.byte 0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb -.byte 0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c -.byte 0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79 -.byte 0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9 -.byte 0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08 -.byte 0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6 -.byte 0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a -.byte 0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e -.byte 0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e -.byte 0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94 -.byte 0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf -.byte 0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68 -.byte 0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16 -.long 0x00000001, 0x00000002, 0x00000004, 0x00000008 -.long 0x00000010, 0x00000020, 0x00000040, 0x00000080 -.long 0x0000001b, 0x00000036, 0x80808080, 0x80808080 -.long 0xfefefefe, 0xfefefefe, 0x1b1b1b1b, 0x1b1b1b1b -.align 64 -.LAES_Td: -.long 0x50a7f451,0x50a7f451 -.long 0x5365417e,0x5365417e -.long 0xc3a4171a,0xc3a4171a -.long 0x965e273a,0x965e273a -.long 0xcb6bab3b,0xcb6bab3b -.long 0xf1459d1f,0xf1459d1f -.long 0xab58faac,0xab58faac -.long 0x9303e34b,0x9303e34b -.long 0x55fa3020,0x55fa3020 -.long 0xf66d76ad,0xf66d76ad -.long 0x9176cc88,0x9176cc88 -.long 0x254c02f5,0x254c02f5 -.long 0xfcd7e54f,0xfcd7e54f -.long 0xd7cb2ac5,0xd7cb2ac5 -.long 0x80443526,0x80443526 -.long 0x8fa362b5,0x8fa362b5 -.long 0x495ab1de,0x495ab1de -.long 0x671bba25,0x671bba25 -.long 0x980eea45,0x980eea45 -.long 0xe1c0fe5d,0xe1c0fe5d -.long 0x02752fc3,0x02752fc3 -.long 0x12f04c81,0x12f04c81 -.long 0xa397468d,0xa397468d -.long 0xc6f9d36b,0xc6f9d36b -.long 0xe75f8f03,0xe75f8f03 -.long 0x959c9215,0x959c9215 -.long 0xeb7a6dbf,0xeb7a6dbf -.long 0xda595295,0xda595295 -.long 0x2d83bed4,0x2d83bed4 -.long 0xd3217458,0xd3217458 -.long 0x2969e049,0x2969e049 -.long 0x44c8c98e,0x44c8c98e -.long 0x6a89c275,0x6a89c275 -.long 0x78798ef4,0x78798ef4 -.long 0x6b3e5899,0x6b3e5899 -.long 0xdd71b927,0xdd71b927 -.long 0xb64fe1be,0xb64fe1be -.long 0x17ad88f0,0x17ad88f0 -.long 0x66ac20c9,0x66ac20c9 -.long 0xb43ace7d,0xb43ace7d -.long 0x184adf63,0x184adf63 -.long 0x82311ae5,0x82311ae5 -.long 0x60335197,0x60335197 -.long 0x457f5362,0x457f5362 -.long 0xe07764b1,0xe07764b1 -.long 0x84ae6bbb,0x84ae6bbb -.long 0x1ca081fe,0x1ca081fe -.long 0x942b08f9,0x942b08f9 -.long 0x58684870,0x58684870 -.long 0x19fd458f,0x19fd458f -.long 0x876cde94,0x876cde94 -.long 0xb7f87b52,0xb7f87b52 -.long 0x23d373ab,0x23d373ab -.long 0xe2024b72,0xe2024b72 -.long 0x578f1fe3,0x578f1fe3 -.long 0x2aab5566,0x2aab5566 -.long 0x0728ebb2,0x0728ebb2 -.long 0x03c2b52f,0x03c2b52f -.long 0x9a7bc586,0x9a7bc586 -.long 0xa50837d3,0xa50837d3 -.long 0xf2872830,0xf2872830 -.long 0xb2a5bf23,0xb2a5bf23 -.long 0xba6a0302,0xba6a0302 -.long 0x5c8216ed,0x5c8216ed -.long 0x2b1ccf8a,0x2b1ccf8a -.long 0x92b479a7,0x92b479a7 -.long 0xf0f207f3,0xf0f207f3 -.long 0xa1e2694e,0xa1e2694e -.long 0xcdf4da65,0xcdf4da65 -.long 0xd5be0506,0xd5be0506 -.long 0x1f6234d1,0x1f6234d1 -.long 0x8afea6c4,0x8afea6c4 -.long 0x9d532e34,0x9d532e34 -.long 0xa055f3a2,0xa055f3a2 -.long 0x32e18a05,0x32e18a05 -.long 0x75ebf6a4,0x75ebf6a4 -.long 0x39ec830b,0x39ec830b -.long 0xaaef6040,0xaaef6040 -.long 0x069f715e,0x069f715e -.long 0x51106ebd,0x51106ebd -.long 0xf98a213e,0xf98a213e -.long 0x3d06dd96,0x3d06dd96 -.long 0xae053edd,0xae053edd -.long 0x46bde64d,0x46bde64d -.long 0xb58d5491,0xb58d5491 -.long 0x055dc471,0x055dc471 -.long 0x6fd40604,0x6fd40604 -.long 0xff155060,0xff155060 -.long 0x24fb9819,0x24fb9819 -.long 0x97e9bdd6,0x97e9bdd6 -.long 0xcc434089,0xcc434089 -.long 0x779ed967,0x779ed967 -.long 0xbd42e8b0,0xbd42e8b0 -.long 0x888b8907,0x888b8907 -.long 0x385b19e7,0x385b19e7 -.long 0xdbeec879,0xdbeec879 -.long 0x470a7ca1,0x470a7ca1 -.long 0xe90f427c,0xe90f427c -.long 0xc91e84f8,0xc91e84f8 -.long 0x00000000,0x00000000 -.long 0x83868009,0x83868009 -.long 0x48ed2b32,0x48ed2b32 -.long 0xac70111e,0xac70111e -.long 0x4e725a6c,0x4e725a6c -.long 0xfbff0efd,0xfbff0efd -.long 0x5638850f,0x5638850f -.long 0x1ed5ae3d,0x1ed5ae3d -.long 0x27392d36,0x27392d36 -.long 0x64d90f0a,0x64d90f0a -.long 0x21a65c68,0x21a65c68 -.long 0xd1545b9b,0xd1545b9b -.long 0x3a2e3624,0x3a2e3624 -.long 0xb1670a0c,0xb1670a0c -.long 0x0fe75793,0x0fe75793 -.long 0xd296eeb4,0xd296eeb4 -.long 0x9e919b1b,0x9e919b1b -.long 0x4fc5c080,0x4fc5c080 -.long 0xa220dc61,0xa220dc61 -.long 0x694b775a,0x694b775a -.long 0x161a121c,0x161a121c -.long 0x0aba93e2,0x0aba93e2 -.long 0xe52aa0c0,0xe52aa0c0 -.long 0x43e0223c,0x43e0223c -.long 0x1d171b12,0x1d171b12 -.long 0x0b0d090e,0x0b0d090e -.long 0xadc78bf2,0xadc78bf2 -.long 0xb9a8b62d,0xb9a8b62d -.long 0xc8a91e14,0xc8a91e14 -.long 0x8519f157,0x8519f157 -.long 0x4c0775af,0x4c0775af -.long 0xbbdd99ee,0xbbdd99ee -.long 0xfd607fa3,0xfd607fa3 -.long 0x9f2601f7,0x9f2601f7 -.long 0xbcf5725c,0xbcf5725c -.long 0xc53b6644,0xc53b6644 -.long 0x347efb5b,0x347efb5b -.long 0x7629438b,0x7629438b -.long 0xdcc623cb,0xdcc623cb -.long 0x68fcedb6,0x68fcedb6 -.long 0x63f1e4b8,0x63f1e4b8 -.long 0xcadc31d7,0xcadc31d7 -.long 0x10856342,0x10856342 -.long 0x40229713,0x40229713 -.long 0x2011c684,0x2011c684 -.long 0x7d244a85,0x7d244a85 -.long 0xf83dbbd2,0xf83dbbd2 -.long 0x1132f9ae,0x1132f9ae -.long 0x6da129c7,0x6da129c7 -.long 0x4b2f9e1d,0x4b2f9e1d -.long 0xf330b2dc,0xf330b2dc -.long 0xec52860d,0xec52860d -.long 0xd0e3c177,0xd0e3c177 -.long 0x6c16b32b,0x6c16b32b -.long 0x99b970a9,0x99b970a9 -.long 0xfa489411,0xfa489411 -.long 0x2264e947,0x2264e947 -.long 0xc48cfca8,0xc48cfca8 -.long 0x1a3ff0a0,0x1a3ff0a0 -.long 0xd82c7d56,0xd82c7d56 -.long 0xef903322,0xef903322 -.long 0xc74e4987,0xc74e4987 -.long 0xc1d138d9,0xc1d138d9 -.long 0xfea2ca8c,0xfea2ca8c -.long 0x360bd498,0x360bd498 -.long 0xcf81f5a6,0xcf81f5a6 -.long 0x28de7aa5,0x28de7aa5 -.long 0x268eb7da,0x268eb7da -.long 0xa4bfad3f,0xa4bfad3f -.long 0xe49d3a2c,0xe49d3a2c -.long 0x0d927850,0x0d927850 -.long 0x9bcc5f6a,0x9bcc5f6a -.long 0x62467e54,0x62467e54 -.long 0xc2138df6,0xc2138df6 -.long 0xe8b8d890,0xe8b8d890 -.long 0x5ef7392e,0x5ef7392e -.long 0xf5afc382,0xf5afc382 -.long 0xbe805d9f,0xbe805d9f -.long 0x7c93d069,0x7c93d069 -.long 0xa92dd56f,0xa92dd56f -.long 0xb31225cf,0xb31225cf -.long 0x3b99acc8,0x3b99acc8 -.long 0xa77d1810,0xa77d1810 -.long 0x6e639ce8,0x6e639ce8 -.long 0x7bbb3bdb,0x7bbb3bdb -.long 0x097826cd,0x097826cd -.long 0xf418596e,0xf418596e -.long 0x01b79aec,0x01b79aec -.long 0xa89a4f83,0xa89a4f83 -.long 0x656e95e6,0x656e95e6 -.long 0x7ee6ffaa,0x7ee6ffaa -.long 0x08cfbc21,0x08cfbc21 -.long 0xe6e815ef,0xe6e815ef -.long 0xd99be7ba,0xd99be7ba -.long 0xce366f4a,0xce366f4a -.long 0xd4099fea,0xd4099fea -.long 0xd67cb029,0xd67cb029 -.long 0xafb2a431,0xafb2a431 -.long 0x31233f2a,0x31233f2a -.long 0x3094a5c6,0x3094a5c6 -.long 0xc066a235,0xc066a235 -.long 0x37bc4e74,0x37bc4e74 -.long 0xa6ca82fc,0xa6ca82fc -.long 0xb0d090e0,0xb0d090e0 -.long 0x15d8a733,0x15d8a733 -.long 0x4a9804f1,0x4a9804f1 -.long 0xf7daec41,0xf7daec41 -.long 0x0e50cd7f,0x0e50cd7f -.long 0x2ff69117,0x2ff69117 -.long 0x8dd64d76,0x8dd64d76 -.long 0x4db0ef43,0x4db0ef43 -.long 0x544daacc,0x544daacc -.long 0xdf0496e4,0xdf0496e4 -.long 0xe3b5d19e,0xe3b5d19e -.long 0x1b886a4c,0x1b886a4c -.long 0xb81f2cc1,0xb81f2cc1 -.long 0x7f516546,0x7f516546 -.long 0x04ea5e9d,0x04ea5e9d -.long 0x5d358c01,0x5d358c01 -.long 0x737487fa,0x737487fa -.long 0x2e410bfb,0x2e410bfb -.long 0x5a1d67b3,0x5a1d67b3 -.long 0x52d2db92,0x52d2db92 -.long 0x335610e9,0x335610e9 -.long 0x1347d66d,0x1347d66d -.long 0x8c61d79a,0x8c61d79a -.long 0x7a0ca137,0x7a0ca137 -.long 0x8e14f859,0x8e14f859 -.long 0x893c13eb,0x893c13eb -.long 0xee27a9ce,0xee27a9ce -.long 0x35c961b7,0x35c961b7 -.long 0xede51ce1,0xede51ce1 -.long 0x3cb1477a,0x3cb1477a -.long 0x59dfd29c,0x59dfd29c -.long 0x3f73f255,0x3f73f255 -.long 0x79ce1418,0x79ce1418 -.long 0xbf37c773,0xbf37c773 -.long 0xeacdf753,0xeacdf753 -.long 0x5baafd5f,0x5baafd5f -.long 0x146f3ddf,0x146f3ddf -.long 0x86db4478,0x86db4478 -.long 0x81f3afca,0x81f3afca -.long 0x3ec468b9,0x3ec468b9 -.long 0x2c342438,0x2c342438 -.long 0x5f40a3c2,0x5f40a3c2 -.long 0x72c31d16,0x72c31d16 -.long 0x0c25e2bc,0x0c25e2bc -.long 0x8b493c28,0x8b493c28 -.long 0x41950dff,0x41950dff -.long 0x7101a839,0x7101a839 -.long 0xdeb30c08,0xdeb30c08 -.long 0x9ce4b4d8,0x9ce4b4d8 -.long 0x90c15664,0x90c15664 -.long 0x6184cb7b,0x6184cb7b -.long 0x70b632d5,0x70b632d5 -.long 0x745c6c48,0x745c6c48 -.long 0x4257b8d0,0x4257b8d0 -.byte 0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38 -.byte 0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb -.byte 0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87 -.byte 0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb -.byte 0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d -.byte 0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e -.byte 0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2 -.byte 0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25 -.byte 0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16 -.byte 0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92 -.byte 0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda -.byte 0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84 -.byte 0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a -.byte 0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06 -.byte 0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02 -.byte 0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b -.byte 0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea -.byte 0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73 -.byte 0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85 -.byte 0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e -.byte 0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89 -.byte 0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b -.byte 0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20 -.byte 0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4 -.byte 0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31 -.byte 0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f -.byte 0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d -.byte 0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef -.byte 0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0 -.byte 0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61 -.byte 0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26 -.byte 0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d -.long 0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe -.long 0x1b1b1b1b, 0x1b1b1b1b, 0, 0 -.byte 0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38 -.byte 0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb -.byte 0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87 -.byte 0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb -.byte 0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d -.byte 0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e -.byte 0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2 -.byte 0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25 -.byte 0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16 -.byte 0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92 -.byte 0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda -.byte 0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84 -.byte 0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a -.byte 0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06 -.byte 0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02 -.byte 0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b -.byte 0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea -.byte 0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73 -.byte 0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85 -.byte 0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e -.byte 0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89 -.byte 0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b -.byte 0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20 -.byte 0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4 -.byte 0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31 -.byte 0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f -.byte 0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d -.byte 0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef -.byte 0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0 -.byte 0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61 -.byte 0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26 -.byte 0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d -.long 0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe -.long 0x1b1b1b1b, 0x1b1b1b1b, 0, 0 -.byte 0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38 -.byte 0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb -.byte 0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87 -.byte 0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb -.byte 0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d -.byte 0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e -.byte 0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2 -.byte 0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25 -.byte 0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16 -.byte 0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92 -.byte 0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda -.byte 0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84 -.byte 0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a -.byte 0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06 -.byte 0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02 -.byte 0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b -.byte 0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea -.byte 0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73 -.byte 0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85 -.byte 0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e -.byte 0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89 -.byte 0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b -.byte 0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20 -.byte 0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4 -.byte 0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31 -.byte 0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f -.byte 0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d -.byte 0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef -.byte 0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0 -.byte 0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61 -.byte 0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26 -.byte 0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d -.long 0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe -.long 0x1b1b1b1b, 0x1b1b1b1b, 0, 0 -.byte 0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38 -.byte 0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb -.byte 0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87 -.byte 0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb -.byte 0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d -.byte 0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e -.byte 0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2 -.byte 0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25 -.byte 0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16 -.byte 0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92 -.byte 0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda -.byte 0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84 -.byte 0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a -.byte 0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06 -.byte 0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02 -.byte 0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b -.byte 0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea -.byte 0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73 -.byte 0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85 -.byte 0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e -.byte 0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89 -.byte 0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b -.byte 0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20 -.byte 0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4 -.byte 0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31 -.byte 0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f -.byte 0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d -.byte 0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef -.byte 0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0 -.byte 0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61 -.byte 0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26 -.byte 0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d -.long 0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe -.long 0x1b1b1b1b, 0x1b1b1b1b, 0, 0 -.byte 65,69,83,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 64 -#endif diff --git a/third_party/boringssl/linux-x86_64/crypto/aes/aesni-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/aes/aesni-x86_64.S deleted file mode 100644 index 1d51d5b50efda..0000000000000 --- a/third_party/boringssl/linux-x86_64/crypto/aes/aesni-x86_64.S +++ /dev/null @@ -1,3565 +0,0 @@ -#if defined(__x86_64__) -.text -.extern OPENSSL_ia32cap_P -.hidden OPENSSL_ia32cap_P -.globl aesni_encrypt -.hidden aesni_encrypt -.type aesni_encrypt,@function -.align 16 -aesni_encrypt: - movups (%rdi),%xmm2 - movl 240(%rdx),%eax - movups (%rdx),%xmm0 - movups 16(%rdx),%xmm1 - leaq 32(%rdx),%rdx - xorps %xmm0,%xmm2 -.Loop_enc1_1: -.byte 102,15,56,220,209 - decl %eax - movups (%rdx),%xmm1 - leaq 16(%rdx),%rdx - jnz .Loop_enc1_1 -.byte 102,15,56,221,209 - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - .byte 0xf3,0xc3 -.size aesni_encrypt,.-aesni_encrypt - -.globl aesni_decrypt -.hidden aesni_decrypt -.type aesni_decrypt,@function -.align 16 -aesni_decrypt: - movups (%rdi),%xmm2 - movl 240(%rdx),%eax - movups (%rdx),%xmm0 - movups 16(%rdx),%xmm1 - leaq 32(%rdx),%rdx - xorps %xmm0,%xmm2 -.Loop_dec1_2: -.byte 102,15,56,222,209 - decl %eax - movups (%rdx),%xmm1 - leaq 16(%rdx),%rdx - jnz .Loop_dec1_2 -.byte 102,15,56,223,209 - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - .byte 0xf3,0xc3 -.size aesni_decrypt, .-aesni_decrypt -.type _aesni_encrypt2,@function -.align 16 -_aesni_encrypt2: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - xorps %xmm0,%xmm3 - movups 32(%rcx),%xmm0 - leaq 32(%rcx,%rax,1),%rcx - negq %rax - addq $16,%rax - -.Lenc_loop2: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 - movups -16(%rcx,%rax,1),%xmm0 - jnz .Lenc_loop2 - -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 - .byte 0xf3,0xc3 -.size _aesni_encrypt2,.-_aesni_encrypt2 -.type _aesni_decrypt2,@function -.align 16 -_aesni_decrypt2: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - xorps %xmm0,%xmm3 - movups 32(%rcx),%xmm0 - leaq 32(%rcx,%rax,1),%rcx - negq %rax - addq $16,%rax - -.Ldec_loop2: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 - movups -16(%rcx,%rax,1),%xmm0 - jnz .Ldec_loop2 - -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,223,208 -.byte 102,15,56,223,216 - .byte 0xf3,0xc3 -.size _aesni_decrypt2,.-_aesni_decrypt2 -.type _aesni_encrypt3,@function -.align 16 -_aesni_encrypt3: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - xorps %xmm0,%xmm3 - xorps %xmm0,%xmm4 - movups 32(%rcx),%xmm0 - leaq 32(%rcx,%rax,1),%rcx - negq %rax - addq $16,%rax - -.Lenc_loop3: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 - movups -16(%rcx,%rax,1),%xmm0 - jnz .Lenc_loop3 - -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 -.byte 102,15,56,221,224 - .byte 0xf3,0xc3 -.size _aesni_encrypt3,.-_aesni_encrypt3 -.type _aesni_decrypt3,@function -.align 16 -_aesni_decrypt3: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - xorps %xmm0,%xmm3 - xorps %xmm0,%xmm4 - movups 32(%rcx),%xmm0 - leaq 32(%rcx,%rax,1),%rcx - negq %rax - addq $16,%rax - -.Ldec_loop3: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 - movups -16(%rcx,%rax,1),%xmm0 - jnz .Ldec_loop3 - -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,223,208 -.byte 102,15,56,223,216 -.byte 102,15,56,223,224 - .byte 0xf3,0xc3 -.size _aesni_decrypt3,.-_aesni_decrypt3 -.type _aesni_encrypt4,@function -.align 16 -_aesni_encrypt4: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - xorps %xmm0,%xmm3 - xorps %xmm0,%xmm4 - xorps %xmm0,%xmm5 - movups 32(%rcx),%xmm0 - leaq 32(%rcx,%rax,1),%rcx - negq %rax -.byte 0x0f,0x1f,0x00 - addq $16,%rax - -.Lenc_loop4: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 - movups -16(%rcx,%rax,1),%xmm0 - jnz .Lenc_loop4 - -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 -.byte 102,15,56,221,224 -.byte 102,15,56,221,232 - .byte 0xf3,0xc3 -.size _aesni_encrypt4,.-_aesni_encrypt4 -.type _aesni_decrypt4,@function -.align 16 -_aesni_decrypt4: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - xorps %xmm0,%xmm3 - xorps %xmm0,%xmm4 - xorps %xmm0,%xmm5 - movups 32(%rcx),%xmm0 - leaq 32(%rcx,%rax,1),%rcx - negq %rax -.byte 0x0f,0x1f,0x00 - addq $16,%rax - -.Ldec_loop4: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 - movups -16(%rcx,%rax,1),%xmm0 - jnz .Ldec_loop4 - -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,223,208 -.byte 102,15,56,223,216 -.byte 102,15,56,223,224 -.byte 102,15,56,223,232 - .byte 0xf3,0xc3 -.size _aesni_decrypt4,.-_aesni_decrypt4 -.type _aesni_encrypt6,@function -.align 16 -_aesni_encrypt6: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - pxor %xmm0,%xmm4 -.byte 102,15,56,220,209 - leaq 32(%rcx,%rax,1),%rcx - negq %rax -.byte 102,15,56,220,217 - pxor %xmm0,%xmm5 - pxor %xmm0,%xmm6 -.byte 102,15,56,220,225 - pxor %xmm0,%xmm7 - movups (%rcx,%rax,1),%xmm0 - addq $16,%rax - jmp .Lenc_loop6_enter -.align 16 -.Lenc_loop6: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.Lenc_loop6_enter: -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 - movups -16(%rcx,%rax,1),%xmm0 - jnz .Lenc_loop6 - -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 -.byte 102,15,56,221,224 -.byte 102,15,56,221,232 -.byte 102,15,56,221,240 -.byte 102,15,56,221,248 - .byte 0xf3,0xc3 -.size _aesni_encrypt6,.-_aesni_encrypt6 -.type _aesni_decrypt6,@function -.align 16 -_aesni_decrypt6: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - pxor %xmm0,%xmm4 -.byte 102,15,56,222,209 - leaq 32(%rcx,%rax,1),%rcx - negq %rax -.byte 102,15,56,222,217 - pxor %xmm0,%xmm5 - pxor %xmm0,%xmm6 -.byte 102,15,56,222,225 - pxor %xmm0,%xmm7 - movups (%rcx,%rax,1),%xmm0 - addq $16,%rax - jmp .Ldec_loop6_enter -.align 16 -.Ldec_loop6: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.Ldec_loop6_enter: -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 - movups -16(%rcx,%rax,1),%xmm0 - jnz .Ldec_loop6 - -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,15,56,223,208 -.byte 102,15,56,223,216 -.byte 102,15,56,223,224 -.byte 102,15,56,223,232 -.byte 102,15,56,223,240 -.byte 102,15,56,223,248 - .byte 0xf3,0xc3 -.size _aesni_decrypt6,.-_aesni_decrypt6 -.type _aesni_encrypt8,@function -.align 16 -_aesni_encrypt8: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - xorps %xmm0,%xmm3 - pxor %xmm0,%xmm4 - pxor %xmm0,%xmm5 - pxor %xmm0,%xmm6 - leaq 32(%rcx,%rax,1),%rcx - negq %rax -.byte 102,15,56,220,209 - pxor %xmm0,%xmm7 - pxor %xmm0,%xmm8 -.byte 102,15,56,220,217 - pxor %xmm0,%xmm9 - movups (%rcx,%rax,1),%xmm0 - addq $16,%rax - jmp .Lenc_loop8_inner -.align 16 -.Lenc_loop8: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.Lenc_loop8_inner: -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 -.byte 102,68,15,56,220,201 -.Lenc_loop8_enter: - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 -.byte 102,68,15,56,220,192 -.byte 102,68,15,56,220,200 - movups -16(%rcx,%rax,1),%xmm0 - jnz .Lenc_loop8 - -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 -.byte 102,68,15,56,220,201 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 -.byte 102,15,56,221,224 -.byte 102,15,56,221,232 -.byte 102,15,56,221,240 -.byte 102,15,56,221,248 -.byte 102,68,15,56,221,192 -.byte 102,68,15,56,221,200 - .byte 0xf3,0xc3 -.size _aesni_encrypt8,.-_aesni_encrypt8 -.type _aesni_decrypt8,@function -.align 16 -_aesni_decrypt8: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - xorps %xmm0,%xmm3 - pxor %xmm0,%xmm4 - pxor %xmm0,%xmm5 - pxor %xmm0,%xmm6 - leaq 32(%rcx,%rax,1),%rcx - negq %rax -.byte 102,15,56,222,209 - pxor %xmm0,%xmm7 - pxor %xmm0,%xmm8 -.byte 102,15,56,222,217 - pxor %xmm0,%xmm9 - movups (%rcx,%rax,1),%xmm0 - addq $16,%rax - jmp .Ldec_loop8_inner -.align 16 -.Ldec_loop8: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.Ldec_loop8_inner: -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,68,15,56,222,193 -.byte 102,68,15,56,222,201 -.Ldec_loop8_enter: - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 -.byte 102,68,15,56,222,192 -.byte 102,68,15,56,222,200 - movups -16(%rcx,%rax,1),%xmm0 - jnz .Ldec_loop8 - -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,68,15,56,222,193 -.byte 102,68,15,56,222,201 -.byte 102,15,56,223,208 -.byte 102,15,56,223,216 -.byte 102,15,56,223,224 -.byte 102,15,56,223,232 -.byte 102,15,56,223,240 -.byte 102,15,56,223,248 -.byte 102,68,15,56,223,192 -.byte 102,68,15,56,223,200 - .byte 0xf3,0xc3 -.size _aesni_decrypt8,.-_aesni_decrypt8 -.globl aesni_ecb_encrypt -.hidden aesni_ecb_encrypt -.type aesni_ecb_encrypt,@function -.align 16 -aesni_ecb_encrypt: - andq $-16,%rdx - jz .Lecb_ret - - movl 240(%rcx),%eax - movups (%rcx),%xmm0 - movq %rcx,%r11 - movl %eax,%r10d - testl %r8d,%r8d - jz .Lecb_decrypt - - cmpq $128,%rdx - jb .Lecb_enc_tail - - movdqu (%rdi),%xmm2 - movdqu 16(%rdi),%xmm3 - movdqu 32(%rdi),%xmm4 - movdqu 48(%rdi),%xmm5 - movdqu 64(%rdi),%xmm6 - movdqu 80(%rdi),%xmm7 - movdqu 96(%rdi),%xmm8 - movdqu 112(%rdi),%xmm9 - leaq 128(%rdi),%rdi - subq $128,%rdx - jmp .Lecb_enc_loop8_enter -.align 16 -.Lecb_enc_loop8: - movups %xmm2,(%rsi) - movq %r11,%rcx - movdqu (%rdi),%xmm2 - movl %r10d,%eax - movups %xmm3,16(%rsi) - movdqu 16(%rdi),%xmm3 - movups %xmm4,32(%rsi) - movdqu 32(%rdi),%xmm4 - movups %xmm5,48(%rsi) - movdqu 48(%rdi),%xmm5 - movups %xmm6,64(%rsi) - movdqu 64(%rdi),%xmm6 - movups %xmm7,80(%rsi) - movdqu 80(%rdi),%xmm7 - movups %xmm8,96(%rsi) - movdqu 96(%rdi),%xmm8 - movups %xmm9,112(%rsi) - leaq 128(%rsi),%rsi - movdqu 112(%rdi),%xmm9 - leaq 128(%rdi),%rdi -.Lecb_enc_loop8_enter: - - call _aesni_encrypt8 - - subq $128,%rdx - jnc .Lecb_enc_loop8 - - movups %xmm2,(%rsi) - movq %r11,%rcx - movups %xmm3,16(%rsi) - movl %r10d,%eax - movups %xmm4,32(%rsi) - movups %xmm5,48(%rsi) - movups %xmm6,64(%rsi) - movups %xmm7,80(%rsi) - movups %xmm8,96(%rsi) - movups %xmm9,112(%rsi) - leaq 128(%rsi),%rsi - addq $128,%rdx - jz .Lecb_ret - -.Lecb_enc_tail: - movups (%rdi),%xmm2 - cmpq $32,%rdx - jb .Lecb_enc_one - movups 16(%rdi),%xmm3 - je .Lecb_enc_two - movups 32(%rdi),%xmm4 - cmpq $64,%rdx - jb .Lecb_enc_three - movups 48(%rdi),%xmm5 - je .Lecb_enc_four - movups 64(%rdi),%xmm6 - cmpq $96,%rdx - jb .Lecb_enc_five - movups 80(%rdi),%xmm7 - je .Lecb_enc_six - movdqu 96(%rdi),%xmm8 - xorps %xmm9,%xmm9 - call _aesni_encrypt8 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - movups %xmm4,32(%rsi) - movups %xmm5,48(%rsi) - movups %xmm6,64(%rsi) - movups %xmm7,80(%rsi) - movups %xmm8,96(%rsi) - jmp .Lecb_ret -.align 16 -.Lecb_enc_one: - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -.Loop_enc1_3: -.byte 102,15,56,220,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz .Loop_enc1_3 -.byte 102,15,56,221,209 - movups %xmm2,(%rsi) - jmp .Lecb_ret -.align 16 -.Lecb_enc_two: - call _aesni_encrypt2 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - jmp .Lecb_ret -.align 16 -.Lecb_enc_three: - call _aesni_encrypt3 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - movups %xmm4,32(%rsi) - jmp .Lecb_ret -.align 16 -.Lecb_enc_four: - call _aesni_encrypt4 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - movups %xmm4,32(%rsi) - movups %xmm5,48(%rsi) - jmp .Lecb_ret -.align 16 -.Lecb_enc_five: - xorps %xmm7,%xmm7 - call _aesni_encrypt6 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - movups %xmm4,32(%rsi) - movups %xmm5,48(%rsi) - movups %xmm6,64(%rsi) - jmp .Lecb_ret -.align 16 -.Lecb_enc_six: - call _aesni_encrypt6 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - movups %xmm4,32(%rsi) - movups %xmm5,48(%rsi) - movups %xmm6,64(%rsi) - movups %xmm7,80(%rsi) - jmp .Lecb_ret - -.align 16 -.Lecb_decrypt: - cmpq $128,%rdx - jb .Lecb_dec_tail - - movdqu (%rdi),%xmm2 - movdqu 16(%rdi),%xmm3 - movdqu 32(%rdi),%xmm4 - movdqu 48(%rdi),%xmm5 - movdqu 64(%rdi),%xmm6 - movdqu 80(%rdi),%xmm7 - movdqu 96(%rdi),%xmm8 - movdqu 112(%rdi),%xmm9 - leaq 128(%rdi),%rdi - subq $128,%rdx - jmp .Lecb_dec_loop8_enter -.align 16 -.Lecb_dec_loop8: - movups %xmm2,(%rsi) - movq %r11,%rcx - movdqu (%rdi),%xmm2 - movl %r10d,%eax - movups %xmm3,16(%rsi) - movdqu 16(%rdi),%xmm3 - movups %xmm4,32(%rsi) - movdqu 32(%rdi),%xmm4 - movups %xmm5,48(%rsi) - movdqu 48(%rdi),%xmm5 - movups %xmm6,64(%rsi) - movdqu 64(%rdi),%xmm6 - movups %xmm7,80(%rsi) - movdqu 80(%rdi),%xmm7 - movups %xmm8,96(%rsi) - movdqu 96(%rdi),%xmm8 - movups %xmm9,112(%rsi) - leaq 128(%rsi),%rsi - movdqu 112(%rdi),%xmm9 - leaq 128(%rdi),%rdi -.Lecb_dec_loop8_enter: - - call _aesni_decrypt8 - - movups (%r11),%xmm0 - subq $128,%rdx - jnc .Lecb_dec_loop8 - - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - movq %r11,%rcx - movups %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - movl %r10d,%eax - movups %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - movups %xmm5,48(%rsi) - pxor %xmm5,%xmm5 - movups %xmm6,64(%rsi) - pxor %xmm6,%xmm6 - movups %xmm7,80(%rsi) - pxor %xmm7,%xmm7 - movups %xmm8,96(%rsi) - pxor %xmm8,%xmm8 - movups %xmm9,112(%rsi) - pxor %xmm9,%xmm9 - leaq 128(%rsi),%rsi - addq $128,%rdx - jz .Lecb_ret - -.Lecb_dec_tail: - movups (%rdi),%xmm2 - cmpq $32,%rdx - jb .Lecb_dec_one - movups 16(%rdi),%xmm3 - je .Lecb_dec_two - movups 32(%rdi),%xmm4 - cmpq $64,%rdx - jb .Lecb_dec_three - movups 48(%rdi),%xmm5 - je .Lecb_dec_four - movups 64(%rdi),%xmm6 - cmpq $96,%rdx - jb .Lecb_dec_five - movups 80(%rdi),%xmm7 - je .Lecb_dec_six - movups 96(%rdi),%xmm8 - movups (%rcx),%xmm0 - xorps %xmm9,%xmm9 - call _aesni_decrypt8 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - movups %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - movups %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - movups %xmm5,48(%rsi) - pxor %xmm5,%xmm5 - movups %xmm6,64(%rsi) - pxor %xmm6,%xmm6 - movups %xmm7,80(%rsi) - pxor %xmm7,%xmm7 - movups %xmm8,96(%rsi) - pxor %xmm8,%xmm8 - pxor %xmm9,%xmm9 - jmp .Lecb_ret -.align 16 -.Lecb_dec_one: - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -.Loop_dec1_4: -.byte 102,15,56,222,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz .Loop_dec1_4 -.byte 102,15,56,223,209 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - jmp .Lecb_ret -.align 16 -.Lecb_dec_two: - call _aesni_decrypt2 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - movups %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - jmp .Lecb_ret -.align 16 -.Lecb_dec_three: - call _aesni_decrypt3 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - movups %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - movups %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - jmp .Lecb_ret -.align 16 -.Lecb_dec_four: - call _aesni_decrypt4 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - movups %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - movups %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - movups %xmm5,48(%rsi) - pxor %xmm5,%xmm5 - jmp .Lecb_ret -.align 16 -.Lecb_dec_five: - xorps %xmm7,%xmm7 - call _aesni_decrypt6 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - movups %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - movups %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - movups %xmm5,48(%rsi) - pxor %xmm5,%xmm5 - movups %xmm6,64(%rsi) - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - jmp .Lecb_ret -.align 16 -.Lecb_dec_six: - call _aesni_decrypt6 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - movups %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - movups %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - movups %xmm5,48(%rsi) - pxor %xmm5,%xmm5 - movups %xmm6,64(%rsi) - pxor %xmm6,%xmm6 - movups %xmm7,80(%rsi) - pxor %xmm7,%xmm7 - -.Lecb_ret: - xorps %xmm0,%xmm0 - pxor %xmm1,%xmm1 - .byte 0xf3,0xc3 -.size aesni_ecb_encrypt,.-aesni_ecb_encrypt -.globl aesni_ccm64_encrypt_blocks -.hidden aesni_ccm64_encrypt_blocks -.type aesni_ccm64_encrypt_blocks,@function -.align 16 -aesni_ccm64_encrypt_blocks: - movl 240(%rcx),%eax - movdqu (%r8),%xmm6 - movdqa .Lincrement64(%rip),%xmm9 - movdqa .Lbswap_mask(%rip),%xmm7 - - shll $4,%eax - movl $16,%r10d - leaq 0(%rcx),%r11 - movdqu (%r9),%xmm3 - movdqa %xmm6,%xmm2 - leaq 32(%rcx,%rax,1),%rcx -.byte 102,15,56,0,247 - subq %rax,%r10 - jmp .Lccm64_enc_outer -.align 16 -.Lccm64_enc_outer: - movups (%r11),%xmm0 - movq %r10,%rax - movups (%rdi),%xmm8 - - xorps %xmm0,%xmm2 - movups 16(%r11),%xmm1 - xorps %xmm8,%xmm0 - xorps %xmm0,%xmm3 - movups 32(%r11),%xmm0 - -.Lccm64_enc2_loop: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 - movups -16(%rcx,%rax,1),%xmm0 - jnz .Lccm64_enc2_loop -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - paddq %xmm9,%xmm6 - decq %rdx -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 - - leaq 16(%rdi),%rdi - xorps %xmm2,%xmm8 - movdqa %xmm6,%xmm2 - movups %xmm8,(%rsi) -.byte 102,15,56,0,215 - leaq 16(%rsi),%rsi - jnz .Lccm64_enc_outer - - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - movups %xmm3,(%r9) - pxor %xmm3,%xmm3 - pxor %xmm8,%xmm8 - pxor %xmm6,%xmm6 - .byte 0xf3,0xc3 -.size aesni_ccm64_encrypt_blocks,.-aesni_ccm64_encrypt_blocks -.globl aesni_ccm64_decrypt_blocks -.hidden aesni_ccm64_decrypt_blocks -.type aesni_ccm64_decrypt_blocks,@function -.align 16 -aesni_ccm64_decrypt_blocks: - movl 240(%rcx),%eax - movups (%r8),%xmm6 - movdqu (%r9),%xmm3 - movdqa .Lincrement64(%rip),%xmm9 - movdqa .Lbswap_mask(%rip),%xmm7 - - movaps %xmm6,%xmm2 - movl %eax,%r10d - movq %rcx,%r11 -.byte 102,15,56,0,247 - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -.Loop_enc1_5: -.byte 102,15,56,220,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz .Loop_enc1_5 -.byte 102,15,56,221,209 - shll $4,%r10d - movl $16,%eax - movups (%rdi),%xmm8 - paddq %xmm9,%xmm6 - leaq 16(%rdi),%rdi - subq %r10,%rax - leaq 32(%r11,%r10,1),%rcx - movq %rax,%r10 - jmp .Lccm64_dec_outer -.align 16 -.Lccm64_dec_outer: - xorps %xmm2,%xmm8 - movdqa %xmm6,%xmm2 - movups %xmm8,(%rsi) - leaq 16(%rsi),%rsi -.byte 102,15,56,0,215 - - subq $1,%rdx - jz .Lccm64_dec_break - - movups (%r11),%xmm0 - movq %r10,%rax - movups 16(%r11),%xmm1 - xorps %xmm0,%xmm8 - xorps %xmm0,%xmm2 - xorps %xmm8,%xmm3 - movups 32(%r11),%xmm0 - jmp .Lccm64_dec2_loop -.align 16 -.Lccm64_dec2_loop: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 - movups -16(%rcx,%rax,1),%xmm0 - jnz .Lccm64_dec2_loop - movups (%rdi),%xmm8 - paddq %xmm9,%xmm6 -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 - leaq 16(%rdi),%rdi - jmp .Lccm64_dec_outer - -.align 16 -.Lccm64_dec_break: - - movl 240(%r11),%eax - movups (%r11),%xmm0 - movups 16(%r11),%xmm1 - xorps %xmm0,%xmm8 - leaq 32(%r11),%r11 - xorps %xmm8,%xmm3 -.Loop_enc1_6: -.byte 102,15,56,220,217 - decl %eax - movups (%r11),%xmm1 - leaq 16(%r11),%r11 - jnz .Loop_enc1_6 -.byte 102,15,56,221,217 - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - movups %xmm3,(%r9) - pxor %xmm3,%xmm3 - pxor %xmm8,%xmm8 - pxor %xmm6,%xmm6 - .byte 0xf3,0xc3 -.size aesni_ccm64_decrypt_blocks,.-aesni_ccm64_decrypt_blocks -.globl aesni_ctr32_encrypt_blocks -.hidden aesni_ctr32_encrypt_blocks -.type aesni_ctr32_encrypt_blocks,@function -.align 16 -aesni_ctr32_encrypt_blocks: - cmpq $1,%rdx - jne .Lctr32_bulk - - - - movups (%r8),%xmm2 - movups (%rdi),%xmm3 - movl 240(%rcx),%edx - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -.Loop_enc1_7: -.byte 102,15,56,220,209 - decl %edx - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz .Loop_enc1_7 -.byte 102,15,56,221,209 - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - xorps %xmm3,%xmm2 - pxor %xmm3,%xmm3 - movups %xmm2,(%rsi) - xorps %xmm2,%xmm2 - jmp .Lctr32_epilogue - -.align 16 -.Lctr32_bulk: - leaq (%rsp),%rax - pushq %rbp - subq $128,%rsp - andq $-16,%rsp - leaq -8(%rax),%rbp - - - - - movdqu (%r8),%xmm2 - movdqu (%rcx),%xmm0 - movl 12(%r8),%r8d - pxor %xmm0,%xmm2 - movl 12(%rcx),%r11d - movdqa %xmm2,0(%rsp) - bswapl %r8d - movdqa %xmm2,%xmm3 - movdqa %xmm2,%xmm4 - movdqa %xmm2,%xmm5 - movdqa %xmm2,64(%rsp) - movdqa %xmm2,80(%rsp) - movdqa %xmm2,96(%rsp) - movq %rdx,%r10 - movdqa %xmm2,112(%rsp) - - leaq 1(%r8),%rax - leaq 2(%r8),%rdx - bswapl %eax - bswapl %edx - xorl %r11d,%eax - xorl %r11d,%edx -.byte 102,15,58,34,216,3 - leaq 3(%r8),%rax - movdqa %xmm3,16(%rsp) -.byte 102,15,58,34,226,3 - bswapl %eax - movq %r10,%rdx - leaq 4(%r8),%r10 - movdqa %xmm4,32(%rsp) - xorl %r11d,%eax - bswapl %r10d -.byte 102,15,58,34,232,3 - xorl %r11d,%r10d - movdqa %xmm5,48(%rsp) - leaq 5(%r8),%r9 - movl %r10d,64+12(%rsp) - bswapl %r9d - leaq 6(%r8),%r10 - movl 240(%rcx),%eax - xorl %r11d,%r9d - bswapl %r10d - movl %r9d,80+12(%rsp) - xorl %r11d,%r10d - leaq 7(%r8),%r9 - movl %r10d,96+12(%rsp) - bswapl %r9d - movl OPENSSL_ia32cap_P+4(%rip),%r10d - xorl %r11d,%r9d - andl $71303168,%r10d - movl %r9d,112+12(%rsp) - - movups 16(%rcx),%xmm1 - - movdqa 64(%rsp),%xmm6 - movdqa 80(%rsp),%xmm7 - - cmpq $8,%rdx - jb .Lctr32_tail - - subq $6,%rdx - cmpl $4194304,%r10d - je .Lctr32_6x - - leaq 128(%rcx),%rcx - subq $2,%rdx - jmp .Lctr32_loop8 - -.align 16 -.Lctr32_6x: - shll $4,%eax - movl $48,%r10d - bswapl %r11d - leaq 32(%rcx,%rax,1),%rcx - subq %rax,%r10 - jmp .Lctr32_loop6 - -.align 16 -.Lctr32_loop6: - addl $6,%r8d - movups -48(%rcx,%r10,1),%xmm0 -.byte 102,15,56,220,209 - movl %r8d,%eax - xorl %r11d,%eax -.byte 102,15,56,220,217 -.byte 0x0f,0x38,0xf1,0x44,0x24,12 - leal 1(%r8),%eax -.byte 102,15,56,220,225 - xorl %r11d,%eax -.byte 0x0f,0x38,0xf1,0x44,0x24,28 -.byte 102,15,56,220,233 - leal 2(%r8),%eax - xorl %r11d,%eax -.byte 102,15,56,220,241 -.byte 0x0f,0x38,0xf1,0x44,0x24,44 - leal 3(%r8),%eax -.byte 102,15,56,220,249 - movups -32(%rcx,%r10,1),%xmm1 - xorl %r11d,%eax - -.byte 102,15,56,220,208 -.byte 0x0f,0x38,0xf1,0x44,0x24,60 - leal 4(%r8),%eax -.byte 102,15,56,220,216 - xorl %r11d,%eax -.byte 0x0f,0x38,0xf1,0x44,0x24,76 -.byte 102,15,56,220,224 - leal 5(%r8),%eax - xorl %r11d,%eax -.byte 102,15,56,220,232 -.byte 0x0f,0x38,0xf1,0x44,0x24,92 - movq %r10,%rax -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 - movups -16(%rcx,%r10,1),%xmm0 - - call .Lenc_loop6 - - movdqu (%rdi),%xmm8 - movdqu 16(%rdi),%xmm9 - movdqu 32(%rdi),%xmm10 - movdqu 48(%rdi),%xmm11 - movdqu 64(%rdi),%xmm12 - movdqu 80(%rdi),%xmm13 - leaq 96(%rdi),%rdi - movups -64(%rcx,%r10,1),%xmm1 - pxor %xmm2,%xmm8 - movaps 0(%rsp),%xmm2 - pxor %xmm3,%xmm9 - movaps 16(%rsp),%xmm3 - pxor %xmm4,%xmm10 - movaps 32(%rsp),%xmm4 - pxor %xmm5,%xmm11 - movaps 48(%rsp),%xmm5 - pxor %xmm6,%xmm12 - movaps 64(%rsp),%xmm6 - pxor %xmm7,%xmm13 - movaps 80(%rsp),%xmm7 - movdqu %xmm8,(%rsi) - movdqu %xmm9,16(%rsi) - movdqu %xmm10,32(%rsi) - movdqu %xmm11,48(%rsi) - movdqu %xmm12,64(%rsi) - movdqu %xmm13,80(%rsi) - leaq 96(%rsi),%rsi - - subq $6,%rdx - jnc .Lctr32_loop6 - - addq $6,%rdx - jz .Lctr32_done - - leal -48(%r10),%eax - leaq -80(%rcx,%r10,1),%rcx - negl %eax - shrl $4,%eax - jmp .Lctr32_tail - -.align 32 -.Lctr32_loop8: - addl $8,%r8d - movdqa 96(%rsp),%xmm8 -.byte 102,15,56,220,209 - movl %r8d,%r9d - movdqa 112(%rsp),%xmm9 -.byte 102,15,56,220,217 - bswapl %r9d - movups 32-128(%rcx),%xmm0 -.byte 102,15,56,220,225 - xorl %r11d,%r9d - nop -.byte 102,15,56,220,233 - movl %r9d,0+12(%rsp) - leaq 1(%r8),%r9 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 -.byte 102,68,15,56,220,201 - movups 48-128(%rcx),%xmm1 - bswapl %r9d -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 - xorl %r11d,%r9d -.byte 0x66,0x90 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 - movl %r9d,16+12(%rsp) - leaq 2(%r8),%r9 -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 -.byte 102,68,15,56,220,192 -.byte 102,68,15,56,220,200 - movups 64-128(%rcx),%xmm0 - bswapl %r9d -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - xorl %r11d,%r9d -.byte 0x66,0x90 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 - movl %r9d,32+12(%rsp) - leaq 3(%r8),%r9 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 -.byte 102,68,15,56,220,201 - movups 80-128(%rcx),%xmm1 - bswapl %r9d -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 - xorl %r11d,%r9d -.byte 0x66,0x90 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 - movl %r9d,48+12(%rsp) - leaq 4(%r8),%r9 -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 -.byte 102,68,15,56,220,192 -.byte 102,68,15,56,220,200 - movups 96-128(%rcx),%xmm0 - bswapl %r9d -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - xorl %r11d,%r9d -.byte 0x66,0x90 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 - movl %r9d,64+12(%rsp) - leaq 5(%r8),%r9 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 -.byte 102,68,15,56,220,201 - movups 112-128(%rcx),%xmm1 - bswapl %r9d -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 - xorl %r11d,%r9d -.byte 0x66,0x90 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 - movl %r9d,80+12(%rsp) - leaq 6(%r8),%r9 -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 -.byte 102,68,15,56,220,192 -.byte 102,68,15,56,220,200 - movups 128-128(%rcx),%xmm0 - bswapl %r9d -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - xorl %r11d,%r9d -.byte 0x66,0x90 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 - movl %r9d,96+12(%rsp) - leaq 7(%r8),%r9 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 -.byte 102,68,15,56,220,201 - movups 144-128(%rcx),%xmm1 - bswapl %r9d -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 - xorl %r11d,%r9d - movdqu 0(%rdi),%xmm10 -.byte 102,15,56,220,232 - movl %r9d,112+12(%rsp) - cmpl $11,%eax -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 -.byte 102,68,15,56,220,192 -.byte 102,68,15,56,220,200 - movups 160-128(%rcx),%xmm0 - - jb .Lctr32_enc_done - -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 -.byte 102,68,15,56,220,201 - movups 176-128(%rcx),%xmm1 - -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 -.byte 102,68,15,56,220,192 -.byte 102,68,15,56,220,200 - movups 192-128(%rcx),%xmm0 - je .Lctr32_enc_done - -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 -.byte 102,68,15,56,220,201 - movups 208-128(%rcx),%xmm1 - -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 -.byte 102,68,15,56,220,192 -.byte 102,68,15,56,220,200 - movups 224-128(%rcx),%xmm0 - jmp .Lctr32_enc_done - -.align 16 -.Lctr32_enc_done: - movdqu 16(%rdi),%xmm11 - pxor %xmm0,%xmm10 - movdqu 32(%rdi),%xmm12 - pxor %xmm0,%xmm11 - movdqu 48(%rdi),%xmm13 - pxor %xmm0,%xmm12 - movdqu 64(%rdi),%xmm14 - pxor %xmm0,%xmm13 - movdqu 80(%rdi),%xmm15 - pxor %xmm0,%xmm14 - pxor %xmm0,%xmm15 -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 -.byte 102,68,15,56,220,201 - movdqu 96(%rdi),%xmm1 - leaq 128(%rdi),%rdi - -.byte 102,65,15,56,221,210 - pxor %xmm0,%xmm1 - movdqu 112-128(%rdi),%xmm10 -.byte 102,65,15,56,221,219 - pxor %xmm0,%xmm10 - movdqa 0(%rsp),%xmm11 -.byte 102,65,15,56,221,228 -.byte 102,65,15,56,221,237 - movdqa 16(%rsp),%xmm12 - movdqa 32(%rsp),%xmm13 -.byte 102,65,15,56,221,246 -.byte 102,65,15,56,221,255 - movdqa 48(%rsp),%xmm14 - movdqa 64(%rsp),%xmm15 -.byte 102,68,15,56,221,193 - movdqa 80(%rsp),%xmm0 - movups 16-128(%rcx),%xmm1 -.byte 102,69,15,56,221,202 - - movups %xmm2,(%rsi) - movdqa %xmm11,%xmm2 - movups %xmm3,16(%rsi) - movdqa %xmm12,%xmm3 - movups %xmm4,32(%rsi) - movdqa %xmm13,%xmm4 - movups %xmm5,48(%rsi) - movdqa %xmm14,%xmm5 - movups %xmm6,64(%rsi) - movdqa %xmm15,%xmm6 - movups %xmm7,80(%rsi) - movdqa %xmm0,%xmm7 - movups %xmm8,96(%rsi) - movups %xmm9,112(%rsi) - leaq 128(%rsi),%rsi - - subq $8,%rdx - jnc .Lctr32_loop8 - - addq $8,%rdx - jz .Lctr32_done - leaq -128(%rcx),%rcx - -.Lctr32_tail: - - - leaq 16(%rcx),%rcx - cmpq $4,%rdx - jb .Lctr32_loop3 - je .Lctr32_loop4 - - - shll $4,%eax - movdqa 96(%rsp),%xmm8 - pxor %xmm9,%xmm9 - - movups 16(%rcx),%xmm0 -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - leaq 32-16(%rcx,%rax,1),%rcx - negq %rax -.byte 102,15,56,220,225 - addq $16,%rax - movups (%rdi),%xmm10 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 - movups 16(%rdi),%xmm11 - movups 32(%rdi),%xmm12 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 - - call .Lenc_loop8_enter - - movdqu 48(%rdi),%xmm13 - pxor %xmm10,%xmm2 - movdqu 64(%rdi),%xmm10 - pxor %xmm11,%xmm3 - movdqu %xmm2,(%rsi) - pxor %xmm12,%xmm4 - movdqu %xmm3,16(%rsi) - pxor %xmm13,%xmm5 - movdqu %xmm4,32(%rsi) - pxor %xmm10,%xmm6 - movdqu %xmm5,48(%rsi) - movdqu %xmm6,64(%rsi) - cmpq $6,%rdx - jb .Lctr32_done - - movups 80(%rdi),%xmm11 - xorps %xmm11,%xmm7 - movups %xmm7,80(%rsi) - je .Lctr32_done - - movups 96(%rdi),%xmm12 - xorps %xmm12,%xmm8 - movups %xmm8,96(%rsi) - jmp .Lctr32_done - -.align 32 -.Lctr32_loop4: -.byte 102,15,56,220,209 - leaq 16(%rcx),%rcx - decl %eax -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 - movups (%rcx),%xmm1 - jnz .Lctr32_loop4 -.byte 102,15,56,221,209 -.byte 102,15,56,221,217 - movups (%rdi),%xmm10 - movups 16(%rdi),%xmm11 -.byte 102,15,56,221,225 -.byte 102,15,56,221,233 - movups 32(%rdi),%xmm12 - movups 48(%rdi),%xmm13 - - xorps %xmm10,%xmm2 - movups %xmm2,(%rsi) - xorps %xmm11,%xmm3 - movups %xmm3,16(%rsi) - pxor %xmm12,%xmm4 - movdqu %xmm4,32(%rsi) - pxor %xmm13,%xmm5 - movdqu %xmm5,48(%rsi) - jmp .Lctr32_done - -.align 32 -.Lctr32_loop3: -.byte 102,15,56,220,209 - leaq 16(%rcx),%rcx - decl %eax -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 - movups (%rcx),%xmm1 - jnz .Lctr32_loop3 -.byte 102,15,56,221,209 -.byte 102,15,56,221,217 -.byte 102,15,56,221,225 - - movups (%rdi),%xmm10 - xorps %xmm10,%xmm2 - movups %xmm2,(%rsi) - cmpq $2,%rdx - jb .Lctr32_done - - movups 16(%rdi),%xmm11 - xorps %xmm11,%xmm3 - movups %xmm3,16(%rsi) - je .Lctr32_done - - movups 32(%rdi),%xmm12 - xorps %xmm12,%xmm4 - movups %xmm4,32(%rsi) - -.Lctr32_done: - xorps %xmm0,%xmm0 - xorl %r11d,%r11d - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - movaps %xmm0,0(%rsp) - pxor %xmm8,%xmm8 - movaps %xmm0,16(%rsp) - pxor %xmm9,%xmm9 - movaps %xmm0,32(%rsp) - pxor %xmm10,%xmm10 - movaps %xmm0,48(%rsp) - pxor %xmm11,%xmm11 - movaps %xmm0,64(%rsp) - pxor %xmm12,%xmm12 - movaps %xmm0,80(%rsp) - pxor %xmm13,%xmm13 - movaps %xmm0,96(%rsp) - pxor %xmm14,%xmm14 - movaps %xmm0,112(%rsp) - pxor %xmm15,%xmm15 - leaq (%rbp),%rsp - popq %rbp -.Lctr32_epilogue: - .byte 0xf3,0xc3 -.size aesni_ctr32_encrypt_blocks,.-aesni_ctr32_encrypt_blocks -.globl aesni_xts_encrypt -.hidden aesni_xts_encrypt -.type aesni_xts_encrypt,@function -.align 16 -aesni_xts_encrypt: - leaq (%rsp),%rax - pushq %rbp - subq $112,%rsp - andq $-16,%rsp - leaq -8(%rax),%rbp - movups (%r9),%xmm2 - movl 240(%r8),%eax - movl 240(%rcx),%r10d - movups (%r8),%xmm0 - movups 16(%r8),%xmm1 - leaq 32(%r8),%r8 - xorps %xmm0,%xmm2 -.Loop_enc1_8: -.byte 102,15,56,220,209 - decl %eax - movups (%r8),%xmm1 - leaq 16(%r8),%r8 - jnz .Loop_enc1_8 -.byte 102,15,56,221,209 - movups (%rcx),%xmm0 - movq %rcx,%r11 - movl %r10d,%eax - shll $4,%r10d - movq %rdx,%r9 - andq $-16,%rdx - - movups 16(%rcx,%r10,1),%xmm1 - - movdqa .Lxts_magic(%rip),%xmm8 - movdqa %xmm2,%xmm15 - pshufd $95,%xmm2,%xmm9 - pxor %xmm0,%xmm1 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 - movdqa %xmm15,%xmm10 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 - pxor %xmm0,%xmm10 - pxor %xmm14,%xmm15 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 - movdqa %xmm15,%xmm11 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 - pxor %xmm0,%xmm11 - pxor %xmm14,%xmm15 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 - movdqa %xmm15,%xmm12 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 - pxor %xmm0,%xmm12 - pxor %xmm14,%xmm15 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 - movdqa %xmm15,%xmm13 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 - pxor %xmm0,%xmm13 - pxor %xmm14,%xmm15 - movdqa %xmm15,%xmm14 - psrad $31,%xmm9 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm9 - pxor %xmm0,%xmm14 - pxor %xmm9,%xmm15 - movaps %xmm1,96(%rsp) - - subq $96,%rdx - jc .Lxts_enc_short - - movl $16+96,%eax - leaq 32(%r11,%r10,1),%rcx - subq %r10,%rax - movups 16(%r11),%xmm1 - movq %rax,%r10 - leaq .Lxts_magic(%rip),%r8 - jmp .Lxts_enc_grandloop - -.align 32 -.Lxts_enc_grandloop: - movdqu 0(%rdi),%xmm2 - movdqa %xmm0,%xmm8 - movdqu 16(%rdi),%xmm3 - pxor %xmm10,%xmm2 - movdqu 32(%rdi),%xmm4 - pxor %xmm11,%xmm3 -.byte 102,15,56,220,209 - movdqu 48(%rdi),%xmm5 - pxor %xmm12,%xmm4 -.byte 102,15,56,220,217 - movdqu 64(%rdi),%xmm6 - pxor %xmm13,%xmm5 -.byte 102,15,56,220,225 - movdqu 80(%rdi),%xmm7 - pxor %xmm15,%xmm8 - movdqa 96(%rsp),%xmm9 - pxor %xmm14,%xmm6 -.byte 102,15,56,220,233 - movups 32(%r11),%xmm0 - leaq 96(%rdi),%rdi - pxor %xmm8,%xmm7 - - pxor %xmm9,%xmm10 -.byte 102,15,56,220,241 - pxor %xmm9,%xmm11 - movdqa %xmm10,0(%rsp) -.byte 102,15,56,220,249 - movups 48(%r11),%xmm1 - pxor %xmm9,%xmm12 - -.byte 102,15,56,220,208 - pxor %xmm9,%xmm13 - movdqa %xmm11,16(%rsp) -.byte 102,15,56,220,216 - pxor %xmm9,%xmm14 - movdqa %xmm12,32(%rsp) -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 - pxor %xmm9,%xmm8 - movdqa %xmm14,64(%rsp) -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 - movups 64(%r11),%xmm0 - movdqa %xmm8,80(%rsp) - pshufd $95,%xmm15,%xmm9 - jmp .Lxts_enc_loop6 -.align 32 -.Lxts_enc_loop6: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 - movups -64(%rcx,%rax,1),%xmm1 - addq $32,%rax - -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 - movups -80(%rcx,%rax,1),%xmm0 - jnz .Lxts_enc_loop6 - - movdqa (%r8),%xmm8 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 -.byte 102,15,56,220,209 - paddq %xmm15,%xmm15 - psrad $31,%xmm14 -.byte 102,15,56,220,217 - pand %xmm8,%xmm14 - movups (%r11),%xmm10 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 - pxor %xmm14,%xmm15 - movaps %xmm10,%xmm11 -.byte 102,15,56,220,249 - movups -64(%rcx),%xmm1 - - movdqa %xmm9,%xmm14 -.byte 102,15,56,220,208 - paddd %xmm9,%xmm9 - pxor %xmm15,%xmm10 -.byte 102,15,56,220,216 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 - pand %xmm8,%xmm14 - movaps %xmm11,%xmm12 -.byte 102,15,56,220,240 - pxor %xmm14,%xmm15 - movdqa %xmm9,%xmm14 -.byte 102,15,56,220,248 - movups -48(%rcx),%xmm0 - - paddd %xmm9,%xmm9 -.byte 102,15,56,220,209 - pxor %xmm15,%xmm11 - psrad $31,%xmm14 -.byte 102,15,56,220,217 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 - movdqa %xmm13,48(%rsp) - pxor %xmm14,%xmm15 -.byte 102,15,56,220,241 - movaps %xmm12,%xmm13 - movdqa %xmm9,%xmm14 -.byte 102,15,56,220,249 - movups -32(%rcx),%xmm1 - - paddd %xmm9,%xmm9 -.byte 102,15,56,220,208 - pxor %xmm15,%xmm12 - psrad $31,%xmm14 -.byte 102,15,56,220,216 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 -.byte 102,15,56,220,240 - pxor %xmm14,%xmm15 - movaps %xmm13,%xmm14 -.byte 102,15,56,220,248 - - movdqa %xmm9,%xmm0 - paddd %xmm9,%xmm9 -.byte 102,15,56,220,209 - pxor %xmm15,%xmm13 - psrad $31,%xmm0 -.byte 102,15,56,220,217 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm0 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 - pxor %xmm0,%xmm15 - movups (%r11),%xmm0 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 - movups 16(%r11),%xmm1 - - pxor %xmm15,%xmm14 -.byte 102,15,56,221,84,36,0 - psrad $31,%xmm9 - paddq %xmm15,%xmm15 -.byte 102,15,56,221,92,36,16 -.byte 102,15,56,221,100,36,32 - pand %xmm8,%xmm9 - movq %r10,%rax -.byte 102,15,56,221,108,36,48 -.byte 102,15,56,221,116,36,64 -.byte 102,15,56,221,124,36,80 - pxor %xmm9,%xmm15 - - leaq 96(%rsi),%rsi - movups %xmm2,-96(%rsi) - movups %xmm3,-80(%rsi) - movups %xmm4,-64(%rsi) - movups %xmm5,-48(%rsi) - movups %xmm6,-32(%rsi) - movups %xmm7,-16(%rsi) - subq $96,%rdx - jnc .Lxts_enc_grandloop - - movl $16+96,%eax - subl %r10d,%eax - movq %r11,%rcx - shrl $4,%eax - -.Lxts_enc_short: - - movl %eax,%r10d - pxor %xmm0,%xmm10 - addq $96,%rdx - jz .Lxts_enc_done - - pxor %xmm0,%xmm11 - cmpq $32,%rdx - jb .Lxts_enc_one - pxor %xmm0,%xmm12 - je .Lxts_enc_two - - pxor %xmm0,%xmm13 - cmpq $64,%rdx - jb .Lxts_enc_three - pxor %xmm0,%xmm14 - je .Lxts_enc_four - - movdqu (%rdi),%xmm2 - movdqu 16(%rdi),%xmm3 - movdqu 32(%rdi),%xmm4 - pxor %xmm10,%xmm2 - movdqu 48(%rdi),%xmm5 - pxor %xmm11,%xmm3 - movdqu 64(%rdi),%xmm6 - leaq 80(%rdi),%rdi - pxor %xmm12,%xmm4 - pxor %xmm13,%xmm5 - pxor %xmm14,%xmm6 - pxor %xmm7,%xmm7 - - call _aesni_encrypt6 - - xorps %xmm10,%xmm2 - movdqa %xmm15,%xmm10 - xorps %xmm11,%xmm3 - xorps %xmm12,%xmm4 - movdqu %xmm2,(%rsi) - xorps %xmm13,%xmm5 - movdqu %xmm3,16(%rsi) - xorps %xmm14,%xmm6 - movdqu %xmm4,32(%rsi) - movdqu %xmm5,48(%rsi) - movdqu %xmm6,64(%rsi) - leaq 80(%rsi),%rsi - jmp .Lxts_enc_done - -.align 16 -.Lxts_enc_one: - movups (%rdi),%xmm2 - leaq 16(%rdi),%rdi - xorps %xmm10,%xmm2 - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -.Loop_enc1_9: -.byte 102,15,56,220,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz .Loop_enc1_9 -.byte 102,15,56,221,209 - xorps %xmm10,%xmm2 - movdqa %xmm11,%xmm10 - movups %xmm2,(%rsi) - leaq 16(%rsi),%rsi - jmp .Lxts_enc_done - -.align 16 -.Lxts_enc_two: - movups (%rdi),%xmm2 - movups 16(%rdi),%xmm3 - leaq 32(%rdi),%rdi - xorps %xmm10,%xmm2 - xorps %xmm11,%xmm3 - - call _aesni_encrypt2 - - xorps %xmm10,%xmm2 - movdqa %xmm12,%xmm10 - xorps %xmm11,%xmm3 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - leaq 32(%rsi),%rsi - jmp .Lxts_enc_done - -.align 16 -.Lxts_enc_three: - movups (%rdi),%xmm2 - movups 16(%rdi),%xmm3 - movups 32(%rdi),%xmm4 - leaq 48(%rdi),%rdi - xorps %xmm10,%xmm2 - xorps %xmm11,%xmm3 - xorps %xmm12,%xmm4 - - call _aesni_encrypt3 - - xorps %xmm10,%xmm2 - movdqa %xmm13,%xmm10 - xorps %xmm11,%xmm3 - xorps %xmm12,%xmm4 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - movups %xmm4,32(%rsi) - leaq 48(%rsi),%rsi - jmp .Lxts_enc_done - -.align 16 -.Lxts_enc_four: - movups (%rdi),%xmm2 - movups 16(%rdi),%xmm3 - movups 32(%rdi),%xmm4 - xorps %xmm10,%xmm2 - movups 48(%rdi),%xmm5 - leaq 64(%rdi),%rdi - xorps %xmm11,%xmm3 - xorps %xmm12,%xmm4 - xorps %xmm13,%xmm5 - - call _aesni_encrypt4 - - pxor %xmm10,%xmm2 - movdqa %xmm14,%xmm10 - pxor %xmm11,%xmm3 - pxor %xmm12,%xmm4 - movdqu %xmm2,(%rsi) - pxor %xmm13,%xmm5 - movdqu %xmm3,16(%rsi) - movdqu %xmm4,32(%rsi) - movdqu %xmm5,48(%rsi) - leaq 64(%rsi),%rsi - jmp .Lxts_enc_done - -.align 16 -.Lxts_enc_done: - andq $15,%r9 - jz .Lxts_enc_ret - movq %r9,%rdx - -.Lxts_enc_steal: - movzbl (%rdi),%eax - movzbl -16(%rsi),%ecx - leaq 1(%rdi),%rdi - movb %al,-16(%rsi) - movb %cl,0(%rsi) - leaq 1(%rsi),%rsi - subq $1,%rdx - jnz .Lxts_enc_steal - - subq %r9,%rsi - movq %r11,%rcx - movl %r10d,%eax - - movups -16(%rsi),%xmm2 - xorps %xmm10,%xmm2 - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -.Loop_enc1_10: -.byte 102,15,56,220,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz .Loop_enc1_10 -.byte 102,15,56,221,209 - xorps %xmm10,%xmm2 - movups %xmm2,-16(%rsi) - -.Lxts_enc_ret: - xorps %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - movaps %xmm0,0(%rsp) - pxor %xmm8,%xmm8 - movaps %xmm0,16(%rsp) - pxor %xmm9,%xmm9 - movaps %xmm0,32(%rsp) - pxor %xmm10,%xmm10 - movaps %xmm0,48(%rsp) - pxor %xmm11,%xmm11 - movaps %xmm0,64(%rsp) - pxor %xmm12,%xmm12 - movaps %xmm0,80(%rsp) - pxor %xmm13,%xmm13 - movaps %xmm0,96(%rsp) - pxor %xmm14,%xmm14 - pxor %xmm15,%xmm15 - leaq (%rbp),%rsp - popq %rbp -.Lxts_enc_epilogue: - .byte 0xf3,0xc3 -.size aesni_xts_encrypt,.-aesni_xts_encrypt -.globl aesni_xts_decrypt -.hidden aesni_xts_decrypt -.type aesni_xts_decrypt,@function -.align 16 -aesni_xts_decrypt: - leaq (%rsp),%rax - pushq %rbp - subq $112,%rsp - andq $-16,%rsp - leaq -8(%rax),%rbp - movups (%r9),%xmm2 - movl 240(%r8),%eax - movl 240(%rcx),%r10d - movups (%r8),%xmm0 - movups 16(%r8),%xmm1 - leaq 32(%r8),%r8 - xorps %xmm0,%xmm2 -.Loop_enc1_11: -.byte 102,15,56,220,209 - decl %eax - movups (%r8),%xmm1 - leaq 16(%r8),%r8 - jnz .Loop_enc1_11 -.byte 102,15,56,221,209 - xorl %eax,%eax - testq $15,%rdx - setnz %al - shlq $4,%rax - subq %rax,%rdx - - movups (%rcx),%xmm0 - movq %rcx,%r11 - movl %r10d,%eax - shll $4,%r10d - movq %rdx,%r9 - andq $-16,%rdx - - movups 16(%rcx,%r10,1),%xmm1 - - movdqa .Lxts_magic(%rip),%xmm8 - movdqa %xmm2,%xmm15 - pshufd $95,%xmm2,%xmm9 - pxor %xmm0,%xmm1 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 - movdqa %xmm15,%xmm10 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 - pxor %xmm0,%xmm10 - pxor %xmm14,%xmm15 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 - movdqa %xmm15,%xmm11 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 - pxor %xmm0,%xmm11 - pxor %xmm14,%xmm15 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 - movdqa %xmm15,%xmm12 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 - pxor %xmm0,%xmm12 - pxor %xmm14,%xmm15 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 - movdqa %xmm15,%xmm13 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 - pxor %xmm0,%xmm13 - pxor %xmm14,%xmm15 - movdqa %xmm15,%xmm14 - psrad $31,%xmm9 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm9 - pxor %xmm0,%xmm14 - pxor %xmm9,%xmm15 - movaps %xmm1,96(%rsp) - - subq $96,%rdx - jc .Lxts_dec_short - - movl $16+96,%eax - leaq 32(%r11,%r10,1),%rcx - subq %r10,%rax - movups 16(%r11),%xmm1 - movq %rax,%r10 - leaq .Lxts_magic(%rip),%r8 - jmp .Lxts_dec_grandloop - -.align 32 -.Lxts_dec_grandloop: - movdqu 0(%rdi),%xmm2 - movdqa %xmm0,%xmm8 - movdqu 16(%rdi),%xmm3 - pxor %xmm10,%xmm2 - movdqu 32(%rdi),%xmm4 - pxor %xmm11,%xmm3 -.byte 102,15,56,222,209 - movdqu 48(%rdi),%xmm5 - pxor %xmm12,%xmm4 -.byte 102,15,56,222,217 - movdqu 64(%rdi),%xmm6 - pxor %xmm13,%xmm5 -.byte 102,15,56,222,225 - movdqu 80(%rdi),%xmm7 - pxor %xmm15,%xmm8 - movdqa 96(%rsp),%xmm9 - pxor %xmm14,%xmm6 -.byte 102,15,56,222,233 - movups 32(%r11),%xmm0 - leaq 96(%rdi),%rdi - pxor %xmm8,%xmm7 - - pxor %xmm9,%xmm10 -.byte 102,15,56,222,241 - pxor %xmm9,%xmm11 - movdqa %xmm10,0(%rsp) -.byte 102,15,56,222,249 - movups 48(%r11),%xmm1 - pxor %xmm9,%xmm12 - -.byte 102,15,56,222,208 - pxor %xmm9,%xmm13 - movdqa %xmm11,16(%rsp) -.byte 102,15,56,222,216 - pxor %xmm9,%xmm14 - movdqa %xmm12,32(%rsp) -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 - pxor %xmm9,%xmm8 - movdqa %xmm14,64(%rsp) -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 - movups 64(%r11),%xmm0 - movdqa %xmm8,80(%rsp) - pshufd $95,%xmm15,%xmm9 - jmp .Lxts_dec_loop6 -.align 32 -.Lxts_dec_loop6: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 - movups -64(%rcx,%rax,1),%xmm1 - addq $32,%rax - -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 - movups -80(%rcx,%rax,1),%xmm0 - jnz .Lxts_dec_loop6 - - movdqa (%r8),%xmm8 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 -.byte 102,15,56,222,209 - paddq %xmm15,%xmm15 - psrad $31,%xmm14 -.byte 102,15,56,222,217 - pand %xmm8,%xmm14 - movups (%r11),%xmm10 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 - pxor %xmm14,%xmm15 - movaps %xmm10,%xmm11 -.byte 102,15,56,222,249 - movups -64(%rcx),%xmm1 - - movdqa %xmm9,%xmm14 -.byte 102,15,56,222,208 - paddd %xmm9,%xmm9 - pxor %xmm15,%xmm10 -.byte 102,15,56,222,216 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 - pand %xmm8,%xmm14 - movaps %xmm11,%xmm12 -.byte 102,15,56,222,240 - pxor %xmm14,%xmm15 - movdqa %xmm9,%xmm14 -.byte 102,15,56,222,248 - movups -48(%rcx),%xmm0 - - paddd %xmm9,%xmm9 -.byte 102,15,56,222,209 - pxor %xmm15,%xmm11 - psrad $31,%xmm14 -.byte 102,15,56,222,217 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 - movdqa %xmm13,48(%rsp) - pxor %xmm14,%xmm15 -.byte 102,15,56,222,241 - movaps %xmm12,%xmm13 - movdqa %xmm9,%xmm14 -.byte 102,15,56,222,249 - movups -32(%rcx),%xmm1 - - paddd %xmm9,%xmm9 -.byte 102,15,56,222,208 - pxor %xmm15,%xmm12 - psrad $31,%xmm14 -.byte 102,15,56,222,216 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 - pxor %xmm14,%xmm15 - movaps %xmm13,%xmm14 -.byte 102,15,56,222,248 - - movdqa %xmm9,%xmm0 - paddd %xmm9,%xmm9 -.byte 102,15,56,222,209 - pxor %xmm15,%xmm13 - psrad $31,%xmm0 -.byte 102,15,56,222,217 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm0 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 - pxor %xmm0,%xmm15 - movups (%r11),%xmm0 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 - movups 16(%r11),%xmm1 - - pxor %xmm15,%xmm14 -.byte 102,15,56,223,84,36,0 - psrad $31,%xmm9 - paddq %xmm15,%xmm15 -.byte 102,15,56,223,92,36,16 -.byte 102,15,56,223,100,36,32 - pand %xmm8,%xmm9 - movq %r10,%rax -.byte 102,15,56,223,108,36,48 -.byte 102,15,56,223,116,36,64 -.byte 102,15,56,223,124,36,80 - pxor %xmm9,%xmm15 - - leaq 96(%rsi),%rsi - movups %xmm2,-96(%rsi) - movups %xmm3,-80(%rsi) - movups %xmm4,-64(%rsi) - movups %xmm5,-48(%rsi) - movups %xmm6,-32(%rsi) - movups %xmm7,-16(%rsi) - subq $96,%rdx - jnc .Lxts_dec_grandloop - - movl $16+96,%eax - subl %r10d,%eax - movq %r11,%rcx - shrl $4,%eax - -.Lxts_dec_short: - - movl %eax,%r10d - pxor %xmm0,%xmm10 - pxor %xmm0,%xmm11 - addq $96,%rdx - jz .Lxts_dec_done - - pxor %xmm0,%xmm12 - cmpq $32,%rdx - jb .Lxts_dec_one - pxor %xmm0,%xmm13 - je .Lxts_dec_two - - pxor %xmm0,%xmm14 - cmpq $64,%rdx - jb .Lxts_dec_three - je .Lxts_dec_four - - movdqu (%rdi),%xmm2 - movdqu 16(%rdi),%xmm3 - movdqu 32(%rdi),%xmm4 - pxor %xmm10,%xmm2 - movdqu 48(%rdi),%xmm5 - pxor %xmm11,%xmm3 - movdqu 64(%rdi),%xmm6 - leaq 80(%rdi),%rdi - pxor %xmm12,%xmm4 - pxor %xmm13,%xmm5 - pxor %xmm14,%xmm6 - - call _aesni_decrypt6 - - xorps %xmm10,%xmm2 - xorps %xmm11,%xmm3 - xorps %xmm12,%xmm4 - movdqu %xmm2,(%rsi) - xorps %xmm13,%xmm5 - movdqu %xmm3,16(%rsi) - xorps %xmm14,%xmm6 - movdqu %xmm4,32(%rsi) - pxor %xmm14,%xmm14 - movdqu %xmm5,48(%rsi) - pcmpgtd %xmm15,%xmm14 - movdqu %xmm6,64(%rsi) - leaq 80(%rsi),%rsi - pshufd $19,%xmm14,%xmm11 - andq $15,%r9 - jz .Lxts_dec_ret - - movdqa %xmm15,%xmm10 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm11 - pxor %xmm15,%xmm11 - jmp .Lxts_dec_done2 - -.align 16 -.Lxts_dec_one: - movups (%rdi),%xmm2 - leaq 16(%rdi),%rdi - xorps %xmm10,%xmm2 - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -.Loop_dec1_12: -.byte 102,15,56,222,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz .Loop_dec1_12 -.byte 102,15,56,223,209 - xorps %xmm10,%xmm2 - movdqa %xmm11,%xmm10 - movups %xmm2,(%rsi) - movdqa %xmm12,%xmm11 - leaq 16(%rsi),%rsi - jmp .Lxts_dec_done - -.align 16 -.Lxts_dec_two: - movups (%rdi),%xmm2 - movups 16(%rdi),%xmm3 - leaq 32(%rdi),%rdi - xorps %xmm10,%xmm2 - xorps %xmm11,%xmm3 - - call _aesni_decrypt2 - - xorps %xmm10,%xmm2 - movdqa %xmm12,%xmm10 - xorps %xmm11,%xmm3 - movdqa %xmm13,%xmm11 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - leaq 32(%rsi),%rsi - jmp .Lxts_dec_done - -.align 16 -.Lxts_dec_three: - movups (%rdi),%xmm2 - movups 16(%rdi),%xmm3 - movups 32(%rdi),%xmm4 - leaq 48(%rdi),%rdi - xorps %xmm10,%xmm2 - xorps %xmm11,%xmm3 - xorps %xmm12,%xmm4 - - call _aesni_decrypt3 - - xorps %xmm10,%xmm2 - movdqa %xmm13,%xmm10 - xorps %xmm11,%xmm3 - movdqa %xmm14,%xmm11 - xorps %xmm12,%xmm4 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - movups %xmm4,32(%rsi) - leaq 48(%rsi),%rsi - jmp .Lxts_dec_done - -.align 16 -.Lxts_dec_four: - movups (%rdi),%xmm2 - movups 16(%rdi),%xmm3 - movups 32(%rdi),%xmm4 - xorps %xmm10,%xmm2 - movups 48(%rdi),%xmm5 - leaq 64(%rdi),%rdi - xorps %xmm11,%xmm3 - xorps %xmm12,%xmm4 - xorps %xmm13,%xmm5 - - call _aesni_decrypt4 - - pxor %xmm10,%xmm2 - movdqa %xmm14,%xmm10 - pxor %xmm11,%xmm3 - movdqa %xmm15,%xmm11 - pxor %xmm12,%xmm4 - movdqu %xmm2,(%rsi) - pxor %xmm13,%xmm5 - movdqu %xmm3,16(%rsi) - movdqu %xmm4,32(%rsi) - movdqu %xmm5,48(%rsi) - leaq 64(%rsi),%rsi - jmp .Lxts_dec_done - -.align 16 -.Lxts_dec_done: - andq $15,%r9 - jz .Lxts_dec_ret -.Lxts_dec_done2: - movq %r9,%rdx - movq %r11,%rcx - movl %r10d,%eax - - movups (%rdi),%xmm2 - xorps %xmm11,%xmm2 - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -.Loop_dec1_13: -.byte 102,15,56,222,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz .Loop_dec1_13 -.byte 102,15,56,223,209 - xorps %xmm11,%xmm2 - movups %xmm2,(%rsi) - -.Lxts_dec_steal: - movzbl 16(%rdi),%eax - movzbl (%rsi),%ecx - leaq 1(%rdi),%rdi - movb %al,(%rsi) - movb %cl,16(%rsi) - leaq 1(%rsi),%rsi - subq $1,%rdx - jnz .Lxts_dec_steal - - subq %r9,%rsi - movq %r11,%rcx - movl %r10d,%eax - - movups (%rsi),%xmm2 - xorps %xmm10,%xmm2 - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -.Loop_dec1_14: -.byte 102,15,56,222,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz .Loop_dec1_14 -.byte 102,15,56,223,209 - xorps %xmm10,%xmm2 - movups %xmm2,(%rsi) - -.Lxts_dec_ret: - xorps %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - movaps %xmm0,0(%rsp) - pxor %xmm8,%xmm8 - movaps %xmm0,16(%rsp) - pxor %xmm9,%xmm9 - movaps %xmm0,32(%rsp) - pxor %xmm10,%xmm10 - movaps %xmm0,48(%rsp) - pxor %xmm11,%xmm11 - movaps %xmm0,64(%rsp) - pxor %xmm12,%xmm12 - movaps %xmm0,80(%rsp) - pxor %xmm13,%xmm13 - movaps %xmm0,96(%rsp) - pxor %xmm14,%xmm14 - pxor %xmm15,%xmm15 - leaq (%rbp),%rsp - popq %rbp -.Lxts_dec_epilogue: - .byte 0xf3,0xc3 -.size aesni_xts_decrypt,.-aesni_xts_decrypt -.globl aesni_cbc_encrypt -.hidden aesni_cbc_encrypt -.type aesni_cbc_encrypt,@function -.align 16 -aesni_cbc_encrypt: - testq %rdx,%rdx - jz .Lcbc_ret - - movl 240(%rcx),%r10d - movq %rcx,%r11 - testl %r9d,%r9d - jz .Lcbc_decrypt - - movups (%r8),%xmm2 - movl %r10d,%eax - cmpq $16,%rdx - jb .Lcbc_enc_tail - subq $16,%rdx - jmp .Lcbc_enc_loop -.align 16 -.Lcbc_enc_loop: - movups (%rdi),%xmm3 - leaq 16(%rdi),%rdi - - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm3 - leaq 32(%rcx),%rcx - xorps %xmm3,%xmm2 -.Loop_enc1_15: -.byte 102,15,56,220,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz .Loop_enc1_15 -.byte 102,15,56,221,209 - movl %r10d,%eax - movq %r11,%rcx - movups %xmm2,0(%rsi) - leaq 16(%rsi),%rsi - subq $16,%rdx - jnc .Lcbc_enc_loop - addq $16,%rdx - jnz .Lcbc_enc_tail - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - movups %xmm2,(%r8) - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - jmp .Lcbc_ret - -.Lcbc_enc_tail: - movq %rdx,%rcx - xchgq %rdi,%rsi -.long 0x9066A4F3 - movl $16,%ecx - subq %rdx,%rcx - xorl %eax,%eax -.long 0x9066AAF3 - leaq -16(%rdi),%rdi - movl %r10d,%eax - movq %rdi,%rsi - movq %r11,%rcx - xorq %rdx,%rdx - jmp .Lcbc_enc_loop - -.align 16 -.Lcbc_decrypt: - cmpq $16,%rdx - jne .Lcbc_decrypt_bulk - - - - movdqu (%rdi),%xmm2 - movdqu (%r8),%xmm3 - movdqa %xmm2,%xmm4 - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -.Loop_dec1_16: -.byte 102,15,56,222,209 - decl %r10d - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz .Loop_dec1_16 -.byte 102,15,56,223,209 - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - movdqu %xmm4,(%r8) - xorps %xmm3,%xmm2 - pxor %xmm3,%xmm3 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - jmp .Lcbc_ret -.align 16 -.Lcbc_decrypt_bulk: - leaq (%rsp),%rax - pushq %rbp - subq $16,%rsp - andq $-16,%rsp - leaq -8(%rax),%rbp - movups (%r8),%xmm10 - movl %r10d,%eax - cmpq $80,%rdx - jbe .Lcbc_dec_tail - - movups (%rcx),%xmm0 - movdqu 0(%rdi),%xmm2 - movdqu 16(%rdi),%xmm3 - movdqa %xmm2,%xmm11 - movdqu 32(%rdi),%xmm4 - movdqa %xmm3,%xmm12 - movdqu 48(%rdi),%xmm5 - movdqa %xmm4,%xmm13 - movdqu 64(%rdi),%xmm6 - movdqa %xmm5,%xmm14 - movdqu 80(%rdi),%xmm7 - movdqa %xmm6,%xmm15 - movl OPENSSL_ia32cap_P+4(%rip),%r9d - cmpq $112,%rdx - jbe .Lcbc_dec_six_or_seven - - andl $71303168,%r9d - subq $80,%rdx - cmpl $4194304,%r9d - je .Lcbc_dec_loop6_enter - subq $32,%rdx - leaq 112(%rcx),%rcx - jmp .Lcbc_dec_loop8_enter -.align 16 -.Lcbc_dec_loop8: - movups %xmm9,(%rsi) - leaq 16(%rsi),%rsi -.Lcbc_dec_loop8_enter: - movdqu 96(%rdi),%xmm8 - pxor %xmm0,%xmm2 - movdqu 112(%rdi),%xmm9 - pxor %xmm0,%xmm3 - movups 16-112(%rcx),%xmm1 - pxor %xmm0,%xmm4 - xorq %r11,%r11 - cmpq $112,%rdx - pxor %xmm0,%xmm5 - pxor %xmm0,%xmm6 - pxor %xmm0,%xmm7 - pxor %xmm0,%xmm8 - -.byte 102,15,56,222,209 - pxor %xmm0,%xmm9 - movups 32-112(%rcx),%xmm0 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,68,15,56,222,193 - setnc %r11b - shlq $7,%r11 -.byte 102,68,15,56,222,201 - addq %rdi,%r11 - movups 48-112(%rcx),%xmm1 -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 -.byte 102,68,15,56,222,192 -.byte 102,68,15,56,222,200 - movups 64-112(%rcx),%xmm0 - nop -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,68,15,56,222,193 -.byte 102,68,15,56,222,201 - movups 80-112(%rcx),%xmm1 - nop -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 -.byte 102,68,15,56,222,192 -.byte 102,68,15,56,222,200 - movups 96-112(%rcx),%xmm0 - nop -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,68,15,56,222,193 -.byte 102,68,15,56,222,201 - movups 112-112(%rcx),%xmm1 - nop -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 -.byte 102,68,15,56,222,192 -.byte 102,68,15,56,222,200 - movups 128-112(%rcx),%xmm0 - nop -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,68,15,56,222,193 -.byte 102,68,15,56,222,201 - movups 144-112(%rcx),%xmm1 - cmpl $11,%eax -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 -.byte 102,68,15,56,222,192 -.byte 102,68,15,56,222,200 - movups 160-112(%rcx),%xmm0 - jb .Lcbc_dec_done -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,68,15,56,222,193 -.byte 102,68,15,56,222,201 - movups 176-112(%rcx),%xmm1 - nop -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 -.byte 102,68,15,56,222,192 -.byte 102,68,15,56,222,200 - movups 192-112(%rcx),%xmm0 - je .Lcbc_dec_done -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,68,15,56,222,193 -.byte 102,68,15,56,222,201 - movups 208-112(%rcx),%xmm1 - nop -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 -.byte 102,68,15,56,222,192 -.byte 102,68,15,56,222,200 - movups 224-112(%rcx),%xmm0 - jmp .Lcbc_dec_done -.align 16 -.Lcbc_dec_done: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 - pxor %xmm0,%xmm10 - pxor %xmm0,%xmm11 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 - pxor %xmm0,%xmm12 - pxor %xmm0,%xmm13 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 - pxor %xmm0,%xmm14 - pxor %xmm0,%xmm15 -.byte 102,68,15,56,222,193 -.byte 102,68,15,56,222,201 - movdqu 80(%rdi),%xmm1 - -.byte 102,65,15,56,223,210 - movdqu 96(%rdi),%xmm10 - pxor %xmm0,%xmm1 -.byte 102,65,15,56,223,219 - pxor %xmm0,%xmm10 - movdqu 112(%rdi),%xmm0 -.byte 102,65,15,56,223,228 - leaq 128(%rdi),%rdi - movdqu 0(%r11),%xmm11 -.byte 102,65,15,56,223,237 -.byte 102,65,15,56,223,246 - movdqu 16(%r11),%xmm12 - movdqu 32(%r11),%xmm13 -.byte 102,65,15,56,223,255 -.byte 102,68,15,56,223,193 - movdqu 48(%r11),%xmm14 - movdqu 64(%r11),%xmm15 -.byte 102,69,15,56,223,202 - movdqa %xmm0,%xmm10 - movdqu 80(%r11),%xmm1 - movups -112(%rcx),%xmm0 - - movups %xmm2,(%rsi) - movdqa %xmm11,%xmm2 - movups %xmm3,16(%rsi) - movdqa %xmm12,%xmm3 - movups %xmm4,32(%rsi) - movdqa %xmm13,%xmm4 - movups %xmm5,48(%rsi) - movdqa %xmm14,%xmm5 - movups %xmm6,64(%rsi) - movdqa %xmm15,%xmm6 - movups %xmm7,80(%rsi) - movdqa %xmm1,%xmm7 - movups %xmm8,96(%rsi) - leaq 112(%rsi),%rsi - - subq $128,%rdx - ja .Lcbc_dec_loop8 - - movaps %xmm9,%xmm2 - leaq -112(%rcx),%rcx - addq $112,%rdx - jle .Lcbc_dec_clear_tail_collected - movups %xmm9,(%rsi) - leaq 16(%rsi),%rsi - cmpq $80,%rdx - jbe .Lcbc_dec_tail - - movaps %xmm11,%xmm2 -.Lcbc_dec_six_or_seven: - cmpq $96,%rdx - ja .Lcbc_dec_seven - - movaps %xmm7,%xmm8 - call _aesni_decrypt6 - pxor %xmm10,%xmm2 - movaps %xmm8,%xmm10 - pxor %xmm11,%xmm3 - movdqu %xmm2,(%rsi) - pxor %xmm12,%xmm4 - movdqu %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - pxor %xmm13,%xmm5 - movdqu %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - pxor %xmm14,%xmm6 - movdqu %xmm5,48(%rsi) - pxor %xmm5,%xmm5 - pxor %xmm15,%xmm7 - movdqu %xmm6,64(%rsi) - pxor %xmm6,%xmm6 - leaq 80(%rsi),%rsi - movdqa %xmm7,%xmm2 - pxor %xmm7,%xmm7 - jmp .Lcbc_dec_tail_collected - -.align 16 -.Lcbc_dec_seven: - movups 96(%rdi),%xmm8 - xorps %xmm9,%xmm9 - call _aesni_decrypt8 - movups 80(%rdi),%xmm9 - pxor %xmm10,%xmm2 - movups 96(%rdi),%xmm10 - pxor %xmm11,%xmm3 - movdqu %xmm2,(%rsi) - pxor %xmm12,%xmm4 - movdqu %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - pxor %xmm13,%xmm5 - movdqu %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - pxor %xmm14,%xmm6 - movdqu %xmm5,48(%rsi) - pxor %xmm5,%xmm5 - pxor %xmm15,%xmm7 - movdqu %xmm6,64(%rsi) - pxor %xmm6,%xmm6 - pxor %xmm9,%xmm8 - movdqu %xmm7,80(%rsi) - pxor %xmm7,%xmm7 - leaq 96(%rsi),%rsi - movdqa %xmm8,%xmm2 - pxor %xmm8,%xmm8 - pxor %xmm9,%xmm9 - jmp .Lcbc_dec_tail_collected - -.align 16 -.Lcbc_dec_loop6: - movups %xmm7,(%rsi) - leaq 16(%rsi),%rsi - movdqu 0(%rdi),%xmm2 - movdqu 16(%rdi),%xmm3 - movdqa %xmm2,%xmm11 - movdqu 32(%rdi),%xmm4 - movdqa %xmm3,%xmm12 - movdqu 48(%rdi),%xmm5 - movdqa %xmm4,%xmm13 - movdqu 64(%rdi),%xmm6 - movdqa %xmm5,%xmm14 - movdqu 80(%rdi),%xmm7 - movdqa %xmm6,%xmm15 -.Lcbc_dec_loop6_enter: - leaq 96(%rdi),%rdi - movdqa %xmm7,%xmm8 - - call _aesni_decrypt6 - - pxor %xmm10,%xmm2 - movdqa %xmm8,%xmm10 - pxor %xmm11,%xmm3 - movdqu %xmm2,(%rsi) - pxor %xmm12,%xmm4 - movdqu %xmm3,16(%rsi) - pxor %xmm13,%xmm5 - movdqu %xmm4,32(%rsi) - pxor %xmm14,%xmm6 - movq %r11,%rcx - movdqu %xmm5,48(%rsi) - pxor %xmm15,%xmm7 - movl %r10d,%eax - movdqu %xmm6,64(%rsi) - leaq 80(%rsi),%rsi - subq $96,%rdx - ja .Lcbc_dec_loop6 - - movdqa %xmm7,%xmm2 - addq $80,%rdx - jle .Lcbc_dec_clear_tail_collected - movups %xmm7,(%rsi) - leaq 16(%rsi),%rsi - -.Lcbc_dec_tail: - movups (%rdi),%xmm2 - subq $16,%rdx - jbe .Lcbc_dec_one - - movups 16(%rdi),%xmm3 - movaps %xmm2,%xmm11 - subq $16,%rdx - jbe .Lcbc_dec_two - - movups 32(%rdi),%xmm4 - movaps %xmm3,%xmm12 - subq $16,%rdx - jbe .Lcbc_dec_three - - movups 48(%rdi),%xmm5 - movaps %xmm4,%xmm13 - subq $16,%rdx - jbe .Lcbc_dec_four - - movups 64(%rdi),%xmm6 - movaps %xmm5,%xmm14 - movaps %xmm6,%xmm15 - xorps %xmm7,%xmm7 - call _aesni_decrypt6 - pxor %xmm10,%xmm2 - movaps %xmm15,%xmm10 - pxor %xmm11,%xmm3 - movdqu %xmm2,(%rsi) - pxor %xmm12,%xmm4 - movdqu %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - pxor %xmm13,%xmm5 - movdqu %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - pxor %xmm14,%xmm6 - movdqu %xmm5,48(%rsi) - pxor %xmm5,%xmm5 - leaq 64(%rsi),%rsi - movdqa %xmm6,%xmm2 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - subq $16,%rdx - jmp .Lcbc_dec_tail_collected - -.align 16 -.Lcbc_dec_one: - movaps %xmm2,%xmm11 - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -.Loop_dec1_17: -.byte 102,15,56,222,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz .Loop_dec1_17 -.byte 102,15,56,223,209 - xorps %xmm10,%xmm2 - movaps %xmm11,%xmm10 - jmp .Lcbc_dec_tail_collected -.align 16 -.Lcbc_dec_two: - movaps %xmm3,%xmm12 - call _aesni_decrypt2 - pxor %xmm10,%xmm2 - movaps %xmm12,%xmm10 - pxor %xmm11,%xmm3 - movdqu %xmm2,(%rsi) - movdqa %xmm3,%xmm2 - pxor %xmm3,%xmm3 - leaq 16(%rsi),%rsi - jmp .Lcbc_dec_tail_collected -.align 16 -.Lcbc_dec_three: - movaps %xmm4,%xmm13 - call _aesni_decrypt3 - pxor %xmm10,%xmm2 - movaps %xmm13,%xmm10 - pxor %xmm11,%xmm3 - movdqu %xmm2,(%rsi) - pxor %xmm12,%xmm4 - movdqu %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - movdqa %xmm4,%xmm2 - pxor %xmm4,%xmm4 - leaq 32(%rsi),%rsi - jmp .Lcbc_dec_tail_collected -.align 16 -.Lcbc_dec_four: - movaps %xmm5,%xmm14 - call _aesni_decrypt4 - pxor %xmm10,%xmm2 - movaps %xmm14,%xmm10 - pxor %xmm11,%xmm3 - movdqu %xmm2,(%rsi) - pxor %xmm12,%xmm4 - movdqu %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - pxor %xmm13,%xmm5 - movdqu %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - movdqa %xmm5,%xmm2 - pxor %xmm5,%xmm5 - leaq 48(%rsi),%rsi - jmp .Lcbc_dec_tail_collected - -.align 16 -.Lcbc_dec_clear_tail_collected: - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - pxor %xmm8,%xmm8 - pxor %xmm9,%xmm9 -.Lcbc_dec_tail_collected: - movups %xmm10,(%r8) - andq $15,%rdx - jnz .Lcbc_dec_tail_partial - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - jmp .Lcbc_dec_ret -.align 16 -.Lcbc_dec_tail_partial: - movaps %xmm2,(%rsp) - pxor %xmm2,%xmm2 - movq $16,%rcx - movq %rsi,%rdi - subq %rdx,%rcx - leaq (%rsp),%rsi -.long 0x9066A4F3 - movdqa %xmm2,(%rsp) - -.Lcbc_dec_ret: - xorps %xmm0,%xmm0 - pxor %xmm1,%xmm1 - leaq (%rbp),%rsp - popq %rbp -.Lcbc_ret: - .byte 0xf3,0xc3 -.size aesni_cbc_encrypt,.-aesni_cbc_encrypt -.globl aesni_set_decrypt_key -.hidden aesni_set_decrypt_key -.type aesni_set_decrypt_key,@function -.align 16 -aesni_set_decrypt_key: -.byte 0x48,0x83,0xEC,0x08 - call __aesni_set_encrypt_key - shll $4,%esi - testl %eax,%eax - jnz .Ldec_key_ret - leaq 16(%rdx,%rsi,1),%rdi - - movups (%rdx),%xmm0 - movups (%rdi),%xmm1 - movups %xmm0,(%rdi) - movups %xmm1,(%rdx) - leaq 16(%rdx),%rdx - leaq -16(%rdi),%rdi - -.Ldec_key_inverse: - movups (%rdx),%xmm0 - movups (%rdi),%xmm1 -.byte 102,15,56,219,192 -.byte 102,15,56,219,201 - leaq 16(%rdx),%rdx - leaq -16(%rdi),%rdi - movups %xmm0,16(%rdi) - movups %xmm1,-16(%rdx) - cmpq %rdx,%rdi - ja .Ldec_key_inverse - - movups (%rdx),%xmm0 -.byte 102,15,56,219,192 - pxor %xmm1,%xmm1 - movups %xmm0,(%rdi) - pxor %xmm0,%xmm0 -.Ldec_key_ret: - addq $8,%rsp - .byte 0xf3,0xc3 -.LSEH_end_set_decrypt_key: -.size aesni_set_decrypt_key,.-aesni_set_decrypt_key -.globl aesni_set_encrypt_key -.hidden aesni_set_encrypt_key -.type aesni_set_encrypt_key,@function -.align 16 -aesni_set_encrypt_key: -__aesni_set_encrypt_key: -.byte 0x48,0x83,0xEC,0x08 - movq $-1,%rax - testq %rdi,%rdi - jz .Lenc_key_ret - testq %rdx,%rdx - jz .Lenc_key_ret - - movl $268437504,%r10d - movups (%rdi),%xmm0 - xorps %xmm4,%xmm4 - andl OPENSSL_ia32cap_P+4(%rip),%r10d - leaq 16(%rdx),%rax - cmpl $256,%esi - je .L14rounds - cmpl $192,%esi - je .L12rounds - cmpl $128,%esi - jne .Lbad_keybits - -.L10rounds: - movl $9,%esi - cmpl $268435456,%r10d - je .L10rounds_alt - - movups %xmm0,(%rdx) -.byte 102,15,58,223,200,1 - call .Lkey_expansion_128_cold -.byte 102,15,58,223,200,2 - call .Lkey_expansion_128 -.byte 102,15,58,223,200,4 - call .Lkey_expansion_128 -.byte 102,15,58,223,200,8 - call .Lkey_expansion_128 -.byte 102,15,58,223,200,16 - call .Lkey_expansion_128 -.byte 102,15,58,223,200,32 - call .Lkey_expansion_128 -.byte 102,15,58,223,200,64 - call .Lkey_expansion_128 -.byte 102,15,58,223,200,128 - call .Lkey_expansion_128 -.byte 102,15,58,223,200,27 - call .Lkey_expansion_128 -.byte 102,15,58,223,200,54 - call .Lkey_expansion_128 - movups %xmm0,(%rax) - movl %esi,80(%rax) - xorl %eax,%eax - jmp .Lenc_key_ret - -.align 16 -.L10rounds_alt: - movdqa .Lkey_rotate(%rip),%xmm5 - movl $8,%r10d - movdqa .Lkey_rcon1(%rip),%xmm4 - movdqa %xmm0,%xmm2 - movdqu %xmm0,(%rdx) - jmp .Loop_key128 - -.align 16 -.Loop_key128: -.byte 102,15,56,0,197 -.byte 102,15,56,221,196 - pslld $1,%xmm4 - leaq 16(%rax),%rax - - movdqa %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm3,%xmm2 - - pxor %xmm2,%xmm0 - movdqu %xmm0,-16(%rax) - movdqa %xmm0,%xmm2 - - decl %r10d - jnz .Loop_key128 - - movdqa .Lkey_rcon1b(%rip),%xmm4 - -.byte 102,15,56,0,197 -.byte 102,15,56,221,196 - pslld $1,%xmm4 - - movdqa %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm3,%xmm2 - - pxor %xmm2,%xmm0 - movdqu %xmm0,(%rax) - - movdqa %xmm0,%xmm2 -.byte 102,15,56,0,197 -.byte 102,15,56,221,196 - - movdqa %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm3,%xmm2 - - pxor %xmm2,%xmm0 - movdqu %xmm0,16(%rax) - - movl %esi,96(%rax) - xorl %eax,%eax - jmp .Lenc_key_ret - -.align 16 -.L12rounds: - movq 16(%rdi),%xmm2 - movl $11,%esi - cmpl $268435456,%r10d - je .L12rounds_alt - - movups %xmm0,(%rdx) -.byte 102,15,58,223,202,1 - call .Lkey_expansion_192a_cold -.byte 102,15,58,223,202,2 - call .Lkey_expansion_192b -.byte 102,15,58,223,202,4 - call .Lkey_expansion_192a -.byte 102,15,58,223,202,8 - call .Lkey_expansion_192b -.byte 102,15,58,223,202,16 - call .Lkey_expansion_192a -.byte 102,15,58,223,202,32 - call .Lkey_expansion_192b -.byte 102,15,58,223,202,64 - call .Lkey_expansion_192a -.byte 102,15,58,223,202,128 - call .Lkey_expansion_192b - movups %xmm0,(%rax) - movl %esi,48(%rax) - xorq %rax,%rax - jmp .Lenc_key_ret - -.align 16 -.L12rounds_alt: - movdqa .Lkey_rotate192(%rip),%xmm5 - movdqa .Lkey_rcon1(%rip),%xmm4 - movl $8,%r10d - movdqu %xmm0,(%rdx) - jmp .Loop_key192 - -.align 16 -.Loop_key192: - movq %xmm2,0(%rax) - movdqa %xmm2,%xmm1 -.byte 102,15,56,0,213 -.byte 102,15,56,221,212 - pslld $1,%xmm4 - leaq 24(%rax),%rax - - movdqa %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm3,%xmm0 - - pshufd $255,%xmm0,%xmm3 - pxor %xmm1,%xmm3 - pslldq $4,%xmm1 - pxor %xmm1,%xmm3 - - pxor %xmm2,%xmm0 - pxor %xmm3,%xmm2 - movdqu %xmm0,-16(%rax) - - decl %r10d - jnz .Loop_key192 - - movl %esi,32(%rax) - xorl %eax,%eax - jmp .Lenc_key_ret - -.align 16 -.L14rounds: - movups 16(%rdi),%xmm2 - movl $13,%esi - leaq 16(%rax),%rax - cmpl $268435456,%r10d - je .L14rounds_alt - - movups %xmm0,(%rdx) - movups %xmm2,16(%rdx) -.byte 102,15,58,223,202,1 - call .Lkey_expansion_256a_cold -.byte 102,15,58,223,200,1 - call .Lkey_expansion_256b -.byte 102,15,58,223,202,2 - call .Lkey_expansion_256a -.byte 102,15,58,223,200,2 - call .Lkey_expansion_256b -.byte 102,15,58,223,202,4 - call .Lkey_expansion_256a -.byte 102,15,58,223,200,4 - call .Lkey_expansion_256b -.byte 102,15,58,223,202,8 - call .Lkey_expansion_256a -.byte 102,15,58,223,200,8 - call .Lkey_expansion_256b -.byte 102,15,58,223,202,16 - call .Lkey_expansion_256a -.byte 102,15,58,223,200,16 - call .Lkey_expansion_256b -.byte 102,15,58,223,202,32 - call .Lkey_expansion_256a -.byte 102,15,58,223,200,32 - call .Lkey_expansion_256b -.byte 102,15,58,223,202,64 - call .Lkey_expansion_256a - movups %xmm0,(%rax) - movl %esi,16(%rax) - xorq %rax,%rax - jmp .Lenc_key_ret - -.align 16 -.L14rounds_alt: - movdqa .Lkey_rotate(%rip),%xmm5 - movdqa .Lkey_rcon1(%rip),%xmm4 - movl $7,%r10d - movdqu %xmm0,0(%rdx) - movdqa %xmm2,%xmm1 - movdqu %xmm2,16(%rdx) - jmp .Loop_key256 - -.align 16 -.Loop_key256: -.byte 102,15,56,0,213 -.byte 102,15,56,221,212 - - movdqa %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm3,%xmm0 - pslld $1,%xmm4 - - pxor %xmm2,%xmm0 - movdqu %xmm0,(%rax) - - decl %r10d - jz .Ldone_key256 - - pshufd $255,%xmm0,%xmm2 - pxor %xmm3,%xmm3 -.byte 102,15,56,221,211 - - movdqa %xmm1,%xmm3 - pslldq $4,%xmm1 - pxor %xmm1,%xmm3 - pslldq $4,%xmm1 - pxor %xmm1,%xmm3 - pslldq $4,%xmm1 - pxor %xmm3,%xmm1 - - pxor %xmm1,%xmm2 - movdqu %xmm2,16(%rax) - leaq 32(%rax),%rax - movdqa %xmm2,%xmm1 - - jmp .Loop_key256 - -.Ldone_key256: - movl %esi,16(%rax) - xorl %eax,%eax - jmp .Lenc_key_ret - -.align 16 -.Lbad_keybits: - movq $-2,%rax -.Lenc_key_ret: - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - addq $8,%rsp - .byte 0xf3,0xc3 -.LSEH_end_set_encrypt_key: - -.align 16 -.Lkey_expansion_128: - movups %xmm0,(%rax) - leaq 16(%rax),%rax -.Lkey_expansion_128_cold: - shufps $16,%xmm0,%xmm4 - xorps %xmm4,%xmm0 - shufps $140,%xmm0,%xmm4 - xorps %xmm4,%xmm0 - shufps $255,%xmm1,%xmm1 - xorps %xmm1,%xmm0 - .byte 0xf3,0xc3 - -.align 16 -.Lkey_expansion_192a: - movups %xmm0,(%rax) - leaq 16(%rax),%rax -.Lkey_expansion_192a_cold: - movaps %xmm2,%xmm5 -.Lkey_expansion_192b_warm: - shufps $16,%xmm0,%xmm4 - movdqa %xmm2,%xmm3 - xorps %xmm4,%xmm0 - shufps $140,%xmm0,%xmm4 - pslldq $4,%xmm3 - xorps %xmm4,%xmm0 - pshufd $85,%xmm1,%xmm1 - pxor %xmm3,%xmm2 - pxor %xmm1,%xmm0 - pshufd $255,%xmm0,%xmm3 - pxor %xmm3,%xmm2 - .byte 0xf3,0xc3 - -.align 16 -.Lkey_expansion_192b: - movaps %xmm0,%xmm3 - shufps $68,%xmm0,%xmm5 - movups %xmm5,(%rax) - shufps $78,%xmm2,%xmm3 - movups %xmm3,16(%rax) - leaq 32(%rax),%rax - jmp .Lkey_expansion_192b_warm - -.align 16 -.Lkey_expansion_256a: - movups %xmm2,(%rax) - leaq 16(%rax),%rax -.Lkey_expansion_256a_cold: - shufps $16,%xmm0,%xmm4 - xorps %xmm4,%xmm0 - shufps $140,%xmm0,%xmm4 - xorps %xmm4,%xmm0 - shufps $255,%xmm1,%xmm1 - xorps %xmm1,%xmm0 - .byte 0xf3,0xc3 - -.align 16 -.Lkey_expansion_256b: - movups %xmm0,(%rax) - leaq 16(%rax),%rax - - shufps $16,%xmm2,%xmm4 - xorps %xmm4,%xmm2 - shufps $140,%xmm2,%xmm4 - xorps %xmm4,%xmm2 - shufps $170,%xmm1,%xmm1 - xorps %xmm1,%xmm2 - .byte 0xf3,0xc3 -.size aesni_set_encrypt_key,.-aesni_set_encrypt_key -.size __aesni_set_encrypt_key,.-__aesni_set_encrypt_key -.align 64 -.Lbswap_mask: -.byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -.Lincrement32: -.long 6,6,6,0 -.Lincrement64: -.long 1,0,0,0 -.Lxts_magic: -.long 0x87,0,1,0 -.Lincrement1: -.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 -.Lkey_rotate: -.long 0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d -.Lkey_rotate192: -.long 0x04070605,0x04070605,0x04070605,0x04070605 -.Lkey_rcon1: -.long 1,1,1,1 -.Lkey_rcon1b: -.long 0x1b,0x1b,0x1b,0x1b - -.byte 65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69,83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 64 -#endif diff --git a/third_party/boringssl/linux-x86_64/crypto/aes/bsaes-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/aes/bsaes-x86_64.S deleted file mode 100644 index 8cfa4df5ba327..0000000000000 --- a/third_party/boringssl/linux-x86_64/crypto/aes/bsaes-x86_64.S +++ /dev/null @@ -1,2507 +0,0 @@ -#if defined(__x86_64__) -.text - -.extern asm_AES_encrypt -.hidden asm_AES_encrypt -.extern asm_AES_decrypt -.hidden asm_AES_decrypt - -.type _bsaes_encrypt8,@function -.align 64 -_bsaes_encrypt8: - leaq .LBS0(%rip),%r11 - - movdqa (%rax),%xmm8 - leaq 16(%rax),%rax - movdqa 80(%r11),%xmm7 - pxor %xmm8,%xmm15 - pxor %xmm8,%xmm0 - pxor %xmm8,%xmm1 - pxor %xmm8,%xmm2 -.byte 102,68,15,56,0,255 -.byte 102,15,56,0,199 - pxor %xmm8,%xmm3 - pxor %xmm8,%xmm4 -.byte 102,15,56,0,207 -.byte 102,15,56,0,215 - pxor %xmm8,%xmm5 - pxor %xmm8,%xmm6 -.byte 102,15,56,0,223 -.byte 102,15,56,0,231 -.byte 102,15,56,0,239 -.byte 102,15,56,0,247 -_bsaes_encrypt8_bitslice: - movdqa 0(%r11),%xmm7 - movdqa 16(%r11),%xmm8 - movdqa %xmm5,%xmm9 - psrlq $1,%xmm5 - movdqa %xmm3,%xmm10 - psrlq $1,%xmm3 - pxor %xmm6,%xmm5 - pxor %xmm4,%xmm3 - pand %xmm7,%xmm5 - pand %xmm7,%xmm3 - pxor %xmm5,%xmm6 - psllq $1,%xmm5 - pxor %xmm3,%xmm4 - psllq $1,%xmm3 - pxor %xmm9,%xmm5 - pxor %xmm10,%xmm3 - movdqa %xmm1,%xmm9 - psrlq $1,%xmm1 - movdqa %xmm15,%xmm10 - psrlq $1,%xmm15 - pxor %xmm2,%xmm1 - pxor %xmm0,%xmm15 - pand %xmm7,%xmm1 - pand %xmm7,%xmm15 - pxor %xmm1,%xmm2 - psllq $1,%xmm1 - pxor %xmm15,%xmm0 - psllq $1,%xmm15 - pxor %xmm9,%xmm1 - pxor %xmm10,%xmm15 - movdqa 32(%r11),%xmm7 - movdqa %xmm4,%xmm9 - psrlq $2,%xmm4 - movdqa %xmm3,%xmm10 - psrlq $2,%xmm3 - pxor %xmm6,%xmm4 - pxor %xmm5,%xmm3 - pand %xmm8,%xmm4 - pand %xmm8,%xmm3 - pxor %xmm4,%xmm6 - psllq $2,%xmm4 - pxor %xmm3,%xmm5 - psllq $2,%xmm3 - pxor %xmm9,%xmm4 - pxor %xmm10,%xmm3 - movdqa %xmm0,%xmm9 - psrlq $2,%xmm0 - movdqa %xmm15,%xmm10 - psrlq $2,%xmm15 - pxor %xmm2,%xmm0 - pxor %xmm1,%xmm15 - pand %xmm8,%xmm0 - pand %xmm8,%xmm15 - pxor %xmm0,%xmm2 - psllq $2,%xmm0 - pxor %xmm15,%xmm1 - psllq $2,%xmm15 - pxor %xmm9,%xmm0 - pxor %xmm10,%xmm15 - movdqa %xmm2,%xmm9 - psrlq $4,%xmm2 - movdqa %xmm1,%xmm10 - psrlq $4,%xmm1 - pxor %xmm6,%xmm2 - pxor %xmm5,%xmm1 - pand %xmm7,%xmm2 - pand %xmm7,%xmm1 - pxor %xmm2,%xmm6 - psllq $4,%xmm2 - pxor %xmm1,%xmm5 - psllq $4,%xmm1 - pxor %xmm9,%xmm2 - pxor %xmm10,%xmm1 - movdqa %xmm0,%xmm9 - psrlq $4,%xmm0 - movdqa %xmm15,%xmm10 - psrlq $4,%xmm15 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm15 - pand %xmm7,%xmm0 - pand %xmm7,%xmm15 - pxor %xmm0,%xmm4 - psllq $4,%xmm0 - pxor %xmm15,%xmm3 - psllq $4,%xmm15 - pxor %xmm9,%xmm0 - pxor %xmm10,%xmm15 - decl %r10d - jmp .Lenc_sbox -.align 16 -.Lenc_loop: - pxor 0(%rax),%xmm15 - pxor 16(%rax),%xmm0 - pxor 32(%rax),%xmm1 - pxor 48(%rax),%xmm2 -.byte 102,68,15,56,0,255 -.byte 102,15,56,0,199 - pxor 64(%rax),%xmm3 - pxor 80(%rax),%xmm4 -.byte 102,15,56,0,207 -.byte 102,15,56,0,215 - pxor 96(%rax),%xmm5 - pxor 112(%rax),%xmm6 -.byte 102,15,56,0,223 -.byte 102,15,56,0,231 -.byte 102,15,56,0,239 -.byte 102,15,56,0,247 - leaq 128(%rax),%rax -.Lenc_sbox: - pxor %xmm5,%xmm4 - pxor %xmm0,%xmm1 - pxor %xmm15,%xmm2 - pxor %xmm1,%xmm5 - pxor %xmm15,%xmm4 - - pxor %xmm2,%xmm5 - pxor %xmm6,%xmm2 - pxor %xmm4,%xmm6 - pxor %xmm3,%xmm2 - pxor %xmm4,%xmm3 - pxor %xmm0,%xmm2 - - pxor %xmm6,%xmm1 - pxor %xmm4,%xmm0 - movdqa %xmm6,%xmm10 - movdqa %xmm0,%xmm9 - movdqa %xmm4,%xmm8 - movdqa %xmm1,%xmm12 - movdqa %xmm5,%xmm11 - - pxor %xmm3,%xmm10 - pxor %xmm1,%xmm9 - pxor %xmm2,%xmm8 - movdqa %xmm10,%xmm13 - pxor %xmm3,%xmm12 - movdqa %xmm9,%xmm7 - pxor %xmm15,%xmm11 - movdqa %xmm10,%xmm14 - - por %xmm8,%xmm9 - por %xmm11,%xmm10 - pxor %xmm7,%xmm14 - pand %xmm11,%xmm13 - pxor %xmm8,%xmm11 - pand %xmm8,%xmm7 - pand %xmm11,%xmm14 - movdqa %xmm2,%xmm11 - pxor %xmm15,%xmm11 - pand %xmm11,%xmm12 - pxor %xmm12,%xmm10 - pxor %xmm12,%xmm9 - movdqa %xmm6,%xmm12 - movdqa %xmm4,%xmm11 - pxor %xmm0,%xmm12 - pxor %xmm5,%xmm11 - movdqa %xmm12,%xmm8 - pand %xmm11,%xmm12 - por %xmm11,%xmm8 - pxor %xmm12,%xmm7 - pxor %xmm14,%xmm10 - pxor %xmm13,%xmm9 - pxor %xmm14,%xmm8 - movdqa %xmm1,%xmm11 - pxor %xmm13,%xmm7 - movdqa %xmm3,%xmm12 - pxor %xmm13,%xmm8 - movdqa %xmm0,%xmm13 - pand %xmm2,%xmm11 - movdqa %xmm6,%xmm14 - pand %xmm15,%xmm12 - pand %xmm4,%xmm13 - por %xmm5,%xmm14 - pxor %xmm11,%xmm10 - pxor %xmm12,%xmm9 - pxor %xmm13,%xmm8 - pxor %xmm14,%xmm7 - - - - - - movdqa %xmm10,%xmm11 - pand %xmm8,%xmm10 - pxor %xmm9,%xmm11 - - movdqa %xmm7,%xmm13 - movdqa %xmm11,%xmm14 - pxor %xmm10,%xmm13 - pand %xmm13,%xmm14 - - movdqa %xmm8,%xmm12 - pxor %xmm9,%xmm14 - pxor %xmm7,%xmm12 - - pxor %xmm9,%xmm10 - - pand %xmm10,%xmm12 - - movdqa %xmm13,%xmm9 - pxor %xmm7,%xmm12 - - pxor %xmm12,%xmm9 - pxor %xmm12,%xmm8 - - pand %xmm7,%xmm9 - - pxor %xmm9,%xmm13 - pxor %xmm9,%xmm8 - - pand %xmm14,%xmm13 - - pxor %xmm11,%xmm13 - movdqa %xmm5,%xmm11 - movdqa %xmm4,%xmm7 - movdqa %xmm14,%xmm9 - pxor %xmm13,%xmm9 - pand %xmm5,%xmm9 - pxor %xmm4,%xmm5 - pand %xmm14,%xmm4 - pand %xmm13,%xmm5 - pxor %xmm4,%xmm5 - pxor %xmm9,%xmm4 - pxor %xmm15,%xmm11 - pxor %xmm2,%xmm7 - pxor %xmm12,%xmm14 - pxor %xmm8,%xmm13 - movdqa %xmm14,%xmm10 - movdqa %xmm12,%xmm9 - pxor %xmm13,%xmm10 - pxor %xmm8,%xmm9 - pand %xmm11,%xmm10 - pand %xmm15,%xmm9 - pxor %xmm7,%xmm11 - pxor %xmm2,%xmm15 - pand %xmm14,%xmm7 - pand %xmm12,%xmm2 - pand %xmm13,%xmm11 - pand %xmm8,%xmm15 - pxor %xmm11,%xmm7 - pxor %xmm2,%xmm15 - pxor %xmm10,%xmm11 - pxor %xmm9,%xmm2 - pxor %xmm11,%xmm5 - pxor %xmm11,%xmm15 - pxor %xmm7,%xmm4 - pxor %xmm7,%xmm2 - - movdqa %xmm6,%xmm11 - movdqa %xmm0,%xmm7 - pxor %xmm3,%xmm11 - pxor %xmm1,%xmm7 - movdqa %xmm14,%xmm10 - movdqa %xmm12,%xmm9 - pxor %xmm13,%xmm10 - pxor %xmm8,%xmm9 - pand %xmm11,%xmm10 - pand %xmm3,%xmm9 - pxor %xmm7,%xmm11 - pxor %xmm1,%xmm3 - pand %xmm14,%xmm7 - pand %xmm12,%xmm1 - pand %xmm13,%xmm11 - pand %xmm8,%xmm3 - pxor %xmm11,%xmm7 - pxor %xmm1,%xmm3 - pxor %xmm10,%xmm11 - pxor %xmm9,%xmm1 - pxor %xmm12,%xmm14 - pxor %xmm8,%xmm13 - movdqa %xmm14,%xmm10 - pxor %xmm13,%xmm10 - pand %xmm6,%xmm10 - pxor %xmm0,%xmm6 - pand %xmm14,%xmm0 - pand %xmm13,%xmm6 - pxor %xmm0,%xmm6 - pxor %xmm10,%xmm0 - pxor %xmm11,%xmm6 - pxor %xmm11,%xmm3 - pxor %xmm7,%xmm0 - pxor %xmm7,%xmm1 - pxor %xmm15,%xmm6 - pxor %xmm5,%xmm0 - pxor %xmm6,%xmm3 - pxor %xmm15,%xmm5 - pxor %xmm0,%xmm15 - - pxor %xmm4,%xmm0 - pxor %xmm1,%xmm4 - pxor %xmm2,%xmm1 - pxor %xmm4,%xmm2 - pxor %xmm4,%xmm3 - - pxor %xmm2,%xmm5 - decl %r10d - jl .Lenc_done - pshufd $147,%xmm15,%xmm7 - pshufd $147,%xmm0,%xmm8 - pxor %xmm7,%xmm15 - pshufd $147,%xmm3,%xmm9 - pxor %xmm8,%xmm0 - pshufd $147,%xmm5,%xmm10 - pxor %xmm9,%xmm3 - pshufd $147,%xmm2,%xmm11 - pxor %xmm10,%xmm5 - pshufd $147,%xmm6,%xmm12 - pxor %xmm11,%xmm2 - pshufd $147,%xmm1,%xmm13 - pxor %xmm12,%xmm6 - pshufd $147,%xmm4,%xmm14 - pxor %xmm13,%xmm1 - pxor %xmm14,%xmm4 - - pxor %xmm15,%xmm8 - pxor %xmm4,%xmm7 - pxor %xmm4,%xmm8 - pshufd $78,%xmm15,%xmm15 - pxor %xmm0,%xmm9 - pshufd $78,%xmm0,%xmm0 - pxor %xmm2,%xmm12 - pxor %xmm7,%xmm15 - pxor %xmm6,%xmm13 - pxor %xmm8,%xmm0 - pxor %xmm5,%xmm11 - pshufd $78,%xmm2,%xmm7 - pxor %xmm1,%xmm14 - pshufd $78,%xmm6,%xmm8 - pxor %xmm3,%xmm10 - pshufd $78,%xmm5,%xmm2 - pxor %xmm4,%xmm10 - pshufd $78,%xmm4,%xmm6 - pxor %xmm4,%xmm11 - pshufd $78,%xmm1,%xmm5 - pxor %xmm11,%xmm7 - pshufd $78,%xmm3,%xmm1 - pxor %xmm12,%xmm8 - pxor %xmm10,%xmm2 - pxor %xmm14,%xmm6 - pxor %xmm13,%xmm5 - movdqa %xmm7,%xmm3 - pxor %xmm9,%xmm1 - movdqa %xmm8,%xmm4 - movdqa 48(%r11),%xmm7 - jnz .Lenc_loop - movdqa 64(%r11),%xmm7 - jmp .Lenc_loop -.align 16 -.Lenc_done: - movdqa 0(%r11),%xmm7 - movdqa 16(%r11),%xmm8 - movdqa %xmm1,%xmm9 - psrlq $1,%xmm1 - movdqa %xmm2,%xmm10 - psrlq $1,%xmm2 - pxor %xmm4,%xmm1 - pxor %xmm6,%xmm2 - pand %xmm7,%xmm1 - pand %xmm7,%xmm2 - pxor %xmm1,%xmm4 - psllq $1,%xmm1 - pxor %xmm2,%xmm6 - psllq $1,%xmm2 - pxor %xmm9,%xmm1 - pxor %xmm10,%xmm2 - movdqa %xmm3,%xmm9 - psrlq $1,%xmm3 - movdqa %xmm15,%xmm10 - psrlq $1,%xmm15 - pxor %xmm5,%xmm3 - pxor %xmm0,%xmm15 - pand %xmm7,%xmm3 - pand %xmm7,%xmm15 - pxor %xmm3,%xmm5 - psllq $1,%xmm3 - pxor %xmm15,%xmm0 - psllq $1,%xmm15 - pxor %xmm9,%xmm3 - pxor %xmm10,%xmm15 - movdqa 32(%r11),%xmm7 - movdqa %xmm6,%xmm9 - psrlq $2,%xmm6 - movdqa %xmm2,%xmm10 - psrlq $2,%xmm2 - pxor %xmm4,%xmm6 - pxor %xmm1,%xmm2 - pand %xmm8,%xmm6 - pand %xmm8,%xmm2 - pxor %xmm6,%xmm4 - psllq $2,%xmm6 - pxor %xmm2,%xmm1 - psllq $2,%xmm2 - pxor %xmm9,%xmm6 - pxor %xmm10,%xmm2 - movdqa %xmm0,%xmm9 - psrlq $2,%xmm0 - movdqa %xmm15,%xmm10 - psrlq $2,%xmm15 - pxor %xmm5,%xmm0 - pxor %xmm3,%xmm15 - pand %xmm8,%xmm0 - pand %xmm8,%xmm15 - pxor %xmm0,%xmm5 - psllq $2,%xmm0 - pxor %xmm15,%xmm3 - psllq $2,%xmm15 - pxor %xmm9,%xmm0 - pxor %xmm10,%xmm15 - movdqa %xmm5,%xmm9 - psrlq $4,%xmm5 - movdqa %xmm3,%xmm10 - psrlq $4,%xmm3 - pxor %xmm4,%xmm5 - pxor %xmm1,%xmm3 - pand %xmm7,%xmm5 - pand %xmm7,%xmm3 - pxor %xmm5,%xmm4 - psllq $4,%xmm5 - pxor %xmm3,%xmm1 - psllq $4,%xmm3 - pxor %xmm9,%xmm5 - pxor %xmm10,%xmm3 - movdqa %xmm0,%xmm9 - psrlq $4,%xmm0 - movdqa %xmm15,%xmm10 - psrlq $4,%xmm15 - pxor %xmm6,%xmm0 - pxor %xmm2,%xmm15 - pand %xmm7,%xmm0 - pand %xmm7,%xmm15 - pxor %xmm0,%xmm6 - psllq $4,%xmm0 - pxor %xmm15,%xmm2 - psllq $4,%xmm15 - pxor %xmm9,%xmm0 - pxor %xmm10,%xmm15 - movdqa (%rax),%xmm7 - pxor %xmm7,%xmm3 - pxor %xmm7,%xmm5 - pxor %xmm7,%xmm2 - pxor %xmm7,%xmm6 - pxor %xmm7,%xmm1 - pxor %xmm7,%xmm4 - pxor %xmm7,%xmm15 - pxor %xmm7,%xmm0 - .byte 0xf3,0xc3 -.size _bsaes_encrypt8,.-_bsaes_encrypt8 - -.type _bsaes_decrypt8,@function -.align 64 -_bsaes_decrypt8: - leaq .LBS0(%rip),%r11 - - movdqa (%rax),%xmm8 - leaq 16(%rax),%rax - movdqa -48(%r11),%xmm7 - pxor %xmm8,%xmm15 - pxor %xmm8,%xmm0 - pxor %xmm8,%xmm1 - pxor %xmm8,%xmm2 -.byte 102,68,15,56,0,255 -.byte 102,15,56,0,199 - pxor %xmm8,%xmm3 - pxor %xmm8,%xmm4 -.byte 102,15,56,0,207 -.byte 102,15,56,0,215 - pxor %xmm8,%xmm5 - pxor %xmm8,%xmm6 -.byte 102,15,56,0,223 -.byte 102,15,56,0,231 -.byte 102,15,56,0,239 -.byte 102,15,56,0,247 - movdqa 0(%r11),%xmm7 - movdqa 16(%r11),%xmm8 - movdqa %xmm5,%xmm9 - psrlq $1,%xmm5 - movdqa %xmm3,%xmm10 - psrlq $1,%xmm3 - pxor %xmm6,%xmm5 - pxor %xmm4,%xmm3 - pand %xmm7,%xmm5 - pand %xmm7,%xmm3 - pxor %xmm5,%xmm6 - psllq $1,%xmm5 - pxor %xmm3,%xmm4 - psllq $1,%xmm3 - pxor %xmm9,%xmm5 - pxor %xmm10,%xmm3 - movdqa %xmm1,%xmm9 - psrlq $1,%xmm1 - movdqa %xmm15,%xmm10 - psrlq $1,%xmm15 - pxor %xmm2,%xmm1 - pxor %xmm0,%xmm15 - pand %xmm7,%xmm1 - pand %xmm7,%xmm15 - pxor %xmm1,%xmm2 - psllq $1,%xmm1 - pxor %xmm15,%xmm0 - psllq $1,%xmm15 - pxor %xmm9,%xmm1 - pxor %xmm10,%xmm15 - movdqa 32(%r11),%xmm7 - movdqa %xmm4,%xmm9 - psrlq $2,%xmm4 - movdqa %xmm3,%xmm10 - psrlq $2,%xmm3 - pxor %xmm6,%xmm4 - pxor %xmm5,%xmm3 - pand %xmm8,%xmm4 - pand %xmm8,%xmm3 - pxor %xmm4,%xmm6 - psllq $2,%xmm4 - pxor %xmm3,%xmm5 - psllq $2,%xmm3 - pxor %xmm9,%xmm4 - pxor %xmm10,%xmm3 - movdqa %xmm0,%xmm9 - psrlq $2,%xmm0 - movdqa %xmm15,%xmm10 - psrlq $2,%xmm15 - pxor %xmm2,%xmm0 - pxor %xmm1,%xmm15 - pand %xmm8,%xmm0 - pand %xmm8,%xmm15 - pxor %xmm0,%xmm2 - psllq $2,%xmm0 - pxor %xmm15,%xmm1 - psllq $2,%xmm15 - pxor %xmm9,%xmm0 - pxor %xmm10,%xmm15 - movdqa %xmm2,%xmm9 - psrlq $4,%xmm2 - movdqa %xmm1,%xmm10 - psrlq $4,%xmm1 - pxor %xmm6,%xmm2 - pxor %xmm5,%xmm1 - pand %xmm7,%xmm2 - pand %xmm7,%xmm1 - pxor %xmm2,%xmm6 - psllq $4,%xmm2 - pxor %xmm1,%xmm5 - psllq $4,%xmm1 - pxor %xmm9,%xmm2 - pxor %xmm10,%xmm1 - movdqa %xmm0,%xmm9 - psrlq $4,%xmm0 - movdqa %xmm15,%xmm10 - psrlq $4,%xmm15 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm15 - pand %xmm7,%xmm0 - pand %xmm7,%xmm15 - pxor %xmm0,%xmm4 - psllq $4,%xmm0 - pxor %xmm15,%xmm3 - psllq $4,%xmm15 - pxor %xmm9,%xmm0 - pxor %xmm10,%xmm15 - decl %r10d - jmp .Ldec_sbox -.align 16 -.Ldec_loop: - pxor 0(%rax),%xmm15 - pxor 16(%rax),%xmm0 - pxor 32(%rax),%xmm1 - pxor 48(%rax),%xmm2 -.byte 102,68,15,56,0,255 -.byte 102,15,56,0,199 - pxor 64(%rax),%xmm3 - pxor 80(%rax),%xmm4 -.byte 102,15,56,0,207 -.byte 102,15,56,0,215 - pxor 96(%rax),%xmm5 - pxor 112(%rax),%xmm6 -.byte 102,15,56,0,223 -.byte 102,15,56,0,231 -.byte 102,15,56,0,239 -.byte 102,15,56,0,247 - leaq 128(%rax),%rax -.Ldec_sbox: - pxor %xmm3,%xmm2 - - pxor %xmm6,%xmm3 - pxor %xmm6,%xmm1 - pxor %xmm3,%xmm5 - pxor %xmm5,%xmm6 - pxor %xmm6,%xmm0 - - pxor %xmm0,%xmm15 - pxor %xmm4,%xmm1 - pxor %xmm15,%xmm2 - pxor %xmm15,%xmm4 - pxor %xmm2,%xmm0 - movdqa %xmm2,%xmm10 - movdqa %xmm6,%xmm9 - movdqa %xmm0,%xmm8 - movdqa %xmm3,%xmm12 - movdqa %xmm4,%xmm11 - - pxor %xmm15,%xmm10 - pxor %xmm3,%xmm9 - pxor %xmm5,%xmm8 - movdqa %xmm10,%xmm13 - pxor %xmm15,%xmm12 - movdqa %xmm9,%xmm7 - pxor %xmm1,%xmm11 - movdqa %xmm10,%xmm14 - - por %xmm8,%xmm9 - por %xmm11,%xmm10 - pxor %xmm7,%xmm14 - pand %xmm11,%xmm13 - pxor %xmm8,%xmm11 - pand %xmm8,%xmm7 - pand %xmm11,%xmm14 - movdqa %xmm5,%xmm11 - pxor %xmm1,%xmm11 - pand %xmm11,%xmm12 - pxor %xmm12,%xmm10 - pxor %xmm12,%xmm9 - movdqa %xmm2,%xmm12 - movdqa %xmm0,%xmm11 - pxor %xmm6,%xmm12 - pxor %xmm4,%xmm11 - movdqa %xmm12,%xmm8 - pand %xmm11,%xmm12 - por %xmm11,%xmm8 - pxor %xmm12,%xmm7 - pxor %xmm14,%xmm10 - pxor %xmm13,%xmm9 - pxor %xmm14,%xmm8 - movdqa %xmm3,%xmm11 - pxor %xmm13,%xmm7 - movdqa %xmm15,%xmm12 - pxor %xmm13,%xmm8 - movdqa %xmm6,%xmm13 - pand %xmm5,%xmm11 - movdqa %xmm2,%xmm14 - pand %xmm1,%xmm12 - pand %xmm0,%xmm13 - por %xmm4,%xmm14 - pxor %xmm11,%xmm10 - pxor %xmm12,%xmm9 - pxor %xmm13,%xmm8 - pxor %xmm14,%xmm7 - - - - - - movdqa %xmm10,%xmm11 - pand %xmm8,%xmm10 - pxor %xmm9,%xmm11 - - movdqa %xmm7,%xmm13 - movdqa %xmm11,%xmm14 - pxor %xmm10,%xmm13 - pand %xmm13,%xmm14 - - movdqa %xmm8,%xmm12 - pxor %xmm9,%xmm14 - pxor %xmm7,%xmm12 - - pxor %xmm9,%xmm10 - - pand %xmm10,%xmm12 - - movdqa %xmm13,%xmm9 - pxor %xmm7,%xmm12 - - pxor %xmm12,%xmm9 - pxor %xmm12,%xmm8 - - pand %xmm7,%xmm9 - - pxor %xmm9,%xmm13 - pxor %xmm9,%xmm8 - - pand %xmm14,%xmm13 - - pxor %xmm11,%xmm13 - movdqa %xmm4,%xmm11 - movdqa %xmm0,%xmm7 - movdqa %xmm14,%xmm9 - pxor %xmm13,%xmm9 - pand %xmm4,%xmm9 - pxor %xmm0,%xmm4 - pand %xmm14,%xmm0 - pand %xmm13,%xmm4 - pxor %xmm0,%xmm4 - pxor %xmm9,%xmm0 - pxor %xmm1,%xmm11 - pxor %xmm5,%xmm7 - pxor %xmm12,%xmm14 - pxor %xmm8,%xmm13 - movdqa %xmm14,%xmm10 - movdqa %xmm12,%xmm9 - pxor %xmm13,%xmm10 - pxor %xmm8,%xmm9 - pand %xmm11,%xmm10 - pand %xmm1,%xmm9 - pxor %xmm7,%xmm11 - pxor %xmm5,%xmm1 - pand %xmm14,%xmm7 - pand %xmm12,%xmm5 - pand %xmm13,%xmm11 - pand %xmm8,%xmm1 - pxor %xmm11,%xmm7 - pxor %xmm5,%xmm1 - pxor %xmm10,%xmm11 - pxor %xmm9,%xmm5 - pxor %xmm11,%xmm4 - pxor %xmm11,%xmm1 - pxor %xmm7,%xmm0 - pxor %xmm7,%xmm5 - - movdqa %xmm2,%xmm11 - movdqa %xmm6,%xmm7 - pxor %xmm15,%xmm11 - pxor %xmm3,%xmm7 - movdqa %xmm14,%xmm10 - movdqa %xmm12,%xmm9 - pxor %xmm13,%xmm10 - pxor %xmm8,%xmm9 - pand %xmm11,%xmm10 - pand %xmm15,%xmm9 - pxor %xmm7,%xmm11 - pxor %xmm3,%xmm15 - pand %xmm14,%xmm7 - pand %xmm12,%xmm3 - pand %xmm13,%xmm11 - pand %xmm8,%xmm15 - pxor %xmm11,%xmm7 - pxor %xmm3,%xmm15 - pxor %xmm10,%xmm11 - pxor %xmm9,%xmm3 - pxor %xmm12,%xmm14 - pxor %xmm8,%xmm13 - movdqa %xmm14,%xmm10 - pxor %xmm13,%xmm10 - pand %xmm2,%xmm10 - pxor %xmm6,%xmm2 - pand %xmm14,%xmm6 - pand %xmm13,%xmm2 - pxor %xmm6,%xmm2 - pxor %xmm10,%xmm6 - pxor %xmm11,%xmm2 - pxor %xmm11,%xmm15 - pxor %xmm7,%xmm6 - pxor %xmm7,%xmm3 - pxor %xmm6,%xmm0 - pxor %xmm4,%xmm5 - - pxor %xmm0,%xmm3 - pxor %xmm6,%xmm1 - pxor %xmm6,%xmm4 - pxor %xmm1,%xmm3 - pxor %xmm15,%xmm6 - pxor %xmm4,%xmm3 - pxor %xmm5,%xmm2 - pxor %xmm0,%xmm5 - pxor %xmm3,%xmm2 - - pxor %xmm15,%xmm3 - pxor %xmm2,%xmm6 - decl %r10d - jl .Ldec_done - - pshufd $78,%xmm15,%xmm7 - pshufd $78,%xmm2,%xmm13 - pxor %xmm15,%xmm7 - pshufd $78,%xmm4,%xmm14 - pxor %xmm2,%xmm13 - pshufd $78,%xmm0,%xmm8 - pxor %xmm4,%xmm14 - pshufd $78,%xmm5,%xmm9 - pxor %xmm0,%xmm8 - pshufd $78,%xmm3,%xmm10 - pxor %xmm5,%xmm9 - pxor %xmm13,%xmm15 - pxor %xmm13,%xmm0 - pshufd $78,%xmm1,%xmm11 - pxor %xmm3,%xmm10 - pxor %xmm7,%xmm5 - pxor %xmm8,%xmm3 - pshufd $78,%xmm6,%xmm12 - pxor %xmm1,%xmm11 - pxor %xmm14,%xmm0 - pxor %xmm9,%xmm1 - pxor %xmm6,%xmm12 - - pxor %xmm14,%xmm5 - pxor %xmm13,%xmm3 - pxor %xmm13,%xmm1 - pxor %xmm10,%xmm6 - pxor %xmm11,%xmm2 - pxor %xmm14,%xmm1 - pxor %xmm14,%xmm6 - pxor %xmm12,%xmm4 - pshufd $147,%xmm15,%xmm7 - pshufd $147,%xmm0,%xmm8 - pxor %xmm7,%xmm15 - pshufd $147,%xmm5,%xmm9 - pxor %xmm8,%xmm0 - pshufd $147,%xmm3,%xmm10 - pxor %xmm9,%xmm5 - pshufd $147,%xmm1,%xmm11 - pxor %xmm10,%xmm3 - pshufd $147,%xmm6,%xmm12 - pxor %xmm11,%xmm1 - pshufd $147,%xmm2,%xmm13 - pxor %xmm12,%xmm6 - pshufd $147,%xmm4,%xmm14 - pxor %xmm13,%xmm2 - pxor %xmm14,%xmm4 - - pxor %xmm15,%xmm8 - pxor %xmm4,%xmm7 - pxor %xmm4,%xmm8 - pshufd $78,%xmm15,%xmm15 - pxor %xmm0,%xmm9 - pshufd $78,%xmm0,%xmm0 - pxor %xmm1,%xmm12 - pxor %xmm7,%xmm15 - pxor %xmm6,%xmm13 - pxor %xmm8,%xmm0 - pxor %xmm3,%xmm11 - pshufd $78,%xmm1,%xmm7 - pxor %xmm2,%xmm14 - pshufd $78,%xmm6,%xmm8 - pxor %xmm5,%xmm10 - pshufd $78,%xmm3,%xmm1 - pxor %xmm4,%xmm10 - pshufd $78,%xmm4,%xmm6 - pxor %xmm4,%xmm11 - pshufd $78,%xmm2,%xmm3 - pxor %xmm11,%xmm7 - pshufd $78,%xmm5,%xmm2 - pxor %xmm12,%xmm8 - pxor %xmm1,%xmm10 - pxor %xmm14,%xmm6 - pxor %xmm3,%xmm13 - movdqa %xmm7,%xmm3 - pxor %xmm9,%xmm2 - movdqa %xmm13,%xmm5 - movdqa %xmm8,%xmm4 - movdqa %xmm2,%xmm1 - movdqa %xmm10,%xmm2 - movdqa -16(%r11),%xmm7 - jnz .Ldec_loop - movdqa -32(%r11),%xmm7 - jmp .Ldec_loop -.align 16 -.Ldec_done: - movdqa 0(%r11),%xmm7 - movdqa 16(%r11),%xmm8 - movdqa %xmm2,%xmm9 - psrlq $1,%xmm2 - movdqa %xmm1,%xmm10 - psrlq $1,%xmm1 - pxor %xmm4,%xmm2 - pxor %xmm6,%xmm1 - pand %xmm7,%xmm2 - pand %xmm7,%xmm1 - pxor %xmm2,%xmm4 - psllq $1,%xmm2 - pxor %xmm1,%xmm6 - psllq $1,%xmm1 - pxor %xmm9,%xmm2 - pxor %xmm10,%xmm1 - movdqa %xmm5,%xmm9 - psrlq $1,%xmm5 - movdqa %xmm15,%xmm10 - psrlq $1,%xmm15 - pxor %xmm3,%xmm5 - pxor %xmm0,%xmm15 - pand %xmm7,%xmm5 - pand %xmm7,%xmm15 - pxor %xmm5,%xmm3 - psllq $1,%xmm5 - pxor %xmm15,%xmm0 - psllq $1,%xmm15 - pxor %xmm9,%xmm5 - pxor %xmm10,%xmm15 - movdqa 32(%r11),%xmm7 - movdqa %xmm6,%xmm9 - psrlq $2,%xmm6 - movdqa %xmm1,%xmm10 - psrlq $2,%xmm1 - pxor %xmm4,%xmm6 - pxor %xmm2,%xmm1 - pand %xmm8,%xmm6 - pand %xmm8,%xmm1 - pxor %xmm6,%xmm4 - psllq $2,%xmm6 - pxor %xmm1,%xmm2 - psllq $2,%xmm1 - pxor %xmm9,%xmm6 - pxor %xmm10,%xmm1 - movdqa %xmm0,%xmm9 - psrlq $2,%xmm0 - movdqa %xmm15,%xmm10 - psrlq $2,%xmm15 - pxor %xmm3,%xmm0 - pxor %xmm5,%xmm15 - pand %xmm8,%xmm0 - pand %xmm8,%xmm15 - pxor %xmm0,%xmm3 - psllq $2,%xmm0 - pxor %xmm15,%xmm5 - psllq $2,%xmm15 - pxor %xmm9,%xmm0 - pxor %xmm10,%xmm15 - movdqa %xmm3,%xmm9 - psrlq $4,%xmm3 - movdqa %xmm5,%xmm10 - psrlq $4,%xmm5 - pxor %xmm4,%xmm3 - pxor %xmm2,%xmm5 - pand %xmm7,%xmm3 - pand %xmm7,%xmm5 - pxor %xmm3,%xmm4 - psllq $4,%xmm3 - pxor %xmm5,%xmm2 - psllq $4,%xmm5 - pxor %xmm9,%xmm3 - pxor %xmm10,%xmm5 - movdqa %xmm0,%xmm9 - psrlq $4,%xmm0 - movdqa %xmm15,%xmm10 - psrlq $4,%xmm15 - pxor %xmm6,%xmm0 - pxor %xmm1,%xmm15 - pand %xmm7,%xmm0 - pand %xmm7,%xmm15 - pxor %xmm0,%xmm6 - psllq $4,%xmm0 - pxor %xmm15,%xmm1 - psllq $4,%xmm15 - pxor %xmm9,%xmm0 - pxor %xmm10,%xmm15 - movdqa (%rax),%xmm7 - pxor %xmm7,%xmm5 - pxor %xmm7,%xmm3 - pxor %xmm7,%xmm1 - pxor %xmm7,%xmm6 - pxor %xmm7,%xmm2 - pxor %xmm7,%xmm4 - pxor %xmm7,%xmm15 - pxor %xmm7,%xmm0 - .byte 0xf3,0xc3 -.size _bsaes_decrypt8,.-_bsaes_decrypt8 -.type _bsaes_key_convert,@function -.align 16 -_bsaes_key_convert: - leaq .Lmasks(%rip),%r11 - movdqu (%rcx),%xmm7 - leaq 16(%rcx),%rcx - movdqa 0(%r11),%xmm0 - movdqa 16(%r11),%xmm1 - movdqa 32(%r11),%xmm2 - movdqa 48(%r11),%xmm3 - movdqa 64(%r11),%xmm4 - pcmpeqd %xmm5,%xmm5 - - movdqu (%rcx),%xmm6 - movdqa %xmm7,(%rax) - leaq 16(%rax),%rax - decl %r10d - jmp .Lkey_loop -.align 16 -.Lkey_loop: -.byte 102,15,56,0,244 - - movdqa %xmm0,%xmm8 - movdqa %xmm1,%xmm9 - - pand %xmm6,%xmm8 - pand %xmm6,%xmm9 - movdqa %xmm2,%xmm10 - pcmpeqb %xmm0,%xmm8 - psllq $4,%xmm0 - movdqa %xmm3,%xmm11 - pcmpeqb %xmm1,%xmm9 - psllq $4,%xmm1 - - pand %xmm6,%xmm10 - pand %xmm6,%xmm11 - movdqa %xmm0,%xmm12 - pcmpeqb %xmm2,%xmm10 - psllq $4,%xmm2 - movdqa %xmm1,%xmm13 - pcmpeqb %xmm3,%xmm11 - psllq $4,%xmm3 - - movdqa %xmm2,%xmm14 - movdqa %xmm3,%xmm15 - pxor %xmm5,%xmm8 - pxor %xmm5,%xmm9 - - pand %xmm6,%xmm12 - pand %xmm6,%xmm13 - movdqa %xmm8,0(%rax) - pcmpeqb %xmm0,%xmm12 - psrlq $4,%xmm0 - movdqa %xmm9,16(%rax) - pcmpeqb %xmm1,%xmm13 - psrlq $4,%xmm1 - leaq 16(%rcx),%rcx - - pand %xmm6,%xmm14 - pand %xmm6,%xmm15 - movdqa %xmm10,32(%rax) - pcmpeqb %xmm2,%xmm14 - psrlq $4,%xmm2 - movdqa %xmm11,48(%rax) - pcmpeqb %xmm3,%xmm15 - psrlq $4,%xmm3 - movdqu (%rcx),%xmm6 - - pxor %xmm5,%xmm13 - pxor %xmm5,%xmm14 - movdqa %xmm12,64(%rax) - movdqa %xmm13,80(%rax) - movdqa %xmm14,96(%rax) - movdqa %xmm15,112(%rax) - leaq 128(%rax),%rax - decl %r10d - jnz .Lkey_loop - - movdqa 80(%r11),%xmm7 - - .byte 0xf3,0xc3 -.size _bsaes_key_convert,.-_bsaes_key_convert -.extern asm_AES_cbc_encrypt -.hidden asm_AES_cbc_encrypt -.globl bsaes_cbc_encrypt -.hidden bsaes_cbc_encrypt -.type bsaes_cbc_encrypt,@function -.align 16 -bsaes_cbc_encrypt: - cmpl $0,%r9d - jne asm_AES_cbc_encrypt - cmpq $128,%rdx - jb asm_AES_cbc_encrypt - - movq %rsp,%rax -.Lcbc_dec_prologue: - pushq %rbp - pushq %rbx - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - leaq -72(%rsp),%rsp - movq %rsp,%rbp - movl 240(%rcx),%eax - movq %rdi,%r12 - movq %rsi,%r13 - movq %rdx,%r14 - movq %rcx,%r15 - movq %r8,%rbx - shrq $4,%r14 - - movl %eax,%edx - shlq $7,%rax - subq $96,%rax - subq %rax,%rsp - - movq %rsp,%rax - movq %r15,%rcx - movl %edx,%r10d - call _bsaes_key_convert - pxor (%rsp),%xmm7 - movdqa %xmm6,(%rax) - movdqa %xmm7,(%rsp) - - movdqu (%rbx),%xmm14 - subq $8,%r14 -.Lcbc_dec_loop: - movdqu 0(%r12),%xmm15 - movdqu 16(%r12),%xmm0 - movdqu 32(%r12),%xmm1 - movdqu 48(%r12),%xmm2 - movdqu 64(%r12),%xmm3 - movdqu 80(%r12),%xmm4 - movq %rsp,%rax - movdqu 96(%r12),%xmm5 - movl %edx,%r10d - movdqu 112(%r12),%xmm6 - movdqa %xmm14,32(%rbp) - - call _bsaes_decrypt8 - - pxor 32(%rbp),%xmm15 - movdqu 0(%r12),%xmm7 - movdqu 16(%r12),%xmm8 - pxor %xmm7,%xmm0 - movdqu 32(%r12),%xmm9 - pxor %xmm8,%xmm5 - movdqu 48(%r12),%xmm10 - pxor %xmm9,%xmm3 - movdqu 64(%r12),%xmm11 - pxor %xmm10,%xmm1 - movdqu 80(%r12),%xmm12 - pxor %xmm11,%xmm6 - movdqu 96(%r12),%xmm13 - pxor %xmm12,%xmm2 - movdqu 112(%r12),%xmm14 - pxor %xmm13,%xmm4 - movdqu %xmm15,0(%r13) - leaq 128(%r12),%r12 - movdqu %xmm0,16(%r13) - movdqu %xmm5,32(%r13) - movdqu %xmm3,48(%r13) - movdqu %xmm1,64(%r13) - movdqu %xmm6,80(%r13) - movdqu %xmm2,96(%r13) - movdqu %xmm4,112(%r13) - leaq 128(%r13),%r13 - subq $8,%r14 - jnc .Lcbc_dec_loop - - addq $8,%r14 - jz .Lcbc_dec_done - - movdqu 0(%r12),%xmm15 - movq %rsp,%rax - movl %edx,%r10d - cmpq $2,%r14 - jb .Lcbc_dec_one - movdqu 16(%r12),%xmm0 - je .Lcbc_dec_two - movdqu 32(%r12),%xmm1 - cmpq $4,%r14 - jb .Lcbc_dec_three - movdqu 48(%r12),%xmm2 - je .Lcbc_dec_four - movdqu 64(%r12),%xmm3 - cmpq $6,%r14 - jb .Lcbc_dec_five - movdqu 80(%r12),%xmm4 - je .Lcbc_dec_six - movdqu 96(%r12),%xmm5 - movdqa %xmm14,32(%rbp) - call _bsaes_decrypt8 - pxor 32(%rbp),%xmm15 - movdqu 0(%r12),%xmm7 - movdqu 16(%r12),%xmm8 - pxor %xmm7,%xmm0 - movdqu 32(%r12),%xmm9 - pxor %xmm8,%xmm5 - movdqu 48(%r12),%xmm10 - pxor %xmm9,%xmm3 - movdqu 64(%r12),%xmm11 - pxor %xmm10,%xmm1 - movdqu 80(%r12),%xmm12 - pxor %xmm11,%xmm6 - movdqu 96(%r12),%xmm14 - pxor %xmm12,%xmm2 - movdqu %xmm15,0(%r13) - movdqu %xmm0,16(%r13) - movdqu %xmm5,32(%r13) - movdqu %xmm3,48(%r13) - movdqu %xmm1,64(%r13) - movdqu %xmm6,80(%r13) - movdqu %xmm2,96(%r13) - jmp .Lcbc_dec_done -.align 16 -.Lcbc_dec_six: - movdqa %xmm14,32(%rbp) - call _bsaes_decrypt8 - pxor 32(%rbp),%xmm15 - movdqu 0(%r12),%xmm7 - movdqu 16(%r12),%xmm8 - pxor %xmm7,%xmm0 - movdqu 32(%r12),%xmm9 - pxor %xmm8,%xmm5 - movdqu 48(%r12),%xmm10 - pxor %xmm9,%xmm3 - movdqu 64(%r12),%xmm11 - pxor %xmm10,%xmm1 - movdqu 80(%r12),%xmm14 - pxor %xmm11,%xmm6 - movdqu %xmm15,0(%r13) - movdqu %xmm0,16(%r13) - movdqu %xmm5,32(%r13) - movdqu %xmm3,48(%r13) - movdqu %xmm1,64(%r13) - movdqu %xmm6,80(%r13) - jmp .Lcbc_dec_done -.align 16 -.Lcbc_dec_five: - movdqa %xmm14,32(%rbp) - call _bsaes_decrypt8 - pxor 32(%rbp),%xmm15 - movdqu 0(%r12),%xmm7 - movdqu 16(%r12),%xmm8 - pxor %xmm7,%xmm0 - movdqu 32(%r12),%xmm9 - pxor %xmm8,%xmm5 - movdqu 48(%r12),%xmm10 - pxor %xmm9,%xmm3 - movdqu 64(%r12),%xmm14 - pxor %xmm10,%xmm1 - movdqu %xmm15,0(%r13) - movdqu %xmm0,16(%r13) - movdqu %xmm5,32(%r13) - movdqu %xmm3,48(%r13) - movdqu %xmm1,64(%r13) - jmp .Lcbc_dec_done -.align 16 -.Lcbc_dec_four: - movdqa %xmm14,32(%rbp) - call _bsaes_decrypt8 - pxor 32(%rbp),%xmm15 - movdqu 0(%r12),%xmm7 - movdqu 16(%r12),%xmm8 - pxor %xmm7,%xmm0 - movdqu 32(%r12),%xmm9 - pxor %xmm8,%xmm5 - movdqu 48(%r12),%xmm14 - pxor %xmm9,%xmm3 - movdqu %xmm15,0(%r13) - movdqu %xmm0,16(%r13) - movdqu %xmm5,32(%r13) - movdqu %xmm3,48(%r13) - jmp .Lcbc_dec_done -.align 16 -.Lcbc_dec_three: - movdqa %xmm14,32(%rbp) - call _bsaes_decrypt8 - pxor 32(%rbp),%xmm15 - movdqu 0(%r12),%xmm7 - movdqu 16(%r12),%xmm8 - pxor %xmm7,%xmm0 - movdqu 32(%r12),%xmm14 - pxor %xmm8,%xmm5 - movdqu %xmm15,0(%r13) - movdqu %xmm0,16(%r13) - movdqu %xmm5,32(%r13) - jmp .Lcbc_dec_done -.align 16 -.Lcbc_dec_two: - movdqa %xmm14,32(%rbp) - call _bsaes_decrypt8 - pxor 32(%rbp),%xmm15 - movdqu 0(%r12),%xmm7 - movdqu 16(%r12),%xmm14 - pxor %xmm7,%xmm0 - movdqu %xmm15,0(%r13) - movdqu %xmm0,16(%r13) - jmp .Lcbc_dec_done -.align 16 -.Lcbc_dec_one: - leaq (%r12),%rdi - leaq 32(%rbp),%rsi - leaq (%r15),%rdx - call asm_AES_decrypt - pxor 32(%rbp),%xmm14 - movdqu %xmm14,(%r13) - movdqa %xmm15,%xmm14 - -.Lcbc_dec_done: - movdqu %xmm14,(%rbx) - leaq (%rsp),%rax - pxor %xmm0,%xmm0 -.Lcbc_dec_bzero: - movdqa %xmm0,0(%rax) - movdqa %xmm0,16(%rax) - leaq 32(%rax),%rax - cmpq %rax,%rbp - ja .Lcbc_dec_bzero - - leaq (%rbp),%rsp - movq 72(%rsp),%r15 - movq 80(%rsp),%r14 - movq 88(%rsp),%r13 - movq 96(%rsp),%r12 - movq 104(%rsp),%rbx - movq 112(%rsp),%rax - leaq 120(%rsp),%rsp - movq %rax,%rbp -.Lcbc_dec_epilogue: - .byte 0xf3,0xc3 -.size bsaes_cbc_encrypt,.-bsaes_cbc_encrypt - -.globl bsaes_ctr32_encrypt_blocks -.hidden bsaes_ctr32_encrypt_blocks -.type bsaes_ctr32_encrypt_blocks,@function -.align 16 -bsaes_ctr32_encrypt_blocks: - movq %rsp,%rax -.Lctr_enc_prologue: - pushq %rbp - pushq %rbx - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - leaq -72(%rsp),%rsp - movq %rsp,%rbp - movdqu (%r8),%xmm0 - movl 240(%rcx),%eax - movq %rdi,%r12 - movq %rsi,%r13 - movq %rdx,%r14 - movq %rcx,%r15 - movdqa %xmm0,32(%rbp) - cmpq $8,%rdx - jb .Lctr_enc_short - - movl %eax,%ebx - shlq $7,%rax - subq $96,%rax - subq %rax,%rsp - - movq %rsp,%rax - movq %r15,%rcx - movl %ebx,%r10d - call _bsaes_key_convert - pxor %xmm6,%xmm7 - movdqa %xmm7,(%rax) - - movdqa (%rsp),%xmm8 - leaq .LADD1(%rip),%r11 - movdqa 32(%rbp),%xmm15 - movdqa -32(%r11),%xmm7 -.byte 102,68,15,56,0,199 -.byte 102,68,15,56,0,255 - movdqa %xmm8,(%rsp) - jmp .Lctr_enc_loop -.align 16 -.Lctr_enc_loop: - movdqa %xmm15,32(%rbp) - movdqa %xmm15,%xmm0 - movdqa %xmm15,%xmm1 - paddd 0(%r11),%xmm0 - movdqa %xmm15,%xmm2 - paddd 16(%r11),%xmm1 - movdqa %xmm15,%xmm3 - paddd 32(%r11),%xmm2 - movdqa %xmm15,%xmm4 - paddd 48(%r11),%xmm3 - movdqa %xmm15,%xmm5 - paddd 64(%r11),%xmm4 - movdqa %xmm15,%xmm6 - paddd 80(%r11),%xmm5 - paddd 96(%r11),%xmm6 - - - - movdqa (%rsp),%xmm8 - leaq 16(%rsp),%rax - movdqa -16(%r11),%xmm7 - pxor %xmm8,%xmm15 - pxor %xmm8,%xmm0 - pxor %xmm8,%xmm1 - pxor %xmm8,%xmm2 -.byte 102,68,15,56,0,255 -.byte 102,15,56,0,199 - pxor %xmm8,%xmm3 - pxor %xmm8,%xmm4 -.byte 102,15,56,0,207 -.byte 102,15,56,0,215 - pxor %xmm8,%xmm5 - pxor %xmm8,%xmm6 -.byte 102,15,56,0,223 -.byte 102,15,56,0,231 -.byte 102,15,56,0,239 -.byte 102,15,56,0,247 - leaq .LBS0(%rip),%r11 - movl %ebx,%r10d - - call _bsaes_encrypt8_bitslice - - subq $8,%r14 - jc .Lctr_enc_loop_done - - movdqu 0(%r12),%xmm7 - movdqu 16(%r12),%xmm8 - movdqu 32(%r12),%xmm9 - movdqu 48(%r12),%xmm10 - movdqu 64(%r12),%xmm11 - movdqu 80(%r12),%xmm12 - movdqu 96(%r12),%xmm13 - movdqu 112(%r12),%xmm14 - leaq 128(%r12),%r12 - pxor %xmm15,%xmm7 - movdqa 32(%rbp),%xmm15 - pxor %xmm8,%xmm0 - movdqu %xmm7,0(%r13) - pxor %xmm9,%xmm3 - movdqu %xmm0,16(%r13) - pxor %xmm10,%xmm5 - movdqu %xmm3,32(%r13) - pxor %xmm11,%xmm2 - movdqu %xmm5,48(%r13) - pxor %xmm12,%xmm6 - movdqu %xmm2,64(%r13) - pxor %xmm13,%xmm1 - movdqu %xmm6,80(%r13) - pxor %xmm14,%xmm4 - movdqu %xmm1,96(%r13) - leaq .LADD1(%rip),%r11 - movdqu %xmm4,112(%r13) - leaq 128(%r13),%r13 - paddd 112(%r11),%xmm15 - jnz .Lctr_enc_loop - - jmp .Lctr_enc_done -.align 16 -.Lctr_enc_loop_done: - addq $8,%r14 - movdqu 0(%r12),%xmm7 - pxor %xmm7,%xmm15 - movdqu %xmm15,0(%r13) - cmpq $2,%r14 - jb .Lctr_enc_done - movdqu 16(%r12),%xmm8 - pxor %xmm8,%xmm0 - movdqu %xmm0,16(%r13) - je .Lctr_enc_done - movdqu 32(%r12),%xmm9 - pxor %xmm9,%xmm3 - movdqu %xmm3,32(%r13) - cmpq $4,%r14 - jb .Lctr_enc_done - movdqu 48(%r12),%xmm10 - pxor %xmm10,%xmm5 - movdqu %xmm5,48(%r13) - je .Lctr_enc_done - movdqu 64(%r12),%xmm11 - pxor %xmm11,%xmm2 - movdqu %xmm2,64(%r13) - cmpq $6,%r14 - jb .Lctr_enc_done - movdqu 80(%r12),%xmm12 - pxor %xmm12,%xmm6 - movdqu %xmm6,80(%r13) - je .Lctr_enc_done - movdqu 96(%r12),%xmm13 - pxor %xmm13,%xmm1 - movdqu %xmm1,96(%r13) - jmp .Lctr_enc_done - -.align 16 -.Lctr_enc_short: - leaq 32(%rbp),%rdi - leaq 48(%rbp),%rsi - leaq (%r15),%rdx - call asm_AES_encrypt - movdqu (%r12),%xmm0 - leaq 16(%r12),%r12 - movl 44(%rbp),%eax - bswapl %eax - pxor 48(%rbp),%xmm0 - incl %eax - movdqu %xmm0,(%r13) - bswapl %eax - leaq 16(%r13),%r13 - movl %eax,44(%rsp) - decq %r14 - jnz .Lctr_enc_short - -.Lctr_enc_done: - leaq (%rsp),%rax - pxor %xmm0,%xmm0 -.Lctr_enc_bzero: - movdqa %xmm0,0(%rax) - movdqa %xmm0,16(%rax) - leaq 32(%rax),%rax - cmpq %rax,%rbp - ja .Lctr_enc_bzero - - leaq (%rbp),%rsp - movq 72(%rsp),%r15 - movq 80(%rsp),%r14 - movq 88(%rsp),%r13 - movq 96(%rsp),%r12 - movq 104(%rsp),%rbx - movq 112(%rsp),%rax - leaq 120(%rsp),%rsp - movq %rax,%rbp -.Lctr_enc_epilogue: - .byte 0xf3,0xc3 -.size bsaes_ctr32_encrypt_blocks,.-bsaes_ctr32_encrypt_blocks -.globl bsaes_xts_encrypt -.hidden bsaes_xts_encrypt -.type bsaes_xts_encrypt,@function -.align 16 -bsaes_xts_encrypt: - movq %rsp,%rax -.Lxts_enc_prologue: - pushq %rbp - pushq %rbx - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - leaq -72(%rsp),%rsp - movq %rsp,%rbp - movq %rdi,%r12 - movq %rsi,%r13 - movq %rdx,%r14 - movq %rcx,%r15 - - leaq (%r9),%rdi - leaq 32(%rbp),%rsi - leaq (%r8),%rdx - call asm_AES_encrypt - - movl 240(%r15),%eax - movq %r14,%rbx - - movl %eax,%edx - shlq $7,%rax - subq $96,%rax - subq %rax,%rsp - - movq %rsp,%rax - movq %r15,%rcx - movl %edx,%r10d - call _bsaes_key_convert - pxor %xmm6,%xmm7 - movdqa %xmm7,(%rax) - - andq $-16,%r14 - subq $128,%rsp - movdqa 32(%rbp),%xmm6 - - pxor %xmm14,%xmm14 - movdqa .Lxts_magic(%rip),%xmm12 - pcmpgtd %xmm6,%xmm14 - - subq $128,%r14 - jc .Lxts_enc_short - jmp .Lxts_enc_loop - -.align 16 -.Lxts_enc_loop: - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm15 - movdqa %xmm6,0(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm0 - movdqa %xmm6,16(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 0(%r12),%xmm7 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm1 - movdqa %xmm6,32(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 16(%r12),%xmm8 - pxor %xmm7,%xmm15 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm2 - movdqa %xmm6,48(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 32(%r12),%xmm9 - pxor %xmm8,%xmm0 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm3 - movdqa %xmm6,64(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 48(%r12),%xmm10 - pxor %xmm9,%xmm1 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm4 - movdqa %xmm6,80(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 64(%r12),%xmm11 - pxor %xmm10,%xmm2 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm5 - movdqa %xmm6,96(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 80(%r12),%xmm12 - pxor %xmm11,%xmm3 - movdqu 96(%r12),%xmm13 - pxor %xmm12,%xmm4 - movdqu 112(%r12),%xmm14 - leaq 128(%r12),%r12 - movdqa %xmm6,112(%rsp) - pxor %xmm13,%xmm5 - leaq 128(%rsp),%rax - pxor %xmm14,%xmm6 - movl %edx,%r10d - - call _bsaes_encrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm3 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm5 - movdqu %xmm3,32(%r13) - pxor 64(%rsp),%xmm2 - movdqu %xmm5,48(%r13) - pxor 80(%rsp),%xmm6 - movdqu %xmm2,64(%r13) - pxor 96(%rsp),%xmm1 - movdqu %xmm6,80(%r13) - pxor 112(%rsp),%xmm4 - movdqu %xmm1,96(%r13) - movdqu %xmm4,112(%r13) - leaq 128(%r13),%r13 - - movdqa 112(%rsp),%xmm6 - pxor %xmm14,%xmm14 - movdqa .Lxts_magic(%rip),%xmm12 - pcmpgtd %xmm6,%xmm14 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - - subq $128,%r14 - jnc .Lxts_enc_loop - -.Lxts_enc_short: - addq $128,%r14 - jz .Lxts_enc_done - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm15 - movdqa %xmm6,0(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm0 - movdqa %xmm6,16(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 0(%r12),%xmm7 - cmpq $16,%r14 - je .Lxts_enc_1 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm1 - movdqa %xmm6,32(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 16(%r12),%xmm8 - cmpq $32,%r14 - je .Lxts_enc_2 - pxor %xmm7,%xmm15 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm2 - movdqa %xmm6,48(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 32(%r12),%xmm9 - cmpq $48,%r14 - je .Lxts_enc_3 - pxor %xmm8,%xmm0 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm3 - movdqa %xmm6,64(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 48(%r12),%xmm10 - cmpq $64,%r14 - je .Lxts_enc_4 - pxor %xmm9,%xmm1 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm4 - movdqa %xmm6,80(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 64(%r12),%xmm11 - cmpq $80,%r14 - je .Lxts_enc_5 - pxor %xmm10,%xmm2 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm5 - movdqa %xmm6,96(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 80(%r12),%xmm12 - cmpq $96,%r14 - je .Lxts_enc_6 - pxor %xmm11,%xmm3 - movdqu 96(%r12),%xmm13 - pxor %xmm12,%xmm4 - movdqa %xmm6,112(%rsp) - leaq 112(%r12),%r12 - pxor %xmm13,%xmm5 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_encrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm3 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm5 - movdqu %xmm3,32(%r13) - pxor 64(%rsp),%xmm2 - movdqu %xmm5,48(%r13) - pxor 80(%rsp),%xmm6 - movdqu %xmm2,64(%r13) - pxor 96(%rsp),%xmm1 - movdqu %xmm6,80(%r13) - movdqu %xmm1,96(%r13) - leaq 112(%r13),%r13 - - movdqa 112(%rsp),%xmm6 - jmp .Lxts_enc_done -.align 16 -.Lxts_enc_6: - pxor %xmm11,%xmm3 - leaq 96(%r12),%r12 - pxor %xmm12,%xmm4 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_encrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm3 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm5 - movdqu %xmm3,32(%r13) - pxor 64(%rsp),%xmm2 - movdqu %xmm5,48(%r13) - pxor 80(%rsp),%xmm6 - movdqu %xmm2,64(%r13) - movdqu %xmm6,80(%r13) - leaq 96(%r13),%r13 - - movdqa 96(%rsp),%xmm6 - jmp .Lxts_enc_done -.align 16 -.Lxts_enc_5: - pxor %xmm10,%xmm2 - leaq 80(%r12),%r12 - pxor %xmm11,%xmm3 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_encrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm3 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm5 - movdqu %xmm3,32(%r13) - pxor 64(%rsp),%xmm2 - movdqu %xmm5,48(%r13) - movdqu %xmm2,64(%r13) - leaq 80(%r13),%r13 - - movdqa 80(%rsp),%xmm6 - jmp .Lxts_enc_done -.align 16 -.Lxts_enc_4: - pxor %xmm9,%xmm1 - leaq 64(%r12),%r12 - pxor %xmm10,%xmm2 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_encrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm3 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm5 - movdqu %xmm3,32(%r13) - movdqu %xmm5,48(%r13) - leaq 64(%r13),%r13 - - movdqa 64(%rsp),%xmm6 - jmp .Lxts_enc_done -.align 16 -.Lxts_enc_3: - pxor %xmm8,%xmm0 - leaq 48(%r12),%r12 - pxor %xmm9,%xmm1 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_encrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm3 - movdqu %xmm0,16(%r13) - movdqu %xmm3,32(%r13) - leaq 48(%r13),%r13 - - movdqa 48(%rsp),%xmm6 - jmp .Lxts_enc_done -.align 16 -.Lxts_enc_2: - pxor %xmm7,%xmm15 - leaq 32(%r12),%r12 - pxor %xmm8,%xmm0 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_encrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - movdqu %xmm0,16(%r13) - leaq 32(%r13),%r13 - - movdqa 32(%rsp),%xmm6 - jmp .Lxts_enc_done -.align 16 -.Lxts_enc_1: - pxor %xmm15,%xmm7 - leaq 16(%r12),%r12 - movdqa %xmm7,32(%rbp) - leaq 32(%rbp),%rdi - leaq 32(%rbp),%rsi - leaq (%r15),%rdx - call asm_AES_encrypt - pxor 32(%rbp),%xmm15 - - - - - - movdqu %xmm15,0(%r13) - leaq 16(%r13),%r13 - - movdqa 16(%rsp),%xmm6 - -.Lxts_enc_done: - andl $15,%ebx - jz .Lxts_enc_ret - movq %r13,%rdx - -.Lxts_enc_steal: - movzbl (%r12),%eax - movzbl -16(%rdx),%ecx - leaq 1(%r12),%r12 - movb %al,-16(%rdx) - movb %cl,0(%rdx) - leaq 1(%rdx),%rdx - subl $1,%ebx - jnz .Lxts_enc_steal - - movdqu -16(%r13),%xmm15 - leaq 32(%rbp),%rdi - pxor %xmm6,%xmm15 - leaq 32(%rbp),%rsi - movdqa %xmm15,32(%rbp) - leaq (%r15),%rdx - call asm_AES_encrypt - pxor 32(%rbp),%xmm6 - movdqu %xmm6,-16(%r13) - -.Lxts_enc_ret: - leaq (%rsp),%rax - pxor %xmm0,%xmm0 -.Lxts_enc_bzero: - movdqa %xmm0,0(%rax) - movdqa %xmm0,16(%rax) - leaq 32(%rax),%rax - cmpq %rax,%rbp - ja .Lxts_enc_bzero - - leaq (%rbp),%rsp - movq 72(%rsp),%r15 - movq 80(%rsp),%r14 - movq 88(%rsp),%r13 - movq 96(%rsp),%r12 - movq 104(%rsp),%rbx - movq 112(%rsp),%rax - leaq 120(%rsp),%rsp - movq %rax,%rbp -.Lxts_enc_epilogue: - .byte 0xf3,0xc3 -.size bsaes_xts_encrypt,.-bsaes_xts_encrypt - -.globl bsaes_xts_decrypt -.hidden bsaes_xts_decrypt -.type bsaes_xts_decrypt,@function -.align 16 -bsaes_xts_decrypt: - movq %rsp,%rax -.Lxts_dec_prologue: - pushq %rbp - pushq %rbx - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - leaq -72(%rsp),%rsp - movq %rsp,%rbp - movq %rdi,%r12 - movq %rsi,%r13 - movq %rdx,%r14 - movq %rcx,%r15 - - leaq (%r9),%rdi - leaq 32(%rbp),%rsi - leaq (%r8),%rdx - call asm_AES_encrypt - - movl 240(%r15),%eax - movq %r14,%rbx - - movl %eax,%edx - shlq $7,%rax - subq $96,%rax - subq %rax,%rsp - - movq %rsp,%rax - movq %r15,%rcx - movl %edx,%r10d - call _bsaes_key_convert - pxor (%rsp),%xmm7 - movdqa %xmm6,(%rax) - movdqa %xmm7,(%rsp) - - xorl %eax,%eax - andq $-16,%r14 - testl $15,%ebx - setnz %al - shlq $4,%rax - subq %rax,%r14 - - subq $128,%rsp - movdqa 32(%rbp),%xmm6 - - pxor %xmm14,%xmm14 - movdqa .Lxts_magic(%rip),%xmm12 - pcmpgtd %xmm6,%xmm14 - - subq $128,%r14 - jc .Lxts_dec_short - jmp .Lxts_dec_loop - -.align 16 -.Lxts_dec_loop: - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm15 - movdqa %xmm6,0(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm0 - movdqa %xmm6,16(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 0(%r12),%xmm7 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm1 - movdqa %xmm6,32(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 16(%r12),%xmm8 - pxor %xmm7,%xmm15 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm2 - movdqa %xmm6,48(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 32(%r12),%xmm9 - pxor %xmm8,%xmm0 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm3 - movdqa %xmm6,64(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 48(%r12),%xmm10 - pxor %xmm9,%xmm1 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm4 - movdqa %xmm6,80(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 64(%r12),%xmm11 - pxor %xmm10,%xmm2 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm5 - movdqa %xmm6,96(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 80(%r12),%xmm12 - pxor %xmm11,%xmm3 - movdqu 96(%r12),%xmm13 - pxor %xmm12,%xmm4 - movdqu 112(%r12),%xmm14 - leaq 128(%r12),%r12 - movdqa %xmm6,112(%rsp) - pxor %xmm13,%xmm5 - leaq 128(%rsp),%rax - pxor %xmm14,%xmm6 - movl %edx,%r10d - - call _bsaes_decrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm5 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm3 - movdqu %xmm5,32(%r13) - pxor 64(%rsp),%xmm1 - movdqu %xmm3,48(%r13) - pxor 80(%rsp),%xmm6 - movdqu %xmm1,64(%r13) - pxor 96(%rsp),%xmm2 - movdqu %xmm6,80(%r13) - pxor 112(%rsp),%xmm4 - movdqu %xmm2,96(%r13) - movdqu %xmm4,112(%r13) - leaq 128(%r13),%r13 - - movdqa 112(%rsp),%xmm6 - pxor %xmm14,%xmm14 - movdqa .Lxts_magic(%rip),%xmm12 - pcmpgtd %xmm6,%xmm14 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - - subq $128,%r14 - jnc .Lxts_dec_loop - -.Lxts_dec_short: - addq $128,%r14 - jz .Lxts_dec_done - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm15 - movdqa %xmm6,0(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm0 - movdqa %xmm6,16(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 0(%r12),%xmm7 - cmpq $16,%r14 - je .Lxts_dec_1 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm1 - movdqa %xmm6,32(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 16(%r12),%xmm8 - cmpq $32,%r14 - je .Lxts_dec_2 - pxor %xmm7,%xmm15 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm2 - movdqa %xmm6,48(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 32(%r12),%xmm9 - cmpq $48,%r14 - je .Lxts_dec_3 - pxor %xmm8,%xmm0 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm3 - movdqa %xmm6,64(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 48(%r12),%xmm10 - cmpq $64,%r14 - je .Lxts_dec_4 - pxor %xmm9,%xmm1 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm4 - movdqa %xmm6,80(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 64(%r12),%xmm11 - cmpq $80,%r14 - je .Lxts_dec_5 - pxor %xmm10,%xmm2 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm5 - movdqa %xmm6,96(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 80(%r12),%xmm12 - cmpq $96,%r14 - je .Lxts_dec_6 - pxor %xmm11,%xmm3 - movdqu 96(%r12),%xmm13 - pxor %xmm12,%xmm4 - movdqa %xmm6,112(%rsp) - leaq 112(%r12),%r12 - pxor %xmm13,%xmm5 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_decrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm5 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm3 - movdqu %xmm5,32(%r13) - pxor 64(%rsp),%xmm1 - movdqu %xmm3,48(%r13) - pxor 80(%rsp),%xmm6 - movdqu %xmm1,64(%r13) - pxor 96(%rsp),%xmm2 - movdqu %xmm6,80(%r13) - movdqu %xmm2,96(%r13) - leaq 112(%r13),%r13 - - movdqa 112(%rsp),%xmm6 - jmp .Lxts_dec_done -.align 16 -.Lxts_dec_6: - pxor %xmm11,%xmm3 - leaq 96(%r12),%r12 - pxor %xmm12,%xmm4 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_decrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm5 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm3 - movdqu %xmm5,32(%r13) - pxor 64(%rsp),%xmm1 - movdqu %xmm3,48(%r13) - pxor 80(%rsp),%xmm6 - movdqu %xmm1,64(%r13) - movdqu %xmm6,80(%r13) - leaq 96(%r13),%r13 - - movdqa 96(%rsp),%xmm6 - jmp .Lxts_dec_done -.align 16 -.Lxts_dec_5: - pxor %xmm10,%xmm2 - leaq 80(%r12),%r12 - pxor %xmm11,%xmm3 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_decrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm5 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm3 - movdqu %xmm5,32(%r13) - pxor 64(%rsp),%xmm1 - movdqu %xmm3,48(%r13) - movdqu %xmm1,64(%r13) - leaq 80(%r13),%r13 - - movdqa 80(%rsp),%xmm6 - jmp .Lxts_dec_done -.align 16 -.Lxts_dec_4: - pxor %xmm9,%xmm1 - leaq 64(%r12),%r12 - pxor %xmm10,%xmm2 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_decrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm5 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm3 - movdqu %xmm5,32(%r13) - movdqu %xmm3,48(%r13) - leaq 64(%r13),%r13 - - movdqa 64(%rsp),%xmm6 - jmp .Lxts_dec_done -.align 16 -.Lxts_dec_3: - pxor %xmm8,%xmm0 - leaq 48(%r12),%r12 - pxor %xmm9,%xmm1 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_decrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm5 - movdqu %xmm0,16(%r13) - movdqu %xmm5,32(%r13) - leaq 48(%r13),%r13 - - movdqa 48(%rsp),%xmm6 - jmp .Lxts_dec_done -.align 16 -.Lxts_dec_2: - pxor %xmm7,%xmm15 - leaq 32(%r12),%r12 - pxor %xmm8,%xmm0 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_decrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - movdqu %xmm0,16(%r13) - leaq 32(%r13),%r13 - - movdqa 32(%rsp),%xmm6 - jmp .Lxts_dec_done -.align 16 -.Lxts_dec_1: - pxor %xmm15,%xmm7 - leaq 16(%r12),%r12 - movdqa %xmm7,32(%rbp) - leaq 32(%rbp),%rdi - leaq 32(%rbp),%rsi - leaq (%r15),%rdx - call asm_AES_decrypt - pxor 32(%rbp),%xmm15 - - - - - - movdqu %xmm15,0(%r13) - leaq 16(%r13),%r13 - - movdqa 16(%rsp),%xmm6 - -.Lxts_dec_done: - andl $15,%ebx - jz .Lxts_dec_ret - - pxor %xmm14,%xmm14 - movdqa .Lxts_magic(%rip),%xmm12 - pcmpgtd %xmm6,%xmm14 - pshufd $19,%xmm14,%xmm13 - movdqa %xmm6,%xmm5 - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - movdqu (%r12),%xmm15 - pxor %xmm13,%xmm6 - - leaq 32(%rbp),%rdi - pxor %xmm6,%xmm15 - leaq 32(%rbp),%rsi - movdqa %xmm15,32(%rbp) - leaq (%r15),%rdx - call asm_AES_decrypt - pxor 32(%rbp),%xmm6 - movq %r13,%rdx - movdqu %xmm6,(%r13) - -.Lxts_dec_steal: - movzbl 16(%r12),%eax - movzbl (%rdx),%ecx - leaq 1(%r12),%r12 - movb %al,(%rdx) - movb %cl,16(%rdx) - leaq 1(%rdx),%rdx - subl $1,%ebx - jnz .Lxts_dec_steal - - movdqu (%r13),%xmm15 - leaq 32(%rbp),%rdi - pxor %xmm5,%xmm15 - leaq 32(%rbp),%rsi - movdqa %xmm15,32(%rbp) - leaq (%r15),%rdx - call asm_AES_decrypt - pxor 32(%rbp),%xmm5 - movdqu %xmm5,(%r13) - -.Lxts_dec_ret: - leaq (%rsp),%rax - pxor %xmm0,%xmm0 -.Lxts_dec_bzero: - movdqa %xmm0,0(%rax) - movdqa %xmm0,16(%rax) - leaq 32(%rax),%rax - cmpq %rax,%rbp - ja .Lxts_dec_bzero - - leaq (%rbp),%rsp - movq 72(%rsp),%r15 - movq 80(%rsp),%r14 - movq 88(%rsp),%r13 - movq 96(%rsp),%r12 - movq 104(%rsp),%rbx - movq 112(%rsp),%rax - leaq 120(%rsp),%rsp - movq %rax,%rbp -.Lxts_dec_epilogue: - .byte 0xf3,0xc3 -.size bsaes_xts_decrypt,.-bsaes_xts_decrypt -.type _bsaes_const,@object -.align 64 -_bsaes_const: -.LM0ISR: -.quad 0x0a0e0206070b0f03, 0x0004080c0d010509 -.LISRM0: -.quad 0x01040b0e0205080f, 0x0306090c00070a0d -.LISR: -.quad 0x0504070602010003, 0x0f0e0d0c080b0a09 -.LBS0: -.quad 0x5555555555555555, 0x5555555555555555 -.LBS1: -.quad 0x3333333333333333, 0x3333333333333333 -.LBS2: -.quad 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f -.LSR: -.quad 0x0504070600030201, 0x0f0e0d0c0a09080b -.LSRM0: -.quad 0x0304090e00050a0f, 0x01060b0c0207080d -.LM0SR: -.quad 0x0a0e02060f03070b, 0x0004080c05090d01 -.LSWPUP: -.quad 0x0706050403020100, 0x0c0d0e0f0b0a0908 -.LSWPUPM0SR: -.quad 0x0a0d02060c03070b, 0x0004080f05090e01 -.LADD1: -.quad 0x0000000000000000, 0x0000000100000000 -.LADD2: -.quad 0x0000000000000000, 0x0000000200000000 -.LADD3: -.quad 0x0000000000000000, 0x0000000300000000 -.LADD4: -.quad 0x0000000000000000, 0x0000000400000000 -.LADD5: -.quad 0x0000000000000000, 0x0000000500000000 -.LADD6: -.quad 0x0000000000000000, 0x0000000600000000 -.LADD7: -.quad 0x0000000000000000, 0x0000000700000000 -.LADD8: -.quad 0x0000000000000000, 0x0000000800000000 -.Lxts_magic: -.long 0x87,0,1,0 -.Lmasks: -.quad 0x0101010101010101, 0x0101010101010101 -.quad 0x0202020202020202, 0x0202020202020202 -.quad 0x0404040404040404, 0x0404040404040404 -.quad 0x0808080808080808, 0x0808080808080808 -.LM0: -.quad 0x02060a0e03070b0f, 0x0004080c0105090d -.L63: -.quad 0x6363636363636363, 0x6363636363636363 -.byte 66,105,116,45,115,108,105,99,101,100,32,65,69,83,32,102,111,114,32,120,56,54,95,54,52,47,83,83,83,69,51,44,32,69,109,105,108,105,97,32,75,195,164,115,112,101,114,44,32,80,101,116,101,114,32,83,99,104,119,97,98,101,44,32,65,110,100,121,32,80,111,108,121,97,107,111,118,0 -.align 64 -.size _bsaes_const,.-_bsaes_const -#endif diff --git a/third_party/boringssl/linux-x86_64/crypto/aes/vpaes-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/aes/vpaes-x86_64.S deleted file mode 100644 index 1d124246af930..0000000000000 --- a/third_party/boringssl/linux-x86_64/crypto/aes/vpaes-x86_64.S +++ /dev/null @@ -1,834 +0,0 @@ -#if defined(__x86_64__) -.text - - - - - - - - - - - - - - - - -.type _vpaes_encrypt_core,@function -.align 16 -_vpaes_encrypt_core: - movq %rdx,%r9 - movq $16,%r11 - movl 240(%rdx),%eax - movdqa %xmm9,%xmm1 - movdqa .Lk_ipt(%rip),%xmm2 - pandn %xmm0,%xmm1 - movdqu (%r9),%xmm5 - psrld $4,%xmm1 - pand %xmm9,%xmm0 -.byte 102,15,56,0,208 - movdqa .Lk_ipt+16(%rip),%xmm0 -.byte 102,15,56,0,193 - pxor %xmm5,%xmm2 - addq $16,%r9 - pxor %xmm2,%xmm0 - leaq .Lk_mc_backward(%rip),%r10 - jmp .Lenc_entry - -.align 16 -.Lenc_loop: - - movdqa %xmm13,%xmm4 - movdqa %xmm12,%xmm0 -.byte 102,15,56,0,226 -.byte 102,15,56,0,195 - pxor %xmm5,%xmm4 - movdqa %xmm15,%xmm5 - pxor %xmm4,%xmm0 - movdqa -64(%r11,%r10,1),%xmm1 -.byte 102,15,56,0,234 - movdqa (%r11,%r10,1),%xmm4 - movdqa %xmm14,%xmm2 -.byte 102,15,56,0,211 - movdqa %xmm0,%xmm3 - pxor %xmm5,%xmm2 -.byte 102,15,56,0,193 - addq $16,%r9 - pxor %xmm2,%xmm0 -.byte 102,15,56,0,220 - addq $16,%r11 - pxor %xmm0,%xmm3 -.byte 102,15,56,0,193 - andq $48,%r11 - subq $1,%rax - pxor %xmm3,%xmm0 - -.Lenc_entry: - - movdqa %xmm9,%xmm1 - movdqa %xmm11,%xmm5 - pandn %xmm0,%xmm1 - psrld $4,%xmm1 - pand %xmm9,%xmm0 -.byte 102,15,56,0,232 - movdqa %xmm10,%xmm3 - pxor %xmm1,%xmm0 -.byte 102,15,56,0,217 - movdqa %xmm10,%xmm4 - pxor %xmm5,%xmm3 -.byte 102,15,56,0,224 - movdqa %xmm10,%xmm2 - pxor %xmm5,%xmm4 -.byte 102,15,56,0,211 - movdqa %xmm10,%xmm3 - pxor %xmm0,%xmm2 -.byte 102,15,56,0,220 - movdqu (%r9),%xmm5 - pxor %xmm1,%xmm3 - jnz .Lenc_loop - - - movdqa -96(%r10),%xmm4 - movdqa -80(%r10),%xmm0 -.byte 102,15,56,0,226 - pxor %xmm5,%xmm4 -.byte 102,15,56,0,195 - movdqa 64(%r11,%r10,1),%xmm1 - pxor %xmm4,%xmm0 -.byte 102,15,56,0,193 - .byte 0xf3,0xc3 -.size _vpaes_encrypt_core,.-_vpaes_encrypt_core - - - - - - -.type _vpaes_decrypt_core,@function -.align 16 -_vpaes_decrypt_core: - movq %rdx,%r9 - movl 240(%rdx),%eax - movdqa %xmm9,%xmm1 - movdqa .Lk_dipt(%rip),%xmm2 - pandn %xmm0,%xmm1 - movq %rax,%r11 - psrld $4,%xmm1 - movdqu (%r9),%xmm5 - shlq $4,%r11 - pand %xmm9,%xmm0 -.byte 102,15,56,0,208 - movdqa .Lk_dipt+16(%rip),%xmm0 - xorq $48,%r11 - leaq .Lk_dsbd(%rip),%r10 -.byte 102,15,56,0,193 - andq $48,%r11 - pxor %xmm5,%xmm2 - movdqa .Lk_mc_forward+48(%rip),%xmm5 - pxor %xmm2,%xmm0 - addq $16,%r9 - addq %r10,%r11 - jmp .Ldec_entry - -.align 16 -.Ldec_loop: - - - - movdqa -32(%r10),%xmm4 - movdqa -16(%r10),%xmm1 -.byte 102,15,56,0,226 -.byte 102,15,56,0,203 - pxor %xmm4,%xmm0 - movdqa 0(%r10),%xmm4 - pxor %xmm1,%xmm0 - movdqa 16(%r10),%xmm1 - -.byte 102,15,56,0,226 -.byte 102,15,56,0,197 -.byte 102,15,56,0,203 - pxor %xmm4,%xmm0 - movdqa 32(%r10),%xmm4 - pxor %xmm1,%xmm0 - movdqa 48(%r10),%xmm1 - -.byte 102,15,56,0,226 -.byte 102,15,56,0,197 -.byte 102,15,56,0,203 - pxor %xmm4,%xmm0 - movdqa 64(%r10),%xmm4 - pxor %xmm1,%xmm0 - movdqa 80(%r10),%xmm1 - -.byte 102,15,56,0,226 -.byte 102,15,56,0,197 -.byte 102,15,56,0,203 - pxor %xmm4,%xmm0 - addq $16,%r9 -.byte 102,15,58,15,237,12 - pxor %xmm1,%xmm0 - subq $1,%rax - -.Ldec_entry: - - movdqa %xmm9,%xmm1 - pandn %xmm0,%xmm1 - movdqa %xmm11,%xmm2 - psrld $4,%xmm1 - pand %xmm9,%xmm0 -.byte 102,15,56,0,208 - movdqa %xmm10,%xmm3 - pxor %xmm1,%xmm0 -.byte 102,15,56,0,217 - movdqa %xmm10,%xmm4 - pxor %xmm2,%xmm3 -.byte 102,15,56,0,224 - pxor %xmm2,%xmm4 - movdqa %xmm10,%xmm2 -.byte 102,15,56,0,211 - movdqa %xmm10,%xmm3 - pxor %xmm0,%xmm2 -.byte 102,15,56,0,220 - movdqu (%r9),%xmm0 - pxor %xmm1,%xmm3 - jnz .Ldec_loop - - - movdqa 96(%r10),%xmm4 -.byte 102,15,56,0,226 - pxor %xmm0,%xmm4 - movdqa 112(%r10),%xmm0 - movdqa -352(%r11),%xmm2 -.byte 102,15,56,0,195 - pxor %xmm4,%xmm0 -.byte 102,15,56,0,194 - .byte 0xf3,0xc3 -.size _vpaes_decrypt_core,.-_vpaes_decrypt_core - - - - - - -.type _vpaes_schedule_core,@function -.align 16 -_vpaes_schedule_core: - - - - - - call _vpaes_preheat - movdqa .Lk_rcon(%rip),%xmm8 - movdqu (%rdi),%xmm0 - - - movdqa %xmm0,%xmm3 - leaq .Lk_ipt(%rip),%r11 - call _vpaes_schedule_transform - movdqa %xmm0,%xmm7 - - leaq .Lk_sr(%rip),%r10 - testq %rcx,%rcx - jnz .Lschedule_am_decrypting - - - movdqu %xmm0,(%rdx) - jmp .Lschedule_go - -.Lschedule_am_decrypting: - - movdqa (%r8,%r10,1),%xmm1 -.byte 102,15,56,0,217 - movdqu %xmm3,(%rdx) - xorq $48,%r8 - -.Lschedule_go: - cmpl $192,%esi - ja .Lschedule_256 - je .Lschedule_192 - - - - - - - - - - -.Lschedule_128: - movl $10,%esi - -.Loop_schedule_128: - call _vpaes_schedule_round - decq %rsi - jz .Lschedule_mangle_last - call _vpaes_schedule_mangle - jmp .Loop_schedule_128 - - - - - - - - - - - - - - - - -.align 16 -.Lschedule_192: - movdqu 8(%rdi),%xmm0 - call _vpaes_schedule_transform - movdqa %xmm0,%xmm6 - pxor %xmm4,%xmm4 - movhlps %xmm4,%xmm6 - movl $4,%esi - -.Loop_schedule_192: - call _vpaes_schedule_round -.byte 102,15,58,15,198,8 - call _vpaes_schedule_mangle - call _vpaes_schedule_192_smear - call _vpaes_schedule_mangle - call _vpaes_schedule_round - decq %rsi - jz .Lschedule_mangle_last - call _vpaes_schedule_mangle - call _vpaes_schedule_192_smear - jmp .Loop_schedule_192 - - - - - - - - - - - -.align 16 -.Lschedule_256: - movdqu 16(%rdi),%xmm0 - call _vpaes_schedule_transform - movl $7,%esi - -.Loop_schedule_256: - call _vpaes_schedule_mangle - movdqa %xmm0,%xmm6 - - - call _vpaes_schedule_round - decq %rsi - jz .Lschedule_mangle_last - call _vpaes_schedule_mangle - - - pshufd $255,%xmm0,%xmm0 - movdqa %xmm7,%xmm5 - movdqa %xmm6,%xmm7 - call _vpaes_schedule_low_round - movdqa %xmm5,%xmm7 - - jmp .Loop_schedule_256 - - - - - - - - - - - - -.align 16 -.Lschedule_mangle_last: - - leaq .Lk_deskew(%rip),%r11 - testq %rcx,%rcx - jnz .Lschedule_mangle_last_dec - - - movdqa (%r8,%r10,1),%xmm1 -.byte 102,15,56,0,193 - leaq .Lk_opt(%rip),%r11 - addq $32,%rdx - -.Lschedule_mangle_last_dec: - addq $-16,%rdx - pxor .Lk_s63(%rip),%xmm0 - call _vpaes_schedule_transform - movdqu %xmm0,(%rdx) - - - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - .byte 0xf3,0xc3 -.size _vpaes_schedule_core,.-_vpaes_schedule_core - - - - - - - - - - - - - - - -.type _vpaes_schedule_192_smear,@function -.align 16 -_vpaes_schedule_192_smear: - pshufd $128,%xmm6,%xmm1 - pshufd $254,%xmm7,%xmm0 - pxor %xmm1,%xmm6 - pxor %xmm1,%xmm1 - pxor %xmm0,%xmm6 - movdqa %xmm6,%xmm0 - movhlps %xmm1,%xmm6 - .byte 0xf3,0xc3 -.size _vpaes_schedule_192_smear,.-_vpaes_schedule_192_smear - - - - - - - - - - - - - - - - - - - -.type _vpaes_schedule_round,@function -.align 16 -_vpaes_schedule_round: - - pxor %xmm1,%xmm1 -.byte 102,65,15,58,15,200,15 -.byte 102,69,15,58,15,192,15 - pxor %xmm1,%xmm7 - - - pshufd $255,%xmm0,%xmm0 -.byte 102,15,58,15,192,1 - - - - -_vpaes_schedule_low_round: - - movdqa %xmm7,%xmm1 - pslldq $4,%xmm7 - pxor %xmm1,%xmm7 - movdqa %xmm7,%xmm1 - pslldq $8,%xmm7 - pxor %xmm1,%xmm7 - pxor .Lk_s63(%rip),%xmm7 - - - movdqa %xmm9,%xmm1 - pandn %xmm0,%xmm1 - psrld $4,%xmm1 - pand %xmm9,%xmm0 - movdqa %xmm11,%xmm2 -.byte 102,15,56,0,208 - pxor %xmm1,%xmm0 - movdqa %xmm10,%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 - movdqa %xmm10,%xmm4 -.byte 102,15,56,0,224 - pxor %xmm2,%xmm4 - movdqa %xmm10,%xmm2 -.byte 102,15,56,0,211 - pxor %xmm0,%xmm2 - movdqa %xmm10,%xmm3 -.byte 102,15,56,0,220 - pxor %xmm1,%xmm3 - movdqa %xmm13,%xmm4 -.byte 102,15,56,0,226 - movdqa %xmm12,%xmm0 -.byte 102,15,56,0,195 - pxor %xmm4,%xmm0 - - - pxor %xmm7,%xmm0 - movdqa %xmm0,%xmm7 - .byte 0xf3,0xc3 -.size _vpaes_schedule_round,.-_vpaes_schedule_round - - - - - - - - - - -.type _vpaes_schedule_transform,@function -.align 16 -_vpaes_schedule_transform: - movdqa %xmm9,%xmm1 - pandn %xmm0,%xmm1 - psrld $4,%xmm1 - pand %xmm9,%xmm0 - movdqa (%r11),%xmm2 -.byte 102,15,56,0,208 - movdqa 16(%r11),%xmm0 -.byte 102,15,56,0,193 - pxor %xmm2,%xmm0 - .byte 0xf3,0xc3 -.size _vpaes_schedule_transform,.-_vpaes_schedule_transform - - - - - - - - - - - - - - - - - - - - - - - - -.type _vpaes_schedule_mangle,@function -.align 16 -_vpaes_schedule_mangle: - movdqa %xmm0,%xmm4 - movdqa .Lk_mc_forward(%rip),%xmm5 - testq %rcx,%rcx - jnz .Lschedule_mangle_dec - - - addq $16,%rdx - pxor .Lk_s63(%rip),%xmm4 -.byte 102,15,56,0,229 - movdqa %xmm4,%xmm3 -.byte 102,15,56,0,229 - pxor %xmm4,%xmm3 -.byte 102,15,56,0,229 - pxor %xmm4,%xmm3 - - jmp .Lschedule_mangle_both -.align 16 -.Lschedule_mangle_dec: - - leaq .Lk_dksd(%rip),%r11 - movdqa %xmm9,%xmm1 - pandn %xmm4,%xmm1 - psrld $4,%xmm1 - pand %xmm9,%xmm4 - - movdqa 0(%r11),%xmm2 -.byte 102,15,56,0,212 - movdqa 16(%r11),%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 -.byte 102,15,56,0,221 - - movdqa 32(%r11),%xmm2 -.byte 102,15,56,0,212 - pxor %xmm3,%xmm2 - movdqa 48(%r11),%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 -.byte 102,15,56,0,221 - - movdqa 64(%r11),%xmm2 -.byte 102,15,56,0,212 - pxor %xmm3,%xmm2 - movdqa 80(%r11),%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 -.byte 102,15,56,0,221 - - movdqa 96(%r11),%xmm2 -.byte 102,15,56,0,212 - pxor %xmm3,%xmm2 - movdqa 112(%r11),%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 - - addq $-16,%rdx - -.Lschedule_mangle_both: - movdqa (%r8,%r10,1),%xmm1 -.byte 102,15,56,0,217 - addq $-16,%r8 - andq $48,%r8 - movdqu %xmm3,(%rdx) - .byte 0xf3,0xc3 -.size _vpaes_schedule_mangle,.-_vpaes_schedule_mangle - - - - -.globl vpaes_set_encrypt_key -.hidden vpaes_set_encrypt_key -.type vpaes_set_encrypt_key,@function -.align 16 -vpaes_set_encrypt_key: - movl %esi,%eax - shrl $5,%eax - addl $5,%eax - movl %eax,240(%rdx) - - movl $0,%ecx - movl $48,%r8d - call _vpaes_schedule_core - xorl %eax,%eax - .byte 0xf3,0xc3 -.size vpaes_set_encrypt_key,.-vpaes_set_encrypt_key - -.globl vpaes_set_decrypt_key -.hidden vpaes_set_decrypt_key -.type vpaes_set_decrypt_key,@function -.align 16 -vpaes_set_decrypt_key: - movl %esi,%eax - shrl $5,%eax - addl $5,%eax - movl %eax,240(%rdx) - shll $4,%eax - leaq 16(%rdx,%rax,1),%rdx - - movl $1,%ecx - movl %esi,%r8d - shrl $1,%r8d - andl $32,%r8d - xorl $32,%r8d - call _vpaes_schedule_core - xorl %eax,%eax - .byte 0xf3,0xc3 -.size vpaes_set_decrypt_key,.-vpaes_set_decrypt_key - -.globl vpaes_encrypt -.hidden vpaes_encrypt -.type vpaes_encrypt,@function -.align 16 -vpaes_encrypt: - movdqu (%rdi),%xmm0 - call _vpaes_preheat - call _vpaes_encrypt_core - movdqu %xmm0,(%rsi) - .byte 0xf3,0xc3 -.size vpaes_encrypt,.-vpaes_encrypt - -.globl vpaes_decrypt -.hidden vpaes_decrypt -.type vpaes_decrypt,@function -.align 16 -vpaes_decrypt: - movdqu (%rdi),%xmm0 - call _vpaes_preheat - call _vpaes_decrypt_core - movdqu %xmm0,(%rsi) - .byte 0xf3,0xc3 -.size vpaes_decrypt,.-vpaes_decrypt -.globl vpaes_cbc_encrypt -.hidden vpaes_cbc_encrypt -.type vpaes_cbc_encrypt,@function -.align 16 -vpaes_cbc_encrypt: - xchgq %rcx,%rdx - subq $16,%rcx - jc .Lcbc_abort - movdqu (%r8),%xmm6 - subq %rdi,%rsi - call _vpaes_preheat - cmpl $0,%r9d - je .Lcbc_dec_loop - jmp .Lcbc_enc_loop -.align 16 -.Lcbc_enc_loop: - movdqu (%rdi),%xmm0 - pxor %xmm6,%xmm0 - call _vpaes_encrypt_core - movdqa %xmm0,%xmm6 - movdqu %xmm0,(%rsi,%rdi,1) - leaq 16(%rdi),%rdi - subq $16,%rcx - jnc .Lcbc_enc_loop - jmp .Lcbc_done -.align 16 -.Lcbc_dec_loop: - movdqu (%rdi),%xmm0 - movdqa %xmm0,%xmm7 - call _vpaes_decrypt_core - pxor %xmm6,%xmm0 - movdqa %xmm7,%xmm6 - movdqu %xmm0,(%rsi,%rdi,1) - leaq 16(%rdi),%rdi - subq $16,%rcx - jnc .Lcbc_dec_loop -.Lcbc_done: - movdqu %xmm6,(%r8) -.Lcbc_abort: - .byte 0xf3,0xc3 -.size vpaes_cbc_encrypt,.-vpaes_cbc_encrypt - - - - - - -.type _vpaes_preheat,@function -.align 16 -_vpaes_preheat: - leaq .Lk_s0F(%rip),%r10 - movdqa -32(%r10),%xmm10 - movdqa -16(%r10),%xmm11 - movdqa 0(%r10),%xmm9 - movdqa 48(%r10),%xmm13 - movdqa 64(%r10),%xmm12 - movdqa 80(%r10),%xmm15 - movdqa 96(%r10),%xmm14 - .byte 0xf3,0xc3 -.size _vpaes_preheat,.-_vpaes_preheat - - - - - -.type _vpaes_consts,@object -.align 64 -_vpaes_consts: -.Lk_inv: -.quad 0x0E05060F0D080180, 0x040703090A0B0C02 -.quad 0x01040A060F0B0780, 0x030D0E0C02050809 - -.Lk_s0F: -.quad 0x0F0F0F0F0F0F0F0F, 0x0F0F0F0F0F0F0F0F - -.Lk_ipt: -.quad 0xC2B2E8985A2A7000, 0xCABAE09052227808 -.quad 0x4C01307D317C4D00, 0xCD80B1FCB0FDCC81 - -.Lk_sb1: -.quad 0xB19BE18FCB503E00, 0xA5DF7A6E142AF544 -.quad 0x3618D415FAE22300, 0x3BF7CCC10D2ED9EF -.Lk_sb2: -.quad 0xE27A93C60B712400, 0x5EB7E955BC982FCD -.quad 0x69EB88400AE12900, 0xC2A163C8AB82234A -.Lk_sbo: -.quad 0xD0D26D176FBDC700, 0x15AABF7AC502A878 -.quad 0xCFE474A55FBB6A00, 0x8E1E90D1412B35FA - -.Lk_mc_forward: -.quad 0x0407060500030201, 0x0C0F0E0D080B0A09 -.quad 0x080B0A0904070605, 0x000302010C0F0E0D -.quad 0x0C0F0E0D080B0A09, 0x0407060500030201 -.quad 0x000302010C0F0E0D, 0x080B0A0904070605 - -.Lk_mc_backward: -.quad 0x0605040702010003, 0x0E0D0C0F0A09080B -.quad 0x020100030E0D0C0F, 0x0A09080B06050407 -.quad 0x0E0D0C0F0A09080B, 0x0605040702010003 -.quad 0x0A09080B06050407, 0x020100030E0D0C0F - -.Lk_sr: -.quad 0x0706050403020100, 0x0F0E0D0C0B0A0908 -.quad 0x030E09040F0A0500, 0x0B06010C07020D08 -.quad 0x0F060D040B020900, 0x070E050C030A0108 -.quad 0x0B0E0104070A0D00, 0x0306090C0F020508 - -.Lk_rcon: -.quad 0x1F8391B9AF9DEEB6, 0x702A98084D7C7D81 - -.Lk_s63: -.quad 0x5B5B5B5B5B5B5B5B, 0x5B5B5B5B5B5B5B5B - -.Lk_opt: -.quad 0xFF9F4929D6B66000, 0xF7974121DEBE6808 -.quad 0x01EDBD5150BCEC00, 0xE10D5DB1B05C0CE0 - -.Lk_deskew: -.quad 0x07E4A34047A4E300, 0x1DFEB95A5DBEF91A -.quad 0x5F36B5DC83EA6900, 0x2841C2ABF49D1E77 - - - - - -.Lk_dksd: -.quad 0xFEB91A5DA3E44700, 0x0740E3A45A1DBEF9 -.quad 0x41C277F4B5368300, 0x5FDC69EAAB289D1E -.Lk_dksb: -.quad 0x9A4FCA1F8550D500, 0x03D653861CC94C99 -.quad 0x115BEDA7B6FC4A00, 0xD993256F7E3482C8 -.Lk_dkse: -.quad 0xD5031CCA1FC9D600, 0x53859A4C994F5086 -.quad 0xA23196054FDC7BE8, 0xCD5EF96A20B31487 -.Lk_dks9: -.quad 0xB6116FC87ED9A700, 0x4AED933482255BFC -.quad 0x4576516227143300, 0x8BB89FACE9DAFDCE - - - - - -.Lk_dipt: -.quad 0x0F505B040B545F00, 0x154A411E114E451A -.quad 0x86E383E660056500, 0x12771772F491F194 - -.Lk_dsb9: -.quad 0x851C03539A86D600, 0xCAD51F504F994CC9 -.quad 0xC03B1789ECD74900, 0x725E2C9EB2FBA565 -.Lk_dsbd: -.quad 0x7D57CCDFE6B1A200, 0xF56E9B13882A4439 -.quad 0x3CE2FAF724C6CB00, 0x2931180D15DEEFD3 -.Lk_dsbb: -.quad 0xD022649296B44200, 0x602646F6B0F2D404 -.quad 0xC19498A6CD596700, 0xF3FF0C3E3255AA6B -.Lk_dsbe: -.quad 0x46F2929626D4D000, 0x2242600464B4F6B0 -.quad 0x0C55A6CDFFAAC100, 0x9467F36B98593E32 -.Lk_dsbo: -.quad 0x1387EA537EF94000, 0xC7AA6DB9D4943E2D -.quad 0x12D7560F93441D00, 0xCA4B8159D8C58E9C -.byte 86,101,99,116,111,114,32,80,101,114,109,117,116,97,116,105,111,110,32,65,69,83,32,102,111,114,32,120,56,54,95,54,52,47,83,83,83,69,51,44,32,77,105,107,101,32,72,97,109,98,117,114,103,32,40,83,116,97,110,102,111,114,100,32,85,110,105,118,101,114,115,105,116,121,41,0 -.align 64 -.size _vpaes_consts,.-_vpaes_consts -#endif diff --git a/third_party/boringssl/linux-x86_64/crypto/bn/rsaz-avx2.S b/third_party/boringssl/linux-x86_64/crypto/bn/rsaz-avx2.S deleted file mode 100644 index cd334d95a688a..0000000000000 --- a/third_party/boringssl/linux-x86_64/crypto/bn/rsaz-avx2.S +++ /dev/null @@ -1,34 +0,0 @@ -#if defined(__x86_64__) -.text - -.globl rsaz_avx2_eligible -.hidden rsaz_avx2_eligible -.type rsaz_avx2_eligible,@function -rsaz_avx2_eligible: - xorl %eax,%eax - .byte 0xf3,0xc3 -.size rsaz_avx2_eligible,.-rsaz_avx2_eligible - -.globl rsaz_1024_sqr_avx2 -.hidden rsaz_1024_sqr_avx2 -.globl rsaz_1024_mul_avx2 -.hidden rsaz_1024_mul_avx2 -.globl rsaz_1024_norm2red_avx2 -.hidden rsaz_1024_norm2red_avx2 -.globl rsaz_1024_red2norm_avx2 -.hidden rsaz_1024_red2norm_avx2 -.globl rsaz_1024_scatter5_avx2 -.hidden rsaz_1024_scatter5_avx2 -.globl rsaz_1024_gather5_avx2 -.hidden rsaz_1024_gather5_avx2 -.type rsaz_1024_sqr_avx2,@function -rsaz_1024_sqr_avx2: -rsaz_1024_mul_avx2: -rsaz_1024_norm2red_avx2: -rsaz_1024_red2norm_avx2: -rsaz_1024_scatter5_avx2: -rsaz_1024_gather5_avx2: -.byte 0x0f,0x0b - .byte 0xf3,0xc3 -.size rsaz_1024_sqr_avx2,.-rsaz_1024_sqr_avx2 -#endif diff --git a/third_party/boringssl/linux-x86_64/crypto/bn/rsaz-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/bn/rsaz-x86_64.S deleted file mode 100644 index dd3d3106d1644..0000000000000 --- a/third_party/boringssl/linux-x86_64/crypto/bn/rsaz-x86_64.S +++ /dev/null @@ -1,1127 +0,0 @@ -#if defined(__x86_64__) -.text - -.extern OPENSSL_ia32cap_P -.hidden OPENSSL_ia32cap_P - -.globl rsaz_512_sqr -.hidden rsaz_512_sqr -.type rsaz_512_sqr,@function -.align 32 -rsaz_512_sqr: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - subq $128+24,%rsp -.Lsqr_body: - movq %rdx,%rbp - movq (%rsi),%rdx - movq 8(%rsi),%rax - movq %rcx,128(%rsp) - jmp .Loop_sqr - -.align 32 -.Loop_sqr: - movl %r8d,128+8(%rsp) - - movq %rdx,%rbx - mulq %rdx - movq %rax,%r8 - movq 16(%rsi),%rax - movq %rdx,%r9 - - mulq %rbx - addq %rax,%r9 - movq 24(%rsi),%rax - movq %rdx,%r10 - adcq $0,%r10 - - mulq %rbx - addq %rax,%r10 - movq 32(%rsi),%rax - movq %rdx,%r11 - adcq $0,%r11 - - mulq %rbx - addq %rax,%r11 - movq 40(%rsi),%rax - movq %rdx,%r12 - adcq $0,%r12 - - mulq %rbx - addq %rax,%r12 - movq 48(%rsi),%rax - movq %rdx,%r13 - adcq $0,%r13 - - mulq %rbx - addq %rax,%r13 - movq 56(%rsi),%rax - movq %rdx,%r14 - adcq $0,%r14 - - mulq %rbx - addq %rax,%r14 - movq %rbx,%rax - movq %rdx,%r15 - adcq $0,%r15 - - addq %r8,%r8 - movq %r9,%rcx - adcq %r9,%r9 - - mulq %rax - movq %rax,(%rsp) - addq %rdx,%r8 - adcq $0,%r9 - - movq %r8,8(%rsp) - shrq $63,%rcx - - - movq 8(%rsi),%r8 - movq 16(%rsi),%rax - mulq %r8 - addq %rax,%r10 - movq 24(%rsi),%rax - movq %rdx,%rbx - adcq $0,%rbx - - mulq %r8 - addq %rax,%r11 - movq 32(%rsi),%rax - adcq $0,%rdx - addq %rbx,%r11 - movq %rdx,%rbx - adcq $0,%rbx - - mulq %r8 - addq %rax,%r12 - movq 40(%rsi),%rax - adcq $0,%rdx - addq %rbx,%r12 - movq %rdx,%rbx - adcq $0,%rbx - - mulq %r8 - addq %rax,%r13 - movq 48(%rsi),%rax - adcq $0,%rdx - addq %rbx,%r13 - movq %rdx,%rbx - adcq $0,%rbx - - mulq %r8 - addq %rax,%r14 - movq 56(%rsi),%rax - adcq $0,%rdx - addq %rbx,%r14 - movq %rdx,%rbx - adcq $0,%rbx - - mulq %r8 - addq %rax,%r15 - movq %r8,%rax - adcq $0,%rdx - addq %rbx,%r15 - movq %rdx,%r8 - movq %r10,%rdx - adcq $0,%r8 - - addq %rdx,%rdx - leaq (%rcx,%r10,2),%r10 - movq %r11,%rbx - adcq %r11,%r11 - - mulq %rax - addq %rax,%r9 - adcq %rdx,%r10 - adcq $0,%r11 - - movq %r9,16(%rsp) - movq %r10,24(%rsp) - shrq $63,%rbx - - - movq 16(%rsi),%r9 - movq 24(%rsi),%rax - mulq %r9 - addq %rax,%r12 - movq 32(%rsi),%rax - movq %rdx,%rcx - adcq $0,%rcx - - mulq %r9 - addq %rax,%r13 - movq 40(%rsi),%rax - adcq $0,%rdx - addq %rcx,%r13 - movq %rdx,%rcx - adcq $0,%rcx - - mulq %r9 - addq %rax,%r14 - movq 48(%rsi),%rax - adcq $0,%rdx - addq %rcx,%r14 - movq %rdx,%rcx - adcq $0,%rcx - - mulq %r9 - movq %r12,%r10 - leaq (%rbx,%r12,2),%r12 - addq %rax,%r15 - movq 56(%rsi),%rax - adcq $0,%rdx - addq %rcx,%r15 - movq %rdx,%rcx - adcq $0,%rcx - - mulq %r9 - shrq $63,%r10 - addq %rax,%r8 - movq %r9,%rax - adcq $0,%rdx - addq %rcx,%r8 - movq %rdx,%r9 - adcq $0,%r9 - - movq %r13,%rcx - leaq (%r10,%r13,2),%r13 - - mulq %rax - addq %rax,%r11 - adcq %rdx,%r12 - adcq $0,%r13 - - movq %r11,32(%rsp) - movq %r12,40(%rsp) - shrq $63,%rcx - - - movq 24(%rsi),%r10 - movq 32(%rsi),%rax - mulq %r10 - addq %rax,%r14 - movq 40(%rsi),%rax - movq %rdx,%rbx - adcq $0,%rbx - - mulq %r10 - addq %rax,%r15 - movq 48(%rsi),%rax - adcq $0,%rdx - addq %rbx,%r15 - movq %rdx,%rbx - adcq $0,%rbx - - mulq %r10 - movq %r14,%r12 - leaq (%rcx,%r14,2),%r14 - addq %rax,%r8 - movq 56(%rsi),%rax - adcq $0,%rdx - addq %rbx,%r8 - movq %rdx,%rbx - adcq $0,%rbx - - mulq %r10 - shrq $63,%r12 - addq %rax,%r9 - movq %r10,%rax - adcq $0,%rdx - addq %rbx,%r9 - movq %rdx,%r10 - adcq $0,%r10 - - movq %r15,%rbx - leaq (%r12,%r15,2),%r15 - - mulq %rax - addq %rax,%r13 - adcq %rdx,%r14 - adcq $0,%r15 - - movq %r13,48(%rsp) - movq %r14,56(%rsp) - shrq $63,%rbx - - - movq 32(%rsi),%r11 - movq 40(%rsi),%rax - mulq %r11 - addq %rax,%r8 - movq 48(%rsi),%rax - movq %rdx,%rcx - adcq $0,%rcx - - mulq %r11 - addq %rax,%r9 - movq 56(%rsi),%rax - adcq $0,%rdx - movq %r8,%r12 - leaq (%rbx,%r8,2),%r8 - addq %rcx,%r9 - movq %rdx,%rcx - adcq $0,%rcx - - mulq %r11 - shrq $63,%r12 - addq %rax,%r10 - movq %r11,%rax - adcq $0,%rdx - addq %rcx,%r10 - movq %rdx,%r11 - adcq $0,%r11 - - movq %r9,%rcx - leaq (%r12,%r9,2),%r9 - - mulq %rax - addq %rax,%r15 - adcq %rdx,%r8 - adcq $0,%r9 - - movq %r15,64(%rsp) - movq %r8,72(%rsp) - shrq $63,%rcx - - - movq 40(%rsi),%r12 - movq 48(%rsi),%rax - mulq %r12 - addq %rax,%r10 - movq 56(%rsi),%rax - movq %rdx,%rbx - adcq $0,%rbx - - mulq %r12 - addq %rax,%r11 - movq %r12,%rax - movq %r10,%r15 - leaq (%rcx,%r10,2),%r10 - adcq $0,%rdx - shrq $63,%r15 - addq %rbx,%r11 - movq %rdx,%r12 - adcq $0,%r12 - - movq %r11,%rbx - leaq (%r15,%r11,2),%r11 - - mulq %rax - addq %rax,%r9 - adcq %rdx,%r10 - adcq $0,%r11 - - movq %r9,80(%rsp) - movq %r10,88(%rsp) - - - movq 48(%rsi),%r13 - movq 56(%rsi),%rax - mulq %r13 - addq %rax,%r12 - movq %r13,%rax - movq %rdx,%r13 - adcq $0,%r13 - - xorq %r14,%r14 - shlq $1,%rbx - adcq %r12,%r12 - adcq %r13,%r13 - adcq %r14,%r14 - - mulq %rax - addq %rax,%r11 - adcq %rdx,%r12 - adcq $0,%r13 - - movq %r11,96(%rsp) - movq %r12,104(%rsp) - - - movq 56(%rsi),%rax - mulq %rax - addq %rax,%r13 - adcq $0,%rdx - - addq %rdx,%r14 - - movq %r13,112(%rsp) - movq %r14,120(%rsp) - - movq (%rsp),%r8 - movq 8(%rsp),%r9 - movq 16(%rsp),%r10 - movq 24(%rsp),%r11 - movq 32(%rsp),%r12 - movq 40(%rsp),%r13 - movq 48(%rsp),%r14 - movq 56(%rsp),%r15 - - call __rsaz_512_reduce - - addq 64(%rsp),%r8 - adcq 72(%rsp),%r9 - adcq 80(%rsp),%r10 - adcq 88(%rsp),%r11 - adcq 96(%rsp),%r12 - adcq 104(%rsp),%r13 - adcq 112(%rsp),%r14 - adcq 120(%rsp),%r15 - sbbq %rcx,%rcx - - call __rsaz_512_subtract - - movq %r8,%rdx - movq %r9,%rax - movl 128+8(%rsp),%r8d - movq %rdi,%rsi - - decl %r8d - jnz .Loop_sqr - - leaq 128+24+48(%rsp),%rax - movq -48(%rax),%r15 - movq -40(%rax),%r14 - movq -32(%rax),%r13 - movq -24(%rax),%r12 - movq -16(%rax),%rbp - movq -8(%rax),%rbx - leaq (%rax),%rsp -.Lsqr_epilogue: - .byte 0xf3,0xc3 -.size rsaz_512_sqr,.-rsaz_512_sqr -.globl rsaz_512_mul -.hidden rsaz_512_mul -.type rsaz_512_mul,@function -.align 32 -rsaz_512_mul: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - subq $128+24,%rsp -.Lmul_body: -.byte 102,72,15,110,199 -.byte 102,72,15,110,201 - movq %r8,128(%rsp) - movq (%rdx),%rbx - movq %rdx,%rbp - call __rsaz_512_mul - -.byte 102,72,15,126,199 -.byte 102,72,15,126,205 - - movq (%rsp),%r8 - movq 8(%rsp),%r9 - movq 16(%rsp),%r10 - movq 24(%rsp),%r11 - movq 32(%rsp),%r12 - movq 40(%rsp),%r13 - movq 48(%rsp),%r14 - movq 56(%rsp),%r15 - - call __rsaz_512_reduce - addq 64(%rsp),%r8 - adcq 72(%rsp),%r9 - adcq 80(%rsp),%r10 - adcq 88(%rsp),%r11 - adcq 96(%rsp),%r12 - adcq 104(%rsp),%r13 - adcq 112(%rsp),%r14 - adcq 120(%rsp),%r15 - sbbq %rcx,%rcx - - call __rsaz_512_subtract - - leaq 128+24+48(%rsp),%rax - movq -48(%rax),%r15 - movq -40(%rax),%r14 - movq -32(%rax),%r13 - movq -24(%rax),%r12 - movq -16(%rax),%rbp - movq -8(%rax),%rbx - leaq (%rax),%rsp -.Lmul_epilogue: - .byte 0xf3,0xc3 -.size rsaz_512_mul,.-rsaz_512_mul -.globl rsaz_512_mul_gather4 -.hidden rsaz_512_mul_gather4 -.type rsaz_512_mul_gather4,@function -.align 32 -rsaz_512_mul_gather4: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - movl %r9d,%r9d - subq $128+24,%rsp -.Lmul_gather4_body: - movl 64(%rdx,%r9,4),%eax -.byte 102,72,15,110,199 - movl (%rdx,%r9,4),%ebx -.byte 102,72,15,110,201 - movq %r8,128(%rsp) - - shlq $32,%rax - orq %rax,%rbx - movq (%rsi),%rax - movq 8(%rsi),%rcx - leaq 128(%rdx,%r9,4),%rbp - mulq %rbx - movq %rax,(%rsp) - movq %rcx,%rax - movq %rdx,%r8 - - mulq %rbx - movd (%rbp),%xmm4 - addq %rax,%r8 - movq 16(%rsi),%rax - movq %rdx,%r9 - adcq $0,%r9 - - mulq %rbx - movd 64(%rbp),%xmm5 - addq %rax,%r9 - movq 24(%rsi),%rax - movq %rdx,%r10 - adcq $0,%r10 - - mulq %rbx - pslldq $4,%xmm5 - addq %rax,%r10 - movq 32(%rsi),%rax - movq %rdx,%r11 - adcq $0,%r11 - - mulq %rbx - por %xmm5,%xmm4 - addq %rax,%r11 - movq 40(%rsi),%rax - movq %rdx,%r12 - adcq $0,%r12 - - mulq %rbx - addq %rax,%r12 - movq 48(%rsi),%rax - movq %rdx,%r13 - adcq $0,%r13 - - mulq %rbx - leaq 128(%rbp),%rbp - addq %rax,%r13 - movq 56(%rsi),%rax - movq %rdx,%r14 - adcq $0,%r14 - - mulq %rbx -.byte 102,72,15,126,227 - addq %rax,%r14 - movq (%rsi),%rax - movq %rdx,%r15 - adcq $0,%r15 - - leaq 8(%rsp),%rdi - movl $7,%ecx - jmp .Loop_mul_gather - -.align 32 -.Loop_mul_gather: - mulq %rbx - addq %rax,%r8 - movq 8(%rsi),%rax - movq %r8,(%rdi) - movq %rdx,%r8 - adcq $0,%r8 - - mulq %rbx - movd (%rbp),%xmm4 - addq %rax,%r9 - movq 16(%rsi),%rax - adcq $0,%rdx - addq %r9,%r8 - movq %rdx,%r9 - adcq $0,%r9 - - mulq %rbx - movd 64(%rbp),%xmm5 - addq %rax,%r10 - movq 24(%rsi),%rax - adcq $0,%rdx - addq %r10,%r9 - movq %rdx,%r10 - adcq $0,%r10 - - mulq %rbx - pslldq $4,%xmm5 - addq %rax,%r11 - movq 32(%rsi),%rax - adcq $0,%rdx - addq %r11,%r10 - movq %rdx,%r11 - adcq $0,%r11 - - mulq %rbx - por %xmm5,%xmm4 - addq %rax,%r12 - movq 40(%rsi),%rax - adcq $0,%rdx - addq %r12,%r11 - movq %rdx,%r12 - adcq $0,%r12 - - mulq %rbx - addq %rax,%r13 - movq 48(%rsi),%rax - adcq $0,%rdx - addq %r13,%r12 - movq %rdx,%r13 - adcq $0,%r13 - - mulq %rbx - addq %rax,%r14 - movq 56(%rsi),%rax - adcq $0,%rdx - addq %r14,%r13 - movq %rdx,%r14 - adcq $0,%r14 - - mulq %rbx -.byte 102,72,15,126,227 - addq %rax,%r15 - movq (%rsi),%rax - adcq $0,%rdx - addq %r15,%r14 - movq %rdx,%r15 - adcq $0,%r15 - - leaq 128(%rbp),%rbp - leaq 8(%rdi),%rdi - - decl %ecx - jnz .Loop_mul_gather - - movq %r8,(%rdi) - movq %r9,8(%rdi) - movq %r10,16(%rdi) - movq %r11,24(%rdi) - movq %r12,32(%rdi) - movq %r13,40(%rdi) - movq %r14,48(%rdi) - movq %r15,56(%rdi) - -.byte 102,72,15,126,199 -.byte 102,72,15,126,205 - - movq (%rsp),%r8 - movq 8(%rsp),%r9 - movq 16(%rsp),%r10 - movq 24(%rsp),%r11 - movq 32(%rsp),%r12 - movq 40(%rsp),%r13 - movq 48(%rsp),%r14 - movq 56(%rsp),%r15 - - call __rsaz_512_reduce - addq 64(%rsp),%r8 - adcq 72(%rsp),%r9 - adcq 80(%rsp),%r10 - adcq 88(%rsp),%r11 - adcq 96(%rsp),%r12 - adcq 104(%rsp),%r13 - adcq 112(%rsp),%r14 - adcq 120(%rsp),%r15 - sbbq %rcx,%rcx - - call __rsaz_512_subtract - - leaq 128+24+48(%rsp),%rax - movq -48(%rax),%r15 - movq -40(%rax),%r14 - movq -32(%rax),%r13 - movq -24(%rax),%r12 - movq -16(%rax),%rbp - movq -8(%rax),%rbx - leaq (%rax),%rsp -.Lmul_gather4_epilogue: - .byte 0xf3,0xc3 -.size rsaz_512_mul_gather4,.-rsaz_512_mul_gather4 -.globl rsaz_512_mul_scatter4 -.hidden rsaz_512_mul_scatter4 -.type rsaz_512_mul_scatter4,@function -.align 32 -rsaz_512_mul_scatter4: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - movl %r9d,%r9d - subq $128+24,%rsp -.Lmul_scatter4_body: - leaq (%r8,%r9,4),%r8 -.byte 102,72,15,110,199 -.byte 102,72,15,110,202 -.byte 102,73,15,110,208 - movq %rcx,128(%rsp) - - movq %rdi,%rbp - movq (%rdi),%rbx - call __rsaz_512_mul - -.byte 102,72,15,126,199 -.byte 102,72,15,126,205 - - movq (%rsp),%r8 - movq 8(%rsp),%r9 - movq 16(%rsp),%r10 - movq 24(%rsp),%r11 - movq 32(%rsp),%r12 - movq 40(%rsp),%r13 - movq 48(%rsp),%r14 - movq 56(%rsp),%r15 - - call __rsaz_512_reduce - addq 64(%rsp),%r8 - adcq 72(%rsp),%r9 - adcq 80(%rsp),%r10 - adcq 88(%rsp),%r11 - adcq 96(%rsp),%r12 - adcq 104(%rsp),%r13 - adcq 112(%rsp),%r14 - adcq 120(%rsp),%r15 -.byte 102,72,15,126,214 - sbbq %rcx,%rcx - - call __rsaz_512_subtract - - movl %r8d,0(%rsi) - shrq $32,%r8 - movl %r9d,128(%rsi) - shrq $32,%r9 - movl %r10d,256(%rsi) - shrq $32,%r10 - movl %r11d,384(%rsi) - shrq $32,%r11 - movl %r12d,512(%rsi) - shrq $32,%r12 - movl %r13d,640(%rsi) - shrq $32,%r13 - movl %r14d,768(%rsi) - shrq $32,%r14 - movl %r15d,896(%rsi) - shrq $32,%r15 - movl %r8d,64(%rsi) - movl %r9d,192(%rsi) - movl %r10d,320(%rsi) - movl %r11d,448(%rsi) - movl %r12d,576(%rsi) - movl %r13d,704(%rsi) - movl %r14d,832(%rsi) - movl %r15d,960(%rsi) - - leaq 128+24+48(%rsp),%rax - movq -48(%rax),%r15 - movq -40(%rax),%r14 - movq -32(%rax),%r13 - movq -24(%rax),%r12 - movq -16(%rax),%rbp - movq -8(%rax),%rbx - leaq (%rax),%rsp -.Lmul_scatter4_epilogue: - .byte 0xf3,0xc3 -.size rsaz_512_mul_scatter4,.-rsaz_512_mul_scatter4 -.globl rsaz_512_mul_by_one -.hidden rsaz_512_mul_by_one -.type rsaz_512_mul_by_one,@function -.align 32 -rsaz_512_mul_by_one: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - subq $128+24,%rsp -.Lmul_by_one_body: - movq %rdx,%rbp - movq %rcx,128(%rsp) - - movq (%rsi),%r8 - pxor %xmm0,%xmm0 - movq 8(%rsi),%r9 - movq 16(%rsi),%r10 - movq 24(%rsi),%r11 - movq 32(%rsi),%r12 - movq 40(%rsi),%r13 - movq 48(%rsi),%r14 - movq 56(%rsi),%r15 - - movdqa %xmm0,(%rsp) - movdqa %xmm0,16(%rsp) - movdqa %xmm0,32(%rsp) - movdqa %xmm0,48(%rsp) - movdqa %xmm0,64(%rsp) - movdqa %xmm0,80(%rsp) - movdqa %xmm0,96(%rsp) - call __rsaz_512_reduce - movq %r8,(%rdi) - movq %r9,8(%rdi) - movq %r10,16(%rdi) - movq %r11,24(%rdi) - movq %r12,32(%rdi) - movq %r13,40(%rdi) - movq %r14,48(%rdi) - movq %r15,56(%rdi) - - leaq 128+24+48(%rsp),%rax - movq -48(%rax),%r15 - movq -40(%rax),%r14 - movq -32(%rax),%r13 - movq -24(%rax),%r12 - movq -16(%rax),%rbp - movq -8(%rax),%rbx - leaq (%rax),%rsp -.Lmul_by_one_epilogue: - .byte 0xf3,0xc3 -.size rsaz_512_mul_by_one,.-rsaz_512_mul_by_one -.type __rsaz_512_reduce,@function -.align 32 -__rsaz_512_reduce: - movq %r8,%rbx - imulq 128+8(%rsp),%rbx - movq 0(%rbp),%rax - movl $8,%ecx - jmp .Lreduction_loop - -.align 32 -.Lreduction_loop: - mulq %rbx - movq 8(%rbp),%rax - negq %r8 - movq %rdx,%r8 - adcq $0,%r8 - - mulq %rbx - addq %rax,%r9 - movq 16(%rbp),%rax - adcq $0,%rdx - addq %r9,%r8 - movq %rdx,%r9 - adcq $0,%r9 - - mulq %rbx - addq %rax,%r10 - movq 24(%rbp),%rax - adcq $0,%rdx - addq %r10,%r9 - movq %rdx,%r10 - adcq $0,%r10 - - mulq %rbx - addq %rax,%r11 - movq 32(%rbp),%rax - adcq $0,%rdx - addq %r11,%r10 - movq 128+8(%rsp),%rsi - - - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbx - addq %rax,%r12 - movq 40(%rbp),%rax - adcq $0,%rdx - imulq %r8,%rsi - addq %r12,%r11 - movq %rdx,%r12 - adcq $0,%r12 - - mulq %rbx - addq %rax,%r13 - movq 48(%rbp),%rax - adcq $0,%rdx - addq %r13,%r12 - movq %rdx,%r13 - adcq $0,%r13 - - mulq %rbx - addq %rax,%r14 - movq 56(%rbp),%rax - adcq $0,%rdx - addq %r14,%r13 - movq %rdx,%r14 - adcq $0,%r14 - - mulq %rbx - movq %rsi,%rbx - addq %rax,%r15 - movq 0(%rbp),%rax - adcq $0,%rdx - addq %r15,%r14 - movq %rdx,%r15 - adcq $0,%r15 - - decl %ecx - jne .Lreduction_loop - - .byte 0xf3,0xc3 -.size __rsaz_512_reduce,.-__rsaz_512_reduce -.type __rsaz_512_subtract,@function -.align 32 -__rsaz_512_subtract: - movq %r8,(%rdi) - movq %r9,8(%rdi) - movq %r10,16(%rdi) - movq %r11,24(%rdi) - movq %r12,32(%rdi) - movq %r13,40(%rdi) - movq %r14,48(%rdi) - movq %r15,56(%rdi) - - movq 0(%rbp),%r8 - movq 8(%rbp),%r9 - negq %r8 - notq %r9 - andq %rcx,%r8 - movq 16(%rbp),%r10 - andq %rcx,%r9 - notq %r10 - movq 24(%rbp),%r11 - andq %rcx,%r10 - notq %r11 - movq 32(%rbp),%r12 - andq %rcx,%r11 - notq %r12 - movq 40(%rbp),%r13 - andq %rcx,%r12 - notq %r13 - movq 48(%rbp),%r14 - andq %rcx,%r13 - notq %r14 - movq 56(%rbp),%r15 - andq %rcx,%r14 - notq %r15 - andq %rcx,%r15 - - addq (%rdi),%r8 - adcq 8(%rdi),%r9 - adcq 16(%rdi),%r10 - adcq 24(%rdi),%r11 - adcq 32(%rdi),%r12 - adcq 40(%rdi),%r13 - adcq 48(%rdi),%r14 - adcq 56(%rdi),%r15 - - movq %r8,(%rdi) - movq %r9,8(%rdi) - movq %r10,16(%rdi) - movq %r11,24(%rdi) - movq %r12,32(%rdi) - movq %r13,40(%rdi) - movq %r14,48(%rdi) - movq %r15,56(%rdi) - - .byte 0xf3,0xc3 -.size __rsaz_512_subtract,.-__rsaz_512_subtract -.type __rsaz_512_mul,@function -.align 32 -__rsaz_512_mul: - leaq 8(%rsp),%rdi - - movq (%rsi),%rax - mulq %rbx - movq %rax,(%rdi) - movq 8(%rsi),%rax - movq %rdx,%r8 - - mulq %rbx - addq %rax,%r8 - movq 16(%rsi),%rax - movq %rdx,%r9 - adcq $0,%r9 - - mulq %rbx - addq %rax,%r9 - movq 24(%rsi),%rax - movq %rdx,%r10 - adcq $0,%r10 - - mulq %rbx - addq %rax,%r10 - movq 32(%rsi),%rax - movq %rdx,%r11 - adcq $0,%r11 - - mulq %rbx - addq %rax,%r11 - movq 40(%rsi),%rax - movq %rdx,%r12 - adcq $0,%r12 - - mulq %rbx - addq %rax,%r12 - movq 48(%rsi),%rax - movq %rdx,%r13 - adcq $0,%r13 - - mulq %rbx - addq %rax,%r13 - movq 56(%rsi),%rax - movq %rdx,%r14 - adcq $0,%r14 - - mulq %rbx - addq %rax,%r14 - movq (%rsi),%rax - movq %rdx,%r15 - adcq $0,%r15 - - leaq 8(%rbp),%rbp - leaq 8(%rdi),%rdi - - movl $7,%ecx - jmp .Loop_mul - -.align 32 -.Loop_mul: - movq (%rbp),%rbx - mulq %rbx - addq %rax,%r8 - movq 8(%rsi),%rax - movq %r8,(%rdi) - movq %rdx,%r8 - adcq $0,%r8 - - mulq %rbx - addq %rax,%r9 - movq 16(%rsi),%rax - adcq $0,%rdx - addq %r9,%r8 - movq %rdx,%r9 - adcq $0,%r9 - - mulq %rbx - addq %rax,%r10 - movq 24(%rsi),%rax - adcq $0,%rdx - addq %r10,%r9 - movq %rdx,%r10 - adcq $0,%r10 - - mulq %rbx - addq %rax,%r11 - movq 32(%rsi),%rax - adcq $0,%rdx - addq %r11,%r10 - movq %rdx,%r11 - adcq $0,%r11 - - mulq %rbx - addq %rax,%r12 - movq 40(%rsi),%rax - adcq $0,%rdx - addq %r12,%r11 - movq %rdx,%r12 - adcq $0,%r12 - - mulq %rbx - addq %rax,%r13 - movq 48(%rsi),%rax - adcq $0,%rdx - addq %r13,%r12 - movq %rdx,%r13 - adcq $0,%r13 - - mulq %rbx - addq %rax,%r14 - movq 56(%rsi),%rax - adcq $0,%rdx - addq %r14,%r13 - movq %rdx,%r14 - leaq 8(%rbp),%rbp - adcq $0,%r14 - - mulq %rbx - addq %rax,%r15 - movq (%rsi),%rax - adcq $0,%rdx - addq %r15,%r14 - movq %rdx,%r15 - adcq $0,%r15 - - leaq 8(%rdi),%rdi - - decl %ecx - jnz .Loop_mul - - movq %r8,(%rdi) - movq %r9,8(%rdi) - movq %r10,16(%rdi) - movq %r11,24(%rdi) - movq %r12,32(%rdi) - movq %r13,40(%rdi) - movq %r14,48(%rdi) - movq %r15,56(%rdi) - - .byte 0xf3,0xc3 -.size __rsaz_512_mul,.-__rsaz_512_mul -.globl rsaz_512_scatter4 -.hidden rsaz_512_scatter4 -.type rsaz_512_scatter4,@function -.align 16 -rsaz_512_scatter4: - leaq (%rdi,%rdx,4),%rdi - movl $8,%r9d - jmp .Loop_scatter -.align 16 -.Loop_scatter: - movq (%rsi),%rax - leaq 8(%rsi),%rsi - movl %eax,(%rdi) - shrq $32,%rax - movl %eax,64(%rdi) - leaq 128(%rdi),%rdi - decl %r9d - jnz .Loop_scatter - .byte 0xf3,0xc3 -.size rsaz_512_scatter4,.-rsaz_512_scatter4 - -.globl rsaz_512_gather4 -.hidden rsaz_512_gather4 -.type rsaz_512_gather4,@function -.align 16 -rsaz_512_gather4: - leaq (%rsi,%rdx,4),%rsi - movl $8,%r9d - jmp .Loop_gather -.align 16 -.Loop_gather: - movl (%rsi),%eax - movl 64(%rsi),%r8d - leaq 128(%rsi),%rsi - shlq $32,%r8 - orq %r8,%rax - movq %rax,(%rdi) - leaq 8(%rdi),%rdi - decl %r9d - jnz .Loop_gather - .byte 0xf3,0xc3 -.size rsaz_512_gather4,.-rsaz_512_gather4 -#endif diff --git a/third_party/boringssl/linux-x86_64/crypto/bn/x86_64-mont.S b/third_party/boringssl/linux-x86_64/crypto/bn/x86_64-mont.S deleted file mode 100644 index 4d401c6743f84..0000000000000 --- a/third_party/boringssl/linux-x86_64/crypto/bn/x86_64-mont.S +++ /dev/null @@ -1,728 +0,0 @@ -#if defined(__x86_64__) -.text - -.extern OPENSSL_ia32cap_P -.hidden OPENSSL_ia32cap_P - -.globl bn_mul_mont -.hidden bn_mul_mont -.type bn_mul_mont,@function -.align 16 -bn_mul_mont: - testl $3,%r9d - jnz .Lmul_enter - cmpl $8,%r9d - jb .Lmul_enter - cmpq %rsi,%rdx - jne .Lmul4x_enter - testl $7,%r9d - jz .Lsqr8x_enter - jmp .Lmul4x_enter - -.align 16 -.Lmul_enter: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - movl %r9d,%r9d - leaq 2(%r9),%r10 - movq %rsp,%r11 - negq %r10 - leaq (%rsp,%r10,8),%rsp - andq $-1024,%rsp - - movq %r11,8(%rsp,%r9,8) -.Lmul_body: - movq %rdx,%r12 - movq (%r8),%r8 - movq (%r12),%rbx - movq (%rsi),%rax - - xorq %r14,%r14 - xorq %r15,%r15 - - movq %r8,%rbp - mulq %rbx - movq %rax,%r10 - movq (%rcx),%rax - - imulq %r10,%rbp - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r10 - movq 8(%rsi),%rax - adcq $0,%rdx - movq %rdx,%r13 - - leaq 1(%r15),%r15 - jmp .L1st_enter - -.align 16 -.L1st: - addq %rax,%r13 - movq (%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r11,%r13 - movq %r10,%r11 - adcq $0,%rdx - movq %r13,-16(%rsp,%r15,8) - movq %rdx,%r13 - -.L1st_enter: - mulq %rbx - addq %rax,%r11 - movq (%rcx,%r15,8),%rax - adcq $0,%rdx - leaq 1(%r15),%r15 - movq %rdx,%r10 - - mulq %rbp - cmpq %r9,%r15 - jne .L1st - - addq %rax,%r13 - movq (%rsi),%rax - adcq $0,%rdx - addq %r11,%r13 - adcq $0,%rdx - movq %r13,-16(%rsp,%r15,8) - movq %rdx,%r13 - movq %r10,%r11 - - xorq %rdx,%rdx - addq %r11,%r13 - adcq $0,%rdx - movq %r13,-8(%rsp,%r9,8) - movq %rdx,(%rsp,%r9,8) - - leaq 1(%r14),%r14 - jmp .Louter -.align 16 -.Louter: - movq (%r12,%r14,8),%rbx - xorq %r15,%r15 - movq %r8,%rbp - movq (%rsp),%r10 - mulq %rbx - addq %rax,%r10 - movq (%rcx),%rax - adcq $0,%rdx - - imulq %r10,%rbp - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r10 - movq 8(%rsi),%rax - adcq $0,%rdx - movq 8(%rsp),%r10 - movq %rdx,%r13 - - leaq 1(%r15),%r15 - jmp .Linner_enter - -.align 16 -.Linner: - addq %rax,%r13 - movq (%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r10,%r13 - movq (%rsp,%r15,8),%r10 - adcq $0,%rdx - movq %r13,-16(%rsp,%r15,8) - movq %rdx,%r13 - -.Linner_enter: - mulq %rbx - addq %rax,%r11 - movq (%rcx,%r15,8),%rax - adcq $0,%rdx - addq %r11,%r10 - movq %rdx,%r11 - adcq $0,%r11 - leaq 1(%r15),%r15 - - mulq %rbp - cmpq %r9,%r15 - jne .Linner - - addq %rax,%r13 - movq (%rsi),%rax - adcq $0,%rdx - addq %r10,%r13 - movq (%rsp,%r15,8),%r10 - adcq $0,%rdx - movq %r13,-16(%rsp,%r15,8) - movq %rdx,%r13 - - xorq %rdx,%rdx - addq %r11,%r13 - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-8(%rsp,%r9,8) - movq %rdx,(%rsp,%r9,8) - - leaq 1(%r14),%r14 - cmpq %r9,%r14 - jb .Louter - - xorq %r14,%r14 - movq (%rsp),%rax - leaq (%rsp),%rsi - movq %r9,%r15 - jmp .Lsub -.align 16 -.Lsub: sbbq (%rcx,%r14,8),%rax - movq %rax,(%rdi,%r14,8) - movq 8(%rsi,%r14,8),%rax - leaq 1(%r14),%r14 - decq %r15 - jnz .Lsub - - sbbq $0,%rax - xorq %r14,%r14 - movq %r9,%r15 -.align 16 -.Lcopy: - movq (%rsp,%r14,8),%rsi - movq (%rdi,%r14,8),%rcx - xorq %rcx,%rsi - andq %rax,%rsi - xorq %rcx,%rsi - movq %r14,(%rsp,%r14,8) - movq %rsi,(%rdi,%r14,8) - leaq 1(%r14),%r14 - subq $1,%r15 - jnz .Lcopy - - movq 8(%rsp,%r9,8),%rsi - movq $1,%rax - movq (%rsi),%r15 - movq 8(%rsi),%r14 - movq 16(%rsi),%r13 - movq 24(%rsi),%r12 - movq 32(%rsi),%rbp - movq 40(%rsi),%rbx - leaq 48(%rsi),%rsp -.Lmul_epilogue: - .byte 0xf3,0xc3 -.size bn_mul_mont,.-bn_mul_mont -.type bn_mul4x_mont,@function -.align 16 -bn_mul4x_mont: -.Lmul4x_enter: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - movl %r9d,%r9d - leaq 4(%r9),%r10 - movq %rsp,%r11 - negq %r10 - leaq (%rsp,%r10,8),%rsp - andq $-1024,%rsp - - movq %r11,8(%rsp,%r9,8) -.Lmul4x_body: - movq %rdi,16(%rsp,%r9,8) - movq %rdx,%r12 - movq (%r8),%r8 - movq (%r12),%rbx - movq (%rsi),%rax - - xorq %r14,%r14 - xorq %r15,%r15 - - movq %r8,%rbp - mulq %rbx - movq %rax,%r10 - movq (%rcx),%rax - - imulq %r10,%rbp - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r10 - movq 8(%rsi),%rax - adcq $0,%rdx - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq 8(%rcx),%rax - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq 16(%rsi),%rax - adcq $0,%rdx - addq %r11,%rdi - leaq 4(%r15),%r15 - adcq $0,%rdx - movq %rdi,(%rsp) - movq %rdx,%r13 - jmp .L1st4x -.align 16 -.L1st4x: - mulq %rbx - addq %rax,%r10 - movq -16(%rcx,%r15,8),%rax - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq -8(%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-24(%rsp,%r15,8) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq -8(%rcx,%r15,8),%rax - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq (%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %rdi,-16(%rsp,%r15,8) - movq %rdx,%r13 - - mulq %rbx - addq %rax,%r10 - movq (%rcx,%r15,8),%rax - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq 8(%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-8(%rsp,%r15,8) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq 8(%rcx,%r15,8),%rax - adcq $0,%rdx - leaq 4(%r15),%r15 - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq -16(%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %rdi,-32(%rsp,%r15,8) - movq %rdx,%r13 - cmpq %r9,%r15 - jb .L1st4x - - mulq %rbx - addq %rax,%r10 - movq -16(%rcx,%r15,8),%rax - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq -8(%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-24(%rsp,%r15,8) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq -8(%rcx,%r15,8),%rax - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq (%rsi),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %rdi,-16(%rsp,%r15,8) - movq %rdx,%r13 - - xorq %rdi,%rdi - addq %r10,%r13 - adcq $0,%rdi - movq %r13,-8(%rsp,%r15,8) - movq %rdi,(%rsp,%r15,8) - - leaq 1(%r14),%r14 -.align 4 -.Louter4x: - movq (%r12,%r14,8),%rbx - xorq %r15,%r15 - movq (%rsp),%r10 - movq %r8,%rbp - mulq %rbx - addq %rax,%r10 - movq (%rcx),%rax - adcq $0,%rdx - - imulq %r10,%rbp - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r10 - movq 8(%rsi),%rax - adcq $0,%rdx - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq 8(%rcx),%rax - adcq $0,%rdx - addq 8(%rsp),%r11 - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq 16(%rsi),%rax - adcq $0,%rdx - addq %r11,%rdi - leaq 4(%r15),%r15 - adcq $0,%rdx - movq %rdi,(%rsp) - movq %rdx,%r13 - jmp .Linner4x -.align 16 -.Linner4x: - mulq %rbx - addq %rax,%r10 - movq -16(%rcx,%r15,8),%rax - adcq $0,%rdx - addq -16(%rsp,%r15,8),%r10 - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq -8(%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-24(%rsp,%r15,8) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq -8(%rcx,%r15,8),%rax - adcq $0,%rdx - addq -8(%rsp,%r15,8),%r11 - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq (%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %rdi,-16(%rsp,%r15,8) - movq %rdx,%r13 - - mulq %rbx - addq %rax,%r10 - movq (%rcx,%r15,8),%rax - adcq $0,%rdx - addq (%rsp,%r15,8),%r10 - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq 8(%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-8(%rsp,%r15,8) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq 8(%rcx,%r15,8),%rax - adcq $0,%rdx - addq 8(%rsp,%r15,8),%r11 - adcq $0,%rdx - leaq 4(%r15),%r15 - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq -16(%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %rdi,-32(%rsp,%r15,8) - movq %rdx,%r13 - cmpq %r9,%r15 - jb .Linner4x - - mulq %rbx - addq %rax,%r10 - movq -16(%rcx,%r15,8),%rax - adcq $0,%rdx - addq -16(%rsp,%r15,8),%r10 - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq -8(%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-24(%rsp,%r15,8) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq -8(%rcx,%r15,8),%rax - adcq $0,%rdx - addq -8(%rsp,%r15,8),%r11 - adcq $0,%rdx - leaq 1(%r14),%r14 - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq (%rsi),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %rdi,-16(%rsp,%r15,8) - movq %rdx,%r13 - - xorq %rdi,%rdi - addq %r10,%r13 - adcq $0,%rdi - addq (%rsp,%r9,8),%r13 - adcq $0,%rdi - movq %r13,-8(%rsp,%r15,8) - movq %rdi,(%rsp,%r15,8) - - cmpq %r9,%r14 - jb .Louter4x - movq 16(%rsp,%r9,8),%rdi - movq 0(%rsp),%rax - movq 8(%rsp),%rdx - shrq $2,%r9 - leaq (%rsp),%rsi - xorq %r14,%r14 - - subq 0(%rcx),%rax - movq 16(%rsi),%rbx - movq 24(%rsi),%rbp - sbbq 8(%rcx),%rdx - leaq -1(%r9),%r15 - jmp .Lsub4x -.align 16 -.Lsub4x: - movq %rax,0(%rdi,%r14,8) - movq %rdx,8(%rdi,%r14,8) - sbbq 16(%rcx,%r14,8),%rbx - movq 32(%rsi,%r14,8),%rax - movq 40(%rsi,%r14,8),%rdx - sbbq 24(%rcx,%r14,8),%rbp - movq %rbx,16(%rdi,%r14,8) - movq %rbp,24(%rdi,%r14,8) - sbbq 32(%rcx,%r14,8),%rax - movq 48(%rsi,%r14,8),%rbx - movq 56(%rsi,%r14,8),%rbp - sbbq 40(%rcx,%r14,8),%rdx - leaq 4(%r14),%r14 - decq %r15 - jnz .Lsub4x - - movq %rax,0(%rdi,%r14,8) - movq 32(%rsi,%r14,8),%rax - sbbq 16(%rcx,%r14,8),%rbx - movq %rdx,8(%rdi,%r14,8) - sbbq 24(%rcx,%r14,8),%rbp - movq %rbx,16(%rdi,%r14,8) - - sbbq $0,%rax - movq %rax,%xmm0 - punpcklqdq %xmm0,%xmm0 - movq %rbp,24(%rdi,%r14,8) - xorq %r14,%r14 - - movq %r9,%r15 - pxor %xmm5,%xmm5 - jmp .Lcopy4x -.align 16 -.Lcopy4x: - movdqu (%rsp,%r14,1),%xmm2 - movdqu 16(%rsp,%r14,1),%xmm4 - movdqu (%rdi,%r14,1),%xmm1 - movdqu 16(%rdi,%r14,1),%xmm3 - pxor %xmm1,%xmm2 - pxor %xmm3,%xmm4 - pand %xmm0,%xmm2 - pand %xmm0,%xmm4 - pxor %xmm1,%xmm2 - pxor %xmm3,%xmm4 - movdqu %xmm2,(%rdi,%r14,1) - movdqu %xmm4,16(%rdi,%r14,1) - movdqa %xmm5,(%rsp,%r14,1) - movdqa %xmm5,16(%rsp,%r14,1) - - leaq 32(%r14),%r14 - decq %r15 - jnz .Lcopy4x - - shlq $2,%r9 - movq 8(%rsp,%r9,8),%rsi - movq $1,%rax - movq (%rsi),%r15 - movq 8(%rsi),%r14 - movq 16(%rsi),%r13 - movq 24(%rsi),%r12 - movq 32(%rsi),%rbp - movq 40(%rsi),%rbx - leaq 48(%rsi),%rsp -.Lmul4x_epilogue: - .byte 0xf3,0xc3 -.size bn_mul4x_mont,.-bn_mul4x_mont -.extern bn_sqr8x_internal -.hidden bn_sqr8x_internal - -.type bn_sqr8x_mont,@function -.align 32 -bn_sqr8x_mont: -.Lsqr8x_enter: - movq %rsp,%rax - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - movl %r9d,%r10d - shll $3,%r9d - shlq $3+2,%r10 - negq %r9 - - - - - - - leaq -64(%rsp,%r9,4),%r11 - movq (%r8),%r8 - subq %rsi,%r11 - andq $4095,%r11 - cmpq %r11,%r10 - jb .Lsqr8x_sp_alt - subq %r11,%rsp - leaq -64(%rsp,%r9,4),%rsp - jmp .Lsqr8x_sp_done - -.align 32 -.Lsqr8x_sp_alt: - leaq 4096-64(,%r9,4),%r10 - leaq -64(%rsp,%r9,4),%rsp - subq %r10,%r11 - movq $0,%r10 - cmovcq %r10,%r11 - subq %r11,%rsp -.Lsqr8x_sp_done: - andq $-64,%rsp - movq %r9,%r10 - negq %r9 - - leaq 64(%rsp,%r9,2),%r11 - movq %r8,32(%rsp) - movq %rax,40(%rsp) -.Lsqr8x_body: - - movq %r9,%rbp -.byte 102,73,15,110,211 - shrq $3+2,%rbp - movl OPENSSL_ia32cap_P+8(%rip),%eax - jmp .Lsqr8x_copy_n - -.align 32 -.Lsqr8x_copy_n: - movq 0(%rcx),%xmm0 - movq 8(%rcx),%xmm1 - movq 16(%rcx),%xmm3 - movq 24(%rcx),%xmm4 - leaq 32(%rcx),%rcx - movdqa %xmm0,0(%r11) - movdqa %xmm1,16(%r11) - movdqa %xmm3,32(%r11) - movdqa %xmm4,48(%r11) - leaq 64(%r11),%r11 - decq %rbp - jnz .Lsqr8x_copy_n - - pxor %xmm0,%xmm0 -.byte 102,72,15,110,207 -.byte 102,73,15,110,218 - call bn_sqr8x_internal - - pxor %xmm0,%xmm0 - leaq 48(%rsp),%rax - leaq 64(%rsp,%r9,2),%rdx - shrq $3+2,%r9 - movq 40(%rsp),%rsi - jmp .Lsqr8x_zero - -.align 32 -.Lsqr8x_zero: - movdqa %xmm0,0(%rax) - movdqa %xmm0,16(%rax) - movdqa %xmm0,32(%rax) - movdqa %xmm0,48(%rax) - leaq 64(%rax),%rax - movdqa %xmm0,0(%rdx) - movdqa %xmm0,16(%rdx) - movdqa %xmm0,32(%rdx) - movdqa %xmm0,48(%rdx) - leaq 64(%rdx),%rdx - decq %r9 - jnz .Lsqr8x_zero - - movq $1,%rax - movq -48(%rsi),%r15 - movq -40(%rsi),%r14 - movq -32(%rsi),%r13 - movq -24(%rsi),%r12 - movq -16(%rsi),%rbp - movq -8(%rsi),%rbx - leaq (%rsi),%rsp -.Lsqr8x_epilogue: - .byte 0xf3,0xc3 -.size bn_sqr8x_mont,.-bn_sqr8x_mont -.byte 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105,112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 16 -#endif diff --git a/third_party/boringssl/linux-x86_64/crypto/bn/x86_64-mont5.S b/third_party/boringssl/linux-x86_64/crypto/bn/x86_64-mont5.S deleted file mode 100644 index 02edc69b369c9..0000000000000 --- a/third_party/boringssl/linux-x86_64/crypto/bn/x86_64-mont5.S +++ /dev/null @@ -1,1823 +0,0 @@ -#if defined(__x86_64__) -.text - -.extern OPENSSL_ia32cap_P -.hidden OPENSSL_ia32cap_P - -.globl bn_mul_mont_gather5 -.hidden bn_mul_mont_gather5 -.type bn_mul_mont_gather5,@function -.align 64 -bn_mul_mont_gather5: - testl $7,%r9d - jnz .Lmul_enter - jmp .Lmul4x_enter - -.align 16 -.Lmul_enter: - movl %r9d,%r9d - movq %rsp,%rax - movl 8(%rsp),%r10d - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - leaq 2(%r9),%r11 - negq %r11 - leaq (%rsp,%r11,8),%rsp - andq $-1024,%rsp - - movq %rax,8(%rsp,%r9,8) -.Lmul_body: - movq %rdx,%r12 - movq %r10,%r11 - shrq $3,%r10 - andq $7,%r11 - notq %r10 - leaq .Lmagic_masks(%rip),%rax - andq $3,%r10 - leaq 96(%r12,%r11,8),%r12 - movq 0(%rax,%r10,8),%xmm4 - movq 8(%rax,%r10,8),%xmm5 - movq 16(%rax,%r10,8),%xmm6 - movq 24(%rax,%r10,8),%xmm7 - - movq -96(%r12),%xmm0 - movq -32(%r12),%xmm1 - pand %xmm4,%xmm0 - movq 32(%r12),%xmm2 - pand %xmm5,%xmm1 - movq 96(%r12),%xmm3 - pand %xmm6,%xmm2 - por %xmm1,%xmm0 - pand %xmm7,%xmm3 - por %xmm2,%xmm0 - leaq 256(%r12),%r12 - por %xmm3,%xmm0 - -.byte 102,72,15,126,195 - - movq (%r8),%r8 - movq (%rsi),%rax - - xorq %r14,%r14 - xorq %r15,%r15 - - movq -96(%r12),%xmm0 - movq -32(%r12),%xmm1 - pand %xmm4,%xmm0 - movq 32(%r12),%xmm2 - pand %xmm5,%xmm1 - - movq %r8,%rbp - mulq %rbx - movq %rax,%r10 - movq (%rcx),%rax - - movq 96(%r12),%xmm3 - pand %xmm6,%xmm2 - por %xmm1,%xmm0 - pand %xmm7,%xmm3 - - imulq %r10,%rbp - movq %rdx,%r11 - - por %xmm2,%xmm0 - leaq 256(%r12),%r12 - por %xmm3,%xmm0 - - mulq %rbp - addq %rax,%r10 - movq 8(%rsi),%rax - adcq $0,%rdx - movq %rdx,%r13 - - leaq 1(%r15),%r15 - jmp .L1st_enter - -.align 16 -.L1st: - addq %rax,%r13 - movq (%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r11,%r13 - movq %r10,%r11 - adcq $0,%rdx - movq %r13,-16(%rsp,%r15,8) - movq %rdx,%r13 - -.L1st_enter: - mulq %rbx - addq %rax,%r11 - movq (%rcx,%r15,8),%rax - adcq $0,%rdx - leaq 1(%r15),%r15 - movq %rdx,%r10 - - mulq %rbp - cmpq %r9,%r15 - jne .L1st - -.byte 102,72,15,126,195 - - addq %rax,%r13 - movq (%rsi),%rax - adcq $0,%rdx - addq %r11,%r13 - adcq $0,%rdx - movq %r13,-16(%rsp,%r15,8) - movq %rdx,%r13 - movq %r10,%r11 - - xorq %rdx,%rdx - addq %r11,%r13 - adcq $0,%rdx - movq %r13,-8(%rsp,%r9,8) - movq %rdx,(%rsp,%r9,8) - - leaq 1(%r14),%r14 - jmp .Louter -.align 16 -.Louter: - xorq %r15,%r15 - movq %r8,%rbp - movq (%rsp),%r10 - - movq -96(%r12),%xmm0 - movq -32(%r12),%xmm1 - pand %xmm4,%xmm0 - movq 32(%r12),%xmm2 - pand %xmm5,%xmm1 - - mulq %rbx - addq %rax,%r10 - movq (%rcx),%rax - adcq $0,%rdx - - movq 96(%r12),%xmm3 - pand %xmm6,%xmm2 - por %xmm1,%xmm0 - pand %xmm7,%xmm3 - - imulq %r10,%rbp - movq %rdx,%r11 - - por %xmm2,%xmm0 - leaq 256(%r12),%r12 - por %xmm3,%xmm0 - - mulq %rbp - addq %rax,%r10 - movq 8(%rsi),%rax - adcq $0,%rdx - movq 8(%rsp),%r10 - movq %rdx,%r13 - - leaq 1(%r15),%r15 - jmp .Linner_enter - -.align 16 -.Linner: - addq %rax,%r13 - movq (%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r10,%r13 - movq (%rsp,%r15,8),%r10 - adcq $0,%rdx - movq %r13,-16(%rsp,%r15,8) - movq %rdx,%r13 - -.Linner_enter: - mulq %rbx - addq %rax,%r11 - movq (%rcx,%r15,8),%rax - adcq $0,%rdx - addq %r11,%r10 - movq %rdx,%r11 - adcq $0,%r11 - leaq 1(%r15),%r15 - - mulq %rbp - cmpq %r9,%r15 - jne .Linner - -.byte 102,72,15,126,195 - - addq %rax,%r13 - movq (%rsi),%rax - adcq $0,%rdx - addq %r10,%r13 - movq (%rsp,%r15,8),%r10 - adcq $0,%rdx - movq %r13,-16(%rsp,%r15,8) - movq %rdx,%r13 - - xorq %rdx,%rdx - addq %r11,%r13 - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-8(%rsp,%r9,8) - movq %rdx,(%rsp,%r9,8) - - leaq 1(%r14),%r14 - cmpq %r9,%r14 - jb .Louter - - xorq %r14,%r14 - movq (%rsp),%rax - leaq (%rsp),%rsi - movq %r9,%r15 - jmp .Lsub -.align 16 -.Lsub: sbbq (%rcx,%r14,8),%rax - movq %rax,(%rdi,%r14,8) - movq 8(%rsi,%r14,8),%rax - leaq 1(%r14),%r14 - decq %r15 - jnz .Lsub - - sbbq $0,%rax - xorq %r14,%r14 - movq %r9,%r15 -.align 16 -.Lcopy: - movq (%rsp,%r14,8),%rsi - movq (%rdi,%r14,8),%rcx - xorq %rcx,%rsi - andq %rax,%rsi - xorq %rcx,%rsi - movq %r14,(%rsp,%r14,8) - movq %rsi,(%rdi,%r14,8) - leaq 1(%r14),%r14 - subq $1,%r15 - jnz .Lcopy - - movq 8(%rsp,%r9,8),%rsi - movq $1,%rax - movq -48(%rsi),%r15 - movq -40(%rsi),%r14 - movq -32(%rsi),%r13 - movq -24(%rsi),%r12 - movq -16(%rsi),%rbp - movq -8(%rsi),%rbx - leaq (%rsi),%rsp -.Lmul_epilogue: - .byte 0xf3,0xc3 -.size bn_mul_mont_gather5,.-bn_mul_mont_gather5 -.type bn_mul4x_mont_gather5,@function -.align 32 -bn_mul4x_mont_gather5: -.Lmul4x_enter: -.byte 0x67 - movq %rsp,%rax - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 -.byte 0x67 - movl %r9d,%r10d - shll $3,%r9d - shll $3+2,%r10d - negq %r9 - - - - - - - - - leaq -64(%rsp,%r9,2),%r11 - subq %rsi,%r11 - andq $4095,%r11 - cmpq %r11,%r10 - jb .Lmul4xsp_alt - subq %r11,%rsp - leaq -64(%rsp,%r9,2),%rsp - jmp .Lmul4xsp_done - -.align 32 -.Lmul4xsp_alt: - leaq 4096-64(,%r9,2),%r10 - leaq -64(%rsp,%r9,2),%rsp - subq %r10,%r11 - movq $0,%r10 - cmovcq %r10,%r11 - subq %r11,%rsp -.Lmul4xsp_done: - andq $-64,%rsp - negq %r9 - - movq %rax,40(%rsp) -.Lmul4x_body: - - call mul4x_internal - - movq 40(%rsp),%rsi - movq $1,%rax - movq -48(%rsi),%r15 - movq -40(%rsi),%r14 - movq -32(%rsi),%r13 - movq -24(%rsi),%r12 - movq -16(%rsi),%rbp - movq -8(%rsi),%rbx - leaq (%rsi),%rsp -.Lmul4x_epilogue: - .byte 0xf3,0xc3 -.size bn_mul4x_mont_gather5,.-bn_mul4x_mont_gather5 - -.type mul4x_internal,@function -.align 32 -mul4x_internal: - shlq $5,%r9 - movl 8(%rax),%r10d - leaq 256(%rdx,%r9,1),%r13 - shrq $5,%r9 - movq %r10,%r11 - shrq $3,%r10 - andq $7,%r11 - notq %r10 - leaq .Lmagic_masks(%rip),%rax - andq $3,%r10 - leaq 96(%rdx,%r11,8),%r12 - movq 0(%rax,%r10,8),%xmm4 - movq 8(%rax,%r10,8),%xmm5 - addq $7,%r11 - movq 16(%rax,%r10,8),%xmm6 - movq 24(%rax,%r10,8),%xmm7 - andq $7,%r11 - - movq -96(%r12),%xmm0 - leaq 256(%r12),%r14 - movq -32(%r12),%xmm1 - pand %xmm4,%xmm0 - movq 32(%r12),%xmm2 - pand %xmm5,%xmm1 - movq 96(%r12),%xmm3 - pand %xmm6,%xmm2 -.byte 0x67 - por %xmm1,%xmm0 - movq -96(%r14),%xmm1 -.byte 0x67 - pand %xmm7,%xmm3 -.byte 0x67 - por %xmm2,%xmm0 - movq -32(%r14),%xmm2 -.byte 0x67 - pand %xmm4,%xmm1 -.byte 0x67 - por %xmm3,%xmm0 - movq 32(%r14),%xmm3 - -.byte 102,72,15,126,195 - movq 96(%r14),%xmm0 - movq %r13,16+8(%rsp) - movq %rdi,56+8(%rsp) - - movq (%r8),%r8 - movq (%rsi),%rax - leaq (%rsi,%r9,1),%rsi - negq %r9 - - movq %r8,%rbp - mulq %rbx - movq %rax,%r10 - movq (%rcx),%rax - - pand %xmm5,%xmm2 - pand %xmm6,%xmm3 - por %xmm2,%xmm1 - - imulq %r10,%rbp - - - - - - - - leaq 64+8(%rsp,%r11,8),%r14 - movq %rdx,%r11 - - pand %xmm7,%xmm0 - por %xmm3,%xmm1 - leaq 512(%r12),%r12 - por %xmm1,%xmm0 - - mulq %rbp - addq %rax,%r10 - movq 8(%rsi,%r9,1),%rax - adcq $0,%rdx - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq 16(%rcx),%rax - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq 16(%rsi,%r9,1),%rax - adcq $0,%rdx - addq %r11,%rdi - leaq 32(%r9),%r15 - leaq 64(%rcx),%rcx - adcq $0,%rdx - movq %rdi,(%r14) - movq %rdx,%r13 - jmp .L1st4x - -.align 32 -.L1st4x: - mulq %rbx - addq %rax,%r10 - movq -32(%rcx),%rax - leaq 32(%r14),%r14 - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq -8(%rsi,%r15,1),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-24(%r14) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq -16(%rcx),%rax - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq (%rsi,%r15,1),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %rdi,-16(%r14) - movq %rdx,%r13 - - mulq %rbx - addq %rax,%r10 - movq 0(%rcx),%rax - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq 8(%rsi,%r15,1),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-8(%r14) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq 16(%rcx),%rax - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq 16(%rsi,%r15,1),%rax - adcq $0,%rdx - addq %r11,%rdi - leaq 64(%rcx),%rcx - adcq $0,%rdx - movq %rdi,(%r14) - movq %rdx,%r13 - - addq $32,%r15 - jnz .L1st4x - - mulq %rbx - addq %rax,%r10 - movq -32(%rcx),%rax - leaq 32(%r14),%r14 - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq -8(%rsi),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-24(%r14) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq -16(%rcx),%rax - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq (%rsi,%r9,1),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %rdi,-16(%r14) - movq %rdx,%r13 - -.byte 102,72,15,126,195 - leaq (%rcx,%r9,2),%rcx - - xorq %rdi,%rdi - addq %r10,%r13 - adcq $0,%rdi - movq %r13,-8(%r14) - - jmp .Louter4x - -.align 32 -.Louter4x: - movq (%r14,%r9,1),%r10 - movq %r8,%rbp - mulq %rbx - addq %rax,%r10 - movq (%rcx),%rax - adcq $0,%rdx - - movq -96(%r12),%xmm0 - movq -32(%r12),%xmm1 - pand %xmm4,%xmm0 - movq 32(%r12),%xmm2 - pand %xmm5,%xmm1 - movq 96(%r12),%xmm3 - - imulq %r10,%rbp -.byte 0x67 - movq %rdx,%r11 - movq %rdi,(%r14) - - pand %xmm6,%xmm2 - por %xmm1,%xmm0 - pand %xmm7,%xmm3 - por %xmm2,%xmm0 - leaq (%r14,%r9,1),%r14 - leaq 256(%r12),%r12 - por %xmm3,%xmm0 - - mulq %rbp - addq %rax,%r10 - movq 8(%rsi,%r9,1),%rax - adcq $0,%rdx - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq 16(%rcx),%rax - adcq $0,%rdx - addq 8(%r14),%r11 - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq 16(%rsi,%r9,1),%rax - adcq $0,%rdx - addq %r11,%rdi - leaq 32(%r9),%r15 - leaq 64(%rcx),%rcx - adcq $0,%rdx - movq %rdx,%r13 - jmp .Linner4x - -.align 32 -.Linner4x: - mulq %rbx - addq %rax,%r10 - movq -32(%rcx),%rax - adcq $0,%rdx - addq 16(%r14),%r10 - leaq 32(%r14),%r14 - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq -8(%rsi,%r15,1),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %rdi,-32(%r14) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq -16(%rcx),%rax - adcq $0,%rdx - addq -8(%r14),%r11 - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq (%rsi,%r15,1),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %r13,-24(%r14) - movq %rdx,%r13 - - mulq %rbx - addq %rax,%r10 - movq 0(%rcx),%rax - adcq $0,%rdx - addq (%r14),%r10 - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq 8(%rsi,%r15,1),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %rdi,-16(%r14) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq 16(%rcx),%rax - adcq $0,%rdx - addq 8(%r14),%r11 - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq 16(%rsi,%r15,1),%rax - adcq $0,%rdx - addq %r11,%rdi - leaq 64(%rcx),%rcx - adcq $0,%rdx - movq %r13,-8(%r14) - movq %rdx,%r13 - - addq $32,%r15 - jnz .Linner4x - - mulq %rbx - addq %rax,%r10 - movq -32(%rcx),%rax - adcq $0,%rdx - addq 16(%r14),%r10 - leaq 32(%r14),%r14 - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq -8(%rsi),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %rdi,-32(%r14) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq %rbp,%rax - movq -16(%rcx),%rbp - adcq $0,%rdx - addq -8(%r14),%r11 - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq (%rsi,%r9,1),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %r13,-24(%r14) - movq %rdx,%r13 - -.byte 102,72,15,126,195 - movq %rdi,-16(%r14) - leaq (%rcx,%r9,2),%rcx - - xorq %rdi,%rdi - addq %r10,%r13 - adcq $0,%rdi - addq (%r14),%r13 - adcq $0,%rdi - movq %r13,-8(%r14) - - cmpq 16+8(%rsp),%r12 - jb .Louter4x - subq %r13,%rbp - adcq %r15,%r15 - orq %r15,%rdi - xorq $1,%rdi - leaq (%r14,%r9,1),%rbx - leaq (%rcx,%rdi,8),%rbp - movq %r9,%rcx - sarq $3+2,%rcx - movq 56+8(%rsp),%rdi - jmp .Lsqr4x_sub -.size mul4x_internal,.-mul4x_internal -.globl bn_power5 -.hidden bn_power5 -.type bn_power5,@function -.align 32 -bn_power5: - movq %rsp,%rax - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - movl %r9d,%r10d - shll $3,%r9d - shll $3+2,%r10d - negq %r9 - movq (%r8),%r8 - - - - - - - - leaq -64(%rsp,%r9,2),%r11 - subq %rsi,%r11 - andq $4095,%r11 - cmpq %r11,%r10 - jb .Lpwr_sp_alt - subq %r11,%rsp - leaq -64(%rsp,%r9,2),%rsp - jmp .Lpwr_sp_done - -.align 32 -.Lpwr_sp_alt: - leaq 4096-64(,%r9,2),%r10 - leaq -64(%rsp,%r9,2),%rsp - subq %r10,%r11 - movq $0,%r10 - cmovcq %r10,%r11 - subq %r11,%rsp -.Lpwr_sp_done: - andq $-64,%rsp - movq %r9,%r10 - negq %r9 - - - - - - - - - - - movq %r8,32(%rsp) - movq %rax,40(%rsp) -.Lpower5_body: -.byte 102,72,15,110,207 -.byte 102,72,15,110,209 -.byte 102,73,15,110,218 -.byte 102,72,15,110,226 - - call __bn_sqr8x_internal - call __bn_sqr8x_internal - call __bn_sqr8x_internal - call __bn_sqr8x_internal - call __bn_sqr8x_internal - -.byte 102,72,15,126,209 -.byte 102,72,15,126,226 - movq %rsi,%rdi - movq 40(%rsp),%rax - leaq 32(%rsp),%r8 - - call mul4x_internal - - movq 40(%rsp),%rsi - movq $1,%rax - movq -48(%rsi),%r15 - movq -40(%rsi),%r14 - movq -32(%rsi),%r13 - movq -24(%rsi),%r12 - movq -16(%rsi),%rbp - movq -8(%rsi),%rbx - leaq (%rsi),%rsp -.Lpower5_epilogue: - .byte 0xf3,0xc3 -.size bn_power5,.-bn_power5 - -.globl bn_sqr8x_internal -.hidden bn_sqr8x_internal -.hidden bn_sqr8x_internal -.type bn_sqr8x_internal,@function -.align 32 -bn_sqr8x_internal: -__bn_sqr8x_internal: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - leaq 32(%r10),%rbp - leaq (%rsi,%r9,1),%rsi - - movq %r9,%rcx - - - movq -32(%rsi,%rbp,1),%r14 - leaq 48+8(%rsp,%r9,2),%rdi - movq -24(%rsi,%rbp,1),%rax - leaq -32(%rdi,%rbp,1),%rdi - movq -16(%rsi,%rbp,1),%rbx - movq %rax,%r15 - - mulq %r14 - movq %rax,%r10 - movq %rbx,%rax - movq %rdx,%r11 - movq %r10,-24(%rdi,%rbp,1) - - mulq %r14 - addq %rax,%r11 - movq %rbx,%rax - adcq $0,%rdx - movq %r11,-16(%rdi,%rbp,1) - movq %rdx,%r10 - - - movq -8(%rsi,%rbp,1),%rbx - mulq %r15 - movq %rax,%r12 - movq %rbx,%rax - movq %rdx,%r13 - - leaq (%rbp),%rcx - mulq %r14 - addq %rax,%r10 - movq %rbx,%rax - movq %rdx,%r11 - adcq $0,%r11 - addq %r12,%r10 - adcq $0,%r11 - movq %r10,-8(%rdi,%rcx,1) - jmp .Lsqr4x_1st - -.align 32 -.Lsqr4x_1st: - movq (%rsi,%rcx,1),%rbx - mulq %r15 - addq %rax,%r13 - movq %rbx,%rax - movq %rdx,%r12 - adcq $0,%r12 - - mulq %r14 - addq %rax,%r11 - movq %rbx,%rax - movq 8(%rsi,%rcx,1),%rbx - movq %rdx,%r10 - adcq $0,%r10 - addq %r13,%r11 - adcq $0,%r10 - - - mulq %r15 - addq %rax,%r12 - movq %rbx,%rax - movq %r11,(%rdi,%rcx,1) - movq %rdx,%r13 - adcq $0,%r13 - - mulq %r14 - addq %rax,%r10 - movq %rbx,%rax - movq 16(%rsi,%rcx,1),%rbx - movq %rdx,%r11 - adcq $0,%r11 - addq %r12,%r10 - adcq $0,%r11 - - mulq %r15 - addq %rax,%r13 - movq %rbx,%rax - movq %r10,8(%rdi,%rcx,1) - movq %rdx,%r12 - adcq $0,%r12 - - mulq %r14 - addq %rax,%r11 - movq %rbx,%rax - movq 24(%rsi,%rcx,1),%rbx - movq %rdx,%r10 - adcq $0,%r10 - addq %r13,%r11 - adcq $0,%r10 - - - mulq %r15 - addq %rax,%r12 - movq %rbx,%rax - movq %r11,16(%rdi,%rcx,1) - movq %rdx,%r13 - adcq $0,%r13 - leaq 32(%rcx),%rcx - - mulq %r14 - addq %rax,%r10 - movq %rbx,%rax - movq %rdx,%r11 - adcq $0,%r11 - addq %r12,%r10 - adcq $0,%r11 - movq %r10,-8(%rdi,%rcx,1) - - cmpq $0,%rcx - jne .Lsqr4x_1st - - mulq %r15 - addq %rax,%r13 - leaq 16(%rbp),%rbp - adcq $0,%rdx - addq %r11,%r13 - adcq $0,%rdx - - movq %r13,(%rdi) - movq %rdx,%r12 - movq %rdx,8(%rdi) - jmp .Lsqr4x_outer - -.align 32 -.Lsqr4x_outer: - movq -32(%rsi,%rbp,1),%r14 - leaq 48+8(%rsp,%r9,2),%rdi - movq -24(%rsi,%rbp,1),%rax - leaq -32(%rdi,%rbp,1),%rdi - movq -16(%rsi,%rbp,1),%rbx - movq %rax,%r15 - - mulq %r14 - movq -24(%rdi,%rbp,1),%r10 - addq %rax,%r10 - movq %rbx,%rax - adcq $0,%rdx - movq %r10,-24(%rdi,%rbp,1) - movq %rdx,%r11 - - mulq %r14 - addq %rax,%r11 - movq %rbx,%rax - adcq $0,%rdx - addq -16(%rdi,%rbp,1),%r11 - movq %rdx,%r10 - adcq $0,%r10 - movq %r11,-16(%rdi,%rbp,1) - - xorq %r12,%r12 - - movq -8(%rsi,%rbp,1),%rbx - mulq %r15 - addq %rax,%r12 - movq %rbx,%rax - adcq $0,%rdx - addq -8(%rdi,%rbp,1),%r12 - movq %rdx,%r13 - adcq $0,%r13 - - mulq %r14 - addq %rax,%r10 - movq %rbx,%rax - adcq $0,%rdx - addq %r12,%r10 - movq %rdx,%r11 - adcq $0,%r11 - movq %r10,-8(%rdi,%rbp,1) - - leaq (%rbp),%rcx - jmp .Lsqr4x_inner - -.align 32 -.Lsqr4x_inner: - movq (%rsi,%rcx,1),%rbx - mulq %r15 - addq %rax,%r13 - movq %rbx,%rax - movq %rdx,%r12 - adcq $0,%r12 - addq (%rdi,%rcx,1),%r13 - adcq $0,%r12 - -.byte 0x67 - mulq %r14 - addq %rax,%r11 - movq %rbx,%rax - movq 8(%rsi,%rcx,1),%rbx - movq %rdx,%r10 - adcq $0,%r10 - addq %r13,%r11 - adcq $0,%r10 - - mulq %r15 - addq %rax,%r12 - movq %r11,(%rdi,%rcx,1) - movq %rbx,%rax - movq %rdx,%r13 - adcq $0,%r13 - addq 8(%rdi,%rcx,1),%r12 - leaq 16(%rcx),%rcx - adcq $0,%r13 - - mulq %r14 - addq %rax,%r10 - movq %rbx,%rax - adcq $0,%rdx - addq %r12,%r10 - movq %rdx,%r11 - adcq $0,%r11 - movq %r10,-8(%rdi,%rcx,1) - - cmpq $0,%rcx - jne .Lsqr4x_inner - -.byte 0x67 - mulq %r15 - addq %rax,%r13 - adcq $0,%rdx - addq %r11,%r13 - adcq $0,%rdx - - movq %r13,(%rdi) - movq %rdx,%r12 - movq %rdx,8(%rdi) - - addq $16,%rbp - jnz .Lsqr4x_outer - - - movq -32(%rsi),%r14 - leaq 48+8(%rsp,%r9,2),%rdi - movq -24(%rsi),%rax - leaq -32(%rdi,%rbp,1),%rdi - movq -16(%rsi),%rbx - movq %rax,%r15 - - mulq %r14 - addq %rax,%r10 - movq %rbx,%rax - movq %rdx,%r11 - adcq $0,%r11 - - mulq %r14 - addq %rax,%r11 - movq %rbx,%rax - movq %r10,-24(%rdi) - movq %rdx,%r10 - adcq $0,%r10 - addq %r13,%r11 - movq -8(%rsi),%rbx - adcq $0,%r10 - - mulq %r15 - addq %rax,%r12 - movq %rbx,%rax - movq %r11,-16(%rdi) - movq %rdx,%r13 - adcq $0,%r13 - - mulq %r14 - addq %rax,%r10 - movq %rbx,%rax - movq %rdx,%r11 - adcq $0,%r11 - addq %r12,%r10 - adcq $0,%r11 - movq %r10,-8(%rdi) - - mulq %r15 - addq %rax,%r13 - movq -16(%rsi),%rax - adcq $0,%rdx - addq %r11,%r13 - adcq $0,%rdx - - movq %r13,(%rdi) - movq %rdx,%r12 - movq %rdx,8(%rdi) - - mulq %rbx - addq $16,%rbp - xorq %r14,%r14 - subq %r9,%rbp - xorq %r15,%r15 - - addq %r12,%rax - adcq $0,%rdx - movq %rax,8(%rdi) - movq %rdx,16(%rdi) - movq %r15,24(%rdi) - - movq -16(%rsi,%rbp,1),%rax - leaq 48+8(%rsp),%rdi - xorq %r10,%r10 - movq 8(%rdi),%r11 - - leaq (%r14,%r10,2),%r12 - shrq $63,%r10 - leaq (%rcx,%r11,2),%r13 - shrq $63,%r11 - orq %r10,%r13 - movq 16(%rdi),%r10 - movq %r11,%r14 - mulq %rax - negq %r15 - movq 24(%rdi),%r11 - adcq %rax,%r12 - movq -8(%rsi,%rbp,1),%rax - movq %r12,(%rdi) - adcq %rdx,%r13 - - leaq (%r14,%r10,2),%rbx - movq %r13,8(%rdi) - sbbq %r15,%r15 - shrq $63,%r10 - leaq (%rcx,%r11,2),%r8 - shrq $63,%r11 - orq %r10,%r8 - movq 32(%rdi),%r10 - movq %r11,%r14 - mulq %rax - negq %r15 - movq 40(%rdi),%r11 - adcq %rax,%rbx - movq 0(%rsi,%rbp,1),%rax - movq %rbx,16(%rdi) - adcq %rdx,%r8 - leaq 16(%rbp),%rbp - movq %r8,24(%rdi) - sbbq %r15,%r15 - leaq 64(%rdi),%rdi - jmp .Lsqr4x_shift_n_add - -.align 32 -.Lsqr4x_shift_n_add: - leaq (%r14,%r10,2),%r12 - shrq $63,%r10 - leaq (%rcx,%r11,2),%r13 - shrq $63,%r11 - orq %r10,%r13 - movq -16(%rdi),%r10 - movq %r11,%r14 - mulq %rax - negq %r15 - movq -8(%rdi),%r11 - adcq %rax,%r12 - movq -8(%rsi,%rbp,1),%rax - movq %r12,-32(%rdi) - adcq %rdx,%r13 - - leaq (%r14,%r10,2),%rbx - movq %r13,-24(%rdi) - sbbq %r15,%r15 - shrq $63,%r10 - leaq (%rcx,%r11,2),%r8 - shrq $63,%r11 - orq %r10,%r8 - movq 0(%rdi),%r10 - movq %r11,%r14 - mulq %rax - negq %r15 - movq 8(%rdi),%r11 - adcq %rax,%rbx - movq 0(%rsi,%rbp,1),%rax - movq %rbx,-16(%rdi) - adcq %rdx,%r8 - - leaq (%r14,%r10,2),%r12 - movq %r8,-8(%rdi) - sbbq %r15,%r15 - shrq $63,%r10 - leaq (%rcx,%r11,2),%r13 - shrq $63,%r11 - orq %r10,%r13 - movq 16(%rdi),%r10 - movq %r11,%r14 - mulq %rax - negq %r15 - movq 24(%rdi),%r11 - adcq %rax,%r12 - movq 8(%rsi,%rbp,1),%rax - movq %r12,0(%rdi) - adcq %rdx,%r13 - - leaq (%r14,%r10,2),%rbx - movq %r13,8(%rdi) - sbbq %r15,%r15 - shrq $63,%r10 - leaq (%rcx,%r11,2),%r8 - shrq $63,%r11 - orq %r10,%r8 - movq 32(%rdi),%r10 - movq %r11,%r14 - mulq %rax - negq %r15 - movq 40(%rdi),%r11 - adcq %rax,%rbx - movq 16(%rsi,%rbp,1),%rax - movq %rbx,16(%rdi) - adcq %rdx,%r8 - movq %r8,24(%rdi) - sbbq %r15,%r15 - leaq 64(%rdi),%rdi - addq $32,%rbp - jnz .Lsqr4x_shift_n_add - - leaq (%r14,%r10,2),%r12 -.byte 0x67 - shrq $63,%r10 - leaq (%rcx,%r11,2),%r13 - shrq $63,%r11 - orq %r10,%r13 - movq -16(%rdi),%r10 - movq %r11,%r14 - mulq %rax - negq %r15 - movq -8(%rdi),%r11 - adcq %rax,%r12 - movq -8(%rsi),%rax - movq %r12,-32(%rdi) - adcq %rdx,%r13 - - leaq (%r14,%r10,2),%rbx - movq %r13,-24(%rdi) - sbbq %r15,%r15 - shrq $63,%r10 - leaq (%rcx,%r11,2),%r8 - shrq $63,%r11 - orq %r10,%r8 - mulq %rax - negq %r15 - adcq %rax,%rbx - adcq %rdx,%r8 - movq %rbx,-16(%rdi) - movq %r8,-8(%rdi) -.byte 102,72,15,126,213 -sqr8x_reduction: - xorq %rax,%rax - leaq (%rbp,%r9,2),%rcx - leaq 48+8(%rsp,%r9,2),%rdx - movq %rcx,0+8(%rsp) - leaq 48+8(%rsp,%r9,1),%rdi - movq %rdx,8+8(%rsp) - negq %r9 - jmp .L8x_reduction_loop - -.align 32 -.L8x_reduction_loop: - leaq (%rdi,%r9,1),%rdi -.byte 0x66 - movq 0(%rdi),%rbx - movq 8(%rdi),%r9 - movq 16(%rdi),%r10 - movq 24(%rdi),%r11 - movq 32(%rdi),%r12 - movq 40(%rdi),%r13 - movq 48(%rdi),%r14 - movq 56(%rdi),%r15 - movq %rax,(%rdx) - leaq 64(%rdi),%rdi - -.byte 0x67 - movq %rbx,%r8 - imulq 32+8(%rsp),%rbx - movq 0(%rbp),%rax - movl $8,%ecx - jmp .L8x_reduce - -.align 32 -.L8x_reduce: - mulq %rbx - movq 16(%rbp),%rax - negq %r8 - movq %rdx,%r8 - adcq $0,%r8 - - mulq %rbx - addq %rax,%r9 - movq 32(%rbp),%rax - adcq $0,%rdx - addq %r9,%r8 - movq %rbx,48-8+8(%rsp,%rcx,8) - movq %rdx,%r9 - adcq $0,%r9 - - mulq %rbx - addq %rax,%r10 - movq 48(%rbp),%rax - adcq $0,%rdx - addq %r10,%r9 - movq 32+8(%rsp),%rsi - movq %rdx,%r10 - adcq $0,%r10 - - mulq %rbx - addq %rax,%r11 - movq 64(%rbp),%rax - adcq $0,%rdx - imulq %r8,%rsi - addq %r11,%r10 - movq %rdx,%r11 - adcq $0,%r11 - - mulq %rbx - addq %rax,%r12 - movq 80(%rbp),%rax - adcq $0,%rdx - addq %r12,%r11 - movq %rdx,%r12 - adcq $0,%r12 - - mulq %rbx - addq %rax,%r13 - movq 96(%rbp),%rax - adcq $0,%rdx - addq %r13,%r12 - movq %rdx,%r13 - adcq $0,%r13 - - mulq %rbx - addq %rax,%r14 - movq 112(%rbp),%rax - adcq $0,%rdx - addq %r14,%r13 - movq %rdx,%r14 - adcq $0,%r14 - - mulq %rbx - movq %rsi,%rbx - addq %rax,%r15 - movq 0(%rbp),%rax - adcq $0,%rdx - addq %r15,%r14 - movq %rdx,%r15 - adcq $0,%r15 - - decl %ecx - jnz .L8x_reduce - - leaq 128(%rbp),%rbp - xorq %rax,%rax - movq 8+8(%rsp),%rdx - cmpq 0+8(%rsp),%rbp - jae .L8x_no_tail - -.byte 0x66 - addq 0(%rdi),%r8 - adcq 8(%rdi),%r9 - adcq 16(%rdi),%r10 - adcq 24(%rdi),%r11 - adcq 32(%rdi),%r12 - adcq 40(%rdi),%r13 - adcq 48(%rdi),%r14 - adcq 56(%rdi),%r15 - sbbq %rsi,%rsi - - movq 48+56+8(%rsp),%rbx - movl $8,%ecx - movq 0(%rbp),%rax - jmp .L8x_tail - -.align 32 -.L8x_tail: - mulq %rbx - addq %rax,%r8 - movq 16(%rbp),%rax - movq %r8,(%rdi) - movq %rdx,%r8 - adcq $0,%r8 - - mulq %rbx - addq %rax,%r9 - movq 32(%rbp),%rax - adcq $0,%rdx - addq %r9,%r8 - leaq 8(%rdi),%rdi - movq %rdx,%r9 - adcq $0,%r9 - - mulq %rbx - addq %rax,%r10 - movq 48(%rbp),%rax - adcq $0,%rdx - addq %r10,%r9 - movq %rdx,%r10 - adcq $0,%r10 - - mulq %rbx - addq %rax,%r11 - movq 64(%rbp),%rax - adcq $0,%rdx - addq %r11,%r10 - movq %rdx,%r11 - adcq $0,%r11 - - mulq %rbx - addq %rax,%r12 - movq 80(%rbp),%rax - adcq $0,%rdx - addq %r12,%r11 - movq %rdx,%r12 - adcq $0,%r12 - - mulq %rbx - addq %rax,%r13 - movq 96(%rbp),%rax - adcq $0,%rdx - addq %r13,%r12 - movq %rdx,%r13 - adcq $0,%r13 - - mulq %rbx - addq %rax,%r14 - movq 112(%rbp),%rax - adcq $0,%rdx - addq %r14,%r13 - movq %rdx,%r14 - adcq $0,%r14 - - mulq %rbx - movq 48-16+8(%rsp,%rcx,8),%rbx - addq %rax,%r15 - adcq $0,%rdx - addq %r15,%r14 - movq 0(%rbp),%rax - movq %rdx,%r15 - adcq $0,%r15 - - decl %ecx - jnz .L8x_tail - - leaq 128(%rbp),%rbp - movq 8+8(%rsp),%rdx - cmpq 0+8(%rsp),%rbp - jae .L8x_tail_done - - movq 48+56+8(%rsp),%rbx - negq %rsi - movq 0(%rbp),%rax - adcq 0(%rdi),%r8 - adcq 8(%rdi),%r9 - adcq 16(%rdi),%r10 - adcq 24(%rdi),%r11 - adcq 32(%rdi),%r12 - adcq 40(%rdi),%r13 - adcq 48(%rdi),%r14 - adcq 56(%rdi),%r15 - sbbq %rsi,%rsi - - movl $8,%ecx - jmp .L8x_tail - -.align 32 -.L8x_tail_done: - addq (%rdx),%r8 - xorq %rax,%rax - - negq %rsi -.L8x_no_tail: - adcq 0(%rdi),%r8 - adcq 8(%rdi),%r9 - adcq 16(%rdi),%r10 - adcq 24(%rdi),%r11 - adcq 32(%rdi),%r12 - adcq 40(%rdi),%r13 - adcq 48(%rdi),%r14 - adcq 56(%rdi),%r15 - adcq $0,%rax - movq -16(%rbp),%rcx - xorq %rsi,%rsi - -.byte 102,72,15,126,213 - - movq %r8,0(%rdi) - movq %r9,8(%rdi) -.byte 102,73,15,126,217 - movq %r10,16(%rdi) - movq %r11,24(%rdi) - movq %r12,32(%rdi) - movq %r13,40(%rdi) - movq %r14,48(%rdi) - movq %r15,56(%rdi) - leaq 64(%rdi),%rdi - - cmpq %rdx,%rdi - jb .L8x_reduction_loop - - subq %r15,%rcx - leaq (%rdi,%r9,1),%rbx - adcq %rsi,%rsi - movq %r9,%rcx - orq %rsi,%rax -.byte 102,72,15,126,207 - xorq $1,%rax -.byte 102,72,15,126,206 - leaq (%rbp,%rax,8),%rbp - sarq $3+2,%rcx - jmp .Lsqr4x_sub - -.align 32 -.Lsqr4x_sub: -.byte 0x66 - movq 0(%rbx),%r12 - movq 8(%rbx),%r13 - sbbq 0(%rbp),%r12 - movq 16(%rbx),%r14 - sbbq 16(%rbp),%r13 - movq 24(%rbx),%r15 - leaq 32(%rbx),%rbx - sbbq 32(%rbp),%r14 - movq %r12,0(%rdi) - sbbq 48(%rbp),%r15 - leaq 64(%rbp),%rbp - movq %r13,8(%rdi) - movq %r14,16(%rdi) - movq %r15,24(%rdi) - leaq 32(%rdi),%rdi - - incq %rcx - jnz .Lsqr4x_sub - movq %r9,%r10 - negq %r9 - .byte 0xf3,0xc3 -.size bn_sqr8x_internal,.-bn_sqr8x_internal -.globl bn_from_montgomery -.hidden bn_from_montgomery -.type bn_from_montgomery,@function -.align 32 -bn_from_montgomery: - testl $7,%r9d - jz bn_from_mont8x - xorl %eax,%eax - .byte 0xf3,0xc3 -.size bn_from_montgomery,.-bn_from_montgomery - -.type bn_from_mont8x,@function -.align 32 -bn_from_mont8x: -.byte 0x67 - movq %rsp,%rax - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 -.byte 0x67 - movl %r9d,%r10d - shll $3,%r9d - shll $3+2,%r10d - negq %r9 - movq (%r8),%r8 - - - - - - - - leaq -64(%rsp,%r9,2),%r11 - subq %rsi,%r11 - andq $4095,%r11 - cmpq %r11,%r10 - jb .Lfrom_sp_alt - subq %r11,%rsp - leaq -64(%rsp,%r9,2),%rsp - jmp .Lfrom_sp_done - -.align 32 -.Lfrom_sp_alt: - leaq 4096-64(,%r9,2),%r10 - leaq -64(%rsp,%r9,2),%rsp - subq %r10,%r11 - movq $0,%r10 - cmovcq %r10,%r11 - subq %r11,%rsp -.Lfrom_sp_done: - andq $-64,%rsp - movq %r9,%r10 - negq %r9 - - - - - - - - - - - movq %r8,32(%rsp) - movq %rax,40(%rsp) -.Lfrom_body: - movq %r9,%r11 - leaq 48(%rsp),%rax - pxor %xmm0,%xmm0 - jmp .Lmul_by_1 - -.align 32 -.Lmul_by_1: - movdqu (%rsi),%xmm1 - movdqu 16(%rsi),%xmm2 - movdqu 32(%rsi),%xmm3 - movdqa %xmm0,(%rax,%r9,1) - movdqu 48(%rsi),%xmm4 - movdqa %xmm0,16(%rax,%r9,1) -.byte 0x48,0x8d,0xb6,0x40,0x00,0x00,0x00 - movdqa %xmm1,(%rax) - movdqa %xmm0,32(%rax,%r9,1) - movdqa %xmm2,16(%rax) - movdqa %xmm0,48(%rax,%r9,1) - movdqa %xmm3,32(%rax) - movdqa %xmm4,48(%rax) - leaq 64(%rax),%rax - subq $64,%r11 - jnz .Lmul_by_1 - -.byte 102,72,15,110,207 -.byte 102,72,15,110,209 -.byte 0x67 - movq %rcx,%rbp -.byte 102,73,15,110,218 - call sqr8x_reduction - - pxor %xmm0,%xmm0 - leaq 48(%rsp),%rax - movq 40(%rsp),%rsi - jmp .Lfrom_mont_zero - -.align 32 -.Lfrom_mont_zero: - movdqa %xmm0,0(%rax) - movdqa %xmm0,16(%rax) - movdqa %xmm0,32(%rax) - movdqa %xmm0,48(%rax) - leaq 64(%rax),%rax - subq $32,%r9 - jnz .Lfrom_mont_zero - - movq $1,%rax - movq -48(%rsi),%r15 - movq -40(%rsi),%r14 - movq -32(%rsi),%r13 - movq -24(%rsi),%r12 - movq -16(%rsi),%rbp - movq -8(%rsi),%rbx - leaq (%rsi),%rsp -.Lfrom_epilogue: - .byte 0xf3,0xc3 -.size bn_from_mont8x,.-bn_from_mont8x -.globl bn_scatter5 -.hidden bn_scatter5 -.type bn_scatter5,@function -.align 16 -bn_scatter5: - cmpl $0,%esi - jz .Lscatter_epilogue - leaq (%rdx,%rcx,8),%rdx -.Lscatter: - movq (%rdi),%rax - leaq 8(%rdi),%rdi - movq %rax,(%rdx) - leaq 256(%rdx),%rdx - subl $1,%esi - jnz .Lscatter -.Lscatter_epilogue: - .byte 0xf3,0xc3 -.size bn_scatter5,.-bn_scatter5 - -.globl bn_gather5 -.hidden bn_gather5 -.type bn_gather5,@function -.align 16 -bn_gather5: - movl %ecx,%r11d - shrl $3,%ecx - andq $7,%r11 - notl %ecx - leaq .Lmagic_masks(%rip),%rax - andl $3,%ecx - leaq 128(%rdx,%r11,8),%rdx - movq 0(%rax,%rcx,8),%xmm4 - movq 8(%rax,%rcx,8),%xmm5 - movq 16(%rax,%rcx,8),%xmm6 - movq 24(%rax,%rcx,8),%xmm7 - jmp .Lgather -.align 16 -.Lgather: - movq -128(%rdx),%xmm0 - movq -64(%rdx),%xmm1 - pand %xmm4,%xmm0 - movq 0(%rdx),%xmm2 - pand %xmm5,%xmm1 - movq 64(%rdx),%xmm3 - pand %xmm6,%xmm2 - por %xmm1,%xmm0 - pand %xmm7,%xmm3 -.byte 0x67,0x67 - por %xmm2,%xmm0 - leaq 256(%rdx),%rdx - por %xmm3,%xmm0 - - movq %xmm0,(%rdi) - leaq 8(%rdi),%rdi - subl $1,%esi - jnz .Lgather - .byte 0xf3,0xc3 -.LSEH_end_bn_gather5: -.size bn_gather5,.-bn_gather5 -.align 64 -.Lmagic_masks: -.long 0,0, 0,0, 0,0, -1,-1 -.long 0,0, 0,0, 0,0, 0,0 -.byte 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105,112,108,105,99,97,116,105,111,110,32,119,105,116,104,32,115,99,97,116,116,101,114,47,103,97,116,104,101,114,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -#endif diff --git a/third_party/boringssl/linux-x86_64/crypto/cpu-x86_64-asm.S b/third_party/boringssl/linux-x86_64/crypto/cpu-x86_64-asm.S deleted file mode 100644 index 9eef154e9e7eb..0000000000000 --- a/third_party/boringssl/linux-x86_64/crypto/cpu-x86_64-asm.S +++ /dev/null @@ -1,143 +0,0 @@ -#if defined(__x86_64__) -.text - -.globl OPENSSL_ia32_cpuid -.hidden OPENSSL_ia32_cpuid -.type OPENSSL_ia32_cpuid,@function -.align 16 -OPENSSL_ia32_cpuid: - - - movq %rdi,%rdi - movq %rbx,%r8 - - xorl %eax,%eax - movl %eax,8(%rdi) - cpuid - movl %eax,%r11d - - xorl %eax,%eax - cmpl $1970169159,%ebx - setne %al - movl %eax,%r9d - cmpl $1231384169,%edx - setne %al - orl %eax,%r9d - cmpl $1818588270,%ecx - setne %al - orl %eax,%r9d - jz .Lintel - - cmpl $1752462657,%ebx - setne %al - movl %eax,%r10d - cmpl $1769238117,%edx - setne %al - orl %eax,%r10d - cmpl $1145913699,%ecx - setne %al - orl %eax,%r10d - jnz .Lintel - - - - - movl $2147483648,%eax - cpuid - - - cmpl $2147483649,%eax - jb .Lintel - movl %eax,%r10d - movl $2147483649,%eax - cpuid - - - orl %ecx,%r9d - andl $2049,%r9d - - cmpl $2147483656,%r10d - jb .Lintel - - movl $2147483656,%eax - cpuid - - movzbq %cl,%r10 - incq %r10 - - movl $1,%eax - cpuid - - btl $28,%edx - jnc .Lgeneric - shrl $16,%ebx - cmpb %r10b,%bl - ja .Lgeneric - andl $4026531839,%edx - jmp .Lgeneric - -.Lintel: - cmpl $4,%r11d - movl $-1,%r10d - jb .Lnocacheinfo - - movl $4,%eax - movl $0,%ecx - cpuid - movl %eax,%r10d - shrl $14,%r10d - andl $4095,%r10d - - cmpl $7,%r11d - jb .Lnocacheinfo - - movl $7,%eax - xorl %ecx,%ecx - cpuid - movl %ebx,8(%rdi) - -.Lnocacheinfo: - movl $1,%eax - cpuid - - andl $3220176895,%edx - cmpl $0,%r9d - jne .Lnotintel - orl $1073741824,%edx -.Lnotintel: - btl $28,%edx - jnc .Lgeneric - andl $4026531839,%edx - cmpl $0,%r10d - je .Lgeneric - - orl $268435456,%edx - shrl $16,%ebx - cmpb $1,%bl - ja .Lgeneric - andl $4026531839,%edx -.Lgeneric: - andl $2048,%r9d - andl $4294965247,%ecx - orl %ecx,%r9d - - movl %edx,%r10d - btl $27,%r9d - jnc .Lclear_avx - xorl %ecx,%ecx -.byte 0x0f,0x01,0xd0 - andl $6,%eax - cmpl $6,%eax - je .Ldone -.Lclear_avx: - movl $4026525695,%eax - andl %eax,%r9d - andl $4294967263,8(%rdi) -.Ldone: - movl %r9d,4(%rdi) - movl %r10d,0(%rdi) - movq %r8,%rbx - .byte 0xf3,0xc3 -.size OPENSSL_ia32_cpuid,.-OPENSSL_ia32_cpuid - -#endif diff --git a/third_party/boringssl/linux-x86_64/crypto/md5/md5-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/md5/md5-x86_64.S deleted file mode 100644 index 7644689644b51..0000000000000 --- a/third_party/boringssl/linux-x86_64/crypto/md5/md5-x86_64.S +++ /dev/null @@ -1,671 +0,0 @@ -#if defined(__x86_64__) -.text -.align 16 - -.globl md5_block_asm_data_order -.hidden md5_block_asm_data_order -.type md5_block_asm_data_order,@function -md5_block_asm_data_order: - pushq %rbp - pushq %rbx - pushq %r12 - pushq %r14 - pushq %r15 -.Lprologue: - - - - - movq %rdi,%rbp - shlq $6,%rdx - leaq (%rsi,%rdx,1),%rdi - movl 0(%rbp),%eax - movl 4(%rbp),%ebx - movl 8(%rbp),%ecx - movl 12(%rbp),%edx - - - - - - - - cmpq %rdi,%rsi - je .Lend - - -.Lloop: - movl %eax,%r8d - movl %ebx,%r9d - movl %ecx,%r14d - movl %edx,%r15d - movl 0(%rsi),%r10d - movl %edx,%r11d - xorl %ecx,%r11d - leal -680876936(%rax,%r10,1),%eax - andl %ebx,%r11d - xorl %edx,%r11d - movl 4(%rsi),%r10d - addl %r11d,%eax - roll $7,%eax - movl %ecx,%r11d - addl %ebx,%eax - xorl %ebx,%r11d - leal -389564586(%rdx,%r10,1),%edx - andl %eax,%r11d - xorl %ecx,%r11d - movl 8(%rsi),%r10d - addl %r11d,%edx - roll $12,%edx - movl %ebx,%r11d - addl %eax,%edx - xorl %eax,%r11d - leal 606105819(%rcx,%r10,1),%ecx - andl %edx,%r11d - xorl %ebx,%r11d - movl 12(%rsi),%r10d - addl %r11d,%ecx - roll $17,%ecx - movl %eax,%r11d - addl %edx,%ecx - xorl %edx,%r11d - leal -1044525330(%rbx,%r10,1),%ebx - andl %ecx,%r11d - xorl %eax,%r11d - movl 16(%rsi),%r10d - addl %r11d,%ebx - roll $22,%ebx - movl %edx,%r11d - addl %ecx,%ebx - xorl %ecx,%r11d - leal -176418897(%rax,%r10,1),%eax - andl %ebx,%r11d - xorl %edx,%r11d - movl 20(%rsi),%r10d - addl %r11d,%eax - roll $7,%eax - movl %ecx,%r11d - addl %ebx,%eax - xorl %ebx,%r11d - leal 1200080426(%rdx,%r10,1),%edx - andl %eax,%r11d - xorl %ecx,%r11d - movl 24(%rsi),%r10d - addl %r11d,%edx - roll $12,%edx - movl %ebx,%r11d - addl %eax,%edx - xorl %eax,%r11d - leal -1473231341(%rcx,%r10,1),%ecx - andl %edx,%r11d - xorl %ebx,%r11d - movl 28(%rsi),%r10d - addl %r11d,%ecx - roll $17,%ecx - movl %eax,%r11d - addl %edx,%ecx - xorl %edx,%r11d - leal -45705983(%rbx,%r10,1),%ebx - andl %ecx,%r11d - xorl %eax,%r11d - movl 32(%rsi),%r10d - addl %r11d,%ebx - roll $22,%ebx - movl %edx,%r11d - addl %ecx,%ebx - xorl %ecx,%r11d - leal 1770035416(%rax,%r10,1),%eax - andl %ebx,%r11d - xorl %edx,%r11d - movl 36(%rsi),%r10d - addl %r11d,%eax - roll $7,%eax - movl %ecx,%r11d - addl %ebx,%eax - xorl %ebx,%r11d - leal -1958414417(%rdx,%r10,1),%edx - andl %eax,%r11d - xorl %ecx,%r11d - movl 40(%rsi),%r10d - addl %r11d,%edx - roll $12,%edx - movl %ebx,%r11d - addl %eax,%edx - xorl %eax,%r11d - leal -42063(%rcx,%r10,1),%ecx - andl %edx,%r11d - xorl %ebx,%r11d - movl 44(%rsi),%r10d - addl %r11d,%ecx - roll $17,%ecx - movl %eax,%r11d - addl %edx,%ecx - xorl %edx,%r11d - leal -1990404162(%rbx,%r10,1),%ebx - andl %ecx,%r11d - xorl %eax,%r11d - movl 48(%rsi),%r10d - addl %r11d,%ebx - roll $22,%ebx - movl %edx,%r11d - addl %ecx,%ebx - xorl %ecx,%r11d - leal 1804603682(%rax,%r10,1),%eax - andl %ebx,%r11d - xorl %edx,%r11d - movl 52(%rsi),%r10d - addl %r11d,%eax - roll $7,%eax - movl %ecx,%r11d - addl %ebx,%eax - xorl %ebx,%r11d - leal -40341101(%rdx,%r10,1),%edx - andl %eax,%r11d - xorl %ecx,%r11d - movl 56(%rsi),%r10d - addl %r11d,%edx - roll $12,%edx - movl %ebx,%r11d - addl %eax,%edx - xorl %eax,%r11d - leal -1502002290(%rcx,%r10,1),%ecx - andl %edx,%r11d - xorl %ebx,%r11d - movl 60(%rsi),%r10d - addl %r11d,%ecx - roll $17,%ecx - movl %eax,%r11d - addl %edx,%ecx - xorl %edx,%r11d - leal 1236535329(%rbx,%r10,1),%ebx - andl %ecx,%r11d - xorl %eax,%r11d - movl 0(%rsi),%r10d - addl %r11d,%ebx - roll $22,%ebx - movl %edx,%r11d - addl %ecx,%ebx - movl 4(%rsi),%r10d - movl %edx,%r11d - movl %edx,%r12d - notl %r11d - leal -165796510(%rax,%r10,1),%eax - andl %ebx,%r12d - andl %ecx,%r11d - movl 24(%rsi),%r10d - orl %r11d,%r12d - movl %ecx,%r11d - addl %r12d,%eax - movl %ecx,%r12d - roll $5,%eax - addl %ebx,%eax - notl %r11d - leal -1069501632(%rdx,%r10,1),%edx - andl %eax,%r12d - andl %ebx,%r11d - movl 44(%rsi),%r10d - orl %r11d,%r12d - movl %ebx,%r11d - addl %r12d,%edx - movl %ebx,%r12d - roll $9,%edx - addl %eax,%edx - notl %r11d - leal 643717713(%rcx,%r10,1),%ecx - andl %edx,%r12d - andl %eax,%r11d - movl 0(%rsi),%r10d - orl %r11d,%r12d - movl %eax,%r11d - addl %r12d,%ecx - movl %eax,%r12d - roll $14,%ecx - addl %edx,%ecx - notl %r11d - leal -373897302(%rbx,%r10,1),%ebx - andl %ecx,%r12d - andl %edx,%r11d - movl 20(%rsi),%r10d - orl %r11d,%r12d - movl %edx,%r11d - addl %r12d,%ebx - movl %edx,%r12d - roll $20,%ebx - addl %ecx,%ebx - notl %r11d - leal -701558691(%rax,%r10,1),%eax - andl %ebx,%r12d - andl %ecx,%r11d - movl 40(%rsi),%r10d - orl %r11d,%r12d - movl %ecx,%r11d - addl %r12d,%eax - movl %ecx,%r12d - roll $5,%eax - addl %ebx,%eax - notl %r11d - leal 38016083(%rdx,%r10,1),%edx - andl %eax,%r12d - andl %ebx,%r11d - movl 60(%rsi),%r10d - orl %r11d,%r12d - movl %ebx,%r11d - addl %r12d,%edx - movl %ebx,%r12d - roll $9,%edx - addl %eax,%edx - notl %r11d - leal -660478335(%rcx,%r10,1),%ecx - andl %edx,%r12d - andl %eax,%r11d - movl 16(%rsi),%r10d - orl %r11d,%r12d - movl %eax,%r11d - addl %r12d,%ecx - movl %eax,%r12d - roll $14,%ecx - addl %edx,%ecx - notl %r11d - leal -405537848(%rbx,%r10,1),%ebx - andl %ecx,%r12d - andl %edx,%r11d - movl 36(%rsi),%r10d - orl %r11d,%r12d - movl %edx,%r11d - addl %r12d,%ebx - movl %edx,%r12d - roll $20,%ebx - addl %ecx,%ebx - notl %r11d - leal 568446438(%rax,%r10,1),%eax - andl %ebx,%r12d - andl %ecx,%r11d - movl 56(%rsi),%r10d - orl %r11d,%r12d - movl %ecx,%r11d - addl %r12d,%eax - movl %ecx,%r12d - roll $5,%eax - addl %ebx,%eax - notl %r11d - leal -1019803690(%rdx,%r10,1),%edx - andl %eax,%r12d - andl %ebx,%r11d - movl 12(%rsi),%r10d - orl %r11d,%r12d - movl %ebx,%r11d - addl %r12d,%edx - movl %ebx,%r12d - roll $9,%edx - addl %eax,%edx - notl %r11d - leal -187363961(%rcx,%r10,1),%ecx - andl %edx,%r12d - andl %eax,%r11d - movl 32(%rsi),%r10d - orl %r11d,%r12d - movl %eax,%r11d - addl %r12d,%ecx - movl %eax,%r12d - roll $14,%ecx - addl %edx,%ecx - notl %r11d - leal 1163531501(%rbx,%r10,1),%ebx - andl %ecx,%r12d - andl %edx,%r11d - movl 52(%rsi),%r10d - orl %r11d,%r12d - movl %edx,%r11d - addl %r12d,%ebx - movl %edx,%r12d - roll $20,%ebx - addl %ecx,%ebx - notl %r11d - leal -1444681467(%rax,%r10,1),%eax - andl %ebx,%r12d - andl %ecx,%r11d - movl 8(%rsi),%r10d - orl %r11d,%r12d - movl %ecx,%r11d - addl %r12d,%eax - movl %ecx,%r12d - roll $5,%eax - addl %ebx,%eax - notl %r11d - leal -51403784(%rdx,%r10,1),%edx - andl %eax,%r12d - andl %ebx,%r11d - movl 28(%rsi),%r10d - orl %r11d,%r12d - movl %ebx,%r11d - addl %r12d,%edx - movl %ebx,%r12d - roll $9,%edx - addl %eax,%edx - notl %r11d - leal 1735328473(%rcx,%r10,1),%ecx - andl %edx,%r12d - andl %eax,%r11d - movl 48(%rsi),%r10d - orl %r11d,%r12d - movl %eax,%r11d - addl %r12d,%ecx - movl %eax,%r12d - roll $14,%ecx - addl %edx,%ecx - notl %r11d - leal -1926607734(%rbx,%r10,1),%ebx - andl %ecx,%r12d - andl %edx,%r11d - movl 0(%rsi),%r10d - orl %r11d,%r12d - movl %edx,%r11d - addl %r12d,%ebx - movl %edx,%r12d - roll $20,%ebx - addl %ecx,%ebx - movl 20(%rsi),%r10d - movl %ecx,%r11d - leal -378558(%rax,%r10,1),%eax - movl 32(%rsi),%r10d - xorl %edx,%r11d - xorl %ebx,%r11d - addl %r11d,%eax - roll $4,%eax - movl %ebx,%r11d - addl %ebx,%eax - leal -2022574463(%rdx,%r10,1),%edx - movl 44(%rsi),%r10d - xorl %ecx,%r11d - xorl %eax,%r11d - addl %r11d,%edx - roll $11,%edx - movl %eax,%r11d - addl %eax,%edx - leal 1839030562(%rcx,%r10,1),%ecx - movl 56(%rsi),%r10d - xorl %ebx,%r11d - xorl %edx,%r11d - addl %r11d,%ecx - roll $16,%ecx - movl %edx,%r11d - addl %edx,%ecx - leal -35309556(%rbx,%r10,1),%ebx - movl 4(%rsi),%r10d - xorl %eax,%r11d - xorl %ecx,%r11d - addl %r11d,%ebx - roll $23,%ebx - movl %ecx,%r11d - addl %ecx,%ebx - leal -1530992060(%rax,%r10,1),%eax - movl 16(%rsi),%r10d - xorl %edx,%r11d - xorl %ebx,%r11d - addl %r11d,%eax - roll $4,%eax - movl %ebx,%r11d - addl %ebx,%eax - leal 1272893353(%rdx,%r10,1),%edx - movl 28(%rsi),%r10d - xorl %ecx,%r11d - xorl %eax,%r11d - addl %r11d,%edx - roll $11,%edx - movl %eax,%r11d - addl %eax,%edx - leal -155497632(%rcx,%r10,1),%ecx - movl 40(%rsi),%r10d - xorl %ebx,%r11d - xorl %edx,%r11d - addl %r11d,%ecx - roll $16,%ecx - movl %edx,%r11d - addl %edx,%ecx - leal -1094730640(%rbx,%r10,1),%ebx - movl 52(%rsi),%r10d - xorl %eax,%r11d - xorl %ecx,%r11d - addl %r11d,%ebx - roll $23,%ebx - movl %ecx,%r11d - addl %ecx,%ebx - leal 681279174(%rax,%r10,1),%eax - movl 0(%rsi),%r10d - xorl %edx,%r11d - xorl %ebx,%r11d - addl %r11d,%eax - roll $4,%eax - movl %ebx,%r11d - addl %ebx,%eax - leal -358537222(%rdx,%r10,1),%edx - movl 12(%rsi),%r10d - xorl %ecx,%r11d - xorl %eax,%r11d - addl %r11d,%edx - roll $11,%edx - movl %eax,%r11d - addl %eax,%edx - leal -722521979(%rcx,%r10,1),%ecx - movl 24(%rsi),%r10d - xorl %ebx,%r11d - xorl %edx,%r11d - addl %r11d,%ecx - roll $16,%ecx - movl %edx,%r11d - addl %edx,%ecx - leal 76029189(%rbx,%r10,1),%ebx - movl 36(%rsi),%r10d - xorl %eax,%r11d - xorl %ecx,%r11d - addl %r11d,%ebx - roll $23,%ebx - movl %ecx,%r11d - addl %ecx,%ebx - leal -640364487(%rax,%r10,1),%eax - movl 48(%rsi),%r10d - xorl %edx,%r11d - xorl %ebx,%r11d - addl %r11d,%eax - roll $4,%eax - movl %ebx,%r11d - addl %ebx,%eax - leal -421815835(%rdx,%r10,1),%edx - movl 60(%rsi),%r10d - xorl %ecx,%r11d - xorl %eax,%r11d - addl %r11d,%edx - roll $11,%edx - movl %eax,%r11d - addl %eax,%edx - leal 530742520(%rcx,%r10,1),%ecx - movl 8(%rsi),%r10d - xorl %ebx,%r11d - xorl %edx,%r11d - addl %r11d,%ecx - roll $16,%ecx - movl %edx,%r11d - addl %edx,%ecx - leal -995338651(%rbx,%r10,1),%ebx - movl 0(%rsi),%r10d - xorl %eax,%r11d - xorl %ecx,%r11d - addl %r11d,%ebx - roll $23,%ebx - movl %ecx,%r11d - addl %ecx,%ebx - movl 0(%rsi),%r10d - movl $4294967295,%r11d - xorl %edx,%r11d - leal -198630844(%rax,%r10,1),%eax - orl %ebx,%r11d - xorl %ecx,%r11d - addl %r11d,%eax - movl 28(%rsi),%r10d - movl $4294967295,%r11d - roll $6,%eax - xorl %ecx,%r11d - addl %ebx,%eax - leal 1126891415(%rdx,%r10,1),%edx - orl %eax,%r11d - xorl %ebx,%r11d - addl %r11d,%edx - movl 56(%rsi),%r10d - movl $4294967295,%r11d - roll $10,%edx - xorl %ebx,%r11d - addl %eax,%edx - leal -1416354905(%rcx,%r10,1),%ecx - orl %edx,%r11d - xorl %eax,%r11d - addl %r11d,%ecx - movl 20(%rsi),%r10d - movl $4294967295,%r11d - roll $15,%ecx - xorl %eax,%r11d - addl %edx,%ecx - leal -57434055(%rbx,%r10,1),%ebx - orl %ecx,%r11d - xorl %edx,%r11d - addl %r11d,%ebx - movl 48(%rsi),%r10d - movl $4294967295,%r11d - roll $21,%ebx - xorl %edx,%r11d - addl %ecx,%ebx - leal 1700485571(%rax,%r10,1),%eax - orl %ebx,%r11d - xorl %ecx,%r11d - addl %r11d,%eax - movl 12(%rsi),%r10d - movl $4294967295,%r11d - roll $6,%eax - xorl %ecx,%r11d - addl %ebx,%eax - leal -1894986606(%rdx,%r10,1),%edx - orl %eax,%r11d - xorl %ebx,%r11d - addl %r11d,%edx - movl 40(%rsi),%r10d - movl $4294967295,%r11d - roll $10,%edx - xorl %ebx,%r11d - addl %eax,%edx - leal -1051523(%rcx,%r10,1),%ecx - orl %edx,%r11d - xorl %eax,%r11d - addl %r11d,%ecx - movl 4(%rsi),%r10d - movl $4294967295,%r11d - roll $15,%ecx - xorl %eax,%r11d - addl %edx,%ecx - leal -2054922799(%rbx,%r10,1),%ebx - orl %ecx,%r11d - xorl %edx,%r11d - addl %r11d,%ebx - movl 32(%rsi),%r10d - movl $4294967295,%r11d - roll $21,%ebx - xorl %edx,%r11d - addl %ecx,%ebx - leal 1873313359(%rax,%r10,1),%eax - orl %ebx,%r11d - xorl %ecx,%r11d - addl %r11d,%eax - movl 60(%rsi),%r10d - movl $4294967295,%r11d - roll $6,%eax - xorl %ecx,%r11d - addl %ebx,%eax - leal -30611744(%rdx,%r10,1),%edx - orl %eax,%r11d - xorl %ebx,%r11d - addl %r11d,%edx - movl 24(%rsi),%r10d - movl $4294967295,%r11d - roll $10,%edx - xorl %ebx,%r11d - addl %eax,%edx - leal -1560198380(%rcx,%r10,1),%ecx - orl %edx,%r11d - xorl %eax,%r11d - addl %r11d,%ecx - movl 52(%rsi),%r10d - movl $4294967295,%r11d - roll $15,%ecx - xorl %eax,%r11d - addl %edx,%ecx - leal 1309151649(%rbx,%r10,1),%ebx - orl %ecx,%r11d - xorl %edx,%r11d - addl %r11d,%ebx - movl 16(%rsi),%r10d - movl $4294967295,%r11d - roll $21,%ebx - xorl %edx,%r11d - addl %ecx,%ebx - leal -145523070(%rax,%r10,1),%eax - orl %ebx,%r11d - xorl %ecx,%r11d - addl %r11d,%eax - movl 44(%rsi),%r10d - movl $4294967295,%r11d - roll $6,%eax - xorl %ecx,%r11d - addl %ebx,%eax - leal -1120210379(%rdx,%r10,1),%edx - orl %eax,%r11d - xorl %ebx,%r11d - addl %r11d,%edx - movl 8(%rsi),%r10d - movl $4294967295,%r11d - roll $10,%edx - xorl %ebx,%r11d - addl %eax,%edx - leal 718787259(%rcx,%r10,1),%ecx - orl %edx,%r11d - xorl %eax,%r11d - addl %r11d,%ecx - movl 36(%rsi),%r10d - movl $4294967295,%r11d - roll $15,%ecx - xorl %eax,%r11d - addl %edx,%ecx - leal -343485551(%rbx,%r10,1),%ebx - orl %ecx,%r11d - xorl %edx,%r11d - addl %r11d,%ebx - movl 0(%rsi),%r10d - movl $4294967295,%r11d - roll $21,%ebx - xorl %edx,%r11d - addl %ecx,%ebx - - addl %r8d,%eax - addl %r9d,%ebx - addl %r14d,%ecx - addl %r15d,%edx - - - addq $64,%rsi - cmpq %rdi,%rsi - jb .Lloop - - -.Lend: - movl %eax,0(%rbp) - movl %ebx,4(%rbp) - movl %ecx,8(%rbp) - movl %edx,12(%rbp) - - movq (%rsp),%r15 - movq 8(%rsp),%r14 - movq 16(%rsp),%r12 - movq 24(%rsp),%rbx - movq 32(%rsp),%rbp - addq $40,%rsp -.Lepilogue: - .byte 0xf3,0xc3 -.size md5_block_asm_data_order,.-md5_block_asm_data_order -#endif diff --git a/third_party/boringssl/linux-x86_64/crypto/modes/aesni-gcm-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/modes/aesni-gcm-x86_64.S deleted file mode 100644 index f01692e0b1a3b..0000000000000 --- a/third_party/boringssl/linux-x86_64/crypto/modes/aesni-gcm-x86_64.S +++ /dev/null @@ -1,19 +0,0 @@ -#if defined(__x86_64__) -.text - -.globl aesni_gcm_encrypt -.hidden aesni_gcm_encrypt -.type aesni_gcm_encrypt,@function -aesni_gcm_encrypt: - xorl %eax,%eax - .byte 0xf3,0xc3 -.size aesni_gcm_encrypt,.-aesni_gcm_encrypt - -.globl aesni_gcm_decrypt -.hidden aesni_gcm_decrypt -.type aesni_gcm_decrypt,@function -aesni_gcm_decrypt: - xorl %eax,%eax - .byte 0xf3,0xc3 -.size aesni_gcm_decrypt,.-aesni_gcm_decrypt -#endif diff --git a/third_party/boringssl/linux-x86_64/crypto/modes/ghash-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/modes/ghash-x86_64.S deleted file mode 100644 index 1db7d69d4bbe4..0000000000000 --- a/third_party/boringssl/linux-x86_64/crypto/modes/ghash-x86_64.S +++ /dev/null @@ -1,1329 +0,0 @@ -#if defined(__x86_64__) -.text -.extern OPENSSL_ia32cap_P -.hidden OPENSSL_ia32cap_P - -.globl gcm_gmult_4bit -.hidden gcm_gmult_4bit -.type gcm_gmult_4bit,@function -.align 16 -gcm_gmult_4bit: - pushq %rbx - pushq %rbp - pushq %r12 -.Lgmult_prologue: - - movzbq 15(%rdi),%r8 - leaq .Lrem_4bit(%rip),%r11 - xorq %rax,%rax - xorq %rbx,%rbx - movb %r8b,%al - movb %r8b,%bl - shlb $4,%al - movq $14,%rcx - movq 8(%rsi,%rax,1),%r8 - movq (%rsi,%rax,1),%r9 - andb $240,%bl - movq %r8,%rdx - jmp .Loop1 - -.align 16 -.Loop1: - shrq $4,%r8 - andq $15,%rdx - movq %r9,%r10 - movb (%rdi,%rcx,1),%al - shrq $4,%r9 - xorq 8(%rsi,%rbx,1),%r8 - shlq $60,%r10 - xorq (%rsi,%rbx,1),%r9 - movb %al,%bl - xorq (%r11,%rdx,8),%r9 - movq %r8,%rdx - shlb $4,%al - xorq %r10,%r8 - decq %rcx - js .Lbreak1 - - shrq $4,%r8 - andq $15,%rdx - movq %r9,%r10 - shrq $4,%r9 - xorq 8(%rsi,%rax,1),%r8 - shlq $60,%r10 - xorq (%rsi,%rax,1),%r9 - andb $240,%bl - xorq (%r11,%rdx,8),%r9 - movq %r8,%rdx - xorq %r10,%r8 - jmp .Loop1 - -.align 16 -.Lbreak1: - shrq $4,%r8 - andq $15,%rdx - movq %r9,%r10 - shrq $4,%r9 - xorq 8(%rsi,%rax,1),%r8 - shlq $60,%r10 - xorq (%rsi,%rax,1),%r9 - andb $240,%bl - xorq (%r11,%rdx,8),%r9 - movq %r8,%rdx - xorq %r10,%r8 - - shrq $4,%r8 - andq $15,%rdx - movq %r9,%r10 - shrq $4,%r9 - xorq 8(%rsi,%rbx,1),%r8 - shlq $60,%r10 - xorq (%rsi,%rbx,1),%r9 - xorq %r10,%r8 - xorq (%r11,%rdx,8),%r9 - - bswapq %r8 - bswapq %r9 - movq %r8,8(%rdi) - movq %r9,(%rdi) - - movq 16(%rsp),%rbx - leaq 24(%rsp),%rsp -.Lgmult_epilogue: - .byte 0xf3,0xc3 -.size gcm_gmult_4bit,.-gcm_gmult_4bit -.globl gcm_ghash_4bit -.hidden gcm_ghash_4bit -.type gcm_ghash_4bit,@function -.align 16 -gcm_ghash_4bit: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - subq $280,%rsp -.Lghash_prologue: - movq %rdx,%r14 - movq %rcx,%r15 - subq $-128,%rsi - leaq 16+128(%rsp),%rbp - xorl %edx,%edx - movq 0+0-128(%rsi),%r8 - movq 0+8-128(%rsi),%rax - movb %al,%dl - shrq $4,%rax - movq %r8,%r10 - shrq $4,%r8 - movq 16+0-128(%rsi),%r9 - shlb $4,%dl - movq 16+8-128(%rsi),%rbx - shlq $60,%r10 - movb %dl,0(%rsp) - orq %r10,%rax - movb %bl,%dl - shrq $4,%rbx - movq %r9,%r10 - shrq $4,%r9 - movq %r8,0(%rbp) - movq 32+0-128(%rsi),%r8 - shlb $4,%dl - movq %rax,0-128(%rbp) - movq 32+8-128(%rsi),%rax - shlq $60,%r10 - movb %dl,1(%rsp) - orq %r10,%rbx - movb %al,%dl - shrq $4,%rax - movq %r8,%r10 - shrq $4,%r8 - movq %r9,8(%rbp) - movq 48+0-128(%rsi),%r9 - shlb $4,%dl - movq %rbx,8-128(%rbp) - movq 48+8-128(%rsi),%rbx - shlq $60,%r10 - movb %dl,2(%rsp) - orq %r10,%rax - movb %bl,%dl - shrq $4,%rbx - movq %r9,%r10 - shrq $4,%r9 - movq %r8,16(%rbp) - movq 64+0-128(%rsi),%r8 - shlb $4,%dl - movq %rax,16-128(%rbp) - movq 64+8-128(%rsi),%rax - shlq $60,%r10 - movb %dl,3(%rsp) - orq %r10,%rbx - movb %al,%dl - shrq $4,%rax - movq %r8,%r10 - shrq $4,%r8 - movq %r9,24(%rbp) - movq 80+0-128(%rsi),%r9 - shlb $4,%dl - movq %rbx,24-128(%rbp) - movq 80+8-128(%rsi),%rbx - shlq $60,%r10 - movb %dl,4(%rsp) - orq %r10,%rax - movb %bl,%dl - shrq $4,%rbx - movq %r9,%r10 - shrq $4,%r9 - movq %r8,32(%rbp) - movq 96+0-128(%rsi),%r8 - shlb $4,%dl - movq %rax,32-128(%rbp) - movq 96+8-128(%rsi),%rax - shlq $60,%r10 - movb %dl,5(%rsp) - orq %r10,%rbx - movb %al,%dl - shrq $4,%rax - movq %r8,%r10 - shrq $4,%r8 - movq %r9,40(%rbp) - movq 112+0-128(%rsi),%r9 - shlb $4,%dl - movq %rbx,40-128(%rbp) - movq 112+8-128(%rsi),%rbx - shlq $60,%r10 - movb %dl,6(%rsp) - orq %r10,%rax - movb %bl,%dl - shrq $4,%rbx - movq %r9,%r10 - shrq $4,%r9 - movq %r8,48(%rbp) - movq 128+0-128(%rsi),%r8 - shlb $4,%dl - movq %rax,48-128(%rbp) - movq 128+8-128(%rsi),%rax - shlq $60,%r10 - movb %dl,7(%rsp) - orq %r10,%rbx - movb %al,%dl - shrq $4,%rax - movq %r8,%r10 - shrq $4,%r8 - movq %r9,56(%rbp) - movq 144+0-128(%rsi),%r9 - shlb $4,%dl - movq %rbx,56-128(%rbp) - movq 144+8-128(%rsi),%rbx - shlq $60,%r10 - movb %dl,8(%rsp) - orq %r10,%rax - movb %bl,%dl - shrq $4,%rbx - movq %r9,%r10 - shrq $4,%r9 - movq %r8,64(%rbp) - movq 160+0-128(%rsi),%r8 - shlb $4,%dl - movq %rax,64-128(%rbp) - movq 160+8-128(%rsi),%rax - shlq $60,%r10 - movb %dl,9(%rsp) - orq %r10,%rbx - movb %al,%dl - shrq $4,%rax - movq %r8,%r10 - shrq $4,%r8 - movq %r9,72(%rbp) - movq 176+0-128(%rsi),%r9 - shlb $4,%dl - movq %rbx,72-128(%rbp) - movq 176+8-128(%rsi),%rbx - shlq $60,%r10 - movb %dl,10(%rsp) - orq %r10,%rax - movb %bl,%dl - shrq $4,%rbx - movq %r9,%r10 - shrq $4,%r9 - movq %r8,80(%rbp) - movq 192+0-128(%rsi),%r8 - shlb $4,%dl - movq %rax,80-128(%rbp) - movq 192+8-128(%rsi),%rax - shlq $60,%r10 - movb %dl,11(%rsp) - orq %r10,%rbx - movb %al,%dl - shrq $4,%rax - movq %r8,%r10 - shrq $4,%r8 - movq %r9,88(%rbp) - movq 208+0-128(%rsi),%r9 - shlb $4,%dl - movq %rbx,88-128(%rbp) - movq 208+8-128(%rsi),%rbx - shlq $60,%r10 - movb %dl,12(%rsp) - orq %r10,%rax - movb %bl,%dl - shrq $4,%rbx - movq %r9,%r10 - shrq $4,%r9 - movq %r8,96(%rbp) - movq 224+0-128(%rsi),%r8 - shlb $4,%dl - movq %rax,96-128(%rbp) - movq 224+8-128(%rsi),%rax - shlq $60,%r10 - movb %dl,13(%rsp) - orq %r10,%rbx - movb %al,%dl - shrq $4,%rax - movq %r8,%r10 - shrq $4,%r8 - movq %r9,104(%rbp) - movq 240+0-128(%rsi),%r9 - shlb $4,%dl - movq %rbx,104-128(%rbp) - movq 240+8-128(%rsi),%rbx - shlq $60,%r10 - movb %dl,14(%rsp) - orq %r10,%rax - movb %bl,%dl - shrq $4,%rbx - movq %r9,%r10 - shrq $4,%r9 - movq %r8,112(%rbp) - shlb $4,%dl - movq %rax,112-128(%rbp) - shlq $60,%r10 - movb %dl,15(%rsp) - orq %r10,%rbx - movq %r9,120(%rbp) - movq %rbx,120-128(%rbp) - addq $-128,%rsi - movq 8(%rdi),%r8 - movq 0(%rdi),%r9 - addq %r14,%r15 - leaq .Lrem_8bit(%rip),%r11 - jmp .Louter_loop -.align 16 -.Louter_loop: - xorq (%r14),%r9 - movq 8(%r14),%rdx - leaq 16(%r14),%r14 - xorq %r8,%rdx - movq %r9,(%rdi) - movq %rdx,8(%rdi) - shrq $32,%rdx - xorq %rax,%rax - roll $8,%edx - movb %dl,%al - movzbl %dl,%ebx - shlb $4,%al - shrl $4,%ebx - roll $8,%edx - movq 8(%rsi,%rax,1),%r8 - movq (%rsi,%rax,1),%r9 - movb %dl,%al - movzbl %dl,%ecx - shlb $4,%al - movzbq (%rsp,%rbx,1),%r12 - shrl $4,%ecx - xorq %r8,%r12 - movq %r9,%r10 - shrq $8,%r8 - movzbq %r12b,%r12 - shrq $8,%r9 - xorq -128(%rbp,%rbx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rbx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r12,2),%r12 - movzbl %dl,%ebx - shlb $4,%al - movzbq (%rsp,%rcx,1),%r13 - shrl $4,%ebx - shlq $48,%r12 - xorq %r8,%r13 - movq %r9,%r10 - xorq %r12,%r9 - shrq $8,%r8 - movzbq %r13b,%r13 - shrq $8,%r9 - xorq -128(%rbp,%rcx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rcx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r13,2),%r13 - movzbl %dl,%ecx - shlb $4,%al - movzbq (%rsp,%rbx,1),%r12 - shrl $4,%ecx - shlq $48,%r13 - xorq %r8,%r12 - movq %r9,%r10 - xorq %r13,%r9 - shrq $8,%r8 - movzbq %r12b,%r12 - movl 8(%rdi),%edx - shrq $8,%r9 - xorq -128(%rbp,%rbx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rbx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r12,2),%r12 - movzbl %dl,%ebx - shlb $4,%al - movzbq (%rsp,%rcx,1),%r13 - shrl $4,%ebx - shlq $48,%r12 - xorq %r8,%r13 - movq %r9,%r10 - xorq %r12,%r9 - shrq $8,%r8 - movzbq %r13b,%r13 - shrq $8,%r9 - xorq -128(%rbp,%rcx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rcx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r13,2),%r13 - movzbl %dl,%ecx - shlb $4,%al - movzbq (%rsp,%rbx,1),%r12 - shrl $4,%ecx - shlq $48,%r13 - xorq %r8,%r12 - movq %r9,%r10 - xorq %r13,%r9 - shrq $8,%r8 - movzbq %r12b,%r12 - shrq $8,%r9 - xorq -128(%rbp,%rbx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rbx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r12,2),%r12 - movzbl %dl,%ebx - shlb $4,%al - movzbq (%rsp,%rcx,1),%r13 - shrl $4,%ebx - shlq $48,%r12 - xorq %r8,%r13 - movq %r9,%r10 - xorq %r12,%r9 - shrq $8,%r8 - movzbq %r13b,%r13 - shrq $8,%r9 - xorq -128(%rbp,%rcx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rcx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r13,2),%r13 - movzbl %dl,%ecx - shlb $4,%al - movzbq (%rsp,%rbx,1),%r12 - shrl $4,%ecx - shlq $48,%r13 - xorq %r8,%r12 - movq %r9,%r10 - xorq %r13,%r9 - shrq $8,%r8 - movzbq %r12b,%r12 - movl 4(%rdi),%edx - shrq $8,%r9 - xorq -128(%rbp,%rbx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rbx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r12,2),%r12 - movzbl %dl,%ebx - shlb $4,%al - movzbq (%rsp,%rcx,1),%r13 - shrl $4,%ebx - shlq $48,%r12 - xorq %r8,%r13 - movq %r9,%r10 - xorq %r12,%r9 - shrq $8,%r8 - movzbq %r13b,%r13 - shrq $8,%r9 - xorq -128(%rbp,%rcx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rcx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r13,2),%r13 - movzbl %dl,%ecx - shlb $4,%al - movzbq (%rsp,%rbx,1),%r12 - shrl $4,%ecx - shlq $48,%r13 - xorq %r8,%r12 - movq %r9,%r10 - xorq %r13,%r9 - shrq $8,%r8 - movzbq %r12b,%r12 - shrq $8,%r9 - xorq -128(%rbp,%rbx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rbx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r12,2),%r12 - movzbl %dl,%ebx - shlb $4,%al - movzbq (%rsp,%rcx,1),%r13 - shrl $4,%ebx - shlq $48,%r12 - xorq %r8,%r13 - movq %r9,%r10 - xorq %r12,%r9 - shrq $8,%r8 - movzbq %r13b,%r13 - shrq $8,%r9 - xorq -128(%rbp,%rcx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rcx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r13,2),%r13 - movzbl %dl,%ecx - shlb $4,%al - movzbq (%rsp,%rbx,1),%r12 - shrl $4,%ecx - shlq $48,%r13 - xorq %r8,%r12 - movq %r9,%r10 - xorq %r13,%r9 - shrq $8,%r8 - movzbq %r12b,%r12 - movl 0(%rdi),%edx - shrq $8,%r9 - xorq -128(%rbp,%rbx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rbx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r12,2),%r12 - movzbl %dl,%ebx - shlb $4,%al - movzbq (%rsp,%rcx,1),%r13 - shrl $4,%ebx - shlq $48,%r12 - xorq %r8,%r13 - movq %r9,%r10 - xorq %r12,%r9 - shrq $8,%r8 - movzbq %r13b,%r13 - shrq $8,%r9 - xorq -128(%rbp,%rcx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rcx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r13,2),%r13 - movzbl %dl,%ecx - shlb $4,%al - movzbq (%rsp,%rbx,1),%r12 - shrl $4,%ecx - shlq $48,%r13 - xorq %r8,%r12 - movq %r9,%r10 - xorq %r13,%r9 - shrq $8,%r8 - movzbq %r12b,%r12 - shrq $8,%r9 - xorq -128(%rbp,%rbx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rbx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r12,2),%r12 - movzbl %dl,%ebx - shlb $4,%al - movzbq (%rsp,%rcx,1),%r13 - shrl $4,%ebx - shlq $48,%r12 - xorq %r8,%r13 - movq %r9,%r10 - xorq %r12,%r9 - shrq $8,%r8 - movzbq %r13b,%r13 - shrq $8,%r9 - xorq -128(%rbp,%rcx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rcx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r13,2),%r13 - movzbl %dl,%ecx - shlb $4,%al - movzbq (%rsp,%rbx,1),%r12 - andl $240,%ecx - shlq $48,%r13 - xorq %r8,%r12 - movq %r9,%r10 - xorq %r13,%r9 - shrq $8,%r8 - movzbq %r12b,%r12 - movl -4(%rdi),%edx - shrq $8,%r9 - xorq -128(%rbp,%rbx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rbx,8),%r9 - movzwq (%r11,%r12,2),%r12 - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - shlq $48,%r12 - xorq %r10,%r8 - xorq %r12,%r9 - movzbq %r8b,%r13 - shrq $4,%r8 - movq %r9,%r10 - shlb $4,%r13b - shrq $4,%r9 - xorq 8(%rsi,%rcx,1),%r8 - movzwq (%r11,%r13,2),%r13 - shlq $60,%r10 - xorq (%rsi,%rcx,1),%r9 - xorq %r10,%r8 - shlq $48,%r13 - bswapq %r8 - xorq %r13,%r9 - bswapq %r9 - cmpq %r15,%r14 - jb .Louter_loop - movq %r8,8(%rdi) - movq %r9,(%rdi) - - leaq 280(%rsp),%rsi - movq 0(%rsi),%r15 - movq 8(%rsi),%r14 - movq 16(%rsi),%r13 - movq 24(%rsi),%r12 - movq 32(%rsi),%rbp - movq 40(%rsi),%rbx - leaq 48(%rsi),%rsp -.Lghash_epilogue: - .byte 0xf3,0xc3 -.size gcm_ghash_4bit,.-gcm_ghash_4bit -.globl gcm_init_clmul -.hidden gcm_init_clmul -.type gcm_init_clmul,@function -.align 16 -gcm_init_clmul: -.L_init_clmul: - movdqu (%rsi),%xmm2 - pshufd $78,%xmm2,%xmm2 - - - pshufd $255,%xmm2,%xmm4 - movdqa %xmm2,%xmm3 - psllq $1,%xmm2 - pxor %xmm5,%xmm5 - psrlq $63,%xmm3 - pcmpgtd %xmm4,%xmm5 - pslldq $8,%xmm3 - por %xmm3,%xmm2 - - - pand .L0x1c2_polynomial(%rip),%xmm5 - pxor %xmm5,%xmm2 - - - pshufd $78,%xmm2,%xmm6 - movdqa %xmm2,%xmm0 - pxor %xmm2,%xmm6 - movdqa %xmm0,%xmm1 - pshufd $78,%xmm0,%xmm3 - pxor %xmm0,%xmm3 -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,222,0 - pxor %xmm0,%xmm3 - pxor %xmm1,%xmm3 - - movdqa %xmm3,%xmm4 - psrldq $8,%xmm3 - pslldq $8,%xmm4 - pxor %xmm3,%xmm1 - pxor %xmm4,%xmm0 - - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - - - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 - pshufd $78,%xmm2,%xmm3 - pshufd $78,%xmm0,%xmm4 - pxor %xmm2,%xmm3 - movdqu %xmm2,0(%rdi) - pxor %xmm0,%xmm4 - movdqu %xmm0,16(%rdi) -.byte 102,15,58,15,227,8 - movdqu %xmm4,32(%rdi) - movdqa %xmm0,%xmm1 - pshufd $78,%xmm0,%xmm3 - pxor %xmm0,%xmm3 -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,222,0 - pxor %xmm0,%xmm3 - pxor %xmm1,%xmm3 - - movdqa %xmm3,%xmm4 - psrldq $8,%xmm3 - pslldq $8,%xmm4 - pxor %xmm3,%xmm1 - pxor %xmm4,%xmm0 - - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - - - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 - movdqa %xmm0,%xmm5 - movdqa %xmm0,%xmm1 - pshufd $78,%xmm0,%xmm3 - pxor %xmm0,%xmm3 -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,222,0 - pxor %xmm0,%xmm3 - pxor %xmm1,%xmm3 - - movdqa %xmm3,%xmm4 - psrldq $8,%xmm3 - pslldq $8,%xmm4 - pxor %xmm3,%xmm1 - pxor %xmm4,%xmm0 - - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - - - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 - pshufd $78,%xmm5,%xmm3 - pshufd $78,%xmm0,%xmm4 - pxor %xmm5,%xmm3 - movdqu %xmm5,48(%rdi) - pxor %xmm0,%xmm4 - movdqu %xmm0,64(%rdi) -.byte 102,15,58,15,227,8 - movdqu %xmm4,80(%rdi) - .byte 0xf3,0xc3 -.size gcm_init_clmul,.-gcm_init_clmul -.globl gcm_gmult_clmul -.hidden gcm_gmult_clmul -.type gcm_gmult_clmul,@function -.align 16 -gcm_gmult_clmul: -.L_gmult_clmul: - movdqu (%rdi),%xmm0 - movdqa .Lbswap_mask(%rip),%xmm5 - movdqu (%rsi),%xmm2 - movdqu 32(%rsi),%xmm4 -.byte 102,15,56,0,197 - movdqa %xmm0,%xmm1 - pshufd $78,%xmm0,%xmm3 - pxor %xmm0,%xmm3 -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,220,0 - pxor %xmm0,%xmm3 - pxor %xmm1,%xmm3 - - movdqa %xmm3,%xmm4 - psrldq $8,%xmm3 - pslldq $8,%xmm4 - pxor %xmm3,%xmm1 - pxor %xmm4,%xmm0 - - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - - - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 -.byte 102,15,56,0,197 - movdqu %xmm0,(%rdi) - .byte 0xf3,0xc3 -.size gcm_gmult_clmul,.-gcm_gmult_clmul -.globl gcm_ghash_clmul -.hidden gcm_ghash_clmul -.type gcm_ghash_clmul,@function -.align 32 -gcm_ghash_clmul: -.L_ghash_clmul: - movdqa .Lbswap_mask(%rip),%xmm10 - - movdqu (%rdi),%xmm0 - movdqu (%rsi),%xmm2 - movdqu 32(%rsi),%xmm7 -.byte 102,65,15,56,0,194 - - subq $16,%rcx - jz .Lodd_tail - - movdqu 16(%rsi),%xmm6 - movl OPENSSL_ia32cap_P+4(%rip),%eax - cmpq $48,%rcx - jb .Lskip4x - - andl $71303168,%eax - cmpl $4194304,%eax - je .Lskip4x - - subq $48,%rcx - movq $11547335547999543296,%rax - movdqu 48(%rsi),%xmm14 - movdqu 64(%rsi),%xmm15 - - - - - movdqu 48(%rdx),%xmm3 - movdqu 32(%rdx),%xmm11 -.byte 102,65,15,56,0,218 -.byte 102,69,15,56,0,218 - movdqa %xmm3,%xmm5 - pshufd $78,%xmm3,%xmm4 - pxor %xmm3,%xmm4 -.byte 102,15,58,68,218,0 -.byte 102,15,58,68,234,17 -.byte 102,15,58,68,231,0 - - movdqa %xmm11,%xmm13 - pshufd $78,%xmm11,%xmm12 - pxor %xmm11,%xmm12 -.byte 102,68,15,58,68,222,0 -.byte 102,68,15,58,68,238,17 -.byte 102,68,15,58,68,231,16 - xorps %xmm11,%xmm3 - xorps %xmm13,%xmm5 - movups 80(%rsi),%xmm7 - xorps %xmm12,%xmm4 - - movdqu 16(%rdx),%xmm11 - movdqu 0(%rdx),%xmm8 -.byte 102,69,15,56,0,218 -.byte 102,69,15,56,0,194 - movdqa %xmm11,%xmm13 - pshufd $78,%xmm11,%xmm12 - pxor %xmm8,%xmm0 - pxor %xmm11,%xmm12 -.byte 102,69,15,58,68,222,0 - movdqa %xmm0,%xmm1 - pshufd $78,%xmm0,%xmm8 - pxor %xmm0,%xmm8 -.byte 102,69,15,58,68,238,17 -.byte 102,68,15,58,68,231,0 - xorps %xmm11,%xmm3 - xorps %xmm13,%xmm5 - - leaq 64(%rdx),%rdx - subq $64,%rcx - jc .Ltail4x - - jmp .Lmod4_loop -.align 32 -.Lmod4_loop: -.byte 102,65,15,58,68,199,0 - xorps %xmm12,%xmm4 - movdqu 48(%rdx),%xmm11 -.byte 102,69,15,56,0,218 -.byte 102,65,15,58,68,207,17 - xorps %xmm3,%xmm0 - movdqu 32(%rdx),%xmm3 - movdqa %xmm11,%xmm13 -.byte 102,68,15,58,68,199,16 - pshufd $78,%xmm11,%xmm12 - xorps %xmm5,%xmm1 - pxor %xmm11,%xmm12 -.byte 102,65,15,56,0,218 - movups 32(%rsi),%xmm7 - xorps %xmm4,%xmm8 -.byte 102,68,15,58,68,218,0 - pshufd $78,%xmm3,%xmm4 - - pxor %xmm0,%xmm8 - movdqa %xmm3,%xmm5 - pxor %xmm1,%xmm8 - pxor %xmm3,%xmm4 - movdqa %xmm8,%xmm9 -.byte 102,68,15,58,68,234,17 - pslldq $8,%xmm8 - psrldq $8,%xmm9 - pxor %xmm8,%xmm0 - movdqa .L7_mask(%rip),%xmm8 - pxor %xmm9,%xmm1 -.byte 102,76,15,110,200 - - pand %xmm0,%xmm8 -.byte 102,69,15,56,0,200 - pxor %xmm0,%xmm9 -.byte 102,68,15,58,68,231,0 - psllq $57,%xmm9 - movdqa %xmm9,%xmm8 - pslldq $8,%xmm9 -.byte 102,15,58,68,222,0 - psrldq $8,%xmm8 - pxor %xmm9,%xmm0 - pxor %xmm8,%xmm1 - movdqu 0(%rdx),%xmm8 - - movdqa %xmm0,%xmm9 - psrlq $1,%xmm0 -.byte 102,15,58,68,238,17 - xorps %xmm11,%xmm3 - movdqu 16(%rdx),%xmm11 -.byte 102,69,15,56,0,218 -.byte 102,15,58,68,231,16 - xorps %xmm13,%xmm5 - movups 80(%rsi),%xmm7 -.byte 102,69,15,56,0,194 - pxor %xmm9,%xmm1 - pxor %xmm0,%xmm9 - psrlq $5,%xmm0 - - movdqa %xmm11,%xmm13 - pxor %xmm12,%xmm4 - pshufd $78,%xmm11,%xmm12 - pxor %xmm9,%xmm0 - pxor %xmm8,%xmm1 - pxor %xmm11,%xmm12 -.byte 102,69,15,58,68,222,0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 - movdqa %xmm0,%xmm1 -.byte 102,69,15,58,68,238,17 - xorps %xmm11,%xmm3 - pshufd $78,%xmm0,%xmm8 - pxor %xmm0,%xmm8 - -.byte 102,68,15,58,68,231,0 - xorps %xmm13,%xmm5 - - leaq 64(%rdx),%rdx - subq $64,%rcx - jnc .Lmod4_loop - -.Ltail4x: -.byte 102,65,15,58,68,199,0 -.byte 102,65,15,58,68,207,17 -.byte 102,68,15,58,68,199,16 - xorps %xmm12,%xmm4 - xorps %xmm3,%xmm0 - xorps %xmm5,%xmm1 - pxor %xmm0,%xmm1 - pxor %xmm4,%xmm8 - - pxor %xmm1,%xmm8 - pxor %xmm0,%xmm1 - - movdqa %xmm8,%xmm9 - psrldq $8,%xmm8 - pslldq $8,%xmm9 - pxor %xmm8,%xmm1 - pxor %xmm9,%xmm0 - - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - - - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 - addq $64,%rcx - jz .Ldone - movdqu 32(%rsi),%xmm7 - subq $16,%rcx - jz .Lodd_tail -.Lskip4x: - - - - - - movdqu (%rdx),%xmm8 - movdqu 16(%rdx),%xmm3 -.byte 102,69,15,56,0,194 -.byte 102,65,15,56,0,218 - pxor %xmm8,%xmm0 - - movdqa %xmm3,%xmm5 - pshufd $78,%xmm3,%xmm4 - pxor %xmm3,%xmm4 -.byte 102,15,58,68,218,0 -.byte 102,15,58,68,234,17 -.byte 102,15,58,68,231,0 - - leaq 32(%rdx),%rdx - nop - subq $32,%rcx - jbe .Leven_tail - nop - jmp .Lmod_loop - -.align 32 -.Lmod_loop: - movdqa %xmm0,%xmm1 - movdqa %xmm4,%xmm8 - pshufd $78,%xmm0,%xmm4 - pxor %xmm0,%xmm4 - -.byte 102,15,58,68,198,0 -.byte 102,15,58,68,206,17 -.byte 102,15,58,68,231,16 - - pxor %xmm3,%xmm0 - pxor %xmm5,%xmm1 - movdqu (%rdx),%xmm9 - pxor %xmm0,%xmm8 -.byte 102,69,15,56,0,202 - movdqu 16(%rdx),%xmm3 - - pxor %xmm1,%xmm8 - pxor %xmm9,%xmm1 - pxor %xmm8,%xmm4 -.byte 102,65,15,56,0,218 - movdqa %xmm4,%xmm8 - psrldq $8,%xmm8 - pslldq $8,%xmm4 - pxor %xmm8,%xmm1 - pxor %xmm4,%xmm0 - - movdqa %xmm3,%xmm5 - - movdqa %xmm0,%xmm9 - movdqa %xmm0,%xmm8 - psllq $5,%xmm0 - pxor %xmm0,%xmm8 -.byte 102,15,58,68,218,0 - psllq $1,%xmm0 - pxor %xmm8,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm8 - pslldq $8,%xmm0 - psrldq $8,%xmm8 - pxor %xmm9,%xmm0 - pshufd $78,%xmm5,%xmm4 - pxor %xmm8,%xmm1 - pxor %xmm5,%xmm4 - - movdqa %xmm0,%xmm9 - psrlq $1,%xmm0 -.byte 102,15,58,68,234,17 - pxor %xmm9,%xmm1 - pxor %xmm0,%xmm9 - psrlq $5,%xmm0 - pxor %xmm9,%xmm0 - leaq 32(%rdx),%rdx - psrlq $1,%xmm0 -.byte 102,15,58,68,231,0 - pxor %xmm1,%xmm0 - - subq $32,%rcx - ja .Lmod_loop - -.Leven_tail: - movdqa %xmm0,%xmm1 - movdqa %xmm4,%xmm8 - pshufd $78,%xmm0,%xmm4 - pxor %xmm0,%xmm4 - -.byte 102,15,58,68,198,0 -.byte 102,15,58,68,206,17 -.byte 102,15,58,68,231,16 - - pxor %xmm3,%xmm0 - pxor %xmm5,%xmm1 - pxor %xmm0,%xmm8 - pxor %xmm1,%xmm8 - pxor %xmm8,%xmm4 - movdqa %xmm4,%xmm8 - psrldq $8,%xmm8 - pslldq $8,%xmm4 - pxor %xmm8,%xmm1 - pxor %xmm4,%xmm0 - - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - - - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 - testq %rcx,%rcx - jnz .Ldone - -.Lodd_tail: - movdqu (%rdx),%xmm8 -.byte 102,69,15,56,0,194 - pxor %xmm8,%xmm0 - movdqa %xmm0,%xmm1 - pshufd $78,%xmm0,%xmm3 - pxor %xmm0,%xmm3 -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,223,0 - pxor %xmm0,%xmm3 - pxor %xmm1,%xmm3 - - movdqa %xmm3,%xmm4 - psrldq $8,%xmm3 - pslldq $8,%xmm4 - pxor %xmm3,%xmm1 - pxor %xmm4,%xmm0 - - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - - - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 -.Ldone: -.byte 102,65,15,56,0,194 - movdqu %xmm0,(%rdi) - .byte 0xf3,0xc3 -.size gcm_ghash_clmul,.-gcm_ghash_clmul -.globl gcm_init_avx -.hidden gcm_init_avx -.type gcm_init_avx,@function -.align 32 -gcm_init_avx: - jmp .L_init_clmul -.size gcm_init_avx,.-gcm_init_avx -.globl gcm_gmult_avx -.hidden gcm_gmult_avx -.type gcm_gmult_avx,@function -.align 32 -gcm_gmult_avx: - jmp .L_gmult_clmul -.size gcm_gmult_avx,.-gcm_gmult_avx -.globl gcm_ghash_avx -.hidden gcm_ghash_avx -.type gcm_ghash_avx,@function -.align 32 -gcm_ghash_avx: - jmp .L_ghash_clmul -.size gcm_ghash_avx,.-gcm_ghash_avx -.align 64 -.Lbswap_mask: -.byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -.L0x1c2_polynomial: -.byte 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc2 -.L7_mask: -.long 7,0,7,0 -.L7_mask_poly: -.long 7,0,450,0 -.align 64 -.type .Lrem_4bit,@object -.Lrem_4bit: -.long 0,0,0,471859200,0,943718400,0,610271232 -.long 0,1887436800,0,1822425088,0,1220542464,0,1423966208 -.long 0,3774873600,0,4246732800,0,3644850176,0,3311403008 -.long 0,2441084928,0,2376073216,0,2847932416,0,3051356160 -.type .Lrem_8bit,@object -.Lrem_8bit: -.value 0x0000,0x01C2,0x0384,0x0246,0x0708,0x06CA,0x048C,0x054E -.value 0x0E10,0x0FD2,0x0D94,0x0C56,0x0918,0x08DA,0x0A9C,0x0B5E -.value 0x1C20,0x1DE2,0x1FA4,0x1E66,0x1B28,0x1AEA,0x18AC,0x196E -.value 0x1230,0x13F2,0x11B4,0x1076,0x1538,0x14FA,0x16BC,0x177E -.value 0x3840,0x3982,0x3BC4,0x3A06,0x3F48,0x3E8A,0x3CCC,0x3D0E -.value 0x3650,0x3792,0x35D4,0x3416,0x3158,0x309A,0x32DC,0x331E -.value 0x2460,0x25A2,0x27E4,0x2626,0x2368,0x22AA,0x20EC,0x212E -.value 0x2A70,0x2BB2,0x29F4,0x2836,0x2D78,0x2CBA,0x2EFC,0x2F3E -.value 0x7080,0x7142,0x7304,0x72C6,0x7788,0x764A,0x740C,0x75CE -.value 0x7E90,0x7F52,0x7D14,0x7CD6,0x7998,0x785A,0x7A1C,0x7BDE -.value 0x6CA0,0x6D62,0x6F24,0x6EE6,0x6BA8,0x6A6A,0x682C,0x69EE -.value 0x62B0,0x6372,0x6134,0x60F6,0x65B8,0x647A,0x663C,0x67FE -.value 0x48C0,0x4902,0x4B44,0x4A86,0x4FC8,0x4E0A,0x4C4C,0x4D8E -.value 0x46D0,0x4712,0x4554,0x4496,0x41D8,0x401A,0x425C,0x439E -.value 0x54E0,0x5522,0x5764,0x56A6,0x53E8,0x522A,0x506C,0x51AE -.value 0x5AF0,0x5B32,0x5974,0x58B6,0x5DF8,0x5C3A,0x5E7C,0x5FBE -.value 0xE100,0xE0C2,0xE284,0xE346,0xE608,0xE7CA,0xE58C,0xE44E -.value 0xEF10,0xEED2,0xEC94,0xED56,0xE818,0xE9DA,0xEB9C,0xEA5E -.value 0xFD20,0xFCE2,0xFEA4,0xFF66,0xFA28,0xFBEA,0xF9AC,0xF86E -.value 0xF330,0xF2F2,0xF0B4,0xF176,0xF438,0xF5FA,0xF7BC,0xF67E -.value 0xD940,0xD882,0xDAC4,0xDB06,0xDE48,0xDF8A,0xDDCC,0xDC0E -.value 0xD750,0xD692,0xD4D4,0xD516,0xD058,0xD19A,0xD3DC,0xD21E -.value 0xC560,0xC4A2,0xC6E4,0xC726,0xC268,0xC3AA,0xC1EC,0xC02E -.value 0xCB70,0xCAB2,0xC8F4,0xC936,0xCC78,0xCDBA,0xCFFC,0xCE3E -.value 0x9180,0x9042,0x9204,0x93C6,0x9688,0x974A,0x950C,0x94CE -.value 0x9F90,0x9E52,0x9C14,0x9DD6,0x9898,0x995A,0x9B1C,0x9ADE -.value 0x8DA0,0x8C62,0x8E24,0x8FE6,0x8AA8,0x8B6A,0x892C,0x88EE -.value 0x83B0,0x8272,0x8034,0x81F6,0x84B8,0x857A,0x873C,0x86FE -.value 0xA9C0,0xA802,0xAA44,0xAB86,0xAEC8,0xAF0A,0xAD4C,0xAC8E -.value 0xA7D0,0xA612,0xA454,0xA596,0xA0D8,0xA11A,0xA35C,0xA29E -.value 0xB5E0,0xB422,0xB664,0xB7A6,0xB2E8,0xB32A,0xB16C,0xB0AE -.value 0xBBF0,0xBA32,0xB874,0xB9B6,0xBCF8,0xBD3A,0xBF7C,0xBEBE - -.byte 71,72,65,83,72,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 64 -#endif diff --git a/third_party/boringssl/linux-x86_64/crypto/rand/rdrand-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/rand/rdrand-x86_64.S deleted file mode 100644 index 94aab9c19b7ef..0000000000000 --- a/third_party/boringssl/linux-x86_64/crypto/rand/rdrand-x86_64.S +++ /dev/null @@ -1,48 +0,0 @@ -#if defined(__x86_64__) -.text - - - - -.globl CRYPTO_rdrand -.hidden CRYPTO_rdrand -.type CRYPTO_rdrand,@function -.align 16 -CRYPTO_rdrand: - xorq %rax,%rax - - -.byte 0x48, 0x0f, 0xc7, 0xf1 - - adcq %rax,%rax - movq %rcx,0(%rdi) - .byte 0xf3,0xc3 - - - - - -.globl CRYPTO_rdrand_multiple8_buf -.hidden CRYPTO_rdrand_multiple8_buf -.type CRYPTO_rdrand_multiple8_buf,@function -.align 16 -CRYPTO_rdrand_multiple8_buf: - testq %rsi,%rsi - jz .Lout - movq $8,%rdx -.Lloop: - - -.byte 0x48, 0x0f, 0xc7, 0xf1 - jnc .Lerr - movq %rcx,0(%rdi) - addq %rdx,%rdi - subq %rdx,%rsi - jnz .Lloop -.Lout: - movq $1,%rax - .byte 0xf3,0xc3 -.Lerr: - xorq %rax,%rax - .byte 0xf3,0xc3 -#endif diff --git a/third_party/boringssl/linux-x86_64/crypto/rc4/rc4-md5-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/rc4/rc4-md5-x86_64.S deleted file mode 100644 index 06c8d672ab1a6..0000000000000 --- a/third_party/boringssl/linux-x86_64/crypto/rc4/rc4-md5-x86_64.S +++ /dev/null @@ -1,1262 +0,0 @@ -#if defined(__x86_64__) -.text -.align 16 - -.globl rc4_md5_enc -.hidden rc4_md5_enc -.type rc4_md5_enc,@function -rc4_md5_enc: - cmpq $0,%r9 - je .Labort - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - subq $40,%rsp -.Lbody: - movq %rcx,%r11 - movq %r9,%r12 - movq %rsi,%r13 - movq %rdx,%r14 - movq %r8,%r15 - xorq %rbp,%rbp - xorq %rcx,%rcx - - leaq 8(%rdi),%rdi - movb -8(%rdi),%bpl - movb -4(%rdi),%cl - - incb %bpl - subq %r13,%r14 - movl (%rdi,%rbp,4),%eax - addb %al,%cl - leaq (%rdi,%rbp,4),%rsi - shlq $6,%r12 - addq %r15,%r12 - movq %r12,16(%rsp) - - movq %r11,24(%rsp) - movl 0(%r11),%r8d - movl 4(%r11),%r9d - movl 8(%r11),%r10d - movl 12(%r11),%r11d - jmp .Loop - -.align 16 -.Loop: - movl %r8d,0(%rsp) - movl %r9d,4(%rsp) - movl %r10d,8(%rsp) - movl %r11d,%r12d - movl %r11d,12(%rsp) - pxor %xmm0,%xmm0 - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r9d,%r12d - addl 0(%r15),%r8d - addb %dl,%al - movl 4(%rsi),%ebx - addl $3614090360,%r8d - xorl %r11d,%r12d - movzbl %al,%eax - movl %edx,0(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $7,%r8d - movl %r10d,%r12d - movd (%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - pxor %xmm1,%xmm1 - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r8d,%r12d - addl 4(%r15),%r11d - addb %dl,%bl - movl 8(%rsi),%eax - addl $3905402710,%r11d - xorl %r10d,%r12d - movzbl %bl,%ebx - movl %edx,4(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $12,%r11d - movl %r9d,%r12d - movd (%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r11d,%r12d - addl 8(%r15),%r10d - addb %dl,%al - movl 12(%rsi),%ebx - addl $606105819,%r10d - xorl %r9d,%r12d - movzbl %al,%eax - movl %edx,8(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $17,%r10d - movl %r8d,%r12d - pinsrw $1,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r10d,%r12d - addl 12(%r15),%r9d - addb %dl,%bl - movl 16(%rsi),%eax - addl $3250441966,%r9d - xorl %r8d,%r12d - movzbl %bl,%ebx - movl %edx,12(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $22,%r9d - movl %r11d,%r12d - pinsrw $1,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r9d,%r12d - addl 16(%r15),%r8d - addb %dl,%al - movl 20(%rsi),%ebx - addl $4118548399,%r8d - xorl %r11d,%r12d - movzbl %al,%eax - movl %edx,16(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $7,%r8d - movl %r10d,%r12d - pinsrw $2,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r8d,%r12d - addl 20(%r15),%r11d - addb %dl,%bl - movl 24(%rsi),%eax - addl $1200080426,%r11d - xorl %r10d,%r12d - movzbl %bl,%ebx - movl %edx,20(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $12,%r11d - movl %r9d,%r12d - pinsrw $2,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r11d,%r12d - addl 24(%r15),%r10d - addb %dl,%al - movl 28(%rsi),%ebx - addl $2821735955,%r10d - xorl %r9d,%r12d - movzbl %al,%eax - movl %edx,24(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $17,%r10d - movl %r8d,%r12d - pinsrw $3,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r10d,%r12d - addl 28(%r15),%r9d - addb %dl,%bl - movl 32(%rsi),%eax - addl $4249261313,%r9d - xorl %r8d,%r12d - movzbl %bl,%ebx - movl %edx,28(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $22,%r9d - movl %r11d,%r12d - pinsrw $3,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r9d,%r12d - addl 32(%r15),%r8d - addb %dl,%al - movl 36(%rsi),%ebx - addl $1770035416,%r8d - xorl %r11d,%r12d - movzbl %al,%eax - movl %edx,32(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $7,%r8d - movl %r10d,%r12d - pinsrw $4,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r8d,%r12d - addl 36(%r15),%r11d - addb %dl,%bl - movl 40(%rsi),%eax - addl $2336552879,%r11d - xorl %r10d,%r12d - movzbl %bl,%ebx - movl %edx,36(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $12,%r11d - movl %r9d,%r12d - pinsrw $4,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r11d,%r12d - addl 40(%r15),%r10d - addb %dl,%al - movl 44(%rsi),%ebx - addl $4294925233,%r10d - xorl %r9d,%r12d - movzbl %al,%eax - movl %edx,40(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $17,%r10d - movl %r8d,%r12d - pinsrw $5,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r10d,%r12d - addl 44(%r15),%r9d - addb %dl,%bl - movl 48(%rsi),%eax - addl $2304563134,%r9d - xorl %r8d,%r12d - movzbl %bl,%ebx - movl %edx,44(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $22,%r9d - movl %r11d,%r12d - pinsrw $5,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r9d,%r12d - addl 48(%r15),%r8d - addb %dl,%al - movl 52(%rsi),%ebx - addl $1804603682,%r8d - xorl %r11d,%r12d - movzbl %al,%eax - movl %edx,48(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $7,%r8d - movl %r10d,%r12d - pinsrw $6,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r8d,%r12d - addl 52(%r15),%r11d - addb %dl,%bl - movl 56(%rsi),%eax - addl $4254626195,%r11d - xorl %r10d,%r12d - movzbl %bl,%ebx - movl %edx,52(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $12,%r11d - movl %r9d,%r12d - pinsrw $6,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r11d,%r12d - addl 56(%r15),%r10d - addb %dl,%al - movl 60(%rsi),%ebx - addl $2792965006,%r10d - xorl %r9d,%r12d - movzbl %al,%eax - movl %edx,56(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $17,%r10d - movl %r8d,%r12d - pinsrw $7,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movdqu (%r13),%xmm2 - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r10d,%r12d - addl 60(%r15),%r9d - addb %dl,%bl - movl 64(%rsi),%eax - addl $1236535329,%r9d - xorl %r8d,%r12d - movzbl %bl,%ebx - movl %edx,60(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $22,%r9d - movl %r10d,%r12d - pinsrw $7,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - psllq $8,%xmm1 - pxor %xmm0,%xmm2 - pxor %xmm1,%xmm2 - pxor %xmm0,%xmm0 - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r11d,%r12d - addl 4(%r15),%r8d - addb %dl,%al - movl 68(%rsi),%ebx - addl $4129170786,%r8d - xorl %r10d,%r12d - movzbl %al,%eax - movl %edx,64(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $5,%r8d - movl %r9d,%r12d - movd (%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - pxor %xmm1,%xmm1 - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r10d,%r12d - addl 24(%r15),%r11d - addb %dl,%bl - movl 72(%rsi),%eax - addl $3225465664,%r11d - xorl %r9d,%r12d - movzbl %bl,%ebx - movl %edx,68(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $9,%r11d - movl %r8d,%r12d - movd (%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r9d,%r12d - addl 44(%r15),%r10d - addb %dl,%al - movl 76(%rsi),%ebx - addl $643717713,%r10d - xorl %r8d,%r12d - movzbl %al,%eax - movl %edx,72(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $14,%r10d - movl %r11d,%r12d - pinsrw $1,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r8d,%r12d - addl 0(%r15),%r9d - addb %dl,%bl - movl 80(%rsi),%eax - addl $3921069994,%r9d - xorl %r11d,%r12d - movzbl %bl,%ebx - movl %edx,76(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $20,%r9d - movl %r10d,%r12d - pinsrw $1,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r11d,%r12d - addl 20(%r15),%r8d - addb %dl,%al - movl 84(%rsi),%ebx - addl $3593408605,%r8d - xorl %r10d,%r12d - movzbl %al,%eax - movl %edx,80(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $5,%r8d - movl %r9d,%r12d - pinsrw $2,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r10d,%r12d - addl 40(%r15),%r11d - addb %dl,%bl - movl 88(%rsi),%eax - addl $38016083,%r11d - xorl %r9d,%r12d - movzbl %bl,%ebx - movl %edx,84(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $9,%r11d - movl %r8d,%r12d - pinsrw $2,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r9d,%r12d - addl 60(%r15),%r10d - addb %dl,%al - movl 92(%rsi),%ebx - addl $3634488961,%r10d - xorl %r8d,%r12d - movzbl %al,%eax - movl %edx,88(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $14,%r10d - movl %r11d,%r12d - pinsrw $3,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r8d,%r12d - addl 16(%r15),%r9d - addb %dl,%bl - movl 96(%rsi),%eax - addl $3889429448,%r9d - xorl %r11d,%r12d - movzbl %bl,%ebx - movl %edx,92(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $20,%r9d - movl %r10d,%r12d - pinsrw $3,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r11d,%r12d - addl 36(%r15),%r8d - addb %dl,%al - movl 100(%rsi),%ebx - addl $568446438,%r8d - xorl %r10d,%r12d - movzbl %al,%eax - movl %edx,96(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $5,%r8d - movl %r9d,%r12d - pinsrw $4,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r10d,%r12d - addl 56(%r15),%r11d - addb %dl,%bl - movl 104(%rsi),%eax - addl $3275163606,%r11d - xorl %r9d,%r12d - movzbl %bl,%ebx - movl %edx,100(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $9,%r11d - movl %r8d,%r12d - pinsrw $4,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r9d,%r12d - addl 12(%r15),%r10d - addb %dl,%al - movl 108(%rsi),%ebx - addl $4107603335,%r10d - xorl %r8d,%r12d - movzbl %al,%eax - movl %edx,104(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $14,%r10d - movl %r11d,%r12d - pinsrw $5,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r8d,%r12d - addl 32(%r15),%r9d - addb %dl,%bl - movl 112(%rsi),%eax - addl $1163531501,%r9d - xorl %r11d,%r12d - movzbl %bl,%ebx - movl %edx,108(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $20,%r9d - movl %r10d,%r12d - pinsrw $5,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r11d,%r12d - addl 52(%r15),%r8d - addb %dl,%al - movl 116(%rsi),%ebx - addl $2850285829,%r8d - xorl %r10d,%r12d - movzbl %al,%eax - movl %edx,112(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $5,%r8d - movl %r9d,%r12d - pinsrw $6,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r10d,%r12d - addl 8(%r15),%r11d - addb %dl,%bl - movl 120(%rsi),%eax - addl $4243563512,%r11d - xorl %r9d,%r12d - movzbl %bl,%ebx - movl %edx,116(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $9,%r11d - movl %r8d,%r12d - pinsrw $6,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r9d,%r12d - addl 28(%r15),%r10d - addb %dl,%al - movl 124(%rsi),%ebx - addl $1735328473,%r10d - xorl %r8d,%r12d - movzbl %al,%eax - movl %edx,120(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $14,%r10d - movl %r11d,%r12d - pinsrw $7,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movdqu 16(%r13),%xmm3 - addb $32,%bpl - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r8d,%r12d - addl 48(%r15),%r9d - addb %dl,%bl - movl 0(%rdi,%rbp,4),%eax - addl $2368359562,%r9d - xorl %r11d,%r12d - movzbl %bl,%ebx - movl %edx,124(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $20,%r9d - movl %r11d,%r12d - pinsrw $7,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movq %rcx,%rsi - xorq %rcx,%rcx - movb %sil,%cl - leaq (%rdi,%rbp,4),%rsi - psllq $8,%xmm1 - pxor %xmm0,%xmm3 - pxor %xmm1,%xmm3 - pxor %xmm0,%xmm0 - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %eax,(%rdi,%rcx,4) - xorl %r9d,%r12d - addl 20(%r15),%r8d - addb %dl,%al - movl 4(%rsi),%ebx - addl $4294588738,%r8d - movzbl %al,%eax - addl %r12d,%r8d - movl %edx,0(%rsi) - addb %bl,%cl - roll $4,%r8d - movl %r10d,%r12d - movd (%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - pxor %xmm1,%xmm1 - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %ebx,(%rdi,%rcx,4) - xorl %r8d,%r12d - addl 32(%r15),%r11d - addb %dl,%bl - movl 8(%rsi),%eax - addl $2272392833,%r11d - movzbl %bl,%ebx - addl %r12d,%r11d - movl %edx,4(%rsi) - addb %al,%cl - roll $11,%r11d - movl %r9d,%r12d - movd (%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %eax,(%rdi,%rcx,4) - xorl %r11d,%r12d - addl 44(%r15),%r10d - addb %dl,%al - movl 12(%rsi),%ebx - addl $1839030562,%r10d - movzbl %al,%eax - addl %r12d,%r10d - movl %edx,8(%rsi) - addb %bl,%cl - roll $16,%r10d - movl %r8d,%r12d - pinsrw $1,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %ebx,(%rdi,%rcx,4) - xorl %r10d,%r12d - addl 56(%r15),%r9d - addb %dl,%bl - movl 16(%rsi),%eax - addl $4259657740,%r9d - movzbl %bl,%ebx - addl %r12d,%r9d - movl %edx,12(%rsi) - addb %al,%cl - roll $23,%r9d - movl %r11d,%r12d - pinsrw $1,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %eax,(%rdi,%rcx,4) - xorl %r9d,%r12d - addl 4(%r15),%r8d - addb %dl,%al - movl 20(%rsi),%ebx - addl $2763975236,%r8d - movzbl %al,%eax - addl %r12d,%r8d - movl %edx,16(%rsi) - addb %bl,%cl - roll $4,%r8d - movl %r10d,%r12d - pinsrw $2,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %ebx,(%rdi,%rcx,4) - xorl %r8d,%r12d - addl 16(%r15),%r11d - addb %dl,%bl - movl 24(%rsi),%eax - addl $1272893353,%r11d - movzbl %bl,%ebx - addl %r12d,%r11d - movl %edx,20(%rsi) - addb %al,%cl - roll $11,%r11d - movl %r9d,%r12d - pinsrw $2,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %eax,(%rdi,%rcx,4) - xorl %r11d,%r12d - addl 28(%r15),%r10d - addb %dl,%al - movl 28(%rsi),%ebx - addl $4139469664,%r10d - movzbl %al,%eax - addl %r12d,%r10d - movl %edx,24(%rsi) - addb %bl,%cl - roll $16,%r10d - movl %r8d,%r12d - pinsrw $3,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %ebx,(%rdi,%rcx,4) - xorl %r10d,%r12d - addl 40(%r15),%r9d - addb %dl,%bl - movl 32(%rsi),%eax - addl $3200236656,%r9d - movzbl %bl,%ebx - addl %r12d,%r9d - movl %edx,28(%rsi) - addb %al,%cl - roll $23,%r9d - movl %r11d,%r12d - pinsrw $3,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %eax,(%rdi,%rcx,4) - xorl %r9d,%r12d - addl 52(%r15),%r8d - addb %dl,%al - movl 36(%rsi),%ebx - addl $681279174,%r8d - movzbl %al,%eax - addl %r12d,%r8d - movl %edx,32(%rsi) - addb %bl,%cl - roll $4,%r8d - movl %r10d,%r12d - pinsrw $4,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %ebx,(%rdi,%rcx,4) - xorl %r8d,%r12d - addl 0(%r15),%r11d - addb %dl,%bl - movl 40(%rsi),%eax - addl $3936430074,%r11d - movzbl %bl,%ebx - addl %r12d,%r11d - movl %edx,36(%rsi) - addb %al,%cl - roll $11,%r11d - movl %r9d,%r12d - pinsrw $4,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %eax,(%rdi,%rcx,4) - xorl %r11d,%r12d - addl 12(%r15),%r10d - addb %dl,%al - movl 44(%rsi),%ebx - addl $3572445317,%r10d - movzbl %al,%eax - addl %r12d,%r10d - movl %edx,40(%rsi) - addb %bl,%cl - roll $16,%r10d - movl %r8d,%r12d - pinsrw $5,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %ebx,(%rdi,%rcx,4) - xorl %r10d,%r12d - addl 24(%r15),%r9d - addb %dl,%bl - movl 48(%rsi),%eax - addl $76029189,%r9d - movzbl %bl,%ebx - addl %r12d,%r9d - movl %edx,44(%rsi) - addb %al,%cl - roll $23,%r9d - movl %r11d,%r12d - pinsrw $5,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %eax,(%rdi,%rcx,4) - xorl %r9d,%r12d - addl 36(%r15),%r8d - addb %dl,%al - movl 52(%rsi),%ebx - addl $3654602809,%r8d - movzbl %al,%eax - addl %r12d,%r8d - movl %edx,48(%rsi) - addb %bl,%cl - roll $4,%r8d - movl %r10d,%r12d - pinsrw $6,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %ebx,(%rdi,%rcx,4) - xorl %r8d,%r12d - addl 48(%r15),%r11d - addb %dl,%bl - movl 56(%rsi),%eax - addl $3873151461,%r11d - movzbl %bl,%ebx - addl %r12d,%r11d - movl %edx,52(%rsi) - addb %al,%cl - roll $11,%r11d - movl %r9d,%r12d - pinsrw $6,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %eax,(%rdi,%rcx,4) - xorl %r11d,%r12d - addl 60(%r15),%r10d - addb %dl,%al - movl 60(%rsi),%ebx - addl $530742520,%r10d - movzbl %al,%eax - addl %r12d,%r10d - movl %edx,56(%rsi) - addb %bl,%cl - roll $16,%r10d - movl %r8d,%r12d - pinsrw $7,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movdqu 32(%r13),%xmm4 - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %ebx,(%rdi,%rcx,4) - xorl %r10d,%r12d - addl 8(%r15),%r9d - addb %dl,%bl - movl 64(%rsi),%eax - addl $3299628645,%r9d - movzbl %bl,%ebx - addl %r12d,%r9d - movl %edx,60(%rsi) - addb %al,%cl - roll $23,%r9d - movl $-1,%r12d - pinsrw $7,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - psllq $8,%xmm1 - pxor %xmm0,%xmm4 - pxor %xmm1,%xmm4 - pxor %xmm0,%xmm0 - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %eax,(%rdi,%rcx,4) - orl %r9d,%r12d - addl 0(%r15),%r8d - addb %dl,%al - movl 68(%rsi),%ebx - addl $4096336452,%r8d - movzbl %al,%eax - xorl %r10d,%r12d - movl %edx,64(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $6,%r8d - movl $-1,%r12d - movd (%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - pxor %xmm1,%xmm1 - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %ebx,(%rdi,%rcx,4) - orl %r8d,%r12d - addl 28(%r15),%r11d - addb %dl,%bl - movl 72(%rsi),%eax - addl $1126891415,%r11d - movzbl %bl,%ebx - xorl %r9d,%r12d - movl %edx,68(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $10,%r11d - movl $-1,%r12d - movd (%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %eax,(%rdi,%rcx,4) - orl %r11d,%r12d - addl 56(%r15),%r10d - addb %dl,%al - movl 76(%rsi),%ebx - addl $2878612391,%r10d - movzbl %al,%eax - xorl %r8d,%r12d - movl %edx,72(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $15,%r10d - movl $-1,%r12d - pinsrw $1,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %ebx,(%rdi,%rcx,4) - orl %r10d,%r12d - addl 20(%r15),%r9d - addb %dl,%bl - movl 80(%rsi),%eax - addl $4237533241,%r9d - movzbl %bl,%ebx - xorl %r11d,%r12d - movl %edx,76(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $21,%r9d - movl $-1,%r12d - pinsrw $1,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %eax,(%rdi,%rcx,4) - orl %r9d,%r12d - addl 48(%r15),%r8d - addb %dl,%al - movl 84(%rsi),%ebx - addl $1700485571,%r8d - movzbl %al,%eax - xorl %r10d,%r12d - movl %edx,80(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $6,%r8d - movl $-1,%r12d - pinsrw $2,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %ebx,(%rdi,%rcx,4) - orl %r8d,%r12d - addl 12(%r15),%r11d - addb %dl,%bl - movl 88(%rsi),%eax - addl $2399980690,%r11d - movzbl %bl,%ebx - xorl %r9d,%r12d - movl %edx,84(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $10,%r11d - movl $-1,%r12d - pinsrw $2,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %eax,(%rdi,%rcx,4) - orl %r11d,%r12d - addl 40(%r15),%r10d - addb %dl,%al - movl 92(%rsi),%ebx - addl $4293915773,%r10d - movzbl %al,%eax - xorl %r8d,%r12d - movl %edx,88(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $15,%r10d - movl $-1,%r12d - pinsrw $3,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %ebx,(%rdi,%rcx,4) - orl %r10d,%r12d - addl 4(%r15),%r9d - addb %dl,%bl - movl 96(%rsi),%eax - addl $2240044497,%r9d - movzbl %bl,%ebx - xorl %r11d,%r12d - movl %edx,92(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $21,%r9d - movl $-1,%r12d - pinsrw $3,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %eax,(%rdi,%rcx,4) - orl %r9d,%r12d - addl 32(%r15),%r8d - addb %dl,%al - movl 100(%rsi),%ebx - addl $1873313359,%r8d - movzbl %al,%eax - xorl %r10d,%r12d - movl %edx,96(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $6,%r8d - movl $-1,%r12d - pinsrw $4,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %ebx,(%rdi,%rcx,4) - orl %r8d,%r12d - addl 60(%r15),%r11d - addb %dl,%bl - movl 104(%rsi),%eax - addl $4264355552,%r11d - movzbl %bl,%ebx - xorl %r9d,%r12d - movl %edx,100(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $10,%r11d - movl $-1,%r12d - pinsrw $4,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %eax,(%rdi,%rcx,4) - orl %r11d,%r12d - addl 24(%r15),%r10d - addb %dl,%al - movl 108(%rsi),%ebx - addl $2734768916,%r10d - movzbl %al,%eax - xorl %r8d,%r12d - movl %edx,104(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $15,%r10d - movl $-1,%r12d - pinsrw $5,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %ebx,(%rdi,%rcx,4) - orl %r10d,%r12d - addl 52(%r15),%r9d - addb %dl,%bl - movl 112(%rsi),%eax - addl $1309151649,%r9d - movzbl %bl,%ebx - xorl %r11d,%r12d - movl %edx,108(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $21,%r9d - movl $-1,%r12d - pinsrw $5,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %eax,(%rdi,%rcx,4) - orl %r9d,%r12d - addl 16(%r15),%r8d - addb %dl,%al - movl 116(%rsi),%ebx - addl $4149444226,%r8d - movzbl %al,%eax - xorl %r10d,%r12d - movl %edx,112(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $6,%r8d - movl $-1,%r12d - pinsrw $6,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %ebx,(%rdi,%rcx,4) - orl %r8d,%r12d - addl 44(%r15),%r11d - addb %dl,%bl - movl 120(%rsi),%eax - addl $3174756917,%r11d - movzbl %bl,%ebx - xorl %r9d,%r12d - movl %edx,116(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $10,%r11d - movl $-1,%r12d - pinsrw $6,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %eax,(%rdi,%rcx,4) - orl %r11d,%r12d - addl 8(%r15),%r10d - addb %dl,%al - movl 124(%rsi),%ebx - addl $718787259,%r10d - movzbl %al,%eax - xorl %r8d,%r12d - movl %edx,120(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $15,%r10d - movl $-1,%r12d - pinsrw $7,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movdqu 48(%r13),%xmm5 - addb $32,%bpl - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %ebx,(%rdi,%rcx,4) - orl %r10d,%r12d - addl 36(%r15),%r9d - addb %dl,%bl - movl 0(%rdi,%rbp,4),%eax - addl $3951481745,%r9d - movzbl %bl,%ebx - xorl %r11d,%r12d - movl %edx,124(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $21,%r9d - movl $-1,%r12d - pinsrw $7,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movq %rbp,%rsi - xorq %rbp,%rbp - movb %sil,%bpl - movq %rcx,%rsi - xorq %rcx,%rcx - movb %sil,%cl - leaq (%rdi,%rbp,4),%rsi - psllq $8,%xmm1 - pxor %xmm0,%xmm5 - pxor %xmm1,%xmm5 - addl 0(%rsp),%r8d - addl 4(%rsp),%r9d - addl 8(%rsp),%r10d - addl 12(%rsp),%r11d - - movdqu %xmm2,(%r14,%r13,1) - movdqu %xmm3,16(%r14,%r13,1) - movdqu %xmm4,32(%r14,%r13,1) - movdqu %xmm5,48(%r14,%r13,1) - leaq 64(%r15),%r15 - leaq 64(%r13),%r13 - cmpq 16(%rsp),%r15 - jb .Loop - - movq 24(%rsp),%r12 - subb %al,%cl - movl %r8d,0(%r12) - movl %r9d,4(%r12) - movl %r10d,8(%r12) - movl %r11d,12(%r12) - subb $1,%bpl - movl %ebp,-8(%rdi) - movl %ecx,-4(%rdi) - - movq 40(%rsp),%r15 - movq 48(%rsp),%r14 - movq 56(%rsp),%r13 - movq 64(%rsp),%r12 - movq 72(%rsp),%rbp - movq 80(%rsp),%rbx - leaq 88(%rsp),%rsp -.Lepilogue: -.Labort: - .byte 0xf3,0xc3 -.size rc4_md5_enc,.-rc4_md5_enc -#endif diff --git a/third_party/boringssl/linux-x86_64/crypto/rc4/rc4-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/rc4/rc4-x86_64.S deleted file mode 100644 index c4d10024ade7d..0000000000000 --- a/third_party/boringssl/linux-x86_64/crypto/rc4/rc4-x86_64.S +++ /dev/null @@ -1,596 +0,0 @@ -#if defined(__x86_64__) -.text -.extern OPENSSL_ia32cap_P -.hidden OPENSSL_ia32cap_P - -.globl asm_RC4 -.hidden asm_RC4 -.type asm_RC4,@function -.align 16 -asm_RC4: - orq %rsi,%rsi - jne .Lentry - .byte 0xf3,0xc3 -.Lentry: - pushq %rbx - pushq %r12 - pushq %r13 -.Lprologue: - movq %rsi,%r11 - movq %rdx,%r12 - movq %rcx,%r13 - xorq %r10,%r10 - xorq %rcx,%rcx - - leaq 8(%rdi),%rdi - movb -8(%rdi),%r10b - movb -4(%rdi),%cl - cmpl $-1,256(%rdi) - je .LRC4_CHAR - movl OPENSSL_ia32cap_P(%rip),%r8d - xorq %rbx,%rbx - incb %r10b - subq %r10,%rbx - subq %r12,%r13 - movl (%rdi,%r10,4),%eax - testq $-16,%r11 - jz .Lloop1 - btl $30,%r8d - jc .Lintel - andq $7,%rbx - leaq 1(%r10),%rsi - jz .Loop8 - subq %rbx,%r11 -.Loop8_warmup: - addb %al,%cl - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - movl %edx,(%rdi,%r10,4) - addb %dl,%al - incb %r10b - movl (%rdi,%rax,4),%edx - movl (%rdi,%r10,4),%eax - xorb (%r12),%dl - movb %dl,(%r12,%r13,1) - leaq 1(%r12),%r12 - decq %rbx - jnz .Loop8_warmup - - leaq 1(%r10),%rsi - jmp .Loop8 -.align 16 -.Loop8: - addb %al,%cl - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - movl 0(%rdi,%rsi,4),%ebx - rorq $8,%r8 - movl %edx,0(%rdi,%r10,4) - addb %al,%dl - movb (%rdi,%rdx,4),%r8b - addb %bl,%cl - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - movl 4(%rdi,%rsi,4),%eax - rorq $8,%r8 - movl %edx,4(%rdi,%r10,4) - addb %bl,%dl - movb (%rdi,%rdx,4),%r8b - addb %al,%cl - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - movl 8(%rdi,%rsi,4),%ebx - rorq $8,%r8 - movl %edx,8(%rdi,%r10,4) - addb %al,%dl - movb (%rdi,%rdx,4),%r8b - addb %bl,%cl - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - movl 12(%rdi,%rsi,4),%eax - rorq $8,%r8 - movl %edx,12(%rdi,%r10,4) - addb %bl,%dl - movb (%rdi,%rdx,4),%r8b - addb %al,%cl - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - movl 16(%rdi,%rsi,4),%ebx - rorq $8,%r8 - movl %edx,16(%rdi,%r10,4) - addb %al,%dl - movb (%rdi,%rdx,4),%r8b - addb %bl,%cl - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - movl 20(%rdi,%rsi,4),%eax - rorq $8,%r8 - movl %edx,20(%rdi,%r10,4) - addb %bl,%dl - movb (%rdi,%rdx,4),%r8b - addb %al,%cl - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - movl 24(%rdi,%rsi,4),%ebx - rorq $8,%r8 - movl %edx,24(%rdi,%r10,4) - addb %al,%dl - movb (%rdi,%rdx,4),%r8b - addb $8,%sil - addb %bl,%cl - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - movl -4(%rdi,%rsi,4),%eax - rorq $8,%r8 - movl %edx,28(%rdi,%r10,4) - addb %bl,%dl - movb (%rdi,%rdx,4),%r8b - addb $8,%r10b - rorq $8,%r8 - subq $8,%r11 - - xorq (%r12),%r8 - movq %r8,(%r12,%r13,1) - leaq 8(%r12),%r12 - - testq $-8,%r11 - jnz .Loop8 - cmpq $0,%r11 - jne .Lloop1 - jmp .Lexit - -.align 16 -.Lintel: - testq $-32,%r11 - jz .Lloop1 - andq $15,%rbx - jz .Loop16_is_hot - subq %rbx,%r11 -.Loop16_warmup: - addb %al,%cl - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - movl %edx,(%rdi,%r10,4) - addb %dl,%al - incb %r10b - movl (%rdi,%rax,4),%edx - movl (%rdi,%r10,4),%eax - xorb (%r12),%dl - movb %dl,(%r12,%r13,1) - leaq 1(%r12),%r12 - decq %rbx - jnz .Loop16_warmup - - movq %rcx,%rbx - xorq %rcx,%rcx - movb %bl,%cl - -.Loop16_is_hot: - leaq (%rdi,%r10,4),%rsi - addb %al,%cl - movl (%rdi,%rcx,4),%edx - pxor %xmm0,%xmm0 - movl %eax,(%rdi,%rcx,4) - addb %dl,%al - movl 4(%rsi),%ebx - movzbl %al,%eax - movl %edx,0(%rsi) - addb %bl,%cl - pinsrw $0,(%rdi,%rax,4),%xmm0 - jmp .Loop16_enter -.align 16 -.Loop16: - addb %al,%cl - movl (%rdi,%rcx,4),%edx - pxor %xmm0,%xmm2 - psllq $8,%xmm1 - pxor %xmm0,%xmm0 - movl %eax,(%rdi,%rcx,4) - addb %dl,%al - movl 4(%rsi),%ebx - movzbl %al,%eax - movl %edx,0(%rsi) - pxor %xmm1,%xmm2 - addb %bl,%cl - pinsrw $0,(%rdi,%rax,4),%xmm0 - movdqu %xmm2,(%r12,%r13,1) - leaq 16(%r12),%r12 -.Loop16_enter: - movl (%rdi,%rcx,4),%edx - pxor %xmm1,%xmm1 - movl %ebx,(%rdi,%rcx,4) - addb %dl,%bl - movl 8(%rsi),%eax - movzbl %bl,%ebx - movl %edx,4(%rsi) - addb %al,%cl - pinsrw $0,(%rdi,%rbx,4),%xmm1 - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - addb %dl,%al - movl 12(%rsi),%ebx - movzbl %al,%eax - movl %edx,8(%rsi) - addb %bl,%cl - pinsrw $1,(%rdi,%rax,4),%xmm0 - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - addb %dl,%bl - movl 16(%rsi),%eax - movzbl %bl,%ebx - movl %edx,12(%rsi) - addb %al,%cl - pinsrw $1,(%rdi,%rbx,4),%xmm1 - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - addb %dl,%al - movl 20(%rsi),%ebx - movzbl %al,%eax - movl %edx,16(%rsi) - addb %bl,%cl - pinsrw $2,(%rdi,%rax,4),%xmm0 - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - addb %dl,%bl - movl 24(%rsi),%eax - movzbl %bl,%ebx - movl %edx,20(%rsi) - addb %al,%cl - pinsrw $2,(%rdi,%rbx,4),%xmm1 - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - addb %dl,%al - movl 28(%rsi),%ebx - movzbl %al,%eax - movl %edx,24(%rsi) - addb %bl,%cl - pinsrw $3,(%rdi,%rax,4),%xmm0 - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - addb %dl,%bl - movl 32(%rsi),%eax - movzbl %bl,%ebx - movl %edx,28(%rsi) - addb %al,%cl - pinsrw $3,(%rdi,%rbx,4),%xmm1 - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - addb %dl,%al - movl 36(%rsi),%ebx - movzbl %al,%eax - movl %edx,32(%rsi) - addb %bl,%cl - pinsrw $4,(%rdi,%rax,4),%xmm0 - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - addb %dl,%bl - movl 40(%rsi),%eax - movzbl %bl,%ebx - movl %edx,36(%rsi) - addb %al,%cl - pinsrw $4,(%rdi,%rbx,4),%xmm1 - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - addb %dl,%al - movl 44(%rsi),%ebx - movzbl %al,%eax - movl %edx,40(%rsi) - addb %bl,%cl - pinsrw $5,(%rdi,%rax,4),%xmm0 - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - addb %dl,%bl - movl 48(%rsi),%eax - movzbl %bl,%ebx - movl %edx,44(%rsi) - addb %al,%cl - pinsrw $5,(%rdi,%rbx,4),%xmm1 - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - addb %dl,%al - movl 52(%rsi),%ebx - movzbl %al,%eax - movl %edx,48(%rsi) - addb %bl,%cl - pinsrw $6,(%rdi,%rax,4),%xmm0 - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - addb %dl,%bl - movl 56(%rsi),%eax - movzbl %bl,%ebx - movl %edx,52(%rsi) - addb %al,%cl - pinsrw $6,(%rdi,%rbx,4),%xmm1 - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - addb %dl,%al - movl 60(%rsi),%ebx - movzbl %al,%eax - movl %edx,56(%rsi) - addb %bl,%cl - pinsrw $7,(%rdi,%rax,4),%xmm0 - addb $16,%r10b - movdqu (%r12),%xmm2 - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - addb %dl,%bl - movzbl %bl,%ebx - movl %edx,60(%rsi) - leaq (%rdi,%r10,4),%rsi - pinsrw $7,(%rdi,%rbx,4),%xmm1 - movl (%rsi),%eax - movq %rcx,%rbx - xorq %rcx,%rcx - subq $16,%r11 - movb %bl,%cl - testq $-16,%r11 - jnz .Loop16 - - psllq $8,%xmm1 - pxor %xmm0,%xmm2 - pxor %xmm1,%xmm2 - movdqu %xmm2,(%r12,%r13,1) - leaq 16(%r12),%r12 - - cmpq $0,%r11 - jne .Lloop1 - jmp .Lexit - -.align 16 -.Lloop1: - addb %al,%cl - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - movl %edx,(%rdi,%r10,4) - addb %dl,%al - incb %r10b - movl (%rdi,%rax,4),%edx - movl (%rdi,%r10,4),%eax - xorb (%r12),%dl - movb %dl,(%r12,%r13,1) - leaq 1(%r12),%r12 - decq %r11 - jnz .Lloop1 - jmp .Lexit - -.align 16 -.LRC4_CHAR: - addb $1,%r10b - movzbl (%rdi,%r10,1),%eax - testq $-8,%r11 - jz .Lcloop1 - jmp .Lcloop8 -.align 16 -.Lcloop8: - movl (%r12),%r8d - movl 4(%r12),%r9d - addb %al,%cl - leaq 1(%r10),%rsi - movzbl (%rdi,%rcx,1),%edx - movzbl %sil,%esi - movzbl (%rdi,%rsi,1),%ebx - movb %al,(%rdi,%rcx,1) - cmpq %rsi,%rcx - movb %dl,(%rdi,%r10,1) - jne .Lcmov0 - movq %rax,%rbx -.Lcmov0: - addb %al,%dl - xorb (%rdi,%rdx,1),%r8b - rorl $8,%r8d - addb %bl,%cl - leaq 1(%rsi),%r10 - movzbl (%rdi,%rcx,1),%edx - movzbl %r10b,%r10d - movzbl (%rdi,%r10,1),%eax - movb %bl,(%rdi,%rcx,1) - cmpq %r10,%rcx - movb %dl,(%rdi,%rsi,1) - jne .Lcmov1 - movq %rbx,%rax -.Lcmov1: - addb %bl,%dl - xorb (%rdi,%rdx,1),%r8b - rorl $8,%r8d - addb %al,%cl - leaq 1(%r10),%rsi - movzbl (%rdi,%rcx,1),%edx - movzbl %sil,%esi - movzbl (%rdi,%rsi,1),%ebx - movb %al,(%rdi,%rcx,1) - cmpq %rsi,%rcx - movb %dl,(%rdi,%r10,1) - jne .Lcmov2 - movq %rax,%rbx -.Lcmov2: - addb %al,%dl - xorb (%rdi,%rdx,1),%r8b - rorl $8,%r8d - addb %bl,%cl - leaq 1(%rsi),%r10 - movzbl (%rdi,%rcx,1),%edx - movzbl %r10b,%r10d - movzbl (%rdi,%r10,1),%eax - movb %bl,(%rdi,%rcx,1) - cmpq %r10,%rcx - movb %dl,(%rdi,%rsi,1) - jne .Lcmov3 - movq %rbx,%rax -.Lcmov3: - addb %bl,%dl - xorb (%rdi,%rdx,1),%r8b - rorl $8,%r8d - addb %al,%cl - leaq 1(%r10),%rsi - movzbl (%rdi,%rcx,1),%edx - movzbl %sil,%esi - movzbl (%rdi,%rsi,1),%ebx - movb %al,(%rdi,%rcx,1) - cmpq %rsi,%rcx - movb %dl,(%rdi,%r10,1) - jne .Lcmov4 - movq %rax,%rbx -.Lcmov4: - addb %al,%dl - xorb (%rdi,%rdx,1),%r9b - rorl $8,%r9d - addb %bl,%cl - leaq 1(%rsi),%r10 - movzbl (%rdi,%rcx,1),%edx - movzbl %r10b,%r10d - movzbl (%rdi,%r10,1),%eax - movb %bl,(%rdi,%rcx,1) - cmpq %r10,%rcx - movb %dl,(%rdi,%rsi,1) - jne .Lcmov5 - movq %rbx,%rax -.Lcmov5: - addb %bl,%dl - xorb (%rdi,%rdx,1),%r9b - rorl $8,%r9d - addb %al,%cl - leaq 1(%r10),%rsi - movzbl (%rdi,%rcx,1),%edx - movzbl %sil,%esi - movzbl (%rdi,%rsi,1),%ebx - movb %al,(%rdi,%rcx,1) - cmpq %rsi,%rcx - movb %dl,(%rdi,%r10,1) - jne .Lcmov6 - movq %rax,%rbx -.Lcmov6: - addb %al,%dl - xorb (%rdi,%rdx,1),%r9b - rorl $8,%r9d - addb %bl,%cl - leaq 1(%rsi),%r10 - movzbl (%rdi,%rcx,1),%edx - movzbl %r10b,%r10d - movzbl (%rdi,%r10,1),%eax - movb %bl,(%rdi,%rcx,1) - cmpq %r10,%rcx - movb %dl,(%rdi,%rsi,1) - jne .Lcmov7 - movq %rbx,%rax -.Lcmov7: - addb %bl,%dl - xorb (%rdi,%rdx,1),%r9b - rorl $8,%r9d - leaq -8(%r11),%r11 - movl %r8d,(%r13) - leaq 8(%r12),%r12 - movl %r9d,4(%r13) - leaq 8(%r13),%r13 - - testq $-8,%r11 - jnz .Lcloop8 - cmpq $0,%r11 - jne .Lcloop1 - jmp .Lexit -.align 16 -.Lcloop1: - addb %al,%cl - movzbl %cl,%ecx - movzbl (%rdi,%rcx,1),%edx - movb %al,(%rdi,%rcx,1) - movb %dl,(%rdi,%r10,1) - addb %al,%dl - addb $1,%r10b - movzbl %dl,%edx - movzbl %r10b,%r10d - movzbl (%rdi,%rdx,1),%edx - movzbl (%rdi,%r10,1),%eax - xorb (%r12),%dl - leaq 1(%r12),%r12 - movb %dl,(%r13) - leaq 1(%r13),%r13 - subq $1,%r11 - jnz .Lcloop1 - jmp .Lexit - -.align 16 -.Lexit: - subb $1,%r10b - movl %r10d,-8(%rdi) - movl %ecx,-4(%rdi) - - movq (%rsp),%r13 - movq 8(%rsp),%r12 - movq 16(%rsp),%rbx - addq $24,%rsp -.Lepilogue: - .byte 0xf3,0xc3 -.size asm_RC4,.-asm_RC4 -.globl asm_RC4_set_key -.hidden asm_RC4_set_key -.type asm_RC4_set_key,@function -.align 16 -asm_RC4_set_key: - leaq 8(%rdi),%rdi - leaq (%rdx,%rsi,1),%rdx - negq %rsi - movq %rsi,%rcx - xorl %eax,%eax - xorq %r9,%r9 - xorq %r10,%r10 - xorq %r11,%r11 - - movl OPENSSL_ia32cap_P(%rip),%r8d - btl $20,%r8d - jc .Lc1stloop - jmp .Lw1stloop - -.align 16 -.Lw1stloop: - movl %eax,(%rdi,%rax,4) - addb $1,%al - jnc .Lw1stloop - - xorq %r9,%r9 - xorq %r8,%r8 -.align 16 -.Lw2ndloop: - movl (%rdi,%r9,4),%r10d - addb (%rdx,%rsi,1),%r8b - addb %r10b,%r8b - addq $1,%rsi - movl (%rdi,%r8,4),%r11d - cmovzq %rcx,%rsi - movl %r10d,(%rdi,%r8,4) - movl %r11d,(%rdi,%r9,4) - addb $1,%r9b - jnc .Lw2ndloop - jmp .Lexit_key - -.align 16 -.Lc1stloop: - movb %al,(%rdi,%rax,1) - addb $1,%al - jnc .Lc1stloop - - xorq %r9,%r9 - xorq %r8,%r8 -.align 16 -.Lc2ndloop: - movb (%rdi,%r9,1),%r10b - addb (%rdx,%rsi,1),%r8b - addb %r10b,%r8b - addq $1,%rsi - movb (%rdi,%r8,1),%r11b - jnz .Lcnowrap - movq %rcx,%rsi -.Lcnowrap: - movb %r10b,(%rdi,%r8,1) - movb %r11b,(%rdi,%r9,1) - addb $1,%r9b - jnc .Lc2ndloop - movl $-1,256(%rdi) - -.align 16 -.Lexit_key: - xorl %eax,%eax - movl %eax,-8(%rdi) - movl %eax,-4(%rdi) - .byte 0xf3,0xc3 -.size asm_RC4_set_key,.-asm_RC4_set_key -#endif diff --git a/third_party/boringssl/linux-x86_64/crypto/sha/sha1-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/sha/sha1-x86_64.S deleted file mode 100644 index 7668c2b1f59c5..0000000000000 --- a/third_party/boringssl/linux-x86_64/crypto/sha/sha1-x86_64.S +++ /dev/null @@ -1,2426 +0,0 @@ -#if defined(__x86_64__) -.text -.extern OPENSSL_ia32cap_P -.hidden OPENSSL_ia32cap_P - -.globl sha1_block_data_order -.hidden sha1_block_data_order -.type sha1_block_data_order,@function -.align 16 -sha1_block_data_order: - movl OPENSSL_ia32cap_P+0(%rip),%r9d - movl OPENSSL_ia32cap_P+4(%rip),%r8d - movl OPENSSL_ia32cap_P+8(%rip),%r10d - testl $512,%r8d - jz .Lialu - jmp _ssse3_shortcut - -.align 16 -.Lialu: - movq %rsp,%rax - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - movq %rdi,%r8 - subq $72,%rsp - movq %rsi,%r9 - andq $-64,%rsp - movq %rdx,%r10 - movq %rax,64(%rsp) -.Lprologue: - - movl 0(%r8),%esi - movl 4(%r8),%edi - movl 8(%r8),%r11d - movl 12(%r8),%r12d - movl 16(%r8),%r13d - jmp .Lloop - -.align 16 -.Lloop: - movl 0(%r9),%edx - bswapl %edx - movl 4(%r9),%ebp - movl %r12d,%eax - movl %edx,0(%rsp) - movl %esi,%ecx - bswapl %ebp - xorl %r11d,%eax - roll $5,%ecx - andl %edi,%eax - leal 1518500249(%rdx,%r13,1),%r13d - addl %ecx,%r13d - xorl %r12d,%eax - roll $30,%edi - addl %eax,%r13d - movl 8(%r9),%r14d - movl %r11d,%eax - movl %ebp,4(%rsp) - movl %r13d,%ecx - bswapl %r14d - xorl %edi,%eax - roll $5,%ecx - andl %esi,%eax - leal 1518500249(%rbp,%r12,1),%r12d - addl %ecx,%r12d - xorl %r11d,%eax - roll $30,%esi - addl %eax,%r12d - movl 12(%r9),%edx - movl %edi,%eax - movl %r14d,8(%rsp) - movl %r12d,%ecx - bswapl %edx - xorl %esi,%eax - roll $5,%ecx - andl %r13d,%eax - leal 1518500249(%r14,%r11,1),%r11d - addl %ecx,%r11d - xorl %edi,%eax - roll $30,%r13d - addl %eax,%r11d - movl 16(%r9),%ebp - movl %esi,%eax - movl %edx,12(%rsp) - movl %r11d,%ecx - bswapl %ebp - xorl %r13d,%eax - roll $5,%ecx - andl %r12d,%eax - leal 1518500249(%rdx,%rdi,1),%edi - addl %ecx,%edi - xorl %esi,%eax - roll $30,%r12d - addl %eax,%edi - movl 20(%r9),%r14d - movl %r13d,%eax - movl %ebp,16(%rsp) - movl %edi,%ecx - bswapl %r14d - xorl %r12d,%eax - roll $5,%ecx - andl %r11d,%eax - leal 1518500249(%rbp,%rsi,1),%esi - addl %ecx,%esi - xorl %r13d,%eax - roll $30,%r11d - addl %eax,%esi - movl 24(%r9),%edx - movl %r12d,%eax - movl %r14d,20(%rsp) - movl %esi,%ecx - bswapl %edx - xorl %r11d,%eax - roll $5,%ecx - andl %edi,%eax - leal 1518500249(%r14,%r13,1),%r13d - addl %ecx,%r13d - xorl %r12d,%eax - roll $30,%edi - addl %eax,%r13d - movl 28(%r9),%ebp - movl %r11d,%eax - movl %edx,24(%rsp) - movl %r13d,%ecx - bswapl %ebp - xorl %edi,%eax - roll $5,%ecx - andl %esi,%eax - leal 1518500249(%rdx,%r12,1),%r12d - addl %ecx,%r12d - xorl %r11d,%eax - roll $30,%esi - addl %eax,%r12d - movl 32(%r9),%r14d - movl %edi,%eax - movl %ebp,28(%rsp) - movl %r12d,%ecx - bswapl %r14d - xorl %esi,%eax - roll $5,%ecx - andl %r13d,%eax - leal 1518500249(%rbp,%r11,1),%r11d - addl %ecx,%r11d - xorl %edi,%eax - roll $30,%r13d - addl %eax,%r11d - movl 36(%r9),%edx - movl %esi,%eax - movl %r14d,32(%rsp) - movl %r11d,%ecx - bswapl %edx - xorl %r13d,%eax - roll $5,%ecx - andl %r12d,%eax - leal 1518500249(%r14,%rdi,1),%edi - addl %ecx,%edi - xorl %esi,%eax - roll $30,%r12d - addl %eax,%edi - movl 40(%r9),%ebp - movl %r13d,%eax - movl %edx,36(%rsp) - movl %edi,%ecx - bswapl %ebp - xorl %r12d,%eax - roll $5,%ecx - andl %r11d,%eax - leal 1518500249(%rdx,%rsi,1),%esi - addl %ecx,%esi - xorl %r13d,%eax - roll $30,%r11d - addl %eax,%esi - movl 44(%r9),%r14d - movl %r12d,%eax - movl %ebp,40(%rsp) - movl %esi,%ecx - bswapl %r14d - xorl %r11d,%eax - roll $5,%ecx - andl %edi,%eax - leal 1518500249(%rbp,%r13,1),%r13d - addl %ecx,%r13d - xorl %r12d,%eax - roll $30,%edi - addl %eax,%r13d - movl 48(%r9),%edx - movl %r11d,%eax - movl %r14d,44(%rsp) - movl %r13d,%ecx - bswapl %edx - xorl %edi,%eax - roll $5,%ecx - andl %esi,%eax - leal 1518500249(%r14,%r12,1),%r12d - addl %ecx,%r12d - xorl %r11d,%eax - roll $30,%esi - addl %eax,%r12d - movl 52(%r9),%ebp - movl %edi,%eax - movl %edx,48(%rsp) - movl %r12d,%ecx - bswapl %ebp - xorl %esi,%eax - roll $5,%ecx - andl %r13d,%eax - leal 1518500249(%rdx,%r11,1),%r11d - addl %ecx,%r11d - xorl %edi,%eax - roll $30,%r13d - addl %eax,%r11d - movl 56(%r9),%r14d - movl %esi,%eax - movl %ebp,52(%rsp) - movl %r11d,%ecx - bswapl %r14d - xorl %r13d,%eax - roll $5,%ecx - andl %r12d,%eax - leal 1518500249(%rbp,%rdi,1),%edi - addl %ecx,%edi - xorl %esi,%eax - roll $30,%r12d - addl %eax,%edi - movl 60(%r9),%edx - movl %r13d,%eax - movl %r14d,56(%rsp) - movl %edi,%ecx - bswapl %edx - xorl %r12d,%eax - roll $5,%ecx - andl %r11d,%eax - leal 1518500249(%r14,%rsi,1),%esi - addl %ecx,%esi - xorl %r13d,%eax - roll $30,%r11d - addl %eax,%esi - xorl 0(%rsp),%ebp - movl %r12d,%eax - movl %edx,60(%rsp) - movl %esi,%ecx - xorl 8(%rsp),%ebp - xorl %r11d,%eax - roll $5,%ecx - xorl 32(%rsp),%ebp - andl %edi,%eax - leal 1518500249(%rdx,%r13,1),%r13d - roll $30,%edi - xorl %r12d,%eax - addl %ecx,%r13d - roll $1,%ebp - addl %eax,%r13d - xorl 4(%rsp),%r14d - movl %r11d,%eax - movl %ebp,0(%rsp) - movl %r13d,%ecx - xorl 12(%rsp),%r14d - xorl %edi,%eax - roll $5,%ecx - xorl 36(%rsp),%r14d - andl %esi,%eax - leal 1518500249(%rbp,%r12,1),%r12d - roll $30,%esi - xorl %r11d,%eax - addl %ecx,%r12d - roll $1,%r14d - addl %eax,%r12d - xorl 8(%rsp),%edx - movl %edi,%eax - movl %r14d,4(%rsp) - movl %r12d,%ecx - xorl 16(%rsp),%edx - xorl %esi,%eax - roll $5,%ecx - xorl 40(%rsp),%edx - andl %r13d,%eax - leal 1518500249(%r14,%r11,1),%r11d - roll $30,%r13d - xorl %edi,%eax - addl %ecx,%r11d - roll $1,%edx - addl %eax,%r11d - xorl 12(%rsp),%ebp - movl %esi,%eax - movl %edx,8(%rsp) - movl %r11d,%ecx - xorl 20(%rsp),%ebp - xorl %r13d,%eax - roll $5,%ecx - xorl 44(%rsp),%ebp - andl %r12d,%eax - leal 1518500249(%rdx,%rdi,1),%edi - roll $30,%r12d - xorl %esi,%eax - addl %ecx,%edi - roll $1,%ebp - addl %eax,%edi - xorl 16(%rsp),%r14d - movl %r13d,%eax - movl %ebp,12(%rsp) - movl %edi,%ecx - xorl 24(%rsp),%r14d - xorl %r12d,%eax - roll $5,%ecx - xorl 48(%rsp),%r14d - andl %r11d,%eax - leal 1518500249(%rbp,%rsi,1),%esi - roll $30,%r11d - xorl %r13d,%eax - addl %ecx,%esi - roll $1,%r14d - addl %eax,%esi - xorl 20(%rsp),%edx - movl %edi,%eax - movl %r14d,16(%rsp) - movl %esi,%ecx - xorl 28(%rsp),%edx - xorl %r12d,%eax - roll $5,%ecx - xorl 52(%rsp),%edx - leal 1859775393(%r14,%r13,1),%r13d - xorl %r11d,%eax - addl %ecx,%r13d - roll $30,%edi - addl %eax,%r13d - roll $1,%edx - xorl 24(%rsp),%ebp - movl %esi,%eax - movl %edx,20(%rsp) - movl %r13d,%ecx - xorl 32(%rsp),%ebp - xorl %r11d,%eax - roll $5,%ecx - xorl 56(%rsp),%ebp - leal 1859775393(%rdx,%r12,1),%r12d - xorl %edi,%eax - addl %ecx,%r12d - roll $30,%esi - addl %eax,%r12d - roll $1,%ebp - xorl 28(%rsp),%r14d - movl %r13d,%eax - movl %ebp,24(%rsp) - movl %r12d,%ecx - xorl 36(%rsp),%r14d - xorl %edi,%eax - roll $5,%ecx - xorl 60(%rsp),%r14d - leal 1859775393(%rbp,%r11,1),%r11d - xorl %esi,%eax - addl %ecx,%r11d - roll $30,%r13d - addl %eax,%r11d - roll $1,%r14d - xorl 32(%rsp),%edx - movl %r12d,%eax - movl %r14d,28(%rsp) - movl %r11d,%ecx - xorl 40(%rsp),%edx - xorl %esi,%eax - roll $5,%ecx - xorl 0(%rsp),%edx - leal 1859775393(%r14,%rdi,1),%edi - xorl %r13d,%eax - addl %ecx,%edi - roll $30,%r12d - addl %eax,%edi - roll $1,%edx - xorl 36(%rsp),%ebp - movl %r11d,%eax - movl %edx,32(%rsp) - movl %edi,%ecx - xorl 44(%rsp),%ebp - xorl %r13d,%eax - roll $5,%ecx - xorl 4(%rsp),%ebp - leal 1859775393(%rdx,%rsi,1),%esi - xorl %r12d,%eax - addl %ecx,%esi - roll $30,%r11d - addl %eax,%esi - roll $1,%ebp - xorl 40(%rsp),%r14d - movl %edi,%eax - movl %ebp,36(%rsp) - movl %esi,%ecx - xorl 48(%rsp),%r14d - xorl %r12d,%eax - roll $5,%ecx - xorl 8(%rsp),%r14d - leal 1859775393(%rbp,%r13,1),%r13d - xorl %r11d,%eax - addl %ecx,%r13d - roll $30,%edi - addl %eax,%r13d - roll $1,%r14d - xorl 44(%rsp),%edx - movl %esi,%eax - movl %r14d,40(%rsp) - movl %r13d,%ecx - xorl 52(%rsp),%edx - xorl %r11d,%eax - roll $5,%ecx - xorl 12(%rsp),%edx - leal 1859775393(%r14,%r12,1),%r12d - xorl %edi,%eax - addl %ecx,%r12d - roll $30,%esi - addl %eax,%r12d - roll $1,%edx - xorl 48(%rsp),%ebp - movl %r13d,%eax - movl %edx,44(%rsp) - movl %r12d,%ecx - xorl 56(%rsp),%ebp - xorl %edi,%eax - roll $5,%ecx - xorl 16(%rsp),%ebp - leal 1859775393(%rdx,%r11,1),%r11d - xorl %esi,%eax - addl %ecx,%r11d - roll $30,%r13d - addl %eax,%r11d - roll $1,%ebp - xorl 52(%rsp),%r14d - movl %r12d,%eax - movl %ebp,48(%rsp) - movl %r11d,%ecx - xorl 60(%rsp),%r14d - xorl %esi,%eax - roll $5,%ecx - xorl 20(%rsp),%r14d - leal 1859775393(%rbp,%rdi,1),%edi - xorl %r13d,%eax - addl %ecx,%edi - roll $30,%r12d - addl %eax,%edi - roll $1,%r14d - xorl 56(%rsp),%edx - movl %r11d,%eax - movl %r14d,52(%rsp) - movl %edi,%ecx - xorl 0(%rsp),%edx - xorl %r13d,%eax - roll $5,%ecx - xorl 24(%rsp),%edx - leal 1859775393(%r14,%rsi,1),%esi - xorl %r12d,%eax - addl %ecx,%esi - roll $30,%r11d - addl %eax,%esi - roll $1,%edx - xorl 60(%rsp),%ebp - movl %edi,%eax - movl %edx,56(%rsp) - movl %esi,%ecx - xorl 4(%rsp),%ebp - xorl %r12d,%eax - roll $5,%ecx - xorl 28(%rsp),%ebp - leal 1859775393(%rdx,%r13,1),%r13d - xorl %r11d,%eax - addl %ecx,%r13d - roll $30,%edi - addl %eax,%r13d - roll $1,%ebp - xorl 0(%rsp),%r14d - movl %esi,%eax - movl %ebp,60(%rsp) - movl %r13d,%ecx - xorl 8(%rsp),%r14d - xorl %r11d,%eax - roll $5,%ecx - xorl 32(%rsp),%r14d - leal 1859775393(%rbp,%r12,1),%r12d - xorl %edi,%eax - addl %ecx,%r12d - roll $30,%esi - addl %eax,%r12d - roll $1,%r14d - xorl 4(%rsp),%edx - movl %r13d,%eax - movl %r14d,0(%rsp) - movl %r12d,%ecx - xorl 12(%rsp),%edx - xorl %edi,%eax - roll $5,%ecx - xorl 36(%rsp),%edx - leal 1859775393(%r14,%r11,1),%r11d - xorl %esi,%eax - addl %ecx,%r11d - roll $30,%r13d - addl %eax,%r11d - roll $1,%edx - xorl 8(%rsp),%ebp - movl %r12d,%eax - movl %edx,4(%rsp) - movl %r11d,%ecx - xorl 16(%rsp),%ebp - xorl %esi,%eax - roll $5,%ecx - xorl 40(%rsp),%ebp - leal 1859775393(%rdx,%rdi,1),%edi - xorl %r13d,%eax - addl %ecx,%edi - roll $30,%r12d - addl %eax,%edi - roll $1,%ebp - xorl 12(%rsp),%r14d - movl %r11d,%eax - movl %ebp,8(%rsp) - movl %edi,%ecx - xorl 20(%rsp),%r14d - xorl %r13d,%eax - roll $5,%ecx - xorl 44(%rsp),%r14d - leal 1859775393(%rbp,%rsi,1),%esi - xorl %r12d,%eax - addl %ecx,%esi - roll $30,%r11d - addl %eax,%esi - roll $1,%r14d - xorl 16(%rsp),%edx - movl %edi,%eax - movl %r14d,12(%rsp) - movl %esi,%ecx - xorl 24(%rsp),%edx - xorl %r12d,%eax - roll $5,%ecx - xorl 48(%rsp),%edx - leal 1859775393(%r14,%r13,1),%r13d - xorl %r11d,%eax - addl %ecx,%r13d - roll $30,%edi - addl %eax,%r13d - roll $1,%edx - xorl 20(%rsp),%ebp - movl %esi,%eax - movl %edx,16(%rsp) - movl %r13d,%ecx - xorl 28(%rsp),%ebp - xorl %r11d,%eax - roll $5,%ecx - xorl 52(%rsp),%ebp - leal 1859775393(%rdx,%r12,1),%r12d - xorl %edi,%eax - addl %ecx,%r12d - roll $30,%esi - addl %eax,%r12d - roll $1,%ebp - xorl 24(%rsp),%r14d - movl %r13d,%eax - movl %ebp,20(%rsp) - movl %r12d,%ecx - xorl 32(%rsp),%r14d - xorl %edi,%eax - roll $5,%ecx - xorl 56(%rsp),%r14d - leal 1859775393(%rbp,%r11,1),%r11d - xorl %esi,%eax - addl %ecx,%r11d - roll $30,%r13d - addl %eax,%r11d - roll $1,%r14d - xorl 28(%rsp),%edx - movl %r12d,%eax - movl %r14d,24(%rsp) - movl %r11d,%ecx - xorl 36(%rsp),%edx - xorl %esi,%eax - roll $5,%ecx - xorl 60(%rsp),%edx - leal 1859775393(%r14,%rdi,1),%edi - xorl %r13d,%eax - addl %ecx,%edi - roll $30,%r12d - addl %eax,%edi - roll $1,%edx - xorl 32(%rsp),%ebp - movl %r11d,%eax - movl %edx,28(%rsp) - movl %edi,%ecx - xorl 40(%rsp),%ebp - xorl %r13d,%eax - roll $5,%ecx - xorl 0(%rsp),%ebp - leal 1859775393(%rdx,%rsi,1),%esi - xorl %r12d,%eax - addl %ecx,%esi - roll $30,%r11d - addl %eax,%esi - roll $1,%ebp - xorl 36(%rsp),%r14d - movl %r12d,%eax - movl %ebp,32(%rsp) - movl %r12d,%ebx - xorl 44(%rsp),%r14d - andl %r11d,%eax - movl %esi,%ecx - xorl 4(%rsp),%r14d - leal -1894007588(%rbp,%r13,1),%r13d - xorl %r11d,%ebx - roll $5,%ecx - addl %eax,%r13d - roll $1,%r14d - andl %edi,%ebx - addl %ecx,%r13d - roll $30,%edi - addl %ebx,%r13d - xorl 40(%rsp),%edx - movl %r11d,%eax - movl %r14d,36(%rsp) - movl %r11d,%ebx - xorl 48(%rsp),%edx - andl %edi,%eax - movl %r13d,%ecx - xorl 8(%rsp),%edx - leal -1894007588(%r14,%r12,1),%r12d - xorl %edi,%ebx - roll $5,%ecx - addl %eax,%r12d - roll $1,%edx - andl %esi,%ebx - addl %ecx,%r12d - roll $30,%esi - addl %ebx,%r12d - xorl 44(%rsp),%ebp - movl %edi,%eax - movl %edx,40(%rsp) - movl %edi,%ebx - xorl 52(%rsp),%ebp - andl %esi,%eax - movl %r12d,%ecx - xorl 12(%rsp),%ebp - leal -1894007588(%rdx,%r11,1),%r11d - xorl %esi,%ebx - roll $5,%ecx - addl %eax,%r11d - roll $1,%ebp - andl %r13d,%ebx - addl %ecx,%r11d - roll $30,%r13d - addl %ebx,%r11d - xorl 48(%rsp),%r14d - movl %esi,%eax - movl %ebp,44(%rsp) - movl %esi,%ebx - xorl 56(%rsp),%r14d - andl %r13d,%eax - movl %r11d,%ecx - xorl 16(%rsp),%r14d - leal -1894007588(%rbp,%rdi,1),%edi - xorl %r13d,%ebx - roll $5,%ecx - addl %eax,%edi - roll $1,%r14d - andl %r12d,%ebx - addl %ecx,%edi - roll $30,%r12d - addl %ebx,%edi - xorl 52(%rsp),%edx - movl %r13d,%eax - movl %r14d,48(%rsp) - movl %r13d,%ebx - xorl 60(%rsp),%edx - andl %r12d,%eax - movl %edi,%ecx - xorl 20(%rsp),%edx - leal -1894007588(%r14,%rsi,1),%esi - xorl %r12d,%ebx - roll $5,%ecx - addl %eax,%esi - roll $1,%edx - andl %r11d,%ebx - addl %ecx,%esi - roll $30,%r11d - addl %ebx,%esi - xorl 56(%rsp),%ebp - movl %r12d,%eax - movl %edx,52(%rsp) - movl %r12d,%ebx - xorl 0(%rsp),%ebp - andl %r11d,%eax - movl %esi,%ecx - xorl 24(%rsp),%ebp - leal -1894007588(%rdx,%r13,1),%r13d - xorl %r11d,%ebx - roll $5,%ecx - addl %eax,%r13d - roll $1,%ebp - andl %edi,%ebx - addl %ecx,%r13d - roll $30,%edi - addl %ebx,%r13d - xorl 60(%rsp),%r14d - movl %r11d,%eax - movl %ebp,56(%rsp) - movl %r11d,%ebx - xorl 4(%rsp),%r14d - andl %edi,%eax - movl %r13d,%ecx - xorl 28(%rsp),%r14d - leal -1894007588(%rbp,%r12,1),%r12d - xorl %edi,%ebx - roll $5,%ecx - addl %eax,%r12d - roll $1,%r14d - andl %esi,%ebx - addl %ecx,%r12d - roll $30,%esi - addl %ebx,%r12d - xorl 0(%rsp),%edx - movl %edi,%eax - movl %r14d,60(%rsp) - movl %edi,%ebx - xorl 8(%rsp),%edx - andl %esi,%eax - movl %r12d,%ecx - xorl 32(%rsp),%edx - leal -1894007588(%r14,%r11,1),%r11d - xorl %esi,%ebx - roll $5,%ecx - addl %eax,%r11d - roll $1,%edx - andl %r13d,%ebx - addl %ecx,%r11d - roll $30,%r13d - addl %ebx,%r11d - xorl 4(%rsp),%ebp - movl %esi,%eax - movl %edx,0(%rsp) - movl %esi,%ebx - xorl 12(%rsp),%ebp - andl %r13d,%eax - movl %r11d,%ecx - xorl 36(%rsp),%ebp - leal -1894007588(%rdx,%rdi,1),%edi - xorl %r13d,%ebx - roll $5,%ecx - addl %eax,%edi - roll $1,%ebp - andl %r12d,%ebx - addl %ecx,%edi - roll $30,%r12d - addl %ebx,%edi - xorl 8(%rsp),%r14d - movl %r13d,%eax - movl %ebp,4(%rsp) - movl %r13d,%ebx - xorl 16(%rsp),%r14d - andl %r12d,%eax - movl %edi,%ecx - xorl 40(%rsp),%r14d - leal -1894007588(%rbp,%rsi,1),%esi - xorl %r12d,%ebx - roll $5,%ecx - addl %eax,%esi - roll $1,%r14d - andl %r11d,%ebx - addl %ecx,%esi - roll $30,%r11d - addl %ebx,%esi - xorl 12(%rsp),%edx - movl %r12d,%eax - movl %r14d,8(%rsp) - movl %r12d,%ebx - xorl 20(%rsp),%edx - andl %r11d,%eax - movl %esi,%ecx - xorl 44(%rsp),%edx - leal -1894007588(%r14,%r13,1),%r13d - xorl %r11d,%ebx - roll $5,%ecx - addl %eax,%r13d - roll $1,%edx - andl %edi,%ebx - addl %ecx,%r13d - roll $30,%edi - addl %ebx,%r13d - xorl 16(%rsp),%ebp - movl %r11d,%eax - movl %edx,12(%rsp) - movl %r11d,%ebx - xorl 24(%rsp),%ebp - andl %edi,%eax - movl %r13d,%ecx - xorl 48(%rsp),%ebp - leal -1894007588(%rdx,%r12,1),%r12d - xorl %edi,%ebx - roll $5,%ecx - addl %eax,%r12d - roll $1,%ebp - andl %esi,%ebx - addl %ecx,%r12d - roll $30,%esi - addl %ebx,%r12d - xorl 20(%rsp),%r14d - movl %edi,%eax - movl %ebp,16(%rsp) - movl %edi,%ebx - xorl 28(%rsp),%r14d - andl %esi,%eax - movl %r12d,%ecx - xorl 52(%rsp),%r14d - leal -1894007588(%rbp,%r11,1),%r11d - xorl %esi,%ebx - roll $5,%ecx - addl %eax,%r11d - roll $1,%r14d - andl %r13d,%ebx - addl %ecx,%r11d - roll $30,%r13d - addl %ebx,%r11d - xorl 24(%rsp),%edx - movl %esi,%eax - movl %r14d,20(%rsp) - movl %esi,%ebx - xorl 32(%rsp),%edx - andl %r13d,%eax - movl %r11d,%ecx - xorl 56(%rsp),%edx - leal -1894007588(%r14,%rdi,1),%edi - xorl %r13d,%ebx - roll $5,%ecx - addl %eax,%edi - roll $1,%edx - andl %r12d,%ebx - addl %ecx,%edi - roll $30,%r12d - addl %ebx,%edi - xorl 28(%rsp),%ebp - movl %r13d,%eax - movl %edx,24(%rsp) - movl %r13d,%ebx - xorl 36(%rsp),%ebp - andl %r12d,%eax - movl %edi,%ecx - xorl 60(%rsp),%ebp - leal -1894007588(%rdx,%rsi,1),%esi - xorl %r12d,%ebx - roll $5,%ecx - addl %eax,%esi - roll $1,%ebp - andl %r11d,%ebx - addl %ecx,%esi - roll $30,%r11d - addl %ebx,%esi - xorl 32(%rsp),%r14d - movl %r12d,%eax - movl %ebp,28(%rsp) - movl %r12d,%ebx - xorl 40(%rsp),%r14d - andl %r11d,%eax - movl %esi,%ecx - xorl 0(%rsp),%r14d - leal -1894007588(%rbp,%r13,1),%r13d - xorl %r11d,%ebx - roll $5,%ecx - addl %eax,%r13d - roll $1,%r14d - andl %edi,%ebx - addl %ecx,%r13d - roll $30,%edi - addl %ebx,%r13d - xorl 36(%rsp),%edx - movl %r11d,%eax - movl %r14d,32(%rsp) - movl %r11d,%ebx - xorl 44(%rsp),%edx - andl %edi,%eax - movl %r13d,%ecx - xorl 4(%rsp),%edx - leal -1894007588(%r14,%r12,1),%r12d - xorl %edi,%ebx - roll $5,%ecx - addl %eax,%r12d - roll $1,%edx - andl %esi,%ebx - addl %ecx,%r12d - roll $30,%esi - addl %ebx,%r12d - xorl 40(%rsp),%ebp - movl %edi,%eax - movl %edx,36(%rsp) - movl %edi,%ebx - xorl 48(%rsp),%ebp - andl %esi,%eax - movl %r12d,%ecx - xorl 8(%rsp),%ebp - leal -1894007588(%rdx,%r11,1),%r11d - xorl %esi,%ebx - roll $5,%ecx - addl %eax,%r11d - roll $1,%ebp - andl %r13d,%ebx - addl %ecx,%r11d - roll $30,%r13d - addl %ebx,%r11d - xorl 44(%rsp),%r14d - movl %esi,%eax - movl %ebp,40(%rsp) - movl %esi,%ebx - xorl 52(%rsp),%r14d - andl %r13d,%eax - movl %r11d,%ecx - xorl 12(%rsp),%r14d - leal -1894007588(%rbp,%rdi,1),%edi - xorl %r13d,%ebx - roll $5,%ecx - addl %eax,%edi - roll $1,%r14d - andl %r12d,%ebx - addl %ecx,%edi - roll $30,%r12d - addl %ebx,%edi - xorl 48(%rsp),%edx - movl %r13d,%eax - movl %r14d,44(%rsp) - movl %r13d,%ebx - xorl 56(%rsp),%edx - andl %r12d,%eax - movl %edi,%ecx - xorl 16(%rsp),%edx - leal -1894007588(%r14,%rsi,1),%esi - xorl %r12d,%ebx - roll $5,%ecx - addl %eax,%esi - roll $1,%edx - andl %r11d,%ebx - addl %ecx,%esi - roll $30,%r11d - addl %ebx,%esi - xorl 52(%rsp),%ebp - movl %edi,%eax - movl %edx,48(%rsp) - movl %esi,%ecx - xorl 60(%rsp),%ebp - xorl %r12d,%eax - roll $5,%ecx - xorl 20(%rsp),%ebp - leal -899497514(%rdx,%r13,1),%r13d - xorl %r11d,%eax - addl %ecx,%r13d - roll $30,%edi - addl %eax,%r13d - roll $1,%ebp - xorl 56(%rsp),%r14d - movl %esi,%eax - movl %ebp,52(%rsp) - movl %r13d,%ecx - xorl 0(%rsp),%r14d - xorl %r11d,%eax - roll $5,%ecx - xorl 24(%rsp),%r14d - leal -899497514(%rbp,%r12,1),%r12d - xorl %edi,%eax - addl %ecx,%r12d - roll $30,%esi - addl %eax,%r12d - roll $1,%r14d - xorl 60(%rsp),%edx - movl %r13d,%eax - movl %r14d,56(%rsp) - movl %r12d,%ecx - xorl 4(%rsp),%edx - xorl %edi,%eax - roll $5,%ecx - xorl 28(%rsp),%edx - leal -899497514(%r14,%r11,1),%r11d - xorl %esi,%eax - addl %ecx,%r11d - roll $30,%r13d - addl %eax,%r11d - roll $1,%edx - xorl 0(%rsp),%ebp - movl %r12d,%eax - movl %edx,60(%rsp) - movl %r11d,%ecx - xorl 8(%rsp),%ebp - xorl %esi,%eax - roll $5,%ecx - xorl 32(%rsp),%ebp - leal -899497514(%rdx,%rdi,1),%edi - xorl %r13d,%eax - addl %ecx,%edi - roll $30,%r12d - addl %eax,%edi - roll $1,%ebp - xorl 4(%rsp),%r14d - movl %r11d,%eax - movl %ebp,0(%rsp) - movl %edi,%ecx - xorl 12(%rsp),%r14d - xorl %r13d,%eax - roll $5,%ecx - xorl 36(%rsp),%r14d - leal -899497514(%rbp,%rsi,1),%esi - xorl %r12d,%eax - addl %ecx,%esi - roll $30,%r11d - addl %eax,%esi - roll $1,%r14d - xorl 8(%rsp),%edx - movl %edi,%eax - movl %r14d,4(%rsp) - movl %esi,%ecx - xorl 16(%rsp),%edx - xorl %r12d,%eax - roll $5,%ecx - xorl 40(%rsp),%edx - leal -899497514(%r14,%r13,1),%r13d - xorl %r11d,%eax - addl %ecx,%r13d - roll $30,%edi - addl %eax,%r13d - roll $1,%edx - xorl 12(%rsp),%ebp - movl %esi,%eax - movl %edx,8(%rsp) - movl %r13d,%ecx - xorl 20(%rsp),%ebp - xorl %r11d,%eax - roll $5,%ecx - xorl 44(%rsp),%ebp - leal -899497514(%rdx,%r12,1),%r12d - xorl %edi,%eax - addl %ecx,%r12d - roll $30,%esi - addl %eax,%r12d - roll $1,%ebp - xorl 16(%rsp),%r14d - movl %r13d,%eax - movl %ebp,12(%rsp) - movl %r12d,%ecx - xorl 24(%rsp),%r14d - xorl %edi,%eax - roll $5,%ecx - xorl 48(%rsp),%r14d - leal -899497514(%rbp,%r11,1),%r11d - xorl %esi,%eax - addl %ecx,%r11d - roll $30,%r13d - addl %eax,%r11d - roll $1,%r14d - xorl 20(%rsp),%edx - movl %r12d,%eax - movl %r14d,16(%rsp) - movl %r11d,%ecx - xorl 28(%rsp),%edx - xorl %esi,%eax - roll $5,%ecx - xorl 52(%rsp),%edx - leal -899497514(%r14,%rdi,1),%edi - xorl %r13d,%eax - addl %ecx,%edi - roll $30,%r12d - addl %eax,%edi - roll $1,%edx - xorl 24(%rsp),%ebp - movl %r11d,%eax - movl %edx,20(%rsp) - movl %edi,%ecx - xorl 32(%rsp),%ebp - xorl %r13d,%eax - roll $5,%ecx - xorl 56(%rsp),%ebp - leal -899497514(%rdx,%rsi,1),%esi - xorl %r12d,%eax - addl %ecx,%esi - roll $30,%r11d - addl %eax,%esi - roll $1,%ebp - xorl 28(%rsp),%r14d - movl %edi,%eax - movl %ebp,24(%rsp) - movl %esi,%ecx - xorl 36(%rsp),%r14d - xorl %r12d,%eax - roll $5,%ecx - xorl 60(%rsp),%r14d - leal -899497514(%rbp,%r13,1),%r13d - xorl %r11d,%eax - addl %ecx,%r13d - roll $30,%edi - addl %eax,%r13d - roll $1,%r14d - xorl 32(%rsp),%edx - movl %esi,%eax - movl %r14d,28(%rsp) - movl %r13d,%ecx - xorl 40(%rsp),%edx - xorl %r11d,%eax - roll $5,%ecx - xorl 0(%rsp),%edx - leal -899497514(%r14,%r12,1),%r12d - xorl %edi,%eax - addl %ecx,%r12d - roll $30,%esi - addl %eax,%r12d - roll $1,%edx - xorl 36(%rsp),%ebp - movl %r13d,%eax - - movl %r12d,%ecx - xorl 44(%rsp),%ebp - xorl %edi,%eax - roll $5,%ecx - xorl 4(%rsp),%ebp - leal -899497514(%rdx,%r11,1),%r11d - xorl %esi,%eax - addl %ecx,%r11d - roll $30,%r13d - addl %eax,%r11d - roll $1,%ebp - xorl 40(%rsp),%r14d - movl %r12d,%eax - - movl %r11d,%ecx - xorl 48(%rsp),%r14d - xorl %esi,%eax - roll $5,%ecx - xorl 8(%rsp),%r14d - leal -899497514(%rbp,%rdi,1),%edi - xorl %r13d,%eax - addl %ecx,%edi - roll $30,%r12d - addl %eax,%edi - roll $1,%r14d - xorl 44(%rsp),%edx - movl %r11d,%eax - - movl %edi,%ecx - xorl 52(%rsp),%edx - xorl %r13d,%eax - roll $5,%ecx - xorl 12(%rsp),%edx - leal -899497514(%r14,%rsi,1),%esi - xorl %r12d,%eax - addl %ecx,%esi - roll $30,%r11d - addl %eax,%esi - roll $1,%edx - xorl 48(%rsp),%ebp - movl %edi,%eax - - movl %esi,%ecx - xorl 56(%rsp),%ebp - xorl %r12d,%eax - roll $5,%ecx - xorl 16(%rsp),%ebp - leal -899497514(%rdx,%r13,1),%r13d - xorl %r11d,%eax - addl %ecx,%r13d - roll $30,%edi - addl %eax,%r13d - roll $1,%ebp - xorl 52(%rsp),%r14d - movl %esi,%eax - - movl %r13d,%ecx - xorl 60(%rsp),%r14d - xorl %r11d,%eax - roll $5,%ecx - xorl 20(%rsp),%r14d - leal -899497514(%rbp,%r12,1),%r12d - xorl %edi,%eax - addl %ecx,%r12d - roll $30,%esi - addl %eax,%r12d - roll $1,%r14d - xorl 56(%rsp),%edx - movl %r13d,%eax - - movl %r12d,%ecx - xorl 0(%rsp),%edx - xorl %edi,%eax - roll $5,%ecx - xorl 24(%rsp),%edx - leal -899497514(%r14,%r11,1),%r11d - xorl %esi,%eax - addl %ecx,%r11d - roll $30,%r13d - addl %eax,%r11d - roll $1,%edx - xorl 60(%rsp),%ebp - movl %r12d,%eax - - movl %r11d,%ecx - xorl 4(%rsp),%ebp - xorl %esi,%eax - roll $5,%ecx - xorl 28(%rsp),%ebp - leal -899497514(%rdx,%rdi,1),%edi - xorl %r13d,%eax - addl %ecx,%edi - roll $30,%r12d - addl %eax,%edi - roll $1,%ebp - movl %r11d,%eax - movl %edi,%ecx - xorl %r13d,%eax - leal -899497514(%rbp,%rsi,1),%esi - roll $5,%ecx - xorl %r12d,%eax - addl %ecx,%esi - roll $30,%r11d - addl %eax,%esi - addl 0(%r8),%esi - addl 4(%r8),%edi - addl 8(%r8),%r11d - addl 12(%r8),%r12d - addl 16(%r8),%r13d - movl %esi,0(%r8) - movl %edi,4(%r8) - movl %r11d,8(%r8) - movl %r12d,12(%r8) - movl %r13d,16(%r8) - - subq $1,%r10 - leaq 64(%r9),%r9 - jnz .Lloop - - movq 64(%rsp),%rsi - movq -40(%rsi),%r14 - movq -32(%rsi),%r13 - movq -24(%rsi),%r12 - movq -16(%rsi),%rbp - movq -8(%rsi),%rbx - leaq (%rsi),%rsp -.Lepilogue: - .byte 0xf3,0xc3 -.size sha1_block_data_order,.-sha1_block_data_order -.type sha1_block_data_order_ssse3,@function -.align 16 -sha1_block_data_order_ssse3: -_ssse3_shortcut: - movq %rsp,%rax - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - leaq -64(%rsp),%rsp - movq %rax,%r14 - andq $-64,%rsp - movq %rdi,%r8 - movq %rsi,%r9 - movq %rdx,%r10 - - shlq $6,%r10 - addq %r9,%r10 - leaq K_XX_XX+64(%rip),%r11 - - movl 0(%r8),%eax - movl 4(%r8),%ebx - movl 8(%r8),%ecx - movl 12(%r8),%edx - movl %ebx,%esi - movl 16(%r8),%ebp - movl %ecx,%edi - xorl %edx,%edi - andl %edi,%esi - - movdqa 64(%r11),%xmm6 - movdqa -64(%r11),%xmm9 - movdqu 0(%r9),%xmm0 - movdqu 16(%r9),%xmm1 - movdqu 32(%r9),%xmm2 - movdqu 48(%r9),%xmm3 -.byte 102,15,56,0,198 -.byte 102,15,56,0,206 -.byte 102,15,56,0,214 - addq $64,%r9 - paddd %xmm9,%xmm0 -.byte 102,15,56,0,222 - paddd %xmm9,%xmm1 - paddd %xmm9,%xmm2 - movdqa %xmm0,0(%rsp) - psubd %xmm9,%xmm0 - movdqa %xmm1,16(%rsp) - psubd %xmm9,%xmm1 - movdqa %xmm2,32(%rsp) - psubd %xmm9,%xmm2 - jmp .Loop_ssse3 -.align 16 -.Loop_ssse3: - rorl $2,%ebx - pshufd $238,%xmm0,%xmm4 - xorl %edx,%esi - movdqa %xmm3,%xmm8 - paddd %xmm3,%xmm9 - movl %eax,%edi - addl 0(%rsp),%ebp - punpcklqdq %xmm1,%xmm4 - xorl %ecx,%ebx - roll $5,%eax - addl %esi,%ebp - psrldq $4,%xmm8 - andl %ebx,%edi - xorl %ecx,%ebx - pxor %xmm0,%xmm4 - addl %eax,%ebp - rorl $7,%eax - pxor %xmm2,%xmm8 - xorl %ecx,%edi - movl %ebp,%esi - addl 4(%rsp),%edx - pxor %xmm8,%xmm4 - xorl %ebx,%eax - roll $5,%ebp - movdqa %xmm9,48(%rsp) - addl %edi,%edx - andl %eax,%esi - movdqa %xmm4,%xmm10 - xorl %ebx,%eax - addl %ebp,%edx - rorl $7,%ebp - movdqa %xmm4,%xmm8 - xorl %ebx,%esi - pslldq $12,%xmm10 - paddd %xmm4,%xmm4 - movl %edx,%edi - addl 8(%rsp),%ecx - psrld $31,%xmm8 - xorl %eax,%ebp - roll $5,%edx - addl %esi,%ecx - movdqa %xmm10,%xmm9 - andl %ebp,%edi - xorl %eax,%ebp - psrld $30,%xmm10 - addl %edx,%ecx - rorl $7,%edx - por %xmm8,%xmm4 - xorl %eax,%edi - movl %ecx,%esi - addl 12(%rsp),%ebx - pslld $2,%xmm9 - pxor %xmm10,%xmm4 - xorl %ebp,%edx - movdqa -64(%r11),%xmm10 - roll $5,%ecx - addl %edi,%ebx - andl %edx,%esi - pxor %xmm9,%xmm4 - xorl %ebp,%edx - addl %ecx,%ebx - rorl $7,%ecx - pshufd $238,%xmm1,%xmm5 - xorl %ebp,%esi - movdqa %xmm4,%xmm9 - paddd %xmm4,%xmm10 - movl %ebx,%edi - addl 16(%rsp),%eax - punpcklqdq %xmm2,%xmm5 - xorl %edx,%ecx - roll $5,%ebx - addl %esi,%eax - psrldq $4,%xmm9 - andl %ecx,%edi - xorl %edx,%ecx - pxor %xmm1,%xmm5 - addl %ebx,%eax - rorl $7,%ebx - pxor %xmm3,%xmm9 - xorl %edx,%edi - movl %eax,%esi - addl 20(%rsp),%ebp - pxor %xmm9,%xmm5 - xorl %ecx,%ebx - roll $5,%eax - movdqa %xmm10,0(%rsp) - addl %edi,%ebp - andl %ebx,%esi - movdqa %xmm5,%xmm8 - xorl %ecx,%ebx - addl %eax,%ebp - rorl $7,%eax - movdqa %xmm5,%xmm9 - xorl %ecx,%esi - pslldq $12,%xmm8 - paddd %xmm5,%xmm5 - movl %ebp,%edi - addl 24(%rsp),%edx - psrld $31,%xmm9 - xorl %ebx,%eax - roll $5,%ebp - addl %esi,%edx - movdqa %xmm8,%xmm10 - andl %eax,%edi - xorl %ebx,%eax - psrld $30,%xmm8 - addl %ebp,%edx - rorl $7,%ebp - por %xmm9,%xmm5 - xorl %ebx,%edi - movl %edx,%esi - addl 28(%rsp),%ecx - pslld $2,%xmm10 - pxor %xmm8,%xmm5 - xorl %eax,%ebp - movdqa -32(%r11),%xmm8 - roll $5,%edx - addl %edi,%ecx - andl %ebp,%esi - pxor %xmm10,%xmm5 - xorl %eax,%ebp - addl %edx,%ecx - rorl $7,%edx - pshufd $238,%xmm2,%xmm6 - xorl %eax,%esi - movdqa %xmm5,%xmm10 - paddd %xmm5,%xmm8 - movl %ecx,%edi - addl 32(%rsp),%ebx - punpcklqdq %xmm3,%xmm6 - xorl %ebp,%edx - roll $5,%ecx - addl %esi,%ebx - psrldq $4,%xmm10 - andl %edx,%edi - xorl %ebp,%edx - pxor %xmm2,%xmm6 - addl %ecx,%ebx - rorl $7,%ecx - pxor %xmm4,%xmm10 - xorl %ebp,%edi - movl %ebx,%esi - addl 36(%rsp),%eax - pxor %xmm10,%xmm6 - xorl %edx,%ecx - roll $5,%ebx - movdqa %xmm8,16(%rsp) - addl %edi,%eax - andl %ecx,%esi - movdqa %xmm6,%xmm9 - xorl %edx,%ecx - addl %ebx,%eax - rorl $7,%ebx - movdqa %xmm6,%xmm10 - xorl %edx,%esi - pslldq $12,%xmm9 - paddd %xmm6,%xmm6 - movl %eax,%edi - addl 40(%rsp),%ebp - psrld $31,%xmm10 - xorl %ecx,%ebx - roll $5,%eax - addl %esi,%ebp - movdqa %xmm9,%xmm8 - andl %ebx,%edi - xorl %ecx,%ebx - psrld $30,%xmm9 - addl %eax,%ebp - rorl $7,%eax - por %xmm10,%xmm6 - xorl %ecx,%edi - movl %ebp,%esi - addl 44(%rsp),%edx - pslld $2,%xmm8 - pxor %xmm9,%xmm6 - xorl %ebx,%eax - movdqa -32(%r11),%xmm9 - roll $5,%ebp - addl %edi,%edx - andl %eax,%esi - pxor %xmm8,%xmm6 - xorl %ebx,%eax - addl %ebp,%edx - rorl $7,%ebp - pshufd $238,%xmm3,%xmm7 - xorl %ebx,%esi - movdqa %xmm6,%xmm8 - paddd %xmm6,%xmm9 - movl %edx,%edi - addl 48(%rsp),%ecx - punpcklqdq %xmm4,%xmm7 - xorl %eax,%ebp - roll $5,%edx - addl %esi,%ecx - psrldq $4,%xmm8 - andl %ebp,%edi - xorl %eax,%ebp - pxor %xmm3,%xmm7 - addl %edx,%ecx - rorl $7,%edx - pxor %xmm5,%xmm8 - xorl %eax,%edi - movl %ecx,%esi - addl 52(%rsp),%ebx - pxor %xmm8,%xmm7 - xorl %ebp,%edx - roll $5,%ecx - movdqa %xmm9,32(%rsp) - addl %edi,%ebx - andl %edx,%esi - movdqa %xmm7,%xmm10 - xorl %ebp,%edx - addl %ecx,%ebx - rorl $7,%ecx - movdqa %xmm7,%xmm8 - xorl %ebp,%esi - pslldq $12,%xmm10 - paddd %xmm7,%xmm7 - movl %ebx,%edi - addl 56(%rsp),%eax - psrld $31,%xmm8 - xorl %edx,%ecx - roll $5,%ebx - addl %esi,%eax - movdqa %xmm10,%xmm9 - andl %ecx,%edi - xorl %edx,%ecx - psrld $30,%xmm10 - addl %ebx,%eax - rorl $7,%ebx - por %xmm8,%xmm7 - xorl %edx,%edi - movl %eax,%esi - addl 60(%rsp),%ebp - pslld $2,%xmm9 - pxor %xmm10,%xmm7 - xorl %ecx,%ebx - movdqa -32(%r11),%xmm10 - roll $5,%eax - addl %edi,%ebp - andl %ebx,%esi - pxor %xmm9,%xmm7 - pshufd $238,%xmm6,%xmm9 - xorl %ecx,%ebx - addl %eax,%ebp - rorl $7,%eax - pxor %xmm4,%xmm0 - xorl %ecx,%esi - movl %ebp,%edi - addl 0(%rsp),%edx - punpcklqdq %xmm7,%xmm9 - xorl %ebx,%eax - roll $5,%ebp - pxor %xmm1,%xmm0 - addl %esi,%edx - andl %eax,%edi - movdqa %xmm10,%xmm8 - xorl %ebx,%eax - paddd %xmm7,%xmm10 - addl %ebp,%edx - pxor %xmm9,%xmm0 - rorl $7,%ebp - xorl %ebx,%edi - movl %edx,%esi - addl 4(%rsp),%ecx - movdqa %xmm0,%xmm9 - xorl %eax,%ebp - roll $5,%edx - movdqa %xmm10,48(%rsp) - addl %edi,%ecx - andl %ebp,%esi - xorl %eax,%ebp - pslld $2,%xmm0 - addl %edx,%ecx - rorl $7,%edx - psrld $30,%xmm9 - xorl %eax,%esi - movl %ecx,%edi - addl 8(%rsp),%ebx - por %xmm9,%xmm0 - xorl %ebp,%edx - roll $5,%ecx - pshufd $238,%xmm7,%xmm10 - addl %esi,%ebx - andl %edx,%edi - xorl %ebp,%edx - addl %ecx,%ebx - addl 12(%rsp),%eax - xorl %ebp,%edi - movl %ebx,%esi - roll $5,%ebx - addl %edi,%eax - xorl %edx,%esi - rorl $7,%ecx - addl %ebx,%eax - pxor %xmm5,%xmm1 - addl 16(%rsp),%ebp - xorl %ecx,%esi - punpcklqdq %xmm0,%xmm10 - movl %eax,%edi - roll $5,%eax - pxor %xmm2,%xmm1 - addl %esi,%ebp - xorl %ecx,%edi - movdqa %xmm8,%xmm9 - rorl $7,%ebx - paddd %xmm0,%xmm8 - addl %eax,%ebp - pxor %xmm10,%xmm1 - addl 20(%rsp),%edx - xorl %ebx,%edi - movl %ebp,%esi - roll $5,%ebp - movdqa %xmm1,%xmm10 - addl %edi,%edx - xorl %ebx,%esi - movdqa %xmm8,0(%rsp) - rorl $7,%eax - addl %ebp,%edx - addl 24(%rsp),%ecx - pslld $2,%xmm1 - xorl %eax,%esi - movl %edx,%edi - psrld $30,%xmm10 - roll $5,%edx - addl %esi,%ecx - xorl %eax,%edi - rorl $7,%ebp - por %xmm10,%xmm1 - addl %edx,%ecx - addl 28(%rsp),%ebx - pshufd $238,%xmm0,%xmm8 - xorl %ebp,%edi - movl %ecx,%esi - roll $5,%ecx - addl %edi,%ebx - xorl %ebp,%esi - rorl $7,%edx - addl %ecx,%ebx - pxor %xmm6,%xmm2 - addl 32(%rsp),%eax - xorl %edx,%esi - punpcklqdq %xmm1,%xmm8 - movl %ebx,%edi - roll $5,%ebx - pxor %xmm3,%xmm2 - addl %esi,%eax - xorl %edx,%edi - movdqa 0(%r11),%xmm10 - rorl $7,%ecx - paddd %xmm1,%xmm9 - addl %ebx,%eax - pxor %xmm8,%xmm2 - addl 36(%rsp),%ebp - xorl %ecx,%edi - movl %eax,%esi - roll $5,%eax - movdqa %xmm2,%xmm8 - addl %edi,%ebp - xorl %ecx,%esi - movdqa %xmm9,16(%rsp) - rorl $7,%ebx - addl %eax,%ebp - addl 40(%rsp),%edx - pslld $2,%xmm2 - xorl %ebx,%esi - movl %ebp,%edi - psrld $30,%xmm8 - roll $5,%ebp - addl %esi,%edx - xorl %ebx,%edi - rorl $7,%eax - por %xmm8,%xmm2 - addl %ebp,%edx - addl 44(%rsp),%ecx - pshufd $238,%xmm1,%xmm9 - xorl %eax,%edi - movl %edx,%esi - roll $5,%edx - addl %edi,%ecx - xorl %eax,%esi - rorl $7,%ebp - addl %edx,%ecx - pxor %xmm7,%xmm3 - addl 48(%rsp),%ebx - xorl %ebp,%esi - punpcklqdq %xmm2,%xmm9 - movl %ecx,%edi - roll $5,%ecx - pxor %xmm4,%xmm3 - addl %esi,%ebx - xorl %ebp,%edi - movdqa %xmm10,%xmm8 - rorl $7,%edx - paddd %xmm2,%xmm10 - addl %ecx,%ebx - pxor %xmm9,%xmm3 - addl 52(%rsp),%eax - xorl %edx,%edi - movl %ebx,%esi - roll $5,%ebx - movdqa %xmm3,%xmm9 - addl %edi,%eax - xorl %edx,%esi - movdqa %xmm10,32(%rsp) - rorl $7,%ecx - addl %ebx,%eax - addl 56(%rsp),%ebp - pslld $2,%xmm3 - xorl %ecx,%esi - movl %eax,%edi - psrld $30,%xmm9 - roll $5,%eax - addl %esi,%ebp - xorl %ecx,%edi - rorl $7,%ebx - por %xmm9,%xmm3 - addl %eax,%ebp - addl 60(%rsp),%edx - pshufd $238,%xmm2,%xmm10 - xorl %ebx,%edi - movl %ebp,%esi - roll $5,%ebp - addl %edi,%edx - xorl %ebx,%esi - rorl $7,%eax - addl %ebp,%edx - pxor %xmm0,%xmm4 - addl 0(%rsp),%ecx - xorl %eax,%esi - punpcklqdq %xmm3,%xmm10 - movl %edx,%edi - roll $5,%edx - pxor %xmm5,%xmm4 - addl %esi,%ecx - xorl %eax,%edi - movdqa %xmm8,%xmm9 - rorl $7,%ebp - paddd %xmm3,%xmm8 - addl %edx,%ecx - pxor %xmm10,%xmm4 - addl 4(%rsp),%ebx - xorl %ebp,%edi - movl %ecx,%esi - roll $5,%ecx - movdqa %xmm4,%xmm10 - addl %edi,%ebx - xorl %ebp,%esi - movdqa %xmm8,48(%rsp) - rorl $7,%edx - addl %ecx,%ebx - addl 8(%rsp),%eax - pslld $2,%xmm4 - xorl %edx,%esi - movl %ebx,%edi - psrld $30,%xmm10 - roll $5,%ebx - addl %esi,%eax - xorl %edx,%edi - rorl $7,%ecx - por %xmm10,%xmm4 - addl %ebx,%eax - addl 12(%rsp),%ebp - pshufd $238,%xmm3,%xmm8 - xorl %ecx,%edi - movl %eax,%esi - roll $5,%eax - addl %edi,%ebp - xorl %ecx,%esi - rorl $7,%ebx - addl %eax,%ebp - pxor %xmm1,%xmm5 - addl 16(%rsp),%edx - xorl %ebx,%esi - punpcklqdq %xmm4,%xmm8 - movl %ebp,%edi - roll $5,%ebp - pxor %xmm6,%xmm5 - addl %esi,%edx - xorl %ebx,%edi - movdqa %xmm9,%xmm10 - rorl $7,%eax - paddd %xmm4,%xmm9 - addl %ebp,%edx - pxor %xmm8,%xmm5 - addl 20(%rsp),%ecx - xorl %eax,%edi - movl %edx,%esi - roll $5,%edx - movdqa %xmm5,%xmm8 - addl %edi,%ecx - xorl %eax,%esi - movdqa %xmm9,0(%rsp) - rorl $7,%ebp - addl %edx,%ecx - addl 24(%rsp),%ebx - pslld $2,%xmm5 - xorl %ebp,%esi - movl %ecx,%edi - psrld $30,%xmm8 - roll $5,%ecx - addl %esi,%ebx - xorl %ebp,%edi - rorl $7,%edx - por %xmm8,%xmm5 - addl %ecx,%ebx - addl 28(%rsp),%eax - pshufd $238,%xmm4,%xmm9 - rorl $7,%ecx - movl %ebx,%esi - xorl %edx,%edi - roll $5,%ebx - addl %edi,%eax - xorl %ecx,%esi - xorl %edx,%ecx - addl %ebx,%eax - pxor %xmm2,%xmm6 - addl 32(%rsp),%ebp - andl %ecx,%esi - xorl %edx,%ecx - rorl $7,%ebx - punpcklqdq %xmm5,%xmm9 - movl %eax,%edi - xorl %ecx,%esi - pxor %xmm7,%xmm6 - roll $5,%eax - addl %esi,%ebp - movdqa %xmm10,%xmm8 - xorl %ebx,%edi - paddd %xmm5,%xmm10 - xorl %ecx,%ebx - pxor %xmm9,%xmm6 - addl %eax,%ebp - addl 36(%rsp),%edx - andl %ebx,%edi - xorl %ecx,%ebx - rorl $7,%eax - movdqa %xmm6,%xmm9 - movl %ebp,%esi - xorl %ebx,%edi - movdqa %xmm10,16(%rsp) - roll $5,%ebp - addl %edi,%edx - xorl %eax,%esi - pslld $2,%xmm6 - xorl %ebx,%eax - addl %ebp,%edx - psrld $30,%xmm9 - addl 40(%rsp),%ecx - andl %eax,%esi - xorl %ebx,%eax - por %xmm9,%xmm6 - rorl $7,%ebp - movl %edx,%edi - xorl %eax,%esi - roll $5,%edx - pshufd $238,%xmm5,%xmm10 - addl %esi,%ecx - xorl %ebp,%edi - xorl %eax,%ebp - addl %edx,%ecx - addl 44(%rsp),%ebx - andl %ebp,%edi - xorl %eax,%ebp - rorl $7,%edx - movl %ecx,%esi - xorl %ebp,%edi - roll $5,%ecx - addl %edi,%ebx - xorl %edx,%esi - xorl %ebp,%edx - addl %ecx,%ebx - pxor %xmm3,%xmm7 - addl 48(%rsp),%eax - andl %edx,%esi - xorl %ebp,%edx - rorl $7,%ecx - punpcklqdq %xmm6,%xmm10 - movl %ebx,%edi - xorl %edx,%esi - pxor %xmm0,%xmm7 - roll $5,%ebx - addl %esi,%eax - movdqa 32(%r11),%xmm9 - xorl %ecx,%edi - paddd %xmm6,%xmm8 - xorl %edx,%ecx - pxor %xmm10,%xmm7 - addl %ebx,%eax - addl 52(%rsp),%ebp - andl %ecx,%edi - xorl %edx,%ecx - rorl $7,%ebx - movdqa %xmm7,%xmm10 - movl %eax,%esi - xorl %ecx,%edi - movdqa %xmm8,32(%rsp) - roll $5,%eax - addl %edi,%ebp - xorl %ebx,%esi - pslld $2,%xmm7 - xorl %ecx,%ebx - addl %eax,%ebp - psrld $30,%xmm10 - addl 56(%rsp),%edx - andl %ebx,%esi - xorl %ecx,%ebx - por %xmm10,%xmm7 - rorl $7,%eax - movl %ebp,%edi - xorl %ebx,%esi - roll $5,%ebp - pshufd $238,%xmm6,%xmm8 - addl %esi,%edx - xorl %eax,%edi - xorl %ebx,%eax - addl %ebp,%edx - addl 60(%rsp),%ecx - andl %eax,%edi - xorl %ebx,%eax - rorl $7,%ebp - movl %edx,%esi - xorl %eax,%edi - roll $5,%edx - addl %edi,%ecx - xorl %ebp,%esi - xorl %eax,%ebp - addl %edx,%ecx - pxor %xmm4,%xmm0 - addl 0(%rsp),%ebx - andl %ebp,%esi - xorl %eax,%ebp - rorl $7,%edx - punpcklqdq %xmm7,%xmm8 - movl %ecx,%edi - xorl %ebp,%esi - pxor %xmm1,%xmm0 - roll $5,%ecx - addl %esi,%ebx - movdqa %xmm9,%xmm10 - xorl %edx,%edi - paddd %xmm7,%xmm9 - xorl %ebp,%edx - pxor %xmm8,%xmm0 - addl %ecx,%ebx - addl 4(%rsp),%eax - andl %edx,%edi - xorl %ebp,%edx - rorl $7,%ecx - movdqa %xmm0,%xmm8 - movl %ebx,%esi - xorl %edx,%edi - movdqa %xmm9,48(%rsp) - roll $5,%ebx - addl %edi,%eax - xorl %ecx,%esi - pslld $2,%xmm0 - xorl %edx,%ecx - addl %ebx,%eax - psrld $30,%xmm8 - addl 8(%rsp),%ebp - andl %ecx,%esi - xorl %edx,%ecx - por %xmm8,%xmm0 - rorl $7,%ebx - movl %eax,%edi - xorl %ecx,%esi - roll $5,%eax - pshufd $238,%xmm7,%xmm9 - addl %esi,%ebp - xorl %ebx,%edi - xorl %ecx,%ebx - addl %eax,%ebp - addl 12(%rsp),%edx - andl %ebx,%edi - xorl %ecx,%ebx - rorl $7,%eax - movl %ebp,%esi - xorl %ebx,%edi - roll $5,%ebp - addl %edi,%edx - xorl %eax,%esi - xorl %ebx,%eax - addl %ebp,%edx - pxor %xmm5,%xmm1 - addl 16(%rsp),%ecx - andl %eax,%esi - xorl %ebx,%eax - rorl $7,%ebp - punpcklqdq %xmm0,%xmm9 - movl %edx,%edi - xorl %eax,%esi - pxor %xmm2,%xmm1 - roll $5,%edx - addl %esi,%ecx - movdqa %xmm10,%xmm8 - xorl %ebp,%edi - paddd %xmm0,%xmm10 - xorl %eax,%ebp - pxor %xmm9,%xmm1 - addl %edx,%ecx - addl 20(%rsp),%ebx - andl %ebp,%edi - xorl %eax,%ebp - rorl $7,%edx - movdqa %xmm1,%xmm9 - movl %ecx,%esi - xorl %ebp,%edi - movdqa %xmm10,0(%rsp) - roll $5,%ecx - addl %edi,%ebx - xorl %edx,%esi - pslld $2,%xmm1 - xorl %ebp,%edx - addl %ecx,%ebx - psrld $30,%xmm9 - addl 24(%rsp),%eax - andl %edx,%esi - xorl %ebp,%edx - por %xmm9,%xmm1 - rorl $7,%ecx - movl %ebx,%edi - xorl %edx,%esi - roll $5,%ebx - pshufd $238,%xmm0,%xmm10 - addl %esi,%eax - xorl %ecx,%edi - xorl %edx,%ecx - addl %ebx,%eax - addl 28(%rsp),%ebp - andl %ecx,%edi - xorl %edx,%ecx - rorl $7,%ebx - movl %eax,%esi - xorl %ecx,%edi - roll $5,%eax - addl %edi,%ebp - xorl %ebx,%esi - xorl %ecx,%ebx - addl %eax,%ebp - pxor %xmm6,%xmm2 - addl 32(%rsp),%edx - andl %ebx,%esi - xorl %ecx,%ebx - rorl $7,%eax - punpcklqdq %xmm1,%xmm10 - movl %ebp,%edi - xorl %ebx,%esi - pxor %xmm3,%xmm2 - roll $5,%ebp - addl %esi,%edx - movdqa %xmm8,%xmm9 - xorl %eax,%edi - paddd %xmm1,%xmm8 - xorl %ebx,%eax - pxor %xmm10,%xmm2 - addl %ebp,%edx - addl 36(%rsp),%ecx - andl %eax,%edi - xorl %ebx,%eax - rorl $7,%ebp - movdqa %xmm2,%xmm10 - movl %edx,%esi - xorl %eax,%edi - movdqa %xmm8,16(%rsp) - roll $5,%edx - addl %edi,%ecx - xorl %ebp,%esi - pslld $2,%xmm2 - xorl %eax,%ebp - addl %edx,%ecx - psrld $30,%xmm10 - addl 40(%rsp),%ebx - andl %ebp,%esi - xorl %eax,%ebp - por %xmm10,%xmm2 - rorl $7,%edx - movl %ecx,%edi - xorl %ebp,%esi - roll $5,%ecx - pshufd $238,%xmm1,%xmm8 - addl %esi,%ebx - xorl %edx,%edi - xorl %ebp,%edx - addl %ecx,%ebx - addl 44(%rsp),%eax - andl %edx,%edi - xorl %ebp,%edx - rorl $7,%ecx - movl %ebx,%esi - xorl %edx,%edi - roll $5,%ebx - addl %edi,%eax - xorl %edx,%esi - addl %ebx,%eax - pxor %xmm7,%xmm3 - addl 48(%rsp),%ebp - xorl %ecx,%esi - punpcklqdq %xmm2,%xmm8 - movl %eax,%edi - roll $5,%eax - pxor %xmm4,%xmm3 - addl %esi,%ebp - xorl %ecx,%edi - movdqa %xmm9,%xmm10 - rorl $7,%ebx - paddd %xmm2,%xmm9 - addl %eax,%ebp - pxor %xmm8,%xmm3 - addl 52(%rsp),%edx - xorl %ebx,%edi - movl %ebp,%esi - roll $5,%ebp - movdqa %xmm3,%xmm8 - addl %edi,%edx - xorl %ebx,%esi - movdqa %xmm9,32(%rsp) - rorl $7,%eax - addl %ebp,%edx - addl 56(%rsp),%ecx - pslld $2,%xmm3 - xorl %eax,%esi - movl %edx,%edi - psrld $30,%xmm8 - roll $5,%edx - addl %esi,%ecx - xorl %eax,%edi - rorl $7,%ebp - por %xmm8,%xmm3 - addl %edx,%ecx - addl 60(%rsp),%ebx - xorl %ebp,%edi - movl %ecx,%esi - roll $5,%ecx - addl %edi,%ebx - xorl %ebp,%esi - rorl $7,%edx - addl %ecx,%ebx - addl 0(%rsp),%eax - xorl %edx,%esi - movl %ebx,%edi - roll $5,%ebx - paddd %xmm3,%xmm10 - addl %esi,%eax - xorl %edx,%edi - movdqa %xmm10,48(%rsp) - rorl $7,%ecx - addl %ebx,%eax - addl 4(%rsp),%ebp - xorl %ecx,%edi - movl %eax,%esi - roll $5,%eax - addl %edi,%ebp - xorl %ecx,%esi - rorl $7,%ebx - addl %eax,%ebp - addl 8(%rsp),%edx - xorl %ebx,%esi - movl %ebp,%edi - roll $5,%ebp - addl %esi,%edx - xorl %ebx,%edi - rorl $7,%eax - addl %ebp,%edx - addl 12(%rsp),%ecx - xorl %eax,%edi - movl %edx,%esi - roll $5,%edx - addl %edi,%ecx - xorl %eax,%esi - rorl $7,%ebp - addl %edx,%ecx - cmpq %r10,%r9 - je .Ldone_ssse3 - movdqa 64(%r11),%xmm6 - movdqa -64(%r11),%xmm9 - movdqu 0(%r9),%xmm0 - movdqu 16(%r9),%xmm1 - movdqu 32(%r9),%xmm2 - movdqu 48(%r9),%xmm3 -.byte 102,15,56,0,198 - addq $64,%r9 - addl 16(%rsp),%ebx - xorl %ebp,%esi - movl %ecx,%edi -.byte 102,15,56,0,206 - roll $5,%ecx - addl %esi,%ebx - xorl %ebp,%edi - rorl $7,%edx - paddd %xmm9,%xmm0 - addl %ecx,%ebx - addl 20(%rsp),%eax - xorl %edx,%edi - movl %ebx,%esi - movdqa %xmm0,0(%rsp) - roll $5,%ebx - addl %edi,%eax - xorl %edx,%esi - rorl $7,%ecx - psubd %xmm9,%xmm0 - addl %ebx,%eax - addl 24(%rsp),%ebp - xorl %ecx,%esi - movl %eax,%edi - roll $5,%eax - addl %esi,%ebp - xorl %ecx,%edi - rorl $7,%ebx - addl %eax,%ebp - addl 28(%rsp),%edx - xorl %ebx,%edi - movl %ebp,%esi - roll $5,%ebp - addl %edi,%edx - xorl %ebx,%esi - rorl $7,%eax - addl %ebp,%edx - addl 32(%rsp),%ecx - xorl %eax,%esi - movl %edx,%edi -.byte 102,15,56,0,214 - roll $5,%edx - addl %esi,%ecx - xorl %eax,%edi - rorl $7,%ebp - paddd %xmm9,%xmm1 - addl %edx,%ecx - addl 36(%rsp),%ebx - xorl %ebp,%edi - movl %ecx,%esi - movdqa %xmm1,16(%rsp) - roll $5,%ecx - addl %edi,%ebx - xorl %ebp,%esi - rorl $7,%edx - psubd %xmm9,%xmm1 - addl %ecx,%ebx - addl 40(%rsp),%eax - xorl %edx,%esi - movl %ebx,%edi - roll $5,%ebx - addl %esi,%eax - xorl %edx,%edi - rorl $7,%ecx - addl %ebx,%eax - addl 44(%rsp),%ebp - xorl %ecx,%edi - movl %eax,%esi - roll $5,%eax - addl %edi,%ebp - xorl %ecx,%esi - rorl $7,%ebx - addl %eax,%ebp - addl 48(%rsp),%edx - xorl %ebx,%esi - movl %ebp,%edi -.byte 102,15,56,0,222 - roll $5,%ebp - addl %esi,%edx - xorl %ebx,%edi - rorl $7,%eax - paddd %xmm9,%xmm2 - addl %ebp,%edx - addl 52(%rsp),%ecx - xorl %eax,%edi - movl %edx,%esi - movdqa %xmm2,32(%rsp) - roll $5,%edx - addl %edi,%ecx - xorl %eax,%esi - rorl $7,%ebp - psubd %xmm9,%xmm2 - addl %edx,%ecx - addl 56(%rsp),%ebx - xorl %ebp,%esi - movl %ecx,%edi - roll $5,%ecx - addl %esi,%ebx - xorl %ebp,%edi - rorl $7,%edx - addl %ecx,%ebx - addl 60(%rsp),%eax - xorl %edx,%edi - movl %ebx,%esi - roll $5,%ebx - addl %edi,%eax - rorl $7,%ecx - addl %ebx,%eax - addl 0(%r8),%eax - addl 4(%r8),%esi - addl 8(%r8),%ecx - addl 12(%r8),%edx - movl %eax,0(%r8) - addl 16(%r8),%ebp - movl %esi,4(%r8) - movl %esi,%ebx - movl %ecx,8(%r8) - movl %ecx,%edi - movl %edx,12(%r8) - xorl %edx,%edi - movl %ebp,16(%r8) - andl %edi,%esi - jmp .Loop_ssse3 - -.align 16 -.Ldone_ssse3: - addl 16(%rsp),%ebx - xorl %ebp,%esi - movl %ecx,%edi - roll $5,%ecx - addl %esi,%ebx - xorl %ebp,%edi - rorl $7,%edx - addl %ecx,%ebx - addl 20(%rsp),%eax - xorl %edx,%edi - movl %ebx,%esi - roll $5,%ebx - addl %edi,%eax - xorl %edx,%esi - rorl $7,%ecx - addl %ebx,%eax - addl 24(%rsp),%ebp - xorl %ecx,%esi - movl %eax,%edi - roll $5,%eax - addl %esi,%ebp - xorl %ecx,%edi - rorl $7,%ebx - addl %eax,%ebp - addl 28(%rsp),%edx - xorl %ebx,%edi - movl %ebp,%esi - roll $5,%ebp - addl %edi,%edx - xorl %ebx,%esi - rorl $7,%eax - addl %ebp,%edx - addl 32(%rsp),%ecx - xorl %eax,%esi - movl %edx,%edi - roll $5,%edx - addl %esi,%ecx - xorl %eax,%edi - rorl $7,%ebp - addl %edx,%ecx - addl 36(%rsp),%ebx - xorl %ebp,%edi - movl %ecx,%esi - roll $5,%ecx - addl %edi,%ebx - xorl %ebp,%esi - rorl $7,%edx - addl %ecx,%ebx - addl 40(%rsp),%eax - xorl %edx,%esi - movl %ebx,%edi - roll $5,%ebx - addl %esi,%eax - xorl %edx,%edi - rorl $7,%ecx - addl %ebx,%eax - addl 44(%rsp),%ebp - xorl %ecx,%edi - movl %eax,%esi - roll $5,%eax - addl %edi,%ebp - xorl %ecx,%esi - rorl $7,%ebx - addl %eax,%ebp - addl 48(%rsp),%edx - xorl %ebx,%esi - movl %ebp,%edi - roll $5,%ebp - addl %esi,%edx - xorl %ebx,%edi - rorl $7,%eax - addl %ebp,%edx - addl 52(%rsp),%ecx - xorl %eax,%edi - movl %edx,%esi - roll $5,%edx - addl %edi,%ecx - xorl %eax,%esi - rorl $7,%ebp - addl %edx,%ecx - addl 56(%rsp),%ebx - xorl %ebp,%esi - movl %ecx,%edi - roll $5,%ecx - addl %esi,%ebx - xorl %ebp,%edi - rorl $7,%edx - addl %ecx,%ebx - addl 60(%rsp),%eax - xorl %edx,%edi - movl %ebx,%esi - roll $5,%ebx - addl %edi,%eax - rorl $7,%ecx - addl %ebx,%eax - addl 0(%r8),%eax - addl 4(%r8),%esi - addl 8(%r8),%ecx - movl %eax,0(%r8) - addl 12(%r8),%edx - movl %esi,4(%r8) - addl 16(%r8),%ebp - movl %ecx,8(%r8) - movl %edx,12(%r8) - movl %ebp,16(%r8) - leaq (%r14),%rsi - movq -40(%rsi),%r14 - movq -32(%rsi),%r13 - movq -24(%rsi),%r12 - movq -16(%rsi),%rbp - movq -8(%rsi),%rbx - leaq (%rsi),%rsp -.Lepilogue_ssse3: - .byte 0xf3,0xc3 -.size sha1_block_data_order_ssse3,.-sha1_block_data_order_ssse3 -.align 64 -K_XX_XX: -.long 0x5a827999,0x5a827999,0x5a827999,0x5a827999 -.long 0x5a827999,0x5a827999,0x5a827999,0x5a827999 -.long 0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1 -.long 0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1 -.long 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc -.long 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc -.long 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6 -.long 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6 -.long 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f -.long 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f -.byte 0xf,0xe,0xd,0xc,0xb,0xa,0x9,0x8,0x7,0x6,0x5,0x4,0x3,0x2,0x1,0x0 -.byte 83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 64 -#endif diff --git a/third_party/boringssl/linux-x86_64/crypto/sha/sha256-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/sha/sha256-x86_64.S deleted file mode 100644 index f526de51ad09a..0000000000000 --- a/third_party/boringssl/linux-x86_64/crypto/sha/sha256-x86_64.S +++ /dev/null @@ -1,2844 +0,0 @@ -#if defined(__x86_64__) -.text - -.extern OPENSSL_ia32cap_P -.hidden OPENSSL_ia32cap_P -.globl sha256_block_data_order -.hidden sha256_block_data_order -.type sha256_block_data_order,@function -.align 16 -sha256_block_data_order: - leaq OPENSSL_ia32cap_P(%rip),%r11 - movl 0(%r11),%r9d - movl 4(%r11),%r10d - movl 8(%r11),%r11d - testl $512,%r10d - jnz .Lssse3_shortcut - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - movq %rsp,%r11 - shlq $4,%rdx - subq $64+32,%rsp - leaq (%rsi,%rdx,4),%rdx - andq $-64,%rsp - movq %rdi,64+0(%rsp) - movq %rsi,64+8(%rsp) - movq %rdx,64+16(%rsp) - movq %r11,64+24(%rsp) -.Lprologue: - - movl 0(%rdi),%eax - movl 4(%rdi),%ebx - movl 8(%rdi),%ecx - movl 12(%rdi),%edx - movl 16(%rdi),%r8d - movl 20(%rdi),%r9d - movl 24(%rdi),%r10d - movl 28(%rdi),%r11d - jmp .Lloop - -.align 16 -.Lloop: - movl %ebx,%edi - leaq K256(%rip),%rbp - xorl %ecx,%edi - movl 0(%rsi),%r12d - movl %r8d,%r13d - movl %eax,%r14d - bswapl %r12d - rorl $14,%r13d - movl %r9d,%r15d - - xorl %r8d,%r13d - rorl $9,%r14d - xorl %r10d,%r15d - - movl %r12d,0(%rsp) - xorl %eax,%r14d - andl %r8d,%r15d - - rorl $5,%r13d - addl %r11d,%r12d - xorl %r10d,%r15d - - rorl $11,%r14d - xorl %r8d,%r13d - addl %r15d,%r12d - - movl %eax,%r15d - addl (%rbp),%r12d - xorl %eax,%r14d - - xorl %ebx,%r15d - rorl $6,%r13d - movl %ebx,%r11d - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%r11d - addl %r12d,%edx - addl %r12d,%r11d - - leaq 4(%rbp),%rbp - addl %r14d,%r11d - movl 4(%rsi),%r12d - movl %edx,%r13d - movl %r11d,%r14d - bswapl %r12d - rorl $14,%r13d - movl %r8d,%edi - - xorl %edx,%r13d - rorl $9,%r14d - xorl %r9d,%edi - - movl %r12d,4(%rsp) - xorl %r11d,%r14d - andl %edx,%edi - - rorl $5,%r13d - addl %r10d,%r12d - xorl %r9d,%edi - - rorl $11,%r14d - xorl %edx,%r13d - addl %edi,%r12d - - movl %r11d,%edi - addl (%rbp),%r12d - xorl %r11d,%r14d - - xorl %eax,%edi - rorl $6,%r13d - movl %eax,%r10d - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%r10d - addl %r12d,%ecx - addl %r12d,%r10d - - leaq 4(%rbp),%rbp - addl %r14d,%r10d - movl 8(%rsi),%r12d - movl %ecx,%r13d - movl %r10d,%r14d - bswapl %r12d - rorl $14,%r13d - movl %edx,%r15d - - xorl %ecx,%r13d - rorl $9,%r14d - xorl %r8d,%r15d - - movl %r12d,8(%rsp) - xorl %r10d,%r14d - andl %ecx,%r15d - - rorl $5,%r13d - addl %r9d,%r12d - xorl %r8d,%r15d - - rorl $11,%r14d - xorl %ecx,%r13d - addl %r15d,%r12d - - movl %r10d,%r15d - addl (%rbp),%r12d - xorl %r10d,%r14d - - xorl %r11d,%r15d - rorl $6,%r13d - movl %r11d,%r9d - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%r9d - addl %r12d,%ebx - addl %r12d,%r9d - - leaq 4(%rbp),%rbp - addl %r14d,%r9d - movl 12(%rsi),%r12d - movl %ebx,%r13d - movl %r9d,%r14d - bswapl %r12d - rorl $14,%r13d - movl %ecx,%edi - - xorl %ebx,%r13d - rorl $9,%r14d - xorl %edx,%edi - - movl %r12d,12(%rsp) - xorl %r9d,%r14d - andl %ebx,%edi - - rorl $5,%r13d - addl %r8d,%r12d - xorl %edx,%edi - - rorl $11,%r14d - xorl %ebx,%r13d - addl %edi,%r12d - - movl %r9d,%edi - addl (%rbp),%r12d - xorl %r9d,%r14d - - xorl %r10d,%edi - rorl $6,%r13d - movl %r10d,%r8d - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%r8d - addl %r12d,%eax - addl %r12d,%r8d - - leaq 20(%rbp),%rbp - addl %r14d,%r8d - movl 16(%rsi),%r12d - movl %eax,%r13d - movl %r8d,%r14d - bswapl %r12d - rorl $14,%r13d - movl %ebx,%r15d - - xorl %eax,%r13d - rorl $9,%r14d - xorl %ecx,%r15d - - movl %r12d,16(%rsp) - xorl %r8d,%r14d - andl %eax,%r15d - - rorl $5,%r13d - addl %edx,%r12d - xorl %ecx,%r15d - - rorl $11,%r14d - xorl %eax,%r13d - addl %r15d,%r12d - - movl %r8d,%r15d - addl (%rbp),%r12d - xorl %r8d,%r14d - - xorl %r9d,%r15d - rorl $6,%r13d - movl %r9d,%edx - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%edx - addl %r12d,%r11d - addl %r12d,%edx - - leaq 4(%rbp),%rbp - addl %r14d,%edx - movl 20(%rsi),%r12d - movl %r11d,%r13d - movl %edx,%r14d - bswapl %r12d - rorl $14,%r13d - movl %eax,%edi - - xorl %r11d,%r13d - rorl $9,%r14d - xorl %ebx,%edi - - movl %r12d,20(%rsp) - xorl %edx,%r14d - andl %r11d,%edi - - rorl $5,%r13d - addl %ecx,%r12d - xorl %ebx,%edi - - rorl $11,%r14d - xorl %r11d,%r13d - addl %edi,%r12d - - movl %edx,%edi - addl (%rbp),%r12d - xorl %edx,%r14d - - xorl %r8d,%edi - rorl $6,%r13d - movl %r8d,%ecx - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%ecx - addl %r12d,%r10d - addl %r12d,%ecx - - leaq 4(%rbp),%rbp - addl %r14d,%ecx - movl 24(%rsi),%r12d - movl %r10d,%r13d - movl %ecx,%r14d - bswapl %r12d - rorl $14,%r13d - movl %r11d,%r15d - - xorl %r10d,%r13d - rorl $9,%r14d - xorl %eax,%r15d - - movl %r12d,24(%rsp) - xorl %ecx,%r14d - andl %r10d,%r15d - - rorl $5,%r13d - addl %ebx,%r12d - xorl %eax,%r15d - - rorl $11,%r14d - xorl %r10d,%r13d - addl %r15d,%r12d - - movl %ecx,%r15d - addl (%rbp),%r12d - xorl %ecx,%r14d - - xorl %edx,%r15d - rorl $6,%r13d - movl %edx,%ebx - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%ebx - addl %r12d,%r9d - addl %r12d,%ebx - - leaq 4(%rbp),%rbp - addl %r14d,%ebx - movl 28(%rsi),%r12d - movl %r9d,%r13d - movl %ebx,%r14d - bswapl %r12d - rorl $14,%r13d - movl %r10d,%edi - - xorl %r9d,%r13d - rorl $9,%r14d - xorl %r11d,%edi - - movl %r12d,28(%rsp) - xorl %ebx,%r14d - andl %r9d,%edi - - rorl $5,%r13d - addl %eax,%r12d - xorl %r11d,%edi - - rorl $11,%r14d - xorl %r9d,%r13d - addl %edi,%r12d - - movl %ebx,%edi - addl (%rbp),%r12d - xorl %ebx,%r14d - - xorl %ecx,%edi - rorl $6,%r13d - movl %ecx,%eax - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%eax - addl %r12d,%r8d - addl %r12d,%eax - - leaq 20(%rbp),%rbp - addl %r14d,%eax - movl 32(%rsi),%r12d - movl %r8d,%r13d - movl %eax,%r14d - bswapl %r12d - rorl $14,%r13d - movl %r9d,%r15d - - xorl %r8d,%r13d - rorl $9,%r14d - xorl %r10d,%r15d - - movl %r12d,32(%rsp) - xorl %eax,%r14d - andl %r8d,%r15d - - rorl $5,%r13d - addl %r11d,%r12d - xorl %r10d,%r15d - - rorl $11,%r14d - xorl %r8d,%r13d - addl %r15d,%r12d - - movl %eax,%r15d - addl (%rbp),%r12d - xorl %eax,%r14d - - xorl %ebx,%r15d - rorl $6,%r13d - movl %ebx,%r11d - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%r11d - addl %r12d,%edx - addl %r12d,%r11d - - leaq 4(%rbp),%rbp - addl %r14d,%r11d - movl 36(%rsi),%r12d - movl %edx,%r13d - movl %r11d,%r14d - bswapl %r12d - rorl $14,%r13d - movl %r8d,%edi - - xorl %edx,%r13d - rorl $9,%r14d - xorl %r9d,%edi - - movl %r12d,36(%rsp) - xorl %r11d,%r14d - andl %edx,%edi - - rorl $5,%r13d - addl %r10d,%r12d - xorl %r9d,%edi - - rorl $11,%r14d - xorl %edx,%r13d - addl %edi,%r12d - - movl %r11d,%edi - addl (%rbp),%r12d - xorl %r11d,%r14d - - xorl %eax,%edi - rorl $6,%r13d - movl %eax,%r10d - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%r10d - addl %r12d,%ecx - addl %r12d,%r10d - - leaq 4(%rbp),%rbp - addl %r14d,%r10d - movl 40(%rsi),%r12d - movl %ecx,%r13d - movl %r10d,%r14d - bswapl %r12d - rorl $14,%r13d - movl %edx,%r15d - - xorl %ecx,%r13d - rorl $9,%r14d - xorl %r8d,%r15d - - movl %r12d,40(%rsp) - xorl %r10d,%r14d - andl %ecx,%r15d - - rorl $5,%r13d - addl %r9d,%r12d - xorl %r8d,%r15d - - rorl $11,%r14d - xorl %ecx,%r13d - addl %r15d,%r12d - - movl %r10d,%r15d - addl (%rbp),%r12d - xorl %r10d,%r14d - - xorl %r11d,%r15d - rorl $6,%r13d - movl %r11d,%r9d - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%r9d - addl %r12d,%ebx - addl %r12d,%r9d - - leaq 4(%rbp),%rbp - addl %r14d,%r9d - movl 44(%rsi),%r12d - movl %ebx,%r13d - movl %r9d,%r14d - bswapl %r12d - rorl $14,%r13d - movl %ecx,%edi - - xorl %ebx,%r13d - rorl $9,%r14d - xorl %edx,%edi - - movl %r12d,44(%rsp) - xorl %r9d,%r14d - andl %ebx,%edi - - rorl $5,%r13d - addl %r8d,%r12d - xorl %edx,%edi - - rorl $11,%r14d - xorl %ebx,%r13d - addl %edi,%r12d - - movl %r9d,%edi - addl (%rbp),%r12d - xorl %r9d,%r14d - - xorl %r10d,%edi - rorl $6,%r13d - movl %r10d,%r8d - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%r8d - addl %r12d,%eax - addl %r12d,%r8d - - leaq 20(%rbp),%rbp - addl %r14d,%r8d - movl 48(%rsi),%r12d - movl %eax,%r13d - movl %r8d,%r14d - bswapl %r12d - rorl $14,%r13d - movl %ebx,%r15d - - xorl %eax,%r13d - rorl $9,%r14d - xorl %ecx,%r15d - - movl %r12d,48(%rsp) - xorl %r8d,%r14d - andl %eax,%r15d - - rorl $5,%r13d - addl %edx,%r12d - xorl %ecx,%r15d - - rorl $11,%r14d - xorl %eax,%r13d - addl %r15d,%r12d - - movl %r8d,%r15d - addl (%rbp),%r12d - xorl %r8d,%r14d - - xorl %r9d,%r15d - rorl $6,%r13d - movl %r9d,%edx - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%edx - addl %r12d,%r11d - addl %r12d,%edx - - leaq 4(%rbp),%rbp - addl %r14d,%edx - movl 52(%rsi),%r12d - movl %r11d,%r13d - movl %edx,%r14d - bswapl %r12d - rorl $14,%r13d - movl %eax,%edi - - xorl %r11d,%r13d - rorl $9,%r14d - xorl %ebx,%edi - - movl %r12d,52(%rsp) - xorl %edx,%r14d - andl %r11d,%edi - - rorl $5,%r13d - addl %ecx,%r12d - xorl %ebx,%edi - - rorl $11,%r14d - xorl %r11d,%r13d - addl %edi,%r12d - - movl %edx,%edi - addl (%rbp),%r12d - xorl %edx,%r14d - - xorl %r8d,%edi - rorl $6,%r13d - movl %r8d,%ecx - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%ecx - addl %r12d,%r10d - addl %r12d,%ecx - - leaq 4(%rbp),%rbp - addl %r14d,%ecx - movl 56(%rsi),%r12d - movl %r10d,%r13d - movl %ecx,%r14d - bswapl %r12d - rorl $14,%r13d - movl %r11d,%r15d - - xorl %r10d,%r13d - rorl $9,%r14d - xorl %eax,%r15d - - movl %r12d,56(%rsp) - xorl %ecx,%r14d - andl %r10d,%r15d - - rorl $5,%r13d - addl %ebx,%r12d - xorl %eax,%r15d - - rorl $11,%r14d - xorl %r10d,%r13d - addl %r15d,%r12d - - movl %ecx,%r15d - addl (%rbp),%r12d - xorl %ecx,%r14d - - xorl %edx,%r15d - rorl $6,%r13d - movl %edx,%ebx - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%ebx - addl %r12d,%r9d - addl %r12d,%ebx - - leaq 4(%rbp),%rbp - addl %r14d,%ebx - movl 60(%rsi),%r12d - movl %r9d,%r13d - movl %ebx,%r14d - bswapl %r12d - rorl $14,%r13d - movl %r10d,%edi - - xorl %r9d,%r13d - rorl $9,%r14d - xorl %r11d,%edi - - movl %r12d,60(%rsp) - xorl %ebx,%r14d - andl %r9d,%edi - - rorl $5,%r13d - addl %eax,%r12d - xorl %r11d,%edi - - rorl $11,%r14d - xorl %r9d,%r13d - addl %edi,%r12d - - movl %ebx,%edi - addl (%rbp),%r12d - xorl %ebx,%r14d - - xorl %ecx,%edi - rorl $6,%r13d - movl %ecx,%eax - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%eax - addl %r12d,%r8d - addl %r12d,%eax - - leaq 20(%rbp),%rbp - jmp .Lrounds_16_xx -.align 16 -.Lrounds_16_xx: - movl 4(%rsp),%r13d - movl 56(%rsp),%r15d - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%eax - movl %r15d,%r14d - rorl $2,%r15d - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%r15d - shrl $10,%r14d - - rorl $17,%r15d - xorl %r13d,%r12d - xorl %r14d,%r15d - addl 36(%rsp),%r12d - - addl 0(%rsp),%r12d - movl %r8d,%r13d - addl %r15d,%r12d - movl %eax,%r14d - rorl $14,%r13d - movl %r9d,%r15d - - xorl %r8d,%r13d - rorl $9,%r14d - xorl %r10d,%r15d - - movl %r12d,0(%rsp) - xorl %eax,%r14d - andl %r8d,%r15d - - rorl $5,%r13d - addl %r11d,%r12d - xorl %r10d,%r15d - - rorl $11,%r14d - xorl %r8d,%r13d - addl %r15d,%r12d - - movl %eax,%r15d - addl (%rbp),%r12d - xorl %eax,%r14d - - xorl %ebx,%r15d - rorl $6,%r13d - movl %ebx,%r11d - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%r11d - addl %r12d,%edx - addl %r12d,%r11d - - leaq 4(%rbp),%rbp - movl 8(%rsp),%r13d - movl 60(%rsp),%edi - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%r11d - movl %edi,%r14d - rorl $2,%edi - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%edi - shrl $10,%r14d - - rorl $17,%edi - xorl %r13d,%r12d - xorl %r14d,%edi - addl 40(%rsp),%r12d - - addl 4(%rsp),%r12d - movl %edx,%r13d - addl %edi,%r12d - movl %r11d,%r14d - rorl $14,%r13d - movl %r8d,%edi - - xorl %edx,%r13d - rorl $9,%r14d - xorl %r9d,%edi - - movl %r12d,4(%rsp) - xorl %r11d,%r14d - andl %edx,%edi - - rorl $5,%r13d - addl %r10d,%r12d - xorl %r9d,%edi - - rorl $11,%r14d - xorl %edx,%r13d - addl %edi,%r12d - - movl %r11d,%edi - addl (%rbp),%r12d - xorl %r11d,%r14d - - xorl %eax,%edi - rorl $6,%r13d - movl %eax,%r10d - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%r10d - addl %r12d,%ecx - addl %r12d,%r10d - - leaq 4(%rbp),%rbp - movl 12(%rsp),%r13d - movl 0(%rsp),%r15d - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%r10d - movl %r15d,%r14d - rorl $2,%r15d - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%r15d - shrl $10,%r14d - - rorl $17,%r15d - xorl %r13d,%r12d - xorl %r14d,%r15d - addl 44(%rsp),%r12d - - addl 8(%rsp),%r12d - movl %ecx,%r13d - addl %r15d,%r12d - movl %r10d,%r14d - rorl $14,%r13d - movl %edx,%r15d - - xorl %ecx,%r13d - rorl $9,%r14d - xorl %r8d,%r15d - - movl %r12d,8(%rsp) - xorl %r10d,%r14d - andl %ecx,%r15d - - rorl $5,%r13d - addl %r9d,%r12d - xorl %r8d,%r15d - - rorl $11,%r14d - xorl %ecx,%r13d - addl %r15d,%r12d - - movl %r10d,%r15d - addl (%rbp),%r12d - xorl %r10d,%r14d - - xorl %r11d,%r15d - rorl $6,%r13d - movl %r11d,%r9d - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%r9d - addl %r12d,%ebx - addl %r12d,%r9d - - leaq 4(%rbp),%rbp - movl 16(%rsp),%r13d - movl 4(%rsp),%edi - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%r9d - movl %edi,%r14d - rorl $2,%edi - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%edi - shrl $10,%r14d - - rorl $17,%edi - xorl %r13d,%r12d - xorl %r14d,%edi - addl 48(%rsp),%r12d - - addl 12(%rsp),%r12d - movl %ebx,%r13d - addl %edi,%r12d - movl %r9d,%r14d - rorl $14,%r13d - movl %ecx,%edi - - xorl %ebx,%r13d - rorl $9,%r14d - xorl %edx,%edi - - movl %r12d,12(%rsp) - xorl %r9d,%r14d - andl %ebx,%edi - - rorl $5,%r13d - addl %r8d,%r12d - xorl %edx,%edi - - rorl $11,%r14d - xorl %ebx,%r13d - addl %edi,%r12d - - movl %r9d,%edi - addl (%rbp),%r12d - xorl %r9d,%r14d - - xorl %r10d,%edi - rorl $6,%r13d - movl %r10d,%r8d - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%r8d - addl %r12d,%eax - addl %r12d,%r8d - - leaq 20(%rbp),%rbp - movl 20(%rsp),%r13d - movl 8(%rsp),%r15d - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%r8d - movl %r15d,%r14d - rorl $2,%r15d - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%r15d - shrl $10,%r14d - - rorl $17,%r15d - xorl %r13d,%r12d - xorl %r14d,%r15d - addl 52(%rsp),%r12d - - addl 16(%rsp),%r12d - movl %eax,%r13d - addl %r15d,%r12d - movl %r8d,%r14d - rorl $14,%r13d - movl %ebx,%r15d - - xorl %eax,%r13d - rorl $9,%r14d - xorl %ecx,%r15d - - movl %r12d,16(%rsp) - xorl %r8d,%r14d - andl %eax,%r15d - - rorl $5,%r13d - addl %edx,%r12d - xorl %ecx,%r15d - - rorl $11,%r14d - xorl %eax,%r13d - addl %r15d,%r12d - - movl %r8d,%r15d - addl (%rbp),%r12d - xorl %r8d,%r14d - - xorl %r9d,%r15d - rorl $6,%r13d - movl %r9d,%edx - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%edx - addl %r12d,%r11d - addl %r12d,%edx - - leaq 4(%rbp),%rbp - movl 24(%rsp),%r13d - movl 12(%rsp),%edi - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%edx - movl %edi,%r14d - rorl $2,%edi - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%edi - shrl $10,%r14d - - rorl $17,%edi - xorl %r13d,%r12d - xorl %r14d,%edi - addl 56(%rsp),%r12d - - addl 20(%rsp),%r12d - movl %r11d,%r13d - addl %edi,%r12d - movl %edx,%r14d - rorl $14,%r13d - movl %eax,%edi - - xorl %r11d,%r13d - rorl $9,%r14d - xorl %ebx,%edi - - movl %r12d,20(%rsp) - xorl %edx,%r14d - andl %r11d,%edi - - rorl $5,%r13d - addl %ecx,%r12d - xorl %ebx,%edi - - rorl $11,%r14d - xorl %r11d,%r13d - addl %edi,%r12d - - movl %edx,%edi - addl (%rbp),%r12d - xorl %edx,%r14d - - xorl %r8d,%edi - rorl $6,%r13d - movl %r8d,%ecx - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%ecx - addl %r12d,%r10d - addl %r12d,%ecx - - leaq 4(%rbp),%rbp - movl 28(%rsp),%r13d - movl 16(%rsp),%r15d - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%ecx - movl %r15d,%r14d - rorl $2,%r15d - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%r15d - shrl $10,%r14d - - rorl $17,%r15d - xorl %r13d,%r12d - xorl %r14d,%r15d - addl 60(%rsp),%r12d - - addl 24(%rsp),%r12d - movl %r10d,%r13d - addl %r15d,%r12d - movl %ecx,%r14d - rorl $14,%r13d - movl %r11d,%r15d - - xorl %r10d,%r13d - rorl $9,%r14d - xorl %eax,%r15d - - movl %r12d,24(%rsp) - xorl %ecx,%r14d - andl %r10d,%r15d - - rorl $5,%r13d - addl %ebx,%r12d - xorl %eax,%r15d - - rorl $11,%r14d - xorl %r10d,%r13d - addl %r15d,%r12d - - movl %ecx,%r15d - addl (%rbp),%r12d - xorl %ecx,%r14d - - xorl %edx,%r15d - rorl $6,%r13d - movl %edx,%ebx - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%ebx - addl %r12d,%r9d - addl %r12d,%ebx - - leaq 4(%rbp),%rbp - movl 32(%rsp),%r13d - movl 20(%rsp),%edi - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%ebx - movl %edi,%r14d - rorl $2,%edi - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%edi - shrl $10,%r14d - - rorl $17,%edi - xorl %r13d,%r12d - xorl %r14d,%edi - addl 0(%rsp),%r12d - - addl 28(%rsp),%r12d - movl %r9d,%r13d - addl %edi,%r12d - movl %ebx,%r14d - rorl $14,%r13d - movl %r10d,%edi - - xorl %r9d,%r13d - rorl $9,%r14d - xorl %r11d,%edi - - movl %r12d,28(%rsp) - xorl %ebx,%r14d - andl %r9d,%edi - - rorl $5,%r13d - addl %eax,%r12d - xorl %r11d,%edi - - rorl $11,%r14d - xorl %r9d,%r13d - addl %edi,%r12d - - movl %ebx,%edi - addl (%rbp),%r12d - xorl %ebx,%r14d - - xorl %ecx,%edi - rorl $6,%r13d - movl %ecx,%eax - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%eax - addl %r12d,%r8d - addl %r12d,%eax - - leaq 20(%rbp),%rbp - movl 36(%rsp),%r13d - movl 24(%rsp),%r15d - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%eax - movl %r15d,%r14d - rorl $2,%r15d - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%r15d - shrl $10,%r14d - - rorl $17,%r15d - xorl %r13d,%r12d - xorl %r14d,%r15d - addl 4(%rsp),%r12d - - addl 32(%rsp),%r12d - movl %r8d,%r13d - addl %r15d,%r12d - movl %eax,%r14d - rorl $14,%r13d - movl %r9d,%r15d - - xorl %r8d,%r13d - rorl $9,%r14d - xorl %r10d,%r15d - - movl %r12d,32(%rsp) - xorl %eax,%r14d - andl %r8d,%r15d - - rorl $5,%r13d - addl %r11d,%r12d - xorl %r10d,%r15d - - rorl $11,%r14d - xorl %r8d,%r13d - addl %r15d,%r12d - - movl %eax,%r15d - addl (%rbp),%r12d - xorl %eax,%r14d - - xorl %ebx,%r15d - rorl $6,%r13d - movl %ebx,%r11d - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%r11d - addl %r12d,%edx - addl %r12d,%r11d - - leaq 4(%rbp),%rbp - movl 40(%rsp),%r13d - movl 28(%rsp),%edi - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%r11d - movl %edi,%r14d - rorl $2,%edi - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%edi - shrl $10,%r14d - - rorl $17,%edi - xorl %r13d,%r12d - xorl %r14d,%edi - addl 8(%rsp),%r12d - - addl 36(%rsp),%r12d - movl %edx,%r13d - addl %edi,%r12d - movl %r11d,%r14d - rorl $14,%r13d - movl %r8d,%edi - - xorl %edx,%r13d - rorl $9,%r14d - xorl %r9d,%edi - - movl %r12d,36(%rsp) - xorl %r11d,%r14d - andl %edx,%edi - - rorl $5,%r13d - addl %r10d,%r12d - xorl %r9d,%edi - - rorl $11,%r14d - xorl %edx,%r13d - addl %edi,%r12d - - movl %r11d,%edi - addl (%rbp),%r12d - xorl %r11d,%r14d - - xorl %eax,%edi - rorl $6,%r13d - movl %eax,%r10d - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%r10d - addl %r12d,%ecx - addl %r12d,%r10d - - leaq 4(%rbp),%rbp - movl 44(%rsp),%r13d - movl 32(%rsp),%r15d - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%r10d - movl %r15d,%r14d - rorl $2,%r15d - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%r15d - shrl $10,%r14d - - rorl $17,%r15d - xorl %r13d,%r12d - xorl %r14d,%r15d - addl 12(%rsp),%r12d - - addl 40(%rsp),%r12d - movl %ecx,%r13d - addl %r15d,%r12d - movl %r10d,%r14d - rorl $14,%r13d - movl %edx,%r15d - - xorl %ecx,%r13d - rorl $9,%r14d - xorl %r8d,%r15d - - movl %r12d,40(%rsp) - xorl %r10d,%r14d - andl %ecx,%r15d - - rorl $5,%r13d - addl %r9d,%r12d - xorl %r8d,%r15d - - rorl $11,%r14d - xorl %ecx,%r13d - addl %r15d,%r12d - - movl %r10d,%r15d - addl (%rbp),%r12d - xorl %r10d,%r14d - - xorl %r11d,%r15d - rorl $6,%r13d - movl %r11d,%r9d - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%r9d - addl %r12d,%ebx - addl %r12d,%r9d - - leaq 4(%rbp),%rbp - movl 48(%rsp),%r13d - movl 36(%rsp),%edi - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%r9d - movl %edi,%r14d - rorl $2,%edi - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%edi - shrl $10,%r14d - - rorl $17,%edi - xorl %r13d,%r12d - xorl %r14d,%edi - addl 16(%rsp),%r12d - - addl 44(%rsp),%r12d - movl %ebx,%r13d - addl %edi,%r12d - movl %r9d,%r14d - rorl $14,%r13d - movl %ecx,%edi - - xorl %ebx,%r13d - rorl $9,%r14d - xorl %edx,%edi - - movl %r12d,44(%rsp) - xorl %r9d,%r14d - andl %ebx,%edi - - rorl $5,%r13d - addl %r8d,%r12d - xorl %edx,%edi - - rorl $11,%r14d - xorl %ebx,%r13d - addl %edi,%r12d - - movl %r9d,%edi - addl (%rbp),%r12d - xorl %r9d,%r14d - - xorl %r10d,%edi - rorl $6,%r13d - movl %r10d,%r8d - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%r8d - addl %r12d,%eax - addl %r12d,%r8d - - leaq 20(%rbp),%rbp - movl 52(%rsp),%r13d - movl 40(%rsp),%r15d - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%r8d - movl %r15d,%r14d - rorl $2,%r15d - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%r15d - shrl $10,%r14d - - rorl $17,%r15d - xorl %r13d,%r12d - xorl %r14d,%r15d - addl 20(%rsp),%r12d - - addl 48(%rsp),%r12d - movl %eax,%r13d - addl %r15d,%r12d - movl %r8d,%r14d - rorl $14,%r13d - movl %ebx,%r15d - - xorl %eax,%r13d - rorl $9,%r14d - xorl %ecx,%r15d - - movl %r12d,48(%rsp) - xorl %r8d,%r14d - andl %eax,%r15d - - rorl $5,%r13d - addl %edx,%r12d - xorl %ecx,%r15d - - rorl $11,%r14d - xorl %eax,%r13d - addl %r15d,%r12d - - movl %r8d,%r15d - addl (%rbp),%r12d - xorl %r8d,%r14d - - xorl %r9d,%r15d - rorl $6,%r13d - movl %r9d,%edx - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%edx - addl %r12d,%r11d - addl %r12d,%edx - - leaq 4(%rbp),%rbp - movl 56(%rsp),%r13d - movl 44(%rsp),%edi - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%edx - movl %edi,%r14d - rorl $2,%edi - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%edi - shrl $10,%r14d - - rorl $17,%edi - xorl %r13d,%r12d - xorl %r14d,%edi - addl 24(%rsp),%r12d - - addl 52(%rsp),%r12d - movl %r11d,%r13d - addl %edi,%r12d - movl %edx,%r14d - rorl $14,%r13d - movl %eax,%edi - - xorl %r11d,%r13d - rorl $9,%r14d - xorl %ebx,%edi - - movl %r12d,52(%rsp) - xorl %edx,%r14d - andl %r11d,%edi - - rorl $5,%r13d - addl %ecx,%r12d - xorl %ebx,%edi - - rorl $11,%r14d - xorl %r11d,%r13d - addl %edi,%r12d - - movl %edx,%edi - addl (%rbp),%r12d - xorl %edx,%r14d - - xorl %r8d,%edi - rorl $6,%r13d - movl %r8d,%ecx - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%ecx - addl %r12d,%r10d - addl %r12d,%ecx - - leaq 4(%rbp),%rbp - movl 60(%rsp),%r13d - movl 48(%rsp),%r15d - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%ecx - movl %r15d,%r14d - rorl $2,%r15d - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%r15d - shrl $10,%r14d - - rorl $17,%r15d - xorl %r13d,%r12d - xorl %r14d,%r15d - addl 28(%rsp),%r12d - - addl 56(%rsp),%r12d - movl %r10d,%r13d - addl %r15d,%r12d - movl %ecx,%r14d - rorl $14,%r13d - movl %r11d,%r15d - - xorl %r10d,%r13d - rorl $9,%r14d - xorl %eax,%r15d - - movl %r12d,56(%rsp) - xorl %ecx,%r14d - andl %r10d,%r15d - - rorl $5,%r13d - addl %ebx,%r12d - xorl %eax,%r15d - - rorl $11,%r14d - xorl %r10d,%r13d - addl %r15d,%r12d - - movl %ecx,%r15d - addl (%rbp),%r12d - xorl %ecx,%r14d - - xorl %edx,%r15d - rorl $6,%r13d - movl %edx,%ebx - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%ebx - addl %r12d,%r9d - addl %r12d,%ebx - - leaq 4(%rbp),%rbp - movl 0(%rsp),%r13d - movl 52(%rsp),%edi - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%ebx - movl %edi,%r14d - rorl $2,%edi - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%edi - shrl $10,%r14d - - rorl $17,%edi - xorl %r13d,%r12d - xorl %r14d,%edi - addl 32(%rsp),%r12d - - addl 60(%rsp),%r12d - movl %r9d,%r13d - addl %edi,%r12d - movl %ebx,%r14d - rorl $14,%r13d - movl %r10d,%edi - - xorl %r9d,%r13d - rorl $9,%r14d - xorl %r11d,%edi - - movl %r12d,60(%rsp) - xorl %ebx,%r14d - andl %r9d,%edi - - rorl $5,%r13d - addl %eax,%r12d - xorl %r11d,%edi - - rorl $11,%r14d - xorl %r9d,%r13d - addl %edi,%r12d - - movl %ebx,%edi - addl (%rbp),%r12d - xorl %ebx,%r14d - - xorl %ecx,%edi - rorl $6,%r13d - movl %ecx,%eax - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%eax - addl %r12d,%r8d - addl %r12d,%eax - - leaq 20(%rbp),%rbp - cmpb $0,3(%rbp) - jnz .Lrounds_16_xx - - movq 64+0(%rsp),%rdi - addl %r14d,%eax - leaq 64(%rsi),%rsi - - addl 0(%rdi),%eax - addl 4(%rdi),%ebx - addl 8(%rdi),%ecx - addl 12(%rdi),%edx - addl 16(%rdi),%r8d - addl 20(%rdi),%r9d - addl 24(%rdi),%r10d - addl 28(%rdi),%r11d - - cmpq 64+16(%rsp),%rsi - - movl %eax,0(%rdi) - movl %ebx,4(%rdi) - movl %ecx,8(%rdi) - movl %edx,12(%rdi) - movl %r8d,16(%rdi) - movl %r9d,20(%rdi) - movl %r10d,24(%rdi) - movl %r11d,28(%rdi) - jb .Lloop - - movq 64+24(%rsp),%rsi - movq (%rsi),%r15 - movq 8(%rsi),%r14 - movq 16(%rsi),%r13 - movq 24(%rsi),%r12 - movq 32(%rsi),%rbp - movq 40(%rsi),%rbx - leaq 48(%rsi),%rsp -.Lepilogue: - .byte 0xf3,0xc3 -.size sha256_block_data_order,.-sha256_block_data_order -.align 64 -.type K256,@object -K256: -.long 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5 -.long 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5 -.long 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5 -.long 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5 -.long 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3 -.long 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3 -.long 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174 -.long 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174 -.long 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc -.long 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc -.long 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da -.long 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da -.long 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7 -.long 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7 -.long 0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967 -.long 0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967 -.long 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13 -.long 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13 -.long 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85 -.long 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85 -.long 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3 -.long 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3 -.long 0xd192e819,0xd6990624,0xf40e3585,0x106aa070 -.long 0xd192e819,0xd6990624,0xf40e3585,0x106aa070 -.long 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5 -.long 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5 -.long 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3 -.long 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3 -.long 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208 -.long 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208 -.long 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2 -.long 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2 - -.long 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f -.long 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f -.long 0x03020100,0x0b0a0908,0xffffffff,0xffffffff -.long 0x03020100,0x0b0a0908,0xffffffff,0xffffffff -.long 0xffffffff,0xffffffff,0x03020100,0x0b0a0908 -.long 0xffffffff,0xffffffff,0x03020100,0x0b0a0908 -.byte 83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.type sha256_block_data_order_ssse3,@function -.align 64 -sha256_block_data_order_ssse3: -.Lssse3_shortcut: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - movq %rsp,%r11 - shlq $4,%rdx - subq $96,%rsp - leaq (%rsi,%rdx,4),%rdx - andq $-64,%rsp - movq %rdi,64+0(%rsp) - movq %rsi,64+8(%rsp) - movq %rdx,64+16(%rsp) - movq %r11,64+24(%rsp) -.Lprologue_ssse3: - - movl 0(%rdi),%eax - movl 4(%rdi),%ebx - movl 8(%rdi),%ecx - movl 12(%rdi),%edx - movl 16(%rdi),%r8d - movl 20(%rdi),%r9d - movl 24(%rdi),%r10d - movl 28(%rdi),%r11d - - - jmp .Lloop_ssse3 -.align 16 -.Lloop_ssse3: - movdqa K256+512(%rip),%xmm7 - movdqu 0(%rsi),%xmm0 - movdqu 16(%rsi),%xmm1 - movdqu 32(%rsi),%xmm2 -.byte 102,15,56,0,199 - movdqu 48(%rsi),%xmm3 - leaq K256(%rip),%rbp -.byte 102,15,56,0,207 - movdqa 0(%rbp),%xmm4 - movdqa 32(%rbp),%xmm5 -.byte 102,15,56,0,215 - paddd %xmm0,%xmm4 - movdqa 64(%rbp),%xmm6 -.byte 102,15,56,0,223 - movdqa 96(%rbp),%xmm7 - paddd %xmm1,%xmm5 - paddd %xmm2,%xmm6 - paddd %xmm3,%xmm7 - movdqa %xmm4,0(%rsp) - movl %eax,%r14d - movdqa %xmm5,16(%rsp) - movl %ebx,%edi - movdqa %xmm6,32(%rsp) - xorl %ecx,%edi - movdqa %xmm7,48(%rsp) - movl %r8d,%r13d - jmp .Lssse3_00_47 - -.align 16 -.Lssse3_00_47: - subq $-128,%rbp - rorl $14,%r13d - movdqa %xmm1,%xmm4 - movl %r14d,%eax - movl %r9d,%r12d - movdqa %xmm3,%xmm7 - rorl $9,%r14d - xorl %r8d,%r13d - xorl %r10d,%r12d - rorl $5,%r13d - xorl %eax,%r14d -.byte 102,15,58,15,224,4 - andl %r8d,%r12d - xorl %r8d,%r13d -.byte 102,15,58,15,250,4 - addl 0(%rsp),%r11d - movl %eax,%r15d - xorl %r10d,%r12d - rorl $11,%r14d - movdqa %xmm4,%xmm5 - xorl %ebx,%r15d - addl %r12d,%r11d - movdqa %xmm4,%xmm6 - rorl $6,%r13d - andl %r15d,%edi - psrld $3,%xmm4 - xorl %eax,%r14d - addl %r13d,%r11d - xorl %ebx,%edi - paddd %xmm7,%xmm0 - rorl $2,%r14d - addl %r11d,%edx - psrld $7,%xmm6 - addl %edi,%r11d - movl %edx,%r13d - pshufd $250,%xmm3,%xmm7 - addl %r11d,%r14d - rorl $14,%r13d - pslld $14,%xmm5 - movl %r14d,%r11d - movl %r8d,%r12d - pxor %xmm6,%xmm4 - rorl $9,%r14d - xorl %edx,%r13d - xorl %r9d,%r12d - rorl $5,%r13d - psrld $11,%xmm6 - xorl %r11d,%r14d - pxor %xmm5,%xmm4 - andl %edx,%r12d - xorl %edx,%r13d - pslld $11,%xmm5 - addl 4(%rsp),%r10d - movl %r11d,%edi - pxor %xmm6,%xmm4 - xorl %r9d,%r12d - rorl $11,%r14d - movdqa %xmm7,%xmm6 - xorl %eax,%edi - addl %r12d,%r10d - pxor %xmm5,%xmm4 - rorl $6,%r13d - andl %edi,%r15d - xorl %r11d,%r14d - psrld $10,%xmm7 - addl %r13d,%r10d - xorl %eax,%r15d - paddd %xmm4,%xmm0 - rorl $2,%r14d - addl %r10d,%ecx - psrlq $17,%xmm6 - addl %r15d,%r10d - movl %ecx,%r13d - addl %r10d,%r14d - pxor %xmm6,%xmm7 - rorl $14,%r13d - movl %r14d,%r10d - movl %edx,%r12d - rorl $9,%r14d - psrlq $2,%xmm6 - xorl %ecx,%r13d - xorl %r8d,%r12d - pxor %xmm6,%xmm7 - rorl $5,%r13d - xorl %r10d,%r14d - andl %ecx,%r12d - pshufd $128,%xmm7,%xmm7 - xorl %ecx,%r13d - addl 8(%rsp),%r9d - movl %r10d,%r15d - psrldq $8,%xmm7 - xorl %r8d,%r12d - rorl $11,%r14d - xorl %r11d,%r15d - addl %r12d,%r9d - rorl $6,%r13d - paddd %xmm7,%xmm0 - andl %r15d,%edi - xorl %r10d,%r14d - addl %r13d,%r9d - pshufd $80,%xmm0,%xmm7 - xorl %r11d,%edi - rorl $2,%r14d - addl %r9d,%ebx - movdqa %xmm7,%xmm6 - addl %edi,%r9d - movl %ebx,%r13d - psrld $10,%xmm7 - addl %r9d,%r14d - rorl $14,%r13d - psrlq $17,%xmm6 - movl %r14d,%r9d - movl %ecx,%r12d - pxor %xmm6,%xmm7 - rorl $9,%r14d - xorl %ebx,%r13d - xorl %edx,%r12d - rorl $5,%r13d - xorl %r9d,%r14d - psrlq $2,%xmm6 - andl %ebx,%r12d - xorl %ebx,%r13d - addl 12(%rsp),%r8d - pxor %xmm6,%xmm7 - movl %r9d,%edi - xorl %edx,%r12d - rorl $11,%r14d - pshufd $8,%xmm7,%xmm7 - xorl %r10d,%edi - addl %r12d,%r8d - movdqa 0(%rbp),%xmm6 - rorl $6,%r13d - andl %edi,%r15d - pslldq $8,%xmm7 - xorl %r9d,%r14d - addl %r13d,%r8d - xorl %r10d,%r15d - paddd %xmm7,%xmm0 - rorl $2,%r14d - addl %r8d,%eax - addl %r15d,%r8d - paddd %xmm0,%xmm6 - movl %eax,%r13d - addl %r8d,%r14d - movdqa %xmm6,0(%rsp) - rorl $14,%r13d - movdqa %xmm2,%xmm4 - movl %r14d,%r8d - movl %ebx,%r12d - movdqa %xmm0,%xmm7 - rorl $9,%r14d - xorl %eax,%r13d - xorl %ecx,%r12d - rorl $5,%r13d - xorl %r8d,%r14d -.byte 102,15,58,15,225,4 - andl %eax,%r12d - xorl %eax,%r13d -.byte 102,15,58,15,251,4 - addl 16(%rsp),%edx - movl %r8d,%r15d - xorl %ecx,%r12d - rorl $11,%r14d - movdqa %xmm4,%xmm5 - xorl %r9d,%r15d - addl %r12d,%edx - movdqa %xmm4,%xmm6 - rorl $6,%r13d - andl %r15d,%edi - psrld $3,%xmm4 - xorl %r8d,%r14d - addl %r13d,%edx - xorl %r9d,%edi - paddd %xmm7,%xmm1 - rorl $2,%r14d - addl %edx,%r11d - psrld $7,%xmm6 - addl %edi,%edx - movl %r11d,%r13d - pshufd $250,%xmm0,%xmm7 - addl %edx,%r14d - rorl $14,%r13d - pslld $14,%xmm5 - movl %r14d,%edx - movl %eax,%r12d - pxor %xmm6,%xmm4 - rorl $9,%r14d - xorl %r11d,%r13d - xorl %ebx,%r12d - rorl $5,%r13d - psrld $11,%xmm6 - xorl %edx,%r14d - pxor %xmm5,%xmm4 - andl %r11d,%r12d - xorl %r11d,%r13d - pslld $11,%xmm5 - addl 20(%rsp),%ecx - movl %edx,%edi - pxor %xmm6,%xmm4 - xorl %ebx,%r12d - rorl $11,%r14d - movdqa %xmm7,%xmm6 - xorl %r8d,%edi - addl %r12d,%ecx - pxor %xmm5,%xmm4 - rorl $6,%r13d - andl %edi,%r15d - xorl %edx,%r14d - psrld $10,%xmm7 - addl %r13d,%ecx - xorl %r8d,%r15d - paddd %xmm4,%xmm1 - rorl $2,%r14d - addl %ecx,%r10d - psrlq $17,%xmm6 - addl %r15d,%ecx - movl %r10d,%r13d - addl %ecx,%r14d - pxor %xmm6,%xmm7 - rorl $14,%r13d - movl %r14d,%ecx - movl %r11d,%r12d - rorl $9,%r14d - psrlq $2,%xmm6 - xorl %r10d,%r13d - xorl %eax,%r12d - pxor %xmm6,%xmm7 - rorl $5,%r13d - xorl %ecx,%r14d - andl %r10d,%r12d - pshufd $128,%xmm7,%xmm7 - xorl %r10d,%r13d - addl 24(%rsp),%ebx - movl %ecx,%r15d - psrldq $8,%xmm7 - xorl %eax,%r12d - rorl $11,%r14d - xorl %edx,%r15d - addl %r12d,%ebx - rorl $6,%r13d - paddd %xmm7,%xmm1 - andl %r15d,%edi - xorl %ecx,%r14d - addl %r13d,%ebx - pshufd $80,%xmm1,%xmm7 - xorl %edx,%edi - rorl $2,%r14d - addl %ebx,%r9d - movdqa %xmm7,%xmm6 - addl %edi,%ebx - movl %r9d,%r13d - psrld $10,%xmm7 - addl %ebx,%r14d - rorl $14,%r13d - psrlq $17,%xmm6 - movl %r14d,%ebx - movl %r10d,%r12d - pxor %xmm6,%xmm7 - rorl $9,%r14d - xorl %r9d,%r13d - xorl %r11d,%r12d - rorl $5,%r13d - xorl %ebx,%r14d - psrlq $2,%xmm6 - andl %r9d,%r12d - xorl %r9d,%r13d - addl 28(%rsp),%eax - pxor %xmm6,%xmm7 - movl %ebx,%edi - xorl %r11d,%r12d - rorl $11,%r14d - pshufd $8,%xmm7,%xmm7 - xorl %ecx,%edi - addl %r12d,%eax - movdqa 32(%rbp),%xmm6 - rorl $6,%r13d - andl %edi,%r15d - pslldq $8,%xmm7 - xorl %ebx,%r14d - addl %r13d,%eax - xorl %ecx,%r15d - paddd %xmm7,%xmm1 - rorl $2,%r14d - addl %eax,%r8d - addl %r15d,%eax - paddd %xmm1,%xmm6 - movl %r8d,%r13d - addl %eax,%r14d - movdqa %xmm6,16(%rsp) - rorl $14,%r13d - movdqa %xmm3,%xmm4 - movl %r14d,%eax - movl %r9d,%r12d - movdqa %xmm1,%xmm7 - rorl $9,%r14d - xorl %r8d,%r13d - xorl %r10d,%r12d - rorl $5,%r13d - xorl %eax,%r14d -.byte 102,15,58,15,226,4 - andl %r8d,%r12d - xorl %r8d,%r13d -.byte 102,15,58,15,248,4 - addl 32(%rsp),%r11d - movl %eax,%r15d - xorl %r10d,%r12d - rorl $11,%r14d - movdqa %xmm4,%xmm5 - xorl %ebx,%r15d - addl %r12d,%r11d - movdqa %xmm4,%xmm6 - rorl $6,%r13d - andl %r15d,%edi - psrld $3,%xmm4 - xorl %eax,%r14d - addl %r13d,%r11d - xorl %ebx,%edi - paddd %xmm7,%xmm2 - rorl $2,%r14d - addl %r11d,%edx - psrld $7,%xmm6 - addl %edi,%r11d - movl %edx,%r13d - pshufd $250,%xmm1,%xmm7 - addl %r11d,%r14d - rorl $14,%r13d - pslld $14,%xmm5 - movl %r14d,%r11d - movl %r8d,%r12d - pxor %xmm6,%xmm4 - rorl $9,%r14d - xorl %edx,%r13d - xorl %r9d,%r12d - rorl $5,%r13d - psrld $11,%xmm6 - xorl %r11d,%r14d - pxor %xmm5,%xmm4 - andl %edx,%r12d - xorl %edx,%r13d - pslld $11,%xmm5 - addl 36(%rsp),%r10d - movl %r11d,%edi - pxor %xmm6,%xmm4 - xorl %r9d,%r12d - rorl $11,%r14d - movdqa %xmm7,%xmm6 - xorl %eax,%edi - addl %r12d,%r10d - pxor %xmm5,%xmm4 - rorl $6,%r13d - andl %edi,%r15d - xorl %r11d,%r14d - psrld $10,%xmm7 - addl %r13d,%r10d - xorl %eax,%r15d - paddd %xmm4,%xmm2 - rorl $2,%r14d - addl %r10d,%ecx - psrlq $17,%xmm6 - addl %r15d,%r10d - movl %ecx,%r13d - addl %r10d,%r14d - pxor %xmm6,%xmm7 - rorl $14,%r13d - movl %r14d,%r10d - movl %edx,%r12d - rorl $9,%r14d - psrlq $2,%xmm6 - xorl %ecx,%r13d - xorl %r8d,%r12d - pxor %xmm6,%xmm7 - rorl $5,%r13d - xorl %r10d,%r14d - andl %ecx,%r12d - pshufd $128,%xmm7,%xmm7 - xorl %ecx,%r13d - addl 40(%rsp),%r9d - movl %r10d,%r15d - psrldq $8,%xmm7 - xorl %r8d,%r12d - rorl $11,%r14d - xorl %r11d,%r15d - addl %r12d,%r9d - rorl $6,%r13d - paddd %xmm7,%xmm2 - andl %r15d,%edi - xorl %r10d,%r14d - addl %r13d,%r9d - pshufd $80,%xmm2,%xmm7 - xorl %r11d,%edi - rorl $2,%r14d - addl %r9d,%ebx - movdqa %xmm7,%xmm6 - addl %edi,%r9d - movl %ebx,%r13d - psrld $10,%xmm7 - addl %r9d,%r14d - rorl $14,%r13d - psrlq $17,%xmm6 - movl %r14d,%r9d - movl %ecx,%r12d - pxor %xmm6,%xmm7 - rorl $9,%r14d - xorl %ebx,%r13d - xorl %edx,%r12d - rorl $5,%r13d - xorl %r9d,%r14d - psrlq $2,%xmm6 - andl %ebx,%r12d - xorl %ebx,%r13d - addl 44(%rsp),%r8d - pxor %xmm6,%xmm7 - movl %r9d,%edi - xorl %edx,%r12d - rorl $11,%r14d - pshufd $8,%xmm7,%xmm7 - xorl %r10d,%edi - addl %r12d,%r8d - movdqa 64(%rbp),%xmm6 - rorl $6,%r13d - andl %edi,%r15d - pslldq $8,%xmm7 - xorl %r9d,%r14d - addl %r13d,%r8d - xorl %r10d,%r15d - paddd %xmm7,%xmm2 - rorl $2,%r14d - addl %r8d,%eax - addl %r15d,%r8d - paddd %xmm2,%xmm6 - movl %eax,%r13d - addl %r8d,%r14d - movdqa %xmm6,32(%rsp) - rorl $14,%r13d - movdqa %xmm0,%xmm4 - movl %r14d,%r8d - movl %ebx,%r12d - movdqa %xmm2,%xmm7 - rorl $9,%r14d - xorl %eax,%r13d - xorl %ecx,%r12d - rorl $5,%r13d - xorl %r8d,%r14d -.byte 102,15,58,15,227,4 - andl %eax,%r12d - xorl %eax,%r13d -.byte 102,15,58,15,249,4 - addl 48(%rsp),%edx - movl %r8d,%r15d - xorl %ecx,%r12d - rorl $11,%r14d - movdqa %xmm4,%xmm5 - xorl %r9d,%r15d - addl %r12d,%edx - movdqa %xmm4,%xmm6 - rorl $6,%r13d - andl %r15d,%edi - psrld $3,%xmm4 - xorl %r8d,%r14d - addl %r13d,%edx - xorl %r9d,%edi - paddd %xmm7,%xmm3 - rorl $2,%r14d - addl %edx,%r11d - psrld $7,%xmm6 - addl %edi,%edx - movl %r11d,%r13d - pshufd $250,%xmm2,%xmm7 - addl %edx,%r14d - rorl $14,%r13d - pslld $14,%xmm5 - movl %r14d,%edx - movl %eax,%r12d - pxor %xmm6,%xmm4 - rorl $9,%r14d - xorl %r11d,%r13d - xorl %ebx,%r12d - rorl $5,%r13d - psrld $11,%xmm6 - xorl %edx,%r14d - pxor %xmm5,%xmm4 - andl %r11d,%r12d - xorl %r11d,%r13d - pslld $11,%xmm5 - addl 52(%rsp),%ecx - movl %edx,%edi - pxor %xmm6,%xmm4 - xorl %ebx,%r12d - rorl $11,%r14d - movdqa %xmm7,%xmm6 - xorl %r8d,%edi - addl %r12d,%ecx - pxor %xmm5,%xmm4 - rorl $6,%r13d - andl %edi,%r15d - xorl %edx,%r14d - psrld $10,%xmm7 - addl %r13d,%ecx - xorl %r8d,%r15d - paddd %xmm4,%xmm3 - rorl $2,%r14d - addl %ecx,%r10d - psrlq $17,%xmm6 - addl %r15d,%ecx - movl %r10d,%r13d - addl %ecx,%r14d - pxor %xmm6,%xmm7 - rorl $14,%r13d - movl %r14d,%ecx - movl %r11d,%r12d - rorl $9,%r14d - psrlq $2,%xmm6 - xorl %r10d,%r13d - xorl %eax,%r12d - pxor %xmm6,%xmm7 - rorl $5,%r13d - xorl %ecx,%r14d - andl %r10d,%r12d - pshufd $128,%xmm7,%xmm7 - xorl %r10d,%r13d - addl 56(%rsp),%ebx - movl %ecx,%r15d - psrldq $8,%xmm7 - xorl %eax,%r12d - rorl $11,%r14d - xorl %edx,%r15d - addl %r12d,%ebx - rorl $6,%r13d - paddd %xmm7,%xmm3 - andl %r15d,%edi - xorl %ecx,%r14d - addl %r13d,%ebx - pshufd $80,%xmm3,%xmm7 - xorl %edx,%edi - rorl $2,%r14d - addl %ebx,%r9d - movdqa %xmm7,%xmm6 - addl %edi,%ebx - movl %r9d,%r13d - psrld $10,%xmm7 - addl %ebx,%r14d - rorl $14,%r13d - psrlq $17,%xmm6 - movl %r14d,%ebx - movl %r10d,%r12d - pxor %xmm6,%xmm7 - rorl $9,%r14d - xorl %r9d,%r13d - xorl %r11d,%r12d - rorl $5,%r13d - xorl %ebx,%r14d - psrlq $2,%xmm6 - andl %r9d,%r12d - xorl %r9d,%r13d - addl 60(%rsp),%eax - pxor %xmm6,%xmm7 - movl %ebx,%edi - xorl %r11d,%r12d - rorl $11,%r14d - pshufd $8,%xmm7,%xmm7 - xorl %ecx,%edi - addl %r12d,%eax - movdqa 96(%rbp),%xmm6 - rorl $6,%r13d - andl %edi,%r15d - pslldq $8,%xmm7 - xorl %ebx,%r14d - addl %r13d,%eax - xorl %ecx,%r15d - paddd %xmm7,%xmm3 - rorl $2,%r14d - addl %eax,%r8d - addl %r15d,%eax - paddd %xmm3,%xmm6 - movl %r8d,%r13d - addl %eax,%r14d - movdqa %xmm6,48(%rsp) - cmpb $0,131(%rbp) - jne .Lssse3_00_47 - rorl $14,%r13d - movl %r14d,%eax - movl %r9d,%r12d - rorl $9,%r14d - xorl %r8d,%r13d - xorl %r10d,%r12d - rorl $5,%r13d - xorl %eax,%r14d - andl %r8d,%r12d - xorl %r8d,%r13d - addl 0(%rsp),%r11d - movl %eax,%r15d - xorl %r10d,%r12d - rorl $11,%r14d - xorl %ebx,%r15d - addl %r12d,%r11d - rorl $6,%r13d - andl %r15d,%edi - xorl %eax,%r14d - addl %r13d,%r11d - xorl %ebx,%edi - rorl $2,%r14d - addl %r11d,%edx - addl %edi,%r11d - movl %edx,%r13d - addl %r11d,%r14d - rorl $14,%r13d - movl %r14d,%r11d - movl %r8d,%r12d - rorl $9,%r14d - xorl %edx,%r13d - xorl %r9d,%r12d - rorl $5,%r13d - xorl %r11d,%r14d - andl %edx,%r12d - xorl %edx,%r13d - addl 4(%rsp),%r10d - movl %r11d,%edi - xorl %r9d,%r12d - rorl $11,%r14d - xorl %eax,%edi - addl %r12d,%r10d - rorl $6,%r13d - andl %edi,%r15d - xorl %r11d,%r14d - addl %r13d,%r10d - xorl %eax,%r15d - rorl $2,%r14d - addl %r10d,%ecx - addl %r15d,%r10d - movl %ecx,%r13d - addl %r10d,%r14d - rorl $14,%r13d - movl %r14d,%r10d - movl %edx,%r12d - rorl $9,%r14d - xorl %ecx,%r13d - xorl %r8d,%r12d - rorl $5,%r13d - xorl %r10d,%r14d - andl %ecx,%r12d - xorl %ecx,%r13d - addl 8(%rsp),%r9d - movl %r10d,%r15d - xorl %r8d,%r12d - rorl $11,%r14d - xorl %r11d,%r15d - addl %r12d,%r9d - rorl $6,%r13d - andl %r15d,%edi - xorl %r10d,%r14d - addl %r13d,%r9d - xorl %r11d,%edi - rorl $2,%r14d - addl %r9d,%ebx - addl %edi,%r9d - movl %ebx,%r13d - addl %r9d,%r14d - rorl $14,%r13d - movl %r14d,%r9d - movl %ecx,%r12d - rorl $9,%r14d - xorl %ebx,%r13d - xorl %edx,%r12d - rorl $5,%r13d - xorl %r9d,%r14d - andl %ebx,%r12d - xorl %ebx,%r13d - addl 12(%rsp),%r8d - movl %r9d,%edi - xorl %edx,%r12d - rorl $11,%r14d - xorl %r10d,%edi - addl %r12d,%r8d - rorl $6,%r13d - andl %edi,%r15d - xorl %r9d,%r14d - addl %r13d,%r8d - xorl %r10d,%r15d - rorl $2,%r14d - addl %r8d,%eax - addl %r15d,%r8d - movl %eax,%r13d - addl %r8d,%r14d - rorl $14,%r13d - movl %r14d,%r8d - movl %ebx,%r12d - rorl $9,%r14d - xorl %eax,%r13d - xorl %ecx,%r12d - rorl $5,%r13d - xorl %r8d,%r14d - andl %eax,%r12d - xorl %eax,%r13d - addl 16(%rsp),%edx - movl %r8d,%r15d - xorl %ecx,%r12d - rorl $11,%r14d - xorl %r9d,%r15d - addl %r12d,%edx - rorl $6,%r13d - andl %r15d,%edi - xorl %r8d,%r14d - addl %r13d,%edx - xorl %r9d,%edi - rorl $2,%r14d - addl %edx,%r11d - addl %edi,%edx - movl %r11d,%r13d - addl %edx,%r14d - rorl $14,%r13d - movl %r14d,%edx - movl %eax,%r12d - rorl $9,%r14d - xorl %r11d,%r13d - xorl %ebx,%r12d - rorl $5,%r13d - xorl %edx,%r14d - andl %r11d,%r12d - xorl %r11d,%r13d - addl 20(%rsp),%ecx - movl %edx,%edi - xorl %ebx,%r12d - rorl $11,%r14d - xorl %r8d,%edi - addl %r12d,%ecx - rorl $6,%r13d - andl %edi,%r15d - xorl %edx,%r14d - addl %r13d,%ecx - xorl %r8d,%r15d - rorl $2,%r14d - addl %ecx,%r10d - addl %r15d,%ecx - movl %r10d,%r13d - addl %ecx,%r14d - rorl $14,%r13d - movl %r14d,%ecx - movl %r11d,%r12d - rorl $9,%r14d - xorl %r10d,%r13d - xorl %eax,%r12d - rorl $5,%r13d - xorl %ecx,%r14d - andl %r10d,%r12d - xorl %r10d,%r13d - addl 24(%rsp),%ebx - movl %ecx,%r15d - xorl %eax,%r12d - rorl $11,%r14d - xorl %edx,%r15d - addl %r12d,%ebx - rorl $6,%r13d - andl %r15d,%edi - xorl %ecx,%r14d - addl %r13d,%ebx - xorl %edx,%edi - rorl $2,%r14d - addl %ebx,%r9d - addl %edi,%ebx - movl %r9d,%r13d - addl %ebx,%r14d - rorl $14,%r13d - movl %r14d,%ebx - movl %r10d,%r12d - rorl $9,%r14d - xorl %r9d,%r13d - xorl %r11d,%r12d - rorl $5,%r13d - xorl %ebx,%r14d - andl %r9d,%r12d - xorl %r9d,%r13d - addl 28(%rsp),%eax - movl %ebx,%edi - xorl %r11d,%r12d - rorl $11,%r14d - xorl %ecx,%edi - addl %r12d,%eax - rorl $6,%r13d - andl %edi,%r15d - xorl %ebx,%r14d - addl %r13d,%eax - xorl %ecx,%r15d - rorl $2,%r14d - addl %eax,%r8d - addl %r15d,%eax - movl %r8d,%r13d - addl %eax,%r14d - rorl $14,%r13d - movl %r14d,%eax - movl %r9d,%r12d - rorl $9,%r14d - xorl %r8d,%r13d - xorl %r10d,%r12d - rorl $5,%r13d - xorl %eax,%r14d - andl %r8d,%r12d - xorl %r8d,%r13d - addl 32(%rsp),%r11d - movl %eax,%r15d - xorl %r10d,%r12d - rorl $11,%r14d - xorl %ebx,%r15d - addl %r12d,%r11d - rorl $6,%r13d - andl %r15d,%edi - xorl %eax,%r14d - addl %r13d,%r11d - xorl %ebx,%edi - rorl $2,%r14d - addl %r11d,%edx - addl %edi,%r11d - movl %edx,%r13d - addl %r11d,%r14d - rorl $14,%r13d - movl %r14d,%r11d - movl %r8d,%r12d - rorl $9,%r14d - xorl %edx,%r13d - xorl %r9d,%r12d - rorl $5,%r13d - xorl %r11d,%r14d - andl %edx,%r12d - xorl %edx,%r13d - addl 36(%rsp),%r10d - movl %r11d,%edi - xorl %r9d,%r12d - rorl $11,%r14d - xorl %eax,%edi - addl %r12d,%r10d - rorl $6,%r13d - andl %edi,%r15d - xorl %r11d,%r14d - addl %r13d,%r10d - xorl %eax,%r15d - rorl $2,%r14d - addl %r10d,%ecx - addl %r15d,%r10d - movl %ecx,%r13d - addl %r10d,%r14d - rorl $14,%r13d - movl %r14d,%r10d - movl %edx,%r12d - rorl $9,%r14d - xorl %ecx,%r13d - xorl %r8d,%r12d - rorl $5,%r13d - xorl %r10d,%r14d - andl %ecx,%r12d - xorl %ecx,%r13d - addl 40(%rsp),%r9d - movl %r10d,%r15d - xorl %r8d,%r12d - rorl $11,%r14d - xorl %r11d,%r15d - addl %r12d,%r9d - rorl $6,%r13d - andl %r15d,%edi - xorl %r10d,%r14d - addl %r13d,%r9d - xorl %r11d,%edi - rorl $2,%r14d - addl %r9d,%ebx - addl %edi,%r9d - movl %ebx,%r13d - addl %r9d,%r14d - rorl $14,%r13d - movl %r14d,%r9d - movl %ecx,%r12d - rorl $9,%r14d - xorl %ebx,%r13d - xorl %edx,%r12d - rorl $5,%r13d - xorl %r9d,%r14d - andl %ebx,%r12d - xorl %ebx,%r13d - addl 44(%rsp),%r8d - movl %r9d,%edi - xorl %edx,%r12d - rorl $11,%r14d - xorl %r10d,%edi - addl %r12d,%r8d - rorl $6,%r13d - andl %edi,%r15d - xorl %r9d,%r14d - addl %r13d,%r8d - xorl %r10d,%r15d - rorl $2,%r14d - addl %r8d,%eax - addl %r15d,%r8d - movl %eax,%r13d - addl %r8d,%r14d - rorl $14,%r13d - movl %r14d,%r8d - movl %ebx,%r12d - rorl $9,%r14d - xorl %eax,%r13d - xorl %ecx,%r12d - rorl $5,%r13d - xorl %r8d,%r14d - andl %eax,%r12d - xorl %eax,%r13d - addl 48(%rsp),%edx - movl %r8d,%r15d - xorl %ecx,%r12d - rorl $11,%r14d - xorl %r9d,%r15d - addl %r12d,%edx - rorl $6,%r13d - andl %r15d,%edi - xorl %r8d,%r14d - addl %r13d,%edx - xorl %r9d,%edi - rorl $2,%r14d - addl %edx,%r11d - addl %edi,%edx - movl %r11d,%r13d - addl %edx,%r14d - rorl $14,%r13d - movl %r14d,%edx - movl %eax,%r12d - rorl $9,%r14d - xorl %r11d,%r13d - xorl %ebx,%r12d - rorl $5,%r13d - xorl %edx,%r14d - andl %r11d,%r12d - xorl %r11d,%r13d - addl 52(%rsp),%ecx - movl %edx,%edi - xorl %ebx,%r12d - rorl $11,%r14d - xorl %r8d,%edi - addl %r12d,%ecx - rorl $6,%r13d - andl %edi,%r15d - xorl %edx,%r14d - addl %r13d,%ecx - xorl %r8d,%r15d - rorl $2,%r14d - addl %ecx,%r10d - addl %r15d,%ecx - movl %r10d,%r13d - addl %ecx,%r14d - rorl $14,%r13d - movl %r14d,%ecx - movl %r11d,%r12d - rorl $9,%r14d - xorl %r10d,%r13d - xorl %eax,%r12d - rorl $5,%r13d - xorl %ecx,%r14d - andl %r10d,%r12d - xorl %r10d,%r13d - addl 56(%rsp),%ebx - movl %ecx,%r15d - xorl %eax,%r12d - rorl $11,%r14d - xorl %edx,%r15d - addl %r12d,%ebx - rorl $6,%r13d - andl %r15d,%edi - xorl %ecx,%r14d - addl %r13d,%ebx - xorl %edx,%edi - rorl $2,%r14d - addl %ebx,%r9d - addl %edi,%ebx - movl %r9d,%r13d - addl %ebx,%r14d - rorl $14,%r13d - movl %r14d,%ebx - movl %r10d,%r12d - rorl $9,%r14d - xorl %r9d,%r13d - xorl %r11d,%r12d - rorl $5,%r13d - xorl %ebx,%r14d - andl %r9d,%r12d - xorl %r9d,%r13d - addl 60(%rsp),%eax - movl %ebx,%edi - xorl %r11d,%r12d - rorl $11,%r14d - xorl %ecx,%edi - addl %r12d,%eax - rorl $6,%r13d - andl %edi,%r15d - xorl %ebx,%r14d - addl %r13d,%eax - xorl %ecx,%r15d - rorl $2,%r14d - addl %eax,%r8d - addl %r15d,%eax - movl %r8d,%r13d - addl %eax,%r14d - movq 64+0(%rsp),%rdi - movl %r14d,%eax - - addl 0(%rdi),%eax - leaq 64(%rsi),%rsi - addl 4(%rdi),%ebx - addl 8(%rdi),%ecx - addl 12(%rdi),%edx - addl 16(%rdi),%r8d - addl 20(%rdi),%r9d - addl 24(%rdi),%r10d - addl 28(%rdi),%r11d - - cmpq 64+16(%rsp),%rsi - - movl %eax,0(%rdi) - movl %ebx,4(%rdi) - movl %ecx,8(%rdi) - movl %edx,12(%rdi) - movl %r8d,16(%rdi) - movl %r9d,20(%rdi) - movl %r10d,24(%rdi) - movl %r11d,28(%rdi) - jb .Lloop_ssse3 - - movq 64+24(%rsp),%rsi - movq (%rsi),%r15 - movq 8(%rsi),%r14 - movq 16(%rsi),%r13 - movq 24(%rsi),%r12 - movq 32(%rsi),%rbp - movq 40(%rsi),%rbx - leaq 48(%rsi),%rsp -.Lepilogue_ssse3: - .byte 0xf3,0xc3 -.size sha256_block_data_order_ssse3,.-sha256_block_data_order_ssse3 -#endif diff --git a/third_party/boringssl/linux-x86_64/crypto/sha/sha512-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/sha/sha512-x86_64.S deleted file mode 100644 index ca3a3a164420b..0000000000000 --- a/third_party/boringssl/linux-x86_64/crypto/sha/sha512-x86_64.S +++ /dev/null @@ -1,1787 +0,0 @@ -#if defined(__x86_64__) -.text - -.extern OPENSSL_ia32cap_P -.hidden OPENSSL_ia32cap_P -.globl sha512_block_data_order -.hidden sha512_block_data_order -.type sha512_block_data_order,@function -.align 16 -sha512_block_data_order: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - movq %rsp,%r11 - shlq $4,%rdx - subq $128+32,%rsp - leaq (%rsi,%rdx,8),%rdx - andq $-64,%rsp - movq %rdi,128+0(%rsp) - movq %rsi,128+8(%rsp) - movq %rdx,128+16(%rsp) - movq %r11,128+24(%rsp) -.Lprologue: - - movq 0(%rdi),%rax - movq 8(%rdi),%rbx - movq 16(%rdi),%rcx - movq 24(%rdi),%rdx - movq 32(%rdi),%r8 - movq 40(%rdi),%r9 - movq 48(%rdi),%r10 - movq 56(%rdi),%r11 - jmp .Lloop - -.align 16 -.Lloop: - movq %rbx,%rdi - leaq K512(%rip),%rbp - xorq %rcx,%rdi - movq 0(%rsi),%r12 - movq %r8,%r13 - movq %rax,%r14 - bswapq %r12 - rorq $23,%r13 - movq %r9,%r15 - - xorq %r8,%r13 - rorq $5,%r14 - xorq %r10,%r15 - - movq %r12,0(%rsp) - xorq %rax,%r14 - andq %r8,%r15 - - rorq $4,%r13 - addq %r11,%r12 - xorq %r10,%r15 - - rorq $6,%r14 - xorq %r8,%r13 - addq %r15,%r12 - - movq %rax,%r15 - addq (%rbp),%r12 - xorq %rax,%r14 - - xorq %rbx,%r15 - rorq $14,%r13 - movq %rbx,%r11 - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%r11 - addq %r12,%rdx - addq %r12,%r11 - - leaq 8(%rbp),%rbp - addq %r14,%r11 - movq 8(%rsi),%r12 - movq %rdx,%r13 - movq %r11,%r14 - bswapq %r12 - rorq $23,%r13 - movq %r8,%rdi - - xorq %rdx,%r13 - rorq $5,%r14 - xorq %r9,%rdi - - movq %r12,8(%rsp) - xorq %r11,%r14 - andq %rdx,%rdi - - rorq $4,%r13 - addq %r10,%r12 - xorq %r9,%rdi - - rorq $6,%r14 - xorq %rdx,%r13 - addq %rdi,%r12 - - movq %r11,%rdi - addq (%rbp),%r12 - xorq %r11,%r14 - - xorq %rax,%rdi - rorq $14,%r13 - movq %rax,%r10 - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%r10 - addq %r12,%rcx - addq %r12,%r10 - - leaq 24(%rbp),%rbp - addq %r14,%r10 - movq 16(%rsi),%r12 - movq %rcx,%r13 - movq %r10,%r14 - bswapq %r12 - rorq $23,%r13 - movq %rdx,%r15 - - xorq %rcx,%r13 - rorq $5,%r14 - xorq %r8,%r15 - - movq %r12,16(%rsp) - xorq %r10,%r14 - andq %rcx,%r15 - - rorq $4,%r13 - addq %r9,%r12 - xorq %r8,%r15 - - rorq $6,%r14 - xorq %rcx,%r13 - addq %r15,%r12 - - movq %r10,%r15 - addq (%rbp),%r12 - xorq %r10,%r14 - - xorq %r11,%r15 - rorq $14,%r13 - movq %r11,%r9 - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%r9 - addq %r12,%rbx - addq %r12,%r9 - - leaq 8(%rbp),%rbp - addq %r14,%r9 - movq 24(%rsi),%r12 - movq %rbx,%r13 - movq %r9,%r14 - bswapq %r12 - rorq $23,%r13 - movq %rcx,%rdi - - xorq %rbx,%r13 - rorq $5,%r14 - xorq %rdx,%rdi - - movq %r12,24(%rsp) - xorq %r9,%r14 - andq %rbx,%rdi - - rorq $4,%r13 - addq %r8,%r12 - xorq %rdx,%rdi - - rorq $6,%r14 - xorq %rbx,%r13 - addq %rdi,%r12 - - movq %r9,%rdi - addq (%rbp),%r12 - xorq %r9,%r14 - - xorq %r10,%rdi - rorq $14,%r13 - movq %r10,%r8 - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%r8 - addq %r12,%rax - addq %r12,%r8 - - leaq 24(%rbp),%rbp - addq %r14,%r8 - movq 32(%rsi),%r12 - movq %rax,%r13 - movq %r8,%r14 - bswapq %r12 - rorq $23,%r13 - movq %rbx,%r15 - - xorq %rax,%r13 - rorq $5,%r14 - xorq %rcx,%r15 - - movq %r12,32(%rsp) - xorq %r8,%r14 - andq %rax,%r15 - - rorq $4,%r13 - addq %rdx,%r12 - xorq %rcx,%r15 - - rorq $6,%r14 - xorq %rax,%r13 - addq %r15,%r12 - - movq %r8,%r15 - addq (%rbp),%r12 - xorq %r8,%r14 - - xorq %r9,%r15 - rorq $14,%r13 - movq %r9,%rdx - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%rdx - addq %r12,%r11 - addq %r12,%rdx - - leaq 8(%rbp),%rbp - addq %r14,%rdx - movq 40(%rsi),%r12 - movq %r11,%r13 - movq %rdx,%r14 - bswapq %r12 - rorq $23,%r13 - movq %rax,%rdi - - xorq %r11,%r13 - rorq $5,%r14 - xorq %rbx,%rdi - - movq %r12,40(%rsp) - xorq %rdx,%r14 - andq %r11,%rdi - - rorq $4,%r13 - addq %rcx,%r12 - xorq %rbx,%rdi - - rorq $6,%r14 - xorq %r11,%r13 - addq %rdi,%r12 - - movq %rdx,%rdi - addq (%rbp),%r12 - xorq %rdx,%r14 - - xorq %r8,%rdi - rorq $14,%r13 - movq %r8,%rcx - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%rcx - addq %r12,%r10 - addq %r12,%rcx - - leaq 24(%rbp),%rbp - addq %r14,%rcx - movq 48(%rsi),%r12 - movq %r10,%r13 - movq %rcx,%r14 - bswapq %r12 - rorq $23,%r13 - movq %r11,%r15 - - xorq %r10,%r13 - rorq $5,%r14 - xorq %rax,%r15 - - movq %r12,48(%rsp) - xorq %rcx,%r14 - andq %r10,%r15 - - rorq $4,%r13 - addq %rbx,%r12 - xorq %rax,%r15 - - rorq $6,%r14 - xorq %r10,%r13 - addq %r15,%r12 - - movq %rcx,%r15 - addq (%rbp),%r12 - xorq %rcx,%r14 - - xorq %rdx,%r15 - rorq $14,%r13 - movq %rdx,%rbx - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%rbx - addq %r12,%r9 - addq %r12,%rbx - - leaq 8(%rbp),%rbp - addq %r14,%rbx - movq 56(%rsi),%r12 - movq %r9,%r13 - movq %rbx,%r14 - bswapq %r12 - rorq $23,%r13 - movq %r10,%rdi - - xorq %r9,%r13 - rorq $5,%r14 - xorq %r11,%rdi - - movq %r12,56(%rsp) - xorq %rbx,%r14 - andq %r9,%rdi - - rorq $4,%r13 - addq %rax,%r12 - xorq %r11,%rdi - - rorq $6,%r14 - xorq %r9,%r13 - addq %rdi,%r12 - - movq %rbx,%rdi - addq (%rbp),%r12 - xorq %rbx,%r14 - - xorq %rcx,%rdi - rorq $14,%r13 - movq %rcx,%rax - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%rax - addq %r12,%r8 - addq %r12,%rax - - leaq 24(%rbp),%rbp - addq %r14,%rax - movq 64(%rsi),%r12 - movq %r8,%r13 - movq %rax,%r14 - bswapq %r12 - rorq $23,%r13 - movq %r9,%r15 - - xorq %r8,%r13 - rorq $5,%r14 - xorq %r10,%r15 - - movq %r12,64(%rsp) - xorq %rax,%r14 - andq %r8,%r15 - - rorq $4,%r13 - addq %r11,%r12 - xorq %r10,%r15 - - rorq $6,%r14 - xorq %r8,%r13 - addq %r15,%r12 - - movq %rax,%r15 - addq (%rbp),%r12 - xorq %rax,%r14 - - xorq %rbx,%r15 - rorq $14,%r13 - movq %rbx,%r11 - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%r11 - addq %r12,%rdx - addq %r12,%r11 - - leaq 8(%rbp),%rbp - addq %r14,%r11 - movq 72(%rsi),%r12 - movq %rdx,%r13 - movq %r11,%r14 - bswapq %r12 - rorq $23,%r13 - movq %r8,%rdi - - xorq %rdx,%r13 - rorq $5,%r14 - xorq %r9,%rdi - - movq %r12,72(%rsp) - xorq %r11,%r14 - andq %rdx,%rdi - - rorq $4,%r13 - addq %r10,%r12 - xorq %r9,%rdi - - rorq $6,%r14 - xorq %rdx,%r13 - addq %rdi,%r12 - - movq %r11,%rdi - addq (%rbp),%r12 - xorq %r11,%r14 - - xorq %rax,%rdi - rorq $14,%r13 - movq %rax,%r10 - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%r10 - addq %r12,%rcx - addq %r12,%r10 - - leaq 24(%rbp),%rbp - addq %r14,%r10 - movq 80(%rsi),%r12 - movq %rcx,%r13 - movq %r10,%r14 - bswapq %r12 - rorq $23,%r13 - movq %rdx,%r15 - - xorq %rcx,%r13 - rorq $5,%r14 - xorq %r8,%r15 - - movq %r12,80(%rsp) - xorq %r10,%r14 - andq %rcx,%r15 - - rorq $4,%r13 - addq %r9,%r12 - xorq %r8,%r15 - - rorq $6,%r14 - xorq %rcx,%r13 - addq %r15,%r12 - - movq %r10,%r15 - addq (%rbp),%r12 - xorq %r10,%r14 - - xorq %r11,%r15 - rorq $14,%r13 - movq %r11,%r9 - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%r9 - addq %r12,%rbx - addq %r12,%r9 - - leaq 8(%rbp),%rbp - addq %r14,%r9 - movq 88(%rsi),%r12 - movq %rbx,%r13 - movq %r9,%r14 - bswapq %r12 - rorq $23,%r13 - movq %rcx,%rdi - - xorq %rbx,%r13 - rorq $5,%r14 - xorq %rdx,%rdi - - movq %r12,88(%rsp) - xorq %r9,%r14 - andq %rbx,%rdi - - rorq $4,%r13 - addq %r8,%r12 - xorq %rdx,%rdi - - rorq $6,%r14 - xorq %rbx,%r13 - addq %rdi,%r12 - - movq %r9,%rdi - addq (%rbp),%r12 - xorq %r9,%r14 - - xorq %r10,%rdi - rorq $14,%r13 - movq %r10,%r8 - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%r8 - addq %r12,%rax - addq %r12,%r8 - - leaq 24(%rbp),%rbp - addq %r14,%r8 - movq 96(%rsi),%r12 - movq %rax,%r13 - movq %r8,%r14 - bswapq %r12 - rorq $23,%r13 - movq %rbx,%r15 - - xorq %rax,%r13 - rorq $5,%r14 - xorq %rcx,%r15 - - movq %r12,96(%rsp) - xorq %r8,%r14 - andq %rax,%r15 - - rorq $4,%r13 - addq %rdx,%r12 - xorq %rcx,%r15 - - rorq $6,%r14 - xorq %rax,%r13 - addq %r15,%r12 - - movq %r8,%r15 - addq (%rbp),%r12 - xorq %r8,%r14 - - xorq %r9,%r15 - rorq $14,%r13 - movq %r9,%rdx - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%rdx - addq %r12,%r11 - addq %r12,%rdx - - leaq 8(%rbp),%rbp - addq %r14,%rdx - movq 104(%rsi),%r12 - movq %r11,%r13 - movq %rdx,%r14 - bswapq %r12 - rorq $23,%r13 - movq %rax,%rdi - - xorq %r11,%r13 - rorq $5,%r14 - xorq %rbx,%rdi - - movq %r12,104(%rsp) - xorq %rdx,%r14 - andq %r11,%rdi - - rorq $4,%r13 - addq %rcx,%r12 - xorq %rbx,%rdi - - rorq $6,%r14 - xorq %r11,%r13 - addq %rdi,%r12 - - movq %rdx,%rdi - addq (%rbp),%r12 - xorq %rdx,%r14 - - xorq %r8,%rdi - rorq $14,%r13 - movq %r8,%rcx - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%rcx - addq %r12,%r10 - addq %r12,%rcx - - leaq 24(%rbp),%rbp - addq %r14,%rcx - movq 112(%rsi),%r12 - movq %r10,%r13 - movq %rcx,%r14 - bswapq %r12 - rorq $23,%r13 - movq %r11,%r15 - - xorq %r10,%r13 - rorq $5,%r14 - xorq %rax,%r15 - - movq %r12,112(%rsp) - xorq %rcx,%r14 - andq %r10,%r15 - - rorq $4,%r13 - addq %rbx,%r12 - xorq %rax,%r15 - - rorq $6,%r14 - xorq %r10,%r13 - addq %r15,%r12 - - movq %rcx,%r15 - addq (%rbp),%r12 - xorq %rcx,%r14 - - xorq %rdx,%r15 - rorq $14,%r13 - movq %rdx,%rbx - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%rbx - addq %r12,%r9 - addq %r12,%rbx - - leaq 8(%rbp),%rbp - addq %r14,%rbx - movq 120(%rsi),%r12 - movq %r9,%r13 - movq %rbx,%r14 - bswapq %r12 - rorq $23,%r13 - movq %r10,%rdi - - xorq %r9,%r13 - rorq $5,%r14 - xorq %r11,%rdi - - movq %r12,120(%rsp) - xorq %rbx,%r14 - andq %r9,%rdi - - rorq $4,%r13 - addq %rax,%r12 - xorq %r11,%rdi - - rorq $6,%r14 - xorq %r9,%r13 - addq %rdi,%r12 - - movq %rbx,%rdi - addq (%rbp),%r12 - xorq %rbx,%r14 - - xorq %rcx,%rdi - rorq $14,%r13 - movq %rcx,%rax - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%rax - addq %r12,%r8 - addq %r12,%rax - - leaq 24(%rbp),%rbp - jmp .Lrounds_16_xx -.align 16 -.Lrounds_16_xx: - movq 8(%rsp),%r13 - movq 112(%rsp),%r15 - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%rax - movq %r15,%r14 - rorq $42,%r15 - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%r15 - shrq $6,%r14 - - rorq $19,%r15 - xorq %r13,%r12 - xorq %r14,%r15 - addq 72(%rsp),%r12 - - addq 0(%rsp),%r12 - movq %r8,%r13 - addq %r15,%r12 - movq %rax,%r14 - rorq $23,%r13 - movq %r9,%r15 - - xorq %r8,%r13 - rorq $5,%r14 - xorq %r10,%r15 - - movq %r12,0(%rsp) - xorq %rax,%r14 - andq %r8,%r15 - - rorq $4,%r13 - addq %r11,%r12 - xorq %r10,%r15 - - rorq $6,%r14 - xorq %r8,%r13 - addq %r15,%r12 - - movq %rax,%r15 - addq (%rbp),%r12 - xorq %rax,%r14 - - xorq %rbx,%r15 - rorq $14,%r13 - movq %rbx,%r11 - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%r11 - addq %r12,%rdx - addq %r12,%r11 - - leaq 8(%rbp),%rbp - movq 16(%rsp),%r13 - movq 120(%rsp),%rdi - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%r11 - movq %rdi,%r14 - rorq $42,%rdi - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%rdi - shrq $6,%r14 - - rorq $19,%rdi - xorq %r13,%r12 - xorq %r14,%rdi - addq 80(%rsp),%r12 - - addq 8(%rsp),%r12 - movq %rdx,%r13 - addq %rdi,%r12 - movq %r11,%r14 - rorq $23,%r13 - movq %r8,%rdi - - xorq %rdx,%r13 - rorq $5,%r14 - xorq %r9,%rdi - - movq %r12,8(%rsp) - xorq %r11,%r14 - andq %rdx,%rdi - - rorq $4,%r13 - addq %r10,%r12 - xorq %r9,%rdi - - rorq $6,%r14 - xorq %rdx,%r13 - addq %rdi,%r12 - - movq %r11,%rdi - addq (%rbp),%r12 - xorq %r11,%r14 - - xorq %rax,%rdi - rorq $14,%r13 - movq %rax,%r10 - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%r10 - addq %r12,%rcx - addq %r12,%r10 - - leaq 24(%rbp),%rbp - movq 24(%rsp),%r13 - movq 0(%rsp),%r15 - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%r10 - movq %r15,%r14 - rorq $42,%r15 - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%r15 - shrq $6,%r14 - - rorq $19,%r15 - xorq %r13,%r12 - xorq %r14,%r15 - addq 88(%rsp),%r12 - - addq 16(%rsp),%r12 - movq %rcx,%r13 - addq %r15,%r12 - movq %r10,%r14 - rorq $23,%r13 - movq %rdx,%r15 - - xorq %rcx,%r13 - rorq $5,%r14 - xorq %r8,%r15 - - movq %r12,16(%rsp) - xorq %r10,%r14 - andq %rcx,%r15 - - rorq $4,%r13 - addq %r9,%r12 - xorq %r8,%r15 - - rorq $6,%r14 - xorq %rcx,%r13 - addq %r15,%r12 - - movq %r10,%r15 - addq (%rbp),%r12 - xorq %r10,%r14 - - xorq %r11,%r15 - rorq $14,%r13 - movq %r11,%r9 - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%r9 - addq %r12,%rbx - addq %r12,%r9 - - leaq 8(%rbp),%rbp - movq 32(%rsp),%r13 - movq 8(%rsp),%rdi - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%r9 - movq %rdi,%r14 - rorq $42,%rdi - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%rdi - shrq $6,%r14 - - rorq $19,%rdi - xorq %r13,%r12 - xorq %r14,%rdi - addq 96(%rsp),%r12 - - addq 24(%rsp),%r12 - movq %rbx,%r13 - addq %rdi,%r12 - movq %r9,%r14 - rorq $23,%r13 - movq %rcx,%rdi - - xorq %rbx,%r13 - rorq $5,%r14 - xorq %rdx,%rdi - - movq %r12,24(%rsp) - xorq %r9,%r14 - andq %rbx,%rdi - - rorq $4,%r13 - addq %r8,%r12 - xorq %rdx,%rdi - - rorq $6,%r14 - xorq %rbx,%r13 - addq %rdi,%r12 - - movq %r9,%rdi - addq (%rbp),%r12 - xorq %r9,%r14 - - xorq %r10,%rdi - rorq $14,%r13 - movq %r10,%r8 - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%r8 - addq %r12,%rax - addq %r12,%r8 - - leaq 24(%rbp),%rbp - movq 40(%rsp),%r13 - movq 16(%rsp),%r15 - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%r8 - movq %r15,%r14 - rorq $42,%r15 - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%r15 - shrq $6,%r14 - - rorq $19,%r15 - xorq %r13,%r12 - xorq %r14,%r15 - addq 104(%rsp),%r12 - - addq 32(%rsp),%r12 - movq %rax,%r13 - addq %r15,%r12 - movq %r8,%r14 - rorq $23,%r13 - movq %rbx,%r15 - - xorq %rax,%r13 - rorq $5,%r14 - xorq %rcx,%r15 - - movq %r12,32(%rsp) - xorq %r8,%r14 - andq %rax,%r15 - - rorq $4,%r13 - addq %rdx,%r12 - xorq %rcx,%r15 - - rorq $6,%r14 - xorq %rax,%r13 - addq %r15,%r12 - - movq %r8,%r15 - addq (%rbp),%r12 - xorq %r8,%r14 - - xorq %r9,%r15 - rorq $14,%r13 - movq %r9,%rdx - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%rdx - addq %r12,%r11 - addq %r12,%rdx - - leaq 8(%rbp),%rbp - movq 48(%rsp),%r13 - movq 24(%rsp),%rdi - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%rdx - movq %rdi,%r14 - rorq $42,%rdi - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%rdi - shrq $6,%r14 - - rorq $19,%rdi - xorq %r13,%r12 - xorq %r14,%rdi - addq 112(%rsp),%r12 - - addq 40(%rsp),%r12 - movq %r11,%r13 - addq %rdi,%r12 - movq %rdx,%r14 - rorq $23,%r13 - movq %rax,%rdi - - xorq %r11,%r13 - rorq $5,%r14 - xorq %rbx,%rdi - - movq %r12,40(%rsp) - xorq %rdx,%r14 - andq %r11,%rdi - - rorq $4,%r13 - addq %rcx,%r12 - xorq %rbx,%rdi - - rorq $6,%r14 - xorq %r11,%r13 - addq %rdi,%r12 - - movq %rdx,%rdi - addq (%rbp),%r12 - xorq %rdx,%r14 - - xorq %r8,%rdi - rorq $14,%r13 - movq %r8,%rcx - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%rcx - addq %r12,%r10 - addq %r12,%rcx - - leaq 24(%rbp),%rbp - movq 56(%rsp),%r13 - movq 32(%rsp),%r15 - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%rcx - movq %r15,%r14 - rorq $42,%r15 - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%r15 - shrq $6,%r14 - - rorq $19,%r15 - xorq %r13,%r12 - xorq %r14,%r15 - addq 120(%rsp),%r12 - - addq 48(%rsp),%r12 - movq %r10,%r13 - addq %r15,%r12 - movq %rcx,%r14 - rorq $23,%r13 - movq %r11,%r15 - - xorq %r10,%r13 - rorq $5,%r14 - xorq %rax,%r15 - - movq %r12,48(%rsp) - xorq %rcx,%r14 - andq %r10,%r15 - - rorq $4,%r13 - addq %rbx,%r12 - xorq %rax,%r15 - - rorq $6,%r14 - xorq %r10,%r13 - addq %r15,%r12 - - movq %rcx,%r15 - addq (%rbp),%r12 - xorq %rcx,%r14 - - xorq %rdx,%r15 - rorq $14,%r13 - movq %rdx,%rbx - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%rbx - addq %r12,%r9 - addq %r12,%rbx - - leaq 8(%rbp),%rbp - movq 64(%rsp),%r13 - movq 40(%rsp),%rdi - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%rbx - movq %rdi,%r14 - rorq $42,%rdi - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%rdi - shrq $6,%r14 - - rorq $19,%rdi - xorq %r13,%r12 - xorq %r14,%rdi - addq 0(%rsp),%r12 - - addq 56(%rsp),%r12 - movq %r9,%r13 - addq %rdi,%r12 - movq %rbx,%r14 - rorq $23,%r13 - movq %r10,%rdi - - xorq %r9,%r13 - rorq $5,%r14 - xorq %r11,%rdi - - movq %r12,56(%rsp) - xorq %rbx,%r14 - andq %r9,%rdi - - rorq $4,%r13 - addq %rax,%r12 - xorq %r11,%rdi - - rorq $6,%r14 - xorq %r9,%r13 - addq %rdi,%r12 - - movq %rbx,%rdi - addq (%rbp),%r12 - xorq %rbx,%r14 - - xorq %rcx,%rdi - rorq $14,%r13 - movq %rcx,%rax - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%rax - addq %r12,%r8 - addq %r12,%rax - - leaq 24(%rbp),%rbp - movq 72(%rsp),%r13 - movq 48(%rsp),%r15 - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%rax - movq %r15,%r14 - rorq $42,%r15 - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%r15 - shrq $6,%r14 - - rorq $19,%r15 - xorq %r13,%r12 - xorq %r14,%r15 - addq 8(%rsp),%r12 - - addq 64(%rsp),%r12 - movq %r8,%r13 - addq %r15,%r12 - movq %rax,%r14 - rorq $23,%r13 - movq %r9,%r15 - - xorq %r8,%r13 - rorq $5,%r14 - xorq %r10,%r15 - - movq %r12,64(%rsp) - xorq %rax,%r14 - andq %r8,%r15 - - rorq $4,%r13 - addq %r11,%r12 - xorq %r10,%r15 - - rorq $6,%r14 - xorq %r8,%r13 - addq %r15,%r12 - - movq %rax,%r15 - addq (%rbp),%r12 - xorq %rax,%r14 - - xorq %rbx,%r15 - rorq $14,%r13 - movq %rbx,%r11 - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%r11 - addq %r12,%rdx - addq %r12,%r11 - - leaq 8(%rbp),%rbp - movq 80(%rsp),%r13 - movq 56(%rsp),%rdi - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%r11 - movq %rdi,%r14 - rorq $42,%rdi - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%rdi - shrq $6,%r14 - - rorq $19,%rdi - xorq %r13,%r12 - xorq %r14,%rdi - addq 16(%rsp),%r12 - - addq 72(%rsp),%r12 - movq %rdx,%r13 - addq %rdi,%r12 - movq %r11,%r14 - rorq $23,%r13 - movq %r8,%rdi - - xorq %rdx,%r13 - rorq $5,%r14 - xorq %r9,%rdi - - movq %r12,72(%rsp) - xorq %r11,%r14 - andq %rdx,%rdi - - rorq $4,%r13 - addq %r10,%r12 - xorq %r9,%rdi - - rorq $6,%r14 - xorq %rdx,%r13 - addq %rdi,%r12 - - movq %r11,%rdi - addq (%rbp),%r12 - xorq %r11,%r14 - - xorq %rax,%rdi - rorq $14,%r13 - movq %rax,%r10 - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%r10 - addq %r12,%rcx - addq %r12,%r10 - - leaq 24(%rbp),%rbp - movq 88(%rsp),%r13 - movq 64(%rsp),%r15 - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%r10 - movq %r15,%r14 - rorq $42,%r15 - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%r15 - shrq $6,%r14 - - rorq $19,%r15 - xorq %r13,%r12 - xorq %r14,%r15 - addq 24(%rsp),%r12 - - addq 80(%rsp),%r12 - movq %rcx,%r13 - addq %r15,%r12 - movq %r10,%r14 - rorq $23,%r13 - movq %rdx,%r15 - - xorq %rcx,%r13 - rorq $5,%r14 - xorq %r8,%r15 - - movq %r12,80(%rsp) - xorq %r10,%r14 - andq %rcx,%r15 - - rorq $4,%r13 - addq %r9,%r12 - xorq %r8,%r15 - - rorq $6,%r14 - xorq %rcx,%r13 - addq %r15,%r12 - - movq %r10,%r15 - addq (%rbp),%r12 - xorq %r10,%r14 - - xorq %r11,%r15 - rorq $14,%r13 - movq %r11,%r9 - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%r9 - addq %r12,%rbx - addq %r12,%r9 - - leaq 8(%rbp),%rbp - movq 96(%rsp),%r13 - movq 72(%rsp),%rdi - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%r9 - movq %rdi,%r14 - rorq $42,%rdi - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%rdi - shrq $6,%r14 - - rorq $19,%rdi - xorq %r13,%r12 - xorq %r14,%rdi - addq 32(%rsp),%r12 - - addq 88(%rsp),%r12 - movq %rbx,%r13 - addq %rdi,%r12 - movq %r9,%r14 - rorq $23,%r13 - movq %rcx,%rdi - - xorq %rbx,%r13 - rorq $5,%r14 - xorq %rdx,%rdi - - movq %r12,88(%rsp) - xorq %r9,%r14 - andq %rbx,%rdi - - rorq $4,%r13 - addq %r8,%r12 - xorq %rdx,%rdi - - rorq $6,%r14 - xorq %rbx,%r13 - addq %rdi,%r12 - - movq %r9,%rdi - addq (%rbp),%r12 - xorq %r9,%r14 - - xorq %r10,%rdi - rorq $14,%r13 - movq %r10,%r8 - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%r8 - addq %r12,%rax - addq %r12,%r8 - - leaq 24(%rbp),%rbp - movq 104(%rsp),%r13 - movq 80(%rsp),%r15 - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%r8 - movq %r15,%r14 - rorq $42,%r15 - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%r15 - shrq $6,%r14 - - rorq $19,%r15 - xorq %r13,%r12 - xorq %r14,%r15 - addq 40(%rsp),%r12 - - addq 96(%rsp),%r12 - movq %rax,%r13 - addq %r15,%r12 - movq %r8,%r14 - rorq $23,%r13 - movq %rbx,%r15 - - xorq %rax,%r13 - rorq $5,%r14 - xorq %rcx,%r15 - - movq %r12,96(%rsp) - xorq %r8,%r14 - andq %rax,%r15 - - rorq $4,%r13 - addq %rdx,%r12 - xorq %rcx,%r15 - - rorq $6,%r14 - xorq %rax,%r13 - addq %r15,%r12 - - movq %r8,%r15 - addq (%rbp),%r12 - xorq %r8,%r14 - - xorq %r9,%r15 - rorq $14,%r13 - movq %r9,%rdx - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%rdx - addq %r12,%r11 - addq %r12,%rdx - - leaq 8(%rbp),%rbp - movq 112(%rsp),%r13 - movq 88(%rsp),%rdi - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%rdx - movq %rdi,%r14 - rorq $42,%rdi - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%rdi - shrq $6,%r14 - - rorq $19,%rdi - xorq %r13,%r12 - xorq %r14,%rdi - addq 48(%rsp),%r12 - - addq 104(%rsp),%r12 - movq %r11,%r13 - addq %rdi,%r12 - movq %rdx,%r14 - rorq $23,%r13 - movq %rax,%rdi - - xorq %r11,%r13 - rorq $5,%r14 - xorq %rbx,%rdi - - movq %r12,104(%rsp) - xorq %rdx,%r14 - andq %r11,%rdi - - rorq $4,%r13 - addq %rcx,%r12 - xorq %rbx,%rdi - - rorq $6,%r14 - xorq %r11,%r13 - addq %rdi,%r12 - - movq %rdx,%rdi - addq (%rbp),%r12 - xorq %rdx,%r14 - - xorq %r8,%rdi - rorq $14,%r13 - movq %r8,%rcx - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%rcx - addq %r12,%r10 - addq %r12,%rcx - - leaq 24(%rbp),%rbp - movq 120(%rsp),%r13 - movq 96(%rsp),%r15 - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%rcx - movq %r15,%r14 - rorq $42,%r15 - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%r15 - shrq $6,%r14 - - rorq $19,%r15 - xorq %r13,%r12 - xorq %r14,%r15 - addq 56(%rsp),%r12 - - addq 112(%rsp),%r12 - movq %r10,%r13 - addq %r15,%r12 - movq %rcx,%r14 - rorq $23,%r13 - movq %r11,%r15 - - xorq %r10,%r13 - rorq $5,%r14 - xorq %rax,%r15 - - movq %r12,112(%rsp) - xorq %rcx,%r14 - andq %r10,%r15 - - rorq $4,%r13 - addq %rbx,%r12 - xorq %rax,%r15 - - rorq $6,%r14 - xorq %r10,%r13 - addq %r15,%r12 - - movq %rcx,%r15 - addq (%rbp),%r12 - xorq %rcx,%r14 - - xorq %rdx,%r15 - rorq $14,%r13 - movq %rdx,%rbx - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%rbx - addq %r12,%r9 - addq %r12,%rbx - - leaq 8(%rbp),%rbp - movq 0(%rsp),%r13 - movq 104(%rsp),%rdi - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%rbx - movq %rdi,%r14 - rorq $42,%rdi - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%rdi - shrq $6,%r14 - - rorq $19,%rdi - xorq %r13,%r12 - xorq %r14,%rdi - addq 64(%rsp),%r12 - - addq 120(%rsp),%r12 - movq %r9,%r13 - addq %rdi,%r12 - movq %rbx,%r14 - rorq $23,%r13 - movq %r10,%rdi - - xorq %r9,%r13 - rorq $5,%r14 - xorq %r11,%rdi - - movq %r12,120(%rsp) - xorq %rbx,%r14 - andq %r9,%rdi - - rorq $4,%r13 - addq %rax,%r12 - xorq %r11,%rdi - - rorq $6,%r14 - xorq %r9,%r13 - addq %rdi,%r12 - - movq %rbx,%rdi - addq (%rbp),%r12 - xorq %rbx,%r14 - - xorq %rcx,%rdi - rorq $14,%r13 - movq %rcx,%rax - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%rax - addq %r12,%r8 - addq %r12,%rax - - leaq 24(%rbp),%rbp - cmpb $0,7(%rbp) - jnz .Lrounds_16_xx - - movq 128+0(%rsp),%rdi - addq %r14,%rax - leaq 128(%rsi),%rsi - - addq 0(%rdi),%rax - addq 8(%rdi),%rbx - addq 16(%rdi),%rcx - addq 24(%rdi),%rdx - addq 32(%rdi),%r8 - addq 40(%rdi),%r9 - addq 48(%rdi),%r10 - addq 56(%rdi),%r11 - - cmpq 128+16(%rsp),%rsi - - movq %rax,0(%rdi) - movq %rbx,8(%rdi) - movq %rcx,16(%rdi) - movq %rdx,24(%rdi) - movq %r8,32(%rdi) - movq %r9,40(%rdi) - movq %r10,48(%rdi) - movq %r11,56(%rdi) - jb .Lloop - - movq 128+24(%rsp),%rsi - movq (%rsi),%r15 - movq 8(%rsi),%r14 - movq 16(%rsi),%r13 - movq 24(%rsi),%r12 - movq 32(%rsi),%rbp - movq 40(%rsi),%rbx - leaq 48(%rsi),%rsp -.Lepilogue: - .byte 0xf3,0xc3 -.size sha512_block_data_order,.-sha512_block_data_order -.align 64 -.type K512,@object -K512: -.quad 0x428a2f98d728ae22,0x7137449123ef65cd -.quad 0x428a2f98d728ae22,0x7137449123ef65cd -.quad 0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc -.quad 0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc -.quad 0x3956c25bf348b538,0x59f111f1b605d019 -.quad 0x3956c25bf348b538,0x59f111f1b605d019 -.quad 0x923f82a4af194f9b,0xab1c5ed5da6d8118 -.quad 0x923f82a4af194f9b,0xab1c5ed5da6d8118 -.quad 0xd807aa98a3030242,0x12835b0145706fbe -.quad 0xd807aa98a3030242,0x12835b0145706fbe -.quad 0x243185be4ee4b28c,0x550c7dc3d5ffb4e2 -.quad 0x243185be4ee4b28c,0x550c7dc3d5ffb4e2 -.quad 0x72be5d74f27b896f,0x80deb1fe3b1696b1 -.quad 0x72be5d74f27b896f,0x80deb1fe3b1696b1 -.quad 0x9bdc06a725c71235,0xc19bf174cf692694 -.quad 0x9bdc06a725c71235,0xc19bf174cf692694 -.quad 0xe49b69c19ef14ad2,0xefbe4786384f25e3 -.quad 0xe49b69c19ef14ad2,0xefbe4786384f25e3 -.quad 0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65 -.quad 0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65 -.quad 0x2de92c6f592b0275,0x4a7484aa6ea6e483 -.quad 0x2de92c6f592b0275,0x4a7484aa6ea6e483 -.quad 0x5cb0a9dcbd41fbd4,0x76f988da831153b5 -.quad 0x5cb0a9dcbd41fbd4,0x76f988da831153b5 -.quad 0x983e5152ee66dfab,0xa831c66d2db43210 -.quad 0x983e5152ee66dfab,0xa831c66d2db43210 -.quad 0xb00327c898fb213f,0xbf597fc7beef0ee4 -.quad 0xb00327c898fb213f,0xbf597fc7beef0ee4 -.quad 0xc6e00bf33da88fc2,0xd5a79147930aa725 -.quad 0xc6e00bf33da88fc2,0xd5a79147930aa725 -.quad 0x06ca6351e003826f,0x142929670a0e6e70 -.quad 0x06ca6351e003826f,0x142929670a0e6e70 -.quad 0x27b70a8546d22ffc,0x2e1b21385c26c926 -.quad 0x27b70a8546d22ffc,0x2e1b21385c26c926 -.quad 0x4d2c6dfc5ac42aed,0x53380d139d95b3df -.quad 0x4d2c6dfc5ac42aed,0x53380d139d95b3df -.quad 0x650a73548baf63de,0x766a0abb3c77b2a8 -.quad 0x650a73548baf63de,0x766a0abb3c77b2a8 -.quad 0x81c2c92e47edaee6,0x92722c851482353b -.quad 0x81c2c92e47edaee6,0x92722c851482353b -.quad 0xa2bfe8a14cf10364,0xa81a664bbc423001 -.quad 0xa2bfe8a14cf10364,0xa81a664bbc423001 -.quad 0xc24b8b70d0f89791,0xc76c51a30654be30 -.quad 0xc24b8b70d0f89791,0xc76c51a30654be30 -.quad 0xd192e819d6ef5218,0xd69906245565a910 -.quad 0xd192e819d6ef5218,0xd69906245565a910 -.quad 0xf40e35855771202a,0x106aa07032bbd1b8 -.quad 0xf40e35855771202a,0x106aa07032bbd1b8 -.quad 0x19a4c116b8d2d0c8,0x1e376c085141ab53 -.quad 0x19a4c116b8d2d0c8,0x1e376c085141ab53 -.quad 0x2748774cdf8eeb99,0x34b0bcb5e19b48a8 -.quad 0x2748774cdf8eeb99,0x34b0bcb5e19b48a8 -.quad 0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb -.quad 0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb -.quad 0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3 -.quad 0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3 -.quad 0x748f82ee5defb2fc,0x78a5636f43172f60 -.quad 0x748f82ee5defb2fc,0x78a5636f43172f60 -.quad 0x84c87814a1f0ab72,0x8cc702081a6439ec -.quad 0x84c87814a1f0ab72,0x8cc702081a6439ec -.quad 0x90befffa23631e28,0xa4506cebde82bde9 -.quad 0x90befffa23631e28,0xa4506cebde82bde9 -.quad 0xbef9a3f7b2c67915,0xc67178f2e372532b -.quad 0xbef9a3f7b2c67915,0xc67178f2e372532b -.quad 0xca273eceea26619c,0xd186b8c721c0c207 -.quad 0xca273eceea26619c,0xd186b8c721c0c207 -.quad 0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178 -.quad 0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178 -.quad 0x06f067aa72176fba,0x0a637dc5a2c898a6 -.quad 0x06f067aa72176fba,0x0a637dc5a2c898a6 -.quad 0x113f9804bef90dae,0x1b710b35131c471b -.quad 0x113f9804bef90dae,0x1b710b35131c471b -.quad 0x28db77f523047d84,0x32caab7b40c72493 -.quad 0x28db77f523047d84,0x32caab7b40c72493 -.quad 0x3c9ebe0a15c9bebc,0x431d67c49c100d4c -.quad 0x3c9ebe0a15c9bebc,0x431d67c49c100d4c -.quad 0x4cc5d4becb3e42b6,0x597f299cfc657e2a -.quad 0x4cc5d4becb3e42b6,0x597f299cfc657e2a -.quad 0x5fcb6fab3ad6faec,0x6c44198c4a475817 -.quad 0x5fcb6fab3ad6faec,0x6c44198c4a475817 - -.quad 0x0001020304050607,0x08090a0b0c0d0e0f -.quad 0x0001020304050607,0x08090a0b0c0d0e0f -.byte 83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -#endif diff --git a/third_party/boringssl/mac-x86/crypto/aes/aes-586.S b/third_party/boringssl/mac-x86/crypto/aes/aes-586.S deleted file mode 100644 index d3dc6beb6ac1e..0000000000000 --- a/third_party/boringssl/mac-x86/crypto/aes/aes-586.S +++ /dev/null @@ -1,3221 +0,0 @@ -#if defined(__i386__) -.file "aes-586.S" -.text -.private_extern __x86_AES_encrypt_compact -.align 4 -__x86_AES_encrypt_compact: - movl %edi,20(%esp) - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - movl 240(%edi),%esi - leal -2(%esi,%esi,1),%esi - leal (%edi,%esi,8),%esi - movl %esi,24(%esp) - movl -128(%ebp),%edi - movl -96(%ebp),%esi - movl -64(%ebp),%edi - movl -32(%ebp),%esi - movl (%ebp),%edi - movl 32(%ebp),%esi - movl 64(%ebp),%edi - movl 96(%ebp),%esi -.align 4,0x90 -L000loop: - movl %eax,%esi - andl $255,%esi - movzbl -128(%ebp,%esi,1),%esi - movzbl %bh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %ecx,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,4(%esp) - movl %ebx,%esi - andl $255,%esi - shrl $16,%ebx - movzbl -128(%ebp,%esi,1),%esi - movzbl %ch,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %eax,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,8(%esp) - movl %ecx,%esi - andl $255,%esi - shrl $24,%ecx - movzbl -128(%ebp,%esi,1),%esi - movzbl %dh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %eax,%edi - shrl $16,%edi - andl $255,%edx - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movzbl %bh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - andl $255,%edx - movzbl -128(%ebp,%edx,1),%edx - movzbl %ah,%eax - movzbl -128(%ebp,%eax,1),%eax - shll $8,%eax - xorl %eax,%edx - movl 4(%esp),%eax - andl $255,%ebx - movzbl -128(%ebp,%ebx,1),%ebx - shll $16,%ebx - xorl %ebx,%edx - movl 8(%esp),%ebx - movzbl -128(%ebp,%ecx,1),%ecx - shll $24,%ecx - xorl %ecx,%edx - movl %esi,%ecx - movl $2155905152,%ebp - andl %ecx,%ebp - leal (%ecx,%ecx,1),%edi - movl %ebp,%esi - shrl $7,%ebp - andl $4278124286,%edi - subl %ebp,%esi - movl %ecx,%ebp - andl $454761243,%esi - rorl $16,%ebp - xorl %edi,%esi - movl %ecx,%edi - xorl %esi,%ecx - rorl $24,%edi - xorl %ebp,%esi - roll $24,%ecx - xorl %edi,%esi - movl $2155905152,%ebp - xorl %esi,%ecx - andl %edx,%ebp - leal (%edx,%edx,1),%edi - movl %ebp,%esi - shrl $7,%ebp - andl $4278124286,%edi - subl %ebp,%esi - movl %edx,%ebp - andl $454761243,%esi - rorl $16,%ebp - xorl %edi,%esi - movl %edx,%edi - xorl %esi,%edx - rorl $24,%edi - xorl %ebp,%esi - roll $24,%edx - xorl %edi,%esi - movl $2155905152,%ebp - xorl %esi,%edx - andl %eax,%ebp - leal (%eax,%eax,1),%edi - movl %ebp,%esi - shrl $7,%ebp - andl $4278124286,%edi - subl %ebp,%esi - movl %eax,%ebp - andl $454761243,%esi - rorl $16,%ebp - xorl %edi,%esi - movl %eax,%edi - xorl %esi,%eax - rorl $24,%edi - xorl %ebp,%esi - roll $24,%eax - xorl %edi,%esi - movl $2155905152,%ebp - xorl %esi,%eax - andl %ebx,%ebp - leal (%ebx,%ebx,1),%edi - movl %ebp,%esi - shrl $7,%ebp - andl $4278124286,%edi - subl %ebp,%esi - movl %ebx,%ebp - andl $454761243,%esi - rorl $16,%ebp - xorl %edi,%esi - movl %ebx,%edi - xorl %esi,%ebx - rorl $24,%edi - xorl %ebp,%esi - roll $24,%ebx - xorl %edi,%esi - xorl %esi,%ebx - movl 20(%esp),%edi - movl 28(%esp),%ebp - addl $16,%edi - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - cmpl 24(%esp),%edi - movl %edi,20(%esp) - jb L000loop - movl %eax,%esi - andl $255,%esi - movzbl -128(%ebp,%esi,1),%esi - movzbl %bh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %ecx,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,4(%esp) - movl %ebx,%esi - andl $255,%esi - shrl $16,%ebx - movzbl -128(%ebp,%esi,1),%esi - movzbl %ch,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %eax,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,8(%esp) - movl %ecx,%esi - andl $255,%esi - shrl $24,%ecx - movzbl -128(%ebp,%esi,1),%esi - movzbl %dh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %eax,%edi - shrl $16,%edi - andl $255,%edx - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movzbl %bh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl 20(%esp),%edi - andl $255,%edx - movzbl -128(%ebp,%edx,1),%edx - movzbl %ah,%eax - movzbl -128(%ebp,%eax,1),%eax - shll $8,%eax - xorl %eax,%edx - movl 4(%esp),%eax - andl $255,%ebx - movzbl -128(%ebp,%ebx,1),%ebx - shll $16,%ebx - xorl %ebx,%edx - movl 8(%esp),%ebx - movzbl -128(%ebp,%ecx,1),%ecx - shll $24,%ecx - xorl %ecx,%edx - movl %esi,%ecx - xorl 16(%edi),%eax - xorl 20(%edi),%ebx - xorl 24(%edi),%ecx - xorl 28(%edi),%edx - ret -.private_extern __sse_AES_encrypt_compact -.align 4 -__sse_AES_encrypt_compact: - pxor (%edi),%mm0 - pxor 8(%edi),%mm4 - movl 240(%edi),%esi - leal -2(%esi,%esi,1),%esi - leal (%edi,%esi,8),%esi - movl %esi,24(%esp) - movl $454761243,%eax - movl %eax,8(%esp) - movl %eax,12(%esp) - movl -128(%ebp),%eax - movl -96(%ebp),%ebx - movl -64(%ebp),%ecx - movl -32(%ebp),%edx - movl (%ebp),%eax - movl 32(%ebp),%ebx - movl 64(%ebp),%ecx - movl 96(%ebp),%edx -.align 4,0x90 -L001loop: - pshufw $8,%mm0,%mm1 - pshufw $13,%mm4,%mm5 - movd %mm1,%eax - movd %mm5,%ebx - movl %edi,20(%esp) - movzbl %al,%esi - movzbl %ah,%edx - pshufw $13,%mm0,%mm2 - movzbl -128(%ebp,%esi,1),%ecx - movzbl %bl,%edi - movzbl -128(%ebp,%edx,1),%edx - shrl $16,%eax - shll $8,%edx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bh,%edi - shll $16,%esi - pshufw $8,%mm4,%mm6 - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %ah,%edi - shll $24,%esi - shrl $16,%ebx - orl %esi,%edx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bh,%edi - shll $8,%esi - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %al,%edi - shll $24,%esi - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bl,%edi - movd %mm2,%eax - movd %ecx,%mm0 - movzbl -128(%ebp,%edi,1),%ecx - movzbl %ah,%edi - shll $16,%ecx - movd %mm6,%ebx - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bh,%edi - shll $24,%esi - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bl,%edi - shll $8,%esi - shrl $16,%ebx - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %al,%edi - shrl $16,%eax - movd %ecx,%mm1 - movzbl -128(%ebp,%edi,1),%ecx - movzbl %ah,%edi - shll $16,%ecx - andl $255,%eax - orl %esi,%ecx - punpckldq %mm1,%mm0 - movzbl -128(%ebp,%edi,1),%esi - movzbl %bh,%edi - shll $24,%esi - andl $255,%ebx - movzbl -128(%ebp,%eax,1),%eax - orl %esi,%ecx - shll $16,%eax - movzbl -128(%ebp,%edi,1),%esi - orl %eax,%edx - shll $8,%esi - movzbl -128(%ebp,%ebx,1),%ebx - orl %esi,%ecx - orl %ebx,%edx - movl 20(%esp),%edi - movd %ecx,%mm4 - movd %edx,%mm5 - punpckldq %mm5,%mm4 - addl $16,%edi - cmpl 24(%esp),%edi - ja L002out - movq 8(%esp),%mm2 - pxor %mm3,%mm3 - pxor %mm7,%mm7 - movq %mm0,%mm1 - movq %mm4,%mm5 - pcmpgtb %mm0,%mm3 - pcmpgtb %mm4,%mm7 - pand %mm2,%mm3 - pand %mm2,%mm7 - pshufw $177,%mm0,%mm2 - pshufw $177,%mm4,%mm6 - paddb %mm0,%mm0 - paddb %mm4,%mm4 - pxor %mm3,%mm0 - pxor %mm7,%mm4 - pshufw $177,%mm2,%mm3 - pshufw $177,%mm6,%mm7 - pxor %mm0,%mm1 - pxor %mm4,%mm5 - pxor %mm2,%mm0 - pxor %mm6,%mm4 - movq %mm3,%mm2 - movq %mm7,%mm6 - pslld $8,%mm3 - pslld $8,%mm7 - psrld $24,%mm2 - psrld $24,%mm6 - pxor %mm3,%mm0 - pxor %mm7,%mm4 - pxor %mm2,%mm0 - pxor %mm6,%mm4 - movq %mm1,%mm3 - movq %mm5,%mm7 - movq (%edi),%mm2 - movq 8(%edi),%mm6 - psrld $8,%mm1 - psrld $8,%mm5 - movl -128(%ebp),%eax - pslld $24,%mm3 - pslld $24,%mm7 - movl -64(%ebp),%ebx - pxor %mm1,%mm0 - pxor %mm5,%mm4 - movl (%ebp),%ecx - pxor %mm3,%mm0 - pxor %mm7,%mm4 - movl 64(%ebp),%edx - pxor %mm2,%mm0 - pxor %mm6,%mm4 - jmp L001loop -.align 4,0x90 -L002out: - pxor (%edi),%mm0 - pxor 8(%edi),%mm4 - ret -.private_extern __x86_AES_encrypt -.align 4 -__x86_AES_encrypt: - movl %edi,20(%esp) - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - movl 240(%edi),%esi - leal -2(%esi,%esi,1),%esi - leal (%edi,%esi,8),%esi - movl %esi,24(%esp) -.align 4,0x90 -L003loop: - movl %eax,%esi - andl $255,%esi - movl (%ebp,%esi,8),%esi - movzbl %bh,%edi - xorl 3(%ebp,%edi,8),%esi - movl %ecx,%edi - shrl $16,%edi - andl $255,%edi - xorl 2(%ebp,%edi,8),%esi - movl %edx,%edi - shrl $24,%edi - xorl 1(%ebp,%edi,8),%esi - movl %esi,4(%esp) - movl %ebx,%esi - andl $255,%esi - shrl $16,%ebx - movl (%ebp,%esi,8),%esi - movzbl %ch,%edi - xorl 3(%ebp,%edi,8),%esi - movl %edx,%edi - shrl $16,%edi - andl $255,%edi - xorl 2(%ebp,%edi,8),%esi - movl %eax,%edi - shrl $24,%edi - xorl 1(%ebp,%edi,8),%esi - movl %esi,8(%esp) - movl %ecx,%esi - andl $255,%esi - shrl $24,%ecx - movl (%ebp,%esi,8),%esi - movzbl %dh,%edi - xorl 3(%ebp,%edi,8),%esi - movl %eax,%edi - shrl $16,%edi - andl $255,%edx - andl $255,%edi - xorl 2(%ebp,%edi,8),%esi - movzbl %bh,%edi - xorl 1(%ebp,%edi,8),%esi - movl 20(%esp),%edi - movl (%ebp,%edx,8),%edx - movzbl %ah,%eax - xorl 3(%ebp,%eax,8),%edx - movl 4(%esp),%eax - andl $255,%ebx - xorl 2(%ebp,%ebx,8),%edx - movl 8(%esp),%ebx - xorl 1(%ebp,%ecx,8),%edx - movl %esi,%ecx - addl $16,%edi - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - cmpl 24(%esp),%edi - movl %edi,20(%esp) - jb L003loop - movl %eax,%esi - andl $255,%esi - movl 2(%ebp,%esi,8),%esi - andl $255,%esi - movzbl %bh,%edi - movl (%ebp,%edi,8),%edi - andl $65280,%edi - xorl %edi,%esi - movl %ecx,%edi - shrl $16,%edi - andl $255,%edi - movl (%ebp,%edi,8),%edi - andl $16711680,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $24,%edi - movl 2(%ebp,%edi,8),%edi - andl $4278190080,%edi - xorl %edi,%esi - movl %esi,4(%esp) - movl %ebx,%esi - andl $255,%esi - shrl $16,%ebx - movl 2(%ebp,%esi,8),%esi - andl $255,%esi - movzbl %ch,%edi - movl (%ebp,%edi,8),%edi - andl $65280,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $16,%edi - andl $255,%edi - movl (%ebp,%edi,8),%edi - andl $16711680,%edi - xorl %edi,%esi - movl %eax,%edi - shrl $24,%edi - movl 2(%ebp,%edi,8),%edi - andl $4278190080,%edi - xorl %edi,%esi - movl %esi,8(%esp) - movl %ecx,%esi - andl $255,%esi - shrl $24,%ecx - movl 2(%ebp,%esi,8),%esi - andl $255,%esi - movzbl %dh,%edi - movl (%ebp,%edi,8),%edi - andl $65280,%edi - xorl %edi,%esi - movl %eax,%edi - shrl $16,%edi - andl $255,%edx - andl $255,%edi - movl (%ebp,%edi,8),%edi - andl $16711680,%edi - xorl %edi,%esi - movzbl %bh,%edi - movl 2(%ebp,%edi,8),%edi - andl $4278190080,%edi - xorl %edi,%esi - movl 20(%esp),%edi - andl $255,%edx - movl 2(%ebp,%edx,8),%edx - andl $255,%edx - movzbl %ah,%eax - movl (%ebp,%eax,8),%eax - andl $65280,%eax - xorl %eax,%edx - movl 4(%esp),%eax - andl $255,%ebx - movl (%ebp,%ebx,8),%ebx - andl $16711680,%ebx - xorl %ebx,%edx - movl 8(%esp),%ebx - movl 2(%ebp,%ecx,8),%ecx - andl $4278190080,%ecx - xorl %ecx,%edx - movl %esi,%ecx - addl $16,%edi - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - ret -.align 6,0x90 -LAES_Te: -.long 2774754246,2774754246 -.long 2222750968,2222750968 -.long 2574743534,2574743534 -.long 2373680118,2373680118 -.long 234025727,234025727 -.long 3177933782,3177933782 -.long 2976870366,2976870366 -.long 1422247313,1422247313 -.long 1345335392,1345335392 -.long 50397442,50397442 -.long 2842126286,2842126286 -.long 2099981142,2099981142 -.long 436141799,436141799 -.long 1658312629,1658312629 -.long 3870010189,3870010189 -.long 2591454956,2591454956 -.long 1170918031,1170918031 -.long 2642575903,2642575903 -.long 1086966153,1086966153 -.long 2273148410,2273148410 -.long 368769775,368769775 -.long 3948501426,3948501426 -.long 3376891790,3376891790 -.long 200339707,200339707 -.long 3970805057,3970805057 -.long 1742001331,1742001331 -.long 4255294047,4255294047 -.long 3937382213,3937382213 -.long 3214711843,3214711843 -.long 4154762323,4154762323 -.long 2524082916,2524082916 -.long 1539358875,1539358875 -.long 3266819957,3266819957 -.long 486407649,486407649 -.long 2928907069,2928907069 -.long 1780885068,1780885068 -.long 1513502316,1513502316 -.long 1094664062,1094664062 -.long 49805301,49805301 -.long 1338821763,1338821763 -.long 1546925160,1546925160 -.long 4104496465,4104496465 -.long 887481809,887481809 -.long 150073849,150073849 -.long 2473685474,2473685474 -.long 1943591083,1943591083 -.long 1395732834,1395732834 -.long 1058346282,1058346282 -.long 201589768,201589768 -.long 1388824469,1388824469 -.long 1696801606,1696801606 -.long 1589887901,1589887901 -.long 672667696,672667696 -.long 2711000631,2711000631 -.long 251987210,251987210 -.long 3046808111,3046808111 -.long 151455502,151455502 -.long 907153956,907153956 -.long 2608889883,2608889883 -.long 1038279391,1038279391 -.long 652995533,652995533 -.long 1764173646,1764173646 -.long 3451040383,3451040383 -.long 2675275242,2675275242 -.long 453576978,453576978 -.long 2659418909,2659418909 -.long 1949051992,1949051992 -.long 773462580,773462580 -.long 756751158,756751158 -.long 2993581788,2993581788 -.long 3998898868,3998898868 -.long 4221608027,4221608027 -.long 4132590244,4132590244 -.long 1295727478,1295727478 -.long 1641469623,1641469623 -.long 3467883389,3467883389 -.long 2066295122,2066295122 -.long 1055122397,1055122397 -.long 1898917726,1898917726 -.long 2542044179,2542044179 -.long 4115878822,4115878822 -.long 1758581177,1758581177 -.long 0,0 -.long 753790401,753790401 -.long 1612718144,1612718144 -.long 536673507,536673507 -.long 3367088505,3367088505 -.long 3982187446,3982187446 -.long 3194645204,3194645204 -.long 1187761037,1187761037 -.long 3653156455,3653156455 -.long 1262041458,1262041458 -.long 3729410708,3729410708 -.long 3561770136,3561770136 -.long 3898103984,3898103984 -.long 1255133061,1255133061 -.long 1808847035,1808847035 -.long 720367557,720367557 -.long 3853167183,3853167183 -.long 385612781,385612781 -.long 3309519750,3309519750 -.long 3612167578,3612167578 -.long 1429418854,1429418854 -.long 2491778321,2491778321 -.long 3477423498,3477423498 -.long 284817897,284817897 -.long 100794884,100794884 -.long 2172616702,2172616702 -.long 4031795360,4031795360 -.long 1144798328,1144798328 -.long 3131023141,3131023141 -.long 3819481163,3819481163 -.long 4082192802,4082192802 -.long 4272137053,4272137053 -.long 3225436288,3225436288 -.long 2324664069,2324664069 -.long 2912064063,2912064063 -.long 3164445985,3164445985 -.long 1211644016,1211644016 -.long 83228145,83228145 -.long 3753688163,3753688163 -.long 3249976951,3249976951 -.long 1977277103,1977277103 -.long 1663115586,1663115586 -.long 806359072,806359072 -.long 452984805,452984805 -.long 250868733,250868733 -.long 1842533055,1842533055 -.long 1288555905,1288555905 -.long 336333848,336333848 -.long 890442534,890442534 -.long 804056259,804056259 -.long 3781124030,3781124030 -.long 2727843637,2727843637 -.long 3427026056,3427026056 -.long 957814574,957814574 -.long 1472513171,1472513171 -.long 4071073621,4071073621 -.long 2189328124,2189328124 -.long 1195195770,1195195770 -.long 2892260552,2892260552 -.long 3881655738,3881655738 -.long 723065138,723065138 -.long 2507371494,2507371494 -.long 2690670784,2690670784 -.long 2558624025,2558624025 -.long 3511635870,3511635870 -.long 2145180835,2145180835 -.long 1713513028,1713513028 -.long 2116692564,2116692564 -.long 2878378043,2878378043 -.long 2206763019,2206763019 -.long 3393603212,3393603212 -.long 703524551,703524551 -.long 3552098411,3552098411 -.long 1007948840,1007948840 -.long 2044649127,2044649127 -.long 3797835452,3797835452 -.long 487262998,487262998 -.long 1994120109,1994120109 -.long 1004593371,1004593371 -.long 1446130276,1446130276 -.long 1312438900,1312438900 -.long 503974420,503974420 -.long 3679013266,3679013266 -.long 168166924,168166924 -.long 1814307912,1814307912 -.long 3831258296,3831258296 -.long 1573044895,1573044895 -.long 1859376061,1859376061 -.long 4021070915,4021070915 -.long 2791465668,2791465668 -.long 2828112185,2828112185 -.long 2761266481,2761266481 -.long 937747667,937747667 -.long 2339994098,2339994098 -.long 854058965,854058965 -.long 1137232011,1137232011 -.long 1496790894,1496790894 -.long 3077402074,3077402074 -.long 2358086913,2358086913 -.long 1691735473,1691735473 -.long 3528347292,3528347292 -.long 3769215305,3769215305 -.long 3027004632,3027004632 -.long 4199962284,4199962284 -.long 133494003,133494003 -.long 636152527,636152527 -.long 2942657994,2942657994 -.long 2390391540,2390391540 -.long 3920539207,3920539207 -.long 403179536,403179536 -.long 3585784431,3585784431 -.long 2289596656,2289596656 -.long 1864705354,1864705354 -.long 1915629148,1915629148 -.long 605822008,605822008 -.long 4054230615,4054230615 -.long 3350508659,3350508659 -.long 1371981463,1371981463 -.long 602466507,602466507 -.long 2094914977,2094914977 -.long 2624877800,2624877800 -.long 555687742,555687742 -.long 3712699286,3712699286 -.long 3703422305,3703422305 -.long 2257292045,2257292045 -.long 2240449039,2240449039 -.long 2423288032,2423288032 -.long 1111375484,1111375484 -.long 3300242801,3300242801 -.long 2858837708,2858837708 -.long 3628615824,3628615824 -.long 84083462,84083462 -.long 32962295,32962295 -.long 302911004,302911004 -.long 2741068226,2741068226 -.long 1597322602,1597322602 -.long 4183250862,4183250862 -.long 3501832553,3501832553 -.long 2441512471,2441512471 -.long 1489093017,1489093017 -.long 656219450,656219450 -.long 3114180135,3114180135 -.long 954327513,954327513 -.long 335083755,335083755 -.long 3013122091,3013122091 -.long 856756514,856756514 -.long 3144247762,3144247762 -.long 1893325225,1893325225 -.long 2307821063,2307821063 -.long 2811532339,2811532339 -.long 3063651117,3063651117 -.long 572399164,572399164 -.long 2458355477,2458355477 -.long 552200649,552200649 -.long 1238290055,1238290055 -.long 4283782570,4283782570 -.long 2015897680,2015897680 -.long 2061492133,2061492133 -.long 2408352771,2408352771 -.long 4171342169,4171342169 -.long 2156497161,2156497161 -.long 386731290,386731290 -.long 3669999461,3669999461 -.long 837215959,837215959 -.long 3326231172,3326231172 -.long 3093850320,3093850320 -.long 3275833730,3275833730 -.long 2962856233,2962856233 -.long 1999449434,1999449434 -.long 286199582,286199582 -.long 3417354363,3417354363 -.long 4233385128,4233385128 -.long 3602627437,3602627437 -.long 974525996,974525996 -.byte 99,124,119,123,242,107,111,197 -.byte 48,1,103,43,254,215,171,118 -.byte 202,130,201,125,250,89,71,240 -.byte 173,212,162,175,156,164,114,192 -.byte 183,253,147,38,54,63,247,204 -.byte 52,165,229,241,113,216,49,21 -.byte 4,199,35,195,24,150,5,154 -.byte 7,18,128,226,235,39,178,117 -.byte 9,131,44,26,27,110,90,160 -.byte 82,59,214,179,41,227,47,132 -.byte 83,209,0,237,32,252,177,91 -.byte 106,203,190,57,74,76,88,207 -.byte 208,239,170,251,67,77,51,133 -.byte 69,249,2,127,80,60,159,168 -.byte 81,163,64,143,146,157,56,245 -.byte 188,182,218,33,16,255,243,210 -.byte 205,12,19,236,95,151,68,23 -.byte 196,167,126,61,100,93,25,115 -.byte 96,129,79,220,34,42,144,136 -.byte 70,238,184,20,222,94,11,219 -.byte 224,50,58,10,73,6,36,92 -.byte 194,211,172,98,145,149,228,121 -.byte 231,200,55,109,141,213,78,169 -.byte 108,86,244,234,101,122,174,8 -.byte 186,120,37,46,28,166,180,198 -.byte 232,221,116,31,75,189,139,138 -.byte 112,62,181,102,72,3,246,14 -.byte 97,53,87,185,134,193,29,158 -.byte 225,248,152,17,105,217,142,148 -.byte 155,30,135,233,206,85,40,223 -.byte 140,161,137,13,191,230,66,104 -.byte 65,153,45,15,176,84,187,22 -.byte 99,124,119,123,242,107,111,197 -.byte 48,1,103,43,254,215,171,118 -.byte 202,130,201,125,250,89,71,240 -.byte 173,212,162,175,156,164,114,192 -.byte 183,253,147,38,54,63,247,204 -.byte 52,165,229,241,113,216,49,21 -.byte 4,199,35,195,24,150,5,154 -.byte 7,18,128,226,235,39,178,117 -.byte 9,131,44,26,27,110,90,160 -.byte 82,59,214,179,41,227,47,132 -.byte 83,209,0,237,32,252,177,91 -.byte 106,203,190,57,74,76,88,207 -.byte 208,239,170,251,67,77,51,133 -.byte 69,249,2,127,80,60,159,168 -.byte 81,163,64,143,146,157,56,245 -.byte 188,182,218,33,16,255,243,210 -.byte 205,12,19,236,95,151,68,23 -.byte 196,167,126,61,100,93,25,115 -.byte 96,129,79,220,34,42,144,136 -.byte 70,238,184,20,222,94,11,219 -.byte 224,50,58,10,73,6,36,92 -.byte 194,211,172,98,145,149,228,121 -.byte 231,200,55,109,141,213,78,169 -.byte 108,86,244,234,101,122,174,8 -.byte 186,120,37,46,28,166,180,198 -.byte 232,221,116,31,75,189,139,138 -.byte 112,62,181,102,72,3,246,14 -.byte 97,53,87,185,134,193,29,158 -.byte 225,248,152,17,105,217,142,148 -.byte 155,30,135,233,206,85,40,223 -.byte 140,161,137,13,191,230,66,104 -.byte 65,153,45,15,176,84,187,22 -.byte 99,124,119,123,242,107,111,197 -.byte 48,1,103,43,254,215,171,118 -.byte 202,130,201,125,250,89,71,240 -.byte 173,212,162,175,156,164,114,192 -.byte 183,253,147,38,54,63,247,204 -.byte 52,165,229,241,113,216,49,21 -.byte 4,199,35,195,24,150,5,154 -.byte 7,18,128,226,235,39,178,117 -.byte 9,131,44,26,27,110,90,160 -.byte 82,59,214,179,41,227,47,132 -.byte 83,209,0,237,32,252,177,91 -.byte 106,203,190,57,74,76,88,207 -.byte 208,239,170,251,67,77,51,133 -.byte 69,249,2,127,80,60,159,168 -.byte 81,163,64,143,146,157,56,245 -.byte 188,182,218,33,16,255,243,210 -.byte 205,12,19,236,95,151,68,23 -.byte 196,167,126,61,100,93,25,115 -.byte 96,129,79,220,34,42,144,136 -.byte 70,238,184,20,222,94,11,219 -.byte 224,50,58,10,73,6,36,92 -.byte 194,211,172,98,145,149,228,121 -.byte 231,200,55,109,141,213,78,169 -.byte 108,86,244,234,101,122,174,8 -.byte 186,120,37,46,28,166,180,198 -.byte 232,221,116,31,75,189,139,138 -.byte 112,62,181,102,72,3,246,14 -.byte 97,53,87,185,134,193,29,158 -.byte 225,248,152,17,105,217,142,148 -.byte 155,30,135,233,206,85,40,223 -.byte 140,161,137,13,191,230,66,104 -.byte 65,153,45,15,176,84,187,22 -.byte 99,124,119,123,242,107,111,197 -.byte 48,1,103,43,254,215,171,118 -.byte 202,130,201,125,250,89,71,240 -.byte 173,212,162,175,156,164,114,192 -.byte 183,253,147,38,54,63,247,204 -.byte 52,165,229,241,113,216,49,21 -.byte 4,199,35,195,24,150,5,154 -.byte 7,18,128,226,235,39,178,117 -.byte 9,131,44,26,27,110,90,160 -.byte 82,59,214,179,41,227,47,132 -.byte 83,209,0,237,32,252,177,91 -.byte 106,203,190,57,74,76,88,207 -.byte 208,239,170,251,67,77,51,133 -.byte 69,249,2,127,80,60,159,168 -.byte 81,163,64,143,146,157,56,245 -.byte 188,182,218,33,16,255,243,210 -.byte 205,12,19,236,95,151,68,23 -.byte 196,167,126,61,100,93,25,115 -.byte 96,129,79,220,34,42,144,136 -.byte 70,238,184,20,222,94,11,219 -.byte 224,50,58,10,73,6,36,92 -.byte 194,211,172,98,145,149,228,121 -.byte 231,200,55,109,141,213,78,169 -.byte 108,86,244,234,101,122,174,8 -.byte 186,120,37,46,28,166,180,198 -.byte 232,221,116,31,75,189,139,138 -.byte 112,62,181,102,72,3,246,14 -.byte 97,53,87,185,134,193,29,158 -.byte 225,248,152,17,105,217,142,148 -.byte 155,30,135,233,206,85,40,223 -.byte 140,161,137,13,191,230,66,104 -.byte 65,153,45,15,176,84,187,22 -.long 1,2,4,8 -.long 16,32,64,128 -.long 27,54,0,0 -.long 0,0,0,0 -.globl _asm_AES_encrypt -.private_extern _asm_AES_encrypt -.align 4 -_asm_AES_encrypt: -L_asm_AES_encrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl 28(%esp),%edi - movl %esp,%eax - subl $36,%esp - andl $-64,%esp - leal -127(%edi),%ebx - subl %esp,%ebx - negl %ebx - andl $960,%ebx - subl %ebx,%esp - addl $4,%esp - movl %eax,28(%esp) - call L004pic_point -L004pic_point: - popl %ebp - movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L004pic_point(%ebp),%eax - leal LAES_Te-L004pic_point(%ebp),%ebp - leal 764(%esp),%ebx - subl %ebp,%ebx - andl $768,%ebx - leal 2176(%ebp,%ebx,1),%ebp - btl $25,(%eax) - jnc L005x86 - movq (%esi),%mm0 - movq 8(%esi),%mm4 - call __sse_AES_encrypt_compact - movl 28(%esp),%esp - movl 24(%esp),%esi - movq %mm0,(%esi) - movq %mm4,8(%esi) - emms - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.align 4,0x90 -L005x86: - movl %ebp,24(%esp) - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - call __x86_AES_encrypt_compact - movl 28(%esp),%esp - movl 24(%esp),%esi - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %ecx,8(%esi) - movl %edx,12(%esi) - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.private_extern __x86_AES_decrypt_compact -.align 4 -__x86_AES_decrypt_compact: - movl %edi,20(%esp) - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - movl 240(%edi),%esi - leal -2(%esi,%esi,1),%esi - leal (%edi,%esi,8),%esi - movl %esi,24(%esp) - movl -128(%ebp),%edi - movl -96(%ebp),%esi - movl -64(%ebp),%edi - movl -32(%ebp),%esi - movl (%ebp),%edi - movl 32(%ebp),%esi - movl 64(%ebp),%edi - movl 96(%ebp),%esi -.align 4,0x90 -L006loop: - movl %eax,%esi - andl $255,%esi - movzbl -128(%ebp,%esi,1),%esi - movzbl %dh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %ecx,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %ebx,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,4(%esp) - movl %ebx,%esi - andl $255,%esi - movzbl -128(%ebp,%esi,1),%esi - movzbl %ah,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %ecx,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,8(%esp) - movl %ecx,%esi - andl $255,%esi - movzbl -128(%ebp,%esi,1),%esi - movzbl %bh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %eax,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - andl $255,%edx - movzbl -128(%ebp,%edx,1),%edx - movzbl %ch,%ecx - movzbl -128(%ebp,%ecx,1),%ecx - shll $8,%ecx - xorl %ecx,%edx - movl %esi,%ecx - shrl $16,%ebx - andl $255,%ebx - movzbl -128(%ebp,%ebx,1),%ebx - shll $16,%ebx - xorl %ebx,%edx - shrl $24,%eax - movzbl -128(%ebp,%eax,1),%eax - shll $24,%eax - xorl %eax,%edx - movl $2155905152,%edi - andl %ecx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%ecx,%ecx,1),%eax - subl %edi,%esi - andl $4278124286,%eax - andl $454761243,%esi - xorl %esi,%eax - movl $2155905152,%edi - andl %eax,%edi - movl %edi,%esi - shrl $7,%edi - leal (%eax,%eax,1),%ebx - subl %edi,%esi - andl $4278124286,%ebx - andl $454761243,%esi - xorl %ecx,%eax - xorl %esi,%ebx - movl $2155905152,%edi - andl %ebx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%ebx,%ebx,1),%ebp - subl %edi,%esi - andl $4278124286,%ebp - andl $454761243,%esi - xorl %ecx,%ebx - roll $8,%ecx - xorl %esi,%ebp - xorl %eax,%ecx - xorl %ebp,%eax - xorl %ebx,%ecx - xorl %ebp,%ebx - roll $24,%eax - xorl %ebp,%ecx - roll $16,%ebx - xorl %eax,%ecx - roll $8,%ebp - xorl %ebx,%ecx - movl 4(%esp),%eax - xorl %ebp,%ecx - movl %ecx,12(%esp) - movl $2155905152,%edi - andl %edx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%edx,%edx,1),%ebx - subl %edi,%esi - andl $4278124286,%ebx - andl $454761243,%esi - xorl %esi,%ebx - movl $2155905152,%edi - andl %ebx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%ebx,%ebx,1),%ecx - subl %edi,%esi - andl $4278124286,%ecx - andl $454761243,%esi - xorl %edx,%ebx - xorl %esi,%ecx - movl $2155905152,%edi - andl %ecx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%ecx,%ecx,1),%ebp - subl %edi,%esi - andl $4278124286,%ebp - andl $454761243,%esi - xorl %edx,%ecx - roll $8,%edx - xorl %esi,%ebp - xorl %ebx,%edx - xorl %ebp,%ebx - xorl %ecx,%edx - xorl %ebp,%ecx - roll $24,%ebx - xorl %ebp,%edx - roll $16,%ecx - xorl %ebx,%edx - roll $8,%ebp - xorl %ecx,%edx - movl 8(%esp),%ebx - xorl %ebp,%edx - movl %edx,16(%esp) - movl $2155905152,%edi - andl %eax,%edi - movl %edi,%esi - shrl $7,%edi - leal (%eax,%eax,1),%ecx - subl %edi,%esi - andl $4278124286,%ecx - andl $454761243,%esi - xorl %esi,%ecx - movl $2155905152,%edi - andl %ecx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%ecx,%ecx,1),%edx - subl %edi,%esi - andl $4278124286,%edx - andl $454761243,%esi - xorl %eax,%ecx - xorl %esi,%edx - movl $2155905152,%edi - andl %edx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%edx,%edx,1),%ebp - subl %edi,%esi - andl $4278124286,%ebp - andl $454761243,%esi - xorl %eax,%edx - roll $8,%eax - xorl %esi,%ebp - xorl %ecx,%eax - xorl %ebp,%ecx - xorl %edx,%eax - xorl %ebp,%edx - roll $24,%ecx - xorl %ebp,%eax - roll $16,%edx - xorl %ecx,%eax - roll $8,%ebp - xorl %edx,%eax - xorl %ebp,%eax - movl $2155905152,%edi - andl %ebx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%ebx,%ebx,1),%ecx - subl %edi,%esi - andl $4278124286,%ecx - andl $454761243,%esi - xorl %esi,%ecx - movl $2155905152,%edi - andl %ecx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%ecx,%ecx,1),%edx - subl %edi,%esi - andl $4278124286,%edx - andl $454761243,%esi - xorl %ebx,%ecx - xorl %esi,%edx - movl $2155905152,%edi - andl %edx,%edi - movl %edi,%esi - shrl $7,%edi - leal (%edx,%edx,1),%ebp - subl %edi,%esi - andl $4278124286,%ebp - andl $454761243,%esi - xorl %ebx,%edx - roll $8,%ebx - xorl %esi,%ebp - xorl %ecx,%ebx - xorl %ebp,%ecx - xorl %edx,%ebx - xorl %ebp,%edx - roll $24,%ecx - xorl %ebp,%ebx - roll $16,%edx - xorl %ecx,%ebx - roll $8,%ebp - xorl %edx,%ebx - movl 12(%esp),%ecx - xorl %ebp,%ebx - movl 16(%esp),%edx - movl 20(%esp),%edi - movl 28(%esp),%ebp - addl $16,%edi - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - cmpl 24(%esp),%edi - movl %edi,20(%esp) - jb L006loop - movl %eax,%esi - andl $255,%esi - movzbl -128(%ebp,%esi,1),%esi - movzbl %dh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %ecx,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %ebx,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,4(%esp) - movl %ebx,%esi - andl $255,%esi - movzbl -128(%ebp,%esi,1),%esi - movzbl %ah,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %ecx,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,8(%esp) - movl %ecx,%esi - andl $255,%esi - movzbl -128(%ebp,%esi,1),%esi - movzbl %bh,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %eax,%edi - shrl $16,%edi - andl $255,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $24,%edi - movzbl -128(%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl 20(%esp),%edi - andl $255,%edx - movzbl -128(%ebp,%edx,1),%edx - movzbl %ch,%ecx - movzbl -128(%ebp,%ecx,1),%ecx - shll $8,%ecx - xorl %ecx,%edx - movl %esi,%ecx - shrl $16,%ebx - andl $255,%ebx - movzbl -128(%ebp,%ebx,1),%ebx - shll $16,%ebx - xorl %ebx,%edx - movl 8(%esp),%ebx - shrl $24,%eax - movzbl -128(%ebp,%eax,1),%eax - shll $24,%eax - xorl %eax,%edx - movl 4(%esp),%eax - xorl 16(%edi),%eax - xorl 20(%edi),%ebx - xorl 24(%edi),%ecx - xorl 28(%edi),%edx - ret -.private_extern __sse_AES_decrypt_compact -.align 4 -__sse_AES_decrypt_compact: - pxor (%edi),%mm0 - pxor 8(%edi),%mm4 - movl 240(%edi),%esi - leal -2(%esi,%esi,1),%esi - leal (%edi,%esi,8),%esi - movl %esi,24(%esp) - movl $454761243,%eax - movl %eax,8(%esp) - movl %eax,12(%esp) - movl -128(%ebp),%eax - movl -96(%ebp),%ebx - movl -64(%ebp),%ecx - movl -32(%ebp),%edx - movl (%ebp),%eax - movl 32(%ebp),%ebx - movl 64(%ebp),%ecx - movl 96(%ebp),%edx -.align 4,0x90 -L007loop: - pshufw $12,%mm0,%mm1 - pshufw $9,%mm4,%mm5 - movd %mm1,%eax - movd %mm5,%ebx - movl %edi,20(%esp) - movzbl %al,%esi - movzbl %ah,%edx - pshufw $6,%mm0,%mm2 - movzbl -128(%ebp,%esi,1),%ecx - movzbl %bl,%edi - movzbl -128(%ebp,%edx,1),%edx - shrl $16,%eax - shll $8,%edx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bh,%edi - shll $16,%esi - pshufw $3,%mm4,%mm6 - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %ah,%edi - shll $24,%esi - shrl $16,%ebx - orl %esi,%edx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bh,%edi - shll $24,%esi - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %al,%edi - shll $8,%esi - movd %mm2,%eax - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bl,%edi - shll $16,%esi - movd %mm6,%ebx - movd %ecx,%mm0 - movzbl -128(%ebp,%edi,1),%ecx - movzbl %al,%edi - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bl,%edi - orl %esi,%edx - movzbl -128(%ebp,%edi,1),%esi - movzbl %ah,%edi - shll $16,%esi - shrl $16,%eax - orl %esi,%edx - movzbl -128(%ebp,%edi,1),%esi - movzbl %bh,%edi - shrl $16,%ebx - shll $8,%esi - movd %edx,%mm1 - movzbl -128(%ebp,%edi,1),%edx - movzbl %bh,%edi - shll $24,%edx - andl $255,%ebx - orl %esi,%edx - punpckldq %mm1,%mm0 - movzbl -128(%ebp,%edi,1),%esi - movzbl %al,%edi - shll $8,%esi - movzbl %ah,%eax - movzbl -128(%ebp,%ebx,1),%ebx - orl %esi,%ecx - movzbl -128(%ebp,%edi,1),%esi - orl %ebx,%edx - shll $16,%esi - movzbl -128(%ebp,%eax,1),%eax - orl %esi,%edx - shll $24,%eax - orl %eax,%ecx - movl 20(%esp),%edi - movd %edx,%mm4 - movd %ecx,%mm5 - punpckldq %mm5,%mm4 - addl $16,%edi - cmpl 24(%esp),%edi - ja L008out - movq %mm0,%mm3 - movq %mm4,%mm7 - pshufw $228,%mm0,%mm2 - pshufw $228,%mm4,%mm6 - movq %mm0,%mm1 - movq %mm4,%mm5 - pshufw $177,%mm0,%mm0 - pshufw $177,%mm4,%mm4 - pslld $8,%mm2 - pslld $8,%mm6 - psrld $8,%mm3 - psrld $8,%mm7 - pxor %mm2,%mm0 - pxor %mm6,%mm4 - pxor %mm3,%mm0 - pxor %mm7,%mm4 - pslld $16,%mm2 - pslld $16,%mm6 - psrld $16,%mm3 - psrld $16,%mm7 - pxor %mm2,%mm0 - pxor %mm6,%mm4 - pxor %mm3,%mm0 - pxor %mm7,%mm4 - movq 8(%esp),%mm3 - pxor %mm2,%mm2 - pxor %mm6,%mm6 - pcmpgtb %mm1,%mm2 - pcmpgtb %mm5,%mm6 - pand %mm3,%mm2 - pand %mm3,%mm6 - paddb %mm1,%mm1 - paddb %mm5,%mm5 - pxor %mm2,%mm1 - pxor %mm6,%mm5 - movq %mm1,%mm3 - movq %mm5,%mm7 - movq %mm1,%mm2 - movq %mm5,%mm6 - pxor %mm1,%mm0 - pxor %mm5,%mm4 - pslld $24,%mm3 - pslld $24,%mm7 - psrld $8,%mm2 - psrld $8,%mm6 - pxor %mm3,%mm0 - pxor %mm7,%mm4 - pxor %mm2,%mm0 - pxor %mm6,%mm4 - movq 8(%esp),%mm2 - pxor %mm3,%mm3 - pxor %mm7,%mm7 - pcmpgtb %mm1,%mm3 - pcmpgtb %mm5,%mm7 - pand %mm2,%mm3 - pand %mm2,%mm7 - paddb %mm1,%mm1 - paddb %mm5,%mm5 - pxor %mm3,%mm1 - pxor %mm7,%mm5 - pshufw $177,%mm1,%mm3 - pshufw $177,%mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm5,%mm4 - pxor %mm3,%mm0 - pxor %mm7,%mm4 - pxor %mm3,%mm3 - pxor %mm7,%mm7 - pcmpgtb %mm1,%mm3 - pcmpgtb %mm5,%mm7 - pand %mm2,%mm3 - pand %mm2,%mm7 - paddb %mm1,%mm1 - paddb %mm5,%mm5 - pxor %mm3,%mm1 - pxor %mm7,%mm5 - pxor %mm1,%mm0 - pxor %mm5,%mm4 - movq %mm1,%mm3 - movq %mm5,%mm7 - pshufw $177,%mm1,%mm2 - pshufw $177,%mm5,%mm6 - pxor %mm2,%mm0 - pxor %mm6,%mm4 - pslld $8,%mm1 - pslld $8,%mm5 - psrld $8,%mm3 - psrld $8,%mm7 - movq (%edi),%mm2 - movq 8(%edi),%mm6 - pxor %mm1,%mm0 - pxor %mm5,%mm4 - pxor %mm3,%mm0 - pxor %mm7,%mm4 - movl -128(%ebp),%eax - pslld $16,%mm1 - pslld $16,%mm5 - movl -64(%ebp),%ebx - psrld $16,%mm3 - psrld $16,%mm7 - movl (%ebp),%ecx - pxor %mm1,%mm0 - pxor %mm5,%mm4 - movl 64(%ebp),%edx - pxor %mm3,%mm0 - pxor %mm7,%mm4 - pxor %mm2,%mm0 - pxor %mm6,%mm4 - jmp L007loop -.align 4,0x90 -L008out: - pxor (%edi),%mm0 - pxor 8(%edi),%mm4 - ret -.private_extern __x86_AES_decrypt -.align 4 -__x86_AES_decrypt: - movl %edi,20(%esp) - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - movl 240(%edi),%esi - leal -2(%esi,%esi,1),%esi - leal (%edi,%esi,8),%esi - movl %esi,24(%esp) -.align 4,0x90 -L009loop: - movl %eax,%esi - andl $255,%esi - movl (%ebp,%esi,8),%esi - movzbl %dh,%edi - xorl 3(%ebp,%edi,8),%esi - movl %ecx,%edi - shrl $16,%edi - andl $255,%edi - xorl 2(%ebp,%edi,8),%esi - movl %ebx,%edi - shrl $24,%edi - xorl 1(%ebp,%edi,8),%esi - movl %esi,4(%esp) - movl %ebx,%esi - andl $255,%esi - movl (%ebp,%esi,8),%esi - movzbl %ah,%edi - xorl 3(%ebp,%edi,8),%esi - movl %edx,%edi - shrl $16,%edi - andl $255,%edi - xorl 2(%ebp,%edi,8),%esi - movl %ecx,%edi - shrl $24,%edi - xorl 1(%ebp,%edi,8),%esi - movl %esi,8(%esp) - movl %ecx,%esi - andl $255,%esi - movl (%ebp,%esi,8),%esi - movzbl %bh,%edi - xorl 3(%ebp,%edi,8),%esi - movl %eax,%edi - shrl $16,%edi - andl $255,%edi - xorl 2(%ebp,%edi,8),%esi - movl %edx,%edi - shrl $24,%edi - xorl 1(%ebp,%edi,8),%esi - movl 20(%esp),%edi - andl $255,%edx - movl (%ebp,%edx,8),%edx - movzbl %ch,%ecx - xorl 3(%ebp,%ecx,8),%edx - movl %esi,%ecx - shrl $16,%ebx - andl $255,%ebx - xorl 2(%ebp,%ebx,8),%edx - movl 8(%esp),%ebx - shrl $24,%eax - xorl 1(%ebp,%eax,8),%edx - movl 4(%esp),%eax - addl $16,%edi - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - cmpl 24(%esp),%edi - movl %edi,20(%esp) - jb L009loop - leal 2176(%ebp),%ebp - movl -128(%ebp),%edi - movl -96(%ebp),%esi - movl -64(%ebp),%edi - movl -32(%ebp),%esi - movl (%ebp),%edi - movl 32(%ebp),%esi - movl 64(%ebp),%edi - movl 96(%ebp),%esi - leal -128(%ebp),%ebp - movl %eax,%esi - andl $255,%esi - movzbl (%ebp,%esi,1),%esi - movzbl %dh,%edi - movzbl (%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %ecx,%edi - shrl $16,%edi - andl $255,%edi - movzbl (%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %ebx,%edi - shrl $24,%edi - movzbl (%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,4(%esp) - movl %ebx,%esi - andl $255,%esi - movzbl (%ebp,%esi,1),%esi - movzbl %ah,%edi - movzbl (%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $16,%edi - andl $255,%edi - movzbl (%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %ecx,%edi - shrl $24,%edi - movzbl (%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl %esi,8(%esp) - movl %ecx,%esi - andl $255,%esi - movzbl (%ebp,%esi,1),%esi - movzbl %bh,%edi - movzbl (%ebp,%edi,1),%edi - shll $8,%edi - xorl %edi,%esi - movl %eax,%edi - shrl $16,%edi - andl $255,%edi - movzbl (%ebp,%edi,1),%edi - shll $16,%edi - xorl %edi,%esi - movl %edx,%edi - shrl $24,%edi - movzbl (%ebp,%edi,1),%edi - shll $24,%edi - xorl %edi,%esi - movl 20(%esp),%edi - andl $255,%edx - movzbl (%ebp,%edx,1),%edx - movzbl %ch,%ecx - movzbl (%ebp,%ecx,1),%ecx - shll $8,%ecx - xorl %ecx,%edx - movl %esi,%ecx - shrl $16,%ebx - andl $255,%ebx - movzbl (%ebp,%ebx,1),%ebx - shll $16,%ebx - xorl %ebx,%edx - movl 8(%esp),%ebx - shrl $24,%eax - movzbl (%ebp,%eax,1),%eax - shll $24,%eax - xorl %eax,%edx - movl 4(%esp),%eax - leal -2048(%ebp),%ebp - addl $16,%edi - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - ret -.align 6,0x90 -LAES_Td: -.long 1353184337,1353184337 -.long 1399144830,1399144830 -.long 3282310938,3282310938 -.long 2522752826,2522752826 -.long 3412831035,3412831035 -.long 4047871263,4047871263 -.long 2874735276,2874735276 -.long 2466505547,2466505547 -.long 1442459680,1442459680 -.long 4134368941,4134368941 -.long 2440481928,2440481928 -.long 625738485,625738485 -.long 4242007375,4242007375 -.long 3620416197,3620416197 -.long 2151953702,2151953702 -.long 2409849525,2409849525 -.long 1230680542,1230680542 -.long 1729870373,1729870373 -.long 2551114309,2551114309 -.long 3787521629,3787521629 -.long 41234371,41234371 -.long 317738113,317738113 -.long 2744600205,2744600205 -.long 3338261355,3338261355 -.long 3881799427,3881799427 -.long 2510066197,2510066197 -.long 3950669247,3950669247 -.long 3663286933,3663286933 -.long 763608788,763608788 -.long 3542185048,3542185048 -.long 694804553,694804553 -.long 1154009486,1154009486 -.long 1787413109,1787413109 -.long 2021232372,2021232372 -.long 1799248025,1799248025 -.long 3715217703,3715217703 -.long 3058688446,3058688446 -.long 397248752,397248752 -.long 1722556617,1722556617 -.long 3023752829,3023752829 -.long 407560035,407560035 -.long 2184256229,2184256229 -.long 1613975959,1613975959 -.long 1165972322,1165972322 -.long 3765920945,3765920945 -.long 2226023355,2226023355 -.long 480281086,480281086 -.long 2485848313,2485848313 -.long 1483229296,1483229296 -.long 436028815,436028815 -.long 2272059028,2272059028 -.long 3086515026,3086515026 -.long 601060267,601060267 -.long 3791801202,3791801202 -.long 1468997603,1468997603 -.long 715871590,715871590 -.long 120122290,120122290 -.long 63092015,63092015 -.long 2591802758,2591802758 -.long 2768779219,2768779219 -.long 4068943920,4068943920 -.long 2997206819,2997206819 -.long 3127509762,3127509762 -.long 1552029421,1552029421 -.long 723308426,723308426 -.long 2461301159,2461301159 -.long 4042393587,4042393587 -.long 2715969870,2715969870 -.long 3455375973,3455375973 -.long 3586000134,3586000134 -.long 526529745,526529745 -.long 2331944644,2331944644 -.long 2639474228,2639474228 -.long 2689987490,2689987490 -.long 853641733,853641733 -.long 1978398372,1978398372 -.long 971801355,971801355 -.long 2867814464,2867814464 -.long 111112542,111112542 -.long 1360031421,1360031421 -.long 4186579262,4186579262 -.long 1023860118,1023860118 -.long 2919579357,2919579357 -.long 1186850381,1186850381 -.long 3045938321,3045938321 -.long 90031217,90031217 -.long 1876166148,1876166148 -.long 4279586912,4279586912 -.long 620468249,620468249 -.long 2548678102,2548678102 -.long 3426959497,3426959497 -.long 2006899047,2006899047 -.long 3175278768,3175278768 -.long 2290845959,2290845959 -.long 945494503,945494503 -.long 3689859193,3689859193 -.long 1191869601,1191869601 -.long 3910091388,3910091388 -.long 3374220536,3374220536 -.long 0,0 -.long 2206629897,2206629897 -.long 1223502642,1223502642 -.long 2893025566,2893025566 -.long 1316117100,1316117100 -.long 4227796733,4227796733 -.long 1446544655,1446544655 -.long 517320253,517320253 -.long 658058550,658058550 -.long 1691946762,1691946762 -.long 564550760,564550760 -.long 3511966619,3511966619 -.long 976107044,976107044 -.long 2976320012,2976320012 -.long 266819475,266819475 -.long 3533106868,3533106868 -.long 2660342555,2660342555 -.long 1338359936,1338359936 -.long 2720062561,2720062561 -.long 1766553434,1766553434 -.long 370807324,370807324 -.long 179999714,179999714 -.long 3844776128,3844776128 -.long 1138762300,1138762300 -.long 488053522,488053522 -.long 185403662,185403662 -.long 2915535858,2915535858 -.long 3114841645,3114841645 -.long 3366526484,3366526484 -.long 2233069911,2233069911 -.long 1275557295,1275557295 -.long 3151862254,3151862254 -.long 4250959779,4250959779 -.long 2670068215,2670068215 -.long 3170202204,3170202204 -.long 3309004356,3309004356 -.long 880737115,880737115 -.long 1982415755,1982415755 -.long 3703972811,3703972811 -.long 1761406390,1761406390 -.long 1676797112,1676797112 -.long 3403428311,3403428311 -.long 277177154,277177154 -.long 1076008723,1076008723 -.long 538035844,538035844 -.long 2099530373,2099530373 -.long 4164795346,4164795346 -.long 288553390,288553390 -.long 1839278535,1839278535 -.long 1261411869,1261411869 -.long 4080055004,4080055004 -.long 3964831245,3964831245 -.long 3504587127,3504587127 -.long 1813426987,1813426987 -.long 2579067049,2579067049 -.long 4199060497,4199060497 -.long 577038663,577038663 -.long 3297574056,3297574056 -.long 440397984,440397984 -.long 3626794326,3626794326 -.long 4019204898,4019204898 -.long 3343796615,3343796615 -.long 3251714265,3251714265 -.long 4272081548,4272081548 -.long 906744984,906744984 -.long 3481400742,3481400742 -.long 685669029,685669029 -.long 646887386,646887386 -.long 2764025151,2764025151 -.long 3835509292,3835509292 -.long 227702864,227702864 -.long 2613862250,2613862250 -.long 1648787028,1648787028 -.long 3256061430,3256061430 -.long 3904428176,3904428176 -.long 1593260334,1593260334 -.long 4121936770,4121936770 -.long 3196083615,3196083615 -.long 2090061929,2090061929 -.long 2838353263,2838353263 -.long 3004310991,3004310991 -.long 999926984,999926984 -.long 2809993232,2809993232 -.long 1852021992,1852021992 -.long 2075868123,2075868123 -.long 158869197,158869197 -.long 4095236462,4095236462 -.long 28809964,28809964 -.long 2828685187,2828685187 -.long 1701746150,1701746150 -.long 2129067946,2129067946 -.long 147831841,147831841 -.long 3873969647,3873969647 -.long 3650873274,3650873274 -.long 3459673930,3459673930 -.long 3557400554,3557400554 -.long 3598495785,3598495785 -.long 2947720241,2947720241 -.long 824393514,824393514 -.long 815048134,815048134 -.long 3227951669,3227951669 -.long 935087732,935087732 -.long 2798289660,2798289660 -.long 2966458592,2966458592 -.long 366520115,366520115 -.long 1251476721,1251476721 -.long 4158319681,4158319681 -.long 240176511,240176511 -.long 804688151,804688151 -.long 2379631990,2379631990 -.long 1303441219,1303441219 -.long 1414376140,1414376140 -.long 3741619940,3741619940 -.long 3820343710,3820343710 -.long 461924940,461924940 -.long 3089050817,3089050817 -.long 2136040774,2136040774 -.long 82468509,82468509 -.long 1563790337,1563790337 -.long 1937016826,1937016826 -.long 776014843,776014843 -.long 1511876531,1511876531 -.long 1389550482,1389550482 -.long 861278441,861278441 -.long 323475053,323475053 -.long 2355222426,2355222426 -.long 2047648055,2047648055 -.long 2383738969,2383738969 -.long 2302415851,2302415851 -.long 3995576782,3995576782 -.long 902390199,902390199 -.long 3991215329,3991215329 -.long 1018251130,1018251130 -.long 1507840668,1507840668 -.long 1064563285,1064563285 -.long 2043548696,2043548696 -.long 3208103795,3208103795 -.long 3939366739,3939366739 -.long 1537932639,1537932639 -.long 342834655,342834655 -.long 2262516856,2262516856 -.long 2180231114,2180231114 -.long 1053059257,1053059257 -.long 741614648,741614648 -.long 1598071746,1598071746 -.long 1925389590,1925389590 -.long 203809468,203809468 -.long 2336832552,2336832552 -.long 1100287487,1100287487 -.long 1895934009,1895934009 -.long 3736275976,3736275976 -.long 2632234200,2632234200 -.long 2428589668,2428589668 -.long 1636092795,1636092795 -.long 1890988757,1890988757 -.long 1952214088,1952214088 -.long 1113045200,1113045200 -.byte 82,9,106,213,48,54,165,56 -.byte 191,64,163,158,129,243,215,251 -.byte 124,227,57,130,155,47,255,135 -.byte 52,142,67,68,196,222,233,203 -.byte 84,123,148,50,166,194,35,61 -.byte 238,76,149,11,66,250,195,78 -.byte 8,46,161,102,40,217,36,178 -.byte 118,91,162,73,109,139,209,37 -.byte 114,248,246,100,134,104,152,22 -.byte 212,164,92,204,93,101,182,146 -.byte 108,112,72,80,253,237,185,218 -.byte 94,21,70,87,167,141,157,132 -.byte 144,216,171,0,140,188,211,10 -.byte 247,228,88,5,184,179,69,6 -.byte 208,44,30,143,202,63,15,2 -.byte 193,175,189,3,1,19,138,107 -.byte 58,145,17,65,79,103,220,234 -.byte 151,242,207,206,240,180,230,115 -.byte 150,172,116,34,231,173,53,133 -.byte 226,249,55,232,28,117,223,110 -.byte 71,241,26,113,29,41,197,137 -.byte 111,183,98,14,170,24,190,27 -.byte 252,86,62,75,198,210,121,32 -.byte 154,219,192,254,120,205,90,244 -.byte 31,221,168,51,136,7,199,49 -.byte 177,18,16,89,39,128,236,95 -.byte 96,81,127,169,25,181,74,13 -.byte 45,229,122,159,147,201,156,239 -.byte 160,224,59,77,174,42,245,176 -.byte 200,235,187,60,131,83,153,97 -.byte 23,43,4,126,186,119,214,38 -.byte 225,105,20,99,85,33,12,125 -.byte 82,9,106,213,48,54,165,56 -.byte 191,64,163,158,129,243,215,251 -.byte 124,227,57,130,155,47,255,135 -.byte 52,142,67,68,196,222,233,203 -.byte 84,123,148,50,166,194,35,61 -.byte 238,76,149,11,66,250,195,78 -.byte 8,46,161,102,40,217,36,178 -.byte 118,91,162,73,109,139,209,37 -.byte 114,248,246,100,134,104,152,22 -.byte 212,164,92,204,93,101,182,146 -.byte 108,112,72,80,253,237,185,218 -.byte 94,21,70,87,167,141,157,132 -.byte 144,216,171,0,140,188,211,10 -.byte 247,228,88,5,184,179,69,6 -.byte 208,44,30,143,202,63,15,2 -.byte 193,175,189,3,1,19,138,107 -.byte 58,145,17,65,79,103,220,234 -.byte 151,242,207,206,240,180,230,115 -.byte 150,172,116,34,231,173,53,133 -.byte 226,249,55,232,28,117,223,110 -.byte 71,241,26,113,29,41,197,137 -.byte 111,183,98,14,170,24,190,27 -.byte 252,86,62,75,198,210,121,32 -.byte 154,219,192,254,120,205,90,244 -.byte 31,221,168,51,136,7,199,49 -.byte 177,18,16,89,39,128,236,95 -.byte 96,81,127,169,25,181,74,13 -.byte 45,229,122,159,147,201,156,239 -.byte 160,224,59,77,174,42,245,176 -.byte 200,235,187,60,131,83,153,97 -.byte 23,43,4,126,186,119,214,38 -.byte 225,105,20,99,85,33,12,125 -.byte 82,9,106,213,48,54,165,56 -.byte 191,64,163,158,129,243,215,251 -.byte 124,227,57,130,155,47,255,135 -.byte 52,142,67,68,196,222,233,203 -.byte 84,123,148,50,166,194,35,61 -.byte 238,76,149,11,66,250,195,78 -.byte 8,46,161,102,40,217,36,178 -.byte 118,91,162,73,109,139,209,37 -.byte 114,248,246,100,134,104,152,22 -.byte 212,164,92,204,93,101,182,146 -.byte 108,112,72,80,253,237,185,218 -.byte 94,21,70,87,167,141,157,132 -.byte 144,216,171,0,140,188,211,10 -.byte 247,228,88,5,184,179,69,6 -.byte 208,44,30,143,202,63,15,2 -.byte 193,175,189,3,1,19,138,107 -.byte 58,145,17,65,79,103,220,234 -.byte 151,242,207,206,240,180,230,115 -.byte 150,172,116,34,231,173,53,133 -.byte 226,249,55,232,28,117,223,110 -.byte 71,241,26,113,29,41,197,137 -.byte 111,183,98,14,170,24,190,27 -.byte 252,86,62,75,198,210,121,32 -.byte 154,219,192,254,120,205,90,244 -.byte 31,221,168,51,136,7,199,49 -.byte 177,18,16,89,39,128,236,95 -.byte 96,81,127,169,25,181,74,13 -.byte 45,229,122,159,147,201,156,239 -.byte 160,224,59,77,174,42,245,176 -.byte 200,235,187,60,131,83,153,97 -.byte 23,43,4,126,186,119,214,38 -.byte 225,105,20,99,85,33,12,125 -.byte 82,9,106,213,48,54,165,56 -.byte 191,64,163,158,129,243,215,251 -.byte 124,227,57,130,155,47,255,135 -.byte 52,142,67,68,196,222,233,203 -.byte 84,123,148,50,166,194,35,61 -.byte 238,76,149,11,66,250,195,78 -.byte 8,46,161,102,40,217,36,178 -.byte 118,91,162,73,109,139,209,37 -.byte 114,248,246,100,134,104,152,22 -.byte 212,164,92,204,93,101,182,146 -.byte 108,112,72,80,253,237,185,218 -.byte 94,21,70,87,167,141,157,132 -.byte 144,216,171,0,140,188,211,10 -.byte 247,228,88,5,184,179,69,6 -.byte 208,44,30,143,202,63,15,2 -.byte 193,175,189,3,1,19,138,107 -.byte 58,145,17,65,79,103,220,234 -.byte 151,242,207,206,240,180,230,115 -.byte 150,172,116,34,231,173,53,133 -.byte 226,249,55,232,28,117,223,110 -.byte 71,241,26,113,29,41,197,137 -.byte 111,183,98,14,170,24,190,27 -.byte 252,86,62,75,198,210,121,32 -.byte 154,219,192,254,120,205,90,244 -.byte 31,221,168,51,136,7,199,49 -.byte 177,18,16,89,39,128,236,95 -.byte 96,81,127,169,25,181,74,13 -.byte 45,229,122,159,147,201,156,239 -.byte 160,224,59,77,174,42,245,176 -.byte 200,235,187,60,131,83,153,97 -.byte 23,43,4,126,186,119,214,38 -.byte 225,105,20,99,85,33,12,125 -.globl _asm_AES_decrypt -.private_extern _asm_AES_decrypt -.align 4 -_asm_AES_decrypt: -L_asm_AES_decrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl 28(%esp),%edi - movl %esp,%eax - subl $36,%esp - andl $-64,%esp - leal -127(%edi),%ebx - subl %esp,%ebx - negl %ebx - andl $960,%ebx - subl %ebx,%esp - addl $4,%esp - movl %eax,28(%esp) - call L010pic_point -L010pic_point: - popl %ebp - movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L010pic_point(%ebp),%eax - leal LAES_Td-L010pic_point(%ebp),%ebp - leal 764(%esp),%ebx - subl %ebp,%ebx - andl $768,%ebx - leal 2176(%ebp,%ebx,1),%ebp - btl $25,(%eax) - jnc L011x86 - movq (%esi),%mm0 - movq 8(%esi),%mm4 - call __sse_AES_decrypt_compact - movl 28(%esp),%esp - movl 24(%esp),%esi - movq %mm0,(%esi) - movq %mm4,8(%esi) - emms - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.align 4,0x90 -L011x86: - movl %ebp,24(%esp) - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - call __x86_AES_decrypt_compact - movl 28(%esp),%esp - movl 24(%esp),%esi - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %ecx,8(%esi) - movl %edx,12(%esi) - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _asm_AES_cbc_encrypt -.private_extern _asm_AES_cbc_encrypt -.align 4 -_asm_AES_cbc_encrypt: -L_asm_AES_cbc_encrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 28(%esp),%ecx - cmpl $0,%ecx - je L012drop_out - call L013pic_point -L013pic_point: - popl %ebp - movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L013pic_point(%ebp),%eax - cmpl $0,40(%esp) - leal LAES_Te-L013pic_point(%ebp),%ebp - jne L014picked_te - leal LAES_Td-LAES_Te(%ebp),%ebp -L014picked_te: - pushfl - cld - cmpl $512,%ecx - jb L015slow_way - testl $15,%ecx - jnz L015slow_way - btl $28,(%eax) - jc L015slow_way - leal -324(%esp),%esi - andl $-64,%esi - movl %ebp,%eax - leal 2304(%ebp),%ebx - movl %esi,%edx - andl $4095,%eax - andl $4095,%ebx - andl $4095,%edx - cmpl %ebx,%edx - jb L016tbl_break_out - subl %ebx,%edx - subl %edx,%esi - jmp L017tbl_ok -.align 2,0x90 -L016tbl_break_out: - subl %eax,%edx - andl $4095,%edx - addl $384,%edx - subl %edx,%esi -.align 2,0x90 -L017tbl_ok: - leal 24(%esp),%edx - xchgl %esi,%esp - addl $4,%esp - movl %ebp,24(%esp) - movl %esi,28(%esp) - movl (%edx),%eax - movl 4(%edx),%ebx - movl 12(%edx),%edi - movl 16(%edx),%esi - movl 20(%edx),%edx - movl %eax,32(%esp) - movl %ebx,36(%esp) - movl %ecx,40(%esp) - movl %edi,44(%esp) - movl %esi,48(%esp) - movl $0,316(%esp) - movl %edi,%ebx - movl $61,%ecx - subl %ebp,%ebx - movl %edi,%esi - andl $4095,%ebx - leal 76(%esp),%edi - cmpl $2304,%ebx - jb L018do_copy - cmpl $3852,%ebx - jb L019skip_copy -.align 2,0x90 -L018do_copy: - movl %edi,44(%esp) -.long 2784229001 -L019skip_copy: - movl $16,%edi -.align 2,0x90 -L020prefetch_tbl: - movl (%ebp),%eax - movl 32(%ebp),%ebx - movl 64(%ebp),%ecx - movl 96(%ebp),%esi - leal 128(%ebp),%ebp - subl $1,%edi - jnz L020prefetch_tbl - subl $2048,%ebp - movl 32(%esp),%esi - movl 48(%esp),%edi - cmpl $0,%edx - je L021fast_decrypt - movl (%edi),%eax - movl 4(%edi),%ebx -.align 4,0x90 -L022fast_enc_loop: - movl 8(%edi),%ecx - movl 12(%edi),%edx - xorl (%esi),%eax - xorl 4(%esi),%ebx - xorl 8(%esi),%ecx - xorl 12(%esi),%edx - movl 44(%esp),%edi - call __x86_AES_encrypt - movl 32(%esp),%esi - movl 36(%esp),%edi - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - leal 16(%esi),%esi - movl 40(%esp),%ecx - movl %esi,32(%esp) - leal 16(%edi),%edx - movl %edx,36(%esp) - subl $16,%ecx - movl %ecx,40(%esp) - jnz L022fast_enc_loop - movl 48(%esp),%esi - movl 8(%edi),%ecx - movl 12(%edi),%edx - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %ecx,8(%esi) - movl %edx,12(%esi) - cmpl $0,316(%esp) - movl 44(%esp),%edi - je L023skip_ezero - movl $60,%ecx - xorl %eax,%eax -.align 2,0x90 -.long 2884892297 -L023skip_ezero: - movl 28(%esp),%esp - popfl -L012drop_out: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret - pushfl -.align 4,0x90 -L021fast_decrypt: - cmpl 36(%esp),%esi - je L024fast_dec_in_place - movl %edi,52(%esp) -.align 2,0x90 -.align 4,0x90 -L025fast_dec_loop: - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - movl 44(%esp),%edi - call __x86_AES_decrypt - movl 52(%esp),%edi - movl 40(%esp),%esi - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - movl 36(%esp),%edi - movl 32(%esp),%esi - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - movl 40(%esp),%ecx - movl %esi,52(%esp) - leal 16(%esi),%esi - movl %esi,32(%esp) - leal 16(%edi),%edi - movl %edi,36(%esp) - subl $16,%ecx - movl %ecx,40(%esp) - jnz L025fast_dec_loop - movl 52(%esp),%edi - movl 48(%esp),%esi - movl (%edi),%eax - movl 4(%edi),%ebx - movl 8(%edi),%ecx - movl 12(%edi),%edx - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %ecx,8(%esi) - movl %edx,12(%esi) - jmp L026fast_dec_out -.align 4,0x90 -L024fast_dec_in_place: -L027fast_dec_in_place_loop: - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - leal 60(%esp),%edi - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - movl 44(%esp),%edi - call __x86_AES_decrypt - movl 48(%esp),%edi - movl 36(%esp),%esi - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %ecx,8(%esi) - movl %edx,12(%esi) - leal 16(%esi),%esi - movl %esi,36(%esp) - leal 60(%esp),%esi - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - movl 32(%esp),%esi - movl 40(%esp),%ecx - leal 16(%esi),%esi - movl %esi,32(%esp) - subl $16,%ecx - movl %ecx,40(%esp) - jnz L027fast_dec_in_place_loop -.align 2,0x90 -L026fast_dec_out: - cmpl $0,316(%esp) - movl 44(%esp),%edi - je L028skip_dzero - movl $60,%ecx - xorl %eax,%eax -.align 2,0x90 -.long 2884892297 -L028skip_dzero: - movl 28(%esp),%esp - popfl - popl %edi - popl %esi - popl %ebx - popl %ebp - ret - pushfl -.align 4,0x90 -L015slow_way: - movl (%eax),%eax - movl 36(%esp),%edi - leal -80(%esp),%esi - andl $-64,%esi - leal -143(%edi),%ebx - subl %esi,%ebx - negl %ebx - andl $960,%ebx - subl %ebx,%esi - leal 768(%esi),%ebx - subl %ebp,%ebx - andl $768,%ebx - leal 2176(%ebp,%ebx,1),%ebp - leal 24(%esp),%edx - xchgl %esi,%esp - addl $4,%esp - movl %ebp,24(%esp) - movl %esi,28(%esp) - movl %eax,52(%esp) - movl (%edx),%eax - movl 4(%edx),%ebx - movl 16(%edx),%esi - movl 20(%edx),%edx - movl %eax,32(%esp) - movl %ebx,36(%esp) - movl %ecx,40(%esp) - movl %edi,44(%esp) - movl %esi,48(%esp) - movl %esi,%edi - movl %eax,%esi - cmpl $0,%edx - je L029slow_decrypt - cmpl $16,%ecx - movl %ebx,%edx - jb L030slow_enc_tail - btl $25,52(%esp) - jnc L031slow_enc_x86 - movq (%edi),%mm0 - movq 8(%edi),%mm4 -.align 4,0x90 -L032slow_enc_loop_sse: - pxor (%esi),%mm0 - pxor 8(%esi),%mm4 - movl 44(%esp),%edi - call __sse_AES_encrypt_compact - movl 32(%esp),%esi - movl 36(%esp),%edi - movl 40(%esp),%ecx - movq %mm0,(%edi) - movq %mm4,8(%edi) - leal 16(%esi),%esi - movl %esi,32(%esp) - leal 16(%edi),%edx - movl %edx,36(%esp) - subl $16,%ecx - cmpl $16,%ecx - movl %ecx,40(%esp) - jae L032slow_enc_loop_sse - testl $15,%ecx - jnz L030slow_enc_tail - movl 48(%esp),%esi - movq %mm0,(%esi) - movq %mm4,8(%esi) - emms - movl 28(%esp),%esp - popfl - popl %edi - popl %esi - popl %ebx - popl %ebp - ret - pushfl -.align 4,0x90 -L031slow_enc_x86: - movl (%edi),%eax - movl 4(%edi),%ebx -.align 2,0x90 -L033slow_enc_loop_x86: - movl 8(%edi),%ecx - movl 12(%edi),%edx - xorl (%esi),%eax - xorl 4(%esi),%ebx - xorl 8(%esi),%ecx - xorl 12(%esi),%edx - movl 44(%esp),%edi - call __x86_AES_encrypt_compact - movl 32(%esp),%esi - movl 36(%esp),%edi - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - movl 40(%esp),%ecx - leal 16(%esi),%esi - movl %esi,32(%esp) - leal 16(%edi),%edx - movl %edx,36(%esp) - subl $16,%ecx - cmpl $16,%ecx - movl %ecx,40(%esp) - jae L033slow_enc_loop_x86 - testl $15,%ecx - jnz L030slow_enc_tail - movl 48(%esp),%esi - movl 8(%edi),%ecx - movl 12(%edi),%edx - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %ecx,8(%esi) - movl %edx,12(%esi) - movl 28(%esp),%esp - popfl - popl %edi - popl %esi - popl %ebx - popl %ebp - ret - pushfl -.align 4,0x90 -L030slow_enc_tail: - emms - movl %edx,%edi - movl $16,%ebx - subl %ecx,%ebx - cmpl %esi,%edi - je L034enc_in_place -.align 2,0x90 -.long 2767451785 - jmp L035enc_skip_in_place -L034enc_in_place: - leal (%edi,%ecx,1),%edi -L035enc_skip_in_place: - movl %ebx,%ecx - xorl %eax,%eax -.align 2,0x90 -.long 2868115081 - movl 48(%esp),%edi - movl %edx,%esi - movl (%edi),%eax - movl 4(%edi),%ebx - movl $16,40(%esp) - jmp L033slow_enc_loop_x86 -.align 4,0x90 -L029slow_decrypt: - btl $25,52(%esp) - jnc L036slow_dec_loop_x86 -.align 2,0x90 -L037slow_dec_loop_sse: - movq (%esi),%mm0 - movq 8(%esi),%mm4 - movl 44(%esp),%edi - call __sse_AES_decrypt_compact - movl 32(%esp),%esi - leal 60(%esp),%eax - movl 36(%esp),%ebx - movl 40(%esp),%ecx - movl 48(%esp),%edi - movq (%esi),%mm1 - movq 8(%esi),%mm5 - pxor (%edi),%mm0 - pxor 8(%edi),%mm4 - movq %mm1,(%edi) - movq %mm5,8(%edi) - subl $16,%ecx - jc L038slow_dec_partial_sse - movq %mm0,(%ebx) - movq %mm4,8(%ebx) - leal 16(%ebx),%ebx - movl %ebx,36(%esp) - leal 16(%esi),%esi - movl %esi,32(%esp) - movl %ecx,40(%esp) - jnz L037slow_dec_loop_sse - emms - movl 28(%esp),%esp - popfl - popl %edi - popl %esi - popl %ebx - popl %ebp - ret - pushfl -.align 4,0x90 -L038slow_dec_partial_sse: - movq %mm0,(%eax) - movq %mm4,8(%eax) - emms - addl $16,%ecx - movl %ebx,%edi - movl %eax,%esi -.align 2,0x90 -.long 2767451785 - movl 28(%esp),%esp - popfl - popl %edi - popl %esi - popl %ebx - popl %ebp - ret - pushfl -.align 4,0x90 -L036slow_dec_loop_x86: - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - leal 60(%esp),%edi - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - movl 44(%esp),%edi - call __x86_AES_decrypt_compact - movl 48(%esp),%edi - movl 40(%esp),%esi - xorl (%edi),%eax - xorl 4(%edi),%ebx - xorl 8(%edi),%ecx - xorl 12(%edi),%edx - subl $16,%esi - jc L039slow_dec_partial_x86 - movl %esi,40(%esp) - movl 36(%esp),%esi - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %ecx,8(%esi) - movl %edx,12(%esi) - leal 16(%esi),%esi - movl %esi,36(%esp) - leal 60(%esp),%esi - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - movl 32(%esp),%esi - leal 16(%esi),%esi - movl %esi,32(%esp) - jnz L036slow_dec_loop_x86 - movl 28(%esp),%esp - popfl - popl %edi - popl %esi - popl %ebx - popl %ebp - ret - pushfl -.align 4,0x90 -L039slow_dec_partial_x86: - leal 60(%esp),%esi - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %ecx,8(%esi) - movl %edx,12(%esi) - movl 32(%esp),%esi - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - movl 40(%esp),%ecx - movl 36(%esp),%edi - leal 60(%esp),%esi -.align 2,0x90 -.long 2767451785 - movl 28(%esp),%esp - popfl - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.private_extern __x86_AES_set_encrypt_key -.align 4 -__x86_AES_set_encrypt_key: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 24(%esp),%esi - movl 32(%esp),%edi - testl $-1,%esi - jz L040badpointer - testl $-1,%edi - jz L040badpointer - call L041pic_point -L041pic_point: - popl %ebp - leal LAES_Te-L041pic_point(%ebp),%ebp - leal 2176(%ebp),%ebp - movl -128(%ebp),%eax - movl -96(%ebp),%ebx - movl -64(%ebp),%ecx - movl -32(%ebp),%edx - movl (%ebp),%eax - movl 32(%ebp),%ebx - movl 64(%ebp),%ecx - movl 96(%ebp),%edx - movl 28(%esp),%ecx - cmpl $128,%ecx - je L04210rounds - cmpl $192,%ecx - je L04312rounds - cmpl $256,%ecx - je L04414rounds - movl $-2,%eax - jmp L045exit -L04210rounds: - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - xorl %ecx,%ecx - jmp L04610shortcut -.align 2,0x90 -L04710loop: - movl (%edi),%eax - movl 12(%edi),%edx -L04610shortcut: - movzbl %dl,%esi - movzbl -128(%ebp,%esi,1),%ebx - movzbl %dh,%esi - shll $24,%ebx - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - shrl $16,%edx - movzbl %dl,%esi - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - movzbl %dh,%esi - shll $8,%ebx - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - shll $16,%ebx - xorl %ebx,%eax - xorl 896(%ebp,%ecx,4),%eax - movl %eax,16(%edi) - xorl 4(%edi),%eax - movl %eax,20(%edi) - xorl 8(%edi),%eax - movl %eax,24(%edi) - xorl 12(%edi),%eax - movl %eax,28(%edi) - incl %ecx - addl $16,%edi - cmpl $10,%ecx - jl L04710loop - movl $10,80(%edi) - xorl %eax,%eax - jmp L045exit -L04312rounds: - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - movl 16(%esi),%ecx - movl 20(%esi),%edx - movl %ecx,16(%edi) - movl %edx,20(%edi) - xorl %ecx,%ecx - jmp L04812shortcut -.align 2,0x90 -L04912loop: - movl (%edi),%eax - movl 20(%edi),%edx -L04812shortcut: - movzbl %dl,%esi - movzbl -128(%ebp,%esi,1),%ebx - movzbl %dh,%esi - shll $24,%ebx - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - shrl $16,%edx - movzbl %dl,%esi - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - movzbl %dh,%esi - shll $8,%ebx - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - shll $16,%ebx - xorl %ebx,%eax - xorl 896(%ebp,%ecx,4),%eax - movl %eax,24(%edi) - xorl 4(%edi),%eax - movl %eax,28(%edi) - xorl 8(%edi),%eax - movl %eax,32(%edi) - xorl 12(%edi),%eax - movl %eax,36(%edi) - cmpl $7,%ecx - je L05012break - incl %ecx - xorl 16(%edi),%eax - movl %eax,40(%edi) - xorl 20(%edi),%eax - movl %eax,44(%edi) - addl $24,%edi - jmp L04912loop -L05012break: - movl $12,72(%edi) - xorl %eax,%eax - jmp L045exit -L04414rounds: - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,8(%edi) - movl %edx,12(%edi) - movl 16(%esi),%eax - movl 20(%esi),%ebx - movl 24(%esi),%ecx - movl 28(%esi),%edx - movl %eax,16(%edi) - movl %ebx,20(%edi) - movl %ecx,24(%edi) - movl %edx,28(%edi) - xorl %ecx,%ecx - jmp L05114shortcut -.align 2,0x90 -L05214loop: - movl 28(%edi),%edx -L05114shortcut: - movl (%edi),%eax - movzbl %dl,%esi - movzbl -128(%ebp,%esi,1),%ebx - movzbl %dh,%esi - shll $24,%ebx - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - shrl $16,%edx - movzbl %dl,%esi - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - movzbl %dh,%esi - shll $8,%ebx - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - shll $16,%ebx - xorl %ebx,%eax - xorl 896(%ebp,%ecx,4),%eax - movl %eax,32(%edi) - xorl 4(%edi),%eax - movl %eax,36(%edi) - xorl 8(%edi),%eax - movl %eax,40(%edi) - xorl 12(%edi),%eax - movl %eax,44(%edi) - cmpl $6,%ecx - je L05314break - incl %ecx - movl %eax,%edx - movl 16(%edi),%eax - movzbl %dl,%esi - movzbl -128(%ebp,%esi,1),%ebx - movzbl %dh,%esi - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - shrl $16,%edx - shll $8,%ebx - movzbl %dl,%esi - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - movzbl %dh,%esi - shll $16,%ebx - xorl %ebx,%eax - movzbl -128(%ebp,%esi,1),%ebx - shll $24,%ebx - xorl %ebx,%eax - movl %eax,48(%edi) - xorl 20(%edi),%eax - movl %eax,52(%edi) - xorl 24(%edi),%eax - movl %eax,56(%edi) - xorl 28(%edi),%eax - movl %eax,60(%edi) - addl $32,%edi - jmp L05214loop -L05314break: - movl $14,48(%edi) - xorl %eax,%eax - jmp L045exit -L040badpointer: - movl $-1,%eax -L045exit: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _asm_AES_set_encrypt_key -.private_extern _asm_AES_set_encrypt_key -.align 4 -_asm_AES_set_encrypt_key: -L_asm_AES_set_encrypt_key_begin: - call __x86_AES_set_encrypt_key - ret -.globl _asm_AES_set_decrypt_key -.private_extern _asm_AES_set_decrypt_key -.align 4 -_asm_AES_set_decrypt_key: -L_asm_AES_set_decrypt_key_begin: - call __x86_AES_set_encrypt_key - cmpl $0,%eax - je L054proceed - ret -L054proceed: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 28(%esp),%esi - movl 240(%esi),%ecx - leal (,%ecx,4),%ecx - leal (%esi,%ecx,4),%edi -.align 2,0x90 -L055invert: - movl (%esi),%eax - movl 4(%esi),%ebx - movl (%edi),%ecx - movl 4(%edi),%edx - movl %eax,(%edi) - movl %ebx,4(%edi) - movl %ecx,(%esi) - movl %edx,4(%esi) - movl 8(%esi),%eax - movl 12(%esi),%ebx - movl 8(%edi),%ecx - movl 12(%edi),%edx - movl %eax,8(%edi) - movl %ebx,12(%edi) - movl %ecx,8(%esi) - movl %edx,12(%esi) - addl $16,%esi - subl $16,%edi - cmpl %edi,%esi - jne L055invert - movl 28(%esp),%edi - movl 240(%edi),%esi - leal -2(%esi,%esi,1),%esi - leal (%edi,%esi,8),%esi - movl %esi,28(%esp) - movl 16(%edi),%eax -.align 2,0x90 -L056permute: - addl $16,%edi - movl $2155905152,%ebp - andl %eax,%ebp - leal (%eax,%eax,1),%ebx - movl %ebp,%esi - shrl $7,%ebp - subl %ebp,%esi - andl $4278124286,%ebx - andl $454761243,%esi - xorl %esi,%ebx - movl $2155905152,%ebp - andl %ebx,%ebp - leal (%ebx,%ebx,1),%ecx - movl %ebp,%esi - shrl $7,%ebp - subl %ebp,%esi - andl $4278124286,%ecx - andl $454761243,%esi - xorl %eax,%ebx - xorl %esi,%ecx - movl $2155905152,%ebp - andl %ecx,%ebp - leal (%ecx,%ecx,1),%edx - movl %ebp,%esi - shrl $7,%ebp - xorl %eax,%ecx - subl %ebp,%esi - andl $4278124286,%edx - andl $454761243,%esi - roll $8,%eax - xorl %esi,%edx - movl 4(%edi),%ebp - xorl %ebx,%eax - xorl %edx,%ebx - xorl %ecx,%eax - roll $24,%ebx - xorl %edx,%ecx - xorl %edx,%eax - roll $16,%ecx - xorl %ebx,%eax - roll $8,%edx - xorl %ecx,%eax - movl %ebp,%ebx - xorl %edx,%eax - movl %eax,(%edi) - movl $2155905152,%ebp - andl %ebx,%ebp - leal (%ebx,%ebx,1),%ecx - movl %ebp,%esi - shrl $7,%ebp - subl %ebp,%esi - andl $4278124286,%ecx - andl $454761243,%esi - xorl %esi,%ecx - movl $2155905152,%ebp - andl %ecx,%ebp - leal (%ecx,%ecx,1),%edx - movl %ebp,%esi - shrl $7,%ebp - subl %ebp,%esi - andl $4278124286,%edx - andl $454761243,%esi - xorl %ebx,%ecx - xorl %esi,%edx - movl $2155905152,%ebp - andl %edx,%ebp - leal (%edx,%edx,1),%eax - movl %ebp,%esi - shrl $7,%ebp - xorl %ebx,%edx - subl %ebp,%esi - andl $4278124286,%eax - andl $454761243,%esi - roll $8,%ebx - xorl %esi,%eax - movl 8(%edi),%ebp - xorl %ecx,%ebx - xorl %eax,%ecx - xorl %edx,%ebx - roll $24,%ecx - xorl %eax,%edx - xorl %eax,%ebx - roll $16,%edx - xorl %ecx,%ebx - roll $8,%eax - xorl %edx,%ebx - movl %ebp,%ecx - xorl %eax,%ebx - movl %ebx,4(%edi) - movl $2155905152,%ebp - andl %ecx,%ebp - leal (%ecx,%ecx,1),%edx - movl %ebp,%esi - shrl $7,%ebp - subl %ebp,%esi - andl $4278124286,%edx - andl $454761243,%esi - xorl %esi,%edx - movl $2155905152,%ebp - andl %edx,%ebp - leal (%edx,%edx,1),%eax - movl %ebp,%esi - shrl $7,%ebp - subl %ebp,%esi - andl $4278124286,%eax - andl $454761243,%esi - xorl %ecx,%edx - xorl %esi,%eax - movl $2155905152,%ebp - andl %eax,%ebp - leal (%eax,%eax,1),%ebx - movl %ebp,%esi - shrl $7,%ebp - xorl %ecx,%eax - subl %ebp,%esi - andl $4278124286,%ebx - andl $454761243,%esi - roll $8,%ecx - xorl %esi,%ebx - movl 12(%edi),%ebp - xorl %edx,%ecx - xorl %ebx,%edx - xorl %eax,%ecx - roll $24,%edx - xorl %ebx,%eax - xorl %ebx,%ecx - roll $16,%eax - xorl %edx,%ecx - roll $8,%ebx - xorl %eax,%ecx - movl %ebp,%edx - xorl %ebx,%ecx - movl %ecx,8(%edi) - movl $2155905152,%ebp - andl %edx,%ebp - leal (%edx,%edx,1),%eax - movl %ebp,%esi - shrl $7,%ebp - subl %ebp,%esi - andl $4278124286,%eax - andl $454761243,%esi - xorl %esi,%eax - movl $2155905152,%ebp - andl %eax,%ebp - leal (%eax,%eax,1),%ebx - movl %ebp,%esi - shrl $7,%ebp - subl %ebp,%esi - andl $4278124286,%ebx - andl $454761243,%esi - xorl %edx,%eax - xorl %esi,%ebx - movl $2155905152,%ebp - andl %ebx,%ebp - leal (%ebx,%ebx,1),%ecx - movl %ebp,%esi - shrl $7,%ebp - xorl %edx,%ebx - subl %ebp,%esi - andl $4278124286,%ecx - andl $454761243,%esi - roll $8,%edx - xorl %esi,%ecx - movl 16(%edi),%ebp - xorl %eax,%edx - xorl %ecx,%eax - xorl %ebx,%edx - roll $24,%eax - xorl %ecx,%ebx - xorl %ecx,%edx - roll $16,%ebx - xorl %eax,%edx - roll $8,%ecx - xorl %ebx,%edx - movl %ebp,%eax - xorl %ecx,%edx - movl %edx,12(%edi) - cmpl 28(%esp),%edi - jb L056permute - xorl %eax,%eax - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.byte 65,69,83,32,102,111,114,32,120,56,54,44,32,67,82,89 -.byte 80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114 -.byte 111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.section __IMPORT,__pointers,non_lazy_symbol_pointers -L_OPENSSL_ia32cap_P$non_lazy_ptr: -.indirect_symbol _OPENSSL_ia32cap_P -.long 0 -#endif diff --git a/third_party/boringssl/mac-x86/crypto/aes/aesni-x86.S b/third_party/boringssl/mac-x86/crypto/aes/aesni-x86.S deleted file mode 100644 index 07719ba7ae8f6..0000000000000 --- a/third_party/boringssl/mac-x86/crypto/aes/aesni-x86.S +++ /dev/null @@ -1,2433 +0,0 @@ -#if defined(__i386__) -.file "src/crypto/aes/asm/aesni-x86.S" -.text -.globl _aesni_encrypt -.private_extern _aesni_encrypt -.align 4 -_aesni_encrypt: -L_aesni_encrypt_begin: - movl 4(%esp),%eax - movl 12(%esp),%edx - movups (%eax),%xmm2 - movl 240(%edx),%ecx - movl 8(%esp),%eax - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -L000enc1_loop_1: -.byte 102,15,56,220,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz L000enc1_loop_1 -.byte 102,15,56,221,209 - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - movups %xmm2,(%eax) - pxor %xmm2,%xmm2 - ret -.globl _aesni_decrypt -.private_extern _aesni_decrypt -.align 4 -_aesni_decrypt: -L_aesni_decrypt_begin: - movl 4(%esp),%eax - movl 12(%esp),%edx - movups (%eax),%xmm2 - movl 240(%edx),%ecx - movl 8(%esp),%eax - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -L001dec1_loop_2: -.byte 102,15,56,222,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz L001dec1_loop_2 -.byte 102,15,56,223,209 - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - movups %xmm2,(%eax) - pxor %xmm2,%xmm2 - ret -.private_extern __aesni_encrypt2 -.align 4 -__aesni_encrypt2: - movups (%edx),%xmm0 - shll $4,%ecx - movups 16(%edx),%xmm1 - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - movups 32(%edx),%xmm0 - leal 32(%edx,%ecx,1),%edx - negl %ecx - addl $16,%ecx -L002enc2_loop: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 - movups -16(%edx,%ecx,1),%xmm0 - jnz L002enc2_loop -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 - ret -.private_extern __aesni_decrypt2 -.align 4 -__aesni_decrypt2: - movups (%edx),%xmm0 - shll $4,%ecx - movups 16(%edx),%xmm1 - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - movups 32(%edx),%xmm0 - leal 32(%edx,%ecx,1),%edx - negl %ecx - addl $16,%ecx -L003dec2_loop: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 - movups -16(%edx,%ecx,1),%xmm0 - jnz L003dec2_loop -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,223,208 -.byte 102,15,56,223,216 - ret -.private_extern __aesni_encrypt3 -.align 4 -__aesni_encrypt3: - movups (%edx),%xmm0 - shll $4,%ecx - movups 16(%edx),%xmm1 - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - pxor %xmm0,%xmm4 - movups 32(%edx),%xmm0 - leal 32(%edx,%ecx,1),%edx - negl %ecx - addl $16,%ecx -L004enc3_loop: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 - movups -16(%edx,%ecx,1),%xmm0 - jnz L004enc3_loop -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 -.byte 102,15,56,221,224 - ret -.private_extern __aesni_decrypt3 -.align 4 -__aesni_decrypt3: - movups (%edx),%xmm0 - shll $4,%ecx - movups 16(%edx),%xmm1 - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - pxor %xmm0,%xmm4 - movups 32(%edx),%xmm0 - leal 32(%edx,%ecx,1),%edx - negl %ecx - addl $16,%ecx -L005dec3_loop: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 - movups -16(%edx,%ecx,1),%xmm0 - jnz L005dec3_loop -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,223,208 -.byte 102,15,56,223,216 -.byte 102,15,56,223,224 - ret -.private_extern __aesni_encrypt4 -.align 4 -__aesni_encrypt4: - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - shll $4,%ecx - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - pxor %xmm0,%xmm4 - pxor %xmm0,%xmm5 - movups 32(%edx),%xmm0 - leal 32(%edx,%ecx,1),%edx - negl %ecx -.byte 15,31,64,0 - addl $16,%ecx -L006enc4_loop: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 - movups -16(%edx,%ecx,1),%xmm0 - jnz L006enc4_loop -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 -.byte 102,15,56,221,224 -.byte 102,15,56,221,232 - ret -.private_extern __aesni_decrypt4 -.align 4 -__aesni_decrypt4: - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - shll $4,%ecx - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - pxor %xmm0,%xmm4 - pxor %xmm0,%xmm5 - movups 32(%edx),%xmm0 - leal 32(%edx,%ecx,1),%edx - negl %ecx -.byte 15,31,64,0 - addl $16,%ecx -L007dec4_loop: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 - movups -16(%edx,%ecx,1),%xmm0 - jnz L007dec4_loop -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,223,208 -.byte 102,15,56,223,216 -.byte 102,15,56,223,224 -.byte 102,15,56,223,232 - ret -.private_extern __aesni_encrypt6 -.align 4 -__aesni_encrypt6: - movups (%edx),%xmm0 - shll $4,%ecx - movups 16(%edx),%xmm1 - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - pxor %xmm0,%xmm4 -.byte 102,15,56,220,209 - pxor %xmm0,%xmm5 - pxor %xmm0,%xmm6 -.byte 102,15,56,220,217 - leal 32(%edx,%ecx,1),%edx - negl %ecx -.byte 102,15,56,220,225 - pxor %xmm0,%xmm7 - movups (%edx,%ecx,1),%xmm0 - addl $16,%ecx - jmp L008_aesni_encrypt6_inner -.align 4,0x90 -L009enc6_loop: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -L008_aesni_encrypt6_inner: -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -L_aesni_encrypt6_enter: - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 - movups -16(%edx,%ecx,1),%xmm0 - jnz L009enc6_loop -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 -.byte 102,15,56,221,224 -.byte 102,15,56,221,232 -.byte 102,15,56,221,240 -.byte 102,15,56,221,248 - ret -.private_extern __aesni_decrypt6 -.align 4 -__aesni_decrypt6: - movups (%edx),%xmm0 - shll $4,%ecx - movups 16(%edx),%xmm1 - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - pxor %xmm0,%xmm4 -.byte 102,15,56,222,209 - pxor %xmm0,%xmm5 - pxor %xmm0,%xmm6 -.byte 102,15,56,222,217 - leal 32(%edx,%ecx,1),%edx - negl %ecx -.byte 102,15,56,222,225 - pxor %xmm0,%xmm7 - movups (%edx,%ecx,1),%xmm0 - addl $16,%ecx - jmp L010_aesni_decrypt6_inner -.align 4,0x90 -L011dec6_loop: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -L010_aesni_decrypt6_inner: -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -L_aesni_decrypt6_enter: - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 - movups -16(%edx,%ecx,1),%xmm0 - jnz L011dec6_loop -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,15,56,223,208 -.byte 102,15,56,223,216 -.byte 102,15,56,223,224 -.byte 102,15,56,223,232 -.byte 102,15,56,223,240 -.byte 102,15,56,223,248 - ret -.globl _aesni_ecb_encrypt -.private_extern _aesni_ecb_encrypt -.align 4 -_aesni_ecb_encrypt: -L_aesni_ecb_encrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%eax - movl 32(%esp),%edx - movl 36(%esp),%ebx - andl $-16,%eax - jz L012ecb_ret - movl 240(%edx),%ecx - testl %ebx,%ebx - jz L013ecb_decrypt - movl %edx,%ebp - movl %ecx,%ebx - cmpl $96,%eax - jb L014ecb_enc_tail - movdqu (%esi),%xmm2 - movdqu 16(%esi),%xmm3 - movdqu 32(%esi),%xmm4 - movdqu 48(%esi),%xmm5 - movdqu 64(%esi),%xmm6 - movdqu 80(%esi),%xmm7 - leal 96(%esi),%esi - subl $96,%eax - jmp L015ecb_enc_loop6_enter -.align 4,0x90 -L016ecb_enc_loop6: - movups %xmm2,(%edi) - movdqu (%esi),%xmm2 - movups %xmm3,16(%edi) - movdqu 16(%esi),%xmm3 - movups %xmm4,32(%edi) - movdqu 32(%esi),%xmm4 - movups %xmm5,48(%edi) - movdqu 48(%esi),%xmm5 - movups %xmm6,64(%edi) - movdqu 64(%esi),%xmm6 - movups %xmm7,80(%edi) - leal 96(%edi),%edi - movdqu 80(%esi),%xmm7 - leal 96(%esi),%esi -L015ecb_enc_loop6_enter: - call __aesni_encrypt6 - movl %ebp,%edx - movl %ebx,%ecx - subl $96,%eax - jnc L016ecb_enc_loop6 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - movups %xmm6,64(%edi) - movups %xmm7,80(%edi) - leal 96(%edi),%edi - addl $96,%eax - jz L012ecb_ret -L014ecb_enc_tail: - movups (%esi),%xmm2 - cmpl $32,%eax - jb L017ecb_enc_one - movups 16(%esi),%xmm3 - je L018ecb_enc_two - movups 32(%esi),%xmm4 - cmpl $64,%eax - jb L019ecb_enc_three - movups 48(%esi),%xmm5 - je L020ecb_enc_four - movups 64(%esi),%xmm6 - xorps %xmm7,%xmm7 - call __aesni_encrypt6 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - movups %xmm6,64(%edi) - jmp L012ecb_ret -.align 4,0x90 -L017ecb_enc_one: - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -L021enc1_loop_3: -.byte 102,15,56,220,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz L021enc1_loop_3 -.byte 102,15,56,221,209 - movups %xmm2,(%edi) - jmp L012ecb_ret -.align 4,0x90 -L018ecb_enc_two: - call __aesni_encrypt2 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - jmp L012ecb_ret -.align 4,0x90 -L019ecb_enc_three: - call __aesni_encrypt3 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - jmp L012ecb_ret -.align 4,0x90 -L020ecb_enc_four: - call __aesni_encrypt4 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - jmp L012ecb_ret -.align 4,0x90 -L013ecb_decrypt: - movl %edx,%ebp - movl %ecx,%ebx - cmpl $96,%eax - jb L022ecb_dec_tail - movdqu (%esi),%xmm2 - movdqu 16(%esi),%xmm3 - movdqu 32(%esi),%xmm4 - movdqu 48(%esi),%xmm5 - movdqu 64(%esi),%xmm6 - movdqu 80(%esi),%xmm7 - leal 96(%esi),%esi - subl $96,%eax - jmp L023ecb_dec_loop6_enter -.align 4,0x90 -L024ecb_dec_loop6: - movups %xmm2,(%edi) - movdqu (%esi),%xmm2 - movups %xmm3,16(%edi) - movdqu 16(%esi),%xmm3 - movups %xmm4,32(%edi) - movdqu 32(%esi),%xmm4 - movups %xmm5,48(%edi) - movdqu 48(%esi),%xmm5 - movups %xmm6,64(%edi) - movdqu 64(%esi),%xmm6 - movups %xmm7,80(%edi) - leal 96(%edi),%edi - movdqu 80(%esi),%xmm7 - leal 96(%esi),%esi -L023ecb_dec_loop6_enter: - call __aesni_decrypt6 - movl %ebp,%edx - movl %ebx,%ecx - subl $96,%eax - jnc L024ecb_dec_loop6 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - movups %xmm6,64(%edi) - movups %xmm7,80(%edi) - leal 96(%edi),%edi - addl $96,%eax - jz L012ecb_ret -L022ecb_dec_tail: - movups (%esi),%xmm2 - cmpl $32,%eax - jb L025ecb_dec_one - movups 16(%esi),%xmm3 - je L026ecb_dec_two - movups 32(%esi),%xmm4 - cmpl $64,%eax - jb L027ecb_dec_three - movups 48(%esi),%xmm5 - je L028ecb_dec_four - movups 64(%esi),%xmm6 - xorps %xmm7,%xmm7 - call __aesni_decrypt6 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - movups %xmm6,64(%edi) - jmp L012ecb_ret -.align 4,0x90 -L025ecb_dec_one: - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -L029dec1_loop_4: -.byte 102,15,56,222,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz L029dec1_loop_4 -.byte 102,15,56,223,209 - movups %xmm2,(%edi) - jmp L012ecb_ret -.align 4,0x90 -L026ecb_dec_two: - call __aesni_decrypt2 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - jmp L012ecb_ret -.align 4,0x90 -L027ecb_dec_three: - call __aesni_decrypt3 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - jmp L012ecb_ret -.align 4,0x90 -L028ecb_dec_four: - call __aesni_decrypt4 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) -L012ecb_ret: - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _aesni_ccm64_encrypt_blocks -.private_extern _aesni_ccm64_encrypt_blocks -.align 4 -_aesni_ccm64_encrypt_blocks: -L_aesni_ccm64_encrypt_blocks_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%eax - movl 32(%esp),%edx - movl 36(%esp),%ebx - movl 40(%esp),%ecx - movl %esp,%ebp - subl $60,%esp - andl $-16,%esp - movl %ebp,48(%esp) - movdqu (%ebx),%xmm7 - movdqu (%ecx),%xmm3 - movl 240(%edx),%ecx - movl $202182159,(%esp) - movl $134810123,4(%esp) - movl $67438087,8(%esp) - movl $66051,12(%esp) - movl $1,%ebx - xorl %ebp,%ebp - movl %ebx,16(%esp) - movl %ebp,20(%esp) - movl %ebp,24(%esp) - movl %ebp,28(%esp) - shll $4,%ecx - movl $16,%ebx - leal (%edx),%ebp - movdqa (%esp),%xmm5 - movdqa %xmm7,%xmm2 - leal 32(%edx,%ecx,1),%edx - subl %ecx,%ebx -.byte 102,15,56,0,253 -L030ccm64_enc_outer: - movups (%ebp),%xmm0 - movl %ebx,%ecx - movups (%esi),%xmm6 - xorps %xmm0,%xmm2 - movups 16(%ebp),%xmm1 - xorps %xmm6,%xmm0 - xorps %xmm0,%xmm3 - movups 32(%ebp),%xmm0 -L031ccm64_enc2_loop: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 - movups -16(%edx,%ecx,1),%xmm0 - jnz L031ccm64_enc2_loop -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - paddq 16(%esp),%xmm7 - decl %eax -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 - leal 16(%esi),%esi - xorps %xmm2,%xmm6 - movdqa %xmm7,%xmm2 - movups %xmm6,(%edi) -.byte 102,15,56,0,213 - leal 16(%edi),%edi - jnz L030ccm64_enc_outer - movl 48(%esp),%esp - movl 40(%esp),%edi - movups %xmm3,(%edi) - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _aesni_ccm64_decrypt_blocks -.private_extern _aesni_ccm64_decrypt_blocks -.align 4 -_aesni_ccm64_decrypt_blocks: -L_aesni_ccm64_decrypt_blocks_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%eax - movl 32(%esp),%edx - movl 36(%esp),%ebx - movl 40(%esp),%ecx - movl %esp,%ebp - subl $60,%esp - andl $-16,%esp - movl %ebp,48(%esp) - movdqu (%ebx),%xmm7 - movdqu (%ecx),%xmm3 - movl 240(%edx),%ecx - movl $202182159,(%esp) - movl $134810123,4(%esp) - movl $67438087,8(%esp) - movl $66051,12(%esp) - movl $1,%ebx - xorl %ebp,%ebp - movl %ebx,16(%esp) - movl %ebp,20(%esp) - movl %ebp,24(%esp) - movl %ebp,28(%esp) - movdqa (%esp),%xmm5 - movdqa %xmm7,%xmm2 - movl %edx,%ebp - movl %ecx,%ebx -.byte 102,15,56,0,253 - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -L032enc1_loop_5: -.byte 102,15,56,220,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz L032enc1_loop_5 -.byte 102,15,56,221,209 - shll $4,%ebx - movl $16,%ecx - movups (%esi),%xmm6 - paddq 16(%esp),%xmm7 - leal 16(%esi),%esi - subl %ebx,%ecx - leal 32(%ebp,%ebx,1),%edx - movl %ecx,%ebx - jmp L033ccm64_dec_outer -.align 4,0x90 -L033ccm64_dec_outer: - xorps %xmm2,%xmm6 - movdqa %xmm7,%xmm2 - movups %xmm6,(%edi) - leal 16(%edi),%edi -.byte 102,15,56,0,213 - subl $1,%eax - jz L034ccm64_dec_break - movups (%ebp),%xmm0 - movl %ebx,%ecx - movups 16(%ebp),%xmm1 - xorps %xmm0,%xmm6 - xorps %xmm0,%xmm2 - xorps %xmm6,%xmm3 - movups 32(%ebp),%xmm0 -L035ccm64_dec2_loop: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - movups (%edx,%ecx,1),%xmm1 - addl $32,%ecx -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 - movups -16(%edx,%ecx,1),%xmm0 - jnz L035ccm64_dec2_loop - movups (%esi),%xmm6 - paddq 16(%esp),%xmm7 -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 - leal 16(%esi),%esi - jmp L033ccm64_dec_outer -.align 4,0x90 -L034ccm64_dec_break: - movl 240(%ebp),%ecx - movl %ebp,%edx - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - xorps %xmm0,%xmm6 - leal 32(%edx),%edx - xorps %xmm6,%xmm3 -L036enc1_loop_6: -.byte 102,15,56,220,217 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz L036enc1_loop_6 -.byte 102,15,56,221,217 - movl 48(%esp),%esp - movl 40(%esp),%edi - movups %xmm3,(%edi) - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _aesni_ctr32_encrypt_blocks -.private_extern _aesni_ctr32_encrypt_blocks -.align 4 -_aesni_ctr32_encrypt_blocks: -L_aesni_ctr32_encrypt_blocks_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%eax - movl 32(%esp),%edx - movl 36(%esp),%ebx - movl %esp,%ebp - subl $88,%esp - andl $-16,%esp - movl %ebp,80(%esp) - cmpl $1,%eax - je L037ctr32_one_shortcut - movdqu (%ebx),%xmm7 - movl $202182159,(%esp) - movl $134810123,4(%esp) - movl $67438087,8(%esp) - movl $66051,12(%esp) - movl $6,%ecx - xorl %ebp,%ebp - movl %ecx,16(%esp) - movl %ecx,20(%esp) - movl %ecx,24(%esp) - movl %ebp,28(%esp) -.byte 102,15,58,22,251,3 -.byte 102,15,58,34,253,3 - movl 240(%edx),%ecx - bswap %ebx - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - movdqa (%esp),%xmm2 -.byte 102,15,58,34,195,0 - leal 3(%ebx),%ebp -.byte 102,15,58,34,205,0 - incl %ebx -.byte 102,15,58,34,195,1 - incl %ebp -.byte 102,15,58,34,205,1 - incl %ebx -.byte 102,15,58,34,195,2 - incl %ebp -.byte 102,15,58,34,205,2 - movdqa %xmm0,48(%esp) -.byte 102,15,56,0,194 - movdqu (%edx),%xmm6 - movdqa %xmm1,64(%esp) -.byte 102,15,56,0,202 - pshufd $192,%xmm0,%xmm2 - pshufd $128,%xmm0,%xmm3 - cmpl $6,%eax - jb L038ctr32_tail - pxor %xmm6,%xmm7 - shll $4,%ecx - movl $16,%ebx - movdqa %xmm7,32(%esp) - movl %edx,%ebp - subl %ecx,%ebx - leal 32(%edx,%ecx,1),%edx - subl $6,%eax - jmp L039ctr32_loop6 -.align 4,0x90 -L039ctr32_loop6: - pshufd $64,%xmm0,%xmm4 - movdqa 32(%esp),%xmm0 - pshufd $192,%xmm1,%xmm5 - pxor %xmm0,%xmm2 - pshufd $128,%xmm1,%xmm6 - pxor %xmm0,%xmm3 - pshufd $64,%xmm1,%xmm7 - movups 16(%ebp),%xmm1 - pxor %xmm0,%xmm4 - pxor %xmm0,%xmm5 -.byte 102,15,56,220,209 - pxor %xmm0,%xmm6 - pxor %xmm0,%xmm7 -.byte 102,15,56,220,217 - movups 32(%ebp),%xmm0 - movl %ebx,%ecx -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 - call L_aesni_encrypt6_enter - movups (%esi),%xmm1 - movups 16(%esi),%xmm0 - xorps %xmm1,%xmm2 - movups 32(%esi),%xmm1 - xorps %xmm0,%xmm3 - movups %xmm2,(%edi) - movdqa 16(%esp),%xmm0 - xorps %xmm1,%xmm4 - movdqa 64(%esp),%xmm1 - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - paddd %xmm0,%xmm1 - paddd 48(%esp),%xmm0 - movdqa (%esp),%xmm2 - movups 48(%esi),%xmm3 - movups 64(%esi),%xmm4 - xorps %xmm3,%xmm5 - movups 80(%esi),%xmm3 - leal 96(%esi),%esi - movdqa %xmm0,48(%esp) -.byte 102,15,56,0,194 - xorps %xmm4,%xmm6 - movups %xmm5,48(%edi) - xorps %xmm3,%xmm7 - movdqa %xmm1,64(%esp) -.byte 102,15,56,0,202 - movups %xmm6,64(%edi) - pshufd $192,%xmm0,%xmm2 - movups %xmm7,80(%edi) - leal 96(%edi),%edi - pshufd $128,%xmm0,%xmm3 - subl $6,%eax - jnc L039ctr32_loop6 - addl $6,%eax - jz L040ctr32_ret - movdqu (%ebp),%xmm7 - movl %ebp,%edx - pxor 32(%esp),%xmm7 - movl 240(%ebp),%ecx -L038ctr32_tail: - por %xmm7,%xmm2 - cmpl $2,%eax - jb L041ctr32_one - pshufd $64,%xmm0,%xmm4 - por %xmm7,%xmm3 - je L042ctr32_two - pshufd $192,%xmm1,%xmm5 - por %xmm7,%xmm4 - cmpl $4,%eax - jb L043ctr32_three - pshufd $128,%xmm1,%xmm6 - por %xmm7,%xmm5 - je L044ctr32_four - por %xmm7,%xmm6 - call __aesni_encrypt6 - movups (%esi),%xmm1 - movups 16(%esi),%xmm0 - xorps %xmm1,%xmm2 - movups 32(%esi),%xmm1 - xorps %xmm0,%xmm3 - movups 48(%esi),%xmm0 - xorps %xmm1,%xmm4 - movups 64(%esi),%xmm1 - xorps %xmm0,%xmm5 - movups %xmm2,(%edi) - xorps %xmm1,%xmm6 - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - movups %xmm6,64(%edi) - jmp L040ctr32_ret -.align 4,0x90 -L037ctr32_one_shortcut: - movups (%ebx),%xmm2 - movl 240(%edx),%ecx -L041ctr32_one: - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -L045enc1_loop_7: -.byte 102,15,56,220,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz L045enc1_loop_7 -.byte 102,15,56,221,209 - movups (%esi),%xmm6 - xorps %xmm2,%xmm6 - movups %xmm6,(%edi) - jmp L040ctr32_ret -.align 4,0x90 -L042ctr32_two: - call __aesni_encrypt2 - movups (%esi),%xmm5 - movups 16(%esi),%xmm6 - xorps %xmm5,%xmm2 - xorps %xmm6,%xmm3 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - jmp L040ctr32_ret -.align 4,0x90 -L043ctr32_three: - call __aesni_encrypt3 - movups (%esi),%xmm5 - movups 16(%esi),%xmm6 - xorps %xmm5,%xmm2 - movups 32(%esi),%xmm7 - xorps %xmm6,%xmm3 - movups %xmm2,(%edi) - xorps %xmm7,%xmm4 - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - jmp L040ctr32_ret -.align 4,0x90 -L044ctr32_four: - call __aesni_encrypt4 - movups (%esi),%xmm6 - movups 16(%esi),%xmm7 - movups 32(%esi),%xmm1 - xorps %xmm6,%xmm2 - movups 48(%esi),%xmm0 - xorps %xmm7,%xmm3 - movups %xmm2,(%edi) - xorps %xmm1,%xmm4 - movups %xmm3,16(%edi) - xorps %xmm0,%xmm5 - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) -L040ctr32_ret: - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - movdqa %xmm0,32(%esp) - pxor %xmm5,%xmm5 - movdqa %xmm0,48(%esp) - pxor %xmm6,%xmm6 - movdqa %xmm0,64(%esp) - pxor %xmm7,%xmm7 - movl 80(%esp),%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _aesni_xts_encrypt -.private_extern _aesni_xts_encrypt -.align 4 -_aesni_xts_encrypt: -L_aesni_xts_encrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 36(%esp),%edx - movl 40(%esp),%esi - movl 240(%edx),%ecx - movups (%esi),%xmm2 - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -L046enc1_loop_8: -.byte 102,15,56,220,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz L046enc1_loop_8 -.byte 102,15,56,221,209 - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%eax - movl 32(%esp),%edx - movl %esp,%ebp - subl $120,%esp - movl 240(%edx),%ecx - andl $-16,%esp - movl $135,96(%esp) - movl $0,100(%esp) - movl $1,104(%esp) - movl $0,108(%esp) - movl %eax,112(%esp) - movl %ebp,116(%esp) - movdqa %xmm2,%xmm1 - pxor %xmm0,%xmm0 - movdqa 96(%esp),%xmm3 - pcmpgtd %xmm1,%xmm0 - andl $-16,%eax - movl %edx,%ebp - movl %ecx,%ebx - subl $96,%eax - jc L047xts_enc_short - shll $4,%ecx - movl $16,%ebx - subl %ecx,%ebx - leal 32(%edx,%ecx,1),%edx - jmp L048xts_enc_loop6 -.align 4,0x90 -L048xts_enc_loop6: - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,16(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,32(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,48(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - pshufd $19,%xmm0,%xmm7 - movdqa %xmm1,64(%esp) - paddq %xmm1,%xmm1 - movups (%ebp),%xmm0 - pand %xmm3,%xmm7 - movups (%esi),%xmm2 - pxor %xmm1,%xmm7 - movl %ebx,%ecx - movdqu 16(%esi),%xmm3 - xorps %xmm0,%xmm2 - movdqu 32(%esi),%xmm4 - pxor %xmm0,%xmm3 - movdqu 48(%esi),%xmm5 - pxor %xmm0,%xmm4 - movdqu 64(%esi),%xmm6 - pxor %xmm0,%xmm5 - movdqu 80(%esi),%xmm1 - pxor %xmm0,%xmm6 - leal 96(%esi),%esi - pxor (%esp),%xmm2 - movdqa %xmm7,80(%esp) - pxor %xmm1,%xmm7 - movups 16(%ebp),%xmm1 - pxor 16(%esp),%xmm3 - pxor 32(%esp),%xmm4 -.byte 102,15,56,220,209 - pxor 48(%esp),%xmm5 - pxor 64(%esp),%xmm6 -.byte 102,15,56,220,217 - pxor %xmm0,%xmm7 - movups 32(%ebp),%xmm0 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 - call L_aesni_encrypt6_enter - movdqa 80(%esp),%xmm1 - pxor %xmm0,%xmm0 - xorps (%esp),%xmm2 - pcmpgtd %xmm1,%xmm0 - xorps 16(%esp),%xmm3 - movups %xmm2,(%edi) - xorps 32(%esp),%xmm4 - movups %xmm3,16(%edi) - xorps 48(%esp),%xmm5 - movups %xmm4,32(%edi) - xorps 64(%esp),%xmm6 - movups %xmm5,48(%edi) - xorps %xmm1,%xmm7 - movups %xmm6,64(%edi) - pshufd $19,%xmm0,%xmm2 - movups %xmm7,80(%edi) - leal 96(%edi),%edi - movdqa 96(%esp),%xmm3 - pxor %xmm0,%xmm0 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - subl $96,%eax - jnc L048xts_enc_loop6 - movl 240(%ebp),%ecx - movl %ebp,%edx - movl %ecx,%ebx -L047xts_enc_short: - addl $96,%eax - jz L049xts_enc_done6x - movdqa %xmm1,%xmm5 - cmpl $32,%eax - jb L050xts_enc_one - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - je L051xts_enc_two - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,%xmm6 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - cmpl $64,%eax - jb L052xts_enc_three - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,%xmm7 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - movdqa %xmm5,(%esp) - movdqa %xmm6,16(%esp) - je L053xts_enc_four - movdqa %xmm7,32(%esp) - pshufd $19,%xmm0,%xmm7 - movdqa %xmm1,48(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm7 - pxor %xmm1,%xmm7 - movdqu (%esi),%xmm2 - movdqu 16(%esi),%xmm3 - movdqu 32(%esi),%xmm4 - pxor (%esp),%xmm2 - movdqu 48(%esi),%xmm5 - pxor 16(%esp),%xmm3 - movdqu 64(%esi),%xmm6 - pxor 32(%esp),%xmm4 - leal 80(%esi),%esi - pxor 48(%esp),%xmm5 - movdqa %xmm7,64(%esp) - pxor %xmm7,%xmm6 - call __aesni_encrypt6 - movaps 64(%esp),%xmm1 - xorps (%esp),%xmm2 - xorps 16(%esp),%xmm3 - xorps 32(%esp),%xmm4 - movups %xmm2,(%edi) - xorps 48(%esp),%xmm5 - movups %xmm3,16(%edi) - xorps %xmm1,%xmm6 - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - movups %xmm6,64(%edi) - leal 80(%edi),%edi - jmp L054xts_enc_done -.align 4,0x90 -L050xts_enc_one: - movups (%esi),%xmm2 - leal 16(%esi),%esi - xorps %xmm5,%xmm2 - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -L055enc1_loop_9: -.byte 102,15,56,220,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz L055enc1_loop_9 -.byte 102,15,56,221,209 - xorps %xmm5,%xmm2 - movups %xmm2,(%edi) - leal 16(%edi),%edi - movdqa %xmm5,%xmm1 - jmp L054xts_enc_done -.align 4,0x90 -L051xts_enc_two: - movaps %xmm1,%xmm6 - movups (%esi),%xmm2 - movups 16(%esi),%xmm3 - leal 32(%esi),%esi - xorps %xmm5,%xmm2 - xorps %xmm6,%xmm3 - call __aesni_encrypt2 - xorps %xmm5,%xmm2 - xorps %xmm6,%xmm3 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - leal 32(%edi),%edi - movdqa %xmm6,%xmm1 - jmp L054xts_enc_done -.align 4,0x90 -L052xts_enc_three: - movaps %xmm1,%xmm7 - movups (%esi),%xmm2 - movups 16(%esi),%xmm3 - movups 32(%esi),%xmm4 - leal 48(%esi),%esi - xorps %xmm5,%xmm2 - xorps %xmm6,%xmm3 - xorps %xmm7,%xmm4 - call __aesni_encrypt3 - xorps %xmm5,%xmm2 - xorps %xmm6,%xmm3 - xorps %xmm7,%xmm4 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - leal 48(%edi),%edi - movdqa %xmm7,%xmm1 - jmp L054xts_enc_done -.align 4,0x90 -L053xts_enc_four: - movaps %xmm1,%xmm6 - movups (%esi),%xmm2 - movups 16(%esi),%xmm3 - movups 32(%esi),%xmm4 - xorps (%esp),%xmm2 - movups 48(%esi),%xmm5 - leal 64(%esi),%esi - xorps 16(%esp),%xmm3 - xorps %xmm7,%xmm4 - xorps %xmm6,%xmm5 - call __aesni_encrypt4 - xorps (%esp),%xmm2 - xorps 16(%esp),%xmm3 - xorps %xmm7,%xmm4 - movups %xmm2,(%edi) - xorps %xmm6,%xmm5 - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - leal 64(%edi),%edi - movdqa %xmm6,%xmm1 - jmp L054xts_enc_done -.align 4,0x90 -L049xts_enc_done6x: - movl 112(%esp),%eax - andl $15,%eax - jz L056xts_enc_ret - movdqa %xmm1,%xmm5 - movl %eax,112(%esp) - jmp L057xts_enc_steal -.align 4,0x90 -L054xts_enc_done: - movl 112(%esp),%eax - pxor %xmm0,%xmm0 - andl $15,%eax - jz L056xts_enc_ret - pcmpgtd %xmm1,%xmm0 - movl %eax,112(%esp) - pshufd $19,%xmm0,%xmm5 - paddq %xmm1,%xmm1 - pand 96(%esp),%xmm5 - pxor %xmm1,%xmm5 -L057xts_enc_steal: - movzbl (%esi),%ecx - movzbl -16(%edi),%edx - leal 1(%esi),%esi - movb %cl,-16(%edi) - movb %dl,(%edi) - leal 1(%edi),%edi - subl $1,%eax - jnz L057xts_enc_steal - subl 112(%esp),%edi - movl %ebp,%edx - movl %ebx,%ecx - movups -16(%edi),%xmm2 - xorps %xmm5,%xmm2 - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -L058enc1_loop_10: -.byte 102,15,56,220,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz L058enc1_loop_10 -.byte 102,15,56,221,209 - xorps %xmm5,%xmm2 - movups %xmm2,-16(%edi) -L056xts_enc_ret: - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - movdqa %xmm0,(%esp) - pxor %xmm3,%xmm3 - movdqa %xmm0,16(%esp) - pxor %xmm4,%xmm4 - movdqa %xmm0,32(%esp) - pxor %xmm5,%xmm5 - movdqa %xmm0,48(%esp) - pxor %xmm6,%xmm6 - movdqa %xmm0,64(%esp) - pxor %xmm7,%xmm7 - movdqa %xmm0,80(%esp) - movl 116(%esp),%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _aesni_xts_decrypt -.private_extern _aesni_xts_decrypt -.align 4 -_aesni_xts_decrypt: -L_aesni_xts_decrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 36(%esp),%edx - movl 40(%esp),%esi - movl 240(%edx),%ecx - movups (%esi),%xmm2 - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -L059enc1_loop_11: -.byte 102,15,56,220,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz L059enc1_loop_11 -.byte 102,15,56,221,209 - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%eax - movl 32(%esp),%edx - movl %esp,%ebp - subl $120,%esp - andl $-16,%esp - xorl %ebx,%ebx - testl $15,%eax - setnz %bl - shll $4,%ebx - subl %ebx,%eax - movl $135,96(%esp) - movl $0,100(%esp) - movl $1,104(%esp) - movl $0,108(%esp) - movl %eax,112(%esp) - movl %ebp,116(%esp) - movl 240(%edx),%ecx - movl %edx,%ebp - movl %ecx,%ebx - movdqa %xmm2,%xmm1 - pxor %xmm0,%xmm0 - movdqa 96(%esp),%xmm3 - pcmpgtd %xmm1,%xmm0 - andl $-16,%eax - subl $96,%eax - jc L060xts_dec_short - shll $4,%ecx - movl $16,%ebx - subl %ecx,%ebx - leal 32(%edx,%ecx,1),%edx - jmp L061xts_dec_loop6 -.align 4,0x90 -L061xts_dec_loop6: - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,16(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,32(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,48(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - pshufd $19,%xmm0,%xmm7 - movdqa %xmm1,64(%esp) - paddq %xmm1,%xmm1 - movups (%ebp),%xmm0 - pand %xmm3,%xmm7 - movups (%esi),%xmm2 - pxor %xmm1,%xmm7 - movl %ebx,%ecx - movdqu 16(%esi),%xmm3 - xorps %xmm0,%xmm2 - movdqu 32(%esi),%xmm4 - pxor %xmm0,%xmm3 - movdqu 48(%esi),%xmm5 - pxor %xmm0,%xmm4 - movdqu 64(%esi),%xmm6 - pxor %xmm0,%xmm5 - movdqu 80(%esi),%xmm1 - pxor %xmm0,%xmm6 - leal 96(%esi),%esi - pxor (%esp),%xmm2 - movdqa %xmm7,80(%esp) - pxor %xmm1,%xmm7 - movups 16(%ebp),%xmm1 - pxor 16(%esp),%xmm3 - pxor 32(%esp),%xmm4 -.byte 102,15,56,222,209 - pxor 48(%esp),%xmm5 - pxor 64(%esp),%xmm6 -.byte 102,15,56,222,217 - pxor %xmm0,%xmm7 - movups 32(%ebp),%xmm0 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 - call L_aesni_decrypt6_enter - movdqa 80(%esp),%xmm1 - pxor %xmm0,%xmm0 - xorps (%esp),%xmm2 - pcmpgtd %xmm1,%xmm0 - xorps 16(%esp),%xmm3 - movups %xmm2,(%edi) - xorps 32(%esp),%xmm4 - movups %xmm3,16(%edi) - xorps 48(%esp),%xmm5 - movups %xmm4,32(%edi) - xorps 64(%esp),%xmm6 - movups %xmm5,48(%edi) - xorps %xmm1,%xmm7 - movups %xmm6,64(%edi) - pshufd $19,%xmm0,%xmm2 - movups %xmm7,80(%edi) - leal 96(%edi),%edi - movdqa 96(%esp),%xmm3 - pxor %xmm0,%xmm0 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - subl $96,%eax - jnc L061xts_dec_loop6 - movl 240(%ebp),%ecx - movl %ebp,%edx - movl %ecx,%ebx -L060xts_dec_short: - addl $96,%eax - jz L062xts_dec_done6x - movdqa %xmm1,%xmm5 - cmpl $32,%eax - jb L063xts_dec_one - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - je L064xts_dec_two - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,%xmm6 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - cmpl $64,%eax - jb L065xts_dec_three - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa %xmm1,%xmm7 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 - movdqa %xmm5,(%esp) - movdqa %xmm6,16(%esp) - je L066xts_dec_four - movdqa %xmm7,32(%esp) - pshufd $19,%xmm0,%xmm7 - movdqa %xmm1,48(%esp) - paddq %xmm1,%xmm1 - pand %xmm3,%xmm7 - pxor %xmm1,%xmm7 - movdqu (%esi),%xmm2 - movdqu 16(%esi),%xmm3 - movdqu 32(%esi),%xmm4 - pxor (%esp),%xmm2 - movdqu 48(%esi),%xmm5 - pxor 16(%esp),%xmm3 - movdqu 64(%esi),%xmm6 - pxor 32(%esp),%xmm4 - leal 80(%esi),%esi - pxor 48(%esp),%xmm5 - movdqa %xmm7,64(%esp) - pxor %xmm7,%xmm6 - call __aesni_decrypt6 - movaps 64(%esp),%xmm1 - xorps (%esp),%xmm2 - xorps 16(%esp),%xmm3 - xorps 32(%esp),%xmm4 - movups %xmm2,(%edi) - xorps 48(%esp),%xmm5 - movups %xmm3,16(%edi) - xorps %xmm1,%xmm6 - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - movups %xmm6,64(%edi) - leal 80(%edi),%edi - jmp L067xts_dec_done -.align 4,0x90 -L063xts_dec_one: - movups (%esi),%xmm2 - leal 16(%esi),%esi - xorps %xmm5,%xmm2 - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -L068dec1_loop_12: -.byte 102,15,56,222,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz L068dec1_loop_12 -.byte 102,15,56,223,209 - xorps %xmm5,%xmm2 - movups %xmm2,(%edi) - leal 16(%edi),%edi - movdqa %xmm5,%xmm1 - jmp L067xts_dec_done -.align 4,0x90 -L064xts_dec_two: - movaps %xmm1,%xmm6 - movups (%esi),%xmm2 - movups 16(%esi),%xmm3 - leal 32(%esi),%esi - xorps %xmm5,%xmm2 - xorps %xmm6,%xmm3 - call __aesni_decrypt2 - xorps %xmm5,%xmm2 - xorps %xmm6,%xmm3 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - leal 32(%edi),%edi - movdqa %xmm6,%xmm1 - jmp L067xts_dec_done -.align 4,0x90 -L065xts_dec_three: - movaps %xmm1,%xmm7 - movups (%esi),%xmm2 - movups 16(%esi),%xmm3 - movups 32(%esi),%xmm4 - leal 48(%esi),%esi - xorps %xmm5,%xmm2 - xorps %xmm6,%xmm3 - xorps %xmm7,%xmm4 - call __aesni_decrypt3 - xorps %xmm5,%xmm2 - xorps %xmm6,%xmm3 - xorps %xmm7,%xmm4 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - leal 48(%edi),%edi - movdqa %xmm7,%xmm1 - jmp L067xts_dec_done -.align 4,0x90 -L066xts_dec_four: - movaps %xmm1,%xmm6 - movups (%esi),%xmm2 - movups 16(%esi),%xmm3 - movups 32(%esi),%xmm4 - xorps (%esp),%xmm2 - movups 48(%esi),%xmm5 - leal 64(%esi),%esi - xorps 16(%esp),%xmm3 - xorps %xmm7,%xmm4 - xorps %xmm6,%xmm5 - call __aesni_decrypt4 - xorps (%esp),%xmm2 - xorps 16(%esp),%xmm3 - xorps %xmm7,%xmm4 - movups %xmm2,(%edi) - xorps %xmm6,%xmm5 - movups %xmm3,16(%edi) - movups %xmm4,32(%edi) - movups %xmm5,48(%edi) - leal 64(%edi),%edi - movdqa %xmm6,%xmm1 - jmp L067xts_dec_done -.align 4,0x90 -L062xts_dec_done6x: - movl 112(%esp),%eax - andl $15,%eax - jz L069xts_dec_ret - movl %eax,112(%esp) - jmp L070xts_dec_only_one_more -.align 4,0x90 -L067xts_dec_done: - movl 112(%esp),%eax - pxor %xmm0,%xmm0 - andl $15,%eax - jz L069xts_dec_ret - pcmpgtd %xmm1,%xmm0 - movl %eax,112(%esp) - pshufd $19,%xmm0,%xmm2 - pxor %xmm0,%xmm0 - movdqa 96(%esp),%xmm3 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm2 - pcmpgtd %xmm1,%xmm0 - pxor %xmm2,%xmm1 -L070xts_dec_only_one_more: - pshufd $19,%xmm0,%xmm5 - movdqa %xmm1,%xmm6 - paddq %xmm1,%xmm1 - pand %xmm3,%xmm5 - pxor %xmm1,%xmm5 - movl %ebp,%edx - movl %ebx,%ecx - movups (%esi),%xmm2 - xorps %xmm5,%xmm2 - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -L071dec1_loop_13: -.byte 102,15,56,222,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz L071dec1_loop_13 -.byte 102,15,56,223,209 - xorps %xmm5,%xmm2 - movups %xmm2,(%edi) -L072xts_dec_steal: - movzbl 16(%esi),%ecx - movzbl (%edi),%edx - leal 1(%esi),%esi - movb %cl,(%edi) - movb %dl,16(%edi) - leal 1(%edi),%edi - subl $1,%eax - jnz L072xts_dec_steal - subl 112(%esp),%edi - movl %ebp,%edx - movl %ebx,%ecx - movups (%edi),%xmm2 - xorps %xmm6,%xmm2 - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -L073dec1_loop_14: -.byte 102,15,56,222,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz L073dec1_loop_14 -.byte 102,15,56,223,209 - xorps %xmm6,%xmm2 - movups %xmm2,(%edi) -L069xts_dec_ret: - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - movdqa %xmm0,(%esp) - pxor %xmm3,%xmm3 - movdqa %xmm0,16(%esp) - pxor %xmm4,%xmm4 - movdqa %xmm0,32(%esp) - pxor %xmm5,%xmm5 - movdqa %xmm0,48(%esp) - pxor %xmm6,%xmm6 - movdqa %xmm0,64(%esp) - pxor %xmm7,%xmm7 - movdqa %xmm0,80(%esp) - movl 116(%esp),%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _aesni_cbc_encrypt -.private_extern _aesni_cbc_encrypt -.align 4 -_aesni_cbc_encrypt: -L_aesni_cbc_encrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl %esp,%ebx - movl 24(%esp),%edi - subl $24,%ebx - movl 28(%esp),%eax - andl $-16,%ebx - movl 32(%esp),%edx - movl 36(%esp),%ebp - testl %eax,%eax - jz L074cbc_abort - cmpl $0,40(%esp) - xchgl %esp,%ebx - movups (%ebp),%xmm7 - movl 240(%edx),%ecx - movl %edx,%ebp - movl %ebx,16(%esp) - movl %ecx,%ebx - je L075cbc_decrypt - movaps %xmm7,%xmm2 - cmpl $16,%eax - jb L076cbc_enc_tail - subl $16,%eax - jmp L077cbc_enc_loop -.align 4,0x90 -L077cbc_enc_loop: - movups (%esi),%xmm7 - leal 16(%esi),%esi - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - xorps %xmm0,%xmm7 - leal 32(%edx),%edx - xorps %xmm7,%xmm2 -L078enc1_loop_15: -.byte 102,15,56,220,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz L078enc1_loop_15 -.byte 102,15,56,221,209 - movl %ebx,%ecx - movl %ebp,%edx - movups %xmm2,(%edi) - leal 16(%edi),%edi - subl $16,%eax - jnc L077cbc_enc_loop - addl $16,%eax - jnz L076cbc_enc_tail - movaps %xmm2,%xmm7 - pxor %xmm2,%xmm2 - jmp L079cbc_ret -L076cbc_enc_tail: - movl %eax,%ecx -.long 2767451785 - movl $16,%ecx - subl %eax,%ecx - xorl %eax,%eax -.long 2868115081 - leal -16(%edi),%edi - movl %ebx,%ecx - movl %edi,%esi - movl %ebp,%edx - jmp L077cbc_enc_loop -.align 4,0x90 -L075cbc_decrypt: - cmpl $80,%eax - jbe L080cbc_dec_tail - movaps %xmm7,(%esp) - subl $80,%eax - jmp L081cbc_dec_loop6_enter -.align 4,0x90 -L082cbc_dec_loop6: - movaps %xmm0,(%esp) - movups %xmm7,(%edi) - leal 16(%edi),%edi -L081cbc_dec_loop6_enter: - movdqu (%esi),%xmm2 - movdqu 16(%esi),%xmm3 - movdqu 32(%esi),%xmm4 - movdqu 48(%esi),%xmm5 - movdqu 64(%esi),%xmm6 - movdqu 80(%esi),%xmm7 - call __aesni_decrypt6 - movups (%esi),%xmm1 - movups 16(%esi),%xmm0 - xorps (%esp),%xmm2 - xorps %xmm1,%xmm3 - movups 32(%esi),%xmm1 - xorps %xmm0,%xmm4 - movups 48(%esi),%xmm0 - xorps %xmm1,%xmm5 - movups 64(%esi),%xmm1 - xorps %xmm0,%xmm6 - movups 80(%esi),%xmm0 - xorps %xmm1,%xmm7 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - leal 96(%esi),%esi - movups %xmm4,32(%edi) - movl %ebx,%ecx - movups %xmm5,48(%edi) - movl %ebp,%edx - movups %xmm6,64(%edi) - leal 80(%edi),%edi - subl $96,%eax - ja L082cbc_dec_loop6 - movaps %xmm7,%xmm2 - movaps %xmm0,%xmm7 - addl $80,%eax - jle L083cbc_dec_clear_tail_collected - movups %xmm2,(%edi) - leal 16(%edi),%edi -L080cbc_dec_tail: - movups (%esi),%xmm2 - movaps %xmm2,%xmm6 - cmpl $16,%eax - jbe L084cbc_dec_one - movups 16(%esi),%xmm3 - movaps %xmm3,%xmm5 - cmpl $32,%eax - jbe L085cbc_dec_two - movups 32(%esi),%xmm4 - cmpl $48,%eax - jbe L086cbc_dec_three - movups 48(%esi),%xmm5 - cmpl $64,%eax - jbe L087cbc_dec_four - movups 64(%esi),%xmm6 - movaps %xmm7,(%esp) - movups (%esi),%xmm2 - xorps %xmm7,%xmm7 - call __aesni_decrypt6 - movups (%esi),%xmm1 - movups 16(%esi),%xmm0 - xorps (%esp),%xmm2 - xorps %xmm1,%xmm3 - movups 32(%esi),%xmm1 - xorps %xmm0,%xmm4 - movups 48(%esi),%xmm0 - xorps %xmm1,%xmm5 - movups 64(%esi),%xmm7 - xorps %xmm0,%xmm6 - movups %xmm2,(%edi) - movups %xmm3,16(%edi) - pxor %xmm3,%xmm3 - movups %xmm4,32(%edi) - pxor %xmm4,%xmm4 - movups %xmm5,48(%edi) - pxor %xmm5,%xmm5 - leal 64(%edi),%edi - movaps %xmm6,%xmm2 - pxor %xmm6,%xmm6 - subl $80,%eax - jmp L088cbc_dec_tail_collected -.align 4,0x90 -L084cbc_dec_one: - movups (%edx),%xmm0 - movups 16(%edx),%xmm1 - leal 32(%edx),%edx - xorps %xmm0,%xmm2 -L089dec1_loop_16: -.byte 102,15,56,222,209 - decl %ecx - movups (%edx),%xmm1 - leal 16(%edx),%edx - jnz L089dec1_loop_16 -.byte 102,15,56,223,209 - xorps %xmm7,%xmm2 - movaps %xmm6,%xmm7 - subl $16,%eax - jmp L088cbc_dec_tail_collected -.align 4,0x90 -L085cbc_dec_two: - call __aesni_decrypt2 - xorps %xmm7,%xmm2 - xorps %xmm6,%xmm3 - movups %xmm2,(%edi) - movaps %xmm3,%xmm2 - pxor %xmm3,%xmm3 - leal 16(%edi),%edi - movaps %xmm5,%xmm7 - subl $32,%eax - jmp L088cbc_dec_tail_collected -.align 4,0x90 -L086cbc_dec_three: - call __aesni_decrypt3 - xorps %xmm7,%xmm2 - xorps %xmm6,%xmm3 - xorps %xmm5,%xmm4 - movups %xmm2,(%edi) - movaps %xmm4,%xmm2 - pxor %xmm4,%xmm4 - movups %xmm3,16(%edi) - pxor %xmm3,%xmm3 - leal 32(%edi),%edi - movups 32(%esi),%xmm7 - subl $48,%eax - jmp L088cbc_dec_tail_collected -.align 4,0x90 -L087cbc_dec_four: - call __aesni_decrypt4 - movups 16(%esi),%xmm1 - movups 32(%esi),%xmm0 - xorps %xmm7,%xmm2 - movups 48(%esi),%xmm7 - xorps %xmm6,%xmm3 - movups %xmm2,(%edi) - xorps %xmm1,%xmm4 - movups %xmm3,16(%edi) - pxor %xmm3,%xmm3 - xorps %xmm0,%xmm5 - movups %xmm4,32(%edi) - pxor %xmm4,%xmm4 - leal 48(%edi),%edi - movaps %xmm5,%xmm2 - pxor %xmm5,%xmm5 - subl $64,%eax - jmp L088cbc_dec_tail_collected -.align 4,0x90 -L083cbc_dec_clear_tail_collected: - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 -L088cbc_dec_tail_collected: - andl $15,%eax - jnz L090cbc_dec_tail_partial - movups %xmm2,(%edi) - pxor %xmm0,%xmm0 - jmp L079cbc_ret -.align 4,0x90 -L090cbc_dec_tail_partial: - movaps %xmm2,(%esp) - pxor %xmm0,%xmm0 - movl $16,%ecx - movl %esp,%esi - subl %eax,%ecx -.long 2767451785 - movdqa %xmm2,(%esp) -L079cbc_ret: - movl 16(%esp),%esp - movl 36(%esp),%ebp - pxor %xmm2,%xmm2 - pxor %xmm1,%xmm1 - movups %xmm7,(%ebp) - pxor %xmm7,%xmm7 -L074cbc_abort: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.private_extern __aesni_set_encrypt_key -.align 4 -__aesni_set_encrypt_key: - pushl %ebp - pushl %ebx - testl %eax,%eax - jz L091bad_pointer - testl %edx,%edx - jz L091bad_pointer - call L092pic -L092pic: - popl %ebx - leal Lkey_const-L092pic(%ebx),%ebx - movl L_OPENSSL_ia32cap_P$non_lazy_ptr-Lkey_const(%ebx),%ebp - movups (%eax),%xmm0 - xorps %xmm4,%xmm4 - movl 4(%ebp),%ebp - leal 16(%edx),%edx - andl $268437504,%ebp - cmpl $256,%ecx - je L09314rounds - cmpl $192,%ecx - je L09412rounds - cmpl $128,%ecx - jne L095bad_keybits -.align 4,0x90 -L09610rounds: - cmpl $268435456,%ebp - je L09710rounds_alt - movl $9,%ecx - movups %xmm0,-16(%edx) -.byte 102,15,58,223,200,1 - call L098key_128_cold -.byte 102,15,58,223,200,2 - call L099key_128 -.byte 102,15,58,223,200,4 - call L099key_128 -.byte 102,15,58,223,200,8 - call L099key_128 -.byte 102,15,58,223,200,16 - call L099key_128 -.byte 102,15,58,223,200,32 - call L099key_128 -.byte 102,15,58,223,200,64 - call L099key_128 -.byte 102,15,58,223,200,128 - call L099key_128 -.byte 102,15,58,223,200,27 - call L099key_128 -.byte 102,15,58,223,200,54 - call L099key_128 - movups %xmm0,(%edx) - movl %ecx,80(%edx) - jmp L100good_key -.align 4,0x90 -L099key_128: - movups %xmm0,(%edx) - leal 16(%edx),%edx -L098key_128_cold: - shufps $16,%xmm0,%xmm4 - xorps %xmm4,%xmm0 - shufps $140,%xmm0,%xmm4 - xorps %xmm4,%xmm0 - shufps $255,%xmm1,%xmm1 - xorps %xmm1,%xmm0 - ret -.align 4,0x90 -L09710rounds_alt: - movdqa (%ebx),%xmm5 - movl $8,%ecx - movdqa 32(%ebx),%xmm4 - movdqa %xmm0,%xmm2 - movdqu %xmm0,-16(%edx) -L101loop_key128: -.byte 102,15,56,0,197 -.byte 102,15,56,221,196 - pslld $1,%xmm4 - leal 16(%edx),%edx - movdqa %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm3,%xmm2 - pxor %xmm2,%xmm0 - movdqu %xmm0,-16(%edx) - movdqa %xmm0,%xmm2 - decl %ecx - jnz L101loop_key128 - movdqa 48(%ebx),%xmm4 -.byte 102,15,56,0,197 -.byte 102,15,56,221,196 - pslld $1,%xmm4 - movdqa %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm3,%xmm2 - pxor %xmm2,%xmm0 - movdqu %xmm0,(%edx) - movdqa %xmm0,%xmm2 -.byte 102,15,56,0,197 -.byte 102,15,56,221,196 - movdqa %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm3,%xmm2 - pxor %xmm2,%xmm0 - movdqu %xmm0,16(%edx) - movl $9,%ecx - movl %ecx,96(%edx) - jmp L100good_key -.align 4,0x90 -L09412rounds: - movq 16(%eax),%xmm2 - cmpl $268435456,%ebp - je L10212rounds_alt - movl $11,%ecx - movups %xmm0,-16(%edx) -.byte 102,15,58,223,202,1 - call L103key_192a_cold -.byte 102,15,58,223,202,2 - call L104key_192b -.byte 102,15,58,223,202,4 - call L105key_192a -.byte 102,15,58,223,202,8 - call L104key_192b -.byte 102,15,58,223,202,16 - call L105key_192a -.byte 102,15,58,223,202,32 - call L104key_192b -.byte 102,15,58,223,202,64 - call L105key_192a -.byte 102,15,58,223,202,128 - call L104key_192b - movups %xmm0,(%edx) - movl %ecx,48(%edx) - jmp L100good_key -.align 4,0x90 -L105key_192a: - movups %xmm0,(%edx) - leal 16(%edx),%edx -.align 4,0x90 -L103key_192a_cold: - movaps %xmm2,%xmm5 -L106key_192b_warm: - shufps $16,%xmm0,%xmm4 - movdqa %xmm2,%xmm3 - xorps %xmm4,%xmm0 - shufps $140,%xmm0,%xmm4 - pslldq $4,%xmm3 - xorps %xmm4,%xmm0 - pshufd $85,%xmm1,%xmm1 - pxor %xmm3,%xmm2 - pxor %xmm1,%xmm0 - pshufd $255,%xmm0,%xmm3 - pxor %xmm3,%xmm2 - ret -.align 4,0x90 -L104key_192b: - movaps %xmm0,%xmm3 - shufps $68,%xmm0,%xmm5 - movups %xmm5,(%edx) - shufps $78,%xmm2,%xmm3 - movups %xmm3,16(%edx) - leal 32(%edx),%edx - jmp L106key_192b_warm -.align 4,0x90 -L10212rounds_alt: - movdqa 16(%ebx),%xmm5 - movdqa 32(%ebx),%xmm4 - movl $8,%ecx - movdqu %xmm0,-16(%edx) -L107loop_key192: - movq %xmm2,(%edx) - movdqa %xmm2,%xmm1 -.byte 102,15,56,0,213 -.byte 102,15,56,221,212 - pslld $1,%xmm4 - leal 24(%edx),%edx - movdqa %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm3,%xmm0 - pshufd $255,%xmm0,%xmm3 - pxor %xmm1,%xmm3 - pslldq $4,%xmm1 - pxor %xmm1,%xmm3 - pxor %xmm2,%xmm0 - pxor %xmm3,%xmm2 - movdqu %xmm0,-16(%edx) - decl %ecx - jnz L107loop_key192 - movl $11,%ecx - movl %ecx,32(%edx) - jmp L100good_key -.align 4,0x90 -L09314rounds: - movups 16(%eax),%xmm2 - leal 16(%edx),%edx - cmpl $268435456,%ebp - je L10814rounds_alt - movl $13,%ecx - movups %xmm0,-32(%edx) - movups %xmm2,-16(%edx) -.byte 102,15,58,223,202,1 - call L109key_256a_cold -.byte 102,15,58,223,200,1 - call L110key_256b -.byte 102,15,58,223,202,2 - call L111key_256a -.byte 102,15,58,223,200,2 - call L110key_256b -.byte 102,15,58,223,202,4 - call L111key_256a -.byte 102,15,58,223,200,4 - call L110key_256b -.byte 102,15,58,223,202,8 - call L111key_256a -.byte 102,15,58,223,200,8 - call L110key_256b -.byte 102,15,58,223,202,16 - call L111key_256a -.byte 102,15,58,223,200,16 - call L110key_256b -.byte 102,15,58,223,202,32 - call L111key_256a -.byte 102,15,58,223,200,32 - call L110key_256b -.byte 102,15,58,223,202,64 - call L111key_256a - movups %xmm0,(%edx) - movl %ecx,16(%edx) - xorl %eax,%eax - jmp L100good_key -.align 4,0x90 -L111key_256a: - movups %xmm2,(%edx) - leal 16(%edx),%edx -L109key_256a_cold: - shufps $16,%xmm0,%xmm4 - xorps %xmm4,%xmm0 - shufps $140,%xmm0,%xmm4 - xorps %xmm4,%xmm0 - shufps $255,%xmm1,%xmm1 - xorps %xmm1,%xmm0 - ret -.align 4,0x90 -L110key_256b: - movups %xmm0,(%edx) - leal 16(%edx),%edx - shufps $16,%xmm2,%xmm4 - xorps %xmm4,%xmm2 - shufps $140,%xmm2,%xmm4 - xorps %xmm4,%xmm2 - shufps $170,%xmm1,%xmm1 - xorps %xmm1,%xmm2 - ret -.align 4,0x90 -L10814rounds_alt: - movdqa (%ebx),%xmm5 - movdqa 32(%ebx),%xmm4 - movl $7,%ecx - movdqu %xmm0,-32(%edx) - movdqa %xmm2,%xmm1 - movdqu %xmm2,-16(%edx) -L112loop_key256: -.byte 102,15,56,0,213 -.byte 102,15,56,221,212 - movdqa %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm3,%xmm0 - pslld $1,%xmm4 - pxor %xmm2,%xmm0 - movdqu %xmm0,(%edx) - decl %ecx - jz L113done_key256 - pshufd $255,%xmm0,%xmm2 - pxor %xmm3,%xmm3 -.byte 102,15,56,221,211 - movdqa %xmm1,%xmm3 - pslldq $4,%xmm1 - pxor %xmm1,%xmm3 - pslldq $4,%xmm1 - pxor %xmm1,%xmm3 - pslldq $4,%xmm1 - pxor %xmm3,%xmm1 - pxor %xmm1,%xmm2 - movdqu %xmm2,16(%edx) - leal 32(%edx),%edx - movdqa %xmm2,%xmm1 - jmp L112loop_key256 -L113done_key256: - movl $13,%ecx - movl %ecx,16(%edx) -L100good_key: - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - xorl %eax,%eax - popl %ebx - popl %ebp - ret -.align 2,0x90 -L091bad_pointer: - movl $-1,%eax - popl %ebx - popl %ebp - ret -.align 2,0x90 -L095bad_keybits: - pxor %xmm0,%xmm0 - movl $-2,%eax - popl %ebx - popl %ebp - ret -.globl _aesni_set_encrypt_key -.private_extern _aesni_set_encrypt_key -.align 4 -_aesni_set_encrypt_key: -L_aesni_set_encrypt_key_begin: - movl 4(%esp),%eax - movl 8(%esp),%ecx - movl 12(%esp),%edx - call __aesni_set_encrypt_key - ret -.globl _aesni_set_decrypt_key -.private_extern _aesni_set_decrypt_key -.align 4 -_aesni_set_decrypt_key: -L_aesni_set_decrypt_key_begin: - movl 4(%esp),%eax - movl 8(%esp),%ecx - movl 12(%esp),%edx - call __aesni_set_encrypt_key - movl 12(%esp),%edx - shll $4,%ecx - testl %eax,%eax - jnz L114dec_key_ret - leal 16(%edx,%ecx,1),%eax - movups (%edx),%xmm0 - movups (%eax),%xmm1 - movups %xmm0,(%eax) - movups %xmm1,(%edx) - leal 16(%edx),%edx - leal -16(%eax),%eax -L115dec_key_inverse: - movups (%edx),%xmm0 - movups (%eax),%xmm1 -.byte 102,15,56,219,192 -.byte 102,15,56,219,201 - leal 16(%edx),%edx - leal -16(%eax),%eax - movups %xmm0,16(%eax) - movups %xmm1,-16(%edx) - cmpl %edx,%eax - ja L115dec_key_inverse - movups (%edx),%xmm0 -.byte 102,15,56,219,192 - movups %xmm0,(%edx) - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - xorl %eax,%eax -L114dec_key_ret: - ret -.align 6,0x90 -Lkey_const: -.long 202313229,202313229,202313229,202313229 -.long 67569157,67569157,67569157,67569157 -.long 1,1,1,1 -.long 27,27,27,27 -.byte 65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69 -.byte 83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83 -.byte 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115 -.byte 115,108,46,111,114,103,62,0 -.section __IMPORT,__pointers,non_lazy_symbol_pointers -L_OPENSSL_ia32cap_P$non_lazy_ptr: -.indirect_symbol _OPENSSL_ia32cap_P -.long 0 -#endif diff --git a/third_party/boringssl/mac-x86/crypto/aes/vpaes-x86.S b/third_party/boringssl/mac-x86/crypto/aes/vpaes-x86.S deleted file mode 100644 index 8b85709dee0e5..0000000000000 --- a/third_party/boringssl/mac-x86/crypto/aes/vpaes-x86.S +++ /dev/null @@ -1,650 +0,0 @@ -#if defined(__i386__) -.file "vpaes-x86.S" -.text -.align 6,0x90 -L_vpaes_consts: -.long 218628480,235210255,168496130,67568393 -.long 252381056,17041926,33884169,51187212 -.long 252645135,252645135,252645135,252645135 -.long 1512730624,3266504856,1377990664,3401244816 -.long 830229760,1275146365,2969422977,3447763452 -.long 3411033600,2979783055,338359620,2782886510 -.long 4209124096,907596821,221174255,1006095553 -.long 191964160,3799684038,3164090317,1589111125 -.long 182528256,1777043520,2877432650,3265356744 -.long 1874708224,3503451415,3305285752,363511674 -.long 1606117888,3487855781,1093350906,2384367825 -.long 197121,67569157,134941193,202313229 -.long 67569157,134941193,202313229,197121 -.long 134941193,202313229,197121,67569157 -.long 202313229,197121,67569157,134941193 -.long 33619971,100992007,168364043,235736079 -.long 235736079,33619971,100992007,168364043 -.long 168364043,235736079,33619971,100992007 -.long 100992007,168364043,235736079,33619971 -.long 50462976,117835012,185207048,252579084 -.long 252314880,51251460,117574920,184942860 -.long 184682752,252054788,50987272,118359308 -.long 118099200,185467140,251790600,50727180 -.long 2946363062,528716217,1300004225,1881839624 -.long 1532713819,1532713819,1532713819,1532713819 -.long 3602276352,4288629033,3737020424,4153884961 -.long 1354558464,32357713,2958822624,3775749553 -.long 1201988352,132424512,1572796698,503232858 -.long 2213177600,1597421020,4103937655,675398315 -.long 2749646592,4273543773,1511898873,121693092 -.long 3040248576,1103263732,2871565598,1608280554 -.long 2236667136,2588920351,482954393,64377734 -.long 3069987328,291237287,2117370568,3650299247 -.long 533321216,3573750986,2572112006,1401264716 -.long 1339849704,2721158661,548607111,3445553514 -.long 2128193280,3054596040,2183486460,1257083700 -.long 655635200,1165381986,3923443150,2344132524 -.long 190078720,256924420,290342170,357187870 -.long 1610966272,2263057382,4103205268,309794674 -.long 2592527872,2233205587,1335446729,3402964816 -.long 3973531904,3225098121,3002836325,1918774430 -.long 3870401024,2102906079,2284471353,4117666579 -.long 617007872,1021508343,366931923,691083277 -.long 2528395776,3491914898,2968704004,1613121270 -.long 3445188352,3247741094,844474987,4093578302 -.long 651481088,1190302358,1689581232,574775300 -.long 4289380608,206939853,2555985458,2489840491 -.long 2130264064,327674451,3566485037,3349835193 -.long 2470714624,316102159,3636825756,3393945945 -.byte 86,101,99,116,111,114,32,80,101,114,109,117,116,97,116,105 -.byte 111,110,32,65,69,83,32,102,111,114,32,120,56,54,47,83 -.byte 83,83,69,51,44,32,77,105,107,101,32,72,97,109,98,117 -.byte 114,103,32,40,83,116,97,110,102,111,114,100,32,85,110,105 -.byte 118,101,114,115,105,116,121,41,0 -.align 6,0x90 -.private_extern __vpaes_preheat -.align 4 -__vpaes_preheat: - addl (%esp),%ebp - movdqa -48(%ebp),%xmm7 - movdqa -16(%ebp),%xmm6 - ret -.private_extern __vpaes_encrypt_core -.align 4 -__vpaes_encrypt_core: - movl $16,%ecx - movl 240(%edx),%eax - movdqa %xmm6,%xmm1 - movdqa (%ebp),%xmm2 - pandn %xmm0,%xmm1 - pand %xmm6,%xmm0 - movdqu (%edx),%xmm5 -.byte 102,15,56,0,208 - movdqa 16(%ebp),%xmm0 - pxor %xmm5,%xmm2 - psrld $4,%xmm1 - addl $16,%edx -.byte 102,15,56,0,193 - leal 192(%ebp),%ebx - pxor %xmm2,%xmm0 - jmp L000enc_entry -.align 4,0x90 -L001enc_loop: - movdqa 32(%ebp),%xmm4 - movdqa 48(%ebp),%xmm0 -.byte 102,15,56,0,226 -.byte 102,15,56,0,195 - pxor %xmm5,%xmm4 - movdqa 64(%ebp),%xmm5 - pxor %xmm4,%xmm0 - movdqa -64(%ebx,%ecx,1),%xmm1 -.byte 102,15,56,0,234 - movdqa 80(%ebp),%xmm2 - movdqa (%ebx,%ecx,1),%xmm4 -.byte 102,15,56,0,211 - movdqa %xmm0,%xmm3 - pxor %xmm5,%xmm2 -.byte 102,15,56,0,193 - addl $16,%edx - pxor %xmm2,%xmm0 -.byte 102,15,56,0,220 - addl $16,%ecx - pxor %xmm0,%xmm3 -.byte 102,15,56,0,193 - andl $48,%ecx - subl $1,%eax - pxor %xmm3,%xmm0 -L000enc_entry: - movdqa %xmm6,%xmm1 - movdqa -32(%ebp),%xmm5 - pandn %xmm0,%xmm1 - psrld $4,%xmm1 - pand %xmm6,%xmm0 -.byte 102,15,56,0,232 - movdqa %xmm7,%xmm3 - pxor %xmm1,%xmm0 -.byte 102,15,56,0,217 - movdqa %xmm7,%xmm4 - pxor %xmm5,%xmm3 -.byte 102,15,56,0,224 - movdqa %xmm7,%xmm2 - pxor %xmm5,%xmm4 -.byte 102,15,56,0,211 - movdqa %xmm7,%xmm3 - pxor %xmm0,%xmm2 -.byte 102,15,56,0,220 - movdqu (%edx),%xmm5 - pxor %xmm1,%xmm3 - jnz L001enc_loop - movdqa 96(%ebp),%xmm4 - movdqa 112(%ebp),%xmm0 -.byte 102,15,56,0,226 - pxor %xmm5,%xmm4 -.byte 102,15,56,0,195 - movdqa 64(%ebx,%ecx,1),%xmm1 - pxor %xmm4,%xmm0 -.byte 102,15,56,0,193 - ret -.private_extern __vpaes_decrypt_core -.align 4 -__vpaes_decrypt_core: - leal 608(%ebp),%ebx - movl 240(%edx),%eax - movdqa %xmm6,%xmm1 - movdqa -64(%ebx),%xmm2 - pandn %xmm0,%xmm1 - movl %eax,%ecx - psrld $4,%xmm1 - movdqu (%edx),%xmm5 - shll $4,%ecx - pand %xmm6,%xmm0 -.byte 102,15,56,0,208 - movdqa -48(%ebx),%xmm0 - xorl $48,%ecx -.byte 102,15,56,0,193 - andl $48,%ecx - pxor %xmm5,%xmm2 - movdqa 176(%ebp),%xmm5 - pxor %xmm2,%xmm0 - addl $16,%edx - leal -352(%ebx,%ecx,1),%ecx - jmp L002dec_entry -.align 4,0x90 -L003dec_loop: - movdqa -32(%ebx),%xmm4 - movdqa -16(%ebx),%xmm1 -.byte 102,15,56,0,226 -.byte 102,15,56,0,203 - pxor %xmm4,%xmm0 - movdqa (%ebx),%xmm4 - pxor %xmm1,%xmm0 - movdqa 16(%ebx),%xmm1 -.byte 102,15,56,0,226 -.byte 102,15,56,0,197 -.byte 102,15,56,0,203 - pxor %xmm4,%xmm0 - movdqa 32(%ebx),%xmm4 - pxor %xmm1,%xmm0 - movdqa 48(%ebx),%xmm1 -.byte 102,15,56,0,226 -.byte 102,15,56,0,197 -.byte 102,15,56,0,203 - pxor %xmm4,%xmm0 - movdqa 64(%ebx),%xmm4 - pxor %xmm1,%xmm0 - movdqa 80(%ebx),%xmm1 -.byte 102,15,56,0,226 -.byte 102,15,56,0,197 -.byte 102,15,56,0,203 - pxor %xmm4,%xmm0 - addl $16,%edx -.byte 102,15,58,15,237,12 - pxor %xmm1,%xmm0 - subl $1,%eax -L002dec_entry: - movdqa %xmm6,%xmm1 - movdqa -32(%ebp),%xmm2 - pandn %xmm0,%xmm1 - pand %xmm6,%xmm0 - psrld $4,%xmm1 -.byte 102,15,56,0,208 - movdqa %xmm7,%xmm3 - pxor %xmm1,%xmm0 -.byte 102,15,56,0,217 - movdqa %xmm7,%xmm4 - pxor %xmm2,%xmm3 -.byte 102,15,56,0,224 - pxor %xmm2,%xmm4 - movdqa %xmm7,%xmm2 -.byte 102,15,56,0,211 - movdqa %xmm7,%xmm3 - pxor %xmm0,%xmm2 -.byte 102,15,56,0,220 - movdqu (%edx),%xmm0 - pxor %xmm1,%xmm3 - jnz L003dec_loop - movdqa 96(%ebx),%xmm4 -.byte 102,15,56,0,226 - pxor %xmm0,%xmm4 - movdqa 112(%ebx),%xmm0 - movdqa (%ecx),%xmm2 -.byte 102,15,56,0,195 - pxor %xmm4,%xmm0 -.byte 102,15,56,0,194 - ret -.private_extern __vpaes_schedule_core -.align 4 -__vpaes_schedule_core: - addl (%esp),%ebp - movdqu (%esi),%xmm0 - movdqa 320(%ebp),%xmm2 - movdqa %xmm0,%xmm3 - leal (%ebp),%ebx - movdqa %xmm2,4(%esp) - call __vpaes_schedule_transform - movdqa %xmm0,%xmm7 - testl %edi,%edi - jnz L004schedule_am_decrypting - movdqu %xmm0,(%edx) - jmp L005schedule_go -L004schedule_am_decrypting: - movdqa 256(%ebp,%ecx,1),%xmm1 -.byte 102,15,56,0,217 - movdqu %xmm3,(%edx) - xorl $48,%ecx -L005schedule_go: - cmpl $192,%eax - ja L006schedule_256 - je L007schedule_192 -L008schedule_128: - movl $10,%eax -L009loop_schedule_128: - call __vpaes_schedule_round - decl %eax - jz L010schedule_mangle_last - call __vpaes_schedule_mangle - jmp L009loop_schedule_128 -.align 4,0x90 -L007schedule_192: - movdqu 8(%esi),%xmm0 - call __vpaes_schedule_transform - movdqa %xmm0,%xmm6 - pxor %xmm4,%xmm4 - movhlps %xmm4,%xmm6 - movl $4,%eax -L011loop_schedule_192: - call __vpaes_schedule_round -.byte 102,15,58,15,198,8 - call __vpaes_schedule_mangle - call __vpaes_schedule_192_smear - call __vpaes_schedule_mangle - call __vpaes_schedule_round - decl %eax - jz L010schedule_mangle_last - call __vpaes_schedule_mangle - call __vpaes_schedule_192_smear - jmp L011loop_schedule_192 -.align 4,0x90 -L006schedule_256: - movdqu 16(%esi),%xmm0 - call __vpaes_schedule_transform - movl $7,%eax -L012loop_schedule_256: - call __vpaes_schedule_mangle - movdqa %xmm0,%xmm6 - call __vpaes_schedule_round - decl %eax - jz L010schedule_mangle_last - call __vpaes_schedule_mangle - pshufd $255,%xmm0,%xmm0 - movdqa %xmm7,20(%esp) - movdqa %xmm6,%xmm7 - call L_vpaes_schedule_low_round - movdqa 20(%esp),%xmm7 - jmp L012loop_schedule_256 -.align 4,0x90 -L010schedule_mangle_last: - leal 384(%ebp),%ebx - testl %edi,%edi - jnz L013schedule_mangle_last_dec - movdqa 256(%ebp,%ecx,1),%xmm1 -.byte 102,15,56,0,193 - leal 352(%ebp),%ebx - addl $32,%edx -L013schedule_mangle_last_dec: - addl $-16,%edx - pxor 336(%ebp),%xmm0 - call __vpaes_schedule_transform - movdqu %xmm0,(%edx) - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - ret -.private_extern __vpaes_schedule_192_smear -.align 4 -__vpaes_schedule_192_smear: - pshufd $128,%xmm6,%xmm1 - pshufd $254,%xmm7,%xmm0 - pxor %xmm1,%xmm6 - pxor %xmm1,%xmm1 - pxor %xmm0,%xmm6 - movdqa %xmm6,%xmm0 - movhlps %xmm1,%xmm6 - ret -.private_extern __vpaes_schedule_round -.align 4 -__vpaes_schedule_round: - movdqa 8(%esp),%xmm2 - pxor %xmm1,%xmm1 -.byte 102,15,58,15,202,15 -.byte 102,15,58,15,210,15 - pxor %xmm1,%xmm7 - pshufd $255,%xmm0,%xmm0 -.byte 102,15,58,15,192,1 - movdqa %xmm2,8(%esp) -L_vpaes_schedule_low_round: - movdqa %xmm7,%xmm1 - pslldq $4,%xmm7 - pxor %xmm1,%xmm7 - movdqa %xmm7,%xmm1 - pslldq $8,%xmm7 - pxor %xmm1,%xmm7 - pxor 336(%ebp),%xmm7 - movdqa -16(%ebp),%xmm4 - movdqa -48(%ebp),%xmm5 - movdqa %xmm4,%xmm1 - pandn %xmm0,%xmm1 - psrld $4,%xmm1 - pand %xmm4,%xmm0 - movdqa -32(%ebp),%xmm2 -.byte 102,15,56,0,208 - pxor %xmm1,%xmm0 - movdqa %xmm5,%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 - movdqa %xmm5,%xmm4 -.byte 102,15,56,0,224 - pxor %xmm2,%xmm4 - movdqa %xmm5,%xmm2 -.byte 102,15,56,0,211 - pxor %xmm0,%xmm2 - movdqa %xmm5,%xmm3 -.byte 102,15,56,0,220 - pxor %xmm1,%xmm3 - movdqa 32(%ebp),%xmm4 -.byte 102,15,56,0,226 - movdqa 48(%ebp),%xmm0 -.byte 102,15,56,0,195 - pxor %xmm4,%xmm0 - pxor %xmm7,%xmm0 - movdqa %xmm0,%xmm7 - ret -.private_extern __vpaes_schedule_transform -.align 4 -__vpaes_schedule_transform: - movdqa -16(%ebp),%xmm2 - movdqa %xmm2,%xmm1 - pandn %xmm0,%xmm1 - psrld $4,%xmm1 - pand %xmm2,%xmm0 - movdqa (%ebx),%xmm2 -.byte 102,15,56,0,208 - movdqa 16(%ebx),%xmm0 -.byte 102,15,56,0,193 - pxor %xmm2,%xmm0 - ret -.private_extern __vpaes_schedule_mangle -.align 4 -__vpaes_schedule_mangle: - movdqa %xmm0,%xmm4 - movdqa 128(%ebp),%xmm5 - testl %edi,%edi - jnz L014schedule_mangle_dec - addl $16,%edx - pxor 336(%ebp),%xmm4 -.byte 102,15,56,0,229 - movdqa %xmm4,%xmm3 -.byte 102,15,56,0,229 - pxor %xmm4,%xmm3 -.byte 102,15,56,0,229 - pxor %xmm4,%xmm3 - jmp L015schedule_mangle_both -.align 4,0x90 -L014schedule_mangle_dec: - movdqa -16(%ebp),%xmm2 - leal 416(%ebp),%esi - movdqa %xmm2,%xmm1 - pandn %xmm4,%xmm1 - psrld $4,%xmm1 - pand %xmm2,%xmm4 - movdqa (%esi),%xmm2 -.byte 102,15,56,0,212 - movdqa 16(%esi),%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 -.byte 102,15,56,0,221 - movdqa 32(%esi),%xmm2 -.byte 102,15,56,0,212 - pxor %xmm3,%xmm2 - movdqa 48(%esi),%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 -.byte 102,15,56,0,221 - movdqa 64(%esi),%xmm2 -.byte 102,15,56,0,212 - pxor %xmm3,%xmm2 - movdqa 80(%esi),%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 -.byte 102,15,56,0,221 - movdqa 96(%esi),%xmm2 -.byte 102,15,56,0,212 - pxor %xmm3,%xmm2 - movdqa 112(%esi),%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 - addl $-16,%edx -L015schedule_mangle_both: - movdqa 256(%ebp,%ecx,1),%xmm1 -.byte 102,15,56,0,217 - addl $-16,%ecx - andl $48,%ecx - movdqu %xmm3,(%edx) - ret -.globl _vpaes_set_encrypt_key -.private_extern _vpaes_set_encrypt_key -.align 4 -_vpaes_set_encrypt_key: -L_vpaes_set_encrypt_key_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - leal -56(%esp),%ebx - movl 24(%esp),%eax - andl $-16,%ebx - movl 28(%esp),%edx - xchgl %esp,%ebx - movl %ebx,48(%esp) - movl %eax,%ebx - shrl $5,%ebx - addl $5,%ebx - movl %ebx,240(%edx) - movl $48,%ecx - movl $0,%edi - leal L_vpaes_consts+0x30-L016pic_point,%ebp - call __vpaes_schedule_core -L016pic_point: - movl 48(%esp),%esp - xorl %eax,%eax - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _vpaes_set_decrypt_key -.private_extern _vpaes_set_decrypt_key -.align 4 -_vpaes_set_decrypt_key: -L_vpaes_set_decrypt_key_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - leal -56(%esp),%ebx - movl 24(%esp),%eax - andl $-16,%ebx - movl 28(%esp),%edx - xchgl %esp,%ebx - movl %ebx,48(%esp) - movl %eax,%ebx - shrl $5,%ebx - addl $5,%ebx - movl %ebx,240(%edx) - shll $4,%ebx - leal 16(%edx,%ebx,1),%edx - movl $1,%edi - movl %eax,%ecx - shrl $1,%ecx - andl $32,%ecx - xorl $32,%ecx - leal L_vpaes_consts+0x30-L017pic_point,%ebp - call __vpaes_schedule_core -L017pic_point: - movl 48(%esp),%esp - xorl %eax,%eax - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _vpaes_encrypt -.private_extern _vpaes_encrypt -.align 4 -_vpaes_encrypt: -L_vpaes_encrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - leal L_vpaes_consts+0x30-L018pic_point,%ebp - call __vpaes_preheat -L018pic_point: - movl 20(%esp),%esi - leal -56(%esp),%ebx - movl 24(%esp),%edi - andl $-16,%ebx - movl 28(%esp),%edx - xchgl %esp,%ebx - movl %ebx,48(%esp) - movdqu (%esi),%xmm0 - call __vpaes_encrypt_core - movdqu %xmm0,(%edi) - movl 48(%esp),%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _vpaes_decrypt -.private_extern _vpaes_decrypt -.align 4 -_vpaes_decrypt: -L_vpaes_decrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - leal L_vpaes_consts+0x30-L019pic_point,%ebp - call __vpaes_preheat -L019pic_point: - movl 20(%esp),%esi - leal -56(%esp),%ebx - movl 24(%esp),%edi - andl $-16,%ebx - movl 28(%esp),%edx - xchgl %esp,%ebx - movl %ebx,48(%esp) - movdqu (%esi),%xmm0 - call __vpaes_decrypt_core - movdqu %xmm0,(%edi) - movl 48(%esp),%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _vpaes_cbc_encrypt -.private_extern _vpaes_cbc_encrypt -.align 4 -_vpaes_cbc_encrypt: -L_vpaes_cbc_encrypt_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%eax - movl 32(%esp),%edx - subl $16,%eax - jc L020cbc_abort - leal -56(%esp),%ebx - movl 36(%esp),%ebp - andl $-16,%ebx - movl 40(%esp),%ecx - xchgl %esp,%ebx - movdqu (%ebp),%xmm1 - subl %esi,%edi - movl %ebx,48(%esp) - movl %edi,(%esp) - movl %edx,4(%esp) - movl %ebp,8(%esp) - movl %eax,%edi - leal L_vpaes_consts+0x30-L021pic_point,%ebp - call __vpaes_preheat -L021pic_point: - cmpl $0,%ecx - je L022cbc_dec_loop - jmp L023cbc_enc_loop -.align 4,0x90 -L023cbc_enc_loop: - movdqu (%esi),%xmm0 - pxor %xmm1,%xmm0 - call __vpaes_encrypt_core - movl (%esp),%ebx - movl 4(%esp),%edx - movdqa %xmm0,%xmm1 - movdqu %xmm0,(%ebx,%esi,1) - leal 16(%esi),%esi - subl $16,%edi - jnc L023cbc_enc_loop - jmp L024cbc_done -.align 4,0x90 -L022cbc_dec_loop: - movdqu (%esi),%xmm0 - movdqa %xmm1,16(%esp) - movdqa %xmm0,32(%esp) - call __vpaes_decrypt_core - movl (%esp),%ebx - movl 4(%esp),%edx - pxor 16(%esp),%xmm0 - movdqa 32(%esp),%xmm1 - movdqu %xmm0,(%ebx,%esi,1) - leal 16(%esi),%esi - subl $16,%edi - jnc L022cbc_dec_loop -L024cbc_done: - movl 8(%esp),%ebx - movl 48(%esp),%esp - movdqu %xmm1,(%ebx) -L020cbc_abort: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -#endif diff --git a/third_party/boringssl/mac-x86/crypto/bn/bn-586.S b/third_party/boringssl/mac-x86/crypto/bn/bn-586.S deleted file mode 100644 index 0f0a94ece3d19..0000000000000 --- a/third_party/boringssl/mac-x86/crypto/bn/bn-586.S +++ /dev/null @@ -1,1528 +0,0 @@ -#if defined(__i386__) -.file "src/crypto/bn/asm/bn-586.S" -.text -.globl _bn_mul_add_words -.private_extern _bn_mul_add_words -.align 4 -_bn_mul_add_words: -L_bn_mul_add_words_begin: - call L000PIC_me_up -L000PIC_me_up: - popl %eax - movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L000PIC_me_up(%eax),%eax - btl $26,(%eax) - jnc L001maw_non_sse2 - movl 4(%esp),%eax - movl 8(%esp),%edx - movl 12(%esp),%ecx - movd 16(%esp),%mm0 - pxor %mm1,%mm1 - jmp L002maw_sse2_entry -.align 4,0x90 -L003maw_sse2_unrolled: - movd (%eax),%mm3 - paddq %mm3,%mm1 - movd (%edx),%mm2 - pmuludq %mm0,%mm2 - movd 4(%edx),%mm4 - pmuludq %mm0,%mm4 - movd 8(%edx),%mm6 - pmuludq %mm0,%mm6 - movd 12(%edx),%mm7 - pmuludq %mm0,%mm7 - paddq %mm2,%mm1 - movd 4(%eax),%mm3 - paddq %mm4,%mm3 - movd 8(%eax),%mm5 - paddq %mm6,%mm5 - movd 12(%eax),%mm4 - paddq %mm4,%mm7 - movd %mm1,(%eax) - movd 16(%edx),%mm2 - pmuludq %mm0,%mm2 - psrlq $32,%mm1 - movd 20(%edx),%mm4 - pmuludq %mm0,%mm4 - paddq %mm3,%mm1 - movd 24(%edx),%mm6 - pmuludq %mm0,%mm6 - movd %mm1,4(%eax) - psrlq $32,%mm1 - movd 28(%edx),%mm3 - addl $32,%edx - pmuludq %mm0,%mm3 - paddq %mm5,%mm1 - movd 16(%eax),%mm5 - paddq %mm5,%mm2 - movd %mm1,8(%eax) - psrlq $32,%mm1 - paddq %mm7,%mm1 - movd 20(%eax),%mm5 - paddq %mm5,%mm4 - movd %mm1,12(%eax) - psrlq $32,%mm1 - paddq %mm2,%mm1 - movd 24(%eax),%mm5 - paddq %mm5,%mm6 - movd %mm1,16(%eax) - psrlq $32,%mm1 - paddq %mm4,%mm1 - movd 28(%eax),%mm5 - paddq %mm5,%mm3 - movd %mm1,20(%eax) - psrlq $32,%mm1 - paddq %mm6,%mm1 - movd %mm1,24(%eax) - psrlq $32,%mm1 - paddq %mm3,%mm1 - movd %mm1,28(%eax) - leal 32(%eax),%eax - psrlq $32,%mm1 - subl $8,%ecx - jz L004maw_sse2_exit -L002maw_sse2_entry: - testl $4294967288,%ecx - jnz L003maw_sse2_unrolled -.align 2,0x90 -L005maw_sse2_loop: - movd (%edx),%mm2 - movd (%eax),%mm3 - pmuludq %mm0,%mm2 - leal 4(%edx),%edx - paddq %mm3,%mm1 - paddq %mm2,%mm1 - movd %mm1,(%eax) - subl $1,%ecx - psrlq $32,%mm1 - leal 4(%eax),%eax - jnz L005maw_sse2_loop -L004maw_sse2_exit: - movd %mm1,%eax - emms - ret -.align 4,0x90 -L001maw_non_sse2: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - - xorl %esi,%esi - movl 20(%esp),%edi - movl 28(%esp),%ecx - movl 24(%esp),%ebx - andl $4294967288,%ecx - movl 32(%esp),%ebp - pushl %ecx - jz L006maw_finish -.align 4,0x90 -L007maw_loop: - # Round 0 - movl (%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl (%edi),%eax - adcl $0,%edx - movl %eax,(%edi) - movl %edx,%esi - # Round 4 - movl 4(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 4(%edi),%eax - adcl $0,%edx - movl %eax,4(%edi) - movl %edx,%esi - # Round 8 - movl 8(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 8(%edi),%eax - adcl $0,%edx - movl %eax,8(%edi) - movl %edx,%esi - # Round 12 - movl 12(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 12(%edi),%eax - adcl $0,%edx - movl %eax,12(%edi) - movl %edx,%esi - # Round 16 - movl 16(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 16(%edi),%eax - adcl $0,%edx - movl %eax,16(%edi) - movl %edx,%esi - # Round 20 - movl 20(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 20(%edi),%eax - adcl $0,%edx - movl %eax,20(%edi) - movl %edx,%esi - # Round 24 - movl 24(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 24(%edi),%eax - adcl $0,%edx - movl %eax,24(%edi) - movl %edx,%esi - # Round 28 - movl 28(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 28(%edi),%eax - adcl $0,%edx - movl %eax,28(%edi) - movl %edx,%esi - - subl $8,%ecx - leal 32(%ebx),%ebx - leal 32(%edi),%edi - jnz L007maw_loop -L006maw_finish: - movl 32(%esp),%ecx - andl $7,%ecx - jnz L008maw_finish2 - jmp L009maw_end -L008maw_finish2: - # Tail Round 0 - movl (%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl (%edi),%eax - adcl $0,%edx - decl %ecx - movl %eax,(%edi) - movl %edx,%esi - jz L009maw_end - # Tail Round 1 - movl 4(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 4(%edi),%eax - adcl $0,%edx - decl %ecx - movl %eax,4(%edi) - movl %edx,%esi - jz L009maw_end - # Tail Round 2 - movl 8(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 8(%edi),%eax - adcl $0,%edx - decl %ecx - movl %eax,8(%edi) - movl %edx,%esi - jz L009maw_end - # Tail Round 3 - movl 12(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 12(%edi),%eax - adcl $0,%edx - decl %ecx - movl %eax,12(%edi) - movl %edx,%esi - jz L009maw_end - # Tail Round 4 - movl 16(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 16(%edi),%eax - adcl $0,%edx - decl %ecx - movl %eax,16(%edi) - movl %edx,%esi - jz L009maw_end - # Tail Round 5 - movl 20(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 20(%edi),%eax - adcl $0,%edx - decl %ecx - movl %eax,20(%edi) - movl %edx,%esi - jz L009maw_end - # Tail Round 6 - movl 24(%ebx),%eax - mull %ebp - addl %esi,%eax - adcl $0,%edx - addl 24(%edi),%eax - adcl $0,%edx - movl %eax,24(%edi) - movl %edx,%esi -L009maw_end: - movl %esi,%eax - popl %ecx - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _bn_mul_words -.private_extern _bn_mul_words -.align 4 -_bn_mul_words: -L_bn_mul_words_begin: - call L010PIC_me_up -L010PIC_me_up: - popl %eax - movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L010PIC_me_up(%eax),%eax - btl $26,(%eax) - jnc L011mw_non_sse2 - movl 4(%esp),%eax - movl 8(%esp),%edx - movl 12(%esp),%ecx - movd 16(%esp),%mm0 - pxor %mm1,%mm1 -.align 4,0x90 -L012mw_sse2_loop: - movd (%edx),%mm2 - pmuludq %mm0,%mm2 - leal 4(%edx),%edx - paddq %mm2,%mm1 - movd %mm1,(%eax) - subl $1,%ecx - psrlq $32,%mm1 - leal 4(%eax),%eax - jnz L012mw_sse2_loop - movd %mm1,%eax - emms - ret -.align 4,0x90 -L011mw_non_sse2: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - - xorl %esi,%esi - movl 20(%esp),%edi - movl 24(%esp),%ebx - movl 28(%esp),%ebp - movl 32(%esp),%ecx - andl $4294967288,%ebp - jz L013mw_finish -L014mw_loop: - # Round 0 - movl (%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,(%edi) - movl %edx,%esi - # Round 4 - movl 4(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,4(%edi) - movl %edx,%esi - # Round 8 - movl 8(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,8(%edi) - movl %edx,%esi - # Round 12 - movl 12(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,12(%edi) - movl %edx,%esi - # Round 16 - movl 16(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,16(%edi) - movl %edx,%esi - # Round 20 - movl 20(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,20(%edi) - movl %edx,%esi - # Round 24 - movl 24(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,24(%edi) - movl %edx,%esi - # Round 28 - movl 28(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,28(%edi) - movl %edx,%esi - - addl $32,%ebx - addl $32,%edi - subl $8,%ebp - jz L013mw_finish - jmp L014mw_loop -L013mw_finish: - movl 28(%esp),%ebp - andl $7,%ebp - jnz L015mw_finish2 - jmp L016mw_end -L015mw_finish2: - # Tail Round 0 - movl (%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,(%edi) - movl %edx,%esi - decl %ebp - jz L016mw_end - # Tail Round 1 - movl 4(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,4(%edi) - movl %edx,%esi - decl %ebp - jz L016mw_end - # Tail Round 2 - movl 8(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,8(%edi) - movl %edx,%esi - decl %ebp - jz L016mw_end - # Tail Round 3 - movl 12(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,12(%edi) - movl %edx,%esi - decl %ebp - jz L016mw_end - # Tail Round 4 - movl 16(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,16(%edi) - movl %edx,%esi - decl %ebp - jz L016mw_end - # Tail Round 5 - movl 20(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,20(%edi) - movl %edx,%esi - decl %ebp - jz L016mw_end - # Tail Round 6 - movl 24(%ebx),%eax - mull %ecx - addl %esi,%eax - adcl $0,%edx - movl %eax,24(%edi) - movl %edx,%esi -L016mw_end: - movl %esi,%eax - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _bn_sqr_words -.private_extern _bn_sqr_words -.align 4 -_bn_sqr_words: -L_bn_sqr_words_begin: - call L017PIC_me_up -L017PIC_me_up: - popl %eax - movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L017PIC_me_up(%eax),%eax - btl $26,(%eax) - jnc L018sqr_non_sse2 - movl 4(%esp),%eax - movl 8(%esp),%edx - movl 12(%esp),%ecx -.align 4,0x90 -L019sqr_sse2_loop: - movd (%edx),%mm0 - pmuludq %mm0,%mm0 - leal 4(%edx),%edx - movq %mm0,(%eax) - subl $1,%ecx - leal 8(%eax),%eax - jnz L019sqr_sse2_loop - emms - ret -.align 4,0x90 -L018sqr_non_sse2: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%ebx - andl $4294967288,%ebx - jz L020sw_finish -L021sw_loop: - # Round 0 - movl (%edi),%eax - mull %eax - movl %eax,(%esi) - movl %edx,4(%esi) - # Round 4 - movl 4(%edi),%eax - mull %eax - movl %eax,8(%esi) - movl %edx,12(%esi) - # Round 8 - movl 8(%edi),%eax - mull %eax - movl %eax,16(%esi) - movl %edx,20(%esi) - # Round 12 - movl 12(%edi),%eax - mull %eax - movl %eax,24(%esi) - movl %edx,28(%esi) - # Round 16 - movl 16(%edi),%eax - mull %eax - movl %eax,32(%esi) - movl %edx,36(%esi) - # Round 20 - movl 20(%edi),%eax - mull %eax - movl %eax,40(%esi) - movl %edx,44(%esi) - # Round 24 - movl 24(%edi),%eax - mull %eax - movl %eax,48(%esi) - movl %edx,52(%esi) - # Round 28 - movl 28(%edi),%eax - mull %eax - movl %eax,56(%esi) - movl %edx,60(%esi) - - addl $32,%edi - addl $64,%esi - subl $8,%ebx - jnz L021sw_loop -L020sw_finish: - movl 28(%esp),%ebx - andl $7,%ebx - jz L022sw_end - # Tail Round 0 - movl (%edi),%eax - mull %eax - movl %eax,(%esi) - decl %ebx - movl %edx,4(%esi) - jz L022sw_end - # Tail Round 1 - movl 4(%edi),%eax - mull %eax - movl %eax,8(%esi) - decl %ebx - movl %edx,12(%esi) - jz L022sw_end - # Tail Round 2 - movl 8(%edi),%eax - mull %eax - movl %eax,16(%esi) - decl %ebx - movl %edx,20(%esi) - jz L022sw_end - # Tail Round 3 - movl 12(%edi),%eax - mull %eax - movl %eax,24(%esi) - decl %ebx - movl %edx,28(%esi) - jz L022sw_end - # Tail Round 4 - movl 16(%edi),%eax - mull %eax - movl %eax,32(%esi) - decl %ebx - movl %edx,36(%esi) - jz L022sw_end - # Tail Round 5 - movl 20(%edi),%eax - mull %eax - movl %eax,40(%esi) - decl %ebx - movl %edx,44(%esi) - jz L022sw_end - # Tail Round 6 - movl 24(%edi),%eax - mull %eax - movl %eax,48(%esi) - movl %edx,52(%esi) -L022sw_end: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _bn_div_words -.private_extern _bn_div_words -.align 4 -_bn_div_words: -L_bn_div_words_begin: - movl 4(%esp),%edx - movl 8(%esp),%eax - movl 12(%esp),%ecx - divl %ecx - ret -.globl _bn_add_words -.private_extern _bn_add_words -.align 4 -_bn_add_words: -L_bn_add_words_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - - movl 20(%esp),%ebx - movl 24(%esp),%esi - movl 28(%esp),%edi - movl 32(%esp),%ebp - xorl %eax,%eax - andl $4294967288,%ebp - jz L023aw_finish -L024aw_loop: - # Round 0 - movl (%esi),%ecx - movl (%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - # Round 1 - movl 4(%esi),%ecx - movl 4(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - movl %ecx,4(%ebx) - # Round 2 - movl 8(%esi),%ecx - movl 8(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - movl %ecx,8(%ebx) - # Round 3 - movl 12(%esi),%ecx - movl 12(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - movl %ecx,12(%ebx) - # Round 4 - movl 16(%esi),%ecx - movl 16(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - movl %ecx,16(%ebx) - # Round 5 - movl 20(%esi),%ecx - movl 20(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - movl %ecx,20(%ebx) - # Round 6 - movl 24(%esi),%ecx - movl 24(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - movl %ecx,24(%ebx) - # Round 7 - movl 28(%esi),%ecx - movl 28(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - movl %ecx,28(%ebx) - - addl $32,%esi - addl $32,%edi - addl $32,%ebx - subl $8,%ebp - jnz L024aw_loop -L023aw_finish: - movl 32(%esp),%ebp - andl $7,%ebp - jz L025aw_end - # Tail Round 0 - movl (%esi),%ecx - movl (%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,(%ebx) - jz L025aw_end - # Tail Round 1 - movl 4(%esi),%ecx - movl 4(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,4(%ebx) - jz L025aw_end - # Tail Round 2 - movl 8(%esi),%ecx - movl 8(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,8(%ebx) - jz L025aw_end - # Tail Round 3 - movl 12(%esi),%ecx - movl 12(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,12(%ebx) - jz L025aw_end - # Tail Round 4 - movl 16(%esi),%ecx - movl 16(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,16(%ebx) - jz L025aw_end - # Tail Round 5 - movl 20(%esi),%ecx - movl 20(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,20(%ebx) - jz L025aw_end - # Tail Round 6 - movl 24(%esi),%ecx - movl 24(%edi),%edx - addl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - addl %edx,%ecx - adcl $0,%eax - movl %ecx,24(%ebx) -L025aw_end: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _bn_sub_words -.private_extern _bn_sub_words -.align 4 -_bn_sub_words: -L_bn_sub_words_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - - movl 20(%esp),%ebx - movl 24(%esp),%esi - movl 28(%esp),%edi - movl 32(%esp),%ebp - xorl %eax,%eax - andl $4294967288,%ebp - jz L026aw_finish -L027aw_loop: - # Round 0 - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - # Round 1 - movl 4(%esi),%ecx - movl 4(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,4(%ebx) - # Round 2 - movl 8(%esi),%ecx - movl 8(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,8(%ebx) - # Round 3 - movl 12(%esi),%ecx - movl 12(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,12(%ebx) - # Round 4 - movl 16(%esi),%ecx - movl 16(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,16(%ebx) - # Round 5 - movl 20(%esi),%ecx - movl 20(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,20(%ebx) - # Round 6 - movl 24(%esi),%ecx - movl 24(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,24(%ebx) - # Round 7 - movl 28(%esi),%ecx - movl 28(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,28(%ebx) - - addl $32,%esi - addl $32,%edi - addl $32,%ebx - subl $8,%ebp - jnz L027aw_loop -L026aw_finish: - movl 32(%esp),%ebp - andl $7,%ebp - jz L028aw_end - # Tail Round 0 - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,(%ebx) - jz L028aw_end - # Tail Round 1 - movl 4(%esi),%ecx - movl 4(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,4(%ebx) - jz L028aw_end - # Tail Round 2 - movl 8(%esi),%ecx - movl 8(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,8(%ebx) - jz L028aw_end - # Tail Round 3 - movl 12(%esi),%ecx - movl 12(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,12(%ebx) - jz L028aw_end - # Tail Round 4 - movl 16(%esi),%ecx - movl 16(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,16(%ebx) - jz L028aw_end - # Tail Round 5 - movl 20(%esi),%ecx - movl 20(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,20(%ebx) - jz L028aw_end - # Tail Round 6 - movl 24(%esi),%ecx - movl 24(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,24(%ebx) -L028aw_end: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _bn_sub_part_words -.private_extern _bn_sub_part_words -.align 4 -_bn_sub_part_words: -L_bn_sub_part_words_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - - movl 20(%esp),%ebx - movl 24(%esp),%esi - movl 28(%esp),%edi - movl 32(%esp),%ebp - xorl %eax,%eax - andl $4294967288,%ebp - jz L029aw_finish -L030aw_loop: - # Round 0 - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - # Round 1 - movl 4(%esi),%ecx - movl 4(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,4(%ebx) - # Round 2 - movl 8(%esi),%ecx - movl 8(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,8(%ebx) - # Round 3 - movl 12(%esi),%ecx - movl 12(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,12(%ebx) - # Round 4 - movl 16(%esi),%ecx - movl 16(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,16(%ebx) - # Round 5 - movl 20(%esi),%ecx - movl 20(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,20(%ebx) - # Round 6 - movl 24(%esi),%ecx - movl 24(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,24(%ebx) - # Round 7 - movl 28(%esi),%ecx - movl 28(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,28(%ebx) - - addl $32,%esi - addl $32,%edi - addl $32,%ebx - subl $8,%ebp - jnz L030aw_loop -L029aw_finish: - movl 32(%esp),%ebp - andl $7,%ebp - jz L031aw_end - # Tail Round 0 - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - addl $4,%esi - addl $4,%edi - addl $4,%ebx - decl %ebp - jz L031aw_end - # Tail Round 1 - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - addl $4,%esi - addl $4,%edi - addl $4,%ebx - decl %ebp - jz L031aw_end - # Tail Round 2 - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - addl $4,%esi - addl $4,%edi - addl $4,%ebx - decl %ebp - jz L031aw_end - # Tail Round 3 - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - addl $4,%esi - addl $4,%edi - addl $4,%ebx - decl %ebp - jz L031aw_end - # Tail Round 4 - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - addl $4,%esi - addl $4,%edi - addl $4,%ebx - decl %ebp - jz L031aw_end - # Tail Round 5 - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - addl $4,%esi - addl $4,%edi - addl $4,%ebx - decl %ebp - jz L031aw_end - # Tail Round 6 - movl (%esi),%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - addl $4,%esi - addl $4,%edi - addl $4,%ebx -L031aw_end: - cmpl $0,36(%esp) - je L032pw_end - movl 36(%esp),%ebp - cmpl $0,%ebp - je L032pw_end - jge L033pw_pos - # pw_neg - movl $0,%edx - subl %ebp,%edx - movl %edx,%ebp - andl $4294967288,%ebp - jz L034pw_neg_finish -L035pw_neg_loop: - # dl<0 Round 0 - movl $0,%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,(%ebx) - # dl<0 Round 1 - movl $0,%ecx - movl 4(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,4(%ebx) - # dl<0 Round 2 - movl $0,%ecx - movl 8(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,8(%ebx) - # dl<0 Round 3 - movl $0,%ecx - movl 12(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,12(%ebx) - # dl<0 Round 4 - movl $0,%ecx - movl 16(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,16(%ebx) - # dl<0 Round 5 - movl $0,%ecx - movl 20(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,20(%ebx) - # dl<0 Round 6 - movl $0,%ecx - movl 24(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,24(%ebx) - # dl<0 Round 7 - movl $0,%ecx - movl 28(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,28(%ebx) - - addl $32,%edi - addl $32,%ebx - subl $8,%ebp - jnz L035pw_neg_loop -L034pw_neg_finish: - movl 36(%esp),%edx - movl $0,%ebp - subl %edx,%ebp - andl $7,%ebp - jz L032pw_end - # dl<0 Tail Round 0 - movl $0,%ecx - movl (%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,(%ebx) - jz L032pw_end - # dl<0 Tail Round 1 - movl $0,%ecx - movl 4(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,4(%ebx) - jz L032pw_end - # dl<0 Tail Round 2 - movl $0,%ecx - movl 8(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,8(%ebx) - jz L032pw_end - # dl<0 Tail Round 3 - movl $0,%ecx - movl 12(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,12(%ebx) - jz L032pw_end - # dl<0 Tail Round 4 - movl $0,%ecx - movl 16(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,16(%ebx) - jz L032pw_end - # dl<0 Tail Round 5 - movl $0,%ecx - movl 20(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - decl %ebp - movl %ecx,20(%ebx) - jz L032pw_end - # dl<0 Tail Round 6 - movl $0,%ecx - movl 24(%edi),%edx - subl %eax,%ecx - movl $0,%eax - adcl %eax,%eax - subl %edx,%ecx - adcl $0,%eax - movl %ecx,24(%ebx) - jmp L032pw_end -L033pw_pos: - andl $4294967288,%ebp - jz L036pw_pos_finish -L037pw_pos_loop: - # dl>0 Round 0 - movl (%esi),%ecx - subl %eax,%ecx - movl %ecx,(%ebx) - jnc L038pw_nc0 - # dl>0 Round 1 - movl 4(%esi),%ecx - subl %eax,%ecx - movl %ecx,4(%ebx) - jnc L039pw_nc1 - # dl>0 Round 2 - movl 8(%esi),%ecx - subl %eax,%ecx - movl %ecx,8(%ebx) - jnc L040pw_nc2 - # dl>0 Round 3 - movl 12(%esi),%ecx - subl %eax,%ecx - movl %ecx,12(%ebx) - jnc L041pw_nc3 - # dl>0 Round 4 - movl 16(%esi),%ecx - subl %eax,%ecx - movl %ecx,16(%ebx) - jnc L042pw_nc4 - # dl>0 Round 5 - movl 20(%esi),%ecx - subl %eax,%ecx - movl %ecx,20(%ebx) - jnc L043pw_nc5 - # dl>0 Round 6 - movl 24(%esi),%ecx - subl %eax,%ecx - movl %ecx,24(%ebx) - jnc L044pw_nc6 - # dl>0 Round 7 - movl 28(%esi),%ecx - subl %eax,%ecx - movl %ecx,28(%ebx) - jnc L045pw_nc7 - - addl $32,%esi - addl $32,%ebx - subl $8,%ebp - jnz L037pw_pos_loop -L036pw_pos_finish: - movl 36(%esp),%ebp - andl $7,%ebp - jz L032pw_end - # dl>0 Tail Round 0 - movl (%esi),%ecx - subl %eax,%ecx - movl %ecx,(%ebx) - jnc L046pw_tail_nc0 - decl %ebp - jz L032pw_end - # dl>0 Tail Round 1 - movl 4(%esi),%ecx - subl %eax,%ecx - movl %ecx,4(%ebx) - jnc L047pw_tail_nc1 - decl %ebp - jz L032pw_end - # dl>0 Tail Round 2 - movl 8(%esi),%ecx - subl %eax,%ecx - movl %ecx,8(%ebx) - jnc L048pw_tail_nc2 - decl %ebp - jz L032pw_end - # dl>0 Tail Round 3 - movl 12(%esi),%ecx - subl %eax,%ecx - movl %ecx,12(%ebx) - jnc L049pw_tail_nc3 - decl %ebp - jz L032pw_end - # dl>0 Tail Round 4 - movl 16(%esi),%ecx - subl %eax,%ecx - movl %ecx,16(%ebx) - jnc L050pw_tail_nc4 - decl %ebp - jz L032pw_end - # dl>0 Tail Round 5 - movl 20(%esi),%ecx - subl %eax,%ecx - movl %ecx,20(%ebx) - jnc L051pw_tail_nc5 - decl %ebp - jz L032pw_end - # dl>0 Tail Round 6 - movl 24(%esi),%ecx - subl %eax,%ecx - movl %ecx,24(%ebx) - jnc L052pw_tail_nc6 - movl $1,%eax - jmp L032pw_end -L053pw_nc_loop: - movl (%esi),%ecx - movl %ecx,(%ebx) -L038pw_nc0: - movl 4(%esi),%ecx - movl %ecx,4(%ebx) -L039pw_nc1: - movl 8(%esi),%ecx - movl %ecx,8(%ebx) -L040pw_nc2: - movl 12(%esi),%ecx - movl %ecx,12(%ebx) -L041pw_nc3: - movl 16(%esi),%ecx - movl %ecx,16(%ebx) -L042pw_nc4: - movl 20(%esi),%ecx - movl %ecx,20(%ebx) -L043pw_nc5: - movl 24(%esi),%ecx - movl %ecx,24(%ebx) -L044pw_nc6: - movl 28(%esi),%ecx - movl %ecx,28(%ebx) -L045pw_nc7: - - addl $32,%esi - addl $32,%ebx - subl $8,%ebp - jnz L053pw_nc_loop - movl 36(%esp),%ebp - andl $7,%ebp - jz L054pw_nc_end - movl (%esi),%ecx - movl %ecx,(%ebx) -L046pw_tail_nc0: - decl %ebp - jz L054pw_nc_end - movl 4(%esi),%ecx - movl %ecx,4(%ebx) -L047pw_tail_nc1: - decl %ebp - jz L054pw_nc_end - movl 8(%esi),%ecx - movl %ecx,8(%ebx) -L048pw_tail_nc2: - decl %ebp - jz L054pw_nc_end - movl 12(%esi),%ecx - movl %ecx,12(%ebx) -L049pw_tail_nc3: - decl %ebp - jz L054pw_nc_end - movl 16(%esi),%ecx - movl %ecx,16(%ebx) -L050pw_tail_nc4: - decl %ebp - jz L054pw_nc_end - movl 20(%esi),%ecx - movl %ecx,20(%ebx) -L051pw_tail_nc5: - decl %ebp - jz L054pw_nc_end - movl 24(%esi),%ecx - movl %ecx,24(%ebx) -L052pw_tail_nc6: -L054pw_nc_end: - movl $0,%eax -L032pw_end: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.section __IMPORT,__pointers,non_lazy_symbol_pointers -L_OPENSSL_ia32cap_P$non_lazy_ptr: -.indirect_symbol _OPENSSL_ia32cap_P -.long 0 -#endif diff --git a/third_party/boringssl/mac-x86/crypto/bn/co-586.S b/third_party/boringssl/mac-x86/crypto/bn/co-586.S deleted file mode 100644 index 7ce8e794250a2..0000000000000 --- a/third_party/boringssl/mac-x86/crypto/bn/co-586.S +++ /dev/null @@ -1,1252 +0,0 @@ -#if defined(__i386__) -.file "src/crypto/bn/asm/co-586.S" -.text -.globl _bn_mul_comba8 -.private_extern _bn_mul_comba8 -.align 4 -_bn_mul_comba8: -L_bn_mul_comba8_begin: - pushl %esi - movl 12(%esp),%esi - pushl %edi - movl 20(%esp),%edi - pushl %ebp - pushl %ebx - xorl %ebx,%ebx - movl (%esi),%eax - xorl %ecx,%ecx - movl (%edi),%edx - # ################## Calculate word 0 - xorl %ebp,%ebp - # mul a[0]*b[0] - mull %edx - addl %eax,%ebx - movl 20(%esp),%eax - adcl %edx,%ecx - movl (%edi),%edx - adcl $0,%ebp - movl %ebx,(%eax) - movl 4(%esi),%eax - # saved r[0] - # ################## Calculate word 1 - xorl %ebx,%ebx - # mul a[1]*b[0] - mull %edx - addl %eax,%ecx - movl (%esi),%eax - adcl %edx,%ebp - movl 4(%edi),%edx - adcl $0,%ebx - # mul a[0]*b[1] - mull %edx - addl %eax,%ecx - movl 20(%esp),%eax - adcl %edx,%ebp - movl (%edi),%edx - adcl $0,%ebx - movl %ecx,4(%eax) - movl 8(%esi),%eax - # saved r[1] - # ################## Calculate word 2 - xorl %ecx,%ecx - # mul a[2]*b[0] - mull %edx - addl %eax,%ebp - movl 4(%esi),%eax - adcl %edx,%ebx - movl 4(%edi),%edx - adcl $0,%ecx - # mul a[1]*b[1] - mull %edx - addl %eax,%ebp - movl (%esi),%eax - adcl %edx,%ebx - movl 8(%edi),%edx - adcl $0,%ecx - # mul a[0]*b[2] - mull %edx - addl %eax,%ebp - movl 20(%esp),%eax - adcl %edx,%ebx - movl (%edi),%edx - adcl $0,%ecx - movl %ebp,8(%eax) - movl 12(%esi),%eax - # saved r[2] - # ################## Calculate word 3 - xorl %ebp,%ebp - # mul a[3]*b[0] - mull %edx - addl %eax,%ebx - movl 8(%esi),%eax - adcl %edx,%ecx - movl 4(%edi),%edx - adcl $0,%ebp - # mul a[2]*b[1] - mull %edx - addl %eax,%ebx - movl 4(%esi),%eax - adcl %edx,%ecx - movl 8(%edi),%edx - adcl $0,%ebp - # mul a[1]*b[2] - mull %edx - addl %eax,%ebx - movl (%esi),%eax - adcl %edx,%ecx - movl 12(%edi),%edx - adcl $0,%ebp - # mul a[0]*b[3] - mull %edx - addl %eax,%ebx - movl 20(%esp),%eax - adcl %edx,%ecx - movl (%edi),%edx - adcl $0,%ebp - movl %ebx,12(%eax) - movl 16(%esi),%eax - # saved r[3] - # ################## Calculate word 4 - xorl %ebx,%ebx - # mul a[4]*b[0] - mull %edx - addl %eax,%ecx - movl 12(%esi),%eax - adcl %edx,%ebp - movl 4(%edi),%edx - adcl $0,%ebx - # mul a[3]*b[1] - mull %edx - addl %eax,%ecx - movl 8(%esi),%eax - adcl %edx,%ebp - movl 8(%edi),%edx - adcl $0,%ebx - # mul a[2]*b[2] - mull %edx - addl %eax,%ecx - movl 4(%esi),%eax - adcl %edx,%ebp - movl 12(%edi),%edx - adcl $0,%ebx - # mul a[1]*b[3] - mull %edx - addl %eax,%ecx - movl (%esi),%eax - adcl %edx,%ebp - movl 16(%edi),%edx - adcl $0,%ebx - # mul a[0]*b[4] - mull %edx - addl %eax,%ecx - movl 20(%esp),%eax - adcl %edx,%ebp - movl (%edi),%edx - adcl $0,%ebx - movl %ecx,16(%eax) - movl 20(%esi),%eax - # saved r[4] - # ################## Calculate word 5 - xorl %ecx,%ecx - # mul a[5]*b[0] - mull %edx - addl %eax,%ebp - movl 16(%esi),%eax - adcl %edx,%ebx - movl 4(%edi),%edx - adcl $0,%ecx - # mul a[4]*b[1] - mull %edx - addl %eax,%ebp - movl 12(%esi),%eax - adcl %edx,%ebx - movl 8(%edi),%edx - adcl $0,%ecx - # mul a[3]*b[2] - mull %edx - addl %eax,%ebp - movl 8(%esi),%eax - adcl %edx,%ebx - movl 12(%edi),%edx - adcl $0,%ecx - # mul a[2]*b[3] - mull %edx - addl %eax,%ebp - movl 4(%esi),%eax - adcl %edx,%ebx - movl 16(%edi),%edx - adcl $0,%ecx - # mul a[1]*b[4] - mull %edx - addl %eax,%ebp - movl (%esi),%eax - adcl %edx,%ebx - movl 20(%edi),%edx - adcl $0,%ecx - # mul a[0]*b[5] - mull %edx - addl %eax,%ebp - movl 20(%esp),%eax - adcl %edx,%ebx - movl (%edi),%edx - adcl $0,%ecx - movl %ebp,20(%eax) - movl 24(%esi),%eax - # saved r[5] - # ################## Calculate word 6 - xorl %ebp,%ebp - # mul a[6]*b[0] - mull %edx - addl %eax,%ebx - movl 20(%esi),%eax - adcl %edx,%ecx - movl 4(%edi),%edx - adcl $0,%ebp - # mul a[5]*b[1] - mull %edx - addl %eax,%ebx - movl 16(%esi),%eax - adcl %edx,%ecx - movl 8(%edi),%edx - adcl $0,%ebp - # mul a[4]*b[2] - mull %edx - addl %eax,%ebx - movl 12(%esi),%eax - adcl %edx,%ecx - movl 12(%edi),%edx - adcl $0,%ebp - # mul a[3]*b[3] - mull %edx - addl %eax,%ebx - movl 8(%esi),%eax - adcl %edx,%ecx - movl 16(%edi),%edx - adcl $0,%ebp - # mul a[2]*b[4] - mull %edx - addl %eax,%ebx - movl 4(%esi),%eax - adcl %edx,%ecx - movl 20(%edi),%edx - adcl $0,%ebp - # mul a[1]*b[5] - mull %edx - addl %eax,%ebx - movl (%esi),%eax - adcl %edx,%ecx - movl 24(%edi),%edx - adcl $0,%ebp - # mul a[0]*b[6] - mull %edx - addl %eax,%ebx - movl 20(%esp),%eax - adcl %edx,%ecx - movl (%edi),%edx - adcl $0,%ebp - movl %ebx,24(%eax) - movl 28(%esi),%eax - # saved r[6] - # ################## Calculate word 7 - xorl %ebx,%ebx - # mul a[7]*b[0] - mull %edx - addl %eax,%ecx - movl 24(%esi),%eax - adcl %edx,%ebp - movl 4(%edi),%edx - adcl $0,%ebx - # mul a[6]*b[1] - mull %edx - addl %eax,%ecx - movl 20(%esi),%eax - adcl %edx,%ebp - movl 8(%edi),%edx - adcl $0,%ebx - # mul a[5]*b[2] - mull %edx - addl %eax,%ecx - movl 16(%esi),%eax - adcl %edx,%ebp - movl 12(%edi),%edx - adcl $0,%ebx - # mul a[4]*b[3] - mull %edx - addl %eax,%ecx - movl 12(%esi),%eax - adcl %edx,%ebp - movl 16(%edi),%edx - adcl $0,%ebx - # mul a[3]*b[4] - mull %edx - addl %eax,%ecx - movl 8(%esi),%eax - adcl %edx,%ebp - movl 20(%edi),%edx - adcl $0,%ebx - # mul a[2]*b[5] - mull %edx - addl %eax,%ecx - movl 4(%esi),%eax - adcl %edx,%ebp - movl 24(%edi),%edx - adcl $0,%ebx - # mul a[1]*b[6] - mull %edx - addl %eax,%ecx - movl (%esi),%eax - adcl %edx,%ebp - movl 28(%edi),%edx - adcl $0,%ebx - # mul a[0]*b[7] - mull %edx - addl %eax,%ecx - movl 20(%esp),%eax - adcl %edx,%ebp - movl 4(%edi),%edx - adcl $0,%ebx - movl %ecx,28(%eax) - movl 28(%esi),%eax - # saved r[7] - # ################## Calculate word 8 - xorl %ecx,%ecx - # mul a[7]*b[1] - mull %edx - addl %eax,%ebp - movl 24(%esi),%eax - adcl %edx,%ebx - movl 8(%edi),%edx - adcl $0,%ecx - # mul a[6]*b[2] - mull %edx - addl %eax,%ebp - movl 20(%esi),%eax - adcl %edx,%ebx - movl 12(%edi),%edx - adcl $0,%ecx - # mul a[5]*b[3] - mull %edx - addl %eax,%ebp - movl 16(%esi),%eax - adcl %edx,%ebx - movl 16(%edi),%edx - adcl $0,%ecx - # mul a[4]*b[4] - mull %edx - addl %eax,%ebp - movl 12(%esi),%eax - adcl %edx,%ebx - movl 20(%edi),%edx - adcl $0,%ecx - # mul a[3]*b[5] - mull %edx - addl %eax,%ebp - movl 8(%esi),%eax - adcl %edx,%ebx - movl 24(%edi),%edx - adcl $0,%ecx - # mul a[2]*b[6] - mull %edx - addl %eax,%ebp - movl 4(%esi),%eax - adcl %edx,%ebx - movl 28(%edi),%edx - adcl $0,%ecx - # mul a[1]*b[7] - mull %edx - addl %eax,%ebp - movl 20(%esp),%eax - adcl %edx,%ebx - movl 8(%edi),%edx - adcl $0,%ecx - movl %ebp,32(%eax) - movl 28(%esi),%eax - # saved r[8] - # ################## Calculate word 9 - xorl %ebp,%ebp - # mul a[7]*b[2] - mull %edx - addl %eax,%ebx - movl 24(%esi),%eax - adcl %edx,%ecx - movl 12(%edi),%edx - adcl $0,%ebp - # mul a[6]*b[3] - mull %edx - addl %eax,%ebx - movl 20(%esi),%eax - adcl %edx,%ecx - movl 16(%edi),%edx - adcl $0,%ebp - # mul a[5]*b[4] - mull %edx - addl %eax,%ebx - movl 16(%esi),%eax - adcl %edx,%ecx - movl 20(%edi),%edx - adcl $0,%ebp - # mul a[4]*b[5] - mull %edx - addl %eax,%ebx - movl 12(%esi),%eax - adcl %edx,%ecx - movl 24(%edi),%edx - adcl $0,%ebp - # mul a[3]*b[6] - mull %edx - addl %eax,%ebx - movl 8(%esi),%eax - adcl %edx,%ecx - movl 28(%edi),%edx - adcl $0,%ebp - # mul a[2]*b[7] - mull %edx - addl %eax,%ebx - movl 20(%esp),%eax - adcl %edx,%ecx - movl 12(%edi),%edx - adcl $0,%ebp - movl %ebx,36(%eax) - movl 28(%esi),%eax - # saved r[9] - # ################## Calculate word 10 - xorl %ebx,%ebx - # mul a[7]*b[3] - mull %edx - addl %eax,%ecx - movl 24(%esi),%eax - adcl %edx,%ebp - movl 16(%edi),%edx - adcl $0,%ebx - # mul a[6]*b[4] - mull %edx - addl %eax,%ecx - movl 20(%esi),%eax - adcl %edx,%ebp - movl 20(%edi),%edx - adcl $0,%ebx - # mul a[5]*b[5] - mull %edx - addl %eax,%ecx - movl 16(%esi),%eax - adcl %edx,%ebp - movl 24(%edi),%edx - adcl $0,%ebx - # mul a[4]*b[6] - mull %edx - addl %eax,%ecx - movl 12(%esi),%eax - adcl %edx,%ebp - movl 28(%edi),%edx - adcl $0,%ebx - # mul a[3]*b[7] - mull %edx - addl %eax,%ecx - movl 20(%esp),%eax - adcl %edx,%ebp - movl 16(%edi),%edx - adcl $0,%ebx - movl %ecx,40(%eax) - movl 28(%esi),%eax - # saved r[10] - # ################## Calculate word 11 - xorl %ecx,%ecx - # mul a[7]*b[4] - mull %edx - addl %eax,%ebp - movl 24(%esi),%eax - adcl %edx,%ebx - movl 20(%edi),%edx - adcl $0,%ecx - # mul a[6]*b[5] - mull %edx - addl %eax,%ebp - movl 20(%esi),%eax - adcl %edx,%ebx - movl 24(%edi),%edx - adcl $0,%ecx - # mul a[5]*b[6] - mull %edx - addl %eax,%ebp - movl 16(%esi),%eax - adcl %edx,%ebx - movl 28(%edi),%edx - adcl $0,%ecx - # mul a[4]*b[7] - mull %edx - addl %eax,%ebp - movl 20(%esp),%eax - adcl %edx,%ebx - movl 20(%edi),%edx - adcl $0,%ecx - movl %ebp,44(%eax) - movl 28(%esi),%eax - # saved r[11] - # ################## Calculate word 12 - xorl %ebp,%ebp - # mul a[7]*b[5] - mull %edx - addl %eax,%ebx - movl 24(%esi),%eax - adcl %edx,%ecx - movl 24(%edi),%edx - adcl $0,%ebp - # mul a[6]*b[6] - mull %edx - addl %eax,%ebx - movl 20(%esi),%eax - adcl %edx,%ecx - movl 28(%edi),%edx - adcl $0,%ebp - # mul a[5]*b[7] - mull %edx - addl %eax,%ebx - movl 20(%esp),%eax - adcl %edx,%ecx - movl 24(%edi),%edx - adcl $0,%ebp - movl %ebx,48(%eax) - movl 28(%esi),%eax - # saved r[12] - # ################## Calculate word 13 - xorl %ebx,%ebx - # mul a[7]*b[6] - mull %edx - addl %eax,%ecx - movl 24(%esi),%eax - adcl %edx,%ebp - movl 28(%edi),%edx - adcl $0,%ebx - # mul a[6]*b[7] - mull %edx - addl %eax,%ecx - movl 20(%esp),%eax - adcl %edx,%ebp - movl 28(%edi),%edx - adcl $0,%ebx - movl %ecx,52(%eax) - movl 28(%esi),%eax - # saved r[13] - # ################## Calculate word 14 - xorl %ecx,%ecx - # mul a[7]*b[7] - mull %edx - addl %eax,%ebp - movl 20(%esp),%eax - adcl %edx,%ebx - adcl $0,%ecx - movl %ebp,56(%eax) - # saved r[14] - # save r[15] - movl %ebx,60(%eax) - popl %ebx - popl %ebp - popl %edi - popl %esi - ret -.globl _bn_mul_comba4 -.private_extern _bn_mul_comba4 -.align 4 -_bn_mul_comba4: -L_bn_mul_comba4_begin: - pushl %esi - movl 12(%esp),%esi - pushl %edi - movl 20(%esp),%edi - pushl %ebp - pushl %ebx - xorl %ebx,%ebx - movl (%esi),%eax - xorl %ecx,%ecx - movl (%edi),%edx - # ################## Calculate word 0 - xorl %ebp,%ebp - # mul a[0]*b[0] - mull %edx - addl %eax,%ebx - movl 20(%esp),%eax - adcl %edx,%ecx - movl (%edi),%edx - adcl $0,%ebp - movl %ebx,(%eax) - movl 4(%esi),%eax - # saved r[0] - # ################## Calculate word 1 - xorl %ebx,%ebx - # mul a[1]*b[0] - mull %edx - addl %eax,%ecx - movl (%esi),%eax - adcl %edx,%ebp - movl 4(%edi),%edx - adcl $0,%ebx - # mul a[0]*b[1] - mull %edx - addl %eax,%ecx - movl 20(%esp),%eax - adcl %edx,%ebp - movl (%edi),%edx - adcl $0,%ebx - movl %ecx,4(%eax) - movl 8(%esi),%eax - # saved r[1] - # ################## Calculate word 2 - xorl %ecx,%ecx - # mul a[2]*b[0] - mull %edx - addl %eax,%ebp - movl 4(%esi),%eax - adcl %edx,%ebx - movl 4(%edi),%edx - adcl $0,%ecx - # mul a[1]*b[1] - mull %edx - addl %eax,%ebp - movl (%esi),%eax - adcl %edx,%ebx - movl 8(%edi),%edx - adcl $0,%ecx - # mul a[0]*b[2] - mull %edx - addl %eax,%ebp - movl 20(%esp),%eax - adcl %edx,%ebx - movl (%edi),%edx - adcl $0,%ecx - movl %ebp,8(%eax) - movl 12(%esi),%eax - # saved r[2] - # ################## Calculate word 3 - xorl %ebp,%ebp - # mul a[3]*b[0] - mull %edx - addl %eax,%ebx - movl 8(%esi),%eax - adcl %edx,%ecx - movl 4(%edi),%edx - adcl $0,%ebp - # mul a[2]*b[1] - mull %edx - addl %eax,%ebx - movl 4(%esi),%eax - adcl %edx,%ecx - movl 8(%edi),%edx - adcl $0,%ebp - # mul a[1]*b[2] - mull %edx - addl %eax,%ebx - movl (%esi),%eax - adcl %edx,%ecx - movl 12(%edi),%edx - adcl $0,%ebp - # mul a[0]*b[3] - mull %edx - addl %eax,%ebx - movl 20(%esp),%eax - adcl %edx,%ecx - movl 4(%edi),%edx - adcl $0,%ebp - movl %ebx,12(%eax) - movl 12(%esi),%eax - # saved r[3] - # ################## Calculate word 4 - xorl %ebx,%ebx - # mul a[3]*b[1] - mull %edx - addl %eax,%ecx - movl 8(%esi),%eax - adcl %edx,%ebp - movl 8(%edi),%edx - adcl $0,%ebx - # mul a[2]*b[2] - mull %edx - addl %eax,%ecx - movl 4(%esi),%eax - adcl %edx,%ebp - movl 12(%edi),%edx - adcl $0,%ebx - # mul a[1]*b[3] - mull %edx - addl %eax,%ecx - movl 20(%esp),%eax - adcl %edx,%ebp - movl 8(%edi),%edx - adcl $0,%ebx - movl %ecx,16(%eax) - movl 12(%esi),%eax - # saved r[4] - # ################## Calculate word 5 - xorl %ecx,%ecx - # mul a[3]*b[2] - mull %edx - addl %eax,%ebp - movl 8(%esi),%eax - adcl %edx,%ebx - movl 12(%edi),%edx - adcl $0,%ecx - # mul a[2]*b[3] - mull %edx - addl %eax,%ebp - movl 20(%esp),%eax - adcl %edx,%ebx - movl 12(%edi),%edx - adcl $0,%ecx - movl %ebp,20(%eax) - movl 12(%esi),%eax - # saved r[5] - # ################## Calculate word 6 - xorl %ebp,%ebp - # mul a[3]*b[3] - mull %edx - addl %eax,%ebx - movl 20(%esp),%eax - adcl %edx,%ecx - adcl $0,%ebp - movl %ebx,24(%eax) - # saved r[6] - # save r[7] - movl %ecx,28(%eax) - popl %ebx - popl %ebp - popl %edi - popl %esi - ret -.globl _bn_sqr_comba8 -.private_extern _bn_sqr_comba8 -.align 4 -_bn_sqr_comba8: -L_bn_sqr_comba8_begin: - pushl %esi - pushl %edi - pushl %ebp - pushl %ebx - movl 20(%esp),%edi - movl 24(%esp),%esi - xorl %ebx,%ebx - xorl %ecx,%ecx - movl (%esi),%eax - # ############### Calculate word 0 - xorl %ebp,%ebp - # sqr a[0]*a[0] - mull %eax - addl %eax,%ebx - adcl %edx,%ecx - movl (%esi),%edx - adcl $0,%ebp - movl %ebx,(%edi) - movl 4(%esi),%eax - # saved r[0] - # ############### Calculate word 1 - xorl %ebx,%ebx - # sqr a[1]*a[0] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 8(%esi),%eax - adcl $0,%ebx - movl %ecx,4(%edi) - movl (%esi),%edx - # saved r[1] - # ############### Calculate word 2 - xorl %ecx,%ecx - # sqr a[2]*a[0] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 4(%esi),%eax - adcl $0,%ecx - # sqr a[1]*a[1] - mull %eax - addl %eax,%ebp - adcl %edx,%ebx - movl (%esi),%edx - adcl $0,%ecx - movl %ebp,8(%edi) - movl 12(%esi),%eax - # saved r[2] - # ############### Calculate word 3 - xorl %ebp,%ebp - # sqr a[3]*a[0] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 8(%esi),%eax - adcl $0,%ebp - movl 4(%esi),%edx - # sqr a[2]*a[1] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 16(%esi),%eax - adcl $0,%ebp - movl %ebx,12(%edi) - movl (%esi),%edx - # saved r[3] - # ############### Calculate word 4 - xorl %ebx,%ebx - # sqr a[4]*a[0] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 12(%esi),%eax - adcl $0,%ebx - movl 4(%esi),%edx - # sqr a[3]*a[1] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 8(%esi),%eax - adcl $0,%ebx - # sqr a[2]*a[2] - mull %eax - addl %eax,%ecx - adcl %edx,%ebp - movl (%esi),%edx - adcl $0,%ebx - movl %ecx,16(%edi) - movl 20(%esi),%eax - # saved r[4] - # ############### Calculate word 5 - xorl %ecx,%ecx - # sqr a[5]*a[0] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 16(%esi),%eax - adcl $0,%ecx - movl 4(%esi),%edx - # sqr a[4]*a[1] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 12(%esi),%eax - adcl $0,%ecx - movl 8(%esi),%edx - # sqr a[3]*a[2] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 24(%esi),%eax - adcl $0,%ecx - movl %ebp,20(%edi) - movl (%esi),%edx - # saved r[5] - # ############### Calculate word 6 - xorl %ebp,%ebp - # sqr a[6]*a[0] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 20(%esi),%eax - adcl $0,%ebp - movl 4(%esi),%edx - # sqr a[5]*a[1] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 16(%esi),%eax - adcl $0,%ebp - movl 8(%esi),%edx - # sqr a[4]*a[2] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 12(%esi),%eax - adcl $0,%ebp - # sqr a[3]*a[3] - mull %eax - addl %eax,%ebx - adcl %edx,%ecx - movl (%esi),%edx - adcl $0,%ebp - movl %ebx,24(%edi) - movl 28(%esi),%eax - # saved r[6] - # ############### Calculate word 7 - xorl %ebx,%ebx - # sqr a[7]*a[0] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 24(%esi),%eax - adcl $0,%ebx - movl 4(%esi),%edx - # sqr a[6]*a[1] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 20(%esi),%eax - adcl $0,%ebx - movl 8(%esi),%edx - # sqr a[5]*a[2] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 16(%esi),%eax - adcl $0,%ebx - movl 12(%esi),%edx - # sqr a[4]*a[3] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 28(%esi),%eax - adcl $0,%ebx - movl %ecx,28(%edi) - movl 4(%esi),%edx - # saved r[7] - # ############### Calculate word 8 - xorl %ecx,%ecx - # sqr a[7]*a[1] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 24(%esi),%eax - adcl $0,%ecx - movl 8(%esi),%edx - # sqr a[6]*a[2] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 20(%esi),%eax - adcl $0,%ecx - movl 12(%esi),%edx - # sqr a[5]*a[3] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 16(%esi),%eax - adcl $0,%ecx - # sqr a[4]*a[4] - mull %eax - addl %eax,%ebp - adcl %edx,%ebx - movl 8(%esi),%edx - adcl $0,%ecx - movl %ebp,32(%edi) - movl 28(%esi),%eax - # saved r[8] - # ############### Calculate word 9 - xorl %ebp,%ebp - # sqr a[7]*a[2] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 24(%esi),%eax - adcl $0,%ebp - movl 12(%esi),%edx - # sqr a[6]*a[3] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 20(%esi),%eax - adcl $0,%ebp - movl 16(%esi),%edx - # sqr a[5]*a[4] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 28(%esi),%eax - adcl $0,%ebp - movl %ebx,36(%edi) - movl 12(%esi),%edx - # saved r[9] - # ############### Calculate word 10 - xorl %ebx,%ebx - # sqr a[7]*a[3] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 24(%esi),%eax - adcl $0,%ebx - movl 16(%esi),%edx - # sqr a[6]*a[4] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 20(%esi),%eax - adcl $0,%ebx - # sqr a[5]*a[5] - mull %eax - addl %eax,%ecx - adcl %edx,%ebp - movl 16(%esi),%edx - adcl $0,%ebx - movl %ecx,40(%edi) - movl 28(%esi),%eax - # saved r[10] - # ############### Calculate word 11 - xorl %ecx,%ecx - # sqr a[7]*a[4] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 24(%esi),%eax - adcl $0,%ecx - movl 20(%esi),%edx - # sqr a[6]*a[5] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 28(%esi),%eax - adcl $0,%ecx - movl %ebp,44(%edi) - movl 20(%esi),%edx - # saved r[11] - # ############### Calculate word 12 - xorl %ebp,%ebp - # sqr a[7]*a[5] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 24(%esi),%eax - adcl $0,%ebp - # sqr a[6]*a[6] - mull %eax - addl %eax,%ebx - adcl %edx,%ecx - movl 24(%esi),%edx - adcl $0,%ebp - movl %ebx,48(%edi) - movl 28(%esi),%eax - # saved r[12] - # ############### Calculate word 13 - xorl %ebx,%ebx - # sqr a[7]*a[6] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 28(%esi),%eax - adcl $0,%ebx - movl %ecx,52(%edi) - # saved r[13] - # ############### Calculate word 14 - xorl %ecx,%ecx - # sqr a[7]*a[7] - mull %eax - addl %eax,%ebp - adcl %edx,%ebx - adcl $0,%ecx - movl %ebp,56(%edi) - # saved r[14] - movl %ebx,60(%edi) - popl %ebx - popl %ebp - popl %edi - popl %esi - ret -.globl _bn_sqr_comba4 -.private_extern _bn_sqr_comba4 -.align 4 -_bn_sqr_comba4: -L_bn_sqr_comba4_begin: - pushl %esi - pushl %edi - pushl %ebp - pushl %ebx - movl 20(%esp),%edi - movl 24(%esp),%esi - xorl %ebx,%ebx - xorl %ecx,%ecx - movl (%esi),%eax - # ############### Calculate word 0 - xorl %ebp,%ebp - # sqr a[0]*a[0] - mull %eax - addl %eax,%ebx - adcl %edx,%ecx - movl (%esi),%edx - adcl $0,%ebp - movl %ebx,(%edi) - movl 4(%esi),%eax - # saved r[0] - # ############### Calculate word 1 - xorl %ebx,%ebx - # sqr a[1]*a[0] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 8(%esi),%eax - adcl $0,%ebx - movl %ecx,4(%edi) - movl (%esi),%edx - # saved r[1] - # ############### Calculate word 2 - xorl %ecx,%ecx - # sqr a[2]*a[0] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 4(%esi),%eax - adcl $0,%ecx - # sqr a[1]*a[1] - mull %eax - addl %eax,%ebp - adcl %edx,%ebx - movl (%esi),%edx - adcl $0,%ecx - movl %ebp,8(%edi) - movl 12(%esi),%eax - # saved r[2] - # ############### Calculate word 3 - xorl %ebp,%ebp - # sqr a[3]*a[0] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 8(%esi),%eax - adcl $0,%ebp - movl 4(%esi),%edx - # sqr a[2]*a[1] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebp - addl %eax,%ebx - adcl %edx,%ecx - movl 12(%esi),%eax - adcl $0,%ebp - movl %ebx,12(%edi) - movl 4(%esi),%edx - # saved r[3] - # ############### Calculate word 4 - xorl %ebx,%ebx - # sqr a[3]*a[1] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ebx - addl %eax,%ecx - adcl %edx,%ebp - movl 8(%esi),%eax - adcl $0,%ebx - # sqr a[2]*a[2] - mull %eax - addl %eax,%ecx - adcl %edx,%ebp - movl 8(%esi),%edx - adcl $0,%ebx - movl %ecx,16(%edi) - movl 12(%esi),%eax - # saved r[4] - # ############### Calculate word 5 - xorl %ecx,%ecx - # sqr a[3]*a[2] - mull %edx - addl %eax,%eax - adcl %edx,%edx - adcl $0,%ecx - addl %eax,%ebp - adcl %edx,%ebx - movl 12(%esi),%eax - adcl $0,%ecx - movl %ebp,20(%edi) - # saved r[5] - # ############### Calculate word 6 - xorl %ebp,%ebp - # sqr a[3]*a[3] - mull %eax - addl %eax,%ebx - adcl %edx,%ecx - adcl $0,%ebp - movl %ebx,24(%edi) - # saved r[6] - movl %ecx,28(%edi) - popl %ebx - popl %ebp - popl %edi - popl %esi - ret -#endif diff --git a/third_party/boringssl/mac-x86/crypto/bn/x86-mont.S b/third_party/boringssl/mac-x86/crypto/bn/x86-mont.S deleted file mode 100644 index 234034b0a0805..0000000000000 --- a/third_party/boringssl/mac-x86/crypto/bn/x86-mont.S +++ /dev/null @@ -1,462 +0,0 @@ -#if defined(__i386__) -.file "src/crypto/bn/asm/x86-mont.S" -.text -.globl _bn_mul_mont -.private_extern _bn_mul_mont -.align 4 -_bn_mul_mont: -L_bn_mul_mont_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - xorl %eax,%eax - movl 40(%esp),%edi - cmpl $4,%edi - jl L000just_leave - leal 20(%esp),%esi - leal 24(%esp),%edx - movl %esp,%ebp - addl $2,%edi - negl %edi - leal -32(%esp,%edi,4),%esp - negl %edi - movl %esp,%eax - subl %edx,%eax - andl $2047,%eax - subl %eax,%esp - xorl %esp,%edx - andl $2048,%edx - xorl $2048,%edx - subl %edx,%esp - andl $-64,%esp - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - movl 16(%esi),%esi - movl (%esi),%esi - movl %eax,4(%esp) - movl %ebx,8(%esp) - movl %ecx,12(%esp) - movl %edx,16(%esp) - movl %esi,20(%esp) - leal -3(%edi),%ebx - movl %ebp,24(%esp) - call L001PIC_me_up -L001PIC_me_up: - popl %eax - movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L001PIC_me_up(%eax),%eax - btl $26,(%eax) - jnc L002non_sse2 - movl $-1,%eax - movd %eax,%mm7 - movl 8(%esp),%esi - movl 12(%esp),%edi - movl 16(%esp),%ebp - xorl %edx,%edx - xorl %ecx,%ecx - movd (%edi),%mm4 - movd (%esi),%mm5 - movd (%ebp),%mm3 - pmuludq %mm4,%mm5 - movq %mm5,%mm2 - movq %mm5,%mm0 - pand %mm7,%mm0 - pmuludq 20(%esp),%mm5 - pmuludq %mm5,%mm3 - paddq %mm0,%mm3 - movd 4(%ebp),%mm1 - movd 4(%esi),%mm0 - psrlq $32,%mm2 - psrlq $32,%mm3 - incl %ecx -.align 4,0x90 -L0031st: - pmuludq %mm4,%mm0 - pmuludq %mm5,%mm1 - paddq %mm0,%mm2 - paddq %mm1,%mm3 - movq %mm2,%mm0 - pand %mm7,%mm0 - movd 4(%ebp,%ecx,4),%mm1 - paddq %mm0,%mm3 - movd 4(%esi,%ecx,4),%mm0 - psrlq $32,%mm2 - movd %mm3,28(%esp,%ecx,4) - psrlq $32,%mm3 - leal 1(%ecx),%ecx - cmpl %ebx,%ecx - jl L0031st - pmuludq %mm4,%mm0 - pmuludq %mm5,%mm1 - paddq %mm0,%mm2 - paddq %mm1,%mm3 - movq %mm2,%mm0 - pand %mm7,%mm0 - paddq %mm0,%mm3 - movd %mm3,28(%esp,%ecx,4) - psrlq $32,%mm2 - psrlq $32,%mm3 - paddq %mm2,%mm3 - movq %mm3,32(%esp,%ebx,4) - incl %edx -L004outer: - xorl %ecx,%ecx - movd (%edi,%edx,4),%mm4 - movd (%esi),%mm5 - movd 32(%esp),%mm6 - movd (%ebp),%mm3 - pmuludq %mm4,%mm5 - paddq %mm6,%mm5 - movq %mm5,%mm0 - movq %mm5,%mm2 - pand %mm7,%mm0 - pmuludq 20(%esp),%mm5 - pmuludq %mm5,%mm3 - paddq %mm0,%mm3 - movd 36(%esp),%mm6 - movd 4(%ebp),%mm1 - movd 4(%esi),%mm0 - psrlq $32,%mm2 - psrlq $32,%mm3 - paddq %mm6,%mm2 - incl %ecx - decl %ebx -L005inner: - pmuludq %mm4,%mm0 - pmuludq %mm5,%mm1 - paddq %mm0,%mm2 - paddq %mm1,%mm3 - movq %mm2,%mm0 - movd 36(%esp,%ecx,4),%mm6 - pand %mm7,%mm0 - movd 4(%ebp,%ecx,4),%mm1 - paddq %mm0,%mm3 - movd 4(%esi,%ecx,4),%mm0 - psrlq $32,%mm2 - movd %mm3,28(%esp,%ecx,4) - psrlq $32,%mm3 - paddq %mm6,%mm2 - decl %ebx - leal 1(%ecx),%ecx - jnz L005inner - movl %ecx,%ebx - pmuludq %mm4,%mm0 - pmuludq %mm5,%mm1 - paddq %mm0,%mm2 - paddq %mm1,%mm3 - movq %mm2,%mm0 - pand %mm7,%mm0 - paddq %mm0,%mm3 - movd %mm3,28(%esp,%ecx,4) - psrlq $32,%mm2 - psrlq $32,%mm3 - movd 36(%esp,%ebx,4),%mm6 - paddq %mm2,%mm3 - paddq %mm6,%mm3 - movq %mm3,32(%esp,%ebx,4) - leal 1(%edx),%edx - cmpl %ebx,%edx - jle L004outer - emms - jmp L006common_tail -.align 4,0x90 -L002non_sse2: - movl 8(%esp),%esi - leal 1(%ebx),%ebp - movl 12(%esp),%edi - xorl %ecx,%ecx - movl %esi,%edx - andl $1,%ebp - subl %edi,%edx - leal 4(%edi,%ebx,4),%eax - orl %edx,%ebp - movl (%edi),%edi - jz L007bn_sqr_mont - movl %eax,28(%esp) - movl (%esi),%eax - xorl %edx,%edx -.align 4,0x90 -L008mull: - movl %edx,%ebp - mull %edi - addl %eax,%ebp - leal 1(%ecx),%ecx - adcl $0,%edx - movl (%esi,%ecx,4),%eax - cmpl %ebx,%ecx - movl %ebp,28(%esp,%ecx,4) - jl L008mull - movl %edx,%ebp - mull %edi - movl 20(%esp),%edi - addl %ebp,%eax - movl 16(%esp),%esi - adcl $0,%edx - imull 32(%esp),%edi - movl %eax,32(%esp,%ebx,4) - xorl %ecx,%ecx - movl %edx,36(%esp,%ebx,4) - movl %ecx,40(%esp,%ebx,4) - movl (%esi),%eax - mull %edi - addl 32(%esp),%eax - movl 4(%esi),%eax - adcl $0,%edx - incl %ecx - jmp L0092ndmadd -.align 4,0x90 -L0101stmadd: - movl %edx,%ebp - mull %edi - addl 32(%esp,%ecx,4),%ebp - leal 1(%ecx),%ecx - adcl $0,%edx - addl %eax,%ebp - movl (%esi,%ecx,4),%eax - adcl $0,%edx - cmpl %ebx,%ecx - movl %ebp,28(%esp,%ecx,4) - jl L0101stmadd - movl %edx,%ebp - mull %edi - addl 32(%esp,%ebx,4),%eax - movl 20(%esp),%edi - adcl $0,%edx - movl 16(%esp),%esi - addl %eax,%ebp - adcl $0,%edx - imull 32(%esp),%edi - xorl %ecx,%ecx - addl 36(%esp,%ebx,4),%edx - movl %ebp,32(%esp,%ebx,4) - adcl $0,%ecx - movl (%esi),%eax - movl %edx,36(%esp,%ebx,4) - movl %ecx,40(%esp,%ebx,4) - mull %edi - addl 32(%esp),%eax - movl 4(%esi),%eax - adcl $0,%edx - movl $1,%ecx -.align 4,0x90 -L0092ndmadd: - movl %edx,%ebp - mull %edi - addl 32(%esp,%ecx,4),%ebp - leal 1(%ecx),%ecx - adcl $0,%edx - addl %eax,%ebp - movl (%esi,%ecx,4),%eax - adcl $0,%edx - cmpl %ebx,%ecx - movl %ebp,24(%esp,%ecx,4) - jl L0092ndmadd - movl %edx,%ebp - mull %edi - addl 32(%esp,%ebx,4),%ebp - adcl $0,%edx - addl %eax,%ebp - adcl $0,%edx - movl %ebp,28(%esp,%ebx,4) - xorl %eax,%eax - movl 12(%esp),%ecx - addl 36(%esp,%ebx,4),%edx - adcl 40(%esp,%ebx,4),%eax - leal 4(%ecx),%ecx - movl %edx,32(%esp,%ebx,4) - cmpl 28(%esp),%ecx - movl %eax,36(%esp,%ebx,4) - je L006common_tail - movl (%ecx),%edi - movl 8(%esp),%esi - movl %ecx,12(%esp) - xorl %ecx,%ecx - xorl %edx,%edx - movl (%esi),%eax - jmp L0101stmadd -.align 4,0x90 -L007bn_sqr_mont: - movl %ebx,(%esp) - movl %ecx,12(%esp) - movl %edi,%eax - mull %edi - movl %eax,32(%esp) - movl %edx,%ebx - shrl $1,%edx - andl $1,%ebx - incl %ecx -.align 4,0x90 -L011sqr: - movl (%esi,%ecx,4),%eax - movl %edx,%ebp - mull %edi - addl %ebp,%eax - leal 1(%ecx),%ecx - adcl $0,%edx - leal (%ebx,%eax,2),%ebp - shrl $31,%eax - cmpl (%esp),%ecx - movl %eax,%ebx - movl %ebp,28(%esp,%ecx,4) - jl L011sqr - movl (%esi,%ecx,4),%eax - movl %edx,%ebp - mull %edi - addl %ebp,%eax - movl 20(%esp),%edi - adcl $0,%edx - movl 16(%esp),%esi - leal (%ebx,%eax,2),%ebp - imull 32(%esp),%edi - shrl $31,%eax - movl %ebp,32(%esp,%ecx,4) - leal (%eax,%edx,2),%ebp - movl (%esi),%eax - shrl $31,%edx - movl %ebp,36(%esp,%ecx,4) - movl %edx,40(%esp,%ecx,4) - mull %edi - addl 32(%esp),%eax - movl %ecx,%ebx - adcl $0,%edx - movl 4(%esi),%eax - movl $1,%ecx -.align 4,0x90 -L0123rdmadd: - movl %edx,%ebp - mull %edi - addl 32(%esp,%ecx,4),%ebp - adcl $0,%edx - addl %eax,%ebp - movl 4(%esi,%ecx,4),%eax - adcl $0,%edx - movl %ebp,28(%esp,%ecx,4) - movl %edx,%ebp - mull %edi - addl 36(%esp,%ecx,4),%ebp - leal 2(%ecx),%ecx - adcl $0,%edx - addl %eax,%ebp - movl (%esi,%ecx,4),%eax - adcl $0,%edx - cmpl %ebx,%ecx - movl %ebp,24(%esp,%ecx,4) - jl L0123rdmadd - movl %edx,%ebp - mull %edi - addl 32(%esp,%ebx,4),%ebp - adcl $0,%edx - addl %eax,%ebp - adcl $0,%edx - movl %ebp,28(%esp,%ebx,4) - movl 12(%esp),%ecx - xorl %eax,%eax - movl 8(%esp),%esi - addl 36(%esp,%ebx,4),%edx - adcl 40(%esp,%ebx,4),%eax - movl %edx,32(%esp,%ebx,4) - cmpl %ebx,%ecx - movl %eax,36(%esp,%ebx,4) - je L006common_tail - movl 4(%esi,%ecx,4),%edi - leal 1(%ecx),%ecx - movl %edi,%eax - movl %ecx,12(%esp) - mull %edi - addl 32(%esp,%ecx,4),%eax - adcl $0,%edx - movl %eax,32(%esp,%ecx,4) - xorl %ebp,%ebp - cmpl %ebx,%ecx - leal 1(%ecx),%ecx - je L013sqrlast - movl %edx,%ebx - shrl $1,%edx - andl $1,%ebx -.align 4,0x90 -L014sqradd: - movl (%esi,%ecx,4),%eax - movl %edx,%ebp - mull %edi - addl %ebp,%eax - leal (%eax,%eax,1),%ebp - adcl $0,%edx - shrl $31,%eax - addl 32(%esp,%ecx,4),%ebp - leal 1(%ecx),%ecx - adcl $0,%eax - addl %ebx,%ebp - adcl $0,%eax - cmpl (%esp),%ecx - movl %ebp,28(%esp,%ecx,4) - movl %eax,%ebx - jle L014sqradd - movl %edx,%ebp - addl %edx,%edx - shrl $31,%ebp - addl %ebx,%edx - adcl $0,%ebp -L013sqrlast: - movl 20(%esp),%edi - movl 16(%esp),%esi - imull 32(%esp),%edi - addl 32(%esp,%ecx,4),%edx - movl (%esi),%eax - adcl $0,%ebp - movl %edx,32(%esp,%ecx,4) - movl %ebp,36(%esp,%ecx,4) - mull %edi - addl 32(%esp),%eax - leal -1(%ecx),%ebx - adcl $0,%edx - movl $1,%ecx - movl 4(%esi),%eax - jmp L0123rdmadd -.align 4,0x90 -L006common_tail: - movl 16(%esp),%ebp - movl 4(%esp),%edi - leal 32(%esp),%esi - movl (%esi),%eax - movl %ebx,%ecx - xorl %edx,%edx -.align 4,0x90 -L015sub: - sbbl (%ebp,%edx,4),%eax - movl %eax,(%edi,%edx,4) - decl %ecx - movl 4(%esi,%edx,4),%eax - leal 1(%edx),%edx - jge L015sub - sbbl $0,%eax -.align 4,0x90 -L016copy: - movl (%esi,%ebx,4),%edx - movl (%edi,%ebx,4),%ebp - xorl %ebp,%edx - andl %eax,%edx - xorl %ebp,%edx - movl %ecx,(%esi,%ebx,4) - movl %edx,(%edi,%ebx,4) - decl %ebx - jge L016copy - movl 24(%esp),%esp - movl $1,%eax -L000just_leave: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.byte 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105 -.byte 112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56 -.byte 54,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121 -.byte 32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46 -.byte 111,114,103,62,0 -.section __IMPORT,__pointers,non_lazy_symbol_pointers -L_OPENSSL_ia32cap_P$non_lazy_ptr: -.indirect_symbol _OPENSSL_ia32cap_P -.long 0 -#endif diff --git a/third_party/boringssl/mac-x86/crypto/cpu-x86-asm.S b/third_party/boringssl/mac-x86/crypto/cpu-x86-asm.S deleted file mode 100644 index bfb292c893818..0000000000000 --- a/third_party/boringssl/mac-x86/crypto/cpu-x86-asm.S +++ /dev/null @@ -1,309 +0,0 @@ -#if defined(__i386__) -.file "crypto/cpu-x86-asm.S" -.text -.globl _OPENSSL_ia32_cpuid -.private_extern _OPENSSL_ia32_cpuid -.align 4 -_OPENSSL_ia32_cpuid: -L_OPENSSL_ia32_cpuid_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - xorl %edx,%edx - pushfl - popl %eax - movl %eax,%ecx - xorl $2097152,%eax - pushl %eax - popfl - pushfl - popl %eax - xorl %eax,%ecx - xorl %eax,%eax - btl $21,%ecx - jnc L000nocpuid - movl 20(%esp),%esi - movl %eax,8(%esi) - .byte 0x0f,0xa2 - movl %eax,%edi - xorl %eax,%eax - cmpl $1970169159,%ebx - setne %al - movl %eax,%ebp - cmpl $1231384169,%edx - setne %al - orl %eax,%ebp - cmpl $1818588270,%ecx - setne %al - orl %eax,%ebp - jz L001intel - cmpl $1752462657,%ebx - setne %al - movl %eax,%esi - cmpl $1769238117,%edx - setne %al - orl %eax,%esi - cmpl $1145913699,%ecx - setne %al - orl %eax,%esi - jnz L001intel - movl $2147483648,%eax - .byte 0x0f,0xa2 - cmpl $2147483649,%eax - jb L001intel - movl %eax,%esi - movl $2147483649,%eax - .byte 0x0f,0xa2 - orl %ecx,%ebp - andl $2049,%ebp - cmpl $2147483656,%esi - jb L001intel - movl $2147483656,%eax - .byte 0x0f,0xa2 - movzbl %cl,%esi - incl %esi - movl $1,%eax - xorl %ecx,%ecx - .byte 0x0f,0xa2 - btl $28,%edx - jnc L002generic - shrl $16,%ebx - andl $255,%ebx - cmpl %esi,%ebx - ja L002generic - andl $4026531839,%edx - jmp L002generic -L001intel: - cmpl $7,%edi - jb L003cacheinfo - movl 20(%esp),%esi - movl $7,%eax - xorl %ecx,%ecx - .byte 0x0f,0xa2 - movl %ebx,8(%esi) -L003cacheinfo: - cmpl $4,%edi - movl $-1,%edi - jb L004nocacheinfo - movl $4,%eax - movl $0,%ecx - .byte 0x0f,0xa2 - movl %eax,%edi - shrl $14,%edi - andl $4095,%edi -L004nocacheinfo: - movl $1,%eax - xorl %ecx,%ecx - .byte 0x0f,0xa2 - andl $3220176895,%edx - cmpl $0,%ebp - jne L005notintel - orl $1073741824,%edx -L005notintel: - btl $28,%edx - jnc L002generic - andl $4026531839,%edx - cmpl $0,%edi - je L002generic - orl $268435456,%edx - shrl $16,%ebx - cmpb $1,%bl - ja L002generic - andl $4026531839,%edx -L002generic: - andl $2048,%ebp - andl $4294965247,%ecx - movl %edx,%esi - orl %ecx,%ebp - btl $27,%ecx - jnc L006clear_avx - xorl %ecx,%ecx -.byte 15,1,208 - andl $6,%eax - cmpl $6,%eax - je L007done - cmpl $2,%eax - je L006clear_avx -L008clear_xmm: - andl $4261412861,%ebp - andl $4278190079,%esi -L006clear_avx: - andl $4026525695,%ebp - movl 20(%esp),%edi - andl $4294967263,8(%edi) -L007done: - movl %esi,%eax - movl %ebp,%edx -L000nocpuid: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _OPENSSL_rdtsc -.private_extern _OPENSSL_rdtsc -.align 4 -_OPENSSL_rdtsc: -L_OPENSSL_rdtsc_begin: - xorl %eax,%eax - xorl %edx,%edx - call L009PIC_me_up -L009PIC_me_up: - popl %ecx - movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L009PIC_me_up(%ecx),%ecx - btl $4,(%ecx) - jnc L010notsc - .byte 0x0f,0x31 -L010notsc: - ret -.globl _OPENSSL_instrument_halt -.private_extern _OPENSSL_instrument_halt -.align 4 -_OPENSSL_instrument_halt: -L_OPENSSL_instrument_halt_begin: - call L011PIC_me_up -L011PIC_me_up: - popl %ecx - movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L011PIC_me_up(%ecx),%ecx - btl $4,(%ecx) - jnc L012nohalt -.long 2421723150 - andl $3,%eax - jnz L012nohalt - pushfl - popl %eax - btl $9,%eax - jnc L012nohalt - .byte 0x0f,0x31 - pushl %edx - pushl %eax - hlt - .byte 0x0f,0x31 - subl (%esp),%eax - sbbl 4(%esp),%edx - addl $8,%esp - ret -L012nohalt: - xorl %eax,%eax - xorl %edx,%edx - ret -.globl _OPENSSL_far_spin -.private_extern _OPENSSL_far_spin -.align 4 -_OPENSSL_far_spin: -L_OPENSSL_far_spin_begin: - pushfl - popl %eax - btl $9,%eax - jnc L013nospin - movl 4(%esp),%eax - movl 8(%esp),%ecx -.long 2430111262 - xorl %eax,%eax - movl (%ecx),%edx - jmp L014spin -.align 4,0x90 -L014spin: - incl %eax - cmpl (%ecx),%edx - je L014spin -.long 529567888 - ret -L013nospin: - xorl %eax,%eax - xorl %edx,%edx - ret -.globl _OPENSSL_wipe_cpu -.private_extern _OPENSSL_wipe_cpu -.align 4 -_OPENSSL_wipe_cpu: -L_OPENSSL_wipe_cpu_begin: - xorl %eax,%eax - xorl %edx,%edx - call L015PIC_me_up -L015PIC_me_up: - popl %ecx - movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L015PIC_me_up(%ecx),%ecx - movl (%ecx),%ecx - btl $1,(%ecx) - jnc L016no_x87 - andl $83886080,%ecx - cmpl $83886080,%ecx - jne L017no_sse2 - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 -L017no_sse2: -.long 4007259865,4007259865,4007259865,4007259865,2430851995 -L016no_x87: - leal 4(%esp),%eax - ret -.globl _OPENSSL_atomic_add -.private_extern _OPENSSL_atomic_add -.align 4 -_OPENSSL_atomic_add: -L_OPENSSL_atomic_add_begin: - movl 4(%esp),%edx - movl 8(%esp),%ecx - pushl %ebx - nop - movl (%edx),%eax -L018spin: - leal (%eax,%ecx,1),%ebx - nop -.long 447811568 - jne L018spin - movl %ebx,%eax - popl %ebx - ret -.globl _OPENSSL_indirect_call -.private_extern _OPENSSL_indirect_call -.align 4 -_OPENSSL_indirect_call: -L_OPENSSL_indirect_call_begin: - pushl %ebp - movl %esp,%ebp - subl $28,%esp - movl 12(%ebp),%ecx - movl %ecx,(%esp) - movl 16(%ebp),%edx - movl %edx,4(%esp) - movl 20(%ebp),%eax - movl %eax,8(%esp) - movl 24(%ebp),%eax - movl %eax,12(%esp) - movl 28(%ebp),%eax - movl %eax,16(%esp) - movl 32(%ebp),%eax - movl %eax,20(%esp) - movl 36(%ebp),%eax - movl %eax,24(%esp) - call *8(%ebp) - movl %ebp,%esp - popl %ebp - ret -.globl _OPENSSL_ia32_rdrand -.private_extern _OPENSSL_ia32_rdrand -.align 4 -_OPENSSL_ia32_rdrand: -L_OPENSSL_ia32_rdrand_begin: - movl $8,%ecx -L019loop: -.byte 15,199,240 - jc L020break - loop L019loop -L020break: - cmpl $0,%eax - cmovel %ecx,%eax - ret -.section __IMPORT,__pointers,non_lazy_symbol_pointers -L_OPENSSL_ia32cap_P$non_lazy_ptr: -.indirect_symbol _OPENSSL_ia32cap_P -.long 0 -#endif diff --git a/third_party/boringssl/mac-x86/crypto/md5/md5-586.S b/third_party/boringssl/mac-x86/crypto/md5/md5-586.S deleted file mode 100644 index 6830b16410afc..0000000000000 --- a/third_party/boringssl/mac-x86/crypto/md5/md5-586.S +++ /dev/null @@ -1,680 +0,0 @@ -#if defined(__i386__) -.file "src/crypto/md5/asm/md5-586.S" -.text -.globl _md5_block_asm_data_order -.private_extern _md5_block_asm_data_order -.align 4 -_md5_block_asm_data_order: -L_md5_block_asm_data_order_begin: - pushl %esi - pushl %edi - movl 12(%esp),%edi - movl 16(%esp),%esi - movl 20(%esp),%ecx - pushl %ebp - shll $6,%ecx - pushl %ebx - addl %esi,%ecx - subl $64,%ecx - movl (%edi),%eax - pushl %ecx - movl 4(%edi),%ebx - movl 8(%edi),%ecx - movl 12(%edi),%edx -L000start: - - # R0 section - movl %ecx,%edi - movl (%esi),%ebp - # R0 0 - xorl %edx,%edi - andl %ebx,%edi - leal 3614090360(%eax,%ebp,1),%eax - xorl %edx,%edi - addl %edi,%eax - movl %ebx,%edi - roll $7,%eax - movl 4(%esi),%ebp - addl %ebx,%eax - # R0 1 - xorl %ecx,%edi - andl %eax,%edi - leal 3905402710(%edx,%ebp,1),%edx - xorl %ecx,%edi - addl %edi,%edx - movl %eax,%edi - roll $12,%edx - movl 8(%esi),%ebp - addl %eax,%edx - # R0 2 - xorl %ebx,%edi - andl %edx,%edi - leal 606105819(%ecx,%ebp,1),%ecx - xorl %ebx,%edi - addl %edi,%ecx - movl %edx,%edi - roll $17,%ecx - movl 12(%esi),%ebp - addl %edx,%ecx - # R0 3 - xorl %eax,%edi - andl %ecx,%edi - leal 3250441966(%ebx,%ebp,1),%ebx - xorl %eax,%edi - addl %edi,%ebx - movl %ecx,%edi - roll $22,%ebx - movl 16(%esi),%ebp - addl %ecx,%ebx - # R0 4 - xorl %edx,%edi - andl %ebx,%edi - leal 4118548399(%eax,%ebp,1),%eax - xorl %edx,%edi - addl %edi,%eax - movl %ebx,%edi - roll $7,%eax - movl 20(%esi),%ebp - addl %ebx,%eax - # R0 5 - xorl %ecx,%edi - andl %eax,%edi - leal 1200080426(%edx,%ebp,1),%edx - xorl %ecx,%edi - addl %edi,%edx - movl %eax,%edi - roll $12,%edx - movl 24(%esi),%ebp - addl %eax,%edx - # R0 6 - xorl %ebx,%edi - andl %edx,%edi - leal 2821735955(%ecx,%ebp,1),%ecx - xorl %ebx,%edi - addl %edi,%ecx - movl %edx,%edi - roll $17,%ecx - movl 28(%esi),%ebp - addl %edx,%ecx - # R0 7 - xorl %eax,%edi - andl %ecx,%edi - leal 4249261313(%ebx,%ebp,1),%ebx - xorl %eax,%edi - addl %edi,%ebx - movl %ecx,%edi - roll $22,%ebx - movl 32(%esi),%ebp - addl %ecx,%ebx - # R0 8 - xorl %edx,%edi - andl %ebx,%edi - leal 1770035416(%eax,%ebp,1),%eax - xorl %edx,%edi - addl %edi,%eax - movl %ebx,%edi - roll $7,%eax - movl 36(%esi),%ebp - addl %ebx,%eax - # R0 9 - xorl %ecx,%edi - andl %eax,%edi - leal 2336552879(%edx,%ebp,1),%edx - xorl %ecx,%edi - addl %edi,%edx - movl %eax,%edi - roll $12,%edx - movl 40(%esi),%ebp - addl %eax,%edx - # R0 10 - xorl %ebx,%edi - andl %edx,%edi - leal 4294925233(%ecx,%ebp,1),%ecx - xorl %ebx,%edi - addl %edi,%ecx - movl %edx,%edi - roll $17,%ecx - movl 44(%esi),%ebp - addl %edx,%ecx - # R0 11 - xorl %eax,%edi - andl %ecx,%edi - leal 2304563134(%ebx,%ebp,1),%ebx - xorl %eax,%edi - addl %edi,%ebx - movl %ecx,%edi - roll $22,%ebx - movl 48(%esi),%ebp - addl %ecx,%ebx - # R0 12 - xorl %edx,%edi - andl %ebx,%edi - leal 1804603682(%eax,%ebp,1),%eax - xorl %edx,%edi - addl %edi,%eax - movl %ebx,%edi - roll $7,%eax - movl 52(%esi),%ebp - addl %ebx,%eax - # R0 13 - xorl %ecx,%edi - andl %eax,%edi - leal 4254626195(%edx,%ebp,1),%edx - xorl %ecx,%edi - addl %edi,%edx - movl %eax,%edi - roll $12,%edx - movl 56(%esi),%ebp - addl %eax,%edx - # R0 14 - xorl %ebx,%edi - andl %edx,%edi - leal 2792965006(%ecx,%ebp,1),%ecx - xorl %ebx,%edi - addl %edi,%ecx - movl %edx,%edi - roll $17,%ecx - movl 60(%esi),%ebp - addl %edx,%ecx - # R0 15 - xorl %eax,%edi - andl %ecx,%edi - leal 1236535329(%ebx,%ebp,1),%ebx - xorl %eax,%edi - addl %edi,%ebx - movl %ecx,%edi - roll $22,%ebx - movl 4(%esi),%ebp - addl %ecx,%ebx - - # R1 section - # R1 16 - leal 4129170786(%eax,%ebp,1),%eax - xorl %ebx,%edi - andl %edx,%edi - movl 24(%esi),%ebp - xorl %ecx,%edi - addl %edi,%eax - movl %ebx,%edi - roll $5,%eax - addl %ebx,%eax - # R1 17 - leal 3225465664(%edx,%ebp,1),%edx - xorl %eax,%edi - andl %ecx,%edi - movl 44(%esi),%ebp - xorl %ebx,%edi - addl %edi,%edx - movl %eax,%edi - roll $9,%edx - addl %eax,%edx - # R1 18 - leal 643717713(%ecx,%ebp,1),%ecx - xorl %edx,%edi - andl %ebx,%edi - movl (%esi),%ebp - xorl %eax,%edi - addl %edi,%ecx - movl %edx,%edi - roll $14,%ecx - addl %edx,%ecx - # R1 19 - leal 3921069994(%ebx,%ebp,1),%ebx - xorl %ecx,%edi - andl %eax,%edi - movl 20(%esi),%ebp - xorl %edx,%edi - addl %edi,%ebx - movl %ecx,%edi - roll $20,%ebx - addl %ecx,%ebx - # R1 20 - leal 3593408605(%eax,%ebp,1),%eax - xorl %ebx,%edi - andl %edx,%edi - movl 40(%esi),%ebp - xorl %ecx,%edi - addl %edi,%eax - movl %ebx,%edi - roll $5,%eax - addl %ebx,%eax - # R1 21 - leal 38016083(%edx,%ebp,1),%edx - xorl %eax,%edi - andl %ecx,%edi - movl 60(%esi),%ebp - xorl %ebx,%edi - addl %edi,%edx - movl %eax,%edi - roll $9,%edx - addl %eax,%edx - # R1 22 - leal 3634488961(%ecx,%ebp,1),%ecx - xorl %edx,%edi - andl %ebx,%edi - movl 16(%esi),%ebp - xorl %eax,%edi - addl %edi,%ecx - movl %edx,%edi - roll $14,%ecx - addl %edx,%ecx - # R1 23 - leal 3889429448(%ebx,%ebp,1),%ebx - xorl %ecx,%edi - andl %eax,%edi - movl 36(%esi),%ebp - xorl %edx,%edi - addl %edi,%ebx - movl %ecx,%edi - roll $20,%ebx - addl %ecx,%ebx - # R1 24 - leal 568446438(%eax,%ebp,1),%eax - xorl %ebx,%edi - andl %edx,%edi - movl 56(%esi),%ebp - xorl %ecx,%edi - addl %edi,%eax - movl %ebx,%edi - roll $5,%eax - addl %ebx,%eax - # R1 25 - leal 3275163606(%edx,%ebp,1),%edx - xorl %eax,%edi - andl %ecx,%edi - movl 12(%esi),%ebp - xorl %ebx,%edi - addl %edi,%edx - movl %eax,%edi - roll $9,%edx - addl %eax,%edx - # R1 26 - leal 4107603335(%ecx,%ebp,1),%ecx - xorl %edx,%edi - andl %ebx,%edi - movl 32(%esi),%ebp - xorl %eax,%edi - addl %edi,%ecx - movl %edx,%edi - roll $14,%ecx - addl %edx,%ecx - # R1 27 - leal 1163531501(%ebx,%ebp,1),%ebx - xorl %ecx,%edi - andl %eax,%edi - movl 52(%esi),%ebp - xorl %edx,%edi - addl %edi,%ebx - movl %ecx,%edi - roll $20,%ebx - addl %ecx,%ebx - # R1 28 - leal 2850285829(%eax,%ebp,1),%eax - xorl %ebx,%edi - andl %edx,%edi - movl 8(%esi),%ebp - xorl %ecx,%edi - addl %edi,%eax - movl %ebx,%edi - roll $5,%eax - addl %ebx,%eax - # R1 29 - leal 4243563512(%edx,%ebp,1),%edx - xorl %eax,%edi - andl %ecx,%edi - movl 28(%esi),%ebp - xorl %ebx,%edi - addl %edi,%edx - movl %eax,%edi - roll $9,%edx - addl %eax,%edx - # R1 30 - leal 1735328473(%ecx,%ebp,1),%ecx - xorl %edx,%edi - andl %ebx,%edi - movl 48(%esi),%ebp - xorl %eax,%edi - addl %edi,%ecx - movl %edx,%edi - roll $14,%ecx - addl %edx,%ecx - # R1 31 - leal 2368359562(%ebx,%ebp,1),%ebx - xorl %ecx,%edi - andl %eax,%edi - movl 20(%esi),%ebp - xorl %edx,%edi - addl %edi,%ebx - movl %ecx,%edi - roll $20,%ebx - addl %ecx,%ebx - - # R2 section - # R2 32 - xorl %edx,%edi - xorl %ebx,%edi - leal 4294588738(%eax,%ebp,1),%eax - addl %edi,%eax - roll $4,%eax - movl 32(%esi),%ebp - movl %ebx,%edi - # R2 33 - leal 2272392833(%edx,%ebp,1),%edx - addl %ebx,%eax - xorl %ecx,%edi - xorl %eax,%edi - movl 44(%esi),%ebp - addl %edi,%edx - movl %eax,%edi - roll $11,%edx - addl %eax,%edx - # R2 34 - xorl %ebx,%edi - xorl %edx,%edi - leal 1839030562(%ecx,%ebp,1),%ecx - addl %edi,%ecx - roll $16,%ecx - movl 56(%esi),%ebp - movl %edx,%edi - # R2 35 - leal 4259657740(%ebx,%ebp,1),%ebx - addl %edx,%ecx - xorl %eax,%edi - xorl %ecx,%edi - movl 4(%esi),%ebp - addl %edi,%ebx - movl %ecx,%edi - roll $23,%ebx - addl %ecx,%ebx - # R2 36 - xorl %edx,%edi - xorl %ebx,%edi - leal 2763975236(%eax,%ebp,1),%eax - addl %edi,%eax - roll $4,%eax - movl 16(%esi),%ebp - movl %ebx,%edi - # R2 37 - leal 1272893353(%edx,%ebp,1),%edx - addl %ebx,%eax - xorl %ecx,%edi - xorl %eax,%edi - movl 28(%esi),%ebp - addl %edi,%edx - movl %eax,%edi - roll $11,%edx - addl %eax,%edx - # R2 38 - xorl %ebx,%edi - xorl %edx,%edi - leal 4139469664(%ecx,%ebp,1),%ecx - addl %edi,%ecx - roll $16,%ecx - movl 40(%esi),%ebp - movl %edx,%edi - # R2 39 - leal 3200236656(%ebx,%ebp,1),%ebx - addl %edx,%ecx - xorl %eax,%edi - xorl %ecx,%edi - movl 52(%esi),%ebp - addl %edi,%ebx - movl %ecx,%edi - roll $23,%ebx - addl %ecx,%ebx - # R2 40 - xorl %edx,%edi - xorl %ebx,%edi - leal 681279174(%eax,%ebp,1),%eax - addl %edi,%eax - roll $4,%eax - movl (%esi),%ebp - movl %ebx,%edi - # R2 41 - leal 3936430074(%edx,%ebp,1),%edx - addl %ebx,%eax - xorl %ecx,%edi - xorl %eax,%edi - movl 12(%esi),%ebp - addl %edi,%edx - movl %eax,%edi - roll $11,%edx - addl %eax,%edx - # R2 42 - xorl %ebx,%edi - xorl %edx,%edi - leal 3572445317(%ecx,%ebp,1),%ecx - addl %edi,%ecx - roll $16,%ecx - movl 24(%esi),%ebp - movl %edx,%edi - # R2 43 - leal 76029189(%ebx,%ebp,1),%ebx - addl %edx,%ecx - xorl %eax,%edi - xorl %ecx,%edi - movl 36(%esi),%ebp - addl %edi,%ebx - movl %ecx,%edi - roll $23,%ebx - addl %ecx,%ebx - # R2 44 - xorl %edx,%edi - xorl %ebx,%edi - leal 3654602809(%eax,%ebp,1),%eax - addl %edi,%eax - roll $4,%eax - movl 48(%esi),%ebp - movl %ebx,%edi - # R2 45 - leal 3873151461(%edx,%ebp,1),%edx - addl %ebx,%eax - xorl %ecx,%edi - xorl %eax,%edi - movl 60(%esi),%ebp - addl %edi,%edx - movl %eax,%edi - roll $11,%edx - addl %eax,%edx - # R2 46 - xorl %ebx,%edi - xorl %edx,%edi - leal 530742520(%ecx,%ebp,1),%ecx - addl %edi,%ecx - roll $16,%ecx - movl 8(%esi),%ebp - movl %edx,%edi - # R2 47 - leal 3299628645(%ebx,%ebp,1),%ebx - addl %edx,%ecx - xorl %eax,%edi - xorl %ecx,%edi - movl (%esi),%ebp - addl %edi,%ebx - movl $-1,%edi - roll $23,%ebx - addl %ecx,%ebx - - # R3 section - # R3 48 - xorl %edx,%edi - orl %ebx,%edi - leal 4096336452(%eax,%ebp,1),%eax - xorl %ecx,%edi - movl 28(%esi),%ebp - addl %edi,%eax - movl $-1,%edi - roll $6,%eax - xorl %ecx,%edi - addl %ebx,%eax - # R3 49 - orl %eax,%edi - leal 1126891415(%edx,%ebp,1),%edx - xorl %ebx,%edi - movl 56(%esi),%ebp - addl %edi,%edx - movl $-1,%edi - roll $10,%edx - xorl %ebx,%edi - addl %eax,%edx - # R3 50 - orl %edx,%edi - leal 2878612391(%ecx,%ebp,1),%ecx - xorl %eax,%edi - movl 20(%esi),%ebp - addl %edi,%ecx - movl $-1,%edi - roll $15,%ecx - xorl %eax,%edi - addl %edx,%ecx - # R3 51 - orl %ecx,%edi - leal 4237533241(%ebx,%ebp,1),%ebx - xorl %edx,%edi - movl 48(%esi),%ebp - addl %edi,%ebx - movl $-1,%edi - roll $21,%ebx - xorl %edx,%edi - addl %ecx,%ebx - # R3 52 - orl %ebx,%edi - leal 1700485571(%eax,%ebp,1),%eax - xorl %ecx,%edi - movl 12(%esi),%ebp - addl %edi,%eax - movl $-1,%edi - roll $6,%eax - xorl %ecx,%edi - addl %ebx,%eax - # R3 53 - orl %eax,%edi - leal 2399980690(%edx,%ebp,1),%edx - xorl %ebx,%edi - movl 40(%esi),%ebp - addl %edi,%edx - movl $-1,%edi - roll $10,%edx - xorl %ebx,%edi - addl %eax,%edx - # R3 54 - orl %edx,%edi - leal 4293915773(%ecx,%ebp,1),%ecx - xorl %eax,%edi - movl 4(%esi),%ebp - addl %edi,%ecx - movl $-1,%edi - roll $15,%ecx - xorl %eax,%edi - addl %edx,%ecx - # R3 55 - orl %ecx,%edi - leal 2240044497(%ebx,%ebp,1),%ebx - xorl %edx,%edi - movl 32(%esi),%ebp - addl %edi,%ebx - movl $-1,%edi - roll $21,%ebx - xorl %edx,%edi - addl %ecx,%ebx - # R3 56 - orl %ebx,%edi - leal 1873313359(%eax,%ebp,1),%eax - xorl %ecx,%edi - movl 60(%esi),%ebp - addl %edi,%eax - movl $-1,%edi - roll $6,%eax - xorl %ecx,%edi - addl %ebx,%eax - # R3 57 - orl %eax,%edi - leal 4264355552(%edx,%ebp,1),%edx - xorl %ebx,%edi - movl 24(%esi),%ebp - addl %edi,%edx - movl $-1,%edi - roll $10,%edx - xorl %ebx,%edi - addl %eax,%edx - # R3 58 - orl %edx,%edi - leal 2734768916(%ecx,%ebp,1),%ecx - xorl %eax,%edi - movl 52(%esi),%ebp - addl %edi,%ecx - movl $-1,%edi - roll $15,%ecx - xorl %eax,%edi - addl %edx,%ecx - # R3 59 - orl %ecx,%edi - leal 1309151649(%ebx,%ebp,1),%ebx - xorl %edx,%edi - movl 16(%esi),%ebp - addl %edi,%ebx - movl $-1,%edi - roll $21,%ebx - xorl %edx,%edi - addl %ecx,%ebx - # R3 60 - orl %ebx,%edi - leal 4149444226(%eax,%ebp,1),%eax - xorl %ecx,%edi - movl 44(%esi),%ebp - addl %edi,%eax - movl $-1,%edi - roll $6,%eax - xorl %ecx,%edi - addl %ebx,%eax - # R3 61 - orl %eax,%edi - leal 3174756917(%edx,%ebp,1),%edx - xorl %ebx,%edi - movl 8(%esi),%ebp - addl %edi,%edx - movl $-1,%edi - roll $10,%edx - xorl %ebx,%edi - addl %eax,%edx - # R3 62 - orl %edx,%edi - leal 718787259(%ecx,%ebp,1),%ecx - xorl %eax,%edi - movl 36(%esi),%ebp - addl %edi,%ecx - movl $-1,%edi - roll $15,%ecx - xorl %eax,%edi - addl %edx,%ecx - # R3 63 - orl %ecx,%edi - leal 3951481745(%ebx,%ebp,1),%ebx - xorl %edx,%edi - movl 24(%esp),%ebp - addl %edi,%ebx - addl $64,%esi - roll $21,%ebx - movl (%ebp),%edi - addl %ecx,%ebx - addl %edi,%eax - movl 4(%ebp),%edi - addl %edi,%ebx - movl 8(%ebp),%edi - addl %edi,%ecx - movl 12(%ebp),%edi - addl %edi,%edx - movl %eax,(%ebp) - movl %ebx,4(%ebp) - movl (%esp),%edi - movl %ecx,8(%ebp) - movl %edx,12(%ebp) - cmpl %esi,%edi - jae L000start - popl %eax - popl %ebx - popl %ebp - popl %edi - popl %esi - ret -#endif diff --git a/third_party/boringssl/mac-x86/crypto/modes/ghash-x86.S b/third_party/boringssl/mac-x86/crypto/modes/ghash-x86.S deleted file mode 100644 index 8693b82a1345e..0000000000000 --- a/third_party/boringssl/mac-x86/crypto/modes/ghash-x86.S +++ /dev/null @@ -1,1260 +0,0 @@ -#if defined(__i386__) -.file "ghash-x86.S" -.text -.globl _gcm_gmult_4bit_x86 -.private_extern _gcm_gmult_4bit_x86 -.align 4 -_gcm_gmult_4bit_x86: -L_gcm_gmult_4bit_x86_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - subl $84,%esp - movl 104(%esp),%edi - movl 108(%esp),%esi - movl (%edi),%ebp - movl 4(%edi),%edx - movl 8(%edi),%ecx - movl 12(%edi),%ebx - movl $0,16(%esp) - movl $471859200,20(%esp) - movl $943718400,24(%esp) - movl $610271232,28(%esp) - movl $1887436800,32(%esp) - movl $1822425088,36(%esp) - movl $1220542464,40(%esp) - movl $1423966208,44(%esp) - movl $3774873600,48(%esp) - movl $4246732800,52(%esp) - movl $3644850176,56(%esp) - movl $3311403008,60(%esp) - movl $2441084928,64(%esp) - movl $2376073216,68(%esp) - movl $2847932416,72(%esp) - movl $3051356160,76(%esp) - movl %ebp,(%esp) - movl %edx,4(%esp) - movl %ecx,8(%esp) - movl %ebx,12(%esp) - shrl $20,%ebx - andl $240,%ebx - movl 4(%esi,%ebx,1),%ebp - movl (%esi,%ebx,1),%edx - movl 12(%esi,%ebx,1),%ecx - movl 8(%esi,%ebx,1),%ebx - xorl %eax,%eax - movl $15,%edi - jmp L000x86_loop -.align 4,0x90 -L000x86_loop: - movb %bl,%al - shrdl $4,%ecx,%ebx - andb $15,%al - shrdl $4,%edx,%ecx - shrdl $4,%ebp,%edx - shrl $4,%ebp - xorl 16(%esp,%eax,4),%ebp - movb (%esp,%edi,1),%al - andb $240,%al - xorl 8(%esi,%eax,1),%ebx - xorl 12(%esi,%eax,1),%ecx - xorl (%esi,%eax,1),%edx - xorl 4(%esi,%eax,1),%ebp - decl %edi - js L001x86_break - movb %bl,%al - shrdl $4,%ecx,%ebx - andb $15,%al - shrdl $4,%edx,%ecx - shrdl $4,%ebp,%edx - shrl $4,%ebp - xorl 16(%esp,%eax,4),%ebp - movb (%esp,%edi,1),%al - shlb $4,%al - xorl 8(%esi,%eax,1),%ebx - xorl 12(%esi,%eax,1),%ecx - xorl (%esi,%eax,1),%edx - xorl 4(%esi,%eax,1),%ebp - jmp L000x86_loop -.align 4,0x90 -L001x86_break: - bswap %ebx - bswap %ecx - bswap %edx - bswap %ebp - movl 104(%esp),%edi - movl %ebx,12(%edi) - movl %ecx,8(%edi) - movl %edx,4(%edi) - movl %ebp,(%edi) - addl $84,%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _gcm_ghash_4bit_x86 -.private_extern _gcm_ghash_4bit_x86 -.align 4 -_gcm_ghash_4bit_x86: -L_gcm_ghash_4bit_x86_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - subl $84,%esp - movl 104(%esp),%ebx - movl 108(%esp),%esi - movl 112(%esp),%edi - movl 116(%esp),%ecx - addl %edi,%ecx - movl %ecx,116(%esp) - movl (%ebx),%ebp - movl 4(%ebx),%edx - movl 8(%ebx),%ecx - movl 12(%ebx),%ebx - movl $0,16(%esp) - movl $471859200,20(%esp) - movl $943718400,24(%esp) - movl $610271232,28(%esp) - movl $1887436800,32(%esp) - movl $1822425088,36(%esp) - movl $1220542464,40(%esp) - movl $1423966208,44(%esp) - movl $3774873600,48(%esp) - movl $4246732800,52(%esp) - movl $3644850176,56(%esp) - movl $3311403008,60(%esp) - movl $2441084928,64(%esp) - movl $2376073216,68(%esp) - movl $2847932416,72(%esp) - movl $3051356160,76(%esp) -.align 4,0x90 -L002x86_outer_loop: - xorl 12(%edi),%ebx - xorl 8(%edi),%ecx - xorl 4(%edi),%edx - xorl (%edi),%ebp - movl %ebx,12(%esp) - movl %ecx,8(%esp) - movl %edx,4(%esp) - movl %ebp,(%esp) - shrl $20,%ebx - andl $240,%ebx - movl 4(%esi,%ebx,1),%ebp - movl (%esi,%ebx,1),%edx - movl 12(%esi,%ebx,1),%ecx - movl 8(%esi,%ebx,1),%ebx - xorl %eax,%eax - movl $15,%edi - jmp L003x86_loop -.align 4,0x90 -L003x86_loop: - movb %bl,%al - shrdl $4,%ecx,%ebx - andb $15,%al - shrdl $4,%edx,%ecx - shrdl $4,%ebp,%edx - shrl $4,%ebp - xorl 16(%esp,%eax,4),%ebp - movb (%esp,%edi,1),%al - andb $240,%al - xorl 8(%esi,%eax,1),%ebx - xorl 12(%esi,%eax,1),%ecx - xorl (%esi,%eax,1),%edx - xorl 4(%esi,%eax,1),%ebp - decl %edi - js L004x86_break - movb %bl,%al - shrdl $4,%ecx,%ebx - andb $15,%al - shrdl $4,%edx,%ecx - shrdl $4,%ebp,%edx - shrl $4,%ebp - xorl 16(%esp,%eax,4),%ebp - movb (%esp,%edi,1),%al - shlb $4,%al - xorl 8(%esi,%eax,1),%ebx - xorl 12(%esi,%eax,1),%ecx - xorl (%esi,%eax,1),%edx - xorl 4(%esi,%eax,1),%ebp - jmp L003x86_loop -.align 4,0x90 -L004x86_break: - bswap %ebx - bswap %ecx - bswap %edx - bswap %ebp - movl 112(%esp),%edi - leal 16(%edi),%edi - cmpl 116(%esp),%edi - movl %edi,112(%esp) - jb L002x86_outer_loop - movl 104(%esp),%edi - movl %ebx,12(%edi) - movl %ecx,8(%edi) - movl %edx,4(%edi) - movl %ebp,(%edi) - addl $84,%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _gcm_gmult_4bit_mmx -.private_extern _gcm_gmult_4bit_mmx -.align 4 -_gcm_gmult_4bit_mmx: -L_gcm_gmult_4bit_mmx_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%edi - movl 24(%esp),%esi - call L005pic_point -L005pic_point: - popl %eax - leal Lrem_4bit-L005pic_point(%eax),%eax - movzbl 15(%edi),%ebx - xorl %ecx,%ecx - movl %ebx,%edx - movb %dl,%cl - movl $14,%ebp - shlb $4,%cl - andl $240,%edx - movq 8(%esi,%ecx,1),%mm0 - movq (%esi,%ecx,1),%mm1 - movd %mm0,%ebx - jmp L006mmx_loop -.align 4,0x90 -L006mmx_loop: - psrlq $4,%mm0 - andl $15,%ebx - movq %mm1,%mm2 - psrlq $4,%mm1 - pxor 8(%esi,%edx,1),%mm0 - movb (%edi,%ebp,1),%cl - psllq $60,%mm2 - pxor (%eax,%ebx,8),%mm1 - decl %ebp - movd %mm0,%ebx - pxor (%esi,%edx,1),%mm1 - movl %ecx,%edx - pxor %mm2,%mm0 - js L007mmx_break - shlb $4,%cl - andl $15,%ebx - psrlq $4,%mm0 - andl $240,%edx - movq %mm1,%mm2 - psrlq $4,%mm1 - pxor 8(%esi,%ecx,1),%mm0 - psllq $60,%mm2 - pxor (%eax,%ebx,8),%mm1 - movd %mm0,%ebx - pxor (%esi,%ecx,1),%mm1 - pxor %mm2,%mm0 - jmp L006mmx_loop -.align 4,0x90 -L007mmx_break: - shlb $4,%cl - andl $15,%ebx - psrlq $4,%mm0 - andl $240,%edx - movq %mm1,%mm2 - psrlq $4,%mm1 - pxor 8(%esi,%ecx,1),%mm0 - psllq $60,%mm2 - pxor (%eax,%ebx,8),%mm1 - movd %mm0,%ebx - pxor (%esi,%ecx,1),%mm1 - pxor %mm2,%mm0 - psrlq $4,%mm0 - andl $15,%ebx - movq %mm1,%mm2 - psrlq $4,%mm1 - pxor 8(%esi,%edx,1),%mm0 - psllq $60,%mm2 - pxor (%eax,%ebx,8),%mm1 - movd %mm0,%ebx - pxor (%esi,%edx,1),%mm1 - pxor %mm2,%mm0 - psrlq $32,%mm0 - movd %mm1,%edx - psrlq $32,%mm1 - movd %mm0,%ecx - movd %mm1,%ebp - bswap %ebx - bswap %edx - bswap %ecx - bswap %ebp - emms - movl %ebx,12(%edi) - movl %edx,4(%edi) - movl %ecx,8(%edi) - movl %ebp,(%edi) - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _gcm_ghash_4bit_mmx -.private_extern _gcm_ghash_4bit_mmx -.align 4 -_gcm_ghash_4bit_mmx: -L_gcm_ghash_4bit_mmx_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%eax - movl 24(%esp),%ebx - movl 28(%esp),%ecx - movl 32(%esp),%edx - movl %esp,%ebp - call L008pic_point -L008pic_point: - popl %esi - leal Lrem_8bit-L008pic_point(%esi),%esi - subl $544,%esp - andl $-64,%esp - subl $16,%esp - addl %ecx,%edx - movl %eax,544(%esp) - movl %edx,552(%esp) - movl %ebp,556(%esp) - addl $128,%ebx - leal 144(%esp),%edi - leal 400(%esp),%ebp - movl -120(%ebx),%edx - movq -120(%ebx),%mm0 - movq -128(%ebx),%mm3 - shll $4,%edx - movb %dl,(%esp) - movl -104(%ebx),%edx - movq -104(%ebx),%mm2 - movq -112(%ebx),%mm5 - movq %mm0,-128(%edi) - psrlq $4,%mm0 - movq %mm3,(%edi) - movq %mm3,%mm7 - psrlq $4,%mm3 - shll $4,%edx - movb %dl,1(%esp) - movl -88(%ebx),%edx - movq -88(%ebx),%mm1 - psllq $60,%mm7 - movq -96(%ebx),%mm4 - por %mm7,%mm0 - movq %mm2,-120(%edi) - psrlq $4,%mm2 - movq %mm5,8(%edi) - movq %mm5,%mm6 - movq %mm0,-128(%ebp) - psrlq $4,%mm5 - movq %mm3,(%ebp) - shll $4,%edx - movb %dl,2(%esp) - movl -72(%ebx),%edx - movq -72(%ebx),%mm0 - psllq $60,%mm6 - movq -80(%ebx),%mm3 - por %mm6,%mm2 - movq %mm1,-112(%edi) - psrlq $4,%mm1 - movq %mm4,16(%edi) - movq %mm4,%mm7 - movq %mm2,-120(%ebp) - psrlq $4,%mm4 - movq %mm5,8(%ebp) - shll $4,%edx - movb %dl,3(%esp) - movl -56(%ebx),%edx - movq -56(%ebx),%mm2 - psllq $60,%mm7 - movq -64(%ebx),%mm5 - por %mm7,%mm1 - movq %mm0,-104(%edi) - psrlq $4,%mm0 - movq %mm3,24(%edi) - movq %mm3,%mm6 - movq %mm1,-112(%ebp) - psrlq $4,%mm3 - movq %mm4,16(%ebp) - shll $4,%edx - movb %dl,4(%esp) - movl -40(%ebx),%edx - movq -40(%ebx),%mm1 - psllq $60,%mm6 - movq -48(%ebx),%mm4 - por %mm6,%mm0 - movq %mm2,-96(%edi) - psrlq $4,%mm2 - movq %mm5,32(%edi) - movq %mm5,%mm7 - movq %mm0,-104(%ebp) - psrlq $4,%mm5 - movq %mm3,24(%ebp) - shll $4,%edx - movb %dl,5(%esp) - movl -24(%ebx),%edx - movq -24(%ebx),%mm0 - psllq $60,%mm7 - movq -32(%ebx),%mm3 - por %mm7,%mm2 - movq %mm1,-88(%edi) - psrlq $4,%mm1 - movq %mm4,40(%edi) - movq %mm4,%mm6 - movq %mm2,-96(%ebp) - psrlq $4,%mm4 - movq %mm5,32(%ebp) - shll $4,%edx - movb %dl,6(%esp) - movl -8(%ebx),%edx - movq -8(%ebx),%mm2 - psllq $60,%mm6 - movq -16(%ebx),%mm5 - por %mm6,%mm1 - movq %mm0,-80(%edi) - psrlq $4,%mm0 - movq %mm3,48(%edi) - movq %mm3,%mm7 - movq %mm1,-88(%ebp) - psrlq $4,%mm3 - movq %mm4,40(%ebp) - shll $4,%edx - movb %dl,7(%esp) - movl 8(%ebx),%edx - movq 8(%ebx),%mm1 - psllq $60,%mm7 - movq (%ebx),%mm4 - por %mm7,%mm0 - movq %mm2,-72(%edi) - psrlq $4,%mm2 - movq %mm5,56(%edi) - movq %mm5,%mm6 - movq %mm0,-80(%ebp) - psrlq $4,%mm5 - movq %mm3,48(%ebp) - shll $4,%edx - movb %dl,8(%esp) - movl 24(%ebx),%edx - movq 24(%ebx),%mm0 - psllq $60,%mm6 - movq 16(%ebx),%mm3 - por %mm6,%mm2 - movq %mm1,-64(%edi) - psrlq $4,%mm1 - movq %mm4,64(%edi) - movq %mm4,%mm7 - movq %mm2,-72(%ebp) - psrlq $4,%mm4 - movq %mm5,56(%ebp) - shll $4,%edx - movb %dl,9(%esp) - movl 40(%ebx),%edx - movq 40(%ebx),%mm2 - psllq $60,%mm7 - movq 32(%ebx),%mm5 - por %mm7,%mm1 - movq %mm0,-56(%edi) - psrlq $4,%mm0 - movq %mm3,72(%edi) - movq %mm3,%mm6 - movq %mm1,-64(%ebp) - psrlq $4,%mm3 - movq %mm4,64(%ebp) - shll $4,%edx - movb %dl,10(%esp) - movl 56(%ebx),%edx - movq 56(%ebx),%mm1 - psllq $60,%mm6 - movq 48(%ebx),%mm4 - por %mm6,%mm0 - movq %mm2,-48(%edi) - psrlq $4,%mm2 - movq %mm5,80(%edi) - movq %mm5,%mm7 - movq %mm0,-56(%ebp) - psrlq $4,%mm5 - movq %mm3,72(%ebp) - shll $4,%edx - movb %dl,11(%esp) - movl 72(%ebx),%edx - movq 72(%ebx),%mm0 - psllq $60,%mm7 - movq 64(%ebx),%mm3 - por %mm7,%mm2 - movq %mm1,-40(%edi) - psrlq $4,%mm1 - movq %mm4,88(%edi) - movq %mm4,%mm6 - movq %mm2,-48(%ebp) - psrlq $4,%mm4 - movq %mm5,80(%ebp) - shll $4,%edx - movb %dl,12(%esp) - movl 88(%ebx),%edx - movq 88(%ebx),%mm2 - psllq $60,%mm6 - movq 80(%ebx),%mm5 - por %mm6,%mm1 - movq %mm0,-32(%edi) - psrlq $4,%mm0 - movq %mm3,96(%edi) - movq %mm3,%mm7 - movq %mm1,-40(%ebp) - psrlq $4,%mm3 - movq %mm4,88(%ebp) - shll $4,%edx - movb %dl,13(%esp) - movl 104(%ebx),%edx - movq 104(%ebx),%mm1 - psllq $60,%mm7 - movq 96(%ebx),%mm4 - por %mm7,%mm0 - movq %mm2,-24(%edi) - psrlq $4,%mm2 - movq %mm5,104(%edi) - movq %mm5,%mm6 - movq %mm0,-32(%ebp) - psrlq $4,%mm5 - movq %mm3,96(%ebp) - shll $4,%edx - movb %dl,14(%esp) - movl 120(%ebx),%edx - movq 120(%ebx),%mm0 - psllq $60,%mm6 - movq 112(%ebx),%mm3 - por %mm6,%mm2 - movq %mm1,-16(%edi) - psrlq $4,%mm1 - movq %mm4,112(%edi) - movq %mm4,%mm7 - movq %mm2,-24(%ebp) - psrlq $4,%mm4 - movq %mm5,104(%ebp) - shll $4,%edx - movb %dl,15(%esp) - psllq $60,%mm7 - por %mm7,%mm1 - movq %mm0,-8(%edi) - psrlq $4,%mm0 - movq %mm3,120(%edi) - movq %mm3,%mm6 - movq %mm1,-16(%ebp) - psrlq $4,%mm3 - movq %mm4,112(%ebp) - psllq $60,%mm6 - por %mm6,%mm0 - movq %mm0,-8(%ebp) - movq %mm3,120(%ebp) - movq (%eax),%mm6 - movl 8(%eax),%ebx - movl 12(%eax),%edx -.align 4,0x90 -L009outer: - xorl 12(%ecx),%edx - xorl 8(%ecx),%ebx - pxor (%ecx),%mm6 - leal 16(%ecx),%ecx - movl %ebx,536(%esp) - movq %mm6,528(%esp) - movl %ecx,548(%esp) - xorl %eax,%eax - roll $8,%edx - movb %dl,%al - movl %eax,%ebp - andb $15,%al - shrl $4,%ebp - pxor %mm0,%mm0 - roll $8,%edx - pxor %mm1,%mm1 - pxor %mm2,%mm2 - movq 16(%esp,%eax,8),%mm7 - movq 144(%esp,%eax,8),%mm6 - movb %dl,%al - movd %mm7,%ebx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%edi - psrlq $8,%mm6 - pxor 272(%esp,%ebp,8),%mm7 - andb $15,%al - psllq $56,%mm3 - shrl $4,%edi - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%ebp,8),%mm6 - xorb (%esp,%ebp,1),%bl - movb %dl,%al - movd %mm7,%ecx - movzbl %bl,%ebx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%ebp - psrlq $8,%mm6 - pxor 272(%esp,%edi,8),%mm7 - andb $15,%al - psllq $56,%mm3 - shrl $4,%ebp - pinsrw $2,(%esi,%ebx,2),%mm2 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%edi,8),%mm6 - xorb (%esp,%edi,1),%cl - movb %dl,%al - movl 536(%esp),%edx - movd %mm7,%ebx - movzbl %cl,%ecx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%edi - psrlq $8,%mm6 - pxor 272(%esp,%ebp,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm2,%mm6 - shrl $4,%edi - pinsrw $2,(%esi,%ecx,2),%mm1 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%ebp,8),%mm6 - xorb (%esp,%ebp,1),%bl - movb %dl,%al - movd %mm7,%ecx - movzbl %bl,%ebx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%ebp - psrlq $8,%mm6 - pxor 272(%esp,%edi,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm1,%mm6 - shrl $4,%ebp - pinsrw $2,(%esi,%ebx,2),%mm0 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%edi,8),%mm6 - xorb (%esp,%edi,1),%cl - movb %dl,%al - movd %mm7,%ebx - movzbl %cl,%ecx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%edi - psrlq $8,%mm6 - pxor 272(%esp,%ebp,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm0,%mm6 - shrl $4,%edi - pinsrw $2,(%esi,%ecx,2),%mm2 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%ebp,8),%mm6 - xorb (%esp,%ebp,1),%bl - movb %dl,%al - movd %mm7,%ecx - movzbl %bl,%ebx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%ebp - psrlq $8,%mm6 - pxor 272(%esp,%edi,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm2,%mm6 - shrl $4,%ebp - pinsrw $2,(%esi,%ebx,2),%mm1 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%edi,8),%mm6 - xorb (%esp,%edi,1),%cl - movb %dl,%al - movl 532(%esp),%edx - movd %mm7,%ebx - movzbl %cl,%ecx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%edi - psrlq $8,%mm6 - pxor 272(%esp,%ebp,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm1,%mm6 - shrl $4,%edi - pinsrw $2,(%esi,%ecx,2),%mm0 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%ebp,8),%mm6 - xorb (%esp,%ebp,1),%bl - movb %dl,%al - movd %mm7,%ecx - movzbl %bl,%ebx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%ebp - psrlq $8,%mm6 - pxor 272(%esp,%edi,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm0,%mm6 - shrl $4,%ebp - pinsrw $2,(%esi,%ebx,2),%mm2 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%edi,8),%mm6 - xorb (%esp,%edi,1),%cl - movb %dl,%al - movd %mm7,%ebx - movzbl %cl,%ecx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%edi - psrlq $8,%mm6 - pxor 272(%esp,%ebp,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm2,%mm6 - shrl $4,%edi - pinsrw $2,(%esi,%ecx,2),%mm1 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%ebp,8),%mm6 - xorb (%esp,%ebp,1),%bl - movb %dl,%al - movd %mm7,%ecx - movzbl %bl,%ebx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%ebp - psrlq $8,%mm6 - pxor 272(%esp,%edi,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm1,%mm6 - shrl $4,%ebp - pinsrw $2,(%esi,%ebx,2),%mm0 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%edi,8),%mm6 - xorb (%esp,%edi,1),%cl - movb %dl,%al - movl 528(%esp),%edx - movd %mm7,%ebx - movzbl %cl,%ecx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%edi - psrlq $8,%mm6 - pxor 272(%esp,%ebp,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm0,%mm6 - shrl $4,%edi - pinsrw $2,(%esi,%ecx,2),%mm2 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%ebp,8),%mm6 - xorb (%esp,%ebp,1),%bl - movb %dl,%al - movd %mm7,%ecx - movzbl %bl,%ebx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%ebp - psrlq $8,%mm6 - pxor 272(%esp,%edi,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm2,%mm6 - shrl $4,%ebp - pinsrw $2,(%esi,%ebx,2),%mm1 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%edi,8),%mm6 - xorb (%esp,%edi,1),%cl - movb %dl,%al - movd %mm7,%ebx - movzbl %cl,%ecx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%edi - psrlq $8,%mm6 - pxor 272(%esp,%ebp,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm1,%mm6 - shrl $4,%edi - pinsrw $2,(%esi,%ecx,2),%mm0 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%ebp,8),%mm6 - xorb (%esp,%ebp,1),%bl - movb %dl,%al - movd %mm7,%ecx - movzbl %bl,%ebx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%ebp - psrlq $8,%mm6 - pxor 272(%esp,%edi,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm0,%mm6 - shrl $4,%ebp - pinsrw $2,(%esi,%ebx,2),%mm2 - pxor 16(%esp,%eax,8),%mm7 - roll $8,%edx - pxor 144(%esp,%eax,8),%mm6 - pxor %mm3,%mm7 - pxor 400(%esp,%edi,8),%mm6 - xorb (%esp,%edi,1),%cl - movb %dl,%al - movl 524(%esp),%edx - movd %mm7,%ebx - movzbl %cl,%ecx - psrlq $8,%mm7 - movq %mm6,%mm3 - movl %eax,%edi - psrlq $8,%mm6 - pxor 272(%esp,%ebp,8),%mm7 - andb $15,%al - psllq $56,%mm3 - pxor %mm2,%mm6 - shrl $4,%edi - pinsrw $2,(%esi,%ecx,2),%mm1 - pxor 16(%esp,%eax,8),%mm7 - pxor 144(%esp,%eax,8),%mm6 - xorb (%esp,%ebp,1),%bl - pxor %mm3,%mm7 - pxor 400(%esp,%ebp,8),%mm6 - movzbl %bl,%ebx - pxor %mm2,%mm2 - psllq $4,%mm1 - movd %mm7,%ecx - psrlq $4,%mm7 - movq %mm6,%mm3 - psrlq $4,%mm6 - shll $4,%ecx - pxor 16(%esp,%edi,8),%mm7 - psllq $60,%mm3 - movzbl %cl,%ecx - pxor %mm3,%mm7 - pxor 144(%esp,%edi,8),%mm6 - pinsrw $2,(%esi,%ebx,2),%mm0 - pxor %mm1,%mm6 - movd %mm7,%edx - pinsrw $3,(%esi,%ecx,2),%mm2 - psllq $12,%mm0 - pxor %mm0,%mm6 - psrlq $32,%mm7 - pxor %mm2,%mm6 - movl 548(%esp),%ecx - movd %mm7,%ebx - movq %mm6,%mm3 - psllw $8,%mm6 - psrlw $8,%mm3 - por %mm3,%mm6 - bswap %edx - pshufw $27,%mm6,%mm6 - bswap %ebx - cmpl 552(%esp),%ecx - jne L009outer - movl 544(%esp),%eax - movl %edx,12(%eax) - movl %ebx,8(%eax) - movq %mm6,(%eax) - movl 556(%esp),%esp - emms - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _gcm_init_clmul -.private_extern _gcm_init_clmul -.align 4 -_gcm_init_clmul: -L_gcm_init_clmul_begin: - movl 4(%esp),%edx - movl 8(%esp),%eax - call L010pic -L010pic: - popl %ecx - leal Lbswap-L010pic(%ecx),%ecx - movdqu (%eax),%xmm2 - pshufd $78,%xmm2,%xmm2 - pshufd $255,%xmm2,%xmm4 - movdqa %xmm2,%xmm3 - psllq $1,%xmm2 - pxor %xmm5,%xmm5 - psrlq $63,%xmm3 - pcmpgtd %xmm4,%xmm5 - pslldq $8,%xmm3 - por %xmm3,%xmm2 - pand 16(%ecx),%xmm5 - pxor %xmm5,%xmm2 - movdqa %xmm2,%xmm0 - movdqa %xmm0,%xmm1 - pshufd $78,%xmm0,%xmm3 - pshufd $78,%xmm2,%xmm4 - pxor %xmm0,%xmm3 - pxor %xmm2,%xmm4 -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,220,0 - xorps %xmm0,%xmm3 - xorps %xmm1,%xmm3 - movdqa %xmm3,%xmm4 - psrldq $8,%xmm3 - pslldq $8,%xmm4 - pxor %xmm3,%xmm1 - pxor %xmm4,%xmm0 - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 - pshufd $78,%xmm2,%xmm3 - pshufd $78,%xmm0,%xmm4 - pxor %xmm2,%xmm3 - movdqu %xmm2,(%edx) - pxor %xmm0,%xmm4 - movdqu %xmm0,16(%edx) -.byte 102,15,58,15,227,8 - movdqu %xmm4,32(%edx) - ret -.globl _gcm_gmult_clmul -.private_extern _gcm_gmult_clmul -.align 4 -_gcm_gmult_clmul: -L_gcm_gmult_clmul_begin: - movl 4(%esp),%eax - movl 8(%esp),%edx - call L011pic -L011pic: - popl %ecx - leal Lbswap-L011pic(%ecx),%ecx - movdqu (%eax),%xmm0 - movdqa (%ecx),%xmm5 - movups (%edx),%xmm2 -.byte 102,15,56,0,197 - movups 32(%edx),%xmm4 - movdqa %xmm0,%xmm1 - pshufd $78,%xmm0,%xmm3 - pxor %xmm0,%xmm3 -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,220,0 - xorps %xmm0,%xmm3 - xorps %xmm1,%xmm3 - movdqa %xmm3,%xmm4 - psrldq $8,%xmm3 - pslldq $8,%xmm4 - pxor %xmm3,%xmm1 - pxor %xmm4,%xmm0 - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 -.byte 102,15,56,0,197 - movdqu %xmm0,(%eax) - ret -.globl _gcm_ghash_clmul -.private_extern _gcm_ghash_clmul -.align 4 -_gcm_ghash_clmul: -L_gcm_ghash_clmul_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%eax - movl 24(%esp),%edx - movl 28(%esp),%esi - movl 32(%esp),%ebx - call L012pic -L012pic: - popl %ecx - leal Lbswap-L012pic(%ecx),%ecx - movdqu (%eax),%xmm0 - movdqa (%ecx),%xmm5 - movdqu (%edx),%xmm2 -.byte 102,15,56,0,197 - subl $16,%ebx - jz L013odd_tail - movdqu (%esi),%xmm3 - movdqu 16(%esi),%xmm6 -.byte 102,15,56,0,221 -.byte 102,15,56,0,245 - movdqu 32(%edx),%xmm5 - pxor %xmm3,%xmm0 - pshufd $78,%xmm6,%xmm3 - movdqa %xmm6,%xmm7 - pxor %xmm6,%xmm3 - leal 32(%esi),%esi -.byte 102,15,58,68,242,0 -.byte 102,15,58,68,250,17 -.byte 102,15,58,68,221,0 - movups 16(%edx),%xmm2 - nop - subl $32,%ebx - jbe L014even_tail - jmp L015mod_loop -.align 5,0x90 -L015mod_loop: - pshufd $78,%xmm0,%xmm4 - movdqa %xmm0,%xmm1 - pxor %xmm0,%xmm4 - nop -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,229,16 - movups (%edx),%xmm2 - xorps %xmm6,%xmm0 - movdqa (%ecx),%xmm5 - xorps %xmm7,%xmm1 - movdqu (%esi),%xmm7 - pxor %xmm0,%xmm3 - movdqu 16(%esi),%xmm6 - pxor %xmm1,%xmm3 -.byte 102,15,56,0,253 - pxor %xmm3,%xmm4 - movdqa %xmm4,%xmm3 - psrldq $8,%xmm4 - pslldq $8,%xmm3 - pxor %xmm4,%xmm1 - pxor %xmm3,%xmm0 -.byte 102,15,56,0,245 - pxor %xmm7,%xmm1 - movdqa %xmm6,%xmm7 - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 -.byte 102,15,58,68,242,0 - movups 32(%edx),%xmm5 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - pshufd $78,%xmm7,%xmm3 - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm7,%xmm3 - pxor %xmm4,%xmm1 -.byte 102,15,58,68,250,17 - movups 16(%edx),%xmm2 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 -.byte 102,15,58,68,221,0 - leal 32(%esi),%esi - subl $32,%ebx - ja L015mod_loop -L014even_tail: - pshufd $78,%xmm0,%xmm4 - movdqa %xmm0,%xmm1 - pxor %xmm0,%xmm4 -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,229,16 - movdqa (%ecx),%xmm5 - xorps %xmm6,%xmm0 - xorps %xmm7,%xmm1 - pxor %xmm0,%xmm3 - pxor %xmm1,%xmm3 - pxor %xmm3,%xmm4 - movdqa %xmm4,%xmm3 - psrldq $8,%xmm4 - pslldq $8,%xmm3 - pxor %xmm4,%xmm1 - pxor %xmm3,%xmm0 - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 - testl %ebx,%ebx - jnz L016done - movups (%edx),%xmm2 -L013odd_tail: - movdqu (%esi),%xmm3 -.byte 102,15,56,0,221 - pxor %xmm3,%xmm0 - movdqa %xmm0,%xmm1 - pshufd $78,%xmm0,%xmm3 - pshufd $78,%xmm2,%xmm4 - pxor %xmm0,%xmm3 - pxor %xmm2,%xmm4 -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,220,0 - xorps %xmm0,%xmm3 - xorps %xmm1,%xmm3 - movdqa %xmm3,%xmm4 - psrldq $8,%xmm3 - pslldq $8,%xmm4 - pxor %xmm3,%xmm1 - pxor %xmm4,%xmm0 - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 -L016done: -.byte 102,15,56,0,197 - movdqu %xmm0,(%eax) - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.align 6,0x90 -Lbswap: -.byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -.byte 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,194 -.align 6,0x90 -Lrem_8bit: -.value 0,450,900,582,1800,1738,1164,1358 -.value 3600,4050,3476,3158,2328,2266,2716,2910 -.value 7200,7650,8100,7782,6952,6890,6316,6510 -.value 4656,5106,4532,4214,5432,5370,5820,6014 -.value 14400,14722,15300,14854,16200,16010,15564,15630 -.value 13904,14226,13780,13334,12632,12442,13020,13086 -.value 9312,9634,10212,9766,9064,8874,8428,8494 -.value 10864,11186,10740,10294,11640,11450,12028,12094 -.value 28800,28994,29444,29382,30600,30282,29708,30158 -.value 32400,32594,32020,31958,31128,30810,31260,31710 -.value 27808,28002,28452,28390,27560,27242,26668,27118 -.value 25264,25458,24884,24822,26040,25722,26172,26622 -.value 18624,18690,19268,19078,20424,19978,19532,19854 -.value 18128,18194,17748,17558,16856,16410,16988,17310 -.value 21728,21794,22372,22182,21480,21034,20588,20910 -.value 23280,23346,22900,22710,24056,23610,24188,24510 -.value 57600,57538,57988,58182,58888,59338,58764,58446 -.value 61200,61138,60564,60758,59416,59866,60316,59998 -.value 64800,64738,65188,65382,64040,64490,63916,63598 -.value 62256,62194,61620,61814,62520,62970,63420,63102 -.value 55616,55426,56004,56070,56904,57226,56780,56334 -.value 55120,54930,54484,54550,53336,53658,54236,53790 -.value 50528,50338,50916,50982,49768,50090,49644,49198 -.value 52080,51890,51444,51510,52344,52666,53244,52798 -.value 37248,36930,37380,37830,38536,38730,38156,38094 -.value 40848,40530,39956,40406,39064,39258,39708,39646 -.value 36256,35938,36388,36838,35496,35690,35116,35054 -.value 33712,33394,32820,33270,33976,34170,34620,34558 -.value 43456,43010,43588,43910,44744,44810,44364,44174 -.value 42960,42514,42068,42390,41176,41242,41820,41630 -.value 46560,46114,46692,47014,45800,45866,45420,45230 -.value 48112,47666,47220,47542,48376,48442,49020,48830 -.align 6,0x90 -Lrem_4bit: -.long 0,0,0,471859200,0,943718400,0,610271232 -.long 0,1887436800,0,1822425088,0,1220542464,0,1423966208 -.long 0,3774873600,0,4246732800,0,3644850176,0,3311403008 -.long 0,2441084928,0,2376073216,0,2847932416,0,3051356160 -.byte 71,72,65,83,72,32,102,111,114,32,120,56,54,44,32,67 -.byte 82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112 -.byte 112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62 -.byte 0 -#endif diff --git a/third_party/boringssl/mac-x86/crypto/rc4/rc4-586.S b/third_party/boringssl/mac-x86/crypto/rc4/rc4-586.S deleted file mode 100644 index faecdfa9f2bc3..0000000000000 --- a/third_party/boringssl/mac-x86/crypto/rc4/rc4-586.S +++ /dev/null @@ -1,383 +0,0 @@ -#if defined(__i386__) -.file "rc4-586.S" -.text -.globl _asm_RC4 -.private_extern _asm_RC4 -.align 4 -_asm_RC4: -L_asm_RC4_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%edi - movl 24(%esp),%edx - movl 28(%esp),%esi - movl 32(%esp),%ebp - xorl %eax,%eax - xorl %ebx,%ebx - cmpl $0,%edx - je L000abort - movb (%edi),%al - movb 4(%edi),%bl - addl $8,%edi - leal (%esi,%edx,1),%ecx - subl %esi,%ebp - movl %ecx,24(%esp) - incb %al - cmpl $-1,256(%edi) - je L001RC4_CHAR - movl (%edi,%eax,4),%ecx - andl $-4,%edx - jz L002loop1 - movl %ebp,32(%esp) - testl $-8,%edx - jz L003go4loop4 - call L004PIC_me_up -L004PIC_me_up: - popl %ebp - movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L004PIC_me_up(%ebp),%ebp - btl $26,(%ebp) - jnc L003go4loop4 - movl 32(%esp),%ebp - andl $-8,%edx - leal -8(%esi,%edx,1),%edx - movl %edx,-4(%edi) - addb %cl,%bl - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - incl %eax - addl %ecx,%edx - movzbl %al,%eax - movzbl %dl,%edx - movq (%esi),%mm0 - movl (%edi,%eax,4),%ecx - movd (%edi,%edx,4),%mm2 - jmp L005loop_mmx_enter -.align 4,0x90 -L006loop_mmx: - addb %cl,%bl - psllq $56,%mm1 - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - incl %eax - addl %ecx,%edx - movzbl %al,%eax - movzbl %dl,%edx - pxor %mm1,%mm2 - movq (%esi),%mm0 - movq %mm2,-8(%ebp,%esi,1) - movl (%edi,%eax,4),%ecx - movd (%edi,%edx,4),%mm2 -L005loop_mmx_enter: - addb %cl,%bl - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - incl %eax - addl %ecx,%edx - movzbl %al,%eax - movzbl %dl,%edx - pxor %mm0,%mm2 - movl (%edi,%eax,4),%ecx - movd (%edi,%edx,4),%mm1 - addb %cl,%bl - psllq $8,%mm1 - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - incl %eax - addl %ecx,%edx - movzbl %al,%eax - movzbl %dl,%edx - pxor %mm1,%mm2 - movl (%edi,%eax,4),%ecx - movd (%edi,%edx,4),%mm1 - addb %cl,%bl - psllq $16,%mm1 - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - incl %eax - addl %ecx,%edx - movzbl %al,%eax - movzbl %dl,%edx - pxor %mm1,%mm2 - movl (%edi,%eax,4),%ecx - movd (%edi,%edx,4),%mm1 - addb %cl,%bl - psllq $24,%mm1 - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - incl %eax - addl %ecx,%edx - movzbl %al,%eax - movzbl %dl,%edx - pxor %mm1,%mm2 - movl (%edi,%eax,4),%ecx - movd (%edi,%edx,4),%mm1 - addb %cl,%bl - psllq $32,%mm1 - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - incl %eax - addl %ecx,%edx - movzbl %al,%eax - movzbl %dl,%edx - pxor %mm1,%mm2 - movl (%edi,%eax,4),%ecx - movd (%edi,%edx,4),%mm1 - addb %cl,%bl - psllq $40,%mm1 - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - incl %eax - addl %ecx,%edx - movzbl %al,%eax - movzbl %dl,%edx - pxor %mm1,%mm2 - movl (%edi,%eax,4),%ecx - movd (%edi,%edx,4),%mm1 - addb %cl,%bl - psllq $48,%mm1 - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - incl %eax - addl %ecx,%edx - movzbl %al,%eax - movzbl %dl,%edx - pxor %mm1,%mm2 - movl (%edi,%eax,4),%ecx - movd (%edi,%edx,4),%mm1 - movl %ebx,%edx - xorl %ebx,%ebx - movb %dl,%bl - cmpl -4(%edi),%esi - leal 8(%esi),%esi - jb L006loop_mmx - psllq $56,%mm1 - pxor %mm1,%mm2 - movq %mm2,-8(%ebp,%esi,1) - emms - cmpl 24(%esp),%esi - je L007done - jmp L002loop1 -.align 4,0x90 -L003go4loop4: - leal -4(%esi,%edx,1),%edx - movl %edx,28(%esp) -L008loop4: - addb %cl,%bl - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - addl %ecx,%edx - incb %al - andl $255,%edx - movl (%edi,%eax,4),%ecx - movl (%edi,%edx,4),%ebp - addb %cl,%bl - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - addl %ecx,%edx - incb %al - andl $255,%edx - rorl $8,%ebp - movl (%edi,%eax,4),%ecx - orl (%edi,%edx,4),%ebp - addb %cl,%bl - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - addl %ecx,%edx - incb %al - andl $255,%edx - rorl $8,%ebp - movl (%edi,%eax,4),%ecx - orl (%edi,%edx,4),%ebp - addb %cl,%bl - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - addl %ecx,%edx - incb %al - andl $255,%edx - rorl $8,%ebp - movl 32(%esp),%ecx - orl (%edi,%edx,4),%ebp - rorl $8,%ebp - xorl (%esi),%ebp - cmpl 28(%esp),%esi - movl %ebp,(%ecx,%esi,1) - leal 4(%esi),%esi - movl (%edi,%eax,4),%ecx - jb L008loop4 - cmpl 24(%esp),%esi - je L007done - movl 32(%esp),%ebp -.align 4,0x90 -L002loop1: - addb %cl,%bl - movl (%edi,%ebx,4),%edx - movl %ecx,(%edi,%ebx,4) - movl %edx,(%edi,%eax,4) - addl %ecx,%edx - incb %al - andl $255,%edx - movl (%edi,%edx,4),%edx - xorb (%esi),%dl - leal 1(%esi),%esi - movl (%edi,%eax,4),%ecx - cmpl 24(%esp),%esi - movb %dl,-1(%ebp,%esi,1) - jb L002loop1 - jmp L007done -.align 4,0x90 -L001RC4_CHAR: - movzbl (%edi,%eax,1),%ecx -L009cloop1: - addb %cl,%bl - movzbl (%edi,%ebx,1),%edx - movb %cl,(%edi,%ebx,1) - movb %dl,(%edi,%eax,1) - addb %cl,%dl - movzbl (%edi,%edx,1),%edx - addb $1,%al - xorb (%esi),%dl - leal 1(%esi),%esi - movzbl (%edi,%eax,1),%ecx - cmpl 24(%esp),%esi - movb %dl,-1(%ebp,%esi,1) - jb L009cloop1 -L007done: - decb %al - movl %ebx,-4(%edi) - movb %al,-8(%edi) -L000abort: - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _asm_RC4_set_key -.private_extern _asm_RC4_set_key -.align 4 -_asm_RC4_set_key: -L_asm_RC4_set_key_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%edi - movl 24(%esp),%ebp - movl 28(%esp),%esi - call L010PIC_me_up -L010PIC_me_up: - popl %edx - movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L010PIC_me_up(%edx),%edx - leal 8(%edi),%edi - leal (%esi,%ebp,1),%esi - negl %ebp - xorl %eax,%eax - movl %ebp,-4(%edi) - btl $20,(%edx) - jc L011c1stloop -.align 4,0x90 -L012w1stloop: - movl %eax,(%edi,%eax,4) - addb $1,%al - jnc L012w1stloop - xorl %ecx,%ecx - xorl %edx,%edx -.align 4,0x90 -L013w2ndloop: - movl (%edi,%ecx,4),%eax - addb (%esi,%ebp,1),%dl - addb %al,%dl - addl $1,%ebp - movl (%edi,%edx,4),%ebx - jnz L014wnowrap - movl -4(%edi),%ebp -L014wnowrap: - movl %eax,(%edi,%edx,4) - movl %ebx,(%edi,%ecx,4) - addb $1,%cl - jnc L013w2ndloop - jmp L015exit -.align 4,0x90 -L011c1stloop: - movb %al,(%edi,%eax,1) - addb $1,%al - jnc L011c1stloop - xorl %ecx,%ecx - xorl %edx,%edx - xorl %ebx,%ebx -.align 4,0x90 -L016c2ndloop: - movb (%edi,%ecx,1),%al - addb (%esi,%ebp,1),%dl - addb %al,%dl - addl $1,%ebp - movb (%edi,%edx,1),%bl - jnz L017cnowrap - movl -4(%edi),%ebp -L017cnowrap: - movb %al,(%edi,%edx,1) - movb %bl,(%edi,%ecx,1) - addb $1,%cl - jnc L016c2ndloop - movl $-1,256(%edi) -L015exit: - xorl %eax,%eax - movl %eax,-8(%edi) - movl %eax,-4(%edi) - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.globl _RC4_options -.private_extern _RC4_options -.align 4 -_RC4_options: -L_RC4_options_begin: - call L018pic_point -L018pic_point: - popl %eax - leal L019opts-L018pic_point(%eax),%eax - call L020PIC_me_up -L020PIC_me_up: - popl %edx - movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L020PIC_me_up(%edx),%edx - movl (%edx),%edx - btl $20,%edx - jc L0211xchar - btl $26,%edx - jnc L022ret - addl $25,%eax - ret -L0211xchar: - addl $12,%eax -L022ret: - ret -.align 6,0x90 -L019opts: -.byte 114,99,52,40,52,120,44,105,110,116,41,0 -.byte 114,99,52,40,49,120,44,99,104,97,114,41,0 -.byte 114,99,52,40,56,120,44,109,109,120,41,0 -.byte 82,67,52,32,102,111,114,32,120,56,54,44,32,67,82,89 -.byte 80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114 -.byte 111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.align 6,0x90 -.section __IMPORT,__pointers,non_lazy_symbol_pointers -L_OPENSSL_ia32cap_P$non_lazy_ptr: -.indirect_symbol _OPENSSL_ia32cap_P -.long 0 -#endif diff --git a/third_party/boringssl/mac-x86/crypto/sha/sha1-586.S b/third_party/boringssl/mac-x86/crypto/sha/sha1-586.S deleted file mode 100644 index 97aafbf198ab3..0000000000000 --- a/third_party/boringssl/mac-x86/crypto/sha/sha1-586.S +++ /dev/null @@ -1,2797 +0,0 @@ -#if defined(__i386__) -.file "sha1-586.S" -.text -.globl _sha1_block_data_order -.private_extern _sha1_block_data_order -.align 4 -_sha1_block_data_order: -L_sha1_block_data_order_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - call L000pic_point -L000pic_point: - popl %ebp - movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L000pic_point(%ebp),%esi - leal LK_XX_XX-L000pic_point(%ebp),%ebp - movl (%esi),%eax - movl 4(%esi),%edx - testl $512,%edx - jz L001x86 - movl 8(%esi),%ecx - testl $16777216,%eax - jz L001x86 - testl $536870912,%ecx - jnz Lshaext_shortcut - jmp Lssse3_shortcut -.align 4,0x90 -L001x86: - movl 20(%esp),%ebp - movl 24(%esp),%esi - movl 28(%esp),%eax - subl $76,%esp - shll $6,%eax - addl %esi,%eax - movl %eax,104(%esp) - movl 16(%ebp),%edi - jmp L002loop -.align 4,0x90 -L002loop: - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - movl %eax,(%esp) - movl %ebx,4(%esp) - movl %ecx,8(%esp) - movl %edx,12(%esp) - movl 16(%esi),%eax - movl 20(%esi),%ebx - movl 24(%esi),%ecx - movl 28(%esi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - movl %eax,16(%esp) - movl %ebx,20(%esp) - movl %ecx,24(%esp) - movl %edx,28(%esp) - movl 32(%esi),%eax - movl 36(%esi),%ebx - movl 40(%esi),%ecx - movl 44(%esi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - movl %eax,32(%esp) - movl %ebx,36(%esp) - movl %ecx,40(%esp) - movl %edx,44(%esp) - movl 48(%esi),%eax - movl 52(%esi),%ebx - movl 56(%esi),%ecx - movl 60(%esi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - movl %eax,48(%esp) - movl %ebx,52(%esp) - movl %ecx,56(%esp) - movl %edx,60(%esp) - movl %esi,100(%esp) - movl (%ebp),%eax - movl 4(%ebp),%ebx - movl 8(%ebp),%ecx - movl 12(%ebp),%edx - # 00_15 0 - movl %ecx,%esi - movl %eax,%ebp - roll $5,%ebp - xorl %edx,%esi - addl %edi,%ebp - movl (%esp),%edi - andl %ebx,%esi - rorl $2,%ebx - xorl %edx,%esi - leal 1518500249(%ebp,%edi,1),%ebp - addl %esi,%ebp - # 00_15 1 - movl %ebx,%edi - movl %ebp,%esi - roll $5,%ebp - xorl %ecx,%edi - addl %edx,%ebp - movl 4(%esp),%edx - andl %eax,%edi - rorl $2,%eax - xorl %ecx,%edi - leal 1518500249(%ebp,%edx,1),%ebp - addl %edi,%ebp - # 00_15 2 - movl %eax,%edx - movl %ebp,%edi - roll $5,%ebp - xorl %ebx,%edx - addl %ecx,%ebp - movl 8(%esp),%ecx - andl %esi,%edx - rorl $2,%esi - xorl %ebx,%edx - leal 1518500249(%ebp,%ecx,1),%ebp - addl %edx,%ebp - # 00_15 3 - movl %esi,%ecx - movl %ebp,%edx - roll $5,%ebp - xorl %eax,%ecx - addl %ebx,%ebp - movl 12(%esp),%ebx - andl %edi,%ecx - rorl $2,%edi - xorl %eax,%ecx - leal 1518500249(%ebp,%ebx,1),%ebp - addl %ecx,%ebp - # 00_15 4 - movl %edi,%ebx - movl %ebp,%ecx - roll $5,%ebp - xorl %esi,%ebx - addl %eax,%ebp - movl 16(%esp),%eax - andl %edx,%ebx - rorl $2,%edx - xorl %esi,%ebx - leal 1518500249(%ebp,%eax,1),%ebp - addl %ebx,%ebp - # 00_15 5 - movl %edx,%eax - movl %ebp,%ebx - roll $5,%ebp - xorl %edi,%eax - addl %esi,%ebp - movl 20(%esp),%esi - andl %ecx,%eax - rorl $2,%ecx - xorl %edi,%eax - leal 1518500249(%ebp,%esi,1),%ebp - addl %eax,%ebp - # 00_15 6 - movl %ecx,%esi - movl %ebp,%eax - roll $5,%ebp - xorl %edx,%esi - addl %edi,%ebp - movl 24(%esp),%edi - andl %ebx,%esi - rorl $2,%ebx - xorl %edx,%esi - leal 1518500249(%ebp,%edi,1),%ebp - addl %esi,%ebp - # 00_15 7 - movl %ebx,%edi - movl %ebp,%esi - roll $5,%ebp - xorl %ecx,%edi - addl %edx,%ebp - movl 28(%esp),%edx - andl %eax,%edi - rorl $2,%eax - xorl %ecx,%edi - leal 1518500249(%ebp,%edx,1),%ebp - addl %edi,%ebp - # 00_15 8 - movl %eax,%edx - movl %ebp,%edi - roll $5,%ebp - xorl %ebx,%edx - addl %ecx,%ebp - movl 32(%esp),%ecx - andl %esi,%edx - rorl $2,%esi - xorl %ebx,%edx - leal 1518500249(%ebp,%ecx,1),%ebp - addl %edx,%ebp - # 00_15 9 - movl %esi,%ecx - movl %ebp,%edx - roll $5,%ebp - xorl %eax,%ecx - addl %ebx,%ebp - movl 36(%esp),%ebx - andl %edi,%ecx - rorl $2,%edi - xorl %eax,%ecx - leal 1518500249(%ebp,%ebx,1),%ebp - addl %ecx,%ebp - # 00_15 10 - movl %edi,%ebx - movl %ebp,%ecx - roll $5,%ebp - xorl %esi,%ebx - addl %eax,%ebp - movl 40(%esp),%eax - andl %edx,%ebx - rorl $2,%edx - xorl %esi,%ebx - leal 1518500249(%ebp,%eax,1),%ebp - addl %ebx,%ebp - # 00_15 11 - movl %edx,%eax - movl %ebp,%ebx - roll $5,%ebp - xorl %edi,%eax - addl %esi,%ebp - movl 44(%esp),%esi - andl %ecx,%eax - rorl $2,%ecx - xorl %edi,%eax - leal 1518500249(%ebp,%esi,1),%ebp - addl %eax,%ebp - # 00_15 12 - movl %ecx,%esi - movl %ebp,%eax - roll $5,%ebp - xorl %edx,%esi - addl %edi,%ebp - movl 48(%esp),%edi - andl %ebx,%esi - rorl $2,%ebx - xorl %edx,%esi - leal 1518500249(%ebp,%edi,1),%ebp - addl %esi,%ebp - # 00_15 13 - movl %ebx,%edi - movl %ebp,%esi - roll $5,%ebp - xorl %ecx,%edi - addl %edx,%ebp - movl 52(%esp),%edx - andl %eax,%edi - rorl $2,%eax - xorl %ecx,%edi - leal 1518500249(%ebp,%edx,1),%ebp - addl %edi,%ebp - # 00_15 14 - movl %eax,%edx - movl %ebp,%edi - roll $5,%ebp - xorl %ebx,%edx - addl %ecx,%ebp - movl 56(%esp),%ecx - andl %esi,%edx - rorl $2,%esi - xorl %ebx,%edx - leal 1518500249(%ebp,%ecx,1),%ebp - addl %edx,%ebp - # 00_15 15 - movl %esi,%ecx - movl %ebp,%edx - roll $5,%ebp - xorl %eax,%ecx - addl %ebx,%ebp - movl 60(%esp),%ebx - andl %edi,%ecx - rorl $2,%edi - xorl %eax,%ecx - leal 1518500249(%ebp,%ebx,1),%ebp - movl (%esp),%ebx - addl %ebp,%ecx - # 16_19 16 - movl %edi,%ebp - xorl 8(%esp),%ebx - xorl %esi,%ebp - xorl 32(%esp),%ebx - andl %edx,%ebp - xorl 52(%esp),%ebx - roll $1,%ebx - xorl %esi,%ebp - addl %ebp,%eax - movl %ecx,%ebp - rorl $2,%edx - movl %ebx,(%esp) - roll $5,%ebp - leal 1518500249(%ebx,%eax,1),%ebx - movl 4(%esp),%eax - addl %ebp,%ebx - # 16_19 17 - movl %edx,%ebp - xorl 12(%esp),%eax - xorl %edi,%ebp - xorl 36(%esp),%eax - andl %ecx,%ebp - xorl 56(%esp),%eax - roll $1,%eax - xorl %edi,%ebp - addl %ebp,%esi - movl %ebx,%ebp - rorl $2,%ecx - movl %eax,4(%esp) - roll $5,%ebp - leal 1518500249(%eax,%esi,1),%eax - movl 8(%esp),%esi - addl %ebp,%eax - # 16_19 18 - movl %ecx,%ebp - xorl 16(%esp),%esi - xorl %edx,%ebp - xorl 40(%esp),%esi - andl %ebx,%ebp - xorl 60(%esp),%esi - roll $1,%esi - xorl %edx,%ebp - addl %ebp,%edi - movl %eax,%ebp - rorl $2,%ebx - movl %esi,8(%esp) - roll $5,%ebp - leal 1518500249(%esi,%edi,1),%esi - movl 12(%esp),%edi - addl %ebp,%esi - # 16_19 19 - movl %ebx,%ebp - xorl 20(%esp),%edi - xorl %ecx,%ebp - xorl 44(%esp),%edi - andl %eax,%ebp - xorl (%esp),%edi - roll $1,%edi - xorl %ecx,%ebp - addl %ebp,%edx - movl %esi,%ebp - rorl $2,%eax - movl %edi,12(%esp) - roll $5,%ebp - leal 1518500249(%edi,%edx,1),%edi - movl 16(%esp),%edx - addl %ebp,%edi - # 20_39 20 - movl %esi,%ebp - xorl 24(%esp),%edx - xorl %eax,%ebp - xorl 48(%esp),%edx - xorl %ebx,%ebp - xorl 4(%esp),%edx - roll $1,%edx - addl %ebp,%ecx - rorl $2,%esi - movl %edi,%ebp - roll $5,%ebp - movl %edx,16(%esp) - leal 1859775393(%edx,%ecx,1),%edx - movl 20(%esp),%ecx - addl %ebp,%edx - # 20_39 21 - movl %edi,%ebp - xorl 28(%esp),%ecx - xorl %esi,%ebp - xorl 52(%esp),%ecx - xorl %eax,%ebp - xorl 8(%esp),%ecx - roll $1,%ecx - addl %ebp,%ebx - rorl $2,%edi - movl %edx,%ebp - roll $5,%ebp - movl %ecx,20(%esp) - leal 1859775393(%ecx,%ebx,1),%ecx - movl 24(%esp),%ebx - addl %ebp,%ecx - # 20_39 22 - movl %edx,%ebp - xorl 32(%esp),%ebx - xorl %edi,%ebp - xorl 56(%esp),%ebx - xorl %esi,%ebp - xorl 12(%esp),%ebx - roll $1,%ebx - addl %ebp,%eax - rorl $2,%edx - movl %ecx,%ebp - roll $5,%ebp - movl %ebx,24(%esp) - leal 1859775393(%ebx,%eax,1),%ebx - movl 28(%esp),%eax - addl %ebp,%ebx - # 20_39 23 - movl %ecx,%ebp - xorl 36(%esp),%eax - xorl %edx,%ebp - xorl 60(%esp),%eax - xorl %edi,%ebp - xorl 16(%esp),%eax - roll $1,%eax - addl %ebp,%esi - rorl $2,%ecx - movl %ebx,%ebp - roll $5,%ebp - movl %eax,28(%esp) - leal 1859775393(%eax,%esi,1),%eax - movl 32(%esp),%esi - addl %ebp,%eax - # 20_39 24 - movl %ebx,%ebp - xorl 40(%esp),%esi - xorl %ecx,%ebp - xorl (%esp),%esi - xorl %edx,%ebp - xorl 20(%esp),%esi - roll $1,%esi - addl %ebp,%edi - rorl $2,%ebx - movl %eax,%ebp - roll $5,%ebp - movl %esi,32(%esp) - leal 1859775393(%esi,%edi,1),%esi - movl 36(%esp),%edi - addl %ebp,%esi - # 20_39 25 - movl %eax,%ebp - xorl 44(%esp),%edi - xorl %ebx,%ebp - xorl 4(%esp),%edi - xorl %ecx,%ebp - xorl 24(%esp),%edi - roll $1,%edi - addl %ebp,%edx - rorl $2,%eax - movl %esi,%ebp - roll $5,%ebp - movl %edi,36(%esp) - leal 1859775393(%edi,%edx,1),%edi - movl 40(%esp),%edx - addl %ebp,%edi - # 20_39 26 - movl %esi,%ebp - xorl 48(%esp),%edx - xorl %eax,%ebp - xorl 8(%esp),%edx - xorl %ebx,%ebp - xorl 28(%esp),%edx - roll $1,%edx - addl %ebp,%ecx - rorl $2,%esi - movl %edi,%ebp - roll $5,%ebp - movl %edx,40(%esp) - leal 1859775393(%edx,%ecx,1),%edx - movl 44(%esp),%ecx - addl %ebp,%edx - # 20_39 27 - movl %edi,%ebp - xorl 52(%esp),%ecx - xorl %esi,%ebp - xorl 12(%esp),%ecx - xorl %eax,%ebp - xorl 32(%esp),%ecx - roll $1,%ecx - addl %ebp,%ebx - rorl $2,%edi - movl %edx,%ebp - roll $5,%ebp - movl %ecx,44(%esp) - leal 1859775393(%ecx,%ebx,1),%ecx - movl 48(%esp),%ebx - addl %ebp,%ecx - # 20_39 28 - movl %edx,%ebp - xorl 56(%esp),%ebx - xorl %edi,%ebp - xorl 16(%esp),%ebx - xorl %esi,%ebp - xorl 36(%esp),%ebx - roll $1,%ebx - addl %ebp,%eax - rorl $2,%edx - movl %ecx,%ebp - roll $5,%ebp - movl %ebx,48(%esp) - leal 1859775393(%ebx,%eax,1),%ebx - movl 52(%esp),%eax - addl %ebp,%ebx - # 20_39 29 - movl %ecx,%ebp - xorl 60(%esp),%eax - xorl %edx,%ebp - xorl 20(%esp),%eax - xorl %edi,%ebp - xorl 40(%esp),%eax - roll $1,%eax - addl %ebp,%esi - rorl $2,%ecx - movl %ebx,%ebp - roll $5,%ebp - movl %eax,52(%esp) - leal 1859775393(%eax,%esi,1),%eax - movl 56(%esp),%esi - addl %ebp,%eax - # 20_39 30 - movl %ebx,%ebp - xorl (%esp),%esi - xorl %ecx,%ebp - xorl 24(%esp),%esi - xorl %edx,%ebp - xorl 44(%esp),%esi - roll $1,%esi - addl %ebp,%edi - rorl $2,%ebx - movl %eax,%ebp - roll $5,%ebp - movl %esi,56(%esp) - leal 1859775393(%esi,%edi,1),%esi - movl 60(%esp),%edi - addl %ebp,%esi - # 20_39 31 - movl %eax,%ebp - xorl 4(%esp),%edi - xorl %ebx,%ebp - xorl 28(%esp),%edi - xorl %ecx,%ebp - xorl 48(%esp),%edi - roll $1,%edi - addl %ebp,%edx - rorl $2,%eax - movl %esi,%ebp - roll $5,%ebp - movl %edi,60(%esp) - leal 1859775393(%edi,%edx,1),%edi - movl (%esp),%edx - addl %ebp,%edi - # 20_39 32 - movl %esi,%ebp - xorl 8(%esp),%edx - xorl %eax,%ebp - xorl 32(%esp),%edx - xorl %ebx,%ebp - xorl 52(%esp),%edx - roll $1,%edx - addl %ebp,%ecx - rorl $2,%esi - movl %edi,%ebp - roll $5,%ebp - movl %edx,(%esp) - leal 1859775393(%edx,%ecx,1),%edx - movl 4(%esp),%ecx - addl %ebp,%edx - # 20_39 33 - movl %edi,%ebp - xorl 12(%esp),%ecx - xorl %esi,%ebp - xorl 36(%esp),%ecx - xorl %eax,%ebp - xorl 56(%esp),%ecx - roll $1,%ecx - addl %ebp,%ebx - rorl $2,%edi - movl %edx,%ebp - roll $5,%ebp - movl %ecx,4(%esp) - leal 1859775393(%ecx,%ebx,1),%ecx - movl 8(%esp),%ebx - addl %ebp,%ecx - # 20_39 34 - movl %edx,%ebp - xorl 16(%esp),%ebx - xorl %edi,%ebp - xorl 40(%esp),%ebx - xorl %esi,%ebp - xorl 60(%esp),%ebx - roll $1,%ebx - addl %ebp,%eax - rorl $2,%edx - movl %ecx,%ebp - roll $5,%ebp - movl %ebx,8(%esp) - leal 1859775393(%ebx,%eax,1),%ebx - movl 12(%esp),%eax - addl %ebp,%ebx - # 20_39 35 - movl %ecx,%ebp - xorl 20(%esp),%eax - xorl %edx,%ebp - xorl 44(%esp),%eax - xorl %edi,%ebp - xorl (%esp),%eax - roll $1,%eax - addl %ebp,%esi - rorl $2,%ecx - movl %ebx,%ebp - roll $5,%ebp - movl %eax,12(%esp) - leal 1859775393(%eax,%esi,1),%eax - movl 16(%esp),%esi - addl %ebp,%eax - # 20_39 36 - movl %ebx,%ebp - xorl 24(%esp),%esi - xorl %ecx,%ebp - xorl 48(%esp),%esi - xorl %edx,%ebp - xorl 4(%esp),%esi - roll $1,%esi - addl %ebp,%edi - rorl $2,%ebx - movl %eax,%ebp - roll $5,%ebp - movl %esi,16(%esp) - leal 1859775393(%esi,%edi,1),%esi - movl 20(%esp),%edi - addl %ebp,%esi - # 20_39 37 - movl %eax,%ebp - xorl 28(%esp),%edi - xorl %ebx,%ebp - xorl 52(%esp),%edi - xorl %ecx,%ebp - xorl 8(%esp),%edi - roll $1,%edi - addl %ebp,%edx - rorl $2,%eax - movl %esi,%ebp - roll $5,%ebp - movl %edi,20(%esp) - leal 1859775393(%edi,%edx,1),%edi - movl 24(%esp),%edx - addl %ebp,%edi - # 20_39 38 - movl %esi,%ebp - xorl 32(%esp),%edx - xorl %eax,%ebp - xorl 56(%esp),%edx - xorl %ebx,%ebp - xorl 12(%esp),%edx - roll $1,%edx - addl %ebp,%ecx - rorl $2,%esi - movl %edi,%ebp - roll $5,%ebp - movl %edx,24(%esp) - leal 1859775393(%edx,%ecx,1),%edx - movl 28(%esp),%ecx - addl %ebp,%edx - # 20_39 39 - movl %edi,%ebp - xorl 36(%esp),%ecx - xorl %esi,%ebp - xorl 60(%esp),%ecx - xorl %eax,%ebp - xorl 16(%esp),%ecx - roll $1,%ecx - addl %ebp,%ebx - rorl $2,%edi - movl %edx,%ebp - roll $5,%ebp - movl %ecx,28(%esp) - leal 1859775393(%ecx,%ebx,1),%ecx - movl 32(%esp),%ebx - addl %ebp,%ecx - # 40_59 40 - movl %edi,%ebp - xorl 40(%esp),%ebx - xorl %esi,%ebp - xorl (%esp),%ebx - andl %edx,%ebp - xorl 20(%esp),%ebx - roll $1,%ebx - addl %eax,%ebp - rorl $2,%edx - movl %ecx,%eax - roll $5,%eax - movl %ebx,32(%esp) - leal 2400959708(%ebx,%ebp,1),%ebx - movl %edi,%ebp - addl %eax,%ebx - andl %esi,%ebp - movl 36(%esp),%eax - addl %ebp,%ebx - # 40_59 41 - movl %edx,%ebp - xorl 44(%esp),%eax - xorl %edi,%ebp - xorl 4(%esp),%eax - andl %ecx,%ebp - xorl 24(%esp),%eax - roll $1,%eax - addl %esi,%ebp - rorl $2,%ecx - movl %ebx,%esi - roll $5,%esi - movl %eax,36(%esp) - leal 2400959708(%eax,%ebp,1),%eax - movl %edx,%ebp - addl %esi,%eax - andl %edi,%ebp - movl 40(%esp),%esi - addl %ebp,%eax - # 40_59 42 - movl %ecx,%ebp - xorl 48(%esp),%esi - xorl %edx,%ebp - xorl 8(%esp),%esi - andl %ebx,%ebp - xorl 28(%esp),%esi - roll $1,%esi - addl %edi,%ebp - rorl $2,%ebx - movl %eax,%edi - roll $5,%edi - movl %esi,40(%esp) - leal 2400959708(%esi,%ebp,1),%esi - movl %ecx,%ebp - addl %edi,%esi - andl %edx,%ebp - movl 44(%esp),%edi - addl %ebp,%esi - # 40_59 43 - movl %ebx,%ebp - xorl 52(%esp),%edi - xorl %ecx,%ebp - xorl 12(%esp),%edi - andl %eax,%ebp - xorl 32(%esp),%edi - roll $1,%edi - addl %edx,%ebp - rorl $2,%eax - movl %esi,%edx - roll $5,%edx - movl %edi,44(%esp) - leal 2400959708(%edi,%ebp,1),%edi - movl %ebx,%ebp - addl %edx,%edi - andl %ecx,%ebp - movl 48(%esp),%edx - addl %ebp,%edi - # 40_59 44 - movl %eax,%ebp - xorl 56(%esp),%edx - xorl %ebx,%ebp - xorl 16(%esp),%edx - andl %esi,%ebp - xorl 36(%esp),%edx - roll $1,%edx - addl %ecx,%ebp - rorl $2,%esi - movl %edi,%ecx - roll $5,%ecx - movl %edx,48(%esp) - leal 2400959708(%edx,%ebp,1),%edx - movl %eax,%ebp - addl %ecx,%edx - andl %ebx,%ebp - movl 52(%esp),%ecx - addl %ebp,%edx - # 40_59 45 - movl %esi,%ebp - xorl 60(%esp),%ecx - xorl %eax,%ebp - xorl 20(%esp),%ecx - andl %edi,%ebp - xorl 40(%esp),%ecx - roll $1,%ecx - addl %ebx,%ebp - rorl $2,%edi - movl %edx,%ebx - roll $5,%ebx - movl %ecx,52(%esp) - leal 2400959708(%ecx,%ebp,1),%ecx - movl %esi,%ebp - addl %ebx,%ecx - andl %eax,%ebp - movl 56(%esp),%ebx - addl %ebp,%ecx - # 40_59 46 - movl %edi,%ebp - xorl (%esp),%ebx - xorl %esi,%ebp - xorl 24(%esp),%ebx - andl %edx,%ebp - xorl 44(%esp),%ebx - roll $1,%ebx - addl %eax,%ebp - rorl $2,%edx - movl %ecx,%eax - roll $5,%eax - movl %ebx,56(%esp) - leal 2400959708(%ebx,%ebp,1),%ebx - movl %edi,%ebp - addl %eax,%ebx - andl %esi,%ebp - movl 60(%esp),%eax - addl %ebp,%ebx - # 40_59 47 - movl %edx,%ebp - xorl 4(%esp),%eax - xorl %edi,%ebp - xorl 28(%esp),%eax - andl %ecx,%ebp - xorl 48(%esp),%eax - roll $1,%eax - addl %esi,%ebp - rorl $2,%ecx - movl %ebx,%esi - roll $5,%esi - movl %eax,60(%esp) - leal 2400959708(%eax,%ebp,1),%eax - movl %edx,%ebp - addl %esi,%eax - andl %edi,%ebp - movl (%esp),%esi - addl %ebp,%eax - # 40_59 48 - movl %ecx,%ebp - xorl 8(%esp),%esi - xorl %edx,%ebp - xorl 32(%esp),%esi - andl %ebx,%ebp - xorl 52(%esp),%esi - roll $1,%esi - addl %edi,%ebp - rorl $2,%ebx - movl %eax,%edi - roll $5,%edi - movl %esi,(%esp) - leal 2400959708(%esi,%ebp,1),%esi - movl %ecx,%ebp - addl %edi,%esi - andl %edx,%ebp - movl 4(%esp),%edi - addl %ebp,%esi - # 40_59 49 - movl %ebx,%ebp - xorl 12(%esp),%edi - xorl %ecx,%ebp - xorl 36(%esp),%edi - andl %eax,%ebp - xorl 56(%esp),%edi - roll $1,%edi - addl %edx,%ebp - rorl $2,%eax - movl %esi,%edx - roll $5,%edx - movl %edi,4(%esp) - leal 2400959708(%edi,%ebp,1),%edi - movl %ebx,%ebp - addl %edx,%edi - andl %ecx,%ebp - movl 8(%esp),%edx - addl %ebp,%edi - # 40_59 50 - movl %eax,%ebp - xorl 16(%esp),%edx - xorl %ebx,%ebp - xorl 40(%esp),%edx - andl %esi,%ebp - xorl 60(%esp),%edx - roll $1,%edx - addl %ecx,%ebp - rorl $2,%esi - movl %edi,%ecx - roll $5,%ecx - movl %edx,8(%esp) - leal 2400959708(%edx,%ebp,1),%edx - movl %eax,%ebp - addl %ecx,%edx - andl %ebx,%ebp - movl 12(%esp),%ecx - addl %ebp,%edx - # 40_59 51 - movl %esi,%ebp - xorl 20(%esp),%ecx - xorl %eax,%ebp - xorl 44(%esp),%ecx - andl %edi,%ebp - xorl (%esp),%ecx - roll $1,%ecx - addl %ebx,%ebp - rorl $2,%edi - movl %edx,%ebx - roll $5,%ebx - movl %ecx,12(%esp) - leal 2400959708(%ecx,%ebp,1),%ecx - movl %esi,%ebp - addl %ebx,%ecx - andl %eax,%ebp - movl 16(%esp),%ebx - addl %ebp,%ecx - # 40_59 52 - movl %edi,%ebp - xorl 24(%esp),%ebx - xorl %esi,%ebp - xorl 48(%esp),%ebx - andl %edx,%ebp - xorl 4(%esp),%ebx - roll $1,%ebx - addl %eax,%ebp - rorl $2,%edx - movl %ecx,%eax - roll $5,%eax - movl %ebx,16(%esp) - leal 2400959708(%ebx,%ebp,1),%ebx - movl %edi,%ebp - addl %eax,%ebx - andl %esi,%ebp - movl 20(%esp),%eax - addl %ebp,%ebx - # 40_59 53 - movl %edx,%ebp - xorl 28(%esp),%eax - xorl %edi,%ebp - xorl 52(%esp),%eax - andl %ecx,%ebp - xorl 8(%esp),%eax - roll $1,%eax - addl %esi,%ebp - rorl $2,%ecx - movl %ebx,%esi - roll $5,%esi - movl %eax,20(%esp) - leal 2400959708(%eax,%ebp,1),%eax - movl %edx,%ebp - addl %esi,%eax - andl %edi,%ebp - movl 24(%esp),%esi - addl %ebp,%eax - # 40_59 54 - movl %ecx,%ebp - xorl 32(%esp),%esi - xorl %edx,%ebp - xorl 56(%esp),%esi - andl %ebx,%ebp - xorl 12(%esp),%esi - roll $1,%esi - addl %edi,%ebp - rorl $2,%ebx - movl %eax,%edi - roll $5,%edi - movl %esi,24(%esp) - leal 2400959708(%esi,%ebp,1),%esi - movl %ecx,%ebp - addl %edi,%esi - andl %edx,%ebp - movl 28(%esp),%edi - addl %ebp,%esi - # 40_59 55 - movl %ebx,%ebp - xorl 36(%esp),%edi - xorl %ecx,%ebp - xorl 60(%esp),%edi - andl %eax,%ebp - xorl 16(%esp),%edi - roll $1,%edi - addl %edx,%ebp - rorl $2,%eax - movl %esi,%edx - roll $5,%edx - movl %edi,28(%esp) - leal 2400959708(%edi,%ebp,1),%edi - movl %ebx,%ebp - addl %edx,%edi - andl %ecx,%ebp - movl 32(%esp),%edx - addl %ebp,%edi - # 40_59 56 - movl %eax,%ebp - xorl 40(%esp),%edx - xorl %ebx,%ebp - xorl (%esp),%edx - andl %esi,%ebp - xorl 20(%esp),%edx - roll $1,%edx - addl %ecx,%ebp - rorl $2,%esi - movl %edi,%ecx - roll $5,%ecx - movl %edx,32(%esp) - leal 2400959708(%edx,%ebp,1),%edx - movl %eax,%ebp - addl %ecx,%edx - andl %ebx,%ebp - movl 36(%esp),%ecx - addl %ebp,%edx - # 40_59 57 - movl %esi,%ebp - xorl 44(%esp),%ecx - xorl %eax,%ebp - xorl 4(%esp),%ecx - andl %edi,%ebp - xorl 24(%esp),%ecx - roll $1,%ecx - addl %ebx,%ebp - rorl $2,%edi - movl %edx,%ebx - roll $5,%ebx - movl %ecx,36(%esp) - leal 2400959708(%ecx,%ebp,1),%ecx - movl %esi,%ebp - addl %ebx,%ecx - andl %eax,%ebp - movl 40(%esp),%ebx - addl %ebp,%ecx - # 40_59 58 - movl %edi,%ebp - xorl 48(%esp),%ebx - xorl %esi,%ebp - xorl 8(%esp),%ebx - andl %edx,%ebp - xorl 28(%esp),%ebx - roll $1,%ebx - addl %eax,%ebp - rorl $2,%edx - movl %ecx,%eax - roll $5,%eax - movl %ebx,40(%esp) - leal 2400959708(%ebx,%ebp,1),%ebx - movl %edi,%ebp - addl %eax,%ebx - andl %esi,%ebp - movl 44(%esp),%eax - addl %ebp,%ebx - # 40_59 59 - movl %edx,%ebp - xorl 52(%esp),%eax - xorl %edi,%ebp - xorl 12(%esp),%eax - andl %ecx,%ebp - xorl 32(%esp),%eax - roll $1,%eax - addl %esi,%ebp - rorl $2,%ecx - movl %ebx,%esi - roll $5,%esi - movl %eax,44(%esp) - leal 2400959708(%eax,%ebp,1),%eax - movl %edx,%ebp - addl %esi,%eax - andl %edi,%ebp - movl 48(%esp),%esi - addl %ebp,%eax - # 20_39 60 - movl %ebx,%ebp - xorl 56(%esp),%esi - xorl %ecx,%ebp - xorl 16(%esp),%esi - xorl %edx,%ebp - xorl 36(%esp),%esi - roll $1,%esi - addl %ebp,%edi - rorl $2,%ebx - movl %eax,%ebp - roll $5,%ebp - movl %esi,48(%esp) - leal 3395469782(%esi,%edi,1),%esi - movl 52(%esp),%edi - addl %ebp,%esi - # 20_39 61 - movl %eax,%ebp - xorl 60(%esp),%edi - xorl %ebx,%ebp - xorl 20(%esp),%edi - xorl %ecx,%ebp - xorl 40(%esp),%edi - roll $1,%edi - addl %ebp,%edx - rorl $2,%eax - movl %esi,%ebp - roll $5,%ebp - movl %edi,52(%esp) - leal 3395469782(%edi,%edx,1),%edi - movl 56(%esp),%edx - addl %ebp,%edi - # 20_39 62 - movl %esi,%ebp - xorl (%esp),%edx - xorl %eax,%ebp - xorl 24(%esp),%edx - xorl %ebx,%ebp - xorl 44(%esp),%edx - roll $1,%edx - addl %ebp,%ecx - rorl $2,%esi - movl %edi,%ebp - roll $5,%ebp - movl %edx,56(%esp) - leal 3395469782(%edx,%ecx,1),%edx - movl 60(%esp),%ecx - addl %ebp,%edx - # 20_39 63 - movl %edi,%ebp - xorl 4(%esp),%ecx - xorl %esi,%ebp - xorl 28(%esp),%ecx - xorl %eax,%ebp - xorl 48(%esp),%ecx - roll $1,%ecx - addl %ebp,%ebx - rorl $2,%edi - movl %edx,%ebp - roll $5,%ebp - movl %ecx,60(%esp) - leal 3395469782(%ecx,%ebx,1),%ecx - movl (%esp),%ebx - addl %ebp,%ecx - # 20_39 64 - movl %edx,%ebp - xorl 8(%esp),%ebx - xorl %edi,%ebp - xorl 32(%esp),%ebx - xorl %esi,%ebp - xorl 52(%esp),%ebx - roll $1,%ebx - addl %ebp,%eax - rorl $2,%edx - movl %ecx,%ebp - roll $5,%ebp - movl %ebx,(%esp) - leal 3395469782(%ebx,%eax,1),%ebx - movl 4(%esp),%eax - addl %ebp,%ebx - # 20_39 65 - movl %ecx,%ebp - xorl 12(%esp),%eax - xorl %edx,%ebp - xorl 36(%esp),%eax - xorl %edi,%ebp - xorl 56(%esp),%eax - roll $1,%eax - addl %ebp,%esi - rorl $2,%ecx - movl %ebx,%ebp - roll $5,%ebp - movl %eax,4(%esp) - leal 3395469782(%eax,%esi,1),%eax - movl 8(%esp),%esi - addl %ebp,%eax - # 20_39 66 - movl %ebx,%ebp - xorl 16(%esp),%esi - xorl %ecx,%ebp - xorl 40(%esp),%esi - xorl %edx,%ebp - xorl 60(%esp),%esi - roll $1,%esi - addl %ebp,%edi - rorl $2,%ebx - movl %eax,%ebp - roll $5,%ebp - movl %esi,8(%esp) - leal 3395469782(%esi,%edi,1),%esi - movl 12(%esp),%edi - addl %ebp,%esi - # 20_39 67 - movl %eax,%ebp - xorl 20(%esp),%edi - xorl %ebx,%ebp - xorl 44(%esp),%edi - xorl %ecx,%ebp - xorl (%esp),%edi - roll $1,%edi - addl %ebp,%edx - rorl $2,%eax - movl %esi,%ebp - roll $5,%ebp - movl %edi,12(%esp) - leal 3395469782(%edi,%edx,1),%edi - movl 16(%esp),%edx - addl %ebp,%edi - # 20_39 68 - movl %esi,%ebp - xorl 24(%esp),%edx - xorl %eax,%ebp - xorl 48(%esp),%edx - xorl %ebx,%ebp - xorl 4(%esp),%edx - roll $1,%edx - addl %ebp,%ecx - rorl $2,%esi - movl %edi,%ebp - roll $5,%ebp - movl %edx,16(%esp) - leal 3395469782(%edx,%ecx,1),%edx - movl 20(%esp),%ecx - addl %ebp,%edx - # 20_39 69 - movl %edi,%ebp - xorl 28(%esp),%ecx - xorl %esi,%ebp - xorl 52(%esp),%ecx - xorl %eax,%ebp - xorl 8(%esp),%ecx - roll $1,%ecx - addl %ebp,%ebx - rorl $2,%edi - movl %edx,%ebp - roll $5,%ebp - movl %ecx,20(%esp) - leal 3395469782(%ecx,%ebx,1),%ecx - movl 24(%esp),%ebx - addl %ebp,%ecx - # 20_39 70 - movl %edx,%ebp - xorl 32(%esp),%ebx - xorl %edi,%ebp - xorl 56(%esp),%ebx - xorl %esi,%ebp - xorl 12(%esp),%ebx - roll $1,%ebx - addl %ebp,%eax - rorl $2,%edx - movl %ecx,%ebp - roll $5,%ebp - movl %ebx,24(%esp) - leal 3395469782(%ebx,%eax,1),%ebx - movl 28(%esp),%eax - addl %ebp,%ebx - # 20_39 71 - movl %ecx,%ebp - xorl 36(%esp),%eax - xorl %edx,%ebp - xorl 60(%esp),%eax - xorl %edi,%ebp - xorl 16(%esp),%eax - roll $1,%eax - addl %ebp,%esi - rorl $2,%ecx - movl %ebx,%ebp - roll $5,%ebp - movl %eax,28(%esp) - leal 3395469782(%eax,%esi,1),%eax - movl 32(%esp),%esi - addl %ebp,%eax - # 20_39 72 - movl %ebx,%ebp - xorl 40(%esp),%esi - xorl %ecx,%ebp - xorl (%esp),%esi - xorl %edx,%ebp - xorl 20(%esp),%esi - roll $1,%esi - addl %ebp,%edi - rorl $2,%ebx - movl %eax,%ebp - roll $5,%ebp - movl %esi,32(%esp) - leal 3395469782(%esi,%edi,1),%esi - movl 36(%esp),%edi - addl %ebp,%esi - # 20_39 73 - movl %eax,%ebp - xorl 44(%esp),%edi - xorl %ebx,%ebp - xorl 4(%esp),%edi - xorl %ecx,%ebp - xorl 24(%esp),%edi - roll $1,%edi - addl %ebp,%edx - rorl $2,%eax - movl %esi,%ebp - roll $5,%ebp - movl %edi,36(%esp) - leal 3395469782(%edi,%edx,1),%edi - movl 40(%esp),%edx - addl %ebp,%edi - # 20_39 74 - movl %esi,%ebp - xorl 48(%esp),%edx - xorl %eax,%ebp - xorl 8(%esp),%edx - xorl %ebx,%ebp - xorl 28(%esp),%edx - roll $1,%edx - addl %ebp,%ecx - rorl $2,%esi - movl %edi,%ebp - roll $5,%ebp - movl %edx,40(%esp) - leal 3395469782(%edx,%ecx,1),%edx - movl 44(%esp),%ecx - addl %ebp,%edx - # 20_39 75 - movl %edi,%ebp - xorl 52(%esp),%ecx - xorl %esi,%ebp - xorl 12(%esp),%ecx - xorl %eax,%ebp - xorl 32(%esp),%ecx - roll $1,%ecx - addl %ebp,%ebx - rorl $2,%edi - movl %edx,%ebp - roll $5,%ebp - movl %ecx,44(%esp) - leal 3395469782(%ecx,%ebx,1),%ecx - movl 48(%esp),%ebx - addl %ebp,%ecx - # 20_39 76 - movl %edx,%ebp - xorl 56(%esp),%ebx - xorl %edi,%ebp - xorl 16(%esp),%ebx - xorl %esi,%ebp - xorl 36(%esp),%ebx - roll $1,%ebx - addl %ebp,%eax - rorl $2,%edx - movl %ecx,%ebp - roll $5,%ebp - movl %ebx,48(%esp) - leal 3395469782(%ebx,%eax,1),%ebx - movl 52(%esp),%eax - addl %ebp,%ebx - # 20_39 77 - movl %ecx,%ebp - xorl 60(%esp),%eax - xorl %edx,%ebp - xorl 20(%esp),%eax - xorl %edi,%ebp - xorl 40(%esp),%eax - roll $1,%eax - addl %ebp,%esi - rorl $2,%ecx - movl %ebx,%ebp - roll $5,%ebp - leal 3395469782(%eax,%esi,1),%eax - movl 56(%esp),%esi - addl %ebp,%eax - # 20_39 78 - movl %ebx,%ebp - xorl (%esp),%esi - xorl %ecx,%ebp - xorl 24(%esp),%esi - xorl %edx,%ebp - xorl 44(%esp),%esi - roll $1,%esi - addl %ebp,%edi - rorl $2,%ebx - movl %eax,%ebp - roll $5,%ebp - leal 3395469782(%esi,%edi,1),%esi - movl 60(%esp),%edi - addl %ebp,%esi - # 20_39 79 - movl %eax,%ebp - xorl 4(%esp),%edi - xorl %ebx,%ebp - xorl 28(%esp),%edi - xorl %ecx,%ebp - xorl 48(%esp),%edi - roll $1,%edi - addl %ebp,%edx - rorl $2,%eax - movl %esi,%ebp - roll $5,%ebp - leal 3395469782(%edi,%edx,1),%edi - addl %ebp,%edi - movl 96(%esp),%ebp - movl 100(%esp),%edx - addl (%ebp),%edi - addl 4(%ebp),%esi - addl 8(%ebp),%eax - addl 12(%ebp),%ebx - addl 16(%ebp),%ecx - movl %edi,(%ebp) - addl $64,%edx - movl %esi,4(%ebp) - cmpl 104(%esp),%edx - movl %eax,8(%ebp) - movl %ecx,%edi - movl %ebx,12(%ebp) - movl %edx,%esi - movl %ecx,16(%ebp) - jb L002loop - addl $76,%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.private_extern __sha1_block_data_order_shaext -.align 4 -__sha1_block_data_order_shaext: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - call L003pic_point -L003pic_point: - popl %ebp - leal LK_XX_XX-L003pic_point(%ebp),%ebp -Lshaext_shortcut: - movl 20(%esp),%edi - movl %esp,%ebx - movl 24(%esp),%esi - movl 28(%esp),%ecx - subl $32,%esp - movdqu (%edi),%xmm0 - movd 16(%edi),%xmm1 - andl $-32,%esp - movdqa 80(%ebp),%xmm3 - movdqu (%esi),%xmm4 - pshufd $27,%xmm0,%xmm0 - movdqu 16(%esi),%xmm5 - pshufd $27,%xmm1,%xmm1 - movdqu 32(%esi),%xmm6 -.byte 102,15,56,0,227 - movdqu 48(%esi),%xmm7 -.byte 102,15,56,0,235 -.byte 102,15,56,0,243 -.byte 102,15,56,0,251 - jmp L004loop_shaext -.align 4,0x90 -L004loop_shaext: - decl %ecx - leal 64(%esi),%eax - movdqa %xmm1,(%esp) - paddd %xmm4,%xmm1 - cmovnel %eax,%esi - movdqa %xmm0,16(%esp) -.byte 15,56,201,229 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,0 -.byte 15,56,200,213 - pxor %xmm6,%xmm4 -.byte 15,56,201,238 -.byte 15,56,202,231 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,0 -.byte 15,56,200,206 - pxor %xmm7,%xmm5 -.byte 15,56,202,236 -.byte 15,56,201,247 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,0 -.byte 15,56,200,215 - pxor %xmm4,%xmm6 -.byte 15,56,201,252 -.byte 15,56,202,245 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,0 -.byte 15,56,200,204 - pxor %xmm5,%xmm7 -.byte 15,56,202,254 -.byte 15,56,201,229 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,0 -.byte 15,56,200,213 - pxor %xmm6,%xmm4 -.byte 15,56,201,238 -.byte 15,56,202,231 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,1 -.byte 15,56,200,206 - pxor %xmm7,%xmm5 -.byte 15,56,202,236 -.byte 15,56,201,247 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,1 -.byte 15,56,200,215 - pxor %xmm4,%xmm6 -.byte 15,56,201,252 -.byte 15,56,202,245 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,1 -.byte 15,56,200,204 - pxor %xmm5,%xmm7 -.byte 15,56,202,254 -.byte 15,56,201,229 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,1 -.byte 15,56,200,213 - pxor %xmm6,%xmm4 -.byte 15,56,201,238 -.byte 15,56,202,231 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,1 -.byte 15,56,200,206 - pxor %xmm7,%xmm5 -.byte 15,56,202,236 -.byte 15,56,201,247 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,2 -.byte 15,56,200,215 - pxor %xmm4,%xmm6 -.byte 15,56,201,252 -.byte 15,56,202,245 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,2 -.byte 15,56,200,204 - pxor %xmm5,%xmm7 -.byte 15,56,202,254 -.byte 15,56,201,229 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,2 -.byte 15,56,200,213 - pxor %xmm6,%xmm4 -.byte 15,56,201,238 -.byte 15,56,202,231 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,2 -.byte 15,56,200,206 - pxor %xmm7,%xmm5 -.byte 15,56,202,236 -.byte 15,56,201,247 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,2 -.byte 15,56,200,215 - pxor %xmm4,%xmm6 -.byte 15,56,201,252 -.byte 15,56,202,245 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,3 -.byte 15,56,200,204 - pxor %xmm5,%xmm7 -.byte 15,56,202,254 - movdqu (%esi),%xmm4 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,3 -.byte 15,56,200,213 - movdqu 16(%esi),%xmm5 -.byte 102,15,56,0,227 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,3 -.byte 15,56,200,206 - movdqu 32(%esi),%xmm6 -.byte 102,15,56,0,235 - movdqa %xmm0,%xmm2 -.byte 15,58,204,193,3 -.byte 15,56,200,215 - movdqu 48(%esi),%xmm7 -.byte 102,15,56,0,243 - movdqa %xmm0,%xmm1 -.byte 15,58,204,194,3 - movdqa (%esp),%xmm2 -.byte 102,15,56,0,251 -.byte 15,56,200,202 - paddd 16(%esp),%xmm0 - jnz L004loop_shaext - pshufd $27,%xmm0,%xmm0 - pshufd $27,%xmm1,%xmm1 - movdqu %xmm0,(%edi) - movd %xmm1,16(%edi) - movl %ebx,%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.private_extern __sha1_block_data_order_ssse3 -.align 4 -__sha1_block_data_order_ssse3: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - call L005pic_point -L005pic_point: - popl %ebp - leal LK_XX_XX-L005pic_point(%ebp),%ebp -Lssse3_shortcut: - movdqa (%ebp),%xmm7 - movdqa 16(%ebp),%xmm0 - movdqa 32(%ebp),%xmm1 - movdqa 48(%ebp),%xmm2 - movdqa 64(%ebp),%xmm6 - movl 20(%esp),%edi - movl 24(%esp),%ebp - movl 28(%esp),%edx - movl %esp,%esi - subl $208,%esp - andl $-64,%esp - movdqa %xmm0,112(%esp) - movdqa %xmm1,128(%esp) - movdqa %xmm2,144(%esp) - shll $6,%edx - movdqa %xmm7,160(%esp) - addl %ebp,%edx - movdqa %xmm6,176(%esp) - addl $64,%ebp - movl %edi,192(%esp) - movl %ebp,196(%esp) - movl %edx,200(%esp) - movl %esi,204(%esp) - movl (%edi),%eax - movl 4(%edi),%ebx - movl 8(%edi),%ecx - movl 12(%edi),%edx - movl 16(%edi),%edi - movl %ebx,%esi - movdqu -64(%ebp),%xmm0 - movdqu -48(%ebp),%xmm1 - movdqu -32(%ebp),%xmm2 - movdqu -16(%ebp),%xmm3 -.byte 102,15,56,0,198 -.byte 102,15,56,0,206 -.byte 102,15,56,0,214 - movdqa %xmm7,96(%esp) -.byte 102,15,56,0,222 - paddd %xmm7,%xmm0 - paddd %xmm7,%xmm1 - paddd %xmm7,%xmm2 - movdqa %xmm0,(%esp) - psubd %xmm7,%xmm0 - movdqa %xmm1,16(%esp) - psubd %xmm7,%xmm1 - movdqa %xmm2,32(%esp) - movl %ecx,%ebp - psubd %xmm7,%xmm2 - xorl %edx,%ebp - pshufd $238,%xmm0,%xmm4 - andl %ebp,%esi - jmp L006loop -.align 4,0x90 -L006loop: - rorl $2,%ebx - xorl %edx,%esi - movl %eax,%ebp - punpcklqdq %xmm1,%xmm4 - movdqa %xmm3,%xmm6 - addl (%esp),%edi - xorl %ecx,%ebx - paddd %xmm3,%xmm7 - movdqa %xmm0,64(%esp) - roll $5,%eax - addl %esi,%edi - psrldq $4,%xmm6 - andl %ebx,%ebp - xorl %ecx,%ebx - pxor %xmm0,%xmm4 - addl %eax,%edi - rorl $7,%eax - pxor %xmm2,%xmm6 - xorl %ecx,%ebp - movl %edi,%esi - addl 4(%esp),%edx - pxor %xmm6,%xmm4 - xorl %ebx,%eax - roll $5,%edi - movdqa %xmm7,48(%esp) - addl %ebp,%edx - andl %eax,%esi - movdqa %xmm4,%xmm0 - xorl %ebx,%eax - addl %edi,%edx - rorl $7,%edi - movdqa %xmm4,%xmm6 - xorl %ebx,%esi - pslldq $12,%xmm0 - paddd %xmm4,%xmm4 - movl %edx,%ebp - addl 8(%esp),%ecx - psrld $31,%xmm6 - xorl %eax,%edi - roll $5,%edx - movdqa %xmm0,%xmm7 - addl %esi,%ecx - andl %edi,%ebp - xorl %eax,%edi - psrld $30,%xmm0 - addl %edx,%ecx - rorl $7,%edx - por %xmm6,%xmm4 - xorl %eax,%ebp - movl %ecx,%esi - addl 12(%esp),%ebx - pslld $2,%xmm7 - xorl %edi,%edx - roll $5,%ecx - pxor %xmm0,%xmm4 - movdqa 96(%esp),%xmm0 - addl %ebp,%ebx - andl %edx,%esi - pxor %xmm7,%xmm4 - pshufd $238,%xmm1,%xmm5 - xorl %edi,%edx - addl %ecx,%ebx - rorl $7,%ecx - xorl %edi,%esi - movl %ebx,%ebp - punpcklqdq %xmm2,%xmm5 - movdqa %xmm4,%xmm7 - addl 16(%esp),%eax - xorl %edx,%ecx - paddd %xmm4,%xmm0 - movdqa %xmm1,80(%esp) - roll $5,%ebx - addl %esi,%eax - psrldq $4,%xmm7 - andl %ecx,%ebp - xorl %edx,%ecx - pxor %xmm1,%xmm5 - addl %ebx,%eax - rorl $7,%ebx - pxor %xmm3,%xmm7 - xorl %edx,%ebp - movl %eax,%esi - addl 20(%esp),%edi - pxor %xmm7,%xmm5 - xorl %ecx,%ebx - roll $5,%eax - movdqa %xmm0,(%esp) - addl %ebp,%edi - andl %ebx,%esi - movdqa %xmm5,%xmm1 - xorl %ecx,%ebx - addl %eax,%edi - rorl $7,%eax - movdqa %xmm5,%xmm7 - xorl %ecx,%esi - pslldq $12,%xmm1 - paddd %xmm5,%xmm5 - movl %edi,%ebp - addl 24(%esp),%edx - psrld $31,%xmm7 - xorl %ebx,%eax - roll $5,%edi - movdqa %xmm1,%xmm0 - addl %esi,%edx - andl %eax,%ebp - xorl %ebx,%eax - psrld $30,%xmm1 - addl %edi,%edx - rorl $7,%edi - por %xmm7,%xmm5 - xorl %ebx,%ebp - movl %edx,%esi - addl 28(%esp),%ecx - pslld $2,%xmm0 - xorl %eax,%edi - roll $5,%edx - pxor %xmm1,%xmm5 - movdqa 112(%esp),%xmm1 - addl %ebp,%ecx - andl %edi,%esi - pxor %xmm0,%xmm5 - pshufd $238,%xmm2,%xmm6 - xorl %eax,%edi - addl %edx,%ecx - rorl $7,%edx - xorl %eax,%esi - movl %ecx,%ebp - punpcklqdq %xmm3,%xmm6 - movdqa %xmm5,%xmm0 - addl 32(%esp),%ebx - xorl %edi,%edx - paddd %xmm5,%xmm1 - movdqa %xmm2,96(%esp) - roll $5,%ecx - addl %esi,%ebx - psrldq $4,%xmm0 - andl %edx,%ebp - xorl %edi,%edx - pxor %xmm2,%xmm6 - addl %ecx,%ebx - rorl $7,%ecx - pxor %xmm4,%xmm0 - xorl %edi,%ebp - movl %ebx,%esi - addl 36(%esp),%eax - pxor %xmm0,%xmm6 - xorl %edx,%ecx - roll $5,%ebx - movdqa %xmm1,16(%esp) - addl %ebp,%eax - andl %ecx,%esi - movdqa %xmm6,%xmm2 - xorl %edx,%ecx - addl %ebx,%eax - rorl $7,%ebx - movdqa %xmm6,%xmm0 - xorl %edx,%esi - pslldq $12,%xmm2 - paddd %xmm6,%xmm6 - movl %eax,%ebp - addl 40(%esp),%edi - psrld $31,%xmm0 - xorl %ecx,%ebx - roll $5,%eax - movdqa %xmm2,%xmm1 - addl %esi,%edi - andl %ebx,%ebp - xorl %ecx,%ebx - psrld $30,%xmm2 - addl %eax,%edi - rorl $7,%eax - por %xmm0,%xmm6 - xorl %ecx,%ebp - movdqa 64(%esp),%xmm0 - movl %edi,%esi - addl 44(%esp),%edx - pslld $2,%xmm1 - xorl %ebx,%eax - roll $5,%edi - pxor %xmm2,%xmm6 - movdqa 112(%esp),%xmm2 - addl %ebp,%edx - andl %eax,%esi - pxor %xmm1,%xmm6 - pshufd $238,%xmm3,%xmm7 - xorl %ebx,%eax - addl %edi,%edx - rorl $7,%edi - xorl %ebx,%esi - movl %edx,%ebp - punpcklqdq %xmm4,%xmm7 - movdqa %xmm6,%xmm1 - addl 48(%esp),%ecx - xorl %eax,%edi - paddd %xmm6,%xmm2 - movdqa %xmm3,64(%esp) - roll $5,%edx - addl %esi,%ecx - psrldq $4,%xmm1 - andl %edi,%ebp - xorl %eax,%edi - pxor %xmm3,%xmm7 - addl %edx,%ecx - rorl $7,%edx - pxor %xmm5,%xmm1 - xorl %eax,%ebp - movl %ecx,%esi - addl 52(%esp),%ebx - pxor %xmm1,%xmm7 - xorl %edi,%edx - roll $5,%ecx - movdqa %xmm2,32(%esp) - addl %ebp,%ebx - andl %edx,%esi - movdqa %xmm7,%xmm3 - xorl %edi,%edx - addl %ecx,%ebx - rorl $7,%ecx - movdqa %xmm7,%xmm1 - xorl %edi,%esi - pslldq $12,%xmm3 - paddd %xmm7,%xmm7 - movl %ebx,%ebp - addl 56(%esp),%eax - psrld $31,%xmm1 - xorl %edx,%ecx - roll $5,%ebx - movdqa %xmm3,%xmm2 - addl %esi,%eax - andl %ecx,%ebp - xorl %edx,%ecx - psrld $30,%xmm3 - addl %ebx,%eax - rorl $7,%ebx - por %xmm1,%xmm7 - xorl %edx,%ebp - movdqa 80(%esp),%xmm1 - movl %eax,%esi - addl 60(%esp),%edi - pslld $2,%xmm2 - xorl %ecx,%ebx - roll $5,%eax - pxor %xmm3,%xmm7 - movdqa 112(%esp),%xmm3 - addl %ebp,%edi - andl %ebx,%esi - pxor %xmm2,%xmm7 - pshufd $238,%xmm6,%xmm2 - xorl %ecx,%ebx - addl %eax,%edi - rorl $7,%eax - pxor %xmm4,%xmm0 - punpcklqdq %xmm7,%xmm2 - xorl %ecx,%esi - movl %edi,%ebp - addl (%esp),%edx - pxor %xmm1,%xmm0 - movdqa %xmm4,80(%esp) - xorl %ebx,%eax - roll $5,%edi - movdqa %xmm3,%xmm4 - addl %esi,%edx - paddd %xmm7,%xmm3 - andl %eax,%ebp - pxor %xmm2,%xmm0 - xorl %ebx,%eax - addl %edi,%edx - rorl $7,%edi - xorl %ebx,%ebp - movdqa %xmm0,%xmm2 - movdqa %xmm3,48(%esp) - movl %edx,%esi - addl 4(%esp),%ecx - xorl %eax,%edi - roll $5,%edx - pslld $2,%xmm0 - addl %ebp,%ecx - andl %edi,%esi - psrld $30,%xmm2 - xorl %eax,%edi - addl %edx,%ecx - rorl $7,%edx - xorl %eax,%esi - movl %ecx,%ebp - addl 8(%esp),%ebx - xorl %edi,%edx - roll $5,%ecx - por %xmm2,%xmm0 - addl %esi,%ebx - andl %edx,%ebp - movdqa 96(%esp),%xmm2 - xorl %edi,%edx - addl %ecx,%ebx - addl 12(%esp),%eax - xorl %edi,%ebp - movl %ebx,%esi - pshufd $238,%xmm7,%xmm3 - roll $5,%ebx - addl %ebp,%eax - xorl %edx,%esi - rorl $7,%ecx - addl %ebx,%eax - addl 16(%esp),%edi - pxor %xmm5,%xmm1 - punpcklqdq %xmm0,%xmm3 - xorl %ecx,%esi - movl %eax,%ebp - roll $5,%eax - pxor %xmm2,%xmm1 - movdqa %xmm5,96(%esp) - addl %esi,%edi - xorl %ecx,%ebp - movdqa %xmm4,%xmm5 - rorl $7,%ebx - paddd %xmm0,%xmm4 - addl %eax,%edi - pxor %xmm3,%xmm1 - addl 20(%esp),%edx - xorl %ebx,%ebp - movl %edi,%esi - roll $5,%edi - movdqa %xmm1,%xmm3 - movdqa %xmm4,(%esp) - addl %ebp,%edx - xorl %ebx,%esi - rorl $7,%eax - addl %edi,%edx - pslld $2,%xmm1 - addl 24(%esp),%ecx - xorl %eax,%esi - psrld $30,%xmm3 - movl %edx,%ebp - roll $5,%edx - addl %esi,%ecx - xorl %eax,%ebp - rorl $7,%edi - addl %edx,%ecx - por %xmm3,%xmm1 - addl 28(%esp),%ebx - xorl %edi,%ebp - movdqa 64(%esp),%xmm3 - movl %ecx,%esi - roll $5,%ecx - addl %ebp,%ebx - xorl %edi,%esi - rorl $7,%edx - pshufd $238,%xmm0,%xmm4 - addl %ecx,%ebx - addl 32(%esp),%eax - pxor %xmm6,%xmm2 - punpcklqdq %xmm1,%xmm4 - xorl %edx,%esi - movl %ebx,%ebp - roll $5,%ebx - pxor %xmm3,%xmm2 - movdqa %xmm6,64(%esp) - addl %esi,%eax - xorl %edx,%ebp - movdqa 128(%esp),%xmm6 - rorl $7,%ecx - paddd %xmm1,%xmm5 - addl %ebx,%eax - pxor %xmm4,%xmm2 - addl 36(%esp),%edi - xorl %ecx,%ebp - movl %eax,%esi - roll $5,%eax - movdqa %xmm2,%xmm4 - movdqa %xmm5,16(%esp) - addl %ebp,%edi - xorl %ecx,%esi - rorl $7,%ebx - addl %eax,%edi - pslld $2,%xmm2 - addl 40(%esp),%edx - xorl %ebx,%esi - psrld $30,%xmm4 - movl %edi,%ebp - roll $5,%edi - addl %esi,%edx - xorl %ebx,%ebp - rorl $7,%eax - addl %edi,%edx - por %xmm4,%xmm2 - addl 44(%esp),%ecx - xorl %eax,%ebp - movdqa 80(%esp),%xmm4 - movl %edx,%esi - roll $5,%edx - addl %ebp,%ecx - xorl %eax,%esi - rorl $7,%edi - pshufd $238,%xmm1,%xmm5 - addl %edx,%ecx - addl 48(%esp),%ebx - pxor %xmm7,%xmm3 - punpcklqdq %xmm2,%xmm5 - xorl %edi,%esi - movl %ecx,%ebp - roll $5,%ecx - pxor %xmm4,%xmm3 - movdqa %xmm7,80(%esp) - addl %esi,%ebx - xorl %edi,%ebp - movdqa %xmm6,%xmm7 - rorl $7,%edx - paddd %xmm2,%xmm6 - addl %ecx,%ebx - pxor %xmm5,%xmm3 - addl 52(%esp),%eax - xorl %edx,%ebp - movl %ebx,%esi - roll $5,%ebx - movdqa %xmm3,%xmm5 - movdqa %xmm6,32(%esp) - addl %ebp,%eax - xorl %edx,%esi - rorl $7,%ecx - addl %ebx,%eax - pslld $2,%xmm3 - addl 56(%esp),%edi - xorl %ecx,%esi - psrld $30,%xmm5 - movl %eax,%ebp - roll $5,%eax - addl %esi,%edi - xorl %ecx,%ebp - rorl $7,%ebx - addl %eax,%edi - por %xmm5,%xmm3 - addl 60(%esp),%edx - xorl %ebx,%ebp - movdqa 96(%esp),%xmm5 - movl %edi,%esi - roll $5,%edi - addl %ebp,%edx - xorl %ebx,%esi - rorl $7,%eax - pshufd $238,%xmm2,%xmm6 - addl %edi,%edx - addl (%esp),%ecx - pxor %xmm0,%xmm4 - punpcklqdq %xmm3,%xmm6 - xorl %eax,%esi - movl %edx,%ebp - roll $5,%edx - pxor %xmm5,%xmm4 - movdqa %xmm0,96(%esp) - addl %esi,%ecx - xorl %eax,%ebp - movdqa %xmm7,%xmm0 - rorl $7,%edi - paddd %xmm3,%xmm7 - addl %edx,%ecx - pxor %xmm6,%xmm4 - addl 4(%esp),%ebx - xorl %edi,%ebp - movl %ecx,%esi - roll $5,%ecx - movdqa %xmm4,%xmm6 - movdqa %xmm7,48(%esp) - addl %ebp,%ebx - xorl %edi,%esi - rorl $7,%edx - addl %ecx,%ebx - pslld $2,%xmm4 - addl 8(%esp),%eax - xorl %edx,%esi - psrld $30,%xmm6 - movl %ebx,%ebp - roll $5,%ebx - addl %esi,%eax - xorl %edx,%ebp - rorl $7,%ecx - addl %ebx,%eax - por %xmm6,%xmm4 - addl 12(%esp),%edi - xorl %ecx,%ebp - movdqa 64(%esp),%xmm6 - movl %eax,%esi - roll $5,%eax - addl %ebp,%edi - xorl %ecx,%esi - rorl $7,%ebx - pshufd $238,%xmm3,%xmm7 - addl %eax,%edi - addl 16(%esp),%edx - pxor %xmm1,%xmm5 - punpcklqdq %xmm4,%xmm7 - xorl %ebx,%esi - movl %edi,%ebp - roll $5,%edi - pxor %xmm6,%xmm5 - movdqa %xmm1,64(%esp) - addl %esi,%edx - xorl %ebx,%ebp - movdqa %xmm0,%xmm1 - rorl $7,%eax - paddd %xmm4,%xmm0 - addl %edi,%edx - pxor %xmm7,%xmm5 - addl 20(%esp),%ecx - xorl %eax,%ebp - movl %edx,%esi - roll $5,%edx - movdqa %xmm5,%xmm7 - movdqa %xmm0,(%esp) - addl %ebp,%ecx - xorl %eax,%esi - rorl $7,%edi - addl %edx,%ecx - pslld $2,%xmm5 - addl 24(%esp),%ebx - xorl %edi,%esi - psrld $30,%xmm7 - movl %ecx,%ebp - roll $5,%ecx - addl %esi,%ebx - xorl %edi,%ebp - rorl $7,%edx - addl %ecx,%ebx - por %xmm7,%xmm5 - addl 28(%esp),%eax - movdqa 80(%esp),%xmm7 - rorl $7,%ecx - movl %ebx,%esi - xorl %edx,%ebp - roll $5,%ebx - pshufd $238,%xmm4,%xmm0 - addl %ebp,%eax - xorl %ecx,%esi - xorl %edx,%ecx - addl %ebx,%eax - addl 32(%esp),%edi - pxor %xmm2,%xmm6 - punpcklqdq %xmm5,%xmm0 - andl %ecx,%esi - xorl %edx,%ecx - rorl $7,%ebx - pxor %xmm7,%xmm6 - movdqa %xmm2,80(%esp) - movl %eax,%ebp - xorl %ecx,%esi - roll $5,%eax - movdqa %xmm1,%xmm2 - addl %esi,%edi - paddd %xmm5,%xmm1 - xorl %ebx,%ebp - pxor %xmm0,%xmm6 - xorl %ecx,%ebx - addl %eax,%edi - addl 36(%esp),%edx - andl %ebx,%ebp - movdqa %xmm6,%xmm0 - movdqa %xmm1,16(%esp) - xorl %ecx,%ebx - rorl $7,%eax - movl %edi,%esi - xorl %ebx,%ebp - roll $5,%edi - pslld $2,%xmm6 - addl %ebp,%edx - xorl %eax,%esi - psrld $30,%xmm0 - xorl %ebx,%eax - addl %edi,%edx - addl 40(%esp),%ecx - andl %eax,%esi - xorl %ebx,%eax - rorl $7,%edi - por %xmm0,%xmm6 - movl %edx,%ebp - xorl %eax,%esi - movdqa 96(%esp),%xmm0 - roll $5,%edx - addl %esi,%ecx - xorl %edi,%ebp - xorl %eax,%edi - addl %edx,%ecx - pshufd $238,%xmm5,%xmm1 - addl 44(%esp),%ebx - andl %edi,%ebp - xorl %eax,%edi - rorl $7,%edx - movl %ecx,%esi - xorl %edi,%ebp - roll $5,%ecx - addl %ebp,%ebx - xorl %edx,%esi - xorl %edi,%edx - addl %ecx,%ebx - addl 48(%esp),%eax - pxor %xmm3,%xmm7 - punpcklqdq %xmm6,%xmm1 - andl %edx,%esi - xorl %edi,%edx - rorl $7,%ecx - pxor %xmm0,%xmm7 - movdqa %xmm3,96(%esp) - movl %ebx,%ebp - xorl %edx,%esi - roll $5,%ebx - movdqa 144(%esp),%xmm3 - addl %esi,%eax - paddd %xmm6,%xmm2 - xorl %ecx,%ebp - pxor %xmm1,%xmm7 - xorl %edx,%ecx - addl %ebx,%eax - addl 52(%esp),%edi - andl %ecx,%ebp - movdqa %xmm7,%xmm1 - movdqa %xmm2,32(%esp) - xorl %edx,%ecx - rorl $7,%ebx - movl %eax,%esi - xorl %ecx,%ebp - roll $5,%eax - pslld $2,%xmm7 - addl %ebp,%edi - xorl %ebx,%esi - psrld $30,%xmm1 - xorl %ecx,%ebx - addl %eax,%edi - addl 56(%esp),%edx - andl %ebx,%esi - xorl %ecx,%ebx - rorl $7,%eax - por %xmm1,%xmm7 - movl %edi,%ebp - xorl %ebx,%esi - movdqa 64(%esp),%xmm1 - roll $5,%edi - addl %esi,%edx - xorl %eax,%ebp - xorl %ebx,%eax - addl %edi,%edx - pshufd $238,%xmm6,%xmm2 - addl 60(%esp),%ecx - andl %eax,%ebp - xorl %ebx,%eax - rorl $7,%edi - movl %edx,%esi - xorl %eax,%ebp - roll $5,%edx - addl %ebp,%ecx - xorl %edi,%esi - xorl %eax,%edi - addl %edx,%ecx - addl (%esp),%ebx - pxor %xmm4,%xmm0 - punpcklqdq %xmm7,%xmm2 - andl %edi,%esi - xorl %eax,%edi - rorl $7,%edx - pxor %xmm1,%xmm0 - movdqa %xmm4,64(%esp) - movl %ecx,%ebp - xorl %edi,%esi - roll $5,%ecx - movdqa %xmm3,%xmm4 - addl %esi,%ebx - paddd %xmm7,%xmm3 - xorl %edx,%ebp - pxor %xmm2,%xmm0 - xorl %edi,%edx - addl %ecx,%ebx - addl 4(%esp),%eax - andl %edx,%ebp - movdqa %xmm0,%xmm2 - movdqa %xmm3,48(%esp) - xorl %edi,%edx - rorl $7,%ecx - movl %ebx,%esi - xorl %edx,%ebp - roll $5,%ebx - pslld $2,%xmm0 - addl %ebp,%eax - xorl %ecx,%esi - psrld $30,%xmm2 - xorl %edx,%ecx - addl %ebx,%eax - addl 8(%esp),%edi - andl %ecx,%esi - xorl %edx,%ecx - rorl $7,%ebx - por %xmm2,%xmm0 - movl %eax,%ebp - xorl %ecx,%esi - movdqa 80(%esp),%xmm2 - roll $5,%eax - addl %esi,%edi - xorl %ebx,%ebp - xorl %ecx,%ebx - addl %eax,%edi - pshufd $238,%xmm7,%xmm3 - addl 12(%esp),%edx - andl %ebx,%ebp - xorl %ecx,%ebx - rorl $7,%eax - movl %edi,%esi - xorl %ebx,%ebp - roll $5,%edi - addl %ebp,%edx - xorl %eax,%esi - xorl %ebx,%eax - addl %edi,%edx - addl 16(%esp),%ecx - pxor %xmm5,%xmm1 - punpcklqdq %xmm0,%xmm3 - andl %eax,%esi - xorl %ebx,%eax - rorl $7,%edi - pxor %xmm2,%xmm1 - movdqa %xmm5,80(%esp) - movl %edx,%ebp - xorl %eax,%esi - roll $5,%edx - movdqa %xmm4,%xmm5 - addl %esi,%ecx - paddd %xmm0,%xmm4 - xorl %edi,%ebp - pxor %xmm3,%xmm1 - xorl %eax,%edi - addl %edx,%ecx - addl 20(%esp),%ebx - andl %edi,%ebp - movdqa %xmm1,%xmm3 - movdqa %xmm4,(%esp) - xorl %eax,%edi - rorl $7,%edx - movl %ecx,%esi - xorl %edi,%ebp - roll $5,%ecx - pslld $2,%xmm1 - addl %ebp,%ebx - xorl %edx,%esi - psrld $30,%xmm3 - xorl %edi,%edx - addl %ecx,%ebx - addl 24(%esp),%eax - andl %edx,%esi - xorl %edi,%edx - rorl $7,%ecx - por %xmm3,%xmm1 - movl %ebx,%ebp - xorl %edx,%esi - movdqa 96(%esp),%xmm3 - roll $5,%ebx - addl %esi,%eax - xorl %ecx,%ebp - xorl %edx,%ecx - addl %ebx,%eax - pshufd $238,%xmm0,%xmm4 - addl 28(%esp),%edi - andl %ecx,%ebp - xorl %edx,%ecx - rorl $7,%ebx - movl %eax,%esi - xorl %ecx,%ebp - roll $5,%eax - addl %ebp,%edi - xorl %ebx,%esi - xorl %ecx,%ebx - addl %eax,%edi - addl 32(%esp),%edx - pxor %xmm6,%xmm2 - punpcklqdq %xmm1,%xmm4 - andl %ebx,%esi - xorl %ecx,%ebx - rorl $7,%eax - pxor %xmm3,%xmm2 - movdqa %xmm6,96(%esp) - movl %edi,%ebp - xorl %ebx,%esi - roll $5,%edi - movdqa %xmm5,%xmm6 - addl %esi,%edx - paddd %xmm1,%xmm5 - xorl %eax,%ebp - pxor %xmm4,%xmm2 - xorl %ebx,%eax - addl %edi,%edx - addl 36(%esp),%ecx - andl %eax,%ebp - movdqa %xmm2,%xmm4 - movdqa %xmm5,16(%esp) - xorl %ebx,%eax - rorl $7,%edi - movl %edx,%esi - xorl %eax,%ebp - roll $5,%edx - pslld $2,%xmm2 - addl %ebp,%ecx - xorl %edi,%esi - psrld $30,%xmm4 - xorl %eax,%edi - addl %edx,%ecx - addl 40(%esp),%ebx - andl %edi,%esi - xorl %eax,%edi - rorl $7,%edx - por %xmm4,%xmm2 - movl %ecx,%ebp - xorl %edi,%esi - movdqa 64(%esp),%xmm4 - roll $5,%ecx - addl %esi,%ebx - xorl %edx,%ebp - xorl %edi,%edx - addl %ecx,%ebx - pshufd $238,%xmm1,%xmm5 - addl 44(%esp),%eax - andl %edx,%ebp - xorl %edi,%edx - rorl $7,%ecx - movl %ebx,%esi - xorl %edx,%ebp - roll $5,%ebx - addl %ebp,%eax - xorl %edx,%esi - addl %ebx,%eax - addl 48(%esp),%edi - pxor %xmm7,%xmm3 - punpcklqdq %xmm2,%xmm5 - xorl %ecx,%esi - movl %eax,%ebp - roll $5,%eax - pxor %xmm4,%xmm3 - movdqa %xmm7,64(%esp) - addl %esi,%edi - xorl %ecx,%ebp - movdqa %xmm6,%xmm7 - rorl $7,%ebx - paddd %xmm2,%xmm6 - addl %eax,%edi - pxor %xmm5,%xmm3 - addl 52(%esp),%edx - xorl %ebx,%ebp - movl %edi,%esi - roll $5,%edi - movdqa %xmm3,%xmm5 - movdqa %xmm6,32(%esp) - addl %ebp,%edx - xorl %ebx,%esi - rorl $7,%eax - addl %edi,%edx - pslld $2,%xmm3 - addl 56(%esp),%ecx - xorl %eax,%esi - psrld $30,%xmm5 - movl %edx,%ebp - roll $5,%edx - addl %esi,%ecx - xorl %eax,%ebp - rorl $7,%edi - addl %edx,%ecx - por %xmm5,%xmm3 - addl 60(%esp),%ebx - xorl %edi,%ebp - movl %ecx,%esi - roll $5,%ecx - addl %ebp,%ebx - xorl %edi,%esi - rorl $7,%edx - addl %ecx,%ebx - addl (%esp),%eax - xorl %edx,%esi - movl %ebx,%ebp - roll $5,%ebx - addl %esi,%eax - xorl %edx,%ebp - rorl $7,%ecx - paddd %xmm3,%xmm7 - addl %ebx,%eax - addl 4(%esp),%edi - xorl %ecx,%ebp - movl %eax,%esi - movdqa %xmm7,48(%esp) - roll $5,%eax - addl %ebp,%edi - xorl %ecx,%esi - rorl $7,%ebx - addl %eax,%edi - addl 8(%esp),%edx - xorl %ebx,%esi - movl %edi,%ebp - roll $5,%edi - addl %esi,%edx - xorl %ebx,%ebp - rorl $7,%eax - addl %edi,%edx - addl 12(%esp),%ecx - xorl %eax,%ebp - movl %edx,%esi - roll $5,%edx - addl %ebp,%ecx - xorl %eax,%esi - rorl $7,%edi - addl %edx,%ecx - movl 196(%esp),%ebp - cmpl 200(%esp),%ebp - je L007done - movdqa 160(%esp),%xmm7 - movdqa 176(%esp),%xmm6 - movdqu (%ebp),%xmm0 - movdqu 16(%ebp),%xmm1 - movdqu 32(%ebp),%xmm2 - movdqu 48(%ebp),%xmm3 - addl $64,%ebp -.byte 102,15,56,0,198 - movl %ebp,196(%esp) - movdqa %xmm7,96(%esp) - addl 16(%esp),%ebx - xorl %edi,%esi - movl %ecx,%ebp - roll $5,%ecx - addl %esi,%ebx - xorl %edi,%ebp - rorl $7,%edx -.byte 102,15,56,0,206 - addl %ecx,%ebx - addl 20(%esp),%eax - xorl %edx,%ebp - movl %ebx,%esi - paddd %xmm7,%xmm0 - roll $5,%ebx - addl %ebp,%eax - xorl %edx,%esi - rorl $7,%ecx - movdqa %xmm0,(%esp) - addl %ebx,%eax - addl 24(%esp),%edi - xorl %ecx,%esi - movl %eax,%ebp - psubd %xmm7,%xmm0 - roll $5,%eax - addl %esi,%edi - xorl %ecx,%ebp - rorl $7,%ebx - addl %eax,%edi - addl 28(%esp),%edx - xorl %ebx,%ebp - movl %edi,%esi - roll $5,%edi - addl %ebp,%edx - xorl %ebx,%esi - rorl $7,%eax - addl %edi,%edx - addl 32(%esp),%ecx - xorl %eax,%esi - movl %edx,%ebp - roll $5,%edx - addl %esi,%ecx - xorl %eax,%ebp - rorl $7,%edi -.byte 102,15,56,0,214 - addl %edx,%ecx - addl 36(%esp),%ebx - xorl %edi,%ebp - movl %ecx,%esi - paddd %xmm7,%xmm1 - roll $5,%ecx - addl %ebp,%ebx - xorl %edi,%esi - rorl $7,%edx - movdqa %xmm1,16(%esp) - addl %ecx,%ebx - addl 40(%esp),%eax - xorl %edx,%esi - movl %ebx,%ebp - psubd %xmm7,%xmm1 - roll $5,%ebx - addl %esi,%eax - xorl %edx,%ebp - rorl $7,%ecx - addl %ebx,%eax - addl 44(%esp),%edi - xorl %ecx,%ebp - movl %eax,%esi - roll $5,%eax - addl %ebp,%edi - xorl %ecx,%esi - rorl $7,%ebx - addl %eax,%edi - addl 48(%esp),%edx - xorl %ebx,%esi - movl %edi,%ebp - roll $5,%edi - addl %esi,%edx - xorl %ebx,%ebp - rorl $7,%eax -.byte 102,15,56,0,222 - addl %edi,%edx - addl 52(%esp),%ecx - xorl %eax,%ebp - movl %edx,%esi - paddd %xmm7,%xmm2 - roll $5,%edx - addl %ebp,%ecx - xorl %eax,%esi - rorl $7,%edi - movdqa %xmm2,32(%esp) - addl %edx,%ecx - addl 56(%esp),%ebx - xorl %edi,%esi - movl %ecx,%ebp - psubd %xmm7,%xmm2 - roll $5,%ecx - addl %esi,%ebx - xorl %edi,%ebp - rorl $7,%edx - addl %ecx,%ebx - addl 60(%esp),%eax - xorl %edx,%ebp - movl %ebx,%esi - roll $5,%ebx - addl %ebp,%eax - rorl $7,%ecx - addl %ebx,%eax - movl 192(%esp),%ebp - addl (%ebp),%eax - addl 4(%ebp),%esi - addl 8(%ebp),%ecx - movl %eax,(%ebp) - addl 12(%ebp),%edx - movl %esi,4(%ebp) - addl 16(%ebp),%edi - movl %ecx,8(%ebp) - movl %ecx,%ebx - movl %edx,12(%ebp) - xorl %edx,%ebx - movl %edi,16(%ebp) - movl %esi,%ebp - pshufd $238,%xmm0,%xmm4 - andl %ebx,%esi - movl %ebp,%ebx - jmp L006loop -.align 4,0x90 -L007done: - addl 16(%esp),%ebx - xorl %edi,%esi - movl %ecx,%ebp - roll $5,%ecx - addl %esi,%ebx - xorl %edi,%ebp - rorl $7,%edx - addl %ecx,%ebx - addl 20(%esp),%eax - xorl %edx,%ebp - movl %ebx,%esi - roll $5,%ebx - addl %ebp,%eax - xorl %edx,%esi - rorl $7,%ecx - addl %ebx,%eax - addl 24(%esp),%edi - xorl %ecx,%esi - movl %eax,%ebp - roll $5,%eax - addl %esi,%edi - xorl %ecx,%ebp - rorl $7,%ebx - addl %eax,%edi - addl 28(%esp),%edx - xorl %ebx,%ebp - movl %edi,%esi - roll $5,%edi - addl %ebp,%edx - xorl %ebx,%esi - rorl $7,%eax - addl %edi,%edx - addl 32(%esp),%ecx - xorl %eax,%esi - movl %edx,%ebp - roll $5,%edx - addl %esi,%ecx - xorl %eax,%ebp - rorl $7,%edi - addl %edx,%ecx - addl 36(%esp),%ebx - xorl %edi,%ebp - movl %ecx,%esi - roll $5,%ecx - addl %ebp,%ebx - xorl %edi,%esi - rorl $7,%edx - addl %ecx,%ebx - addl 40(%esp),%eax - xorl %edx,%esi - movl %ebx,%ebp - roll $5,%ebx - addl %esi,%eax - xorl %edx,%ebp - rorl $7,%ecx - addl %ebx,%eax - addl 44(%esp),%edi - xorl %ecx,%ebp - movl %eax,%esi - roll $5,%eax - addl %ebp,%edi - xorl %ecx,%esi - rorl $7,%ebx - addl %eax,%edi - addl 48(%esp),%edx - xorl %ebx,%esi - movl %edi,%ebp - roll $5,%edi - addl %esi,%edx - xorl %ebx,%ebp - rorl $7,%eax - addl %edi,%edx - addl 52(%esp),%ecx - xorl %eax,%ebp - movl %edx,%esi - roll $5,%edx - addl %ebp,%ecx - xorl %eax,%esi - rorl $7,%edi - addl %edx,%ecx - addl 56(%esp),%ebx - xorl %edi,%esi - movl %ecx,%ebp - roll $5,%ecx - addl %esi,%ebx - xorl %edi,%ebp - rorl $7,%edx - addl %ecx,%ebx - addl 60(%esp),%eax - xorl %edx,%ebp - movl %ebx,%esi - roll $5,%ebx - addl %ebp,%eax - rorl $7,%ecx - addl %ebx,%eax - movl 192(%esp),%ebp - addl (%ebp),%eax - movl 204(%esp),%esp - addl 4(%ebp),%esi - addl 8(%ebp),%ecx - movl %eax,(%ebp) - addl 12(%ebp),%edx - movl %esi,4(%ebp) - addl 16(%ebp),%edi - movl %ecx,8(%ebp) - movl %edx,12(%ebp) - movl %edi,16(%ebp) - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.align 6,0x90 -LK_XX_XX: -.long 1518500249,1518500249,1518500249,1518500249 -.long 1859775393,1859775393,1859775393,1859775393 -.long 2400959708,2400959708,2400959708,2400959708 -.long 3395469782,3395469782,3395469782,3395469782 -.long 66051,67438087,134810123,202182159 -.byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -.byte 83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115 -.byte 102,111,114,109,32,102,111,114,32,120,56,54,44,32,67,82 -.byte 89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112 -.byte 114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.section __IMPORT,__pointers,non_lazy_symbol_pointers -L_OPENSSL_ia32cap_P$non_lazy_ptr: -.indirect_symbol _OPENSSL_ia32cap_P -.long 0 -#endif diff --git a/third_party/boringssl/mac-x86/crypto/sha/sha256-586.S b/third_party/boringssl/mac-x86/crypto/sha/sha256-586.S deleted file mode 100644 index f0ba612fabb90..0000000000000 --- a/third_party/boringssl/mac-x86/crypto/sha/sha256-586.S +++ /dev/null @@ -1,4581 +0,0 @@ -#if defined(__i386__) -.file "sha512-586.S" -.text -.globl _sha256_block_data_order -.private_extern _sha256_block_data_order -.align 4 -_sha256_block_data_order: -L_sha256_block_data_order_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%eax - movl %esp,%ebx - call L000pic_point -L000pic_point: - popl %ebp - leal L001K256-L000pic_point(%ebp),%ebp - subl $16,%esp - andl $-64,%esp - shll $6,%eax - addl %edi,%eax - movl %esi,(%esp) - movl %edi,4(%esp) - movl %eax,8(%esp) - movl %ebx,12(%esp) - movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L001K256(%ebp),%edx - movl (%edx),%ecx - movl 4(%edx),%ebx - testl $1048576,%ecx - jnz L002loop - movl 8(%edx),%edx - testl $16777216,%ecx - jz L003no_xmm - andl $1073741824,%ecx - andl $268435968,%ebx - testl $536870912,%edx - jnz L004shaext - orl %ebx,%ecx - andl $1342177280,%ecx - cmpl $1342177280,%ecx - testl $512,%ebx - jnz L005SSSE3 -L003no_xmm: - subl %edi,%eax - cmpl $256,%eax - jae L006unrolled - jmp L002loop -.align 4,0x90 -L002loop: - movl (%edi),%eax - movl 4(%edi),%ebx - movl 8(%edi),%ecx - bswap %eax - movl 12(%edi),%edx - bswap %ebx - pushl %eax - bswap %ecx - pushl %ebx - bswap %edx - pushl %ecx - pushl %edx - movl 16(%edi),%eax - movl 20(%edi),%ebx - movl 24(%edi),%ecx - bswap %eax - movl 28(%edi),%edx - bswap %ebx - pushl %eax - bswap %ecx - pushl %ebx - bswap %edx - pushl %ecx - pushl %edx - movl 32(%edi),%eax - movl 36(%edi),%ebx - movl 40(%edi),%ecx - bswap %eax - movl 44(%edi),%edx - bswap %ebx - pushl %eax - bswap %ecx - pushl %ebx - bswap %edx - pushl %ecx - pushl %edx - movl 48(%edi),%eax - movl 52(%edi),%ebx - movl 56(%edi),%ecx - bswap %eax - movl 60(%edi),%edx - bswap %ebx - pushl %eax - bswap %ecx - pushl %ebx - bswap %edx - pushl %ecx - pushl %edx - addl $64,%edi - leal -36(%esp),%esp - movl %edi,104(%esp) - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edi - movl %ebx,8(%esp) - xorl %ecx,%ebx - movl %ecx,12(%esp) - movl %edi,16(%esp) - movl %ebx,(%esp) - movl 16(%esi),%edx - movl 20(%esi),%ebx - movl 24(%esi),%ecx - movl 28(%esi),%edi - movl %ebx,24(%esp) - movl %ecx,28(%esp) - movl %edi,32(%esp) -.align 4,0x90 -L00700_15: - movl %edx,%ecx - movl 24(%esp),%esi - rorl $14,%ecx - movl 28(%esp),%edi - xorl %edx,%ecx - xorl %edi,%esi - movl 96(%esp),%ebx - rorl $5,%ecx - andl %edx,%esi - movl %edx,20(%esp) - xorl %ecx,%edx - addl 32(%esp),%ebx - xorl %edi,%esi - rorl $6,%edx - movl %eax,%ecx - addl %esi,%ebx - rorl $9,%ecx - addl %edx,%ebx - movl 8(%esp),%edi - xorl %eax,%ecx - movl %eax,4(%esp) - leal -4(%esp),%esp - rorl $11,%ecx - movl (%ebp),%esi - xorl %eax,%ecx - movl 20(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %esi,%ebx - movl %eax,(%esp) - addl %ebx,%edx - andl 4(%esp),%eax - addl %ecx,%ebx - xorl %edi,%eax - addl $4,%ebp - addl %ebx,%eax - cmpl $3248222580,%esi - jne L00700_15 - movl 156(%esp),%ecx - jmp L00816_63 -.align 4,0x90 -L00816_63: - movl %ecx,%ebx - movl 104(%esp),%esi - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 160(%esp),%ebx - shrl $10,%edi - addl 124(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 24(%esp),%esi - rorl $14,%ecx - addl %edi,%ebx - movl 28(%esp),%edi - xorl %edx,%ecx - xorl %edi,%esi - movl %ebx,96(%esp) - rorl $5,%ecx - andl %edx,%esi - movl %edx,20(%esp) - xorl %ecx,%edx - addl 32(%esp),%ebx - xorl %edi,%esi - rorl $6,%edx - movl %eax,%ecx - addl %esi,%ebx - rorl $9,%ecx - addl %edx,%ebx - movl 8(%esp),%edi - xorl %eax,%ecx - movl %eax,4(%esp) - leal -4(%esp),%esp - rorl $11,%ecx - movl (%ebp),%esi - xorl %eax,%ecx - movl 20(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %esi,%ebx - movl %eax,(%esp) - addl %ebx,%edx - andl 4(%esp),%eax - addl %ecx,%ebx - xorl %edi,%eax - movl 156(%esp),%ecx - addl $4,%ebp - addl %ebx,%eax - cmpl $3329325298,%esi - jne L00816_63 - movl 356(%esp),%esi - movl 8(%esp),%ebx - movl 16(%esp),%ecx - addl (%esi),%eax - addl 4(%esi),%ebx - addl 8(%esi),%edi - addl 12(%esi),%ecx - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %edi,8(%esi) - movl %ecx,12(%esi) - movl 24(%esp),%eax - movl 28(%esp),%ebx - movl 32(%esp),%ecx - movl 360(%esp),%edi - addl 16(%esi),%edx - addl 20(%esi),%eax - addl 24(%esi),%ebx - addl 28(%esi),%ecx - movl %edx,16(%esi) - movl %eax,20(%esi) - movl %ebx,24(%esi) - movl %ecx,28(%esi) - leal 356(%esp),%esp - subl $256,%ebp - cmpl 8(%esp),%edi - jb L002loop - movl 12(%esp),%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.align 6,0x90 -L001K256: -.long 1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298 -.long 66051,67438087,134810123,202182159 -.byte 83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97 -.byte 110,115,102,111,114,109,32,102,111,114,32,120,56,54,44,32 -.byte 67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97 -.byte 112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103 -.byte 62,0 -.align 4,0x90 -L006unrolled: - leal -96(%esp),%esp - movl (%esi),%eax - movl 4(%esi),%ebp - movl 8(%esi),%ecx - movl 12(%esi),%ebx - movl %ebp,4(%esp) - xorl %ecx,%ebp - movl %ecx,8(%esp) - movl %ebx,12(%esp) - movl 16(%esi),%edx - movl 20(%esi),%ebx - movl 24(%esi),%ecx - movl 28(%esi),%esi - movl %ebx,20(%esp) - movl %ecx,24(%esp) - movl %esi,28(%esp) - jmp L009grand_loop -.align 4,0x90 -L009grand_loop: - movl (%edi),%ebx - movl 4(%edi),%ecx - bswap %ebx - movl 8(%edi),%esi - bswap %ecx - movl %ebx,32(%esp) - bswap %esi - movl %ecx,36(%esp) - movl %esi,40(%esp) - movl 12(%edi),%ebx - movl 16(%edi),%ecx - bswap %ebx - movl 20(%edi),%esi - bswap %ecx - movl %ebx,44(%esp) - bswap %esi - movl %ecx,48(%esp) - movl %esi,52(%esp) - movl 24(%edi),%ebx - movl 28(%edi),%ecx - bswap %ebx - movl 32(%edi),%esi - bswap %ecx - movl %ebx,56(%esp) - bswap %esi - movl %ecx,60(%esp) - movl %esi,64(%esp) - movl 36(%edi),%ebx - movl 40(%edi),%ecx - bswap %ebx - movl 44(%edi),%esi - bswap %ecx - movl %ebx,68(%esp) - bswap %esi - movl %ecx,72(%esp) - movl %esi,76(%esp) - movl 48(%edi),%ebx - movl 52(%edi),%ecx - bswap %ebx - movl 56(%edi),%esi - bswap %ecx - movl %ebx,80(%esp) - bswap %esi - movl %ecx,84(%esp) - movl %esi,88(%esp) - movl 60(%edi),%ebx - addl $64,%edi - bswap %ebx - movl %edi,100(%esp) - movl %ebx,92(%esp) - movl %edx,%ecx - movl 20(%esp),%esi - rorl $14,%edx - movl 24(%esp),%edi - xorl %ecx,%edx - movl 32(%esp),%ebx - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - addl 28(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 4(%esp),%edi - xorl %eax,%ecx - movl %eax,(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 1116352408(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - rorl $2,%ecx - addl %edx,%ebp - addl 12(%esp),%edx - addl %ecx,%ebp - movl %edx,%esi - movl 16(%esp),%ecx - rorl $14,%edx - movl 20(%esp),%edi - xorl %esi,%edx - movl 36(%esp),%ebx - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,12(%esp) - xorl %esi,%edx - addl 24(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl (%esp),%edi - xorl %ebp,%esi - movl %ebp,28(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 1899447441(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - rorl $2,%esi - addl %edx,%eax - addl 8(%esp),%edx - addl %esi,%eax - movl %edx,%ecx - movl 12(%esp),%esi - rorl $14,%edx - movl 16(%esp),%edi - xorl %ecx,%edx - movl 40(%esp),%ebx - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - addl 20(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 28(%esp),%edi - xorl %eax,%ecx - movl %eax,24(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 3049323471(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - rorl $2,%ecx - addl %edx,%ebp - addl 4(%esp),%edx - addl %ecx,%ebp - movl %edx,%esi - movl 8(%esp),%ecx - rorl $14,%edx - movl 12(%esp),%edi - xorl %esi,%edx - movl 44(%esp),%ebx - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,4(%esp) - xorl %esi,%edx - addl 16(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 24(%esp),%edi - xorl %ebp,%esi - movl %ebp,20(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 3921009573(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - rorl $2,%esi - addl %edx,%eax - addl (%esp),%edx - addl %esi,%eax - movl %edx,%ecx - movl 4(%esp),%esi - rorl $14,%edx - movl 8(%esp),%edi - xorl %ecx,%edx - movl 48(%esp),%ebx - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - addl 12(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 20(%esp),%edi - xorl %eax,%ecx - movl %eax,16(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 961987163(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - rorl $2,%ecx - addl %edx,%ebp - addl 28(%esp),%edx - addl %ecx,%ebp - movl %edx,%esi - movl (%esp),%ecx - rorl $14,%edx - movl 4(%esp),%edi - xorl %esi,%edx - movl 52(%esp),%ebx - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,28(%esp) - xorl %esi,%edx - addl 8(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 16(%esp),%edi - xorl %ebp,%esi - movl %ebp,12(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 1508970993(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - rorl $2,%esi - addl %edx,%eax - addl 24(%esp),%edx - addl %esi,%eax - movl %edx,%ecx - movl 28(%esp),%esi - rorl $14,%edx - movl (%esp),%edi - xorl %ecx,%edx - movl 56(%esp),%ebx - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - addl 4(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 12(%esp),%edi - xorl %eax,%ecx - movl %eax,8(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 2453635748(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - rorl $2,%ecx - addl %edx,%ebp - addl 20(%esp),%edx - addl %ecx,%ebp - movl %edx,%esi - movl 24(%esp),%ecx - rorl $14,%edx - movl 28(%esp),%edi - xorl %esi,%edx - movl 60(%esp),%ebx - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,20(%esp) - xorl %esi,%edx - addl (%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 8(%esp),%edi - xorl %ebp,%esi - movl %ebp,4(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 2870763221(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - rorl $2,%esi - addl %edx,%eax - addl 16(%esp),%edx - addl %esi,%eax - movl %edx,%ecx - movl 20(%esp),%esi - rorl $14,%edx - movl 24(%esp),%edi - xorl %ecx,%edx - movl 64(%esp),%ebx - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - addl 28(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 4(%esp),%edi - xorl %eax,%ecx - movl %eax,(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 3624381080(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - rorl $2,%ecx - addl %edx,%ebp - addl 12(%esp),%edx - addl %ecx,%ebp - movl %edx,%esi - movl 16(%esp),%ecx - rorl $14,%edx - movl 20(%esp),%edi - xorl %esi,%edx - movl 68(%esp),%ebx - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,12(%esp) - xorl %esi,%edx - addl 24(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl (%esp),%edi - xorl %ebp,%esi - movl %ebp,28(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 310598401(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - rorl $2,%esi - addl %edx,%eax - addl 8(%esp),%edx - addl %esi,%eax - movl %edx,%ecx - movl 12(%esp),%esi - rorl $14,%edx - movl 16(%esp),%edi - xorl %ecx,%edx - movl 72(%esp),%ebx - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - addl 20(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 28(%esp),%edi - xorl %eax,%ecx - movl %eax,24(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 607225278(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - rorl $2,%ecx - addl %edx,%ebp - addl 4(%esp),%edx - addl %ecx,%ebp - movl %edx,%esi - movl 8(%esp),%ecx - rorl $14,%edx - movl 12(%esp),%edi - xorl %esi,%edx - movl 76(%esp),%ebx - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,4(%esp) - xorl %esi,%edx - addl 16(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 24(%esp),%edi - xorl %ebp,%esi - movl %ebp,20(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 1426881987(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - rorl $2,%esi - addl %edx,%eax - addl (%esp),%edx - addl %esi,%eax - movl %edx,%ecx - movl 4(%esp),%esi - rorl $14,%edx - movl 8(%esp),%edi - xorl %ecx,%edx - movl 80(%esp),%ebx - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - addl 12(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 20(%esp),%edi - xorl %eax,%ecx - movl %eax,16(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 1925078388(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - rorl $2,%ecx - addl %edx,%ebp - addl 28(%esp),%edx - addl %ecx,%ebp - movl %edx,%esi - movl (%esp),%ecx - rorl $14,%edx - movl 4(%esp),%edi - xorl %esi,%edx - movl 84(%esp),%ebx - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,28(%esp) - xorl %esi,%edx - addl 8(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 16(%esp),%edi - xorl %ebp,%esi - movl %ebp,12(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 2162078206(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - rorl $2,%esi - addl %edx,%eax - addl 24(%esp),%edx - addl %esi,%eax - movl %edx,%ecx - movl 28(%esp),%esi - rorl $14,%edx - movl (%esp),%edi - xorl %ecx,%edx - movl 88(%esp),%ebx - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - addl 4(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 12(%esp),%edi - xorl %eax,%ecx - movl %eax,8(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 2614888103(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - rorl $2,%ecx - addl %edx,%ebp - addl 20(%esp),%edx - addl %ecx,%ebp - movl %edx,%esi - movl 24(%esp),%ecx - rorl $14,%edx - movl 28(%esp),%edi - xorl %esi,%edx - movl 92(%esp),%ebx - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,20(%esp) - xorl %esi,%edx - addl (%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 8(%esp),%edi - xorl %ebp,%esi - movl %ebp,4(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 3248222580(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 36(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 16(%esp),%edx - addl %esi,%eax - movl 88(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 32(%esp),%ebx - shrl $10,%edi - addl 68(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 20(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 24(%esp),%edi - xorl %ecx,%edx - movl %ebx,32(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - addl 28(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 4(%esp),%edi - xorl %eax,%ecx - movl %eax,(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 3835390401(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 40(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 12(%esp),%edx - addl %ecx,%ebp - movl 92(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 36(%esp),%ebx - shrl $10,%edi - addl 72(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 16(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 20(%esp),%edi - xorl %esi,%edx - movl %ebx,36(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,12(%esp) - xorl %esi,%edx - addl 24(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl (%esp),%edi - xorl %ebp,%esi - movl %ebp,28(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 4022224774(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 44(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 8(%esp),%edx - addl %esi,%eax - movl 32(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 40(%esp),%ebx - shrl $10,%edi - addl 76(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 12(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 16(%esp),%edi - xorl %ecx,%edx - movl %ebx,40(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - addl 20(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 28(%esp),%edi - xorl %eax,%ecx - movl %eax,24(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 264347078(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 48(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 4(%esp),%edx - addl %ecx,%ebp - movl 36(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 44(%esp),%ebx - shrl $10,%edi - addl 80(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 8(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 12(%esp),%edi - xorl %esi,%edx - movl %ebx,44(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,4(%esp) - xorl %esi,%edx - addl 16(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 24(%esp),%edi - xorl %ebp,%esi - movl %ebp,20(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 604807628(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 52(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl (%esp),%edx - addl %esi,%eax - movl 40(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 48(%esp),%ebx - shrl $10,%edi - addl 84(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 4(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 8(%esp),%edi - xorl %ecx,%edx - movl %ebx,48(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - addl 12(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 20(%esp),%edi - xorl %eax,%ecx - movl %eax,16(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 770255983(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 56(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 28(%esp),%edx - addl %ecx,%ebp - movl 44(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 52(%esp),%ebx - shrl $10,%edi - addl 88(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl (%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 4(%esp),%edi - xorl %esi,%edx - movl %ebx,52(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,28(%esp) - xorl %esi,%edx - addl 8(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 16(%esp),%edi - xorl %ebp,%esi - movl %ebp,12(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 1249150122(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 60(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 24(%esp),%edx - addl %esi,%eax - movl 48(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 56(%esp),%ebx - shrl $10,%edi - addl 92(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 28(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl (%esp),%edi - xorl %ecx,%edx - movl %ebx,56(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - addl 4(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 12(%esp),%edi - xorl %eax,%ecx - movl %eax,8(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 1555081692(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 64(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 20(%esp),%edx - addl %ecx,%ebp - movl 52(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 60(%esp),%ebx - shrl $10,%edi - addl 32(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 24(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 28(%esp),%edi - xorl %esi,%edx - movl %ebx,60(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,20(%esp) - xorl %esi,%edx - addl (%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 8(%esp),%edi - xorl %ebp,%esi - movl %ebp,4(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 1996064986(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 68(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 16(%esp),%edx - addl %esi,%eax - movl 56(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 64(%esp),%ebx - shrl $10,%edi - addl 36(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 20(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 24(%esp),%edi - xorl %ecx,%edx - movl %ebx,64(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - addl 28(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 4(%esp),%edi - xorl %eax,%ecx - movl %eax,(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 2554220882(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 72(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 12(%esp),%edx - addl %ecx,%ebp - movl 60(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 68(%esp),%ebx - shrl $10,%edi - addl 40(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 16(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 20(%esp),%edi - xorl %esi,%edx - movl %ebx,68(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,12(%esp) - xorl %esi,%edx - addl 24(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl (%esp),%edi - xorl %ebp,%esi - movl %ebp,28(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 2821834349(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 76(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 8(%esp),%edx - addl %esi,%eax - movl 64(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 72(%esp),%ebx - shrl $10,%edi - addl 44(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 12(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 16(%esp),%edi - xorl %ecx,%edx - movl %ebx,72(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - addl 20(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 28(%esp),%edi - xorl %eax,%ecx - movl %eax,24(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 2952996808(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 80(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 4(%esp),%edx - addl %ecx,%ebp - movl 68(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 76(%esp),%ebx - shrl $10,%edi - addl 48(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 8(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 12(%esp),%edi - xorl %esi,%edx - movl %ebx,76(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,4(%esp) - xorl %esi,%edx - addl 16(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 24(%esp),%edi - xorl %ebp,%esi - movl %ebp,20(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 3210313671(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 84(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl (%esp),%edx - addl %esi,%eax - movl 72(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 80(%esp),%ebx - shrl $10,%edi - addl 52(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 4(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 8(%esp),%edi - xorl %ecx,%edx - movl %ebx,80(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - addl 12(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 20(%esp),%edi - xorl %eax,%ecx - movl %eax,16(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 3336571891(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 88(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 28(%esp),%edx - addl %ecx,%ebp - movl 76(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 84(%esp),%ebx - shrl $10,%edi - addl 56(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl (%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 4(%esp),%edi - xorl %esi,%edx - movl %ebx,84(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,28(%esp) - xorl %esi,%edx - addl 8(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 16(%esp),%edi - xorl %ebp,%esi - movl %ebp,12(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 3584528711(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 92(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 24(%esp),%edx - addl %esi,%eax - movl 80(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 88(%esp),%ebx - shrl $10,%edi - addl 60(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 28(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl (%esp),%edi - xorl %ecx,%edx - movl %ebx,88(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - addl 4(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 12(%esp),%edi - xorl %eax,%ecx - movl %eax,8(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 113926993(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 32(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 20(%esp),%edx - addl %ecx,%ebp - movl 84(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 92(%esp),%ebx - shrl $10,%edi - addl 64(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 24(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 28(%esp),%edi - xorl %esi,%edx - movl %ebx,92(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,20(%esp) - xorl %esi,%edx - addl (%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 8(%esp),%edi - xorl %ebp,%esi - movl %ebp,4(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 338241895(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 36(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 16(%esp),%edx - addl %esi,%eax - movl 88(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 32(%esp),%ebx - shrl $10,%edi - addl 68(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 20(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 24(%esp),%edi - xorl %ecx,%edx - movl %ebx,32(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - addl 28(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 4(%esp),%edi - xorl %eax,%ecx - movl %eax,(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 666307205(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 40(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 12(%esp),%edx - addl %ecx,%ebp - movl 92(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 36(%esp),%ebx - shrl $10,%edi - addl 72(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 16(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 20(%esp),%edi - xorl %esi,%edx - movl %ebx,36(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,12(%esp) - xorl %esi,%edx - addl 24(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl (%esp),%edi - xorl %ebp,%esi - movl %ebp,28(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 773529912(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 44(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 8(%esp),%edx - addl %esi,%eax - movl 32(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 40(%esp),%ebx - shrl $10,%edi - addl 76(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 12(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 16(%esp),%edi - xorl %ecx,%edx - movl %ebx,40(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - addl 20(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 28(%esp),%edi - xorl %eax,%ecx - movl %eax,24(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 1294757372(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 48(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 4(%esp),%edx - addl %ecx,%ebp - movl 36(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 44(%esp),%ebx - shrl $10,%edi - addl 80(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 8(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 12(%esp),%edi - xorl %esi,%edx - movl %ebx,44(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,4(%esp) - xorl %esi,%edx - addl 16(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 24(%esp),%edi - xorl %ebp,%esi - movl %ebp,20(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 1396182291(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 52(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl (%esp),%edx - addl %esi,%eax - movl 40(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 48(%esp),%ebx - shrl $10,%edi - addl 84(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 4(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 8(%esp),%edi - xorl %ecx,%edx - movl %ebx,48(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - addl 12(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 20(%esp),%edi - xorl %eax,%ecx - movl %eax,16(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 1695183700(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 56(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 28(%esp),%edx - addl %ecx,%ebp - movl 44(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 52(%esp),%ebx - shrl $10,%edi - addl 88(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl (%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 4(%esp),%edi - xorl %esi,%edx - movl %ebx,52(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,28(%esp) - xorl %esi,%edx - addl 8(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 16(%esp),%edi - xorl %ebp,%esi - movl %ebp,12(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 1986661051(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 60(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 24(%esp),%edx - addl %esi,%eax - movl 48(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 56(%esp),%ebx - shrl $10,%edi - addl 92(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 28(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl (%esp),%edi - xorl %ecx,%edx - movl %ebx,56(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - addl 4(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 12(%esp),%edi - xorl %eax,%ecx - movl %eax,8(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 2177026350(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 64(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 20(%esp),%edx - addl %ecx,%ebp - movl 52(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 60(%esp),%ebx - shrl $10,%edi - addl 32(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 24(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 28(%esp),%edi - xorl %esi,%edx - movl %ebx,60(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,20(%esp) - xorl %esi,%edx - addl (%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 8(%esp),%edi - xorl %ebp,%esi - movl %ebp,4(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 2456956037(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 68(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 16(%esp),%edx - addl %esi,%eax - movl 56(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 64(%esp),%ebx - shrl $10,%edi - addl 36(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 20(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 24(%esp),%edi - xorl %ecx,%edx - movl %ebx,64(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - addl 28(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 4(%esp),%edi - xorl %eax,%ecx - movl %eax,(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 2730485921(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 72(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 12(%esp),%edx - addl %ecx,%ebp - movl 60(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 68(%esp),%ebx - shrl $10,%edi - addl 40(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 16(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 20(%esp),%edi - xorl %esi,%edx - movl %ebx,68(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,12(%esp) - xorl %esi,%edx - addl 24(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl (%esp),%edi - xorl %ebp,%esi - movl %ebp,28(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 2820302411(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 76(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 8(%esp),%edx - addl %esi,%eax - movl 64(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 72(%esp),%ebx - shrl $10,%edi - addl 44(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 12(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 16(%esp),%edi - xorl %ecx,%edx - movl %ebx,72(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - addl 20(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 28(%esp),%edi - xorl %eax,%ecx - movl %eax,24(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 3259730800(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 80(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 4(%esp),%edx - addl %ecx,%ebp - movl 68(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 76(%esp),%ebx - shrl $10,%edi - addl 48(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 8(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 12(%esp),%edi - xorl %esi,%edx - movl %ebx,76(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,4(%esp) - xorl %esi,%edx - addl 16(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 24(%esp),%edi - xorl %ebp,%esi - movl %ebp,20(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 3345764771(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 84(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl (%esp),%edx - addl %esi,%eax - movl 72(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 80(%esp),%ebx - shrl $10,%edi - addl 52(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 4(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 8(%esp),%edi - xorl %ecx,%edx - movl %ebx,80(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - addl 12(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 20(%esp),%edi - xorl %eax,%ecx - movl %eax,16(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 3516065817(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 88(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 28(%esp),%edx - addl %ecx,%ebp - movl 76(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 84(%esp),%ebx - shrl $10,%edi - addl 56(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl (%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 4(%esp),%edi - xorl %esi,%edx - movl %ebx,84(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,28(%esp) - xorl %esi,%edx - addl 8(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 16(%esp),%edi - xorl %ebp,%esi - movl %ebp,12(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 3600352804(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 92(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 24(%esp),%edx - addl %esi,%eax - movl 80(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 88(%esp),%ebx - shrl $10,%edi - addl 60(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 28(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl (%esp),%edi - xorl %ecx,%edx - movl %ebx,88(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - addl 4(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 12(%esp),%edi - xorl %eax,%ecx - movl %eax,8(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 4094571909(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 32(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 20(%esp),%edx - addl %ecx,%ebp - movl 84(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 92(%esp),%ebx - shrl $10,%edi - addl 64(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 24(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 28(%esp),%edi - xorl %esi,%edx - movl %ebx,92(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,20(%esp) - xorl %esi,%edx - addl (%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 8(%esp),%edi - xorl %ebp,%esi - movl %ebp,4(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 275423344(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 36(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 16(%esp),%edx - addl %esi,%eax - movl 88(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 32(%esp),%ebx - shrl $10,%edi - addl 68(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 20(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 24(%esp),%edi - xorl %ecx,%edx - movl %ebx,32(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - addl 28(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 4(%esp),%edi - xorl %eax,%ecx - movl %eax,(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 430227734(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 40(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 12(%esp),%edx - addl %ecx,%ebp - movl 92(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 36(%esp),%ebx - shrl $10,%edi - addl 72(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 16(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 20(%esp),%edi - xorl %esi,%edx - movl %ebx,36(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,12(%esp) - xorl %esi,%edx - addl 24(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl (%esp),%edi - xorl %ebp,%esi - movl %ebp,28(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 506948616(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 44(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 8(%esp),%edx - addl %esi,%eax - movl 32(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 40(%esp),%ebx - shrl $10,%edi - addl 76(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 12(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 16(%esp),%edi - xorl %ecx,%edx - movl %ebx,40(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - addl 20(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 28(%esp),%edi - xorl %eax,%ecx - movl %eax,24(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 659060556(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 48(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 4(%esp),%edx - addl %ecx,%ebp - movl 36(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 44(%esp),%ebx - shrl $10,%edi - addl 80(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 8(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 12(%esp),%edi - xorl %esi,%edx - movl %ebx,44(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,4(%esp) - xorl %esi,%edx - addl 16(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 24(%esp),%edi - xorl %ebp,%esi - movl %ebp,20(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 883997877(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 52(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl (%esp),%edx - addl %esi,%eax - movl 40(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 48(%esp),%ebx - shrl $10,%edi - addl 84(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 4(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 8(%esp),%edi - xorl %ecx,%edx - movl %ebx,48(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - addl 12(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 20(%esp),%edi - xorl %eax,%ecx - movl %eax,16(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 958139571(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 56(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 28(%esp),%edx - addl %ecx,%ebp - movl 44(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 52(%esp),%ebx - shrl $10,%edi - addl 88(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl (%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 4(%esp),%edi - xorl %esi,%edx - movl %ebx,52(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,28(%esp) - xorl %esi,%edx - addl 8(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 16(%esp),%edi - xorl %ebp,%esi - movl %ebp,12(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 1322822218(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 60(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 24(%esp),%edx - addl %esi,%eax - movl 48(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 56(%esp),%ebx - shrl $10,%edi - addl 92(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 28(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl (%esp),%edi - xorl %ecx,%edx - movl %ebx,56(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - addl 4(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 12(%esp),%edi - xorl %eax,%ecx - movl %eax,8(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 1537002063(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 64(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 20(%esp),%edx - addl %ecx,%ebp - movl 52(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 60(%esp),%ebx - shrl $10,%edi - addl 32(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 24(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 28(%esp),%edi - xorl %esi,%edx - movl %ebx,60(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,20(%esp) - xorl %esi,%edx - addl (%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 8(%esp),%edi - xorl %ebp,%esi - movl %ebp,4(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 1747873779(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 68(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 16(%esp),%edx - addl %esi,%eax - movl 56(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 64(%esp),%ebx - shrl $10,%edi - addl 36(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 20(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 24(%esp),%edi - xorl %ecx,%edx - movl %ebx,64(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - addl 28(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 4(%esp),%edi - xorl %eax,%ecx - movl %eax,(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 1955562222(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 72(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 12(%esp),%edx - addl %ecx,%ebp - movl 60(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 68(%esp),%ebx - shrl $10,%edi - addl 40(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 16(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 20(%esp),%edi - xorl %esi,%edx - movl %ebx,68(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,12(%esp) - xorl %esi,%edx - addl 24(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl (%esp),%edi - xorl %ebp,%esi - movl %ebp,28(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 2024104815(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 76(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 8(%esp),%edx - addl %esi,%eax - movl 64(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 72(%esp),%ebx - shrl $10,%edi - addl 44(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 12(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 16(%esp),%edi - xorl %ecx,%edx - movl %ebx,72(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - addl 20(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 28(%esp),%edi - xorl %eax,%ecx - movl %eax,24(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 2227730452(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 80(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 4(%esp),%edx - addl %ecx,%ebp - movl 68(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 76(%esp),%ebx - shrl $10,%edi - addl 48(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 8(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 12(%esp),%edi - xorl %esi,%edx - movl %ebx,76(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,4(%esp) - xorl %esi,%edx - addl 16(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 24(%esp),%edi - xorl %ebp,%esi - movl %ebp,20(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 2361852424(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 84(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl (%esp),%edx - addl %esi,%eax - movl 72(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 80(%esp),%ebx - shrl $10,%edi - addl 52(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 4(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl 8(%esp),%edi - xorl %ecx,%edx - movl %ebx,80(%esp) - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - addl 12(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 20(%esp),%edi - xorl %eax,%ecx - movl %eax,16(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 2428436474(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 88(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 28(%esp),%edx - addl %ecx,%ebp - movl 76(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 84(%esp),%ebx - shrl $10,%edi - addl 56(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl (%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 4(%esp),%edi - xorl %esi,%edx - movl %ebx,84(%esp) - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,28(%esp) - xorl %esi,%edx - addl 8(%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 16(%esp),%edi - xorl %ebp,%esi - movl %ebp,12(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 2756734187(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - movl 92(%esp),%ecx - rorl $2,%esi - addl %edx,%eax - addl 24(%esp),%edx - addl %esi,%eax - movl 80(%esp),%esi - movl %ecx,%ebx - rorl $11,%ecx - movl %esi,%edi - rorl $2,%esi - xorl %ebx,%ecx - shrl $3,%ebx - rorl $7,%ecx - xorl %edi,%esi - xorl %ecx,%ebx - rorl $17,%esi - addl 88(%esp),%ebx - shrl $10,%edi - addl 60(%esp),%ebx - movl %edx,%ecx - xorl %esi,%edi - movl 28(%esp),%esi - rorl $14,%edx - addl %edi,%ebx - movl (%esp),%edi - xorl %ecx,%edx - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - addl 4(%esp),%ebx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%ebx - rorl $9,%ecx - movl %eax,%esi - movl 12(%esp),%edi - xorl %eax,%ecx - movl %eax,8(%esp) - xorl %edi,%eax - rorl $11,%ecx - andl %eax,%ebp - leal 3204031479(%ebx,%edx,1),%edx - xorl %esi,%ecx - xorl %edi,%ebp - movl 32(%esp),%esi - rorl $2,%ecx - addl %edx,%ebp - addl 20(%esp),%edx - addl %ecx,%ebp - movl 84(%esp),%ecx - movl %esi,%ebx - rorl $11,%esi - movl %ecx,%edi - rorl $2,%ecx - xorl %ebx,%esi - shrl $3,%ebx - rorl $7,%esi - xorl %edi,%ecx - xorl %esi,%ebx - rorl $17,%ecx - addl 92(%esp),%ebx - shrl $10,%edi - addl 64(%esp),%ebx - movl %edx,%esi - xorl %ecx,%edi - movl 24(%esp),%ecx - rorl $14,%edx - addl %edi,%ebx - movl 28(%esp),%edi - xorl %esi,%edx - xorl %edi,%ecx - rorl $5,%edx - andl %esi,%ecx - movl %esi,20(%esp) - xorl %esi,%edx - addl (%esp),%ebx - xorl %ecx,%edi - rorl $6,%edx - movl %ebp,%esi - addl %edi,%ebx - rorl $9,%esi - movl %ebp,%ecx - movl 8(%esp),%edi - xorl %ebp,%esi - movl %ebp,4(%esp) - xorl %edi,%ebp - rorl $11,%esi - andl %ebp,%eax - leal 3329325298(%ebx,%edx,1),%edx - xorl %ecx,%esi - xorl %edi,%eax - rorl $2,%esi - addl %edx,%eax - addl 16(%esp),%edx - addl %esi,%eax - movl 96(%esp),%esi - xorl %edi,%ebp - movl 12(%esp),%ecx - addl (%esi),%eax - addl 4(%esi),%ebp - addl 8(%esi),%edi - addl 12(%esi),%ecx - movl %eax,(%esi) - movl %ebp,4(%esi) - movl %edi,8(%esi) - movl %ecx,12(%esi) - movl %ebp,4(%esp) - xorl %edi,%ebp - movl %edi,8(%esp) - movl %ecx,12(%esp) - movl 20(%esp),%edi - movl 24(%esp),%ebx - movl 28(%esp),%ecx - addl 16(%esi),%edx - addl 20(%esi),%edi - addl 24(%esi),%ebx - addl 28(%esi),%ecx - movl %edx,16(%esi) - movl %edi,20(%esi) - movl %ebx,24(%esi) - movl %ecx,28(%esi) - movl %edi,20(%esp) - movl 100(%esp),%edi - movl %ebx,24(%esp) - movl %ecx,28(%esp) - cmpl 104(%esp),%edi - jb L009grand_loop - movl 108(%esp),%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.align 5,0x90 -L004shaext: - subl $32,%esp - movdqu (%esi),%xmm1 - leal 128(%ebp),%ebp - movdqu 16(%esi),%xmm2 - movdqa 128(%ebp),%xmm7 - pshufd $27,%xmm1,%xmm0 - pshufd $177,%xmm1,%xmm1 - pshufd $27,%xmm2,%xmm2 -.byte 102,15,58,15,202,8 - punpcklqdq %xmm0,%xmm2 - jmp L010loop_shaext -.align 4,0x90 -L010loop_shaext: - movdqu (%edi),%xmm3 - movdqu 16(%edi),%xmm4 - movdqu 32(%edi),%xmm5 -.byte 102,15,56,0,223 - movdqu 48(%edi),%xmm6 - movdqa %xmm2,16(%esp) - movdqa -128(%ebp),%xmm0 - paddd %xmm3,%xmm0 -.byte 102,15,56,0,231 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - nop - movdqa %xmm1,(%esp) -.byte 15,56,203,202 - movdqa -112(%ebp),%xmm0 - paddd %xmm4,%xmm0 -.byte 102,15,56,0,239 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - leal 64(%edi),%edi -.byte 15,56,204,220 -.byte 15,56,203,202 - movdqa -96(%ebp),%xmm0 - paddd %xmm5,%xmm0 -.byte 102,15,56,0,247 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm6,%xmm7 -.byte 102,15,58,15,253,4 - nop - paddd %xmm7,%xmm3 -.byte 15,56,204,229 -.byte 15,56,203,202 - movdqa -80(%ebp),%xmm0 - paddd %xmm6,%xmm0 -.byte 15,56,205,222 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm3,%xmm7 -.byte 102,15,58,15,254,4 - nop - paddd %xmm7,%xmm4 -.byte 15,56,204,238 -.byte 15,56,203,202 - movdqa -64(%ebp),%xmm0 - paddd %xmm3,%xmm0 -.byte 15,56,205,227 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm4,%xmm7 -.byte 102,15,58,15,251,4 - nop - paddd %xmm7,%xmm5 -.byte 15,56,204,243 -.byte 15,56,203,202 - movdqa -48(%ebp),%xmm0 - paddd %xmm4,%xmm0 -.byte 15,56,205,236 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm5,%xmm7 -.byte 102,15,58,15,252,4 - nop - paddd %xmm7,%xmm6 -.byte 15,56,204,220 -.byte 15,56,203,202 - movdqa -32(%ebp),%xmm0 - paddd %xmm5,%xmm0 -.byte 15,56,205,245 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm6,%xmm7 -.byte 102,15,58,15,253,4 - nop - paddd %xmm7,%xmm3 -.byte 15,56,204,229 -.byte 15,56,203,202 - movdqa -16(%ebp),%xmm0 - paddd %xmm6,%xmm0 -.byte 15,56,205,222 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm3,%xmm7 -.byte 102,15,58,15,254,4 - nop - paddd %xmm7,%xmm4 -.byte 15,56,204,238 -.byte 15,56,203,202 - movdqa (%ebp),%xmm0 - paddd %xmm3,%xmm0 -.byte 15,56,205,227 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm4,%xmm7 -.byte 102,15,58,15,251,4 - nop - paddd %xmm7,%xmm5 -.byte 15,56,204,243 -.byte 15,56,203,202 - movdqa 16(%ebp),%xmm0 - paddd %xmm4,%xmm0 -.byte 15,56,205,236 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm5,%xmm7 -.byte 102,15,58,15,252,4 - nop - paddd %xmm7,%xmm6 -.byte 15,56,204,220 -.byte 15,56,203,202 - movdqa 32(%ebp),%xmm0 - paddd %xmm5,%xmm0 -.byte 15,56,205,245 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm6,%xmm7 -.byte 102,15,58,15,253,4 - nop - paddd %xmm7,%xmm3 -.byte 15,56,204,229 -.byte 15,56,203,202 - movdqa 48(%ebp),%xmm0 - paddd %xmm6,%xmm0 -.byte 15,56,205,222 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm3,%xmm7 -.byte 102,15,58,15,254,4 - nop - paddd %xmm7,%xmm4 -.byte 15,56,204,238 -.byte 15,56,203,202 - movdqa 64(%ebp),%xmm0 - paddd %xmm3,%xmm0 -.byte 15,56,205,227 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm4,%xmm7 -.byte 102,15,58,15,251,4 - nop - paddd %xmm7,%xmm5 -.byte 15,56,204,243 -.byte 15,56,203,202 - movdqa 80(%ebp),%xmm0 - paddd %xmm4,%xmm0 -.byte 15,56,205,236 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - movdqa %xmm5,%xmm7 -.byte 102,15,58,15,252,4 -.byte 15,56,203,202 - paddd %xmm7,%xmm6 - movdqa 96(%ebp),%xmm0 - paddd %xmm5,%xmm0 -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 -.byte 15,56,205,245 - movdqa 128(%ebp),%xmm7 -.byte 15,56,203,202 - movdqa 112(%ebp),%xmm0 - paddd %xmm6,%xmm0 - nop -.byte 15,56,203,209 - pshufd $14,%xmm0,%xmm0 - cmpl %edi,%eax - nop -.byte 15,56,203,202 - paddd 16(%esp),%xmm2 - paddd (%esp),%xmm1 - jnz L010loop_shaext - pshufd $177,%xmm2,%xmm2 - pshufd $27,%xmm1,%xmm7 - pshufd $177,%xmm1,%xmm1 - punpckhqdq %xmm2,%xmm1 -.byte 102,15,58,15,215,8 - movl 44(%esp),%esp - movdqu %xmm1,(%esi) - movdqu %xmm2,16(%esi) - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.align 5,0x90 -L005SSSE3: - leal -96(%esp),%esp - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edi - movl %ebx,4(%esp) - xorl %ecx,%ebx - movl %ecx,8(%esp) - movl %edi,12(%esp) - movl 16(%esi),%edx - movl 20(%esi),%edi - movl 24(%esi),%ecx - movl 28(%esi),%esi - movl %edi,20(%esp) - movl 100(%esp),%edi - movl %ecx,24(%esp) - movl %esi,28(%esp) - movdqa 256(%ebp),%xmm7 - jmp L011grand_ssse3 -.align 4,0x90 -L011grand_ssse3: - movdqu (%edi),%xmm0 - movdqu 16(%edi),%xmm1 - movdqu 32(%edi),%xmm2 - movdqu 48(%edi),%xmm3 - addl $64,%edi -.byte 102,15,56,0,199 - movl %edi,100(%esp) -.byte 102,15,56,0,207 - movdqa (%ebp),%xmm4 -.byte 102,15,56,0,215 - movdqa 16(%ebp),%xmm5 - paddd %xmm0,%xmm4 -.byte 102,15,56,0,223 - movdqa 32(%ebp),%xmm6 - paddd %xmm1,%xmm5 - movdqa 48(%ebp),%xmm7 - movdqa %xmm4,32(%esp) - paddd %xmm2,%xmm6 - movdqa %xmm5,48(%esp) - paddd %xmm3,%xmm7 - movdqa %xmm6,64(%esp) - movdqa %xmm7,80(%esp) - jmp L012ssse3_00_47 -.align 4,0x90 -L012ssse3_00_47: - addl $64,%ebp - movl %edx,%ecx - movdqa %xmm1,%xmm4 - rorl $14,%edx - movl 20(%esp),%esi - movdqa %xmm3,%xmm7 - xorl %ecx,%edx - movl 24(%esp),%edi -.byte 102,15,58,15,224,4 - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi -.byte 102,15,58,15,250,4 - movl %ecx,16(%esp) - xorl %ecx,%edx - xorl %esi,%edi - movdqa %xmm4,%xmm5 - rorl $6,%edx - movl %eax,%ecx - movdqa %xmm4,%xmm6 - addl %edi,%edx - movl 4(%esp),%edi - psrld $3,%xmm4 - movl %eax,%esi - rorl $9,%ecx - paddd %xmm7,%xmm0 - movl %eax,(%esp) - xorl %eax,%ecx - psrld $7,%xmm6 - xorl %edi,%eax - addl 28(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - pshufd $250,%xmm3,%xmm7 - xorl %esi,%ecx - addl 32(%esp),%edx - pslld $14,%xmm5 - xorl %edi,%ebx - rorl $2,%ecx - pxor %xmm6,%xmm4 - addl %edx,%ebx - addl 12(%esp),%edx - psrld $11,%xmm6 - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - pxor %xmm5,%xmm4 - movl 16(%esp),%esi - xorl %ecx,%edx - pslld $11,%xmm5 - movl 20(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - pxor %xmm6,%xmm4 - andl %ecx,%esi - movl %ecx,12(%esp) - movdqa %xmm7,%xmm6 - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - pxor %xmm5,%xmm4 - movl %ebx,%ecx - addl %edi,%edx - psrld $10,%xmm7 - movl (%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - paddd %xmm4,%xmm0 - movl %ebx,28(%esp) - xorl %ebx,%ecx - psrlq $17,%xmm6 - xorl %edi,%ebx - addl 24(%esp),%edx - rorl $11,%ecx - pxor %xmm6,%xmm7 - andl %ebx,%eax - xorl %esi,%ecx - psrlq $2,%xmm6 - addl 36(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - pxor %xmm6,%xmm7 - addl %edx,%eax - addl 8(%esp),%edx - pshufd $128,%xmm7,%xmm7 - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 12(%esp),%esi - xorl %ecx,%edx - movl 16(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - psrldq $8,%xmm7 - movl %ecx,8(%esp) - xorl %ecx,%edx - xorl %esi,%edi - paddd %xmm7,%xmm0 - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 28(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,24(%esp) - pshufd $80,%xmm0,%xmm7 - xorl %eax,%ecx - xorl %edi,%eax - addl 20(%esp),%edx - movdqa %xmm7,%xmm6 - rorl $11,%ecx - psrld $10,%xmm7 - andl %eax,%ebx - psrlq $17,%xmm6 - xorl %esi,%ecx - addl 40(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - pxor %xmm6,%xmm7 - addl %edx,%ebx - addl 4(%esp),%edx - psrlq $2,%xmm6 - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - pxor %xmm6,%xmm7 - movl 8(%esp),%esi - xorl %ecx,%edx - movl 12(%esp),%edi - pshufd $8,%xmm7,%xmm7 - xorl %edi,%esi - rorl $5,%edx - movdqa (%ebp),%xmm6 - andl %ecx,%esi - movl %ecx,4(%esp) - pslldq $8,%xmm7 - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 24(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - paddd %xmm7,%xmm0 - movl %ebx,20(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl 16(%esp),%edx - paddd %xmm0,%xmm6 - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 44(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl (%esp),%edx - addl %ecx,%eax - movdqa %xmm6,32(%esp) - movl %edx,%ecx - movdqa %xmm2,%xmm4 - rorl $14,%edx - movl 4(%esp),%esi - movdqa %xmm0,%xmm7 - xorl %ecx,%edx - movl 8(%esp),%edi -.byte 102,15,58,15,225,4 - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi -.byte 102,15,58,15,251,4 - movl %ecx,(%esp) - xorl %ecx,%edx - xorl %esi,%edi - movdqa %xmm4,%xmm5 - rorl $6,%edx - movl %eax,%ecx - movdqa %xmm4,%xmm6 - addl %edi,%edx - movl 20(%esp),%edi - psrld $3,%xmm4 - movl %eax,%esi - rorl $9,%ecx - paddd %xmm7,%xmm1 - movl %eax,16(%esp) - xorl %eax,%ecx - psrld $7,%xmm6 - xorl %edi,%eax - addl 12(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - pshufd $250,%xmm0,%xmm7 - xorl %esi,%ecx - addl 48(%esp),%edx - pslld $14,%xmm5 - xorl %edi,%ebx - rorl $2,%ecx - pxor %xmm6,%xmm4 - addl %edx,%ebx - addl 28(%esp),%edx - psrld $11,%xmm6 - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - pxor %xmm5,%xmm4 - movl (%esp),%esi - xorl %ecx,%edx - pslld $11,%xmm5 - movl 4(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - pxor %xmm6,%xmm4 - andl %ecx,%esi - movl %ecx,28(%esp) - movdqa %xmm7,%xmm6 - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - pxor %xmm5,%xmm4 - movl %ebx,%ecx - addl %edi,%edx - psrld $10,%xmm7 - movl 16(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - paddd %xmm4,%xmm1 - movl %ebx,12(%esp) - xorl %ebx,%ecx - psrlq $17,%xmm6 - xorl %edi,%ebx - addl 8(%esp),%edx - rorl $11,%ecx - pxor %xmm6,%xmm7 - andl %ebx,%eax - xorl %esi,%ecx - psrlq $2,%xmm6 - addl 52(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - pxor %xmm6,%xmm7 - addl %edx,%eax - addl 24(%esp),%edx - pshufd $128,%xmm7,%xmm7 - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 28(%esp),%esi - xorl %ecx,%edx - movl (%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - psrldq $8,%xmm7 - movl %ecx,24(%esp) - xorl %ecx,%edx - xorl %esi,%edi - paddd %xmm7,%xmm1 - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 12(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,8(%esp) - pshufd $80,%xmm1,%xmm7 - xorl %eax,%ecx - xorl %edi,%eax - addl 4(%esp),%edx - movdqa %xmm7,%xmm6 - rorl $11,%ecx - psrld $10,%xmm7 - andl %eax,%ebx - psrlq $17,%xmm6 - xorl %esi,%ecx - addl 56(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - pxor %xmm6,%xmm7 - addl %edx,%ebx - addl 20(%esp),%edx - psrlq $2,%xmm6 - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - pxor %xmm6,%xmm7 - movl 24(%esp),%esi - xorl %ecx,%edx - movl 28(%esp),%edi - pshufd $8,%xmm7,%xmm7 - xorl %edi,%esi - rorl $5,%edx - movdqa 16(%ebp),%xmm6 - andl %ecx,%esi - movl %ecx,20(%esp) - pslldq $8,%xmm7 - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 8(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - paddd %xmm7,%xmm1 - movl %ebx,4(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl (%esp),%edx - paddd %xmm1,%xmm6 - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 60(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl 16(%esp),%edx - addl %ecx,%eax - movdqa %xmm6,48(%esp) - movl %edx,%ecx - movdqa %xmm3,%xmm4 - rorl $14,%edx - movl 20(%esp),%esi - movdqa %xmm1,%xmm7 - xorl %ecx,%edx - movl 24(%esp),%edi -.byte 102,15,58,15,226,4 - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi -.byte 102,15,58,15,248,4 - movl %ecx,16(%esp) - xorl %ecx,%edx - xorl %esi,%edi - movdqa %xmm4,%xmm5 - rorl $6,%edx - movl %eax,%ecx - movdqa %xmm4,%xmm6 - addl %edi,%edx - movl 4(%esp),%edi - psrld $3,%xmm4 - movl %eax,%esi - rorl $9,%ecx - paddd %xmm7,%xmm2 - movl %eax,(%esp) - xorl %eax,%ecx - psrld $7,%xmm6 - xorl %edi,%eax - addl 28(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - pshufd $250,%xmm1,%xmm7 - xorl %esi,%ecx - addl 64(%esp),%edx - pslld $14,%xmm5 - xorl %edi,%ebx - rorl $2,%ecx - pxor %xmm6,%xmm4 - addl %edx,%ebx - addl 12(%esp),%edx - psrld $11,%xmm6 - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - pxor %xmm5,%xmm4 - movl 16(%esp),%esi - xorl %ecx,%edx - pslld $11,%xmm5 - movl 20(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - pxor %xmm6,%xmm4 - andl %ecx,%esi - movl %ecx,12(%esp) - movdqa %xmm7,%xmm6 - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - pxor %xmm5,%xmm4 - movl %ebx,%ecx - addl %edi,%edx - psrld $10,%xmm7 - movl (%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - paddd %xmm4,%xmm2 - movl %ebx,28(%esp) - xorl %ebx,%ecx - psrlq $17,%xmm6 - xorl %edi,%ebx - addl 24(%esp),%edx - rorl $11,%ecx - pxor %xmm6,%xmm7 - andl %ebx,%eax - xorl %esi,%ecx - psrlq $2,%xmm6 - addl 68(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - pxor %xmm6,%xmm7 - addl %edx,%eax - addl 8(%esp),%edx - pshufd $128,%xmm7,%xmm7 - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 12(%esp),%esi - xorl %ecx,%edx - movl 16(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - psrldq $8,%xmm7 - movl %ecx,8(%esp) - xorl %ecx,%edx - xorl %esi,%edi - paddd %xmm7,%xmm2 - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 28(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,24(%esp) - pshufd $80,%xmm2,%xmm7 - xorl %eax,%ecx - xorl %edi,%eax - addl 20(%esp),%edx - movdqa %xmm7,%xmm6 - rorl $11,%ecx - psrld $10,%xmm7 - andl %eax,%ebx - psrlq $17,%xmm6 - xorl %esi,%ecx - addl 72(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - pxor %xmm6,%xmm7 - addl %edx,%ebx - addl 4(%esp),%edx - psrlq $2,%xmm6 - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - pxor %xmm6,%xmm7 - movl 8(%esp),%esi - xorl %ecx,%edx - movl 12(%esp),%edi - pshufd $8,%xmm7,%xmm7 - xorl %edi,%esi - rorl $5,%edx - movdqa 32(%ebp),%xmm6 - andl %ecx,%esi - movl %ecx,4(%esp) - pslldq $8,%xmm7 - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 24(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - paddd %xmm7,%xmm2 - movl %ebx,20(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl 16(%esp),%edx - paddd %xmm2,%xmm6 - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 76(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl (%esp),%edx - addl %ecx,%eax - movdqa %xmm6,64(%esp) - movl %edx,%ecx - movdqa %xmm0,%xmm4 - rorl $14,%edx - movl 4(%esp),%esi - movdqa %xmm2,%xmm7 - xorl %ecx,%edx - movl 8(%esp),%edi -.byte 102,15,58,15,227,4 - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi -.byte 102,15,58,15,249,4 - movl %ecx,(%esp) - xorl %ecx,%edx - xorl %esi,%edi - movdqa %xmm4,%xmm5 - rorl $6,%edx - movl %eax,%ecx - movdqa %xmm4,%xmm6 - addl %edi,%edx - movl 20(%esp),%edi - psrld $3,%xmm4 - movl %eax,%esi - rorl $9,%ecx - paddd %xmm7,%xmm3 - movl %eax,16(%esp) - xorl %eax,%ecx - psrld $7,%xmm6 - xorl %edi,%eax - addl 12(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - pshufd $250,%xmm2,%xmm7 - xorl %esi,%ecx - addl 80(%esp),%edx - pslld $14,%xmm5 - xorl %edi,%ebx - rorl $2,%ecx - pxor %xmm6,%xmm4 - addl %edx,%ebx - addl 28(%esp),%edx - psrld $11,%xmm6 - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - pxor %xmm5,%xmm4 - movl (%esp),%esi - xorl %ecx,%edx - pslld $11,%xmm5 - movl 4(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - pxor %xmm6,%xmm4 - andl %ecx,%esi - movl %ecx,28(%esp) - movdqa %xmm7,%xmm6 - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - pxor %xmm5,%xmm4 - movl %ebx,%ecx - addl %edi,%edx - psrld $10,%xmm7 - movl 16(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - paddd %xmm4,%xmm3 - movl %ebx,12(%esp) - xorl %ebx,%ecx - psrlq $17,%xmm6 - xorl %edi,%ebx - addl 8(%esp),%edx - rorl $11,%ecx - pxor %xmm6,%xmm7 - andl %ebx,%eax - xorl %esi,%ecx - psrlq $2,%xmm6 - addl 84(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - pxor %xmm6,%xmm7 - addl %edx,%eax - addl 24(%esp),%edx - pshufd $128,%xmm7,%xmm7 - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 28(%esp),%esi - xorl %ecx,%edx - movl (%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - psrldq $8,%xmm7 - movl %ecx,24(%esp) - xorl %ecx,%edx - xorl %esi,%edi - paddd %xmm7,%xmm3 - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 12(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,8(%esp) - pshufd $80,%xmm3,%xmm7 - xorl %eax,%ecx - xorl %edi,%eax - addl 4(%esp),%edx - movdqa %xmm7,%xmm6 - rorl $11,%ecx - psrld $10,%xmm7 - andl %eax,%ebx - psrlq $17,%xmm6 - xorl %esi,%ecx - addl 88(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - pxor %xmm6,%xmm7 - addl %edx,%ebx - addl 20(%esp),%edx - psrlq $2,%xmm6 - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - pxor %xmm6,%xmm7 - movl 24(%esp),%esi - xorl %ecx,%edx - movl 28(%esp),%edi - pshufd $8,%xmm7,%xmm7 - xorl %edi,%esi - rorl $5,%edx - movdqa 48(%ebp),%xmm6 - andl %ecx,%esi - movl %ecx,20(%esp) - pslldq $8,%xmm7 - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 8(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - paddd %xmm7,%xmm3 - movl %ebx,4(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl (%esp),%edx - paddd %xmm3,%xmm6 - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 92(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl 16(%esp),%edx - addl %ecx,%eax - movdqa %xmm6,80(%esp) - cmpl $66051,64(%ebp) - jne L012ssse3_00_47 - movl %edx,%ecx - rorl $14,%edx - movl 20(%esp),%esi - xorl %ecx,%edx - movl 24(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 4(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,(%esp) - xorl %eax,%ecx - xorl %edi,%eax - addl 28(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - xorl %esi,%ecx - addl 32(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - addl %edx,%ebx - addl 12(%esp),%edx - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - movl 16(%esp),%esi - xorl %ecx,%edx - movl 20(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,12(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl (%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - movl %ebx,28(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl 24(%esp),%edx - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 36(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl 8(%esp),%edx - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 12(%esp),%esi - xorl %ecx,%edx - movl 16(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 28(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,24(%esp) - xorl %eax,%ecx - xorl %edi,%eax - addl 20(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - xorl %esi,%ecx - addl 40(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - addl %edx,%ebx - addl 4(%esp),%edx - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - movl 8(%esp),%esi - xorl %ecx,%edx - movl 12(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,4(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 24(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - movl %ebx,20(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl 16(%esp),%edx - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 44(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl (%esp),%edx - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 4(%esp),%esi - xorl %ecx,%edx - movl 8(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 20(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,16(%esp) - xorl %eax,%ecx - xorl %edi,%eax - addl 12(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - xorl %esi,%ecx - addl 48(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - addl %edx,%ebx - addl 28(%esp),%edx - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - movl (%esp),%esi - xorl %ecx,%edx - movl 4(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,28(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 16(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - movl %ebx,12(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl 8(%esp),%edx - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 52(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl 24(%esp),%edx - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 28(%esp),%esi - xorl %ecx,%edx - movl (%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 12(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,8(%esp) - xorl %eax,%ecx - xorl %edi,%eax - addl 4(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - xorl %esi,%ecx - addl 56(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - addl %edx,%ebx - addl 20(%esp),%edx - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - movl 24(%esp),%esi - xorl %ecx,%edx - movl 28(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,20(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 8(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - movl %ebx,4(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl (%esp),%edx - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 60(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl 16(%esp),%edx - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 20(%esp),%esi - xorl %ecx,%edx - movl 24(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,16(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 4(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,(%esp) - xorl %eax,%ecx - xorl %edi,%eax - addl 28(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - xorl %esi,%ecx - addl 64(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - addl %edx,%ebx - addl 12(%esp),%edx - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - movl 16(%esp),%esi - xorl %ecx,%edx - movl 20(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,12(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl (%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - movl %ebx,28(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl 24(%esp),%edx - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 68(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl 8(%esp),%edx - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 12(%esp),%esi - xorl %ecx,%edx - movl 16(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,8(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 28(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,24(%esp) - xorl %eax,%ecx - xorl %edi,%eax - addl 20(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - xorl %esi,%ecx - addl 72(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - addl %edx,%ebx - addl 4(%esp),%edx - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - movl 8(%esp),%esi - xorl %ecx,%edx - movl 12(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,4(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 24(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - movl %ebx,20(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl 16(%esp),%edx - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 76(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl (%esp),%edx - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 4(%esp),%esi - xorl %ecx,%edx - movl 8(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 20(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,16(%esp) - xorl %eax,%ecx - xorl %edi,%eax - addl 12(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - xorl %esi,%ecx - addl 80(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - addl %edx,%ebx - addl 28(%esp),%edx - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - movl (%esp),%esi - xorl %ecx,%edx - movl 4(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,28(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 16(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - movl %ebx,12(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl 8(%esp),%edx - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 84(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl 24(%esp),%edx - addl %ecx,%eax - movl %edx,%ecx - rorl $14,%edx - movl 28(%esp),%esi - xorl %ecx,%edx - movl (%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,24(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %eax,%ecx - addl %edi,%edx - movl 12(%esp),%edi - movl %eax,%esi - rorl $9,%ecx - movl %eax,8(%esp) - xorl %eax,%ecx - xorl %edi,%eax - addl 4(%esp),%edx - rorl $11,%ecx - andl %eax,%ebx - xorl %esi,%ecx - addl 88(%esp),%edx - xorl %edi,%ebx - rorl $2,%ecx - addl %edx,%ebx - addl 20(%esp),%edx - addl %ecx,%ebx - movl %edx,%ecx - rorl $14,%edx - movl 24(%esp),%esi - xorl %ecx,%edx - movl 28(%esp),%edi - xorl %edi,%esi - rorl $5,%edx - andl %ecx,%esi - movl %ecx,20(%esp) - xorl %ecx,%edx - xorl %esi,%edi - rorl $6,%edx - movl %ebx,%ecx - addl %edi,%edx - movl 8(%esp),%edi - movl %ebx,%esi - rorl $9,%ecx - movl %ebx,4(%esp) - xorl %ebx,%ecx - xorl %edi,%ebx - addl (%esp),%edx - rorl $11,%ecx - andl %ebx,%eax - xorl %esi,%ecx - addl 92(%esp),%edx - xorl %edi,%eax - rorl $2,%ecx - addl %edx,%eax - addl 16(%esp),%edx - addl %ecx,%eax - movl 96(%esp),%esi - xorl %edi,%ebx - movl 12(%esp),%ecx - addl (%esi),%eax - addl 4(%esi),%ebx - addl 8(%esi),%edi - addl 12(%esi),%ecx - movl %eax,(%esi) - movl %ebx,4(%esi) - movl %edi,8(%esi) - movl %ecx,12(%esi) - movl %ebx,4(%esp) - xorl %edi,%ebx - movl %edi,8(%esp) - movl %ecx,12(%esp) - movl 20(%esp),%edi - movl 24(%esp),%ecx - addl 16(%esi),%edx - addl 20(%esi),%edi - addl 24(%esi),%ecx - movl %edx,16(%esi) - movl %edi,20(%esi) - movl %edi,20(%esp) - movl 28(%esp),%edi - movl %ecx,24(%esi) - addl 28(%esi),%edi - movl %ecx,24(%esp) - movl %edi,28(%esi) - movl %edi,28(%esp) - movl 100(%esp),%edi - movdqa 64(%ebp),%xmm7 - subl $192,%ebp - cmpl 104(%esp),%edi - jb L011grand_ssse3 - movl 108(%esp),%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.section __IMPORT,__pointers,non_lazy_symbol_pointers -L_OPENSSL_ia32cap_P$non_lazy_ptr: -.indirect_symbol _OPENSSL_ia32cap_P -.long 0 -#endif diff --git a/third_party/boringssl/mac-x86/crypto/sha/sha512-586.S b/third_party/boringssl/mac-x86/crypto/sha/sha512-586.S deleted file mode 100644 index 3066100e6ff92..0000000000000 --- a/third_party/boringssl/mac-x86/crypto/sha/sha512-586.S +++ /dev/null @@ -1,2833 +0,0 @@ -#if defined(__i386__) -.file "sha512-586.S" -.text -.globl _sha512_block_data_order -.private_extern _sha512_block_data_order -.align 4 -_sha512_block_data_order: -L_sha512_block_data_order_begin: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl 20(%esp),%esi - movl 24(%esp),%edi - movl 28(%esp),%eax - movl %esp,%ebx - call L000pic_point -L000pic_point: - popl %ebp - leal L001K512-L000pic_point(%ebp),%ebp - subl $16,%esp - andl $-64,%esp - shll $7,%eax - addl %edi,%eax - movl %esi,(%esp) - movl %edi,4(%esp) - movl %eax,8(%esp) - movl %ebx,12(%esp) - movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L001K512(%ebp),%edx - movl (%edx),%ecx - testl $67108864,%ecx - jz L002loop_x86 - movl 4(%edx),%edx - movq (%esi),%mm0 - andl $16777216,%ecx - movq 8(%esi),%mm1 - andl $512,%edx - movq 16(%esi),%mm2 - orl %edx,%ecx - movq 24(%esi),%mm3 - movq 32(%esi),%mm4 - movq 40(%esi),%mm5 - movq 48(%esi),%mm6 - movq 56(%esi),%mm7 - cmpl $16777728,%ecx - je L003SSSE3 - subl $80,%esp - jmp L004loop_sse2 -.align 4,0x90 -L004loop_sse2: - movq %mm1,8(%esp) - movq %mm2,16(%esp) - movq %mm3,24(%esp) - movq %mm5,40(%esp) - movq %mm6,48(%esp) - pxor %mm1,%mm2 - movq %mm7,56(%esp) - movq %mm0,%mm3 - movl (%edi),%eax - movl 4(%edi),%ebx - addl $8,%edi - movl $15,%edx - bswap %eax - bswap %ebx - jmp L00500_14_sse2 -.align 4,0x90 -L00500_14_sse2: - movd %eax,%mm1 - movl (%edi),%eax - movd %ebx,%mm7 - movl 4(%edi),%ebx - addl $8,%edi - bswap %eax - bswap %ebx - punpckldq %mm1,%mm7 - movq %mm4,%mm1 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,32(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - movq %mm3,%mm0 - movq %mm7,72(%esp) - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 56(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - paddq (%ebp),%mm7 - pxor %mm4,%mm3 - movq 24(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 8(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - subl $8,%esp - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 40(%esp),%mm5 - paddq %mm2,%mm3 - movq %mm0,%mm2 - addl $8,%ebp - paddq %mm6,%mm3 - movq 48(%esp),%mm6 - decl %edx - jnz L00500_14_sse2 - movd %eax,%mm1 - movd %ebx,%mm7 - punpckldq %mm1,%mm7 - movq %mm4,%mm1 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,32(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - movq %mm3,%mm0 - movq %mm7,72(%esp) - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 56(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - paddq (%ebp),%mm7 - pxor %mm4,%mm3 - movq 24(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 8(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - subl $8,%esp - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 192(%esp),%mm7 - paddq %mm2,%mm3 - movq %mm0,%mm2 - addl $8,%ebp - paddq %mm6,%mm3 - pxor %mm0,%mm0 - movl $32,%edx - jmp L00616_79_sse2 -.align 4,0x90 -L00616_79_sse2: - movq 88(%esp),%mm5 - movq %mm7,%mm1 - psrlq $1,%mm7 - movq %mm5,%mm6 - psrlq $6,%mm5 - psllq $56,%mm1 - paddq %mm3,%mm0 - movq %mm7,%mm3 - psrlq $6,%mm7 - pxor %mm1,%mm3 - psllq $7,%mm1 - pxor %mm7,%mm3 - psrlq $1,%mm7 - pxor %mm1,%mm3 - movq %mm5,%mm1 - psrlq $13,%mm5 - pxor %mm3,%mm7 - psllq $3,%mm6 - pxor %mm5,%mm1 - paddq 200(%esp),%mm7 - pxor %mm6,%mm1 - psrlq $42,%mm5 - paddq 128(%esp),%mm7 - pxor %mm5,%mm1 - psllq $42,%mm6 - movq 40(%esp),%mm5 - pxor %mm6,%mm1 - movq 48(%esp),%mm6 - paddq %mm1,%mm7 - movq %mm4,%mm1 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,32(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - movq %mm7,72(%esp) - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 56(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - paddq (%ebp),%mm7 - pxor %mm4,%mm3 - movq 24(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 8(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - subl $8,%esp - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 192(%esp),%mm7 - paddq %mm6,%mm2 - addl $8,%ebp - movq 88(%esp),%mm5 - movq %mm7,%mm1 - psrlq $1,%mm7 - movq %mm5,%mm6 - psrlq $6,%mm5 - psllq $56,%mm1 - paddq %mm3,%mm2 - movq %mm7,%mm3 - psrlq $6,%mm7 - pxor %mm1,%mm3 - psllq $7,%mm1 - pxor %mm7,%mm3 - psrlq $1,%mm7 - pxor %mm1,%mm3 - movq %mm5,%mm1 - psrlq $13,%mm5 - pxor %mm3,%mm7 - psllq $3,%mm6 - pxor %mm5,%mm1 - paddq 200(%esp),%mm7 - pxor %mm6,%mm1 - psrlq $42,%mm5 - paddq 128(%esp),%mm7 - pxor %mm5,%mm1 - psllq $42,%mm6 - movq 40(%esp),%mm5 - pxor %mm6,%mm1 - movq 48(%esp),%mm6 - paddq %mm1,%mm7 - movq %mm4,%mm1 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,32(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - movq %mm7,72(%esp) - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 56(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - paddq (%ebp),%mm7 - pxor %mm4,%mm3 - movq 24(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 8(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - subl $8,%esp - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 192(%esp),%mm7 - paddq %mm6,%mm0 - addl $8,%ebp - decl %edx - jnz L00616_79_sse2 - paddq %mm3,%mm0 - movq 8(%esp),%mm1 - movq 24(%esp),%mm3 - movq 40(%esp),%mm5 - movq 48(%esp),%mm6 - movq 56(%esp),%mm7 - pxor %mm1,%mm2 - paddq (%esi),%mm0 - paddq 8(%esi),%mm1 - paddq 16(%esi),%mm2 - paddq 24(%esi),%mm3 - paddq 32(%esi),%mm4 - paddq 40(%esi),%mm5 - paddq 48(%esi),%mm6 - paddq 56(%esi),%mm7 - movl $640,%eax - movq %mm0,(%esi) - movq %mm1,8(%esi) - movq %mm2,16(%esi) - movq %mm3,24(%esi) - movq %mm4,32(%esi) - movq %mm5,40(%esi) - movq %mm6,48(%esi) - movq %mm7,56(%esi) - leal (%esp,%eax,1),%esp - subl %eax,%ebp - cmpl 88(%esp),%edi - jb L004loop_sse2 - movl 92(%esp),%esp - emms - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.align 5,0x90 -L003SSSE3: - leal -64(%esp),%edx - subl $256,%esp - movdqa 640(%ebp),%xmm1 - movdqu (%edi),%xmm0 -.byte 102,15,56,0,193 - movdqa (%ebp),%xmm3 - movdqa %xmm1,%xmm2 - movdqu 16(%edi),%xmm1 - paddq %xmm0,%xmm3 -.byte 102,15,56,0,202 - movdqa %xmm3,-128(%edx) - movdqa 16(%ebp),%xmm4 - movdqa %xmm2,%xmm3 - movdqu 32(%edi),%xmm2 - paddq %xmm1,%xmm4 -.byte 102,15,56,0,211 - movdqa %xmm4,-112(%edx) - movdqa 32(%ebp),%xmm5 - movdqa %xmm3,%xmm4 - movdqu 48(%edi),%xmm3 - paddq %xmm2,%xmm5 -.byte 102,15,56,0,220 - movdqa %xmm5,-96(%edx) - movdqa 48(%ebp),%xmm6 - movdqa %xmm4,%xmm5 - movdqu 64(%edi),%xmm4 - paddq %xmm3,%xmm6 -.byte 102,15,56,0,229 - movdqa %xmm6,-80(%edx) - movdqa 64(%ebp),%xmm7 - movdqa %xmm5,%xmm6 - movdqu 80(%edi),%xmm5 - paddq %xmm4,%xmm7 -.byte 102,15,56,0,238 - movdqa %xmm7,-64(%edx) - movdqa %xmm0,(%edx) - movdqa 80(%ebp),%xmm0 - movdqa %xmm6,%xmm7 - movdqu 96(%edi),%xmm6 - paddq %xmm5,%xmm0 -.byte 102,15,56,0,247 - movdqa %xmm0,-48(%edx) - movdqa %xmm1,16(%edx) - movdqa 96(%ebp),%xmm1 - movdqa %xmm7,%xmm0 - movdqu 112(%edi),%xmm7 - paddq %xmm6,%xmm1 -.byte 102,15,56,0,248 - movdqa %xmm1,-32(%edx) - movdqa %xmm2,32(%edx) - movdqa 112(%ebp),%xmm2 - movdqa (%edx),%xmm0 - paddq %xmm7,%xmm2 - movdqa %xmm2,-16(%edx) - nop -.align 5,0x90 -L007loop_ssse3: - movdqa 16(%edx),%xmm2 - movdqa %xmm3,48(%edx) - leal 128(%ebp),%ebp - movq %mm1,8(%esp) - movl %edi,%ebx - movq %mm2,16(%esp) - leal 128(%edi),%edi - movq %mm3,24(%esp) - cmpl %eax,%edi - movq %mm5,40(%esp) - cmovbl %edi,%ebx - movq %mm6,48(%esp) - movl $4,%ecx - pxor %mm1,%mm2 - movq %mm7,56(%esp) - pxor %mm3,%mm3 - jmp L00800_47_ssse3 -.align 5,0x90 -L00800_47_ssse3: - movdqa %xmm5,%xmm3 - movdqa %xmm2,%xmm1 -.byte 102,15,58,15,208,8 - movdqa %xmm4,(%edx) -.byte 102,15,58,15,220,8 - movdqa %xmm2,%xmm4 - psrlq $7,%xmm2 - paddq %xmm3,%xmm0 - movdqa %xmm4,%xmm3 - psrlq $1,%xmm4 - psllq $56,%xmm3 - pxor %xmm4,%xmm2 - psrlq $7,%xmm4 - pxor %xmm3,%xmm2 - psllq $7,%xmm3 - pxor %xmm4,%xmm2 - movdqa %xmm7,%xmm4 - pxor %xmm3,%xmm2 - movdqa %xmm7,%xmm3 - psrlq $6,%xmm4 - paddq %xmm2,%xmm0 - movdqa %xmm7,%xmm2 - psrlq $19,%xmm3 - psllq $3,%xmm2 - pxor %xmm3,%xmm4 - psrlq $42,%xmm3 - pxor %xmm2,%xmm4 - psllq $42,%xmm2 - pxor %xmm3,%xmm4 - movdqa 32(%edx),%xmm3 - pxor %xmm2,%xmm4 - movdqa (%ebp),%xmm2 - movq %mm4,%mm1 - paddq %xmm4,%xmm0 - movq -128(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,32(%esp) - paddq %xmm0,%xmm2 - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 56(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 24(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 8(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 32(%esp),%mm5 - paddq %mm6,%mm2 - movq 40(%esp),%mm6 - movq %mm4,%mm1 - movq -120(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,24(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,56(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 48(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 16(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq (%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 24(%esp),%mm5 - paddq %mm6,%mm0 - movq 32(%esp),%mm6 - movdqa %xmm2,-128(%edx) - movdqa %xmm6,%xmm4 - movdqa %xmm3,%xmm2 -.byte 102,15,58,15,217,8 - movdqa %xmm5,16(%edx) -.byte 102,15,58,15,229,8 - movdqa %xmm3,%xmm5 - psrlq $7,%xmm3 - paddq %xmm4,%xmm1 - movdqa %xmm5,%xmm4 - psrlq $1,%xmm5 - psllq $56,%xmm4 - pxor %xmm5,%xmm3 - psrlq $7,%xmm5 - pxor %xmm4,%xmm3 - psllq $7,%xmm4 - pxor %xmm5,%xmm3 - movdqa %xmm0,%xmm5 - pxor %xmm4,%xmm3 - movdqa %xmm0,%xmm4 - psrlq $6,%xmm5 - paddq %xmm3,%xmm1 - movdqa %xmm0,%xmm3 - psrlq $19,%xmm4 - psllq $3,%xmm3 - pxor %xmm4,%xmm5 - psrlq $42,%xmm4 - pxor %xmm3,%xmm5 - psllq $42,%xmm3 - pxor %xmm4,%xmm5 - movdqa 48(%edx),%xmm4 - pxor %xmm3,%xmm5 - movdqa 16(%ebp),%xmm3 - movq %mm4,%mm1 - paddq %xmm5,%xmm1 - movq -112(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,16(%esp) - paddq %xmm1,%xmm3 - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,48(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 40(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 8(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 56(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 16(%esp),%mm5 - paddq %mm6,%mm2 - movq 24(%esp),%mm6 - movq %mm4,%mm1 - movq -104(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,8(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,40(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 32(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq (%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 48(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 8(%esp),%mm5 - paddq %mm6,%mm0 - movq 16(%esp),%mm6 - movdqa %xmm3,-112(%edx) - movdqa %xmm7,%xmm5 - movdqa %xmm4,%xmm3 -.byte 102,15,58,15,226,8 - movdqa %xmm6,32(%edx) -.byte 102,15,58,15,238,8 - movdqa %xmm4,%xmm6 - psrlq $7,%xmm4 - paddq %xmm5,%xmm2 - movdqa %xmm6,%xmm5 - psrlq $1,%xmm6 - psllq $56,%xmm5 - pxor %xmm6,%xmm4 - psrlq $7,%xmm6 - pxor %xmm5,%xmm4 - psllq $7,%xmm5 - pxor %xmm6,%xmm4 - movdqa %xmm1,%xmm6 - pxor %xmm5,%xmm4 - movdqa %xmm1,%xmm5 - psrlq $6,%xmm6 - paddq %xmm4,%xmm2 - movdqa %xmm1,%xmm4 - psrlq $19,%xmm5 - psllq $3,%xmm4 - pxor %xmm5,%xmm6 - psrlq $42,%xmm5 - pxor %xmm4,%xmm6 - psllq $42,%xmm4 - pxor %xmm5,%xmm6 - movdqa (%edx),%xmm5 - pxor %xmm4,%xmm6 - movdqa 32(%ebp),%xmm4 - movq %mm4,%mm1 - paddq %xmm6,%xmm2 - movq -96(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,(%esp) - paddq %xmm2,%xmm4 - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,32(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 24(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 56(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 40(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq (%esp),%mm5 - paddq %mm6,%mm2 - movq 8(%esp),%mm6 - movq %mm4,%mm1 - movq -88(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,56(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,24(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 16(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 48(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 32(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 56(%esp),%mm5 - paddq %mm6,%mm0 - movq (%esp),%mm6 - movdqa %xmm4,-96(%edx) - movdqa %xmm0,%xmm6 - movdqa %xmm5,%xmm4 -.byte 102,15,58,15,235,8 - movdqa %xmm7,48(%edx) -.byte 102,15,58,15,247,8 - movdqa %xmm5,%xmm7 - psrlq $7,%xmm5 - paddq %xmm6,%xmm3 - movdqa %xmm7,%xmm6 - psrlq $1,%xmm7 - psllq $56,%xmm6 - pxor %xmm7,%xmm5 - psrlq $7,%xmm7 - pxor %xmm6,%xmm5 - psllq $7,%xmm6 - pxor %xmm7,%xmm5 - movdqa %xmm2,%xmm7 - pxor %xmm6,%xmm5 - movdqa %xmm2,%xmm6 - psrlq $6,%xmm7 - paddq %xmm5,%xmm3 - movdqa %xmm2,%xmm5 - psrlq $19,%xmm6 - psllq $3,%xmm5 - pxor %xmm6,%xmm7 - psrlq $42,%xmm6 - pxor %xmm5,%xmm7 - psllq $42,%xmm5 - pxor %xmm6,%xmm7 - movdqa 16(%edx),%xmm6 - pxor %xmm5,%xmm7 - movdqa 48(%ebp),%xmm5 - movq %mm4,%mm1 - paddq %xmm7,%xmm3 - movq -80(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,48(%esp) - paddq %xmm3,%xmm5 - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,16(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 8(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 40(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 24(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 48(%esp),%mm5 - paddq %mm6,%mm2 - movq 56(%esp),%mm6 - movq %mm4,%mm1 - movq -72(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,40(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,8(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq (%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 32(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 16(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 40(%esp),%mm5 - paddq %mm6,%mm0 - movq 48(%esp),%mm6 - movdqa %xmm5,-80(%edx) - movdqa %xmm1,%xmm7 - movdqa %xmm6,%xmm5 -.byte 102,15,58,15,244,8 - movdqa %xmm0,(%edx) -.byte 102,15,58,15,248,8 - movdqa %xmm6,%xmm0 - psrlq $7,%xmm6 - paddq %xmm7,%xmm4 - movdqa %xmm0,%xmm7 - psrlq $1,%xmm0 - psllq $56,%xmm7 - pxor %xmm0,%xmm6 - psrlq $7,%xmm0 - pxor %xmm7,%xmm6 - psllq $7,%xmm7 - pxor %xmm0,%xmm6 - movdqa %xmm3,%xmm0 - pxor %xmm7,%xmm6 - movdqa %xmm3,%xmm7 - psrlq $6,%xmm0 - paddq %xmm6,%xmm4 - movdqa %xmm3,%xmm6 - psrlq $19,%xmm7 - psllq $3,%xmm6 - pxor %xmm7,%xmm0 - psrlq $42,%xmm7 - pxor %xmm6,%xmm0 - psllq $42,%xmm6 - pxor %xmm7,%xmm0 - movdqa 32(%edx),%xmm7 - pxor %xmm6,%xmm0 - movdqa 64(%ebp),%xmm6 - movq %mm4,%mm1 - paddq %xmm0,%xmm4 - movq -64(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,32(%esp) - paddq %xmm4,%xmm6 - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 56(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 24(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 8(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 32(%esp),%mm5 - paddq %mm6,%mm2 - movq 40(%esp),%mm6 - movq %mm4,%mm1 - movq -56(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,24(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,56(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 48(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 16(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq (%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 24(%esp),%mm5 - paddq %mm6,%mm0 - movq 32(%esp),%mm6 - movdqa %xmm6,-64(%edx) - movdqa %xmm2,%xmm0 - movdqa %xmm7,%xmm6 -.byte 102,15,58,15,253,8 - movdqa %xmm1,16(%edx) -.byte 102,15,58,15,193,8 - movdqa %xmm7,%xmm1 - psrlq $7,%xmm7 - paddq %xmm0,%xmm5 - movdqa %xmm1,%xmm0 - psrlq $1,%xmm1 - psllq $56,%xmm0 - pxor %xmm1,%xmm7 - psrlq $7,%xmm1 - pxor %xmm0,%xmm7 - psllq $7,%xmm0 - pxor %xmm1,%xmm7 - movdqa %xmm4,%xmm1 - pxor %xmm0,%xmm7 - movdqa %xmm4,%xmm0 - psrlq $6,%xmm1 - paddq %xmm7,%xmm5 - movdqa %xmm4,%xmm7 - psrlq $19,%xmm0 - psllq $3,%xmm7 - pxor %xmm0,%xmm1 - psrlq $42,%xmm0 - pxor %xmm7,%xmm1 - psllq $42,%xmm7 - pxor %xmm0,%xmm1 - movdqa 48(%edx),%xmm0 - pxor %xmm7,%xmm1 - movdqa 80(%ebp),%xmm7 - movq %mm4,%mm1 - paddq %xmm1,%xmm5 - movq -48(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,16(%esp) - paddq %xmm5,%xmm7 - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,48(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 40(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 8(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 56(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 16(%esp),%mm5 - paddq %mm6,%mm2 - movq 24(%esp),%mm6 - movq %mm4,%mm1 - movq -40(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,8(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,40(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 32(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq (%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 48(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 8(%esp),%mm5 - paddq %mm6,%mm0 - movq 16(%esp),%mm6 - movdqa %xmm7,-48(%edx) - movdqa %xmm3,%xmm1 - movdqa %xmm0,%xmm7 -.byte 102,15,58,15,198,8 - movdqa %xmm2,32(%edx) -.byte 102,15,58,15,202,8 - movdqa %xmm0,%xmm2 - psrlq $7,%xmm0 - paddq %xmm1,%xmm6 - movdqa %xmm2,%xmm1 - psrlq $1,%xmm2 - psllq $56,%xmm1 - pxor %xmm2,%xmm0 - psrlq $7,%xmm2 - pxor %xmm1,%xmm0 - psllq $7,%xmm1 - pxor %xmm2,%xmm0 - movdqa %xmm5,%xmm2 - pxor %xmm1,%xmm0 - movdqa %xmm5,%xmm1 - psrlq $6,%xmm2 - paddq %xmm0,%xmm6 - movdqa %xmm5,%xmm0 - psrlq $19,%xmm1 - psllq $3,%xmm0 - pxor %xmm1,%xmm2 - psrlq $42,%xmm1 - pxor %xmm0,%xmm2 - psllq $42,%xmm0 - pxor %xmm1,%xmm2 - movdqa (%edx),%xmm1 - pxor %xmm0,%xmm2 - movdqa 96(%ebp),%xmm0 - movq %mm4,%mm1 - paddq %xmm2,%xmm6 - movq -32(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,(%esp) - paddq %xmm6,%xmm0 - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,32(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 24(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 56(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 40(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq (%esp),%mm5 - paddq %mm6,%mm2 - movq 8(%esp),%mm6 - movq %mm4,%mm1 - movq -24(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,56(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,24(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 16(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 48(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 32(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 56(%esp),%mm5 - paddq %mm6,%mm0 - movq (%esp),%mm6 - movdqa %xmm0,-32(%edx) - movdqa %xmm4,%xmm2 - movdqa %xmm1,%xmm0 -.byte 102,15,58,15,207,8 - movdqa %xmm3,48(%edx) -.byte 102,15,58,15,211,8 - movdqa %xmm1,%xmm3 - psrlq $7,%xmm1 - paddq %xmm2,%xmm7 - movdqa %xmm3,%xmm2 - psrlq $1,%xmm3 - psllq $56,%xmm2 - pxor %xmm3,%xmm1 - psrlq $7,%xmm3 - pxor %xmm2,%xmm1 - psllq $7,%xmm2 - pxor %xmm3,%xmm1 - movdqa %xmm6,%xmm3 - pxor %xmm2,%xmm1 - movdqa %xmm6,%xmm2 - psrlq $6,%xmm3 - paddq %xmm1,%xmm7 - movdqa %xmm6,%xmm1 - psrlq $19,%xmm2 - psllq $3,%xmm1 - pxor %xmm2,%xmm3 - psrlq $42,%xmm2 - pxor %xmm1,%xmm3 - psllq $42,%xmm1 - pxor %xmm2,%xmm3 - movdqa 16(%edx),%xmm2 - pxor %xmm1,%xmm3 - movdqa 112(%ebp),%xmm1 - movq %mm4,%mm1 - paddq %xmm3,%xmm7 - movq -16(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,48(%esp) - paddq %xmm7,%xmm1 - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,16(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 8(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 40(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 24(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 48(%esp),%mm5 - paddq %mm6,%mm2 - movq 56(%esp),%mm6 - movq %mm4,%mm1 - movq -8(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,40(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,8(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq (%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 32(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 16(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 40(%esp),%mm5 - paddq %mm6,%mm0 - movq 48(%esp),%mm6 - movdqa %xmm1,-16(%edx) - leal 128(%ebp),%ebp - decl %ecx - jnz L00800_47_ssse3 - movdqa (%ebp),%xmm1 - leal -640(%ebp),%ebp - movdqu (%ebx),%xmm0 -.byte 102,15,56,0,193 - movdqa (%ebp),%xmm3 - movdqa %xmm1,%xmm2 - movdqu 16(%ebx),%xmm1 - paddq %xmm0,%xmm3 -.byte 102,15,56,0,202 - movq %mm4,%mm1 - movq -128(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,32(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 56(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 24(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 8(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 32(%esp),%mm5 - paddq %mm6,%mm2 - movq 40(%esp),%mm6 - movq %mm4,%mm1 - movq -120(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,24(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,56(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 48(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 16(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq (%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 24(%esp),%mm5 - paddq %mm6,%mm0 - movq 32(%esp),%mm6 - movdqa %xmm3,-128(%edx) - movdqa 16(%ebp),%xmm4 - movdqa %xmm2,%xmm3 - movdqu 32(%ebx),%xmm2 - paddq %xmm1,%xmm4 -.byte 102,15,56,0,211 - movq %mm4,%mm1 - movq -112(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,16(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,48(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 40(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 8(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 56(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 16(%esp),%mm5 - paddq %mm6,%mm2 - movq 24(%esp),%mm6 - movq %mm4,%mm1 - movq -104(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,8(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,40(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 32(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq (%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 48(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 8(%esp),%mm5 - paddq %mm6,%mm0 - movq 16(%esp),%mm6 - movdqa %xmm4,-112(%edx) - movdqa 32(%ebp),%xmm5 - movdqa %xmm3,%xmm4 - movdqu 48(%ebx),%xmm3 - paddq %xmm2,%xmm5 -.byte 102,15,56,0,220 - movq %mm4,%mm1 - movq -96(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,32(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 24(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 56(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 40(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq (%esp),%mm5 - paddq %mm6,%mm2 - movq 8(%esp),%mm6 - movq %mm4,%mm1 - movq -88(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,56(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,24(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 16(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 48(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 32(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 56(%esp),%mm5 - paddq %mm6,%mm0 - movq (%esp),%mm6 - movdqa %xmm5,-96(%edx) - movdqa 48(%ebp),%xmm6 - movdqa %xmm4,%xmm5 - movdqu 64(%ebx),%xmm4 - paddq %xmm3,%xmm6 -.byte 102,15,56,0,229 - movq %mm4,%mm1 - movq -80(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,48(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,16(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 8(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 40(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 24(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 48(%esp),%mm5 - paddq %mm6,%mm2 - movq 56(%esp),%mm6 - movq %mm4,%mm1 - movq -72(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,40(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,8(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq (%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 32(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 16(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 40(%esp),%mm5 - paddq %mm6,%mm0 - movq 48(%esp),%mm6 - movdqa %xmm6,-80(%edx) - movdqa 64(%ebp),%xmm7 - movdqa %xmm5,%xmm6 - movdqu 80(%ebx),%xmm5 - paddq %xmm4,%xmm7 -.byte 102,15,56,0,238 - movq %mm4,%mm1 - movq -64(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,32(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 56(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 24(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 8(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 32(%esp),%mm5 - paddq %mm6,%mm2 - movq 40(%esp),%mm6 - movq %mm4,%mm1 - movq -56(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,24(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,56(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 48(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 16(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq (%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 24(%esp),%mm5 - paddq %mm6,%mm0 - movq 32(%esp),%mm6 - movdqa %xmm7,-64(%edx) - movdqa %xmm0,(%edx) - movdqa 80(%ebp),%xmm0 - movdqa %xmm6,%xmm7 - movdqu 96(%ebx),%xmm6 - paddq %xmm5,%xmm0 -.byte 102,15,56,0,247 - movq %mm4,%mm1 - movq -48(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,16(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,48(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 40(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 8(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 56(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 16(%esp),%mm5 - paddq %mm6,%mm2 - movq 24(%esp),%mm6 - movq %mm4,%mm1 - movq -40(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,8(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,40(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 32(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq (%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 48(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 8(%esp),%mm5 - paddq %mm6,%mm0 - movq 16(%esp),%mm6 - movdqa %xmm0,-48(%edx) - movdqa %xmm1,16(%edx) - movdqa 96(%ebp),%xmm1 - movdqa %xmm7,%xmm0 - movdqu 112(%ebx),%xmm7 - paddq %xmm6,%xmm1 -.byte 102,15,56,0,248 - movq %mm4,%mm1 - movq -32(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,32(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 24(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 56(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 40(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq (%esp),%mm5 - paddq %mm6,%mm2 - movq 8(%esp),%mm6 - movq %mm4,%mm1 - movq -24(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,56(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,24(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 16(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 48(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 32(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 56(%esp),%mm5 - paddq %mm6,%mm0 - movq (%esp),%mm6 - movdqa %xmm1,-32(%edx) - movdqa %xmm2,32(%edx) - movdqa 112(%ebp),%xmm2 - movdqa (%edx),%xmm0 - paddq %xmm7,%xmm2 - movq %mm4,%mm1 - movq -16(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,48(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm0 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm0,16(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq 8(%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 40(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm0,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm0,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 24(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm0,%mm2 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - pxor %mm7,%mm6 - movq 48(%esp),%mm5 - paddq %mm6,%mm2 - movq 56(%esp),%mm6 - movq %mm4,%mm1 - movq -8(%edx),%mm7 - pxor %mm6,%mm5 - psrlq $14,%mm1 - movq %mm4,40(%esp) - pand %mm4,%mm5 - psllq $23,%mm4 - paddq %mm3,%mm2 - movq %mm1,%mm3 - psrlq $4,%mm1 - pxor %mm6,%mm5 - pxor %mm4,%mm3 - psllq $23,%mm4 - pxor %mm1,%mm3 - movq %mm2,8(%esp) - paddq %mm5,%mm7 - pxor %mm4,%mm3 - psrlq $23,%mm1 - paddq (%esp),%mm7 - pxor %mm1,%mm3 - psllq $4,%mm4 - pxor %mm4,%mm3 - movq 32(%esp),%mm4 - paddq %mm7,%mm3 - movq %mm2,%mm5 - psrlq $28,%mm5 - paddq %mm3,%mm4 - movq %mm2,%mm6 - movq %mm5,%mm7 - psllq $25,%mm6 - movq 16(%esp),%mm1 - psrlq $6,%mm5 - pxor %mm6,%mm7 - psllq $5,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm2 - psrlq $5,%mm5 - pxor %mm6,%mm7 - pand %mm2,%mm0 - psllq $6,%mm6 - pxor %mm5,%mm7 - pxor %mm1,%mm0 - pxor %mm7,%mm6 - movq 40(%esp),%mm5 - paddq %mm6,%mm0 - movq 48(%esp),%mm6 - movdqa %xmm2,-16(%edx) - movq 8(%esp),%mm1 - paddq %mm3,%mm0 - movq 24(%esp),%mm3 - movq 56(%esp),%mm7 - pxor %mm1,%mm2 - paddq (%esi),%mm0 - paddq 8(%esi),%mm1 - paddq 16(%esi),%mm2 - paddq 24(%esi),%mm3 - paddq 32(%esi),%mm4 - paddq 40(%esi),%mm5 - paddq 48(%esi),%mm6 - paddq 56(%esi),%mm7 - movq %mm0,(%esi) - movq %mm1,8(%esi) - movq %mm2,16(%esi) - movq %mm3,24(%esi) - movq %mm4,32(%esi) - movq %mm5,40(%esi) - movq %mm6,48(%esi) - movq %mm7,56(%esi) - cmpl %eax,%edi - jb L007loop_ssse3 - movl 76(%edx),%esp - emms - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.align 4,0x90 -L002loop_x86: - movl (%edi),%eax - movl 4(%edi),%ebx - movl 8(%edi),%ecx - movl 12(%edi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - movl 16(%edi),%eax - movl 20(%edi),%ebx - movl 24(%edi),%ecx - movl 28(%edi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - movl 32(%edi),%eax - movl 36(%edi),%ebx - movl 40(%edi),%ecx - movl 44(%edi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - movl 48(%edi),%eax - movl 52(%edi),%ebx - movl 56(%edi),%ecx - movl 60(%edi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - movl 64(%edi),%eax - movl 68(%edi),%ebx - movl 72(%edi),%ecx - movl 76(%edi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - movl 80(%edi),%eax - movl 84(%edi),%ebx - movl 88(%edi),%ecx - movl 92(%edi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - movl 96(%edi),%eax - movl 100(%edi),%ebx - movl 104(%edi),%ecx - movl 108(%edi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - movl 112(%edi),%eax - movl 116(%edi),%ebx - movl 120(%edi),%ecx - movl 124(%edi),%edx - bswap %eax - bswap %ebx - bswap %ecx - bswap %edx - pushl %eax - pushl %ebx - pushl %ecx - pushl %edx - addl $128,%edi - subl $72,%esp - movl %edi,204(%esp) - leal 8(%esp),%edi - movl $16,%ecx -.long 2784229001 -.align 4,0x90 -L00900_15_x86: - movl 40(%esp),%ecx - movl 44(%esp),%edx - movl %ecx,%esi - shrl $9,%ecx - movl %edx,%edi - shrl $9,%edx - movl %ecx,%ebx - shll $14,%esi - movl %edx,%eax - shll $14,%edi - xorl %esi,%ebx - shrl $5,%ecx - xorl %edi,%eax - shrl $5,%edx - xorl %ecx,%eax - shll $4,%esi - xorl %edx,%ebx - shll $4,%edi - xorl %esi,%ebx - shrl $4,%ecx - xorl %edi,%eax - shrl $4,%edx - xorl %ecx,%eax - shll $5,%esi - xorl %edx,%ebx - shll $5,%edi - xorl %esi,%eax - xorl %edi,%ebx - movl 48(%esp),%ecx - movl 52(%esp),%edx - movl 56(%esp),%esi - movl 60(%esp),%edi - addl 64(%esp),%eax - adcl 68(%esp),%ebx - xorl %esi,%ecx - xorl %edi,%edx - andl 40(%esp),%ecx - andl 44(%esp),%edx - addl 192(%esp),%eax - adcl 196(%esp),%ebx - xorl %esi,%ecx - xorl %edi,%edx - movl (%ebp),%esi - movl 4(%ebp),%edi - addl %ecx,%eax - adcl %edx,%ebx - movl 32(%esp),%ecx - movl 36(%esp),%edx - addl %esi,%eax - adcl %edi,%ebx - movl %eax,(%esp) - movl %ebx,4(%esp) - addl %ecx,%eax - adcl %edx,%ebx - movl 8(%esp),%ecx - movl 12(%esp),%edx - movl %eax,32(%esp) - movl %ebx,36(%esp) - movl %ecx,%esi - shrl $2,%ecx - movl %edx,%edi - shrl $2,%edx - movl %ecx,%ebx - shll $4,%esi - movl %edx,%eax - shll $4,%edi - xorl %esi,%ebx - shrl $5,%ecx - xorl %edi,%eax - shrl $5,%edx - xorl %ecx,%ebx - shll $21,%esi - xorl %edx,%eax - shll $21,%edi - xorl %esi,%eax - shrl $21,%ecx - xorl %edi,%ebx - shrl $21,%edx - xorl %ecx,%eax - shll $5,%esi - xorl %edx,%ebx - shll $5,%edi - xorl %esi,%eax - xorl %edi,%ebx - movl 8(%esp),%ecx - movl 12(%esp),%edx - movl 16(%esp),%esi - movl 20(%esp),%edi - addl (%esp),%eax - adcl 4(%esp),%ebx - orl %esi,%ecx - orl %edi,%edx - andl 24(%esp),%ecx - andl 28(%esp),%edx - andl 8(%esp),%esi - andl 12(%esp),%edi - orl %esi,%ecx - orl %edi,%edx - addl %ecx,%eax - adcl %edx,%ebx - movl %eax,(%esp) - movl %ebx,4(%esp) - movb (%ebp),%dl - subl $8,%esp - leal 8(%ebp),%ebp - cmpb $148,%dl - jne L00900_15_x86 -.align 4,0x90 -L01016_79_x86: - movl 312(%esp),%ecx - movl 316(%esp),%edx - movl %ecx,%esi - shrl $1,%ecx - movl %edx,%edi - shrl $1,%edx - movl %ecx,%eax - shll $24,%esi - movl %edx,%ebx - shll $24,%edi - xorl %esi,%ebx - shrl $6,%ecx - xorl %edi,%eax - shrl $6,%edx - xorl %ecx,%eax - shll $7,%esi - xorl %edx,%ebx - shll $1,%edi - xorl %esi,%ebx - shrl $1,%ecx - xorl %edi,%eax - shrl $1,%edx - xorl %ecx,%eax - shll $6,%edi - xorl %edx,%ebx - xorl %edi,%eax - movl %eax,(%esp) - movl %ebx,4(%esp) - movl 208(%esp),%ecx - movl 212(%esp),%edx - movl %ecx,%esi - shrl $6,%ecx - movl %edx,%edi - shrl $6,%edx - movl %ecx,%eax - shll $3,%esi - movl %edx,%ebx - shll $3,%edi - xorl %esi,%eax - shrl $13,%ecx - xorl %edi,%ebx - shrl $13,%edx - xorl %ecx,%eax - shll $10,%esi - xorl %edx,%ebx - shll $10,%edi - xorl %esi,%ebx - shrl $10,%ecx - xorl %edi,%eax - shrl $10,%edx - xorl %ecx,%ebx - shll $13,%edi - xorl %edx,%eax - xorl %edi,%eax - movl 320(%esp),%ecx - movl 324(%esp),%edx - addl (%esp),%eax - adcl 4(%esp),%ebx - movl 248(%esp),%esi - movl 252(%esp),%edi - addl %ecx,%eax - adcl %edx,%ebx - addl %esi,%eax - adcl %edi,%ebx - movl %eax,192(%esp) - movl %ebx,196(%esp) - movl 40(%esp),%ecx - movl 44(%esp),%edx - movl %ecx,%esi - shrl $9,%ecx - movl %edx,%edi - shrl $9,%edx - movl %ecx,%ebx - shll $14,%esi - movl %edx,%eax - shll $14,%edi - xorl %esi,%ebx - shrl $5,%ecx - xorl %edi,%eax - shrl $5,%edx - xorl %ecx,%eax - shll $4,%esi - xorl %edx,%ebx - shll $4,%edi - xorl %esi,%ebx - shrl $4,%ecx - xorl %edi,%eax - shrl $4,%edx - xorl %ecx,%eax - shll $5,%esi - xorl %edx,%ebx - shll $5,%edi - xorl %esi,%eax - xorl %edi,%ebx - movl 48(%esp),%ecx - movl 52(%esp),%edx - movl 56(%esp),%esi - movl 60(%esp),%edi - addl 64(%esp),%eax - adcl 68(%esp),%ebx - xorl %esi,%ecx - xorl %edi,%edx - andl 40(%esp),%ecx - andl 44(%esp),%edx - addl 192(%esp),%eax - adcl 196(%esp),%ebx - xorl %esi,%ecx - xorl %edi,%edx - movl (%ebp),%esi - movl 4(%ebp),%edi - addl %ecx,%eax - adcl %edx,%ebx - movl 32(%esp),%ecx - movl 36(%esp),%edx - addl %esi,%eax - adcl %edi,%ebx - movl %eax,(%esp) - movl %ebx,4(%esp) - addl %ecx,%eax - adcl %edx,%ebx - movl 8(%esp),%ecx - movl 12(%esp),%edx - movl %eax,32(%esp) - movl %ebx,36(%esp) - movl %ecx,%esi - shrl $2,%ecx - movl %edx,%edi - shrl $2,%edx - movl %ecx,%ebx - shll $4,%esi - movl %edx,%eax - shll $4,%edi - xorl %esi,%ebx - shrl $5,%ecx - xorl %edi,%eax - shrl $5,%edx - xorl %ecx,%ebx - shll $21,%esi - xorl %edx,%eax - shll $21,%edi - xorl %esi,%eax - shrl $21,%ecx - xorl %edi,%ebx - shrl $21,%edx - xorl %ecx,%eax - shll $5,%esi - xorl %edx,%ebx - shll $5,%edi - xorl %esi,%eax - xorl %edi,%ebx - movl 8(%esp),%ecx - movl 12(%esp),%edx - movl 16(%esp),%esi - movl 20(%esp),%edi - addl (%esp),%eax - adcl 4(%esp),%ebx - orl %esi,%ecx - orl %edi,%edx - andl 24(%esp),%ecx - andl 28(%esp),%edx - andl 8(%esp),%esi - andl 12(%esp),%edi - orl %esi,%ecx - orl %edi,%edx - addl %ecx,%eax - adcl %edx,%ebx - movl %eax,(%esp) - movl %ebx,4(%esp) - movb (%ebp),%dl - subl $8,%esp - leal 8(%ebp),%ebp - cmpb $23,%dl - jne L01016_79_x86 - movl 840(%esp),%esi - movl 844(%esp),%edi - movl (%esi),%eax - movl 4(%esi),%ebx - movl 8(%esi),%ecx - movl 12(%esi),%edx - addl 8(%esp),%eax - adcl 12(%esp),%ebx - movl %eax,(%esi) - movl %ebx,4(%esi) - addl 16(%esp),%ecx - adcl 20(%esp),%edx - movl %ecx,8(%esi) - movl %edx,12(%esi) - movl 16(%esi),%eax - movl 20(%esi),%ebx - movl 24(%esi),%ecx - movl 28(%esi),%edx - addl 24(%esp),%eax - adcl 28(%esp),%ebx - movl %eax,16(%esi) - movl %ebx,20(%esi) - addl 32(%esp),%ecx - adcl 36(%esp),%edx - movl %ecx,24(%esi) - movl %edx,28(%esi) - movl 32(%esi),%eax - movl 36(%esi),%ebx - movl 40(%esi),%ecx - movl 44(%esi),%edx - addl 40(%esp),%eax - adcl 44(%esp),%ebx - movl %eax,32(%esi) - movl %ebx,36(%esi) - addl 48(%esp),%ecx - adcl 52(%esp),%edx - movl %ecx,40(%esi) - movl %edx,44(%esi) - movl 48(%esi),%eax - movl 52(%esi),%ebx - movl 56(%esi),%ecx - movl 60(%esi),%edx - addl 56(%esp),%eax - adcl 60(%esp),%ebx - movl %eax,48(%esi) - movl %ebx,52(%esi) - addl 64(%esp),%ecx - adcl 68(%esp),%edx - movl %ecx,56(%esi) - movl %edx,60(%esi) - addl $840,%esp - subl $640,%ebp - cmpl 8(%esp),%edi - jb L002loop_x86 - movl 12(%esp),%esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret -.align 6,0x90 -L001K512: -.long 3609767458,1116352408 -.long 602891725,1899447441 -.long 3964484399,3049323471 -.long 2173295548,3921009573 -.long 4081628472,961987163 -.long 3053834265,1508970993 -.long 2937671579,2453635748 -.long 3664609560,2870763221 -.long 2734883394,3624381080 -.long 1164996542,310598401 -.long 1323610764,607225278 -.long 3590304994,1426881987 -.long 4068182383,1925078388 -.long 991336113,2162078206 -.long 633803317,2614888103 -.long 3479774868,3248222580 -.long 2666613458,3835390401 -.long 944711139,4022224774 -.long 2341262773,264347078 -.long 2007800933,604807628 -.long 1495990901,770255983 -.long 1856431235,1249150122 -.long 3175218132,1555081692 -.long 2198950837,1996064986 -.long 3999719339,2554220882 -.long 766784016,2821834349 -.long 2566594879,2952996808 -.long 3203337956,3210313671 -.long 1034457026,3336571891 -.long 2466948901,3584528711 -.long 3758326383,113926993 -.long 168717936,338241895 -.long 1188179964,666307205 -.long 1546045734,773529912 -.long 1522805485,1294757372 -.long 2643833823,1396182291 -.long 2343527390,1695183700 -.long 1014477480,1986661051 -.long 1206759142,2177026350 -.long 344077627,2456956037 -.long 1290863460,2730485921 -.long 3158454273,2820302411 -.long 3505952657,3259730800 -.long 106217008,3345764771 -.long 3606008344,3516065817 -.long 1432725776,3600352804 -.long 1467031594,4094571909 -.long 851169720,275423344 -.long 3100823752,430227734 -.long 1363258195,506948616 -.long 3750685593,659060556 -.long 3785050280,883997877 -.long 3318307427,958139571 -.long 3812723403,1322822218 -.long 2003034995,1537002063 -.long 3602036899,1747873779 -.long 1575990012,1955562222 -.long 1125592928,2024104815 -.long 2716904306,2227730452 -.long 442776044,2361852424 -.long 593698344,2428436474 -.long 3733110249,2756734187 -.long 2999351573,3204031479 -.long 3815920427,3329325298 -.long 3928383900,3391569614 -.long 566280711,3515267271 -.long 3454069534,3940187606 -.long 4000239992,4118630271 -.long 1914138554,116418474 -.long 2731055270,174292421 -.long 3203993006,289380356 -.long 320620315,460393269 -.long 587496836,685471733 -.long 1086792851,852142971 -.long 365543100,1017036298 -.long 2618297676,1126000580 -.long 3409855158,1288033470 -.long 4234509866,1501505948 -.long 987167468,1607167915 -.long 1246189591,1816402316 -.long 67438087,66051 -.long 202182159,134810123 -.byte 83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97 -.byte 110,115,102,111,114,109,32,102,111,114,32,120,56,54,44,32 -.byte 67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97 -.byte 112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103 -.byte 62,0 -.section __IMPORT,__pointers,non_lazy_symbol_pointers -L_OPENSSL_ia32cap_P$non_lazy_ptr: -.indirect_symbol _OPENSSL_ia32cap_P -.long 0 -#endif diff --git a/third_party/boringssl/mac-x86_64/crypto/aes/aes-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/aes/aes-x86_64.S deleted file mode 100644 index 02f378bd671f6..0000000000000 --- a/third_party/boringssl/mac-x86_64/crypto/aes/aes-x86_64.S +++ /dev/null @@ -1,2535 +0,0 @@ -#if defined(__x86_64__) -.text - -.p2align 4 -_x86_64_AES_encrypt: - xorl 0(%r15),%eax - xorl 4(%r15),%ebx - xorl 8(%r15),%ecx - xorl 12(%r15),%edx - - movl 240(%r15),%r13d - subl $1,%r13d - jmp L$enc_loop -.p2align 4 -L$enc_loop: - - movzbl %al,%esi - movzbl %bl,%edi - movzbl %cl,%ebp - movl 0(%r14,%rsi,8),%r10d - movl 0(%r14,%rdi,8),%r11d - movl 0(%r14,%rbp,8),%r12d - - movzbl %bh,%esi - movzbl %ch,%edi - movzbl %dl,%ebp - xorl 3(%r14,%rsi,8),%r10d - xorl 3(%r14,%rdi,8),%r11d - movl 0(%r14,%rbp,8),%r8d - - movzbl %dh,%esi - shrl $16,%ecx - movzbl %ah,%ebp - xorl 3(%r14,%rsi,8),%r12d - shrl $16,%edx - xorl 3(%r14,%rbp,8),%r8d - - shrl $16,%ebx - leaq 16(%r15),%r15 - shrl $16,%eax - - movzbl %cl,%esi - movzbl %dl,%edi - movzbl %al,%ebp - xorl 2(%r14,%rsi,8),%r10d - xorl 2(%r14,%rdi,8),%r11d - xorl 2(%r14,%rbp,8),%r12d - - movzbl %dh,%esi - movzbl %ah,%edi - movzbl %bl,%ebp - xorl 1(%r14,%rsi,8),%r10d - xorl 1(%r14,%rdi,8),%r11d - xorl 2(%r14,%rbp,8),%r8d - - movl 12(%r15),%edx - movzbl %bh,%edi - movzbl %ch,%ebp - movl 0(%r15),%eax - xorl 1(%r14,%rdi,8),%r12d - xorl 1(%r14,%rbp,8),%r8d - - movl 4(%r15),%ebx - movl 8(%r15),%ecx - xorl %r10d,%eax - xorl %r11d,%ebx - xorl %r12d,%ecx - xorl %r8d,%edx - subl $1,%r13d - jnz L$enc_loop - movzbl %al,%esi - movzbl %bl,%edi - movzbl %cl,%ebp - movzbl 2(%r14,%rsi,8),%r10d - movzbl 2(%r14,%rdi,8),%r11d - movzbl 2(%r14,%rbp,8),%r12d - - movzbl %dl,%esi - movzbl %bh,%edi - movzbl %ch,%ebp - movzbl 2(%r14,%rsi,8),%r8d - movl 0(%r14,%rdi,8),%edi - movl 0(%r14,%rbp,8),%ebp - - andl $65280,%edi - andl $65280,%ebp - - xorl %edi,%r10d - xorl %ebp,%r11d - shrl $16,%ecx - - movzbl %dh,%esi - movzbl %ah,%edi - shrl $16,%edx - movl 0(%r14,%rsi,8),%esi - movl 0(%r14,%rdi,8),%edi - - andl $65280,%esi - andl $65280,%edi - shrl $16,%ebx - xorl %esi,%r12d - xorl %edi,%r8d - shrl $16,%eax - - movzbl %cl,%esi - movzbl %dl,%edi - movzbl %al,%ebp - movl 0(%r14,%rsi,8),%esi - movl 0(%r14,%rdi,8),%edi - movl 0(%r14,%rbp,8),%ebp - - andl $16711680,%esi - andl $16711680,%edi - andl $16711680,%ebp - - xorl %esi,%r10d - xorl %edi,%r11d - xorl %ebp,%r12d - - movzbl %bl,%esi - movzbl %dh,%edi - movzbl %ah,%ebp - movl 0(%r14,%rsi,8),%esi - movl 2(%r14,%rdi,8),%edi - movl 2(%r14,%rbp,8),%ebp - - andl $16711680,%esi - andl $4278190080,%edi - andl $4278190080,%ebp - - xorl %esi,%r8d - xorl %edi,%r10d - xorl %ebp,%r11d - - movzbl %bh,%esi - movzbl %ch,%edi - movl 16+12(%r15),%edx - movl 2(%r14,%rsi,8),%esi - movl 2(%r14,%rdi,8),%edi - movl 16+0(%r15),%eax - - andl $4278190080,%esi - andl $4278190080,%edi - - xorl %esi,%r12d - xorl %edi,%r8d - - movl 16+4(%r15),%ebx - movl 16+8(%r15),%ecx - xorl %r10d,%eax - xorl %r11d,%ebx - xorl %r12d,%ecx - xorl %r8d,%edx -.byte 0xf3,0xc3 - - -.p2align 4 -_x86_64_AES_encrypt_compact: - leaq 128(%r14),%r8 - movl 0-128(%r8),%edi - movl 32-128(%r8),%ebp - movl 64-128(%r8),%r10d - movl 96-128(%r8),%r11d - movl 128-128(%r8),%edi - movl 160-128(%r8),%ebp - movl 192-128(%r8),%r10d - movl 224-128(%r8),%r11d - jmp L$enc_loop_compact -.p2align 4 -L$enc_loop_compact: - xorl 0(%r15),%eax - xorl 4(%r15),%ebx - xorl 8(%r15),%ecx - xorl 12(%r15),%edx - leaq 16(%r15),%r15 - movzbl %al,%r10d - movzbl %bl,%r11d - movzbl %cl,%r12d - movzbl %dl,%r8d - movzbl %bh,%esi - movzbl %ch,%edi - shrl $16,%ecx - movzbl %dh,%ebp - movzbl (%r14,%r10,1),%r10d - movzbl (%r14,%r11,1),%r11d - movzbl (%r14,%r12,1),%r12d - movzbl (%r14,%r8,1),%r8d - - movzbl (%r14,%rsi,1),%r9d - movzbl %ah,%esi - movzbl (%r14,%rdi,1),%r13d - movzbl %cl,%edi - movzbl (%r14,%rbp,1),%ebp - movzbl (%r14,%rsi,1),%esi - - shll $8,%r9d - shrl $16,%edx - shll $8,%r13d - xorl %r9d,%r10d - shrl $16,%eax - movzbl %dl,%r9d - shrl $16,%ebx - xorl %r13d,%r11d - shll $8,%ebp - movzbl %al,%r13d - movzbl (%r14,%rdi,1),%edi - xorl %ebp,%r12d - - shll $8,%esi - movzbl %bl,%ebp - shll $16,%edi - xorl %esi,%r8d - movzbl (%r14,%r9,1),%r9d - movzbl %dh,%esi - movzbl (%r14,%r13,1),%r13d - xorl %edi,%r10d - - shrl $8,%ecx - movzbl %ah,%edi - shll $16,%r9d - shrl $8,%ebx - shll $16,%r13d - xorl %r9d,%r11d - movzbl (%r14,%rbp,1),%ebp - movzbl (%r14,%rsi,1),%esi - movzbl (%r14,%rdi,1),%edi - movzbl (%r14,%rcx,1),%edx - movzbl (%r14,%rbx,1),%ecx - - shll $16,%ebp - xorl %r13d,%r12d - shll $24,%esi - xorl %ebp,%r8d - shll $24,%edi - xorl %esi,%r10d - shll $24,%edx - xorl %edi,%r11d - shll $24,%ecx - movl %r10d,%eax - movl %r11d,%ebx - xorl %r12d,%ecx - xorl %r8d,%edx - cmpq 16(%rsp),%r15 - je L$enc_compact_done - movl $2155905152,%r10d - movl $2155905152,%r11d - andl %eax,%r10d - andl %ebx,%r11d - movl %r10d,%esi - movl %r11d,%edi - shrl $7,%r10d - leal (%rax,%rax,1),%r8d - shrl $7,%r11d - leal (%rbx,%rbx,1),%r9d - subl %r10d,%esi - subl %r11d,%edi - andl $4278124286,%r8d - andl $4278124286,%r9d - andl $454761243,%esi - andl $454761243,%edi - movl %eax,%r10d - movl %ebx,%r11d - xorl %esi,%r8d - xorl %edi,%r9d - - xorl %r8d,%eax - xorl %r9d,%ebx - movl $2155905152,%r12d - roll $24,%eax - movl $2155905152,%ebp - roll $24,%ebx - andl %ecx,%r12d - andl %edx,%ebp - xorl %r8d,%eax - xorl %r9d,%ebx - movl %r12d,%esi - rorl $16,%r10d - movl %ebp,%edi - rorl $16,%r11d - leal (%rcx,%rcx,1),%r8d - shrl $7,%r12d - xorl %r10d,%eax - shrl $7,%ebp - xorl %r11d,%ebx - rorl $8,%r10d - leal (%rdx,%rdx,1),%r9d - rorl $8,%r11d - subl %r12d,%esi - subl %ebp,%edi - xorl %r10d,%eax - xorl %r11d,%ebx - - andl $4278124286,%r8d - andl $4278124286,%r9d - andl $454761243,%esi - andl $454761243,%edi - movl %ecx,%r12d - movl %edx,%ebp - xorl %esi,%r8d - xorl %edi,%r9d - - rorl $16,%r12d - xorl %r8d,%ecx - rorl $16,%ebp - xorl %r9d,%edx - roll $24,%ecx - movl 0(%r14),%esi - roll $24,%edx - xorl %r8d,%ecx - movl 64(%r14),%edi - xorl %r9d,%edx - movl 128(%r14),%r8d - xorl %r12d,%ecx - rorl $8,%r12d - xorl %ebp,%edx - rorl $8,%ebp - xorl %r12d,%ecx - movl 192(%r14),%r9d - xorl %ebp,%edx - jmp L$enc_loop_compact -.p2align 4 -L$enc_compact_done: - xorl 0(%r15),%eax - xorl 4(%r15),%ebx - xorl 8(%r15),%ecx - xorl 12(%r15),%edx -.byte 0xf3,0xc3 - -.p2align 4 -.globl _asm_AES_encrypt -.private_extern _asm_AES_encrypt - -.private_extern _asm_AES_encrypt -_asm_AES_encrypt: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - - movq %rsp,%r10 - leaq -63(%rdx),%rcx - andq $-64,%rsp - subq %rsp,%rcx - negq %rcx - andq $960,%rcx - subq %rcx,%rsp - subq $32,%rsp - - movq %rsi,16(%rsp) - movq %r10,24(%rsp) -L$enc_prologue: - - movq %rdx,%r15 - movl 240(%r15),%r13d - - movl 0(%rdi),%eax - movl 4(%rdi),%ebx - movl 8(%rdi),%ecx - movl 12(%rdi),%edx - - shll $4,%r13d - leaq (%r15,%r13,1),%rbp - movq %r15,(%rsp) - movq %rbp,8(%rsp) - - - leaq L$AES_Te+2048(%rip),%r14 - leaq 768(%rsp),%rbp - subq %r14,%rbp - andq $768,%rbp - leaq (%r14,%rbp,1),%r14 - - call _x86_64_AES_encrypt_compact - - movq 16(%rsp),%r9 - movq 24(%rsp),%rsi - movl %eax,0(%r9) - movl %ebx,4(%r9) - movl %ecx,8(%r9) - movl %edx,12(%r9) - - movq (%rsi),%r15 - movq 8(%rsi),%r14 - movq 16(%rsi),%r13 - movq 24(%rsi),%r12 - movq 32(%rsi),%rbp - movq 40(%rsi),%rbx - leaq 48(%rsi),%rsp -L$enc_epilogue: - .byte 0xf3,0xc3 - - -.p2align 4 -_x86_64_AES_decrypt: - xorl 0(%r15),%eax - xorl 4(%r15),%ebx - xorl 8(%r15),%ecx - xorl 12(%r15),%edx - - movl 240(%r15),%r13d - subl $1,%r13d - jmp L$dec_loop -.p2align 4 -L$dec_loop: - - movzbl %al,%esi - movzbl %bl,%edi - movzbl %cl,%ebp - movl 0(%r14,%rsi,8),%r10d - movl 0(%r14,%rdi,8),%r11d - movl 0(%r14,%rbp,8),%r12d - - movzbl %dh,%esi - movzbl %ah,%edi - movzbl %dl,%ebp - xorl 3(%r14,%rsi,8),%r10d - xorl 3(%r14,%rdi,8),%r11d - movl 0(%r14,%rbp,8),%r8d - - movzbl %bh,%esi - shrl $16,%eax - movzbl %ch,%ebp - xorl 3(%r14,%rsi,8),%r12d - shrl $16,%edx - xorl 3(%r14,%rbp,8),%r8d - - shrl $16,%ebx - leaq 16(%r15),%r15 - shrl $16,%ecx - - movzbl %cl,%esi - movzbl %dl,%edi - movzbl %al,%ebp - xorl 2(%r14,%rsi,8),%r10d - xorl 2(%r14,%rdi,8),%r11d - xorl 2(%r14,%rbp,8),%r12d - - movzbl %bh,%esi - movzbl %ch,%edi - movzbl %bl,%ebp - xorl 1(%r14,%rsi,8),%r10d - xorl 1(%r14,%rdi,8),%r11d - xorl 2(%r14,%rbp,8),%r8d - - movzbl %dh,%esi - movl 12(%r15),%edx - movzbl %ah,%ebp - xorl 1(%r14,%rsi,8),%r12d - movl 0(%r15),%eax - xorl 1(%r14,%rbp,8),%r8d - - xorl %r10d,%eax - movl 4(%r15),%ebx - movl 8(%r15),%ecx - xorl %r12d,%ecx - xorl %r11d,%ebx - xorl %r8d,%edx - subl $1,%r13d - jnz L$dec_loop - leaq 2048(%r14),%r14 - movzbl %al,%esi - movzbl %bl,%edi - movzbl %cl,%ebp - movzbl (%r14,%rsi,1),%r10d - movzbl (%r14,%rdi,1),%r11d - movzbl (%r14,%rbp,1),%r12d - - movzbl %dl,%esi - movzbl %dh,%edi - movzbl %ah,%ebp - movzbl (%r14,%rsi,1),%r8d - movzbl (%r14,%rdi,1),%edi - movzbl (%r14,%rbp,1),%ebp - - shll $8,%edi - shll $8,%ebp - - xorl %edi,%r10d - xorl %ebp,%r11d - shrl $16,%edx - - movzbl %bh,%esi - movzbl %ch,%edi - shrl $16,%eax - movzbl (%r14,%rsi,1),%esi - movzbl (%r14,%rdi,1),%edi - - shll $8,%esi - shll $8,%edi - shrl $16,%ebx - xorl %esi,%r12d - xorl %edi,%r8d - shrl $16,%ecx - - movzbl %cl,%esi - movzbl %dl,%edi - movzbl %al,%ebp - movzbl (%r14,%rsi,1),%esi - movzbl (%r14,%rdi,1),%edi - movzbl (%r14,%rbp,1),%ebp - - shll $16,%esi - shll $16,%edi - shll $16,%ebp - - xorl %esi,%r10d - xorl %edi,%r11d - xorl %ebp,%r12d - - movzbl %bl,%esi - movzbl %bh,%edi - movzbl %ch,%ebp - movzbl (%r14,%rsi,1),%esi - movzbl (%r14,%rdi,1),%edi - movzbl (%r14,%rbp,1),%ebp - - shll $16,%esi - shll $24,%edi - shll $24,%ebp - - xorl %esi,%r8d - xorl %edi,%r10d - xorl %ebp,%r11d - - movzbl %dh,%esi - movzbl %ah,%edi - movl 16+12(%r15),%edx - movzbl (%r14,%rsi,1),%esi - movzbl (%r14,%rdi,1),%edi - movl 16+0(%r15),%eax - - shll $24,%esi - shll $24,%edi - - xorl %esi,%r12d - xorl %edi,%r8d - - movl 16+4(%r15),%ebx - movl 16+8(%r15),%ecx - leaq -2048(%r14),%r14 - xorl %r10d,%eax - xorl %r11d,%ebx - xorl %r12d,%ecx - xorl %r8d,%edx -.byte 0xf3,0xc3 - - -.p2align 4 -_x86_64_AES_decrypt_compact: - leaq 128(%r14),%r8 - movl 0-128(%r8),%edi - movl 32-128(%r8),%ebp - movl 64-128(%r8),%r10d - movl 96-128(%r8),%r11d - movl 128-128(%r8),%edi - movl 160-128(%r8),%ebp - movl 192-128(%r8),%r10d - movl 224-128(%r8),%r11d - jmp L$dec_loop_compact - -.p2align 4 -L$dec_loop_compact: - xorl 0(%r15),%eax - xorl 4(%r15),%ebx - xorl 8(%r15),%ecx - xorl 12(%r15),%edx - leaq 16(%r15),%r15 - movzbl %al,%r10d - movzbl %bl,%r11d - movzbl %cl,%r12d - movzbl %dl,%r8d - movzbl %dh,%esi - movzbl %ah,%edi - shrl $16,%edx - movzbl %bh,%ebp - movzbl (%r14,%r10,1),%r10d - movzbl (%r14,%r11,1),%r11d - movzbl (%r14,%r12,1),%r12d - movzbl (%r14,%r8,1),%r8d - - movzbl (%r14,%rsi,1),%r9d - movzbl %ch,%esi - movzbl (%r14,%rdi,1),%r13d - movzbl (%r14,%rbp,1),%ebp - movzbl (%r14,%rsi,1),%esi - - shrl $16,%ecx - shll $8,%r13d - shll $8,%r9d - movzbl %cl,%edi - shrl $16,%eax - xorl %r9d,%r10d - shrl $16,%ebx - movzbl %dl,%r9d - - shll $8,%ebp - xorl %r13d,%r11d - shll $8,%esi - movzbl %al,%r13d - movzbl (%r14,%rdi,1),%edi - xorl %ebp,%r12d - movzbl %bl,%ebp - - shll $16,%edi - xorl %esi,%r8d - movzbl (%r14,%r9,1),%r9d - movzbl %bh,%esi - movzbl (%r14,%rbp,1),%ebp - xorl %edi,%r10d - movzbl (%r14,%r13,1),%r13d - movzbl %ch,%edi - - shll $16,%ebp - shll $16,%r9d - shll $16,%r13d - xorl %ebp,%r8d - movzbl %dh,%ebp - xorl %r9d,%r11d - shrl $8,%eax - xorl %r13d,%r12d - - movzbl (%r14,%rsi,1),%esi - movzbl (%r14,%rdi,1),%ebx - movzbl (%r14,%rbp,1),%ecx - movzbl (%r14,%rax,1),%edx - - movl %r10d,%eax - shll $24,%esi - shll $24,%ebx - shll $24,%ecx - xorl %esi,%eax - shll $24,%edx - xorl %r11d,%ebx - xorl %r12d,%ecx - xorl %r8d,%edx - cmpq 16(%rsp),%r15 - je L$dec_compact_done - - movq 256+0(%r14),%rsi - shlq $32,%rbx - shlq $32,%rdx - movq 256+8(%r14),%rdi - orq %rbx,%rax - orq %rdx,%rcx - movq 256+16(%r14),%rbp - movq %rsi,%r9 - movq %rsi,%r12 - andq %rax,%r9 - andq %rcx,%r12 - movq %r9,%rbx - movq %r12,%rdx - shrq $7,%r9 - leaq (%rax,%rax,1),%r8 - shrq $7,%r12 - leaq (%rcx,%rcx,1),%r11 - subq %r9,%rbx - subq %r12,%rdx - andq %rdi,%r8 - andq %rdi,%r11 - andq %rbp,%rbx - andq %rbp,%rdx - xorq %rbx,%r8 - xorq %rdx,%r11 - movq %rsi,%r10 - movq %rsi,%r13 - - andq %r8,%r10 - andq %r11,%r13 - movq %r10,%rbx - movq %r13,%rdx - shrq $7,%r10 - leaq (%r8,%r8,1),%r9 - shrq $7,%r13 - leaq (%r11,%r11,1),%r12 - subq %r10,%rbx - subq %r13,%rdx - andq %rdi,%r9 - andq %rdi,%r12 - andq %rbp,%rbx - andq %rbp,%rdx - xorq %rbx,%r9 - xorq %rdx,%r12 - movq %rsi,%r10 - movq %rsi,%r13 - - andq %r9,%r10 - andq %r12,%r13 - movq %r10,%rbx - movq %r13,%rdx - shrq $7,%r10 - xorq %rax,%r8 - shrq $7,%r13 - xorq %rcx,%r11 - subq %r10,%rbx - subq %r13,%rdx - leaq (%r9,%r9,1),%r10 - leaq (%r12,%r12,1),%r13 - xorq %rax,%r9 - xorq %rcx,%r12 - andq %rdi,%r10 - andq %rdi,%r13 - andq %rbp,%rbx - andq %rbp,%rdx - xorq %rbx,%r10 - xorq %rdx,%r13 - - xorq %r10,%rax - xorq %r13,%rcx - xorq %r10,%r8 - xorq %r13,%r11 - movq %rax,%rbx - movq %rcx,%rdx - xorq %r10,%r9 - shrq $32,%rbx - xorq %r13,%r12 - shrq $32,%rdx - xorq %r8,%r10 - roll $8,%eax - xorq %r11,%r13 - roll $8,%ecx - xorq %r9,%r10 - roll $8,%ebx - xorq %r12,%r13 - - roll $8,%edx - xorl %r10d,%eax - shrq $32,%r10 - xorl %r13d,%ecx - shrq $32,%r13 - xorl %r10d,%ebx - xorl %r13d,%edx - - movq %r8,%r10 - roll $24,%r8d - movq %r11,%r13 - roll $24,%r11d - shrq $32,%r10 - xorl %r8d,%eax - shrq $32,%r13 - xorl %r11d,%ecx - roll $24,%r10d - movq %r9,%r8 - roll $24,%r13d - movq %r12,%r11 - shrq $32,%r8 - xorl %r10d,%ebx - shrq $32,%r11 - xorl %r13d,%edx - - movq 0(%r14),%rsi - roll $16,%r9d - movq 64(%r14),%rdi - roll $16,%r12d - movq 128(%r14),%rbp - roll $16,%r8d - movq 192(%r14),%r10 - xorl %r9d,%eax - roll $16,%r11d - xorl %r12d,%ecx - movq 256(%r14),%r13 - xorl %r8d,%ebx - xorl %r11d,%edx - jmp L$dec_loop_compact -.p2align 4 -L$dec_compact_done: - xorl 0(%r15),%eax - xorl 4(%r15),%ebx - xorl 8(%r15),%ecx - xorl 12(%r15),%edx -.byte 0xf3,0xc3 - -.p2align 4 -.globl _asm_AES_decrypt -.private_extern _asm_AES_decrypt - -.private_extern _asm_AES_decrypt -_asm_AES_decrypt: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - - movq %rsp,%r10 - leaq -63(%rdx),%rcx - andq $-64,%rsp - subq %rsp,%rcx - negq %rcx - andq $960,%rcx - subq %rcx,%rsp - subq $32,%rsp - - movq %rsi,16(%rsp) - movq %r10,24(%rsp) -L$dec_prologue: - - movq %rdx,%r15 - movl 240(%r15),%r13d - - movl 0(%rdi),%eax - movl 4(%rdi),%ebx - movl 8(%rdi),%ecx - movl 12(%rdi),%edx - - shll $4,%r13d - leaq (%r15,%r13,1),%rbp - movq %r15,(%rsp) - movq %rbp,8(%rsp) - - - leaq L$AES_Td+2048(%rip),%r14 - leaq 768(%rsp),%rbp - subq %r14,%rbp - andq $768,%rbp - leaq (%r14,%rbp,1),%r14 - shrq $3,%rbp - addq %rbp,%r14 - - call _x86_64_AES_decrypt_compact - - movq 16(%rsp),%r9 - movq 24(%rsp),%rsi - movl %eax,0(%r9) - movl %ebx,4(%r9) - movl %ecx,8(%r9) - movl %edx,12(%r9) - - movq (%rsi),%r15 - movq 8(%rsi),%r14 - movq 16(%rsi),%r13 - movq 24(%rsi),%r12 - movq 32(%rsi),%rbp - movq 40(%rsi),%rbx - leaq 48(%rsi),%rsp -L$dec_epilogue: - .byte 0xf3,0xc3 - -.p2align 4 -.globl _asm_AES_set_encrypt_key -.private_extern _asm_AES_set_encrypt_key - -_asm_AES_set_encrypt_key: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - subq $8,%rsp -L$enc_key_prologue: - - call _x86_64_AES_set_encrypt_key - - movq 40(%rsp),%rbp - movq 48(%rsp),%rbx - addq $56,%rsp -L$enc_key_epilogue: - .byte 0xf3,0xc3 - - - -.p2align 4 -_x86_64_AES_set_encrypt_key: - movl %esi,%ecx - movq %rdi,%rsi - movq %rdx,%rdi - - testq $-1,%rsi - jz L$badpointer - testq $-1,%rdi - jz L$badpointer - - leaq L$AES_Te(%rip),%rbp - leaq 2048+128(%rbp),%rbp - - - movl 0-128(%rbp),%eax - movl 32-128(%rbp),%ebx - movl 64-128(%rbp),%r8d - movl 96-128(%rbp),%edx - movl 128-128(%rbp),%eax - movl 160-128(%rbp),%ebx - movl 192-128(%rbp),%r8d - movl 224-128(%rbp),%edx - - cmpl $128,%ecx - je L$10rounds - cmpl $192,%ecx - je L$12rounds - cmpl $256,%ecx - je L$14rounds - movq $-2,%rax - jmp L$exit - -L$10rounds: - movq 0(%rsi),%rax - movq 8(%rsi),%rdx - movq %rax,0(%rdi) - movq %rdx,8(%rdi) - - shrq $32,%rdx - xorl %ecx,%ecx - jmp L$10shortcut -.p2align 2 -L$10loop: - movl 0(%rdi),%eax - movl 12(%rdi),%edx -L$10shortcut: - movzbl %dl,%esi - movzbl -128(%rbp,%rsi,1),%ebx - movzbl %dh,%esi - shll $24,%ebx - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - shrl $16,%edx - movzbl %dl,%esi - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - movzbl %dh,%esi - shll $8,%ebx - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - shll $16,%ebx - xorl %ebx,%eax - - xorl 1024-128(%rbp,%rcx,4),%eax - movl %eax,16(%rdi) - xorl 4(%rdi),%eax - movl %eax,20(%rdi) - xorl 8(%rdi),%eax - movl %eax,24(%rdi) - xorl 12(%rdi),%eax - movl %eax,28(%rdi) - addl $1,%ecx - leaq 16(%rdi),%rdi - cmpl $10,%ecx - jl L$10loop - - movl $10,80(%rdi) - xorq %rax,%rax - jmp L$exit - -L$12rounds: - movq 0(%rsi),%rax - movq 8(%rsi),%rbx - movq 16(%rsi),%rdx - movq %rax,0(%rdi) - movq %rbx,8(%rdi) - movq %rdx,16(%rdi) - - shrq $32,%rdx - xorl %ecx,%ecx - jmp L$12shortcut -.p2align 2 -L$12loop: - movl 0(%rdi),%eax - movl 20(%rdi),%edx -L$12shortcut: - movzbl %dl,%esi - movzbl -128(%rbp,%rsi,1),%ebx - movzbl %dh,%esi - shll $24,%ebx - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - shrl $16,%edx - movzbl %dl,%esi - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - movzbl %dh,%esi - shll $8,%ebx - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - shll $16,%ebx - xorl %ebx,%eax - - xorl 1024-128(%rbp,%rcx,4),%eax - movl %eax,24(%rdi) - xorl 4(%rdi),%eax - movl %eax,28(%rdi) - xorl 8(%rdi),%eax - movl %eax,32(%rdi) - xorl 12(%rdi),%eax - movl %eax,36(%rdi) - - cmpl $7,%ecx - je L$12break - addl $1,%ecx - - xorl 16(%rdi),%eax - movl %eax,40(%rdi) - xorl 20(%rdi),%eax - movl %eax,44(%rdi) - - leaq 24(%rdi),%rdi - jmp L$12loop -L$12break: - movl $12,72(%rdi) - xorq %rax,%rax - jmp L$exit - -L$14rounds: - movq 0(%rsi),%rax - movq 8(%rsi),%rbx - movq 16(%rsi),%rcx - movq 24(%rsi),%rdx - movq %rax,0(%rdi) - movq %rbx,8(%rdi) - movq %rcx,16(%rdi) - movq %rdx,24(%rdi) - - shrq $32,%rdx - xorl %ecx,%ecx - jmp L$14shortcut -.p2align 2 -L$14loop: - movl 0(%rdi),%eax - movl 28(%rdi),%edx -L$14shortcut: - movzbl %dl,%esi - movzbl -128(%rbp,%rsi,1),%ebx - movzbl %dh,%esi - shll $24,%ebx - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - shrl $16,%edx - movzbl %dl,%esi - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - movzbl %dh,%esi - shll $8,%ebx - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - shll $16,%ebx - xorl %ebx,%eax - - xorl 1024-128(%rbp,%rcx,4),%eax - movl %eax,32(%rdi) - xorl 4(%rdi),%eax - movl %eax,36(%rdi) - xorl 8(%rdi),%eax - movl %eax,40(%rdi) - xorl 12(%rdi),%eax - movl %eax,44(%rdi) - - cmpl $6,%ecx - je L$14break - addl $1,%ecx - - movl %eax,%edx - movl 16(%rdi),%eax - movzbl %dl,%esi - movzbl -128(%rbp,%rsi,1),%ebx - movzbl %dh,%esi - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - shrl $16,%edx - shll $8,%ebx - movzbl %dl,%esi - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - movzbl %dh,%esi - shll $16,%ebx - xorl %ebx,%eax - - movzbl -128(%rbp,%rsi,1),%ebx - shll $24,%ebx - xorl %ebx,%eax - - movl %eax,48(%rdi) - xorl 20(%rdi),%eax - movl %eax,52(%rdi) - xorl 24(%rdi),%eax - movl %eax,56(%rdi) - xorl 28(%rdi),%eax - movl %eax,60(%rdi) - - leaq 32(%rdi),%rdi - jmp L$14loop -L$14break: - movl $14,48(%rdi) - xorq %rax,%rax - jmp L$exit - -L$badpointer: - movq $-1,%rax -L$exit: -.byte 0xf3,0xc3 - -.p2align 4 -.globl _asm_AES_set_decrypt_key -.private_extern _asm_AES_set_decrypt_key - -_asm_AES_set_decrypt_key: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - pushq %rdx -L$dec_key_prologue: - - call _x86_64_AES_set_encrypt_key - movq (%rsp),%r8 - cmpl $0,%eax - jne L$abort - - movl 240(%r8),%r14d - xorq %rdi,%rdi - leaq (%rdi,%r14,4),%rcx - movq %r8,%rsi - leaq (%r8,%rcx,4),%rdi -.p2align 2 -L$invert: - movq 0(%rsi),%rax - movq 8(%rsi),%rbx - movq 0(%rdi),%rcx - movq 8(%rdi),%rdx - movq %rax,0(%rdi) - movq %rbx,8(%rdi) - movq %rcx,0(%rsi) - movq %rdx,8(%rsi) - leaq 16(%rsi),%rsi - leaq -16(%rdi),%rdi - cmpq %rsi,%rdi - jne L$invert - - leaq L$AES_Te+2048+1024(%rip),%rax - - movq 40(%rax),%rsi - movq 48(%rax),%rdi - movq 56(%rax),%rbp - - movq %r8,%r15 - subl $1,%r14d -.p2align 2 -L$permute: - leaq 16(%r15),%r15 - movq 0(%r15),%rax - movq 8(%r15),%rcx - movq %rsi,%r9 - movq %rsi,%r12 - andq %rax,%r9 - andq %rcx,%r12 - movq %r9,%rbx - movq %r12,%rdx - shrq $7,%r9 - leaq (%rax,%rax,1),%r8 - shrq $7,%r12 - leaq (%rcx,%rcx,1),%r11 - subq %r9,%rbx - subq %r12,%rdx - andq %rdi,%r8 - andq %rdi,%r11 - andq %rbp,%rbx - andq %rbp,%rdx - xorq %rbx,%r8 - xorq %rdx,%r11 - movq %rsi,%r10 - movq %rsi,%r13 - - andq %r8,%r10 - andq %r11,%r13 - movq %r10,%rbx - movq %r13,%rdx - shrq $7,%r10 - leaq (%r8,%r8,1),%r9 - shrq $7,%r13 - leaq (%r11,%r11,1),%r12 - subq %r10,%rbx - subq %r13,%rdx - andq %rdi,%r9 - andq %rdi,%r12 - andq %rbp,%rbx - andq %rbp,%rdx - xorq %rbx,%r9 - xorq %rdx,%r12 - movq %rsi,%r10 - movq %rsi,%r13 - - andq %r9,%r10 - andq %r12,%r13 - movq %r10,%rbx - movq %r13,%rdx - shrq $7,%r10 - xorq %rax,%r8 - shrq $7,%r13 - xorq %rcx,%r11 - subq %r10,%rbx - subq %r13,%rdx - leaq (%r9,%r9,1),%r10 - leaq (%r12,%r12,1),%r13 - xorq %rax,%r9 - xorq %rcx,%r12 - andq %rdi,%r10 - andq %rdi,%r13 - andq %rbp,%rbx - andq %rbp,%rdx - xorq %rbx,%r10 - xorq %rdx,%r13 - - xorq %r10,%rax - xorq %r13,%rcx - xorq %r10,%r8 - xorq %r13,%r11 - movq %rax,%rbx - movq %rcx,%rdx - xorq %r10,%r9 - shrq $32,%rbx - xorq %r13,%r12 - shrq $32,%rdx - xorq %r8,%r10 - roll $8,%eax - xorq %r11,%r13 - roll $8,%ecx - xorq %r9,%r10 - roll $8,%ebx - xorq %r12,%r13 - - roll $8,%edx - xorl %r10d,%eax - shrq $32,%r10 - xorl %r13d,%ecx - shrq $32,%r13 - xorl %r10d,%ebx - xorl %r13d,%edx - - movq %r8,%r10 - roll $24,%r8d - movq %r11,%r13 - roll $24,%r11d - shrq $32,%r10 - xorl %r8d,%eax - shrq $32,%r13 - xorl %r11d,%ecx - roll $24,%r10d - movq %r9,%r8 - roll $24,%r13d - movq %r12,%r11 - shrq $32,%r8 - xorl %r10d,%ebx - shrq $32,%r11 - xorl %r13d,%edx - - - roll $16,%r9d - - roll $16,%r12d - - roll $16,%r8d - - xorl %r9d,%eax - roll $16,%r11d - xorl %r12d,%ecx - - xorl %r8d,%ebx - xorl %r11d,%edx - movl %eax,0(%r15) - movl %ebx,4(%r15) - movl %ecx,8(%r15) - movl %edx,12(%r15) - subl $1,%r14d - jnz L$permute - - xorq %rax,%rax -L$abort: - movq 8(%rsp),%r15 - movq 16(%rsp),%r14 - movq 24(%rsp),%r13 - movq 32(%rsp),%r12 - movq 40(%rsp),%rbp - movq 48(%rsp),%rbx - addq $56,%rsp -L$dec_key_epilogue: - .byte 0xf3,0xc3 - -.p2align 4 -.globl _asm_AES_cbc_encrypt -.private_extern _asm_AES_cbc_encrypt - - -.private_extern _asm_AES_cbc_encrypt -_asm_AES_cbc_encrypt: - cmpq $0,%rdx - je L$cbc_epilogue - pushfq - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 -L$cbc_prologue: - - cld - movl %r9d,%r9d - - leaq L$AES_Te(%rip),%r14 - cmpq $0,%r9 - jne L$cbc_picked_te - leaq L$AES_Td(%rip),%r14 -L$cbc_picked_te: - - movl _OPENSSL_ia32cap_P(%rip),%r10d - cmpq $512,%rdx - jb L$cbc_slow_prologue - testq $15,%rdx - jnz L$cbc_slow_prologue - btl $28,%r10d - jc L$cbc_slow_prologue - - - leaq -88-248(%rsp),%r15 - andq $-64,%r15 - - - movq %r14,%r10 - leaq 2304(%r14),%r11 - movq %r15,%r12 - andq $4095,%r10 - andq $4095,%r11 - andq $4095,%r12 - - cmpq %r11,%r12 - jb L$cbc_te_break_out - subq %r11,%r12 - subq %r12,%r15 - jmp L$cbc_te_ok -L$cbc_te_break_out: - subq %r10,%r12 - andq $4095,%r12 - addq $320,%r12 - subq %r12,%r15 -.p2align 2 -L$cbc_te_ok: - - xchgq %rsp,%r15 - - movq %r15,16(%rsp) -L$cbc_fast_body: - movq %rdi,24(%rsp) - movq %rsi,32(%rsp) - movq %rdx,40(%rsp) - movq %rcx,48(%rsp) - movq %r8,56(%rsp) - movl $0,80+240(%rsp) - movq %r8,%rbp - movq %r9,%rbx - movq %rsi,%r9 - movq %rdi,%r8 - movq %rcx,%r15 - - movl 240(%r15),%eax - - movq %r15,%r10 - subq %r14,%r10 - andq $4095,%r10 - cmpq $2304,%r10 - jb L$cbc_do_ecopy - cmpq $4096-248,%r10 - jb L$cbc_skip_ecopy -.p2align 2 -L$cbc_do_ecopy: - movq %r15,%rsi - leaq 80(%rsp),%rdi - leaq 80(%rsp),%r15 - movl $30,%ecx -.long 0x90A548F3 - movl %eax,(%rdi) -L$cbc_skip_ecopy: - movq %r15,0(%rsp) - - movl $18,%ecx -.p2align 2 -L$cbc_prefetch_te: - movq 0(%r14),%r10 - movq 32(%r14),%r11 - movq 64(%r14),%r12 - movq 96(%r14),%r13 - leaq 128(%r14),%r14 - subl $1,%ecx - jnz L$cbc_prefetch_te - leaq -2304(%r14),%r14 - - cmpq $0,%rbx - je L$FAST_DECRYPT - - - movl 0(%rbp),%eax - movl 4(%rbp),%ebx - movl 8(%rbp),%ecx - movl 12(%rbp),%edx - -.p2align 2 -L$cbc_fast_enc_loop: - xorl 0(%r8),%eax - xorl 4(%r8),%ebx - xorl 8(%r8),%ecx - xorl 12(%r8),%edx - movq 0(%rsp),%r15 - movq %r8,24(%rsp) - - call _x86_64_AES_encrypt - - movq 24(%rsp),%r8 - movq 40(%rsp),%r10 - movl %eax,0(%r9) - movl %ebx,4(%r9) - movl %ecx,8(%r9) - movl %edx,12(%r9) - - leaq 16(%r8),%r8 - leaq 16(%r9),%r9 - subq $16,%r10 - testq $-16,%r10 - movq %r10,40(%rsp) - jnz L$cbc_fast_enc_loop - movq 56(%rsp),%rbp - movl %eax,0(%rbp) - movl %ebx,4(%rbp) - movl %ecx,8(%rbp) - movl %edx,12(%rbp) - - jmp L$cbc_fast_cleanup - - -.p2align 4 -L$FAST_DECRYPT: - cmpq %r8,%r9 - je L$cbc_fast_dec_in_place - - movq %rbp,64(%rsp) -.p2align 2 -L$cbc_fast_dec_loop: - movl 0(%r8),%eax - movl 4(%r8),%ebx - movl 8(%r8),%ecx - movl 12(%r8),%edx - movq 0(%rsp),%r15 - movq %r8,24(%rsp) - - call _x86_64_AES_decrypt - - movq 64(%rsp),%rbp - movq 24(%rsp),%r8 - movq 40(%rsp),%r10 - xorl 0(%rbp),%eax - xorl 4(%rbp),%ebx - xorl 8(%rbp),%ecx - xorl 12(%rbp),%edx - movq %r8,%rbp - - subq $16,%r10 - movq %r10,40(%rsp) - movq %rbp,64(%rsp) - - movl %eax,0(%r9) - movl %ebx,4(%r9) - movl %ecx,8(%r9) - movl %edx,12(%r9) - - leaq 16(%r8),%r8 - leaq 16(%r9),%r9 - jnz L$cbc_fast_dec_loop - movq 56(%rsp),%r12 - movq 0(%rbp),%r10 - movq 8(%rbp),%r11 - movq %r10,0(%r12) - movq %r11,8(%r12) - jmp L$cbc_fast_cleanup - -.p2align 4 -L$cbc_fast_dec_in_place: - movq 0(%rbp),%r10 - movq 8(%rbp),%r11 - movq %r10,0+64(%rsp) - movq %r11,8+64(%rsp) -.p2align 2 -L$cbc_fast_dec_in_place_loop: - movl 0(%r8),%eax - movl 4(%r8),%ebx - movl 8(%r8),%ecx - movl 12(%r8),%edx - movq 0(%rsp),%r15 - movq %r8,24(%rsp) - - call _x86_64_AES_decrypt - - movq 24(%rsp),%r8 - movq 40(%rsp),%r10 - xorl 0+64(%rsp),%eax - xorl 4+64(%rsp),%ebx - xorl 8+64(%rsp),%ecx - xorl 12+64(%rsp),%edx - - movq 0(%r8),%r11 - movq 8(%r8),%r12 - subq $16,%r10 - jz L$cbc_fast_dec_in_place_done - - movq %r11,0+64(%rsp) - movq %r12,8+64(%rsp) - - movl %eax,0(%r9) - movl %ebx,4(%r9) - movl %ecx,8(%r9) - movl %edx,12(%r9) - - leaq 16(%r8),%r8 - leaq 16(%r9),%r9 - movq %r10,40(%rsp) - jmp L$cbc_fast_dec_in_place_loop -L$cbc_fast_dec_in_place_done: - movq 56(%rsp),%rdi - movq %r11,0(%rdi) - movq %r12,8(%rdi) - - movl %eax,0(%r9) - movl %ebx,4(%r9) - movl %ecx,8(%r9) - movl %edx,12(%r9) - -.p2align 2 -L$cbc_fast_cleanup: - cmpl $0,80+240(%rsp) - leaq 80(%rsp),%rdi - je L$cbc_exit - movl $30,%ecx - xorq %rax,%rax -.long 0x90AB48F3 - - jmp L$cbc_exit - - -.p2align 4 -L$cbc_slow_prologue: - - leaq -88(%rsp),%rbp - andq $-64,%rbp - - leaq -88-63(%rcx),%r10 - subq %rbp,%r10 - negq %r10 - andq $960,%r10 - subq %r10,%rbp - - xchgq %rsp,%rbp - - movq %rbp,16(%rsp) -L$cbc_slow_body: - - - - - movq %r8,56(%rsp) - movq %r8,%rbp - movq %r9,%rbx - movq %rsi,%r9 - movq %rdi,%r8 - movq %rcx,%r15 - movq %rdx,%r10 - - movl 240(%r15),%eax - movq %r15,0(%rsp) - shll $4,%eax - leaq (%r15,%rax,1),%rax - movq %rax,8(%rsp) - - - leaq 2048(%r14),%r14 - leaq 768-8(%rsp),%rax - subq %r14,%rax - andq $768,%rax - leaq (%r14,%rax,1),%r14 - - cmpq $0,%rbx - je L$SLOW_DECRYPT - - - testq $-16,%r10 - movl 0(%rbp),%eax - movl 4(%rbp),%ebx - movl 8(%rbp),%ecx - movl 12(%rbp),%edx - jz L$cbc_slow_enc_tail - -.p2align 2 -L$cbc_slow_enc_loop: - xorl 0(%r8),%eax - xorl 4(%r8),%ebx - xorl 8(%r8),%ecx - xorl 12(%r8),%edx - movq 0(%rsp),%r15 - movq %r8,24(%rsp) - movq %r9,32(%rsp) - movq %r10,40(%rsp) - - call _x86_64_AES_encrypt_compact - - movq 24(%rsp),%r8 - movq 32(%rsp),%r9 - movq 40(%rsp),%r10 - movl %eax,0(%r9) - movl %ebx,4(%r9) - movl %ecx,8(%r9) - movl %edx,12(%r9) - - leaq 16(%r8),%r8 - leaq 16(%r9),%r9 - subq $16,%r10 - testq $-16,%r10 - jnz L$cbc_slow_enc_loop - testq $15,%r10 - jnz L$cbc_slow_enc_tail - movq 56(%rsp),%rbp - movl %eax,0(%rbp) - movl %ebx,4(%rbp) - movl %ecx,8(%rbp) - movl %edx,12(%rbp) - - jmp L$cbc_exit - -.p2align 2 -L$cbc_slow_enc_tail: - movq %rax,%r11 - movq %rcx,%r12 - movq %r10,%rcx - movq %r8,%rsi - movq %r9,%rdi -.long 0x9066A4F3 - movq $16,%rcx - subq %r10,%rcx - xorq %rax,%rax -.long 0x9066AAF3 - movq %r9,%r8 - movq $16,%r10 - movq %r11,%rax - movq %r12,%rcx - jmp L$cbc_slow_enc_loop - -.p2align 4 -L$SLOW_DECRYPT: - shrq $3,%rax - addq %rax,%r14 - - movq 0(%rbp),%r11 - movq 8(%rbp),%r12 - movq %r11,0+64(%rsp) - movq %r12,8+64(%rsp) - -.p2align 2 -L$cbc_slow_dec_loop: - movl 0(%r8),%eax - movl 4(%r8),%ebx - movl 8(%r8),%ecx - movl 12(%r8),%edx - movq 0(%rsp),%r15 - movq %r8,24(%rsp) - movq %r9,32(%rsp) - movq %r10,40(%rsp) - - call _x86_64_AES_decrypt_compact - - movq 24(%rsp),%r8 - movq 32(%rsp),%r9 - movq 40(%rsp),%r10 - xorl 0+64(%rsp),%eax - xorl 4+64(%rsp),%ebx - xorl 8+64(%rsp),%ecx - xorl 12+64(%rsp),%edx - - movq 0(%r8),%r11 - movq 8(%r8),%r12 - subq $16,%r10 - jc L$cbc_slow_dec_partial - jz L$cbc_slow_dec_done - - movq %r11,0+64(%rsp) - movq %r12,8+64(%rsp) - - movl %eax,0(%r9) - movl %ebx,4(%r9) - movl %ecx,8(%r9) - movl %edx,12(%r9) - - leaq 16(%r8),%r8 - leaq 16(%r9),%r9 - jmp L$cbc_slow_dec_loop -L$cbc_slow_dec_done: - movq 56(%rsp),%rdi - movq %r11,0(%rdi) - movq %r12,8(%rdi) - - movl %eax,0(%r9) - movl %ebx,4(%r9) - movl %ecx,8(%r9) - movl %edx,12(%r9) - - jmp L$cbc_exit - -.p2align 2 -L$cbc_slow_dec_partial: - movq 56(%rsp),%rdi - movq %r11,0(%rdi) - movq %r12,8(%rdi) - - movl %eax,0+64(%rsp) - movl %ebx,4+64(%rsp) - movl %ecx,8+64(%rsp) - movl %edx,12+64(%rsp) - - movq %r9,%rdi - leaq 64(%rsp),%rsi - leaq 16(%r10),%rcx -.long 0x9066A4F3 - jmp L$cbc_exit - -.p2align 4 -L$cbc_exit: - movq 16(%rsp),%rsi - movq (%rsi),%r15 - movq 8(%rsi),%r14 - movq 16(%rsi),%r13 - movq 24(%rsi),%r12 - movq 32(%rsi),%rbp - movq 40(%rsi),%rbx - leaq 48(%rsi),%rsp -L$cbc_popfq: - popfq -L$cbc_epilogue: - .byte 0xf3,0xc3 - -.p2align 6 -L$AES_Te: -.long 0xa56363c6,0xa56363c6 -.long 0x847c7cf8,0x847c7cf8 -.long 0x997777ee,0x997777ee -.long 0x8d7b7bf6,0x8d7b7bf6 -.long 0x0df2f2ff,0x0df2f2ff -.long 0xbd6b6bd6,0xbd6b6bd6 -.long 0xb16f6fde,0xb16f6fde -.long 0x54c5c591,0x54c5c591 -.long 0x50303060,0x50303060 -.long 0x03010102,0x03010102 -.long 0xa96767ce,0xa96767ce -.long 0x7d2b2b56,0x7d2b2b56 -.long 0x19fefee7,0x19fefee7 -.long 0x62d7d7b5,0x62d7d7b5 -.long 0xe6abab4d,0xe6abab4d -.long 0x9a7676ec,0x9a7676ec -.long 0x45caca8f,0x45caca8f -.long 0x9d82821f,0x9d82821f -.long 0x40c9c989,0x40c9c989 -.long 0x877d7dfa,0x877d7dfa -.long 0x15fafaef,0x15fafaef -.long 0xeb5959b2,0xeb5959b2 -.long 0xc947478e,0xc947478e -.long 0x0bf0f0fb,0x0bf0f0fb -.long 0xecadad41,0xecadad41 -.long 0x67d4d4b3,0x67d4d4b3 -.long 0xfda2a25f,0xfda2a25f -.long 0xeaafaf45,0xeaafaf45 -.long 0xbf9c9c23,0xbf9c9c23 -.long 0xf7a4a453,0xf7a4a453 -.long 0x967272e4,0x967272e4 -.long 0x5bc0c09b,0x5bc0c09b -.long 0xc2b7b775,0xc2b7b775 -.long 0x1cfdfde1,0x1cfdfde1 -.long 0xae93933d,0xae93933d -.long 0x6a26264c,0x6a26264c -.long 0x5a36366c,0x5a36366c -.long 0x413f3f7e,0x413f3f7e -.long 0x02f7f7f5,0x02f7f7f5 -.long 0x4fcccc83,0x4fcccc83 -.long 0x5c343468,0x5c343468 -.long 0xf4a5a551,0xf4a5a551 -.long 0x34e5e5d1,0x34e5e5d1 -.long 0x08f1f1f9,0x08f1f1f9 -.long 0x937171e2,0x937171e2 -.long 0x73d8d8ab,0x73d8d8ab -.long 0x53313162,0x53313162 -.long 0x3f15152a,0x3f15152a -.long 0x0c040408,0x0c040408 -.long 0x52c7c795,0x52c7c795 -.long 0x65232346,0x65232346 -.long 0x5ec3c39d,0x5ec3c39d -.long 0x28181830,0x28181830 -.long 0xa1969637,0xa1969637 -.long 0x0f05050a,0x0f05050a -.long 0xb59a9a2f,0xb59a9a2f -.long 0x0907070e,0x0907070e -.long 0x36121224,0x36121224 -.long 0x9b80801b,0x9b80801b -.long 0x3de2e2df,0x3de2e2df -.long 0x26ebebcd,0x26ebebcd -.long 0x6927274e,0x6927274e -.long 0xcdb2b27f,0xcdb2b27f -.long 0x9f7575ea,0x9f7575ea -.long 0x1b090912,0x1b090912 -.long 0x9e83831d,0x9e83831d -.long 0x742c2c58,0x742c2c58 -.long 0x2e1a1a34,0x2e1a1a34 -.long 0x2d1b1b36,0x2d1b1b36 -.long 0xb26e6edc,0xb26e6edc -.long 0xee5a5ab4,0xee5a5ab4 -.long 0xfba0a05b,0xfba0a05b -.long 0xf65252a4,0xf65252a4 -.long 0x4d3b3b76,0x4d3b3b76 -.long 0x61d6d6b7,0x61d6d6b7 -.long 0xceb3b37d,0xceb3b37d -.long 0x7b292952,0x7b292952 -.long 0x3ee3e3dd,0x3ee3e3dd -.long 0x712f2f5e,0x712f2f5e -.long 0x97848413,0x97848413 -.long 0xf55353a6,0xf55353a6 -.long 0x68d1d1b9,0x68d1d1b9 -.long 0x00000000,0x00000000 -.long 0x2cededc1,0x2cededc1 -.long 0x60202040,0x60202040 -.long 0x1ffcfce3,0x1ffcfce3 -.long 0xc8b1b179,0xc8b1b179 -.long 0xed5b5bb6,0xed5b5bb6 -.long 0xbe6a6ad4,0xbe6a6ad4 -.long 0x46cbcb8d,0x46cbcb8d -.long 0xd9bebe67,0xd9bebe67 -.long 0x4b393972,0x4b393972 -.long 0xde4a4a94,0xde4a4a94 -.long 0xd44c4c98,0xd44c4c98 -.long 0xe85858b0,0xe85858b0 -.long 0x4acfcf85,0x4acfcf85 -.long 0x6bd0d0bb,0x6bd0d0bb -.long 0x2aefefc5,0x2aefefc5 -.long 0xe5aaaa4f,0xe5aaaa4f -.long 0x16fbfbed,0x16fbfbed -.long 0xc5434386,0xc5434386 -.long 0xd74d4d9a,0xd74d4d9a -.long 0x55333366,0x55333366 -.long 0x94858511,0x94858511 -.long 0xcf45458a,0xcf45458a -.long 0x10f9f9e9,0x10f9f9e9 -.long 0x06020204,0x06020204 -.long 0x817f7ffe,0x817f7ffe -.long 0xf05050a0,0xf05050a0 -.long 0x443c3c78,0x443c3c78 -.long 0xba9f9f25,0xba9f9f25 -.long 0xe3a8a84b,0xe3a8a84b -.long 0xf35151a2,0xf35151a2 -.long 0xfea3a35d,0xfea3a35d -.long 0xc0404080,0xc0404080 -.long 0x8a8f8f05,0x8a8f8f05 -.long 0xad92923f,0xad92923f -.long 0xbc9d9d21,0xbc9d9d21 -.long 0x48383870,0x48383870 -.long 0x04f5f5f1,0x04f5f5f1 -.long 0xdfbcbc63,0xdfbcbc63 -.long 0xc1b6b677,0xc1b6b677 -.long 0x75dadaaf,0x75dadaaf -.long 0x63212142,0x63212142 -.long 0x30101020,0x30101020 -.long 0x1affffe5,0x1affffe5 -.long 0x0ef3f3fd,0x0ef3f3fd -.long 0x6dd2d2bf,0x6dd2d2bf -.long 0x4ccdcd81,0x4ccdcd81 -.long 0x140c0c18,0x140c0c18 -.long 0x35131326,0x35131326 -.long 0x2fececc3,0x2fececc3 -.long 0xe15f5fbe,0xe15f5fbe -.long 0xa2979735,0xa2979735 -.long 0xcc444488,0xcc444488 -.long 0x3917172e,0x3917172e -.long 0x57c4c493,0x57c4c493 -.long 0xf2a7a755,0xf2a7a755 -.long 0x827e7efc,0x827e7efc -.long 0x473d3d7a,0x473d3d7a -.long 0xac6464c8,0xac6464c8 -.long 0xe75d5dba,0xe75d5dba -.long 0x2b191932,0x2b191932 -.long 0x957373e6,0x957373e6 -.long 0xa06060c0,0xa06060c0 -.long 0x98818119,0x98818119 -.long 0xd14f4f9e,0xd14f4f9e -.long 0x7fdcdca3,0x7fdcdca3 -.long 0x66222244,0x66222244 -.long 0x7e2a2a54,0x7e2a2a54 -.long 0xab90903b,0xab90903b -.long 0x8388880b,0x8388880b -.long 0xca46468c,0xca46468c -.long 0x29eeeec7,0x29eeeec7 -.long 0xd3b8b86b,0xd3b8b86b -.long 0x3c141428,0x3c141428 -.long 0x79dedea7,0x79dedea7 -.long 0xe25e5ebc,0xe25e5ebc -.long 0x1d0b0b16,0x1d0b0b16 -.long 0x76dbdbad,0x76dbdbad -.long 0x3be0e0db,0x3be0e0db -.long 0x56323264,0x56323264 -.long 0x4e3a3a74,0x4e3a3a74 -.long 0x1e0a0a14,0x1e0a0a14 -.long 0xdb494992,0xdb494992 -.long 0x0a06060c,0x0a06060c -.long 0x6c242448,0x6c242448 -.long 0xe45c5cb8,0xe45c5cb8 -.long 0x5dc2c29f,0x5dc2c29f -.long 0x6ed3d3bd,0x6ed3d3bd -.long 0xefacac43,0xefacac43 -.long 0xa66262c4,0xa66262c4 -.long 0xa8919139,0xa8919139 -.long 0xa4959531,0xa4959531 -.long 0x37e4e4d3,0x37e4e4d3 -.long 0x8b7979f2,0x8b7979f2 -.long 0x32e7e7d5,0x32e7e7d5 -.long 0x43c8c88b,0x43c8c88b -.long 0x5937376e,0x5937376e -.long 0xb76d6dda,0xb76d6dda -.long 0x8c8d8d01,0x8c8d8d01 -.long 0x64d5d5b1,0x64d5d5b1 -.long 0xd24e4e9c,0xd24e4e9c -.long 0xe0a9a949,0xe0a9a949 -.long 0xb46c6cd8,0xb46c6cd8 -.long 0xfa5656ac,0xfa5656ac -.long 0x07f4f4f3,0x07f4f4f3 -.long 0x25eaeacf,0x25eaeacf -.long 0xaf6565ca,0xaf6565ca -.long 0x8e7a7af4,0x8e7a7af4 -.long 0xe9aeae47,0xe9aeae47 -.long 0x18080810,0x18080810 -.long 0xd5baba6f,0xd5baba6f -.long 0x887878f0,0x887878f0 -.long 0x6f25254a,0x6f25254a -.long 0x722e2e5c,0x722e2e5c -.long 0x241c1c38,0x241c1c38 -.long 0xf1a6a657,0xf1a6a657 -.long 0xc7b4b473,0xc7b4b473 -.long 0x51c6c697,0x51c6c697 -.long 0x23e8e8cb,0x23e8e8cb -.long 0x7cdddda1,0x7cdddda1 -.long 0x9c7474e8,0x9c7474e8 -.long 0x211f1f3e,0x211f1f3e -.long 0xdd4b4b96,0xdd4b4b96 -.long 0xdcbdbd61,0xdcbdbd61 -.long 0x868b8b0d,0x868b8b0d -.long 0x858a8a0f,0x858a8a0f -.long 0x907070e0,0x907070e0 -.long 0x423e3e7c,0x423e3e7c -.long 0xc4b5b571,0xc4b5b571 -.long 0xaa6666cc,0xaa6666cc -.long 0xd8484890,0xd8484890 -.long 0x05030306,0x05030306 -.long 0x01f6f6f7,0x01f6f6f7 -.long 0x120e0e1c,0x120e0e1c -.long 0xa36161c2,0xa36161c2 -.long 0x5f35356a,0x5f35356a -.long 0xf95757ae,0xf95757ae -.long 0xd0b9b969,0xd0b9b969 -.long 0x91868617,0x91868617 -.long 0x58c1c199,0x58c1c199 -.long 0x271d1d3a,0x271d1d3a -.long 0xb99e9e27,0xb99e9e27 -.long 0x38e1e1d9,0x38e1e1d9 -.long 0x13f8f8eb,0x13f8f8eb -.long 0xb398982b,0xb398982b -.long 0x33111122,0x33111122 -.long 0xbb6969d2,0xbb6969d2 -.long 0x70d9d9a9,0x70d9d9a9 -.long 0x898e8e07,0x898e8e07 -.long 0xa7949433,0xa7949433 -.long 0xb69b9b2d,0xb69b9b2d -.long 0x221e1e3c,0x221e1e3c -.long 0x92878715,0x92878715 -.long 0x20e9e9c9,0x20e9e9c9 -.long 0x49cece87,0x49cece87 -.long 0xff5555aa,0xff5555aa -.long 0x78282850,0x78282850 -.long 0x7adfdfa5,0x7adfdfa5 -.long 0x8f8c8c03,0x8f8c8c03 -.long 0xf8a1a159,0xf8a1a159 -.long 0x80898909,0x80898909 -.long 0x170d0d1a,0x170d0d1a -.long 0xdabfbf65,0xdabfbf65 -.long 0x31e6e6d7,0x31e6e6d7 -.long 0xc6424284,0xc6424284 -.long 0xb86868d0,0xb86868d0 -.long 0xc3414182,0xc3414182 -.long 0xb0999929,0xb0999929 -.long 0x772d2d5a,0x772d2d5a -.long 0x110f0f1e,0x110f0f1e -.long 0xcbb0b07b,0xcbb0b07b -.long 0xfc5454a8,0xfc5454a8 -.long 0xd6bbbb6d,0xd6bbbb6d -.long 0x3a16162c,0x3a16162c -.byte 0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5 -.byte 0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76 -.byte 0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0 -.byte 0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0 -.byte 0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc -.byte 0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15 -.byte 0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a -.byte 0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75 -.byte 0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0 -.byte 0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84 -.byte 0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b -.byte 0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf -.byte 0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85 -.byte 0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8 -.byte 0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5 -.byte 0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2 -.byte 0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17 -.byte 0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73 -.byte 0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88 -.byte 0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb -.byte 0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c -.byte 0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79 -.byte 0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9 -.byte 0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08 -.byte 0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6 -.byte 0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a -.byte 0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e -.byte 0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e -.byte 0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94 -.byte 0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf -.byte 0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68 -.byte 0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16 -.byte 0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5 -.byte 0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76 -.byte 0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0 -.byte 0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0 -.byte 0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc -.byte 0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15 -.byte 0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a -.byte 0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75 -.byte 0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0 -.byte 0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84 -.byte 0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b -.byte 0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf -.byte 0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85 -.byte 0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8 -.byte 0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5 -.byte 0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2 -.byte 0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17 -.byte 0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73 -.byte 0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88 -.byte 0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb -.byte 0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c -.byte 0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79 -.byte 0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9 -.byte 0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08 -.byte 0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6 -.byte 0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a -.byte 0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e -.byte 0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e -.byte 0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94 -.byte 0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf -.byte 0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68 -.byte 0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16 -.byte 0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5 -.byte 0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76 -.byte 0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0 -.byte 0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0 -.byte 0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc -.byte 0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15 -.byte 0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a -.byte 0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75 -.byte 0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0 -.byte 0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84 -.byte 0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b -.byte 0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf -.byte 0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85 -.byte 0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8 -.byte 0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5 -.byte 0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2 -.byte 0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17 -.byte 0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73 -.byte 0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88 -.byte 0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb -.byte 0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c -.byte 0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79 -.byte 0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9 -.byte 0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08 -.byte 0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6 -.byte 0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a -.byte 0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e -.byte 0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e -.byte 0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94 -.byte 0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf -.byte 0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68 -.byte 0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16 -.byte 0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5 -.byte 0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76 -.byte 0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0 -.byte 0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0 -.byte 0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc -.byte 0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15 -.byte 0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a -.byte 0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75 -.byte 0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0 -.byte 0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84 -.byte 0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b -.byte 0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf -.byte 0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85 -.byte 0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8 -.byte 0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5 -.byte 0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2 -.byte 0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17 -.byte 0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73 -.byte 0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88 -.byte 0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb -.byte 0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c -.byte 0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79 -.byte 0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9 -.byte 0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08 -.byte 0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6 -.byte 0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a -.byte 0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e -.byte 0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e -.byte 0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94 -.byte 0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf -.byte 0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68 -.byte 0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16 -.long 0x00000001, 0x00000002, 0x00000004, 0x00000008 -.long 0x00000010, 0x00000020, 0x00000040, 0x00000080 -.long 0x0000001b, 0x00000036, 0x80808080, 0x80808080 -.long 0xfefefefe, 0xfefefefe, 0x1b1b1b1b, 0x1b1b1b1b -.p2align 6 -L$AES_Td: -.long 0x50a7f451,0x50a7f451 -.long 0x5365417e,0x5365417e -.long 0xc3a4171a,0xc3a4171a -.long 0x965e273a,0x965e273a -.long 0xcb6bab3b,0xcb6bab3b -.long 0xf1459d1f,0xf1459d1f -.long 0xab58faac,0xab58faac -.long 0x9303e34b,0x9303e34b -.long 0x55fa3020,0x55fa3020 -.long 0xf66d76ad,0xf66d76ad -.long 0x9176cc88,0x9176cc88 -.long 0x254c02f5,0x254c02f5 -.long 0xfcd7e54f,0xfcd7e54f -.long 0xd7cb2ac5,0xd7cb2ac5 -.long 0x80443526,0x80443526 -.long 0x8fa362b5,0x8fa362b5 -.long 0x495ab1de,0x495ab1de -.long 0x671bba25,0x671bba25 -.long 0x980eea45,0x980eea45 -.long 0xe1c0fe5d,0xe1c0fe5d -.long 0x02752fc3,0x02752fc3 -.long 0x12f04c81,0x12f04c81 -.long 0xa397468d,0xa397468d -.long 0xc6f9d36b,0xc6f9d36b -.long 0xe75f8f03,0xe75f8f03 -.long 0x959c9215,0x959c9215 -.long 0xeb7a6dbf,0xeb7a6dbf -.long 0xda595295,0xda595295 -.long 0x2d83bed4,0x2d83bed4 -.long 0xd3217458,0xd3217458 -.long 0x2969e049,0x2969e049 -.long 0x44c8c98e,0x44c8c98e -.long 0x6a89c275,0x6a89c275 -.long 0x78798ef4,0x78798ef4 -.long 0x6b3e5899,0x6b3e5899 -.long 0xdd71b927,0xdd71b927 -.long 0xb64fe1be,0xb64fe1be -.long 0x17ad88f0,0x17ad88f0 -.long 0x66ac20c9,0x66ac20c9 -.long 0xb43ace7d,0xb43ace7d -.long 0x184adf63,0x184adf63 -.long 0x82311ae5,0x82311ae5 -.long 0x60335197,0x60335197 -.long 0x457f5362,0x457f5362 -.long 0xe07764b1,0xe07764b1 -.long 0x84ae6bbb,0x84ae6bbb -.long 0x1ca081fe,0x1ca081fe -.long 0x942b08f9,0x942b08f9 -.long 0x58684870,0x58684870 -.long 0x19fd458f,0x19fd458f -.long 0x876cde94,0x876cde94 -.long 0xb7f87b52,0xb7f87b52 -.long 0x23d373ab,0x23d373ab -.long 0xe2024b72,0xe2024b72 -.long 0x578f1fe3,0x578f1fe3 -.long 0x2aab5566,0x2aab5566 -.long 0x0728ebb2,0x0728ebb2 -.long 0x03c2b52f,0x03c2b52f -.long 0x9a7bc586,0x9a7bc586 -.long 0xa50837d3,0xa50837d3 -.long 0xf2872830,0xf2872830 -.long 0xb2a5bf23,0xb2a5bf23 -.long 0xba6a0302,0xba6a0302 -.long 0x5c8216ed,0x5c8216ed -.long 0x2b1ccf8a,0x2b1ccf8a -.long 0x92b479a7,0x92b479a7 -.long 0xf0f207f3,0xf0f207f3 -.long 0xa1e2694e,0xa1e2694e -.long 0xcdf4da65,0xcdf4da65 -.long 0xd5be0506,0xd5be0506 -.long 0x1f6234d1,0x1f6234d1 -.long 0x8afea6c4,0x8afea6c4 -.long 0x9d532e34,0x9d532e34 -.long 0xa055f3a2,0xa055f3a2 -.long 0x32e18a05,0x32e18a05 -.long 0x75ebf6a4,0x75ebf6a4 -.long 0x39ec830b,0x39ec830b -.long 0xaaef6040,0xaaef6040 -.long 0x069f715e,0x069f715e -.long 0x51106ebd,0x51106ebd -.long 0xf98a213e,0xf98a213e -.long 0x3d06dd96,0x3d06dd96 -.long 0xae053edd,0xae053edd -.long 0x46bde64d,0x46bde64d -.long 0xb58d5491,0xb58d5491 -.long 0x055dc471,0x055dc471 -.long 0x6fd40604,0x6fd40604 -.long 0xff155060,0xff155060 -.long 0x24fb9819,0x24fb9819 -.long 0x97e9bdd6,0x97e9bdd6 -.long 0xcc434089,0xcc434089 -.long 0x779ed967,0x779ed967 -.long 0xbd42e8b0,0xbd42e8b0 -.long 0x888b8907,0x888b8907 -.long 0x385b19e7,0x385b19e7 -.long 0xdbeec879,0xdbeec879 -.long 0x470a7ca1,0x470a7ca1 -.long 0xe90f427c,0xe90f427c -.long 0xc91e84f8,0xc91e84f8 -.long 0x00000000,0x00000000 -.long 0x83868009,0x83868009 -.long 0x48ed2b32,0x48ed2b32 -.long 0xac70111e,0xac70111e -.long 0x4e725a6c,0x4e725a6c -.long 0xfbff0efd,0xfbff0efd -.long 0x5638850f,0x5638850f -.long 0x1ed5ae3d,0x1ed5ae3d -.long 0x27392d36,0x27392d36 -.long 0x64d90f0a,0x64d90f0a -.long 0x21a65c68,0x21a65c68 -.long 0xd1545b9b,0xd1545b9b -.long 0x3a2e3624,0x3a2e3624 -.long 0xb1670a0c,0xb1670a0c -.long 0x0fe75793,0x0fe75793 -.long 0xd296eeb4,0xd296eeb4 -.long 0x9e919b1b,0x9e919b1b -.long 0x4fc5c080,0x4fc5c080 -.long 0xa220dc61,0xa220dc61 -.long 0x694b775a,0x694b775a -.long 0x161a121c,0x161a121c -.long 0x0aba93e2,0x0aba93e2 -.long 0xe52aa0c0,0xe52aa0c0 -.long 0x43e0223c,0x43e0223c -.long 0x1d171b12,0x1d171b12 -.long 0x0b0d090e,0x0b0d090e -.long 0xadc78bf2,0xadc78bf2 -.long 0xb9a8b62d,0xb9a8b62d -.long 0xc8a91e14,0xc8a91e14 -.long 0x8519f157,0x8519f157 -.long 0x4c0775af,0x4c0775af -.long 0xbbdd99ee,0xbbdd99ee -.long 0xfd607fa3,0xfd607fa3 -.long 0x9f2601f7,0x9f2601f7 -.long 0xbcf5725c,0xbcf5725c -.long 0xc53b6644,0xc53b6644 -.long 0x347efb5b,0x347efb5b -.long 0x7629438b,0x7629438b -.long 0xdcc623cb,0xdcc623cb -.long 0x68fcedb6,0x68fcedb6 -.long 0x63f1e4b8,0x63f1e4b8 -.long 0xcadc31d7,0xcadc31d7 -.long 0x10856342,0x10856342 -.long 0x40229713,0x40229713 -.long 0x2011c684,0x2011c684 -.long 0x7d244a85,0x7d244a85 -.long 0xf83dbbd2,0xf83dbbd2 -.long 0x1132f9ae,0x1132f9ae -.long 0x6da129c7,0x6da129c7 -.long 0x4b2f9e1d,0x4b2f9e1d -.long 0xf330b2dc,0xf330b2dc -.long 0xec52860d,0xec52860d -.long 0xd0e3c177,0xd0e3c177 -.long 0x6c16b32b,0x6c16b32b -.long 0x99b970a9,0x99b970a9 -.long 0xfa489411,0xfa489411 -.long 0x2264e947,0x2264e947 -.long 0xc48cfca8,0xc48cfca8 -.long 0x1a3ff0a0,0x1a3ff0a0 -.long 0xd82c7d56,0xd82c7d56 -.long 0xef903322,0xef903322 -.long 0xc74e4987,0xc74e4987 -.long 0xc1d138d9,0xc1d138d9 -.long 0xfea2ca8c,0xfea2ca8c -.long 0x360bd498,0x360bd498 -.long 0xcf81f5a6,0xcf81f5a6 -.long 0x28de7aa5,0x28de7aa5 -.long 0x268eb7da,0x268eb7da -.long 0xa4bfad3f,0xa4bfad3f -.long 0xe49d3a2c,0xe49d3a2c -.long 0x0d927850,0x0d927850 -.long 0x9bcc5f6a,0x9bcc5f6a -.long 0x62467e54,0x62467e54 -.long 0xc2138df6,0xc2138df6 -.long 0xe8b8d890,0xe8b8d890 -.long 0x5ef7392e,0x5ef7392e -.long 0xf5afc382,0xf5afc382 -.long 0xbe805d9f,0xbe805d9f -.long 0x7c93d069,0x7c93d069 -.long 0xa92dd56f,0xa92dd56f -.long 0xb31225cf,0xb31225cf -.long 0x3b99acc8,0x3b99acc8 -.long 0xa77d1810,0xa77d1810 -.long 0x6e639ce8,0x6e639ce8 -.long 0x7bbb3bdb,0x7bbb3bdb -.long 0x097826cd,0x097826cd -.long 0xf418596e,0xf418596e -.long 0x01b79aec,0x01b79aec -.long 0xa89a4f83,0xa89a4f83 -.long 0x656e95e6,0x656e95e6 -.long 0x7ee6ffaa,0x7ee6ffaa -.long 0x08cfbc21,0x08cfbc21 -.long 0xe6e815ef,0xe6e815ef -.long 0xd99be7ba,0xd99be7ba -.long 0xce366f4a,0xce366f4a -.long 0xd4099fea,0xd4099fea -.long 0xd67cb029,0xd67cb029 -.long 0xafb2a431,0xafb2a431 -.long 0x31233f2a,0x31233f2a -.long 0x3094a5c6,0x3094a5c6 -.long 0xc066a235,0xc066a235 -.long 0x37bc4e74,0x37bc4e74 -.long 0xa6ca82fc,0xa6ca82fc -.long 0xb0d090e0,0xb0d090e0 -.long 0x15d8a733,0x15d8a733 -.long 0x4a9804f1,0x4a9804f1 -.long 0xf7daec41,0xf7daec41 -.long 0x0e50cd7f,0x0e50cd7f -.long 0x2ff69117,0x2ff69117 -.long 0x8dd64d76,0x8dd64d76 -.long 0x4db0ef43,0x4db0ef43 -.long 0x544daacc,0x544daacc -.long 0xdf0496e4,0xdf0496e4 -.long 0xe3b5d19e,0xe3b5d19e -.long 0x1b886a4c,0x1b886a4c -.long 0xb81f2cc1,0xb81f2cc1 -.long 0x7f516546,0x7f516546 -.long 0x04ea5e9d,0x04ea5e9d -.long 0x5d358c01,0x5d358c01 -.long 0x737487fa,0x737487fa -.long 0x2e410bfb,0x2e410bfb -.long 0x5a1d67b3,0x5a1d67b3 -.long 0x52d2db92,0x52d2db92 -.long 0x335610e9,0x335610e9 -.long 0x1347d66d,0x1347d66d -.long 0x8c61d79a,0x8c61d79a -.long 0x7a0ca137,0x7a0ca137 -.long 0x8e14f859,0x8e14f859 -.long 0x893c13eb,0x893c13eb -.long 0xee27a9ce,0xee27a9ce -.long 0x35c961b7,0x35c961b7 -.long 0xede51ce1,0xede51ce1 -.long 0x3cb1477a,0x3cb1477a -.long 0x59dfd29c,0x59dfd29c -.long 0x3f73f255,0x3f73f255 -.long 0x79ce1418,0x79ce1418 -.long 0xbf37c773,0xbf37c773 -.long 0xeacdf753,0xeacdf753 -.long 0x5baafd5f,0x5baafd5f -.long 0x146f3ddf,0x146f3ddf -.long 0x86db4478,0x86db4478 -.long 0x81f3afca,0x81f3afca -.long 0x3ec468b9,0x3ec468b9 -.long 0x2c342438,0x2c342438 -.long 0x5f40a3c2,0x5f40a3c2 -.long 0x72c31d16,0x72c31d16 -.long 0x0c25e2bc,0x0c25e2bc -.long 0x8b493c28,0x8b493c28 -.long 0x41950dff,0x41950dff -.long 0x7101a839,0x7101a839 -.long 0xdeb30c08,0xdeb30c08 -.long 0x9ce4b4d8,0x9ce4b4d8 -.long 0x90c15664,0x90c15664 -.long 0x6184cb7b,0x6184cb7b -.long 0x70b632d5,0x70b632d5 -.long 0x745c6c48,0x745c6c48 -.long 0x4257b8d0,0x4257b8d0 -.byte 0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38 -.byte 0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb -.byte 0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87 -.byte 0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb -.byte 0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d -.byte 0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e -.byte 0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2 -.byte 0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25 -.byte 0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16 -.byte 0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92 -.byte 0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda -.byte 0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84 -.byte 0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a -.byte 0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06 -.byte 0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02 -.byte 0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b -.byte 0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea -.byte 0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73 -.byte 0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85 -.byte 0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e -.byte 0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89 -.byte 0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b -.byte 0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20 -.byte 0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4 -.byte 0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31 -.byte 0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f -.byte 0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d -.byte 0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef -.byte 0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0 -.byte 0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61 -.byte 0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26 -.byte 0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d -.long 0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe -.long 0x1b1b1b1b, 0x1b1b1b1b, 0, 0 -.byte 0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38 -.byte 0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb -.byte 0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87 -.byte 0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb -.byte 0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d -.byte 0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e -.byte 0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2 -.byte 0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25 -.byte 0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16 -.byte 0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92 -.byte 0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda -.byte 0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84 -.byte 0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a -.byte 0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06 -.byte 0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02 -.byte 0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b -.byte 0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea -.byte 0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73 -.byte 0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85 -.byte 0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e -.byte 0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89 -.byte 0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b -.byte 0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20 -.byte 0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4 -.byte 0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31 -.byte 0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f -.byte 0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d -.byte 0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef -.byte 0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0 -.byte 0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61 -.byte 0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26 -.byte 0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d -.long 0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe -.long 0x1b1b1b1b, 0x1b1b1b1b, 0, 0 -.byte 0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38 -.byte 0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb -.byte 0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87 -.byte 0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb -.byte 0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d -.byte 0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e -.byte 0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2 -.byte 0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25 -.byte 0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16 -.byte 0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92 -.byte 0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda -.byte 0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84 -.byte 0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a -.byte 0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06 -.byte 0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02 -.byte 0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b -.byte 0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea -.byte 0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73 -.byte 0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85 -.byte 0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e -.byte 0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89 -.byte 0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b -.byte 0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20 -.byte 0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4 -.byte 0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31 -.byte 0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f -.byte 0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d -.byte 0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef -.byte 0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0 -.byte 0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61 -.byte 0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26 -.byte 0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d -.long 0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe -.long 0x1b1b1b1b, 0x1b1b1b1b, 0, 0 -.byte 0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38 -.byte 0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb -.byte 0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87 -.byte 0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb -.byte 0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d -.byte 0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e -.byte 0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2 -.byte 0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25 -.byte 0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16 -.byte 0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92 -.byte 0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda -.byte 0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84 -.byte 0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a -.byte 0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06 -.byte 0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02 -.byte 0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b -.byte 0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea -.byte 0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73 -.byte 0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85 -.byte 0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e -.byte 0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89 -.byte 0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b -.byte 0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20 -.byte 0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4 -.byte 0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31 -.byte 0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f -.byte 0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d -.byte 0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef -.byte 0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0 -.byte 0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61 -.byte 0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26 -.byte 0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d -.long 0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe -.long 0x1b1b1b1b, 0x1b1b1b1b, 0, 0 -.byte 65,69,83,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.p2align 6 -#endif diff --git a/third_party/boringssl/mac-x86_64/crypto/aes/aesni-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/aes/aesni-x86_64.S deleted file mode 100644 index 69b22c26b9369..0000000000000 --- a/third_party/boringssl/mac-x86_64/crypto/aes/aesni-x86_64.S +++ /dev/null @@ -1,3564 +0,0 @@ -#if defined(__x86_64__) -.text - -.globl _aesni_encrypt -.private_extern _aesni_encrypt - -.p2align 4 -_aesni_encrypt: - movups (%rdi),%xmm2 - movl 240(%rdx),%eax - movups (%rdx),%xmm0 - movups 16(%rdx),%xmm1 - leaq 32(%rdx),%rdx - xorps %xmm0,%xmm2 -L$oop_enc1_1: -.byte 102,15,56,220,209 - decl %eax - movups (%rdx),%xmm1 - leaq 16(%rdx),%rdx - jnz L$oop_enc1_1 -.byte 102,15,56,221,209 - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - .byte 0xf3,0xc3 - - -.globl _aesni_decrypt -.private_extern _aesni_decrypt - -.p2align 4 -_aesni_decrypt: - movups (%rdi),%xmm2 - movl 240(%rdx),%eax - movups (%rdx),%xmm0 - movups 16(%rdx),%xmm1 - leaq 32(%rdx),%rdx - xorps %xmm0,%xmm2 -L$oop_dec1_2: -.byte 102,15,56,222,209 - decl %eax - movups (%rdx),%xmm1 - leaq 16(%rdx),%rdx - jnz L$oop_dec1_2 -.byte 102,15,56,223,209 - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - .byte 0xf3,0xc3 - - -.p2align 4 -_aesni_encrypt2: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - xorps %xmm0,%xmm3 - movups 32(%rcx),%xmm0 - leaq 32(%rcx,%rax,1),%rcx - negq %rax - addq $16,%rax - -L$enc_loop2: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 - movups -16(%rcx,%rax,1),%xmm0 - jnz L$enc_loop2 - -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 - .byte 0xf3,0xc3 - - -.p2align 4 -_aesni_decrypt2: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - xorps %xmm0,%xmm3 - movups 32(%rcx),%xmm0 - leaq 32(%rcx,%rax,1),%rcx - negq %rax - addq $16,%rax - -L$dec_loop2: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 - movups -16(%rcx,%rax,1),%xmm0 - jnz L$dec_loop2 - -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,223,208 -.byte 102,15,56,223,216 - .byte 0xf3,0xc3 - - -.p2align 4 -_aesni_encrypt3: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - xorps %xmm0,%xmm3 - xorps %xmm0,%xmm4 - movups 32(%rcx),%xmm0 - leaq 32(%rcx,%rax,1),%rcx - negq %rax - addq $16,%rax - -L$enc_loop3: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 - movups -16(%rcx,%rax,1),%xmm0 - jnz L$enc_loop3 - -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 -.byte 102,15,56,221,224 - .byte 0xf3,0xc3 - - -.p2align 4 -_aesni_decrypt3: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - xorps %xmm0,%xmm3 - xorps %xmm0,%xmm4 - movups 32(%rcx),%xmm0 - leaq 32(%rcx,%rax,1),%rcx - negq %rax - addq $16,%rax - -L$dec_loop3: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 - movups -16(%rcx,%rax,1),%xmm0 - jnz L$dec_loop3 - -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,223,208 -.byte 102,15,56,223,216 -.byte 102,15,56,223,224 - .byte 0xf3,0xc3 - - -.p2align 4 -_aesni_encrypt4: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - xorps %xmm0,%xmm3 - xorps %xmm0,%xmm4 - xorps %xmm0,%xmm5 - movups 32(%rcx),%xmm0 - leaq 32(%rcx,%rax,1),%rcx - negq %rax -.byte 0x0f,0x1f,0x00 - addq $16,%rax - -L$enc_loop4: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 - movups -16(%rcx,%rax,1),%xmm0 - jnz L$enc_loop4 - -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 -.byte 102,15,56,221,224 -.byte 102,15,56,221,232 - .byte 0xf3,0xc3 - - -.p2align 4 -_aesni_decrypt4: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - xorps %xmm0,%xmm3 - xorps %xmm0,%xmm4 - xorps %xmm0,%xmm5 - movups 32(%rcx),%xmm0 - leaq 32(%rcx,%rax,1),%rcx - negq %rax -.byte 0x0f,0x1f,0x00 - addq $16,%rax - -L$dec_loop4: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 - movups -16(%rcx,%rax,1),%xmm0 - jnz L$dec_loop4 - -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,223,208 -.byte 102,15,56,223,216 -.byte 102,15,56,223,224 -.byte 102,15,56,223,232 - .byte 0xf3,0xc3 - - -.p2align 4 -_aesni_encrypt6: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - pxor %xmm0,%xmm4 -.byte 102,15,56,220,209 - leaq 32(%rcx,%rax,1),%rcx - negq %rax -.byte 102,15,56,220,217 - pxor %xmm0,%xmm5 - pxor %xmm0,%xmm6 -.byte 102,15,56,220,225 - pxor %xmm0,%xmm7 - movups (%rcx,%rax,1),%xmm0 - addq $16,%rax - jmp L$enc_loop6_enter -.p2align 4 -L$enc_loop6: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -L$enc_loop6_enter: -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 - movups -16(%rcx,%rax,1),%xmm0 - jnz L$enc_loop6 - -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 -.byte 102,15,56,221,224 -.byte 102,15,56,221,232 -.byte 102,15,56,221,240 -.byte 102,15,56,221,248 - .byte 0xf3,0xc3 - - -.p2align 4 -_aesni_decrypt6: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - pxor %xmm0,%xmm3 - pxor %xmm0,%xmm4 -.byte 102,15,56,222,209 - leaq 32(%rcx,%rax,1),%rcx - negq %rax -.byte 102,15,56,222,217 - pxor %xmm0,%xmm5 - pxor %xmm0,%xmm6 -.byte 102,15,56,222,225 - pxor %xmm0,%xmm7 - movups (%rcx,%rax,1),%xmm0 - addq $16,%rax - jmp L$dec_loop6_enter -.p2align 4 -L$dec_loop6: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -L$dec_loop6_enter: -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 - movups -16(%rcx,%rax,1),%xmm0 - jnz L$dec_loop6 - -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,15,56,223,208 -.byte 102,15,56,223,216 -.byte 102,15,56,223,224 -.byte 102,15,56,223,232 -.byte 102,15,56,223,240 -.byte 102,15,56,223,248 - .byte 0xf3,0xc3 - - -.p2align 4 -_aesni_encrypt8: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - xorps %xmm0,%xmm3 - pxor %xmm0,%xmm4 - pxor %xmm0,%xmm5 - pxor %xmm0,%xmm6 - leaq 32(%rcx,%rax,1),%rcx - negq %rax -.byte 102,15,56,220,209 - pxor %xmm0,%xmm7 - pxor %xmm0,%xmm8 -.byte 102,15,56,220,217 - pxor %xmm0,%xmm9 - movups (%rcx,%rax,1),%xmm0 - addq $16,%rax - jmp L$enc_loop8_inner -.p2align 4 -L$enc_loop8: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -L$enc_loop8_inner: -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 -.byte 102,68,15,56,220,201 -L$enc_loop8_enter: - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 -.byte 102,68,15,56,220,192 -.byte 102,68,15,56,220,200 - movups -16(%rcx,%rax,1),%xmm0 - jnz L$enc_loop8 - -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 -.byte 102,68,15,56,220,201 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 -.byte 102,15,56,221,224 -.byte 102,15,56,221,232 -.byte 102,15,56,221,240 -.byte 102,15,56,221,248 -.byte 102,68,15,56,221,192 -.byte 102,68,15,56,221,200 - .byte 0xf3,0xc3 - - -.p2align 4 -_aesni_decrypt8: - movups (%rcx),%xmm0 - shll $4,%eax - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm2 - xorps %xmm0,%xmm3 - pxor %xmm0,%xmm4 - pxor %xmm0,%xmm5 - pxor %xmm0,%xmm6 - leaq 32(%rcx,%rax,1),%rcx - negq %rax -.byte 102,15,56,222,209 - pxor %xmm0,%xmm7 - pxor %xmm0,%xmm8 -.byte 102,15,56,222,217 - pxor %xmm0,%xmm9 - movups (%rcx,%rax,1),%xmm0 - addq $16,%rax - jmp L$dec_loop8_inner -.p2align 4 -L$dec_loop8: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -L$dec_loop8_inner: -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,68,15,56,222,193 -.byte 102,68,15,56,222,201 -L$dec_loop8_enter: - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 -.byte 102,68,15,56,222,192 -.byte 102,68,15,56,222,200 - movups -16(%rcx,%rax,1),%xmm0 - jnz L$dec_loop8 - -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,68,15,56,222,193 -.byte 102,68,15,56,222,201 -.byte 102,15,56,223,208 -.byte 102,15,56,223,216 -.byte 102,15,56,223,224 -.byte 102,15,56,223,232 -.byte 102,15,56,223,240 -.byte 102,15,56,223,248 -.byte 102,68,15,56,223,192 -.byte 102,68,15,56,223,200 - .byte 0xf3,0xc3 - -.globl _aesni_ecb_encrypt -.private_extern _aesni_ecb_encrypt - -.p2align 4 -_aesni_ecb_encrypt: - andq $-16,%rdx - jz L$ecb_ret - - movl 240(%rcx),%eax - movups (%rcx),%xmm0 - movq %rcx,%r11 - movl %eax,%r10d - testl %r8d,%r8d - jz L$ecb_decrypt - - cmpq $128,%rdx - jb L$ecb_enc_tail - - movdqu (%rdi),%xmm2 - movdqu 16(%rdi),%xmm3 - movdqu 32(%rdi),%xmm4 - movdqu 48(%rdi),%xmm5 - movdqu 64(%rdi),%xmm6 - movdqu 80(%rdi),%xmm7 - movdqu 96(%rdi),%xmm8 - movdqu 112(%rdi),%xmm9 - leaq 128(%rdi),%rdi - subq $128,%rdx - jmp L$ecb_enc_loop8_enter -.p2align 4 -L$ecb_enc_loop8: - movups %xmm2,(%rsi) - movq %r11,%rcx - movdqu (%rdi),%xmm2 - movl %r10d,%eax - movups %xmm3,16(%rsi) - movdqu 16(%rdi),%xmm3 - movups %xmm4,32(%rsi) - movdqu 32(%rdi),%xmm4 - movups %xmm5,48(%rsi) - movdqu 48(%rdi),%xmm5 - movups %xmm6,64(%rsi) - movdqu 64(%rdi),%xmm6 - movups %xmm7,80(%rsi) - movdqu 80(%rdi),%xmm7 - movups %xmm8,96(%rsi) - movdqu 96(%rdi),%xmm8 - movups %xmm9,112(%rsi) - leaq 128(%rsi),%rsi - movdqu 112(%rdi),%xmm9 - leaq 128(%rdi),%rdi -L$ecb_enc_loop8_enter: - - call _aesni_encrypt8 - - subq $128,%rdx - jnc L$ecb_enc_loop8 - - movups %xmm2,(%rsi) - movq %r11,%rcx - movups %xmm3,16(%rsi) - movl %r10d,%eax - movups %xmm4,32(%rsi) - movups %xmm5,48(%rsi) - movups %xmm6,64(%rsi) - movups %xmm7,80(%rsi) - movups %xmm8,96(%rsi) - movups %xmm9,112(%rsi) - leaq 128(%rsi),%rsi - addq $128,%rdx - jz L$ecb_ret - -L$ecb_enc_tail: - movups (%rdi),%xmm2 - cmpq $32,%rdx - jb L$ecb_enc_one - movups 16(%rdi),%xmm3 - je L$ecb_enc_two - movups 32(%rdi),%xmm4 - cmpq $64,%rdx - jb L$ecb_enc_three - movups 48(%rdi),%xmm5 - je L$ecb_enc_four - movups 64(%rdi),%xmm6 - cmpq $96,%rdx - jb L$ecb_enc_five - movups 80(%rdi),%xmm7 - je L$ecb_enc_six - movdqu 96(%rdi),%xmm8 - xorps %xmm9,%xmm9 - call _aesni_encrypt8 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - movups %xmm4,32(%rsi) - movups %xmm5,48(%rsi) - movups %xmm6,64(%rsi) - movups %xmm7,80(%rsi) - movups %xmm8,96(%rsi) - jmp L$ecb_ret -.p2align 4 -L$ecb_enc_one: - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -L$oop_enc1_3: -.byte 102,15,56,220,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz L$oop_enc1_3 -.byte 102,15,56,221,209 - movups %xmm2,(%rsi) - jmp L$ecb_ret -.p2align 4 -L$ecb_enc_two: - call _aesni_encrypt2 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - jmp L$ecb_ret -.p2align 4 -L$ecb_enc_three: - call _aesni_encrypt3 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - movups %xmm4,32(%rsi) - jmp L$ecb_ret -.p2align 4 -L$ecb_enc_four: - call _aesni_encrypt4 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - movups %xmm4,32(%rsi) - movups %xmm5,48(%rsi) - jmp L$ecb_ret -.p2align 4 -L$ecb_enc_five: - xorps %xmm7,%xmm7 - call _aesni_encrypt6 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - movups %xmm4,32(%rsi) - movups %xmm5,48(%rsi) - movups %xmm6,64(%rsi) - jmp L$ecb_ret -.p2align 4 -L$ecb_enc_six: - call _aesni_encrypt6 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - movups %xmm4,32(%rsi) - movups %xmm5,48(%rsi) - movups %xmm6,64(%rsi) - movups %xmm7,80(%rsi) - jmp L$ecb_ret - -.p2align 4 -L$ecb_decrypt: - cmpq $128,%rdx - jb L$ecb_dec_tail - - movdqu (%rdi),%xmm2 - movdqu 16(%rdi),%xmm3 - movdqu 32(%rdi),%xmm4 - movdqu 48(%rdi),%xmm5 - movdqu 64(%rdi),%xmm6 - movdqu 80(%rdi),%xmm7 - movdqu 96(%rdi),%xmm8 - movdqu 112(%rdi),%xmm9 - leaq 128(%rdi),%rdi - subq $128,%rdx - jmp L$ecb_dec_loop8_enter -.p2align 4 -L$ecb_dec_loop8: - movups %xmm2,(%rsi) - movq %r11,%rcx - movdqu (%rdi),%xmm2 - movl %r10d,%eax - movups %xmm3,16(%rsi) - movdqu 16(%rdi),%xmm3 - movups %xmm4,32(%rsi) - movdqu 32(%rdi),%xmm4 - movups %xmm5,48(%rsi) - movdqu 48(%rdi),%xmm5 - movups %xmm6,64(%rsi) - movdqu 64(%rdi),%xmm6 - movups %xmm7,80(%rsi) - movdqu 80(%rdi),%xmm7 - movups %xmm8,96(%rsi) - movdqu 96(%rdi),%xmm8 - movups %xmm9,112(%rsi) - leaq 128(%rsi),%rsi - movdqu 112(%rdi),%xmm9 - leaq 128(%rdi),%rdi -L$ecb_dec_loop8_enter: - - call _aesni_decrypt8 - - movups (%r11),%xmm0 - subq $128,%rdx - jnc L$ecb_dec_loop8 - - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - movq %r11,%rcx - movups %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - movl %r10d,%eax - movups %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - movups %xmm5,48(%rsi) - pxor %xmm5,%xmm5 - movups %xmm6,64(%rsi) - pxor %xmm6,%xmm6 - movups %xmm7,80(%rsi) - pxor %xmm7,%xmm7 - movups %xmm8,96(%rsi) - pxor %xmm8,%xmm8 - movups %xmm9,112(%rsi) - pxor %xmm9,%xmm9 - leaq 128(%rsi),%rsi - addq $128,%rdx - jz L$ecb_ret - -L$ecb_dec_tail: - movups (%rdi),%xmm2 - cmpq $32,%rdx - jb L$ecb_dec_one - movups 16(%rdi),%xmm3 - je L$ecb_dec_two - movups 32(%rdi),%xmm4 - cmpq $64,%rdx - jb L$ecb_dec_three - movups 48(%rdi),%xmm5 - je L$ecb_dec_four - movups 64(%rdi),%xmm6 - cmpq $96,%rdx - jb L$ecb_dec_five - movups 80(%rdi),%xmm7 - je L$ecb_dec_six - movups 96(%rdi),%xmm8 - movups (%rcx),%xmm0 - xorps %xmm9,%xmm9 - call _aesni_decrypt8 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - movups %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - movups %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - movups %xmm5,48(%rsi) - pxor %xmm5,%xmm5 - movups %xmm6,64(%rsi) - pxor %xmm6,%xmm6 - movups %xmm7,80(%rsi) - pxor %xmm7,%xmm7 - movups %xmm8,96(%rsi) - pxor %xmm8,%xmm8 - pxor %xmm9,%xmm9 - jmp L$ecb_ret -.p2align 4 -L$ecb_dec_one: - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -L$oop_dec1_4: -.byte 102,15,56,222,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz L$oop_dec1_4 -.byte 102,15,56,223,209 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - jmp L$ecb_ret -.p2align 4 -L$ecb_dec_two: - call _aesni_decrypt2 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - movups %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - jmp L$ecb_ret -.p2align 4 -L$ecb_dec_three: - call _aesni_decrypt3 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - movups %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - movups %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - jmp L$ecb_ret -.p2align 4 -L$ecb_dec_four: - call _aesni_decrypt4 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - movups %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - movups %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - movups %xmm5,48(%rsi) - pxor %xmm5,%xmm5 - jmp L$ecb_ret -.p2align 4 -L$ecb_dec_five: - xorps %xmm7,%xmm7 - call _aesni_decrypt6 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - movups %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - movups %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - movups %xmm5,48(%rsi) - pxor %xmm5,%xmm5 - movups %xmm6,64(%rsi) - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - jmp L$ecb_ret -.p2align 4 -L$ecb_dec_six: - call _aesni_decrypt6 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - movups %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - movups %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - movups %xmm5,48(%rsi) - pxor %xmm5,%xmm5 - movups %xmm6,64(%rsi) - pxor %xmm6,%xmm6 - movups %xmm7,80(%rsi) - pxor %xmm7,%xmm7 - -L$ecb_ret: - xorps %xmm0,%xmm0 - pxor %xmm1,%xmm1 - .byte 0xf3,0xc3 - -.globl _aesni_ccm64_encrypt_blocks -.private_extern _aesni_ccm64_encrypt_blocks - -.p2align 4 -_aesni_ccm64_encrypt_blocks: - movl 240(%rcx),%eax - movdqu (%r8),%xmm6 - movdqa L$increment64(%rip),%xmm9 - movdqa L$bswap_mask(%rip),%xmm7 - - shll $4,%eax - movl $16,%r10d - leaq 0(%rcx),%r11 - movdqu (%r9),%xmm3 - movdqa %xmm6,%xmm2 - leaq 32(%rcx,%rax,1),%rcx -.byte 102,15,56,0,247 - subq %rax,%r10 - jmp L$ccm64_enc_outer -.p2align 4 -L$ccm64_enc_outer: - movups (%r11),%xmm0 - movq %r10,%rax - movups (%rdi),%xmm8 - - xorps %xmm0,%xmm2 - movups 16(%r11),%xmm1 - xorps %xmm8,%xmm0 - xorps %xmm0,%xmm3 - movups 32(%r11),%xmm0 - -L$ccm64_enc2_loop: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 - movups -16(%rcx,%rax,1),%xmm0 - jnz L$ccm64_enc2_loop -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - paddq %xmm9,%xmm6 - decq %rdx -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 - - leaq 16(%rdi),%rdi - xorps %xmm2,%xmm8 - movdqa %xmm6,%xmm2 - movups %xmm8,(%rsi) -.byte 102,15,56,0,215 - leaq 16(%rsi),%rsi - jnz L$ccm64_enc_outer - - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - movups %xmm3,(%r9) - pxor %xmm3,%xmm3 - pxor %xmm8,%xmm8 - pxor %xmm6,%xmm6 - .byte 0xf3,0xc3 - -.globl _aesni_ccm64_decrypt_blocks -.private_extern _aesni_ccm64_decrypt_blocks - -.p2align 4 -_aesni_ccm64_decrypt_blocks: - movl 240(%rcx),%eax - movups (%r8),%xmm6 - movdqu (%r9),%xmm3 - movdqa L$increment64(%rip),%xmm9 - movdqa L$bswap_mask(%rip),%xmm7 - - movaps %xmm6,%xmm2 - movl %eax,%r10d - movq %rcx,%r11 -.byte 102,15,56,0,247 - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -L$oop_enc1_5: -.byte 102,15,56,220,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz L$oop_enc1_5 -.byte 102,15,56,221,209 - shll $4,%r10d - movl $16,%eax - movups (%rdi),%xmm8 - paddq %xmm9,%xmm6 - leaq 16(%rdi),%rdi - subq %r10,%rax - leaq 32(%r11,%r10,1),%rcx - movq %rax,%r10 - jmp L$ccm64_dec_outer -.p2align 4 -L$ccm64_dec_outer: - xorps %xmm2,%xmm8 - movdqa %xmm6,%xmm2 - movups %xmm8,(%rsi) - leaq 16(%rsi),%rsi -.byte 102,15,56,0,215 - - subq $1,%rdx - jz L$ccm64_dec_break - - movups (%r11),%xmm0 - movq %r10,%rax - movups 16(%r11),%xmm1 - xorps %xmm0,%xmm8 - xorps %xmm0,%xmm2 - xorps %xmm8,%xmm3 - movups 32(%r11),%xmm0 - jmp L$ccm64_dec2_loop -.p2align 4 -L$ccm64_dec2_loop: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - movups (%rcx,%rax,1),%xmm1 - addq $32,%rax -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 - movups -16(%rcx,%rax,1),%xmm0 - jnz L$ccm64_dec2_loop - movups (%rdi),%xmm8 - paddq %xmm9,%xmm6 -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,221,208 -.byte 102,15,56,221,216 - leaq 16(%rdi),%rdi - jmp L$ccm64_dec_outer - -.p2align 4 -L$ccm64_dec_break: - - movl 240(%r11),%eax - movups (%r11),%xmm0 - movups 16(%r11),%xmm1 - xorps %xmm0,%xmm8 - leaq 32(%r11),%r11 - xorps %xmm8,%xmm3 -L$oop_enc1_6: -.byte 102,15,56,220,217 - decl %eax - movups (%r11),%xmm1 - leaq 16(%r11),%r11 - jnz L$oop_enc1_6 -.byte 102,15,56,221,217 - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - movups %xmm3,(%r9) - pxor %xmm3,%xmm3 - pxor %xmm8,%xmm8 - pxor %xmm6,%xmm6 - .byte 0xf3,0xc3 - -.globl _aesni_ctr32_encrypt_blocks -.private_extern _aesni_ctr32_encrypt_blocks - -.p2align 4 -_aesni_ctr32_encrypt_blocks: - cmpq $1,%rdx - jne L$ctr32_bulk - - - - movups (%r8),%xmm2 - movups (%rdi),%xmm3 - movl 240(%rcx),%edx - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -L$oop_enc1_7: -.byte 102,15,56,220,209 - decl %edx - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz L$oop_enc1_7 -.byte 102,15,56,221,209 - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - xorps %xmm3,%xmm2 - pxor %xmm3,%xmm3 - movups %xmm2,(%rsi) - xorps %xmm2,%xmm2 - jmp L$ctr32_epilogue - -.p2align 4 -L$ctr32_bulk: - leaq (%rsp),%rax - pushq %rbp - subq $128,%rsp - andq $-16,%rsp - leaq -8(%rax),%rbp - - - - - movdqu (%r8),%xmm2 - movdqu (%rcx),%xmm0 - movl 12(%r8),%r8d - pxor %xmm0,%xmm2 - movl 12(%rcx),%r11d - movdqa %xmm2,0(%rsp) - bswapl %r8d - movdqa %xmm2,%xmm3 - movdqa %xmm2,%xmm4 - movdqa %xmm2,%xmm5 - movdqa %xmm2,64(%rsp) - movdqa %xmm2,80(%rsp) - movdqa %xmm2,96(%rsp) - movq %rdx,%r10 - movdqa %xmm2,112(%rsp) - - leaq 1(%r8),%rax - leaq 2(%r8),%rdx - bswapl %eax - bswapl %edx - xorl %r11d,%eax - xorl %r11d,%edx -.byte 102,15,58,34,216,3 - leaq 3(%r8),%rax - movdqa %xmm3,16(%rsp) -.byte 102,15,58,34,226,3 - bswapl %eax - movq %r10,%rdx - leaq 4(%r8),%r10 - movdqa %xmm4,32(%rsp) - xorl %r11d,%eax - bswapl %r10d -.byte 102,15,58,34,232,3 - xorl %r11d,%r10d - movdqa %xmm5,48(%rsp) - leaq 5(%r8),%r9 - movl %r10d,64+12(%rsp) - bswapl %r9d - leaq 6(%r8),%r10 - movl 240(%rcx),%eax - xorl %r11d,%r9d - bswapl %r10d - movl %r9d,80+12(%rsp) - xorl %r11d,%r10d - leaq 7(%r8),%r9 - movl %r10d,96+12(%rsp) - bswapl %r9d - movl _OPENSSL_ia32cap_P+4(%rip),%r10d - xorl %r11d,%r9d - andl $71303168,%r10d - movl %r9d,112+12(%rsp) - - movups 16(%rcx),%xmm1 - - movdqa 64(%rsp),%xmm6 - movdqa 80(%rsp),%xmm7 - - cmpq $8,%rdx - jb L$ctr32_tail - - subq $6,%rdx - cmpl $4194304,%r10d - je L$ctr32_6x - - leaq 128(%rcx),%rcx - subq $2,%rdx - jmp L$ctr32_loop8 - -.p2align 4 -L$ctr32_6x: - shll $4,%eax - movl $48,%r10d - bswapl %r11d - leaq 32(%rcx,%rax,1),%rcx - subq %rax,%r10 - jmp L$ctr32_loop6 - -.p2align 4 -L$ctr32_loop6: - addl $6,%r8d - movups -48(%rcx,%r10,1),%xmm0 -.byte 102,15,56,220,209 - movl %r8d,%eax - xorl %r11d,%eax -.byte 102,15,56,220,217 -.byte 0x0f,0x38,0xf1,0x44,0x24,12 - leal 1(%r8),%eax -.byte 102,15,56,220,225 - xorl %r11d,%eax -.byte 0x0f,0x38,0xf1,0x44,0x24,28 -.byte 102,15,56,220,233 - leal 2(%r8),%eax - xorl %r11d,%eax -.byte 102,15,56,220,241 -.byte 0x0f,0x38,0xf1,0x44,0x24,44 - leal 3(%r8),%eax -.byte 102,15,56,220,249 - movups -32(%rcx,%r10,1),%xmm1 - xorl %r11d,%eax - -.byte 102,15,56,220,208 -.byte 0x0f,0x38,0xf1,0x44,0x24,60 - leal 4(%r8),%eax -.byte 102,15,56,220,216 - xorl %r11d,%eax -.byte 0x0f,0x38,0xf1,0x44,0x24,76 -.byte 102,15,56,220,224 - leal 5(%r8),%eax - xorl %r11d,%eax -.byte 102,15,56,220,232 -.byte 0x0f,0x38,0xf1,0x44,0x24,92 - movq %r10,%rax -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 - movups -16(%rcx,%r10,1),%xmm0 - - call L$enc_loop6 - - movdqu (%rdi),%xmm8 - movdqu 16(%rdi),%xmm9 - movdqu 32(%rdi),%xmm10 - movdqu 48(%rdi),%xmm11 - movdqu 64(%rdi),%xmm12 - movdqu 80(%rdi),%xmm13 - leaq 96(%rdi),%rdi - movups -64(%rcx,%r10,1),%xmm1 - pxor %xmm2,%xmm8 - movaps 0(%rsp),%xmm2 - pxor %xmm3,%xmm9 - movaps 16(%rsp),%xmm3 - pxor %xmm4,%xmm10 - movaps 32(%rsp),%xmm4 - pxor %xmm5,%xmm11 - movaps 48(%rsp),%xmm5 - pxor %xmm6,%xmm12 - movaps 64(%rsp),%xmm6 - pxor %xmm7,%xmm13 - movaps 80(%rsp),%xmm7 - movdqu %xmm8,(%rsi) - movdqu %xmm9,16(%rsi) - movdqu %xmm10,32(%rsi) - movdqu %xmm11,48(%rsi) - movdqu %xmm12,64(%rsi) - movdqu %xmm13,80(%rsi) - leaq 96(%rsi),%rsi - - subq $6,%rdx - jnc L$ctr32_loop6 - - addq $6,%rdx - jz L$ctr32_done - - leal -48(%r10),%eax - leaq -80(%rcx,%r10,1),%rcx - negl %eax - shrl $4,%eax - jmp L$ctr32_tail - -.p2align 5 -L$ctr32_loop8: - addl $8,%r8d - movdqa 96(%rsp),%xmm8 -.byte 102,15,56,220,209 - movl %r8d,%r9d - movdqa 112(%rsp),%xmm9 -.byte 102,15,56,220,217 - bswapl %r9d - movups 32-128(%rcx),%xmm0 -.byte 102,15,56,220,225 - xorl %r11d,%r9d - nop -.byte 102,15,56,220,233 - movl %r9d,0+12(%rsp) - leaq 1(%r8),%r9 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 -.byte 102,68,15,56,220,201 - movups 48-128(%rcx),%xmm1 - bswapl %r9d -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 - xorl %r11d,%r9d -.byte 0x66,0x90 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 - movl %r9d,16+12(%rsp) - leaq 2(%r8),%r9 -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 -.byte 102,68,15,56,220,192 -.byte 102,68,15,56,220,200 - movups 64-128(%rcx),%xmm0 - bswapl %r9d -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - xorl %r11d,%r9d -.byte 0x66,0x90 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 - movl %r9d,32+12(%rsp) - leaq 3(%r8),%r9 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 -.byte 102,68,15,56,220,201 - movups 80-128(%rcx),%xmm1 - bswapl %r9d -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 - xorl %r11d,%r9d -.byte 0x66,0x90 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 - movl %r9d,48+12(%rsp) - leaq 4(%r8),%r9 -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 -.byte 102,68,15,56,220,192 -.byte 102,68,15,56,220,200 - movups 96-128(%rcx),%xmm0 - bswapl %r9d -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - xorl %r11d,%r9d -.byte 0x66,0x90 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 - movl %r9d,64+12(%rsp) - leaq 5(%r8),%r9 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 -.byte 102,68,15,56,220,201 - movups 112-128(%rcx),%xmm1 - bswapl %r9d -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 - xorl %r11d,%r9d -.byte 0x66,0x90 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 - movl %r9d,80+12(%rsp) - leaq 6(%r8),%r9 -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 -.byte 102,68,15,56,220,192 -.byte 102,68,15,56,220,200 - movups 128-128(%rcx),%xmm0 - bswapl %r9d -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - xorl %r11d,%r9d -.byte 0x66,0x90 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 - movl %r9d,96+12(%rsp) - leaq 7(%r8),%r9 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 -.byte 102,68,15,56,220,201 - movups 144-128(%rcx),%xmm1 - bswapl %r9d -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 - xorl %r11d,%r9d - movdqu 0(%rdi),%xmm10 -.byte 102,15,56,220,232 - movl %r9d,112+12(%rsp) - cmpl $11,%eax -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 -.byte 102,68,15,56,220,192 -.byte 102,68,15,56,220,200 - movups 160-128(%rcx),%xmm0 - - jb L$ctr32_enc_done - -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 -.byte 102,68,15,56,220,201 - movups 176-128(%rcx),%xmm1 - -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 -.byte 102,68,15,56,220,192 -.byte 102,68,15,56,220,200 - movups 192-128(%rcx),%xmm0 - je L$ctr32_enc_done - -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 -.byte 102,68,15,56,220,201 - movups 208-128(%rcx),%xmm1 - -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 -.byte 102,68,15,56,220,192 -.byte 102,68,15,56,220,200 - movups 224-128(%rcx),%xmm0 - jmp L$ctr32_enc_done - -.p2align 4 -L$ctr32_enc_done: - movdqu 16(%rdi),%xmm11 - pxor %xmm0,%xmm10 - movdqu 32(%rdi),%xmm12 - pxor %xmm0,%xmm11 - movdqu 48(%rdi),%xmm13 - pxor %xmm0,%xmm12 - movdqu 64(%rdi),%xmm14 - pxor %xmm0,%xmm13 - movdqu 80(%rdi),%xmm15 - pxor %xmm0,%xmm14 - pxor %xmm0,%xmm15 -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 -.byte 102,68,15,56,220,201 - movdqu 96(%rdi),%xmm1 - leaq 128(%rdi),%rdi - -.byte 102,65,15,56,221,210 - pxor %xmm0,%xmm1 - movdqu 112-128(%rdi),%xmm10 -.byte 102,65,15,56,221,219 - pxor %xmm0,%xmm10 - movdqa 0(%rsp),%xmm11 -.byte 102,65,15,56,221,228 -.byte 102,65,15,56,221,237 - movdqa 16(%rsp),%xmm12 - movdqa 32(%rsp),%xmm13 -.byte 102,65,15,56,221,246 -.byte 102,65,15,56,221,255 - movdqa 48(%rsp),%xmm14 - movdqa 64(%rsp),%xmm15 -.byte 102,68,15,56,221,193 - movdqa 80(%rsp),%xmm0 - movups 16-128(%rcx),%xmm1 -.byte 102,69,15,56,221,202 - - movups %xmm2,(%rsi) - movdqa %xmm11,%xmm2 - movups %xmm3,16(%rsi) - movdqa %xmm12,%xmm3 - movups %xmm4,32(%rsi) - movdqa %xmm13,%xmm4 - movups %xmm5,48(%rsi) - movdqa %xmm14,%xmm5 - movups %xmm6,64(%rsi) - movdqa %xmm15,%xmm6 - movups %xmm7,80(%rsi) - movdqa %xmm0,%xmm7 - movups %xmm8,96(%rsi) - movups %xmm9,112(%rsi) - leaq 128(%rsi),%rsi - - subq $8,%rdx - jnc L$ctr32_loop8 - - addq $8,%rdx - jz L$ctr32_done - leaq -128(%rcx),%rcx - -L$ctr32_tail: - - - leaq 16(%rcx),%rcx - cmpq $4,%rdx - jb L$ctr32_loop3 - je L$ctr32_loop4 - - - shll $4,%eax - movdqa 96(%rsp),%xmm8 - pxor %xmm9,%xmm9 - - movups 16(%rcx),%xmm0 -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 - leaq 32-16(%rcx,%rax,1),%rcx - negq %rax -.byte 102,15,56,220,225 - addq $16,%rax - movups (%rdi),%xmm10 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 - movups 16(%rdi),%xmm11 - movups 32(%rdi),%xmm12 -.byte 102,15,56,220,249 -.byte 102,68,15,56,220,193 - - call L$enc_loop8_enter - - movdqu 48(%rdi),%xmm13 - pxor %xmm10,%xmm2 - movdqu 64(%rdi),%xmm10 - pxor %xmm11,%xmm3 - movdqu %xmm2,(%rsi) - pxor %xmm12,%xmm4 - movdqu %xmm3,16(%rsi) - pxor %xmm13,%xmm5 - movdqu %xmm4,32(%rsi) - pxor %xmm10,%xmm6 - movdqu %xmm5,48(%rsi) - movdqu %xmm6,64(%rsi) - cmpq $6,%rdx - jb L$ctr32_done - - movups 80(%rdi),%xmm11 - xorps %xmm11,%xmm7 - movups %xmm7,80(%rsi) - je L$ctr32_done - - movups 96(%rdi),%xmm12 - xorps %xmm12,%xmm8 - movups %xmm8,96(%rsi) - jmp L$ctr32_done - -.p2align 5 -L$ctr32_loop4: -.byte 102,15,56,220,209 - leaq 16(%rcx),%rcx - decl %eax -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 - movups (%rcx),%xmm1 - jnz L$ctr32_loop4 -.byte 102,15,56,221,209 -.byte 102,15,56,221,217 - movups (%rdi),%xmm10 - movups 16(%rdi),%xmm11 -.byte 102,15,56,221,225 -.byte 102,15,56,221,233 - movups 32(%rdi),%xmm12 - movups 48(%rdi),%xmm13 - - xorps %xmm10,%xmm2 - movups %xmm2,(%rsi) - xorps %xmm11,%xmm3 - movups %xmm3,16(%rsi) - pxor %xmm12,%xmm4 - movdqu %xmm4,32(%rsi) - pxor %xmm13,%xmm5 - movdqu %xmm5,48(%rsi) - jmp L$ctr32_done - -.p2align 5 -L$ctr32_loop3: -.byte 102,15,56,220,209 - leaq 16(%rcx),%rcx - decl %eax -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 - movups (%rcx),%xmm1 - jnz L$ctr32_loop3 -.byte 102,15,56,221,209 -.byte 102,15,56,221,217 -.byte 102,15,56,221,225 - - movups (%rdi),%xmm10 - xorps %xmm10,%xmm2 - movups %xmm2,(%rsi) - cmpq $2,%rdx - jb L$ctr32_done - - movups 16(%rdi),%xmm11 - xorps %xmm11,%xmm3 - movups %xmm3,16(%rsi) - je L$ctr32_done - - movups 32(%rdi),%xmm12 - xorps %xmm12,%xmm4 - movups %xmm4,32(%rsi) - -L$ctr32_done: - xorps %xmm0,%xmm0 - xorl %r11d,%r11d - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - movaps %xmm0,0(%rsp) - pxor %xmm8,%xmm8 - movaps %xmm0,16(%rsp) - pxor %xmm9,%xmm9 - movaps %xmm0,32(%rsp) - pxor %xmm10,%xmm10 - movaps %xmm0,48(%rsp) - pxor %xmm11,%xmm11 - movaps %xmm0,64(%rsp) - pxor %xmm12,%xmm12 - movaps %xmm0,80(%rsp) - pxor %xmm13,%xmm13 - movaps %xmm0,96(%rsp) - pxor %xmm14,%xmm14 - movaps %xmm0,112(%rsp) - pxor %xmm15,%xmm15 - leaq (%rbp),%rsp - popq %rbp -L$ctr32_epilogue: - .byte 0xf3,0xc3 - -.globl _aesni_xts_encrypt -.private_extern _aesni_xts_encrypt - -.p2align 4 -_aesni_xts_encrypt: - leaq (%rsp),%rax - pushq %rbp - subq $112,%rsp - andq $-16,%rsp - leaq -8(%rax),%rbp - movups (%r9),%xmm2 - movl 240(%r8),%eax - movl 240(%rcx),%r10d - movups (%r8),%xmm0 - movups 16(%r8),%xmm1 - leaq 32(%r8),%r8 - xorps %xmm0,%xmm2 -L$oop_enc1_8: -.byte 102,15,56,220,209 - decl %eax - movups (%r8),%xmm1 - leaq 16(%r8),%r8 - jnz L$oop_enc1_8 -.byte 102,15,56,221,209 - movups (%rcx),%xmm0 - movq %rcx,%r11 - movl %r10d,%eax - shll $4,%r10d - movq %rdx,%r9 - andq $-16,%rdx - - movups 16(%rcx,%r10,1),%xmm1 - - movdqa L$xts_magic(%rip),%xmm8 - movdqa %xmm2,%xmm15 - pshufd $95,%xmm2,%xmm9 - pxor %xmm0,%xmm1 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 - movdqa %xmm15,%xmm10 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 - pxor %xmm0,%xmm10 - pxor %xmm14,%xmm15 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 - movdqa %xmm15,%xmm11 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 - pxor %xmm0,%xmm11 - pxor %xmm14,%xmm15 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 - movdqa %xmm15,%xmm12 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 - pxor %xmm0,%xmm12 - pxor %xmm14,%xmm15 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 - movdqa %xmm15,%xmm13 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 - pxor %xmm0,%xmm13 - pxor %xmm14,%xmm15 - movdqa %xmm15,%xmm14 - psrad $31,%xmm9 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm9 - pxor %xmm0,%xmm14 - pxor %xmm9,%xmm15 - movaps %xmm1,96(%rsp) - - subq $96,%rdx - jc L$xts_enc_short - - movl $16+96,%eax - leaq 32(%r11,%r10,1),%rcx - subq %r10,%rax - movups 16(%r11),%xmm1 - movq %rax,%r10 - leaq L$xts_magic(%rip),%r8 - jmp L$xts_enc_grandloop - -.p2align 5 -L$xts_enc_grandloop: - movdqu 0(%rdi),%xmm2 - movdqa %xmm0,%xmm8 - movdqu 16(%rdi),%xmm3 - pxor %xmm10,%xmm2 - movdqu 32(%rdi),%xmm4 - pxor %xmm11,%xmm3 -.byte 102,15,56,220,209 - movdqu 48(%rdi),%xmm5 - pxor %xmm12,%xmm4 -.byte 102,15,56,220,217 - movdqu 64(%rdi),%xmm6 - pxor %xmm13,%xmm5 -.byte 102,15,56,220,225 - movdqu 80(%rdi),%xmm7 - pxor %xmm15,%xmm8 - movdqa 96(%rsp),%xmm9 - pxor %xmm14,%xmm6 -.byte 102,15,56,220,233 - movups 32(%r11),%xmm0 - leaq 96(%rdi),%rdi - pxor %xmm8,%xmm7 - - pxor %xmm9,%xmm10 -.byte 102,15,56,220,241 - pxor %xmm9,%xmm11 - movdqa %xmm10,0(%rsp) -.byte 102,15,56,220,249 - movups 48(%r11),%xmm1 - pxor %xmm9,%xmm12 - -.byte 102,15,56,220,208 - pxor %xmm9,%xmm13 - movdqa %xmm11,16(%rsp) -.byte 102,15,56,220,216 - pxor %xmm9,%xmm14 - movdqa %xmm12,32(%rsp) -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 - pxor %xmm9,%xmm8 - movdqa %xmm14,64(%rsp) -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 - movups 64(%r11),%xmm0 - movdqa %xmm8,80(%rsp) - pshufd $95,%xmm15,%xmm9 - jmp L$xts_enc_loop6 -.p2align 5 -L$xts_enc_loop6: -.byte 102,15,56,220,209 -.byte 102,15,56,220,217 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 - movups -64(%rcx,%rax,1),%xmm1 - addq $32,%rax - -.byte 102,15,56,220,208 -.byte 102,15,56,220,216 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 -.byte 102,15,56,220,240 -.byte 102,15,56,220,248 - movups -80(%rcx,%rax,1),%xmm0 - jnz L$xts_enc_loop6 - - movdqa (%r8),%xmm8 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 -.byte 102,15,56,220,209 - paddq %xmm15,%xmm15 - psrad $31,%xmm14 -.byte 102,15,56,220,217 - pand %xmm8,%xmm14 - movups (%r11),%xmm10 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 -.byte 102,15,56,220,241 - pxor %xmm14,%xmm15 - movaps %xmm10,%xmm11 -.byte 102,15,56,220,249 - movups -64(%rcx),%xmm1 - - movdqa %xmm9,%xmm14 -.byte 102,15,56,220,208 - paddd %xmm9,%xmm9 - pxor %xmm15,%xmm10 -.byte 102,15,56,220,216 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 - pand %xmm8,%xmm14 - movaps %xmm11,%xmm12 -.byte 102,15,56,220,240 - pxor %xmm14,%xmm15 - movdqa %xmm9,%xmm14 -.byte 102,15,56,220,248 - movups -48(%rcx),%xmm0 - - paddd %xmm9,%xmm9 -.byte 102,15,56,220,209 - pxor %xmm15,%xmm11 - psrad $31,%xmm14 -.byte 102,15,56,220,217 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 - movdqa %xmm13,48(%rsp) - pxor %xmm14,%xmm15 -.byte 102,15,56,220,241 - movaps %xmm12,%xmm13 - movdqa %xmm9,%xmm14 -.byte 102,15,56,220,249 - movups -32(%rcx),%xmm1 - - paddd %xmm9,%xmm9 -.byte 102,15,56,220,208 - pxor %xmm15,%xmm12 - psrad $31,%xmm14 -.byte 102,15,56,220,216 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 -.byte 102,15,56,220,224 -.byte 102,15,56,220,232 -.byte 102,15,56,220,240 - pxor %xmm14,%xmm15 - movaps %xmm13,%xmm14 -.byte 102,15,56,220,248 - - movdqa %xmm9,%xmm0 - paddd %xmm9,%xmm9 -.byte 102,15,56,220,209 - pxor %xmm15,%xmm13 - psrad $31,%xmm0 -.byte 102,15,56,220,217 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm0 -.byte 102,15,56,220,225 -.byte 102,15,56,220,233 - pxor %xmm0,%xmm15 - movups (%r11),%xmm0 -.byte 102,15,56,220,241 -.byte 102,15,56,220,249 - movups 16(%r11),%xmm1 - - pxor %xmm15,%xmm14 -.byte 102,15,56,221,84,36,0 - psrad $31,%xmm9 - paddq %xmm15,%xmm15 -.byte 102,15,56,221,92,36,16 -.byte 102,15,56,221,100,36,32 - pand %xmm8,%xmm9 - movq %r10,%rax -.byte 102,15,56,221,108,36,48 -.byte 102,15,56,221,116,36,64 -.byte 102,15,56,221,124,36,80 - pxor %xmm9,%xmm15 - - leaq 96(%rsi),%rsi - movups %xmm2,-96(%rsi) - movups %xmm3,-80(%rsi) - movups %xmm4,-64(%rsi) - movups %xmm5,-48(%rsi) - movups %xmm6,-32(%rsi) - movups %xmm7,-16(%rsi) - subq $96,%rdx - jnc L$xts_enc_grandloop - - movl $16+96,%eax - subl %r10d,%eax - movq %r11,%rcx - shrl $4,%eax - -L$xts_enc_short: - - movl %eax,%r10d - pxor %xmm0,%xmm10 - addq $96,%rdx - jz L$xts_enc_done - - pxor %xmm0,%xmm11 - cmpq $32,%rdx - jb L$xts_enc_one - pxor %xmm0,%xmm12 - je L$xts_enc_two - - pxor %xmm0,%xmm13 - cmpq $64,%rdx - jb L$xts_enc_three - pxor %xmm0,%xmm14 - je L$xts_enc_four - - movdqu (%rdi),%xmm2 - movdqu 16(%rdi),%xmm3 - movdqu 32(%rdi),%xmm4 - pxor %xmm10,%xmm2 - movdqu 48(%rdi),%xmm5 - pxor %xmm11,%xmm3 - movdqu 64(%rdi),%xmm6 - leaq 80(%rdi),%rdi - pxor %xmm12,%xmm4 - pxor %xmm13,%xmm5 - pxor %xmm14,%xmm6 - pxor %xmm7,%xmm7 - - call _aesni_encrypt6 - - xorps %xmm10,%xmm2 - movdqa %xmm15,%xmm10 - xorps %xmm11,%xmm3 - xorps %xmm12,%xmm4 - movdqu %xmm2,(%rsi) - xorps %xmm13,%xmm5 - movdqu %xmm3,16(%rsi) - xorps %xmm14,%xmm6 - movdqu %xmm4,32(%rsi) - movdqu %xmm5,48(%rsi) - movdqu %xmm6,64(%rsi) - leaq 80(%rsi),%rsi - jmp L$xts_enc_done - -.p2align 4 -L$xts_enc_one: - movups (%rdi),%xmm2 - leaq 16(%rdi),%rdi - xorps %xmm10,%xmm2 - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -L$oop_enc1_9: -.byte 102,15,56,220,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz L$oop_enc1_9 -.byte 102,15,56,221,209 - xorps %xmm10,%xmm2 - movdqa %xmm11,%xmm10 - movups %xmm2,(%rsi) - leaq 16(%rsi),%rsi - jmp L$xts_enc_done - -.p2align 4 -L$xts_enc_two: - movups (%rdi),%xmm2 - movups 16(%rdi),%xmm3 - leaq 32(%rdi),%rdi - xorps %xmm10,%xmm2 - xorps %xmm11,%xmm3 - - call _aesni_encrypt2 - - xorps %xmm10,%xmm2 - movdqa %xmm12,%xmm10 - xorps %xmm11,%xmm3 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - leaq 32(%rsi),%rsi - jmp L$xts_enc_done - -.p2align 4 -L$xts_enc_three: - movups (%rdi),%xmm2 - movups 16(%rdi),%xmm3 - movups 32(%rdi),%xmm4 - leaq 48(%rdi),%rdi - xorps %xmm10,%xmm2 - xorps %xmm11,%xmm3 - xorps %xmm12,%xmm4 - - call _aesni_encrypt3 - - xorps %xmm10,%xmm2 - movdqa %xmm13,%xmm10 - xorps %xmm11,%xmm3 - xorps %xmm12,%xmm4 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - movups %xmm4,32(%rsi) - leaq 48(%rsi),%rsi - jmp L$xts_enc_done - -.p2align 4 -L$xts_enc_four: - movups (%rdi),%xmm2 - movups 16(%rdi),%xmm3 - movups 32(%rdi),%xmm4 - xorps %xmm10,%xmm2 - movups 48(%rdi),%xmm5 - leaq 64(%rdi),%rdi - xorps %xmm11,%xmm3 - xorps %xmm12,%xmm4 - xorps %xmm13,%xmm5 - - call _aesni_encrypt4 - - pxor %xmm10,%xmm2 - movdqa %xmm14,%xmm10 - pxor %xmm11,%xmm3 - pxor %xmm12,%xmm4 - movdqu %xmm2,(%rsi) - pxor %xmm13,%xmm5 - movdqu %xmm3,16(%rsi) - movdqu %xmm4,32(%rsi) - movdqu %xmm5,48(%rsi) - leaq 64(%rsi),%rsi - jmp L$xts_enc_done - -.p2align 4 -L$xts_enc_done: - andq $15,%r9 - jz L$xts_enc_ret - movq %r9,%rdx - -L$xts_enc_steal: - movzbl (%rdi),%eax - movzbl -16(%rsi),%ecx - leaq 1(%rdi),%rdi - movb %al,-16(%rsi) - movb %cl,0(%rsi) - leaq 1(%rsi),%rsi - subq $1,%rdx - jnz L$xts_enc_steal - - subq %r9,%rsi - movq %r11,%rcx - movl %r10d,%eax - - movups -16(%rsi),%xmm2 - xorps %xmm10,%xmm2 - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -L$oop_enc1_10: -.byte 102,15,56,220,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz L$oop_enc1_10 -.byte 102,15,56,221,209 - xorps %xmm10,%xmm2 - movups %xmm2,-16(%rsi) - -L$xts_enc_ret: - xorps %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - movaps %xmm0,0(%rsp) - pxor %xmm8,%xmm8 - movaps %xmm0,16(%rsp) - pxor %xmm9,%xmm9 - movaps %xmm0,32(%rsp) - pxor %xmm10,%xmm10 - movaps %xmm0,48(%rsp) - pxor %xmm11,%xmm11 - movaps %xmm0,64(%rsp) - pxor %xmm12,%xmm12 - movaps %xmm0,80(%rsp) - pxor %xmm13,%xmm13 - movaps %xmm0,96(%rsp) - pxor %xmm14,%xmm14 - pxor %xmm15,%xmm15 - leaq (%rbp),%rsp - popq %rbp -L$xts_enc_epilogue: - .byte 0xf3,0xc3 - -.globl _aesni_xts_decrypt -.private_extern _aesni_xts_decrypt - -.p2align 4 -_aesni_xts_decrypt: - leaq (%rsp),%rax - pushq %rbp - subq $112,%rsp - andq $-16,%rsp - leaq -8(%rax),%rbp - movups (%r9),%xmm2 - movl 240(%r8),%eax - movl 240(%rcx),%r10d - movups (%r8),%xmm0 - movups 16(%r8),%xmm1 - leaq 32(%r8),%r8 - xorps %xmm0,%xmm2 -L$oop_enc1_11: -.byte 102,15,56,220,209 - decl %eax - movups (%r8),%xmm1 - leaq 16(%r8),%r8 - jnz L$oop_enc1_11 -.byte 102,15,56,221,209 - xorl %eax,%eax - testq $15,%rdx - setnz %al - shlq $4,%rax - subq %rax,%rdx - - movups (%rcx),%xmm0 - movq %rcx,%r11 - movl %r10d,%eax - shll $4,%r10d - movq %rdx,%r9 - andq $-16,%rdx - - movups 16(%rcx,%r10,1),%xmm1 - - movdqa L$xts_magic(%rip),%xmm8 - movdqa %xmm2,%xmm15 - pshufd $95,%xmm2,%xmm9 - pxor %xmm0,%xmm1 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 - movdqa %xmm15,%xmm10 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 - pxor %xmm0,%xmm10 - pxor %xmm14,%xmm15 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 - movdqa %xmm15,%xmm11 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 - pxor %xmm0,%xmm11 - pxor %xmm14,%xmm15 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 - movdqa %xmm15,%xmm12 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 - pxor %xmm0,%xmm12 - pxor %xmm14,%xmm15 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 - movdqa %xmm15,%xmm13 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 - pxor %xmm0,%xmm13 - pxor %xmm14,%xmm15 - movdqa %xmm15,%xmm14 - psrad $31,%xmm9 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm9 - pxor %xmm0,%xmm14 - pxor %xmm9,%xmm15 - movaps %xmm1,96(%rsp) - - subq $96,%rdx - jc L$xts_dec_short - - movl $16+96,%eax - leaq 32(%r11,%r10,1),%rcx - subq %r10,%rax - movups 16(%r11),%xmm1 - movq %rax,%r10 - leaq L$xts_magic(%rip),%r8 - jmp L$xts_dec_grandloop - -.p2align 5 -L$xts_dec_grandloop: - movdqu 0(%rdi),%xmm2 - movdqa %xmm0,%xmm8 - movdqu 16(%rdi),%xmm3 - pxor %xmm10,%xmm2 - movdqu 32(%rdi),%xmm4 - pxor %xmm11,%xmm3 -.byte 102,15,56,222,209 - movdqu 48(%rdi),%xmm5 - pxor %xmm12,%xmm4 -.byte 102,15,56,222,217 - movdqu 64(%rdi),%xmm6 - pxor %xmm13,%xmm5 -.byte 102,15,56,222,225 - movdqu 80(%rdi),%xmm7 - pxor %xmm15,%xmm8 - movdqa 96(%rsp),%xmm9 - pxor %xmm14,%xmm6 -.byte 102,15,56,222,233 - movups 32(%r11),%xmm0 - leaq 96(%rdi),%rdi - pxor %xmm8,%xmm7 - - pxor %xmm9,%xmm10 -.byte 102,15,56,222,241 - pxor %xmm9,%xmm11 - movdqa %xmm10,0(%rsp) -.byte 102,15,56,222,249 - movups 48(%r11),%xmm1 - pxor %xmm9,%xmm12 - -.byte 102,15,56,222,208 - pxor %xmm9,%xmm13 - movdqa %xmm11,16(%rsp) -.byte 102,15,56,222,216 - pxor %xmm9,%xmm14 - movdqa %xmm12,32(%rsp) -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 - pxor %xmm9,%xmm8 - movdqa %xmm14,64(%rsp) -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 - movups 64(%r11),%xmm0 - movdqa %xmm8,80(%rsp) - pshufd $95,%xmm15,%xmm9 - jmp L$xts_dec_loop6 -.p2align 5 -L$xts_dec_loop6: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 - movups -64(%rcx,%rax,1),%xmm1 - addq $32,%rax - -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 - movups -80(%rcx,%rax,1),%xmm0 - jnz L$xts_dec_loop6 - - movdqa (%r8),%xmm8 - movdqa %xmm9,%xmm14 - paddd %xmm9,%xmm9 -.byte 102,15,56,222,209 - paddq %xmm15,%xmm15 - psrad $31,%xmm14 -.byte 102,15,56,222,217 - pand %xmm8,%xmm14 - movups (%r11),%xmm10 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 - pxor %xmm14,%xmm15 - movaps %xmm10,%xmm11 -.byte 102,15,56,222,249 - movups -64(%rcx),%xmm1 - - movdqa %xmm9,%xmm14 -.byte 102,15,56,222,208 - paddd %xmm9,%xmm9 - pxor %xmm15,%xmm10 -.byte 102,15,56,222,216 - psrad $31,%xmm14 - paddq %xmm15,%xmm15 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 - pand %xmm8,%xmm14 - movaps %xmm11,%xmm12 -.byte 102,15,56,222,240 - pxor %xmm14,%xmm15 - movdqa %xmm9,%xmm14 -.byte 102,15,56,222,248 - movups -48(%rcx),%xmm0 - - paddd %xmm9,%xmm9 -.byte 102,15,56,222,209 - pxor %xmm15,%xmm11 - psrad $31,%xmm14 -.byte 102,15,56,222,217 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 - movdqa %xmm13,48(%rsp) - pxor %xmm14,%xmm15 -.byte 102,15,56,222,241 - movaps %xmm12,%xmm13 - movdqa %xmm9,%xmm14 -.byte 102,15,56,222,249 - movups -32(%rcx),%xmm1 - - paddd %xmm9,%xmm9 -.byte 102,15,56,222,208 - pxor %xmm15,%xmm12 - psrad $31,%xmm14 -.byte 102,15,56,222,216 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm14 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 - pxor %xmm14,%xmm15 - movaps %xmm13,%xmm14 -.byte 102,15,56,222,248 - - movdqa %xmm9,%xmm0 - paddd %xmm9,%xmm9 -.byte 102,15,56,222,209 - pxor %xmm15,%xmm13 - psrad $31,%xmm0 -.byte 102,15,56,222,217 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm0 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 - pxor %xmm0,%xmm15 - movups (%r11),%xmm0 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 - movups 16(%r11),%xmm1 - - pxor %xmm15,%xmm14 -.byte 102,15,56,223,84,36,0 - psrad $31,%xmm9 - paddq %xmm15,%xmm15 -.byte 102,15,56,223,92,36,16 -.byte 102,15,56,223,100,36,32 - pand %xmm8,%xmm9 - movq %r10,%rax -.byte 102,15,56,223,108,36,48 -.byte 102,15,56,223,116,36,64 -.byte 102,15,56,223,124,36,80 - pxor %xmm9,%xmm15 - - leaq 96(%rsi),%rsi - movups %xmm2,-96(%rsi) - movups %xmm3,-80(%rsi) - movups %xmm4,-64(%rsi) - movups %xmm5,-48(%rsi) - movups %xmm6,-32(%rsi) - movups %xmm7,-16(%rsi) - subq $96,%rdx - jnc L$xts_dec_grandloop - - movl $16+96,%eax - subl %r10d,%eax - movq %r11,%rcx - shrl $4,%eax - -L$xts_dec_short: - - movl %eax,%r10d - pxor %xmm0,%xmm10 - pxor %xmm0,%xmm11 - addq $96,%rdx - jz L$xts_dec_done - - pxor %xmm0,%xmm12 - cmpq $32,%rdx - jb L$xts_dec_one - pxor %xmm0,%xmm13 - je L$xts_dec_two - - pxor %xmm0,%xmm14 - cmpq $64,%rdx - jb L$xts_dec_three - je L$xts_dec_four - - movdqu (%rdi),%xmm2 - movdqu 16(%rdi),%xmm3 - movdqu 32(%rdi),%xmm4 - pxor %xmm10,%xmm2 - movdqu 48(%rdi),%xmm5 - pxor %xmm11,%xmm3 - movdqu 64(%rdi),%xmm6 - leaq 80(%rdi),%rdi - pxor %xmm12,%xmm4 - pxor %xmm13,%xmm5 - pxor %xmm14,%xmm6 - - call _aesni_decrypt6 - - xorps %xmm10,%xmm2 - xorps %xmm11,%xmm3 - xorps %xmm12,%xmm4 - movdqu %xmm2,(%rsi) - xorps %xmm13,%xmm5 - movdqu %xmm3,16(%rsi) - xorps %xmm14,%xmm6 - movdqu %xmm4,32(%rsi) - pxor %xmm14,%xmm14 - movdqu %xmm5,48(%rsi) - pcmpgtd %xmm15,%xmm14 - movdqu %xmm6,64(%rsi) - leaq 80(%rsi),%rsi - pshufd $19,%xmm14,%xmm11 - andq $15,%r9 - jz L$xts_dec_ret - - movdqa %xmm15,%xmm10 - paddq %xmm15,%xmm15 - pand %xmm8,%xmm11 - pxor %xmm15,%xmm11 - jmp L$xts_dec_done2 - -.p2align 4 -L$xts_dec_one: - movups (%rdi),%xmm2 - leaq 16(%rdi),%rdi - xorps %xmm10,%xmm2 - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -L$oop_dec1_12: -.byte 102,15,56,222,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz L$oop_dec1_12 -.byte 102,15,56,223,209 - xorps %xmm10,%xmm2 - movdqa %xmm11,%xmm10 - movups %xmm2,(%rsi) - movdqa %xmm12,%xmm11 - leaq 16(%rsi),%rsi - jmp L$xts_dec_done - -.p2align 4 -L$xts_dec_two: - movups (%rdi),%xmm2 - movups 16(%rdi),%xmm3 - leaq 32(%rdi),%rdi - xorps %xmm10,%xmm2 - xorps %xmm11,%xmm3 - - call _aesni_decrypt2 - - xorps %xmm10,%xmm2 - movdqa %xmm12,%xmm10 - xorps %xmm11,%xmm3 - movdqa %xmm13,%xmm11 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - leaq 32(%rsi),%rsi - jmp L$xts_dec_done - -.p2align 4 -L$xts_dec_three: - movups (%rdi),%xmm2 - movups 16(%rdi),%xmm3 - movups 32(%rdi),%xmm4 - leaq 48(%rdi),%rdi - xorps %xmm10,%xmm2 - xorps %xmm11,%xmm3 - xorps %xmm12,%xmm4 - - call _aesni_decrypt3 - - xorps %xmm10,%xmm2 - movdqa %xmm13,%xmm10 - xorps %xmm11,%xmm3 - movdqa %xmm14,%xmm11 - xorps %xmm12,%xmm4 - movups %xmm2,(%rsi) - movups %xmm3,16(%rsi) - movups %xmm4,32(%rsi) - leaq 48(%rsi),%rsi - jmp L$xts_dec_done - -.p2align 4 -L$xts_dec_four: - movups (%rdi),%xmm2 - movups 16(%rdi),%xmm3 - movups 32(%rdi),%xmm4 - xorps %xmm10,%xmm2 - movups 48(%rdi),%xmm5 - leaq 64(%rdi),%rdi - xorps %xmm11,%xmm3 - xorps %xmm12,%xmm4 - xorps %xmm13,%xmm5 - - call _aesni_decrypt4 - - pxor %xmm10,%xmm2 - movdqa %xmm14,%xmm10 - pxor %xmm11,%xmm3 - movdqa %xmm15,%xmm11 - pxor %xmm12,%xmm4 - movdqu %xmm2,(%rsi) - pxor %xmm13,%xmm5 - movdqu %xmm3,16(%rsi) - movdqu %xmm4,32(%rsi) - movdqu %xmm5,48(%rsi) - leaq 64(%rsi),%rsi - jmp L$xts_dec_done - -.p2align 4 -L$xts_dec_done: - andq $15,%r9 - jz L$xts_dec_ret -L$xts_dec_done2: - movq %r9,%rdx - movq %r11,%rcx - movl %r10d,%eax - - movups (%rdi),%xmm2 - xorps %xmm11,%xmm2 - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -L$oop_dec1_13: -.byte 102,15,56,222,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz L$oop_dec1_13 -.byte 102,15,56,223,209 - xorps %xmm11,%xmm2 - movups %xmm2,(%rsi) - -L$xts_dec_steal: - movzbl 16(%rdi),%eax - movzbl (%rsi),%ecx - leaq 1(%rdi),%rdi - movb %al,(%rsi) - movb %cl,16(%rsi) - leaq 1(%rsi),%rsi - subq $1,%rdx - jnz L$xts_dec_steal - - subq %r9,%rsi - movq %r11,%rcx - movl %r10d,%eax - - movups (%rsi),%xmm2 - xorps %xmm10,%xmm2 - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -L$oop_dec1_14: -.byte 102,15,56,222,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz L$oop_dec1_14 -.byte 102,15,56,223,209 - xorps %xmm10,%xmm2 - movups %xmm2,(%rsi) - -L$xts_dec_ret: - xorps %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - movaps %xmm0,0(%rsp) - pxor %xmm8,%xmm8 - movaps %xmm0,16(%rsp) - pxor %xmm9,%xmm9 - movaps %xmm0,32(%rsp) - pxor %xmm10,%xmm10 - movaps %xmm0,48(%rsp) - pxor %xmm11,%xmm11 - movaps %xmm0,64(%rsp) - pxor %xmm12,%xmm12 - movaps %xmm0,80(%rsp) - pxor %xmm13,%xmm13 - movaps %xmm0,96(%rsp) - pxor %xmm14,%xmm14 - pxor %xmm15,%xmm15 - leaq (%rbp),%rsp - popq %rbp -L$xts_dec_epilogue: - .byte 0xf3,0xc3 - -.globl _aesni_cbc_encrypt -.private_extern _aesni_cbc_encrypt - -.p2align 4 -_aesni_cbc_encrypt: - testq %rdx,%rdx - jz L$cbc_ret - - movl 240(%rcx),%r10d - movq %rcx,%r11 - testl %r9d,%r9d - jz L$cbc_decrypt - - movups (%r8),%xmm2 - movl %r10d,%eax - cmpq $16,%rdx - jb L$cbc_enc_tail - subq $16,%rdx - jmp L$cbc_enc_loop -.p2align 4 -L$cbc_enc_loop: - movups (%rdi),%xmm3 - leaq 16(%rdi),%rdi - - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - xorps %xmm0,%xmm3 - leaq 32(%rcx),%rcx - xorps %xmm3,%xmm2 -L$oop_enc1_15: -.byte 102,15,56,220,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz L$oop_enc1_15 -.byte 102,15,56,221,209 - movl %r10d,%eax - movq %r11,%rcx - movups %xmm2,0(%rsi) - leaq 16(%rsi),%rsi - subq $16,%rdx - jnc L$cbc_enc_loop - addq $16,%rdx - jnz L$cbc_enc_tail - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - movups %xmm2,(%r8) - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - jmp L$cbc_ret - -L$cbc_enc_tail: - movq %rdx,%rcx - xchgq %rdi,%rsi -.long 0x9066A4F3 - movl $16,%ecx - subq %rdx,%rcx - xorl %eax,%eax -.long 0x9066AAF3 - leaq -16(%rdi),%rdi - movl %r10d,%eax - movq %rdi,%rsi - movq %r11,%rcx - xorq %rdx,%rdx - jmp L$cbc_enc_loop - -.p2align 4 -L$cbc_decrypt: - cmpq $16,%rdx - jne L$cbc_decrypt_bulk - - - - movdqu (%rdi),%xmm2 - movdqu (%r8),%xmm3 - movdqa %xmm2,%xmm4 - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -L$oop_dec1_16: -.byte 102,15,56,222,209 - decl %r10d - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz L$oop_dec1_16 -.byte 102,15,56,223,209 - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - movdqu %xmm4,(%r8) - xorps %xmm3,%xmm2 - pxor %xmm3,%xmm3 - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - jmp L$cbc_ret -.p2align 4 -L$cbc_decrypt_bulk: - leaq (%rsp),%rax - pushq %rbp - subq $16,%rsp - andq $-16,%rsp - leaq -8(%rax),%rbp - movups (%r8),%xmm10 - movl %r10d,%eax - cmpq $80,%rdx - jbe L$cbc_dec_tail - - movups (%rcx),%xmm0 - movdqu 0(%rdi),%xmm2 - movdqu 16(%rdi),%xmm3 - movdqa %xmm2,%xmm11 - movdqu 32(%rdi),%xmm4 - movdqa %xmm3,%xmm12 - movdqu 48(%rdi),%xmm5 - movdqa %xmm4,%xmm13 - movdqu 64(%rdi),%xmm6 - movdqa %xmm5,%xmm14 - movdqu 80(%rdi),%xmm7 - movdqa %xmm6,%xmm15 - movl _OPENSSL_ia32cap_P+4(%rip),%r9d - cmpq $112,%rdx - jbe L$cbc_dec_six_or_seven - - andl $71303168,%r9d - subq $80,%rdx - cmpl $4194304,%r9d - je L$cbc_dec_loop6_enter - subq $32,%rdx - leaq 112(%rcx),%rcx - jmp L$cbc_dec_loop8_enter -.p2align 4 -L$cbc_dec_loop8: - movups %xmm9,(%rsi) - leaq 16(%rsi),%rsi -L$cbc_dec_loop8_enter: - movdqu 96(%rdi),%xmm8 - pxor %xmm0,%xmm2 - movdqu 112(%rdi),%xmm9 - pxor %xmm0,%xmm3 - movups 16-112(%rcx),%xmm1 - pxor %xmm0,%xmm4 - xorq %r11,%r11 - cmpq $112,%rdx - pxor %xmm0,%xmm5 - pxor %xmm0,%xmm6 - pxor %xmm0,%xmm7 - pxor %xmm0,%xmm8 - -.byte 102,15,56,222,209 - pxor %xmm0,%xmm9 - movups 32-112(%rcx),%xmm0 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,68,15,56,222,193 - setnc %r11b - shlq $7,%r11 -.byte 102,68,15,56,222,201 - addq %rdi,%r11 - movups 48-112(%rcx),%xmm1 -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 -.byte 102,68,15,56,222,192 -.byte 102,68,15,56,222,200 - movups 64-112(%rcx),%xmm0 - nop -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,68,15,56,222,193 -.byte 102,68,15,56,222,201 - movups 80-112(%rcx),%xmm1 - nop -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 -.byte 102,68,15,56,222,192 -.byte 102,68,15,56,222,200 - movups 96-112(%rcx),%xmm0 - nop -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,68,15,56,222,193 -.byte 102,68,15,56,222,201 - movups 112-112(%rcx),%xmm1 - nop -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 -.byte 102,68,15,56,222,192 -.byte 102,68,15,56,222,200 - movups 128-112(%rcx),%xmm0 - nop -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,68,15,56,222,193 -.byte 102,68,15,56,222,201 - movups 144-112(%rcx),%xmm1 - cmpl $11,%eax -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 -.byte 102,68,15,56,222,192 -.byte 102,68,15,56,222,200 - movups 160-112(%rcx),%xmm0 - jb L$cbc_dec_done -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,68,15,56,222,193 -.byte 102,68,15,56,222,201 - movups 176-112(%rcx),%xmm1 - nop -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 -.byte 102,68,15,56,222,192 -.byte 102,68,15,56,222,200 - movups 192-112(%rcx),%xmm0 - je L$cbc_dec_done -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 -.byte 102,68,15,56,222,193 -.byte 102,68,15,56,222,201 - movups 208-112(%rcx),%xmm1 - nop -.byte 102,15,56,222,208 -.byte 102,15,56,222,216 -.byte 102,15,56,222,224 -.byte 102,15,56,222,232 -.byte 102,15,56,222,240 -.byte 102,15,56,222,248 -.byte 102,68,15,56,222,192 -.byte 102,68,15,56,222,200 - movups 224-112(%rcx),%xmm0 - jmp L$cbc_dec_done -.p2align 4 -L$cbc_dec_done: -.byte 102,15,56,222,209 -.byte 102,15,56,222,217 - pxor %xmm0,%xmm10 - pxor %xmm0,%xmm11 -.byte 102,15,56,222,225 -.byte 102,15,56,222,233 - pxor %xmm0,%xmm12 - pxor %xmm0,%xmm13 -.byte 102,15,56,222,241 -.byte 102,15,56,222,249 - pxor %xmm0,%xmm14 - pxor %xmm0,%xmm15 -.byte 102,68,15,56,222,193 -.byte 102,68,15,56,222,201 - movdqu 80(%rdi),%xmm1 - -.byte 102,65,15,56,223,210 - movdqu 96(%rdi),%xmm10 - pxor %xmm0,%xmm1 -.byte 102,65,15,56,223,219 - pxor %xmm0,%xmm10 - movdqu 112(%rdi),%xmm0 -.byte 102,65,15,56,223,228 - leaq 128(%rdi),%rdi - movdqu 0(%r11),%xmm11 -.byte 102,65,15,56,223,237 -.byte 102,65,15,56,223,246 - movdqu 16(%r11),%xmm12 - movdqu 32(%r11),%xmm13 -.byte 102,65,15,56,223,255 -.byte 102,68,15,56,223,193 - movdqu 48(%r11),%xmm14 - movdqu 64(%r11),%xmm15 -.byte 102,69,15,56,223,202 - movdqa %xmm0,%xmm10 - movdqu 80(%r11),%xmm1 - movups -112(%rcx),%xmm0 - - movups %xmm2,(%rsi) - movdqa %xmm11,%xmm2 - movups %xmm3,16(%rsi) - movdqa %xmm12,%xmm3 - movups %xmm4,32(%rsi) - movdqa %xmm13,%xmm4 - movups %xmm5,48(%rsi) - movdqa %xmm14,%xmm5 - movups %xmm6,64(%rsi) - movdqa %xmm15,%xmm6 - movups %xmm7,80(%rsi) - movdqa %xmm1,%xmm7 - movups %xmm8,96(%rsi) - leaq 112(%rsi),%rsi - - subq $128,%rdx - ja L$cbc_dec_loop8 - - movaps %xmm9,%xmm2 - leaq -112(%rcx),%rcx - addq $112,%rdx - jle L$cbc_dec_clear_tail_collected - movups %xmm9,(%rsi) - leaq 16(%rsi),%rsi - cmpq $80,%rdx - jbe L$cbc_dec_tail - - movaps %xmm11,%xmm2 -L$cbc_dec_six_or_seven: - cmpq $96,%rdx - ja L$cbc_dec_seven - - movaps %xmm7,%xmm8 - call _aesni_decrypt6 - pxor %xmm10,%xmm2 - movaps %xmm8,%xmm10 - pxor %xmm11,%xmm3 - movdqu %xmm2,(%rsi) - pxor %xmm12,%xmm4 - movdqu %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - pxor %xmm13,%xmm5 - movdqu %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - pxor %xmm14,%xmm6 - movdqu %xmm5,48(%rsi) - pxor %xmm5,%xmm5 - pxor %xmm15,%xmm7 - movdqu %xmm6,64(%rsi) - pxor %xmm6,%xmm6 - leaq 80(%rsi),%rsi - movdqa %xmm7,%xmm2 - pxor %xmm7,%xmm7 - jmp L$cbc_dec_tail_collected - -.p2align 4 -L$cbc_dec_seven: - movups 96(%rdi),%xmm8 - xorps %xmm9,%xmm9 - call _aesni_decrypt8 - movups 80(%rdi),%xmm9 - pxor %xmm10,%xmm2 - movups 96(%rdi),%xmm10 - pxor %xmm11,%xmm3 - movdqu %xmm2,(%rsi) - pxor %xmm12,%xmm4 - movdqu %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - pxor %xmm13,%xmm5 - movdqu %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - pxor %xmm14,%xmm6 - movdqu %xmm5,48(%rsi) - pxor %xmm5,%xmm5 - pxor %xmm15,%xmm7 - movdqu %xmm6,64(%rsi) - pxor %xmm6,%xmm6 - pxor %xmm9,%xmm8 - movdqu %xmm7,80(%rsi) - pxor %xmm7,%xmm7 - leaq 96(%rsi),%rsi - movdqa %xmm8,%xmm2 - pxor %xmm8,%xmm8 - pxor %xmm9,%xmm9 - jmp L$cbc_dec_tail_collected - -.p2align 4 -L$cbc_dec_loop6: - movups %xmm7,(%rsi) - leaq 16(%rsi),%rsi - movdqu 0(%rdi),%xmm2 - movdqu 16(%rdi),%xmm3 - movdqa %xmm2,%xmm11 - movdqu 32(%rdi),%xmm4 - movdqa %xmm3,%xmm12 - movdqu 48(%rdi),%xmm5 - movdqa %xmm4,%xmm13 - movdqu 64(%rdi),%xmm6 - movdqa %xmm5,%xmm14 - movdqu 80(%rdi),%xmm7 - movdqa %xmm6,%xmm15 -L$cbc_dec_loop6_enter: - leaq 96(%rdi),%rdi - movdqa %xmm7,%xmm8 - - call _aesni_decrypt6 - - pxor %xmm10,%xmm2 - movdqa %xmm8,%xmm10 - pxor %xmm11,%xmm3 - movdqu %xmm2,(%rsi) - pxor %xmm12,%xmm4 - movdqu %xmm3,16(%rsi) - pxor %xmm13,%xmm5 - movdqu %xmm4,32(%rsi) - pxor %xmm14,%xmm6 - movq %r11,%rcx - movdqu %xmm5,48(%rsi) - pxor %xmm15,%xmm7 - movl %r10d,%eax - movdqu %xmm6,64(%rsi) - leaq 80(%rsi),%rsi - subq $96,%rdx - ja L$cbc_dec_loop6 - - movdqa %xmm7,%xmm2 - addq $80,%rdx - jle L$cbc_dec_clear_tail_collected - movups %xmm7,(%rsi) - leaq 16(%rsi),%rsi - -L$cbc_dec_tail: - movups (%rdi),%xmm2 - subq $16,%rdx - jbe L$cbc_dec_one - - movups 16(%rdi),%xmm3 - movaps %xmm2,%xmm11 - subq $16,%rdx - jbe L$cbc_dec_two - - movups 32(%rdi),%xmm4 - movaps %xmm3,%xmm12 - subq $16,%rdx - jbe L$cbc_dec_three - - movups 48(%rdi),%xmm5 - movaps %xmm4,%xmm13 - subq $16,%rdx - jbe L$cbc_dec_four - - movups 64(%rdi),%xmm6 - movaps %xmm5,%xmm14 - movaps %xmm6,%xmm15 - xorps %xmm7,%xmm7 - call _aesni_decrypt6 - pxor %xmm10,%xmm2 - movaps %xmm15,%xmm10 - pxor %xmm11,%xmm3 - movdqu %xmm2,(%rsi) - pxor %xmm12,%xmm4 - movdqu %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - pxor %xmm13,%xmm5 - movdqu %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - pxor %xmm14,%xmm6 - movdqu %xmm5,48(%rsi) - pxor %xmm5,%xmm5 - leaq 64(%rsi),%rsi - movdqa %xmm6,%xmm2 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - subq $16,%rdx - jmp L$cbc_dec_tail_collected - -.p2align 4 -L$cbc_dec_one: - movaps %xmm2,%xmm11 - movups (%rcx),%xmm0 - movups 16(%rcx),%xmm1 - leaq 32(%rcx),%rcx - xorps %xmm0,%xmm2 -L$oop_dec1_17: -.byte 102,15,56,222,209 - decl %eax - movups (%rcx),%xmm1 - leaq 16(%rcx),%rcx - jnz L$oop_dec1_17 -.byte 102,15,56,223,209 - xorps %xmm10,%xmm2 - movaps %xmm11,%xmm10 - jmp L$cbc_dec_tail_collected -.p2align 4 -L$cbc_dec_two: - movaps %xmm3,%xmm12 - call _aesni_decrypt2 - pxor %xmm10,%xmm2 - movaps %xmm12,%xmm10 - pxor %xmm11,%xmm3 - movdqu %xmm2,(%rsi) - movdqa %xmm3,%xmm2 - pxor %xmm3,%xmm3 - leaq 16(%rsi),%rsi - jmp L$cbc_dec_tail_collected -.p2align 4 -L$cbc_dec_three: - movaps %xmm4,%xmm13 - call _aesni_decrypt3 - pxor %xmm10,%xmm2 - movaps %xmm13,%xmm10 - pxor %xmm11,%xmm3 - movdqu %xmm2,(%rsi) - pxor %xmm12,%xmm4 - movdqu %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - movdqa %xmm4,%xmm2 - pxor %xmm4,%xmm4 - leaq 32(%rsi),%rsi - jmp L$cbc_dec_tail_collected -.p2align 4 -L$cbc_dec_four: - movaps %xmm5,%xmm14 - call _aesni_decrypt4 - pxor %xmm10,%xmm2 - movaps %xmm14,%xmm10 - pxor %xmm11,%xmm3 - movdqu %xmm2,(%rsi) - pxor %xmm12,%xmm4 - movdqu %xmm3,16(%rsi) - pxor %xmm3,%xmm3 - pxor %xmm13,%xmm5 - movdqu %xmm4,32(%rsi) - pxor %xmm4,%xmm4 - movdqa %xmm5,%xmm2 - pxor %xmm5,%xmm5 - leaq 48(%rsi),%rsi - jmp L$cbc_dec_tail_collected - -.p2align 4 -L$cbc_dec_clear_tail_collected: - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - pxor %xmm8,%xmm8 - pxor %xmm9,%xmm9 -L$cbc_dec_tail_collected: - movups %xmm10,(%r8) - andq $15,%rdx - jnz L$cbc_dec_tail_partial - movups %xmm2,(%rsi) - pxor %xmm2,%xmm2 - jmp L$cbc_dec_ret -.p2align 4 -L$cbc_dec_tail_partial: - movaps %xmm2,(%rsp) - pxor %xmm2,%xmm2 - movq $16,%rcx - movq %rsi,%rdi - subq %rdx,%rcx - leaq (%rsp),%rsi -.long 0x9066A4F3 - movdqa %xmm2,(%rsp) - -L$cbc_dec_ret: - xorps %xmm0,%xmm0 - pxor %xmm1,%xmm1 - leaq (%rbp),%rsp - popq %rbp -L$cbc_ret: - .byte 0xf3,0xc3 - -.globl _aesni_set_decrypt_key -.private_extern _aesni_set_decrypt_key - -.p2align 4 -_aesni_set_decrypt_key: -.byte 0x48,0x83,0xEC,0x08 - call __aesni_set_encrypt_key - shll $4,%esi - testl %eax,%eax - jnz L$dec_key_ret - leaq 16(%rdx,%rsi,1),%rdi - - movups (%rdx),%xmm0 - movups (%rdi),%xmm1 - movups %xmm0,(%rdi) - movups %xmm1,(%rdx) - leaq 16(%rdx),%rdx - leaq -16(%rdi),%rdi - -L$dec_key_inverse: - movups (%rdx),%xmm0 - movups (%rdi),%xmm1 -.byte 102,15,56,219,192 -.byte 102,15,56,219,201 - leaq 16(%rdx),%rdx - leaq -16(%rdi),%rdi - movups %xmm0,16(%rdi) - movups %xmm1,-16(%rdx) - cmpq %rdx,%rdi - ja L$dec_key_inverse - - movups (%rdx),%xmm0 -.byte 102,15,56,219,192 - pxor %xmm1,%xmm1 - movups %xmm0,(%rdi) - pxor %xmm0,%xmm0 -L$dec_key_ret: - addq $8,%rsp - .byte 0xf3,0xc3 -L$SEH_end_set_decrypt_key: - -.globl _aesni_set_encrypt_key -.private_extern _aesni_set_encrypt_key - -.p2align 4 -_aesni_set_encrypt_key: -__aesni_set_encrypt_key: -.byte 0x48,0x83,0xEC,0x08 - movq $-1,%rax - testq %rdi,%rdi - jz L$enc_key_ret - testq %rdx,%rdx - jz L$enc_key_ret - - movl $268437504,%r10d - movups (%rdi),%xmm0 - xorps %xmm4,%xmm4 - andl _OPENSSL_ia32cap_P+4(%rip),%r10d - leaq 16(%rdx),%rax - cmpl $256,%esi - je L$14rounds - cmpl $192,%esi - je L$12rounds - cmpl $128,%esi - jne L$bad_keybits - -L$10rounds: - movl $9,%esi - cmpl $268435456,%r10d - je L$10rounds_alt - - movups %xmm0,(%rdx) -.byte 102,15,58,223,200,1 - call L$key_expansion_128_cold -.byte 102,15,58,223,200,2 - call L$key_expansion_128 -.byte 102,15,58,223,200,4 - call L$key_expansion_128 -.byte 102,15,58,223,200,8 - call L$key_expansion_128 -.byte 102,15,58,223,200,16 - call L$key_expansion_128 -.byte 102,15,58,223,200,32 - call L$key_expansion_128 -.byte 102,15,58,223,200,64 - call L$key_expansion_128 -.byte 102,15,58,223,200,128 - call L$key_expansion_128 -.byte 102,15,58,223,200,27 - call L$key_expansion_128 -.byte 102,15,58,223,200,54 - call L$key_expansion_128 - movups %xmm0,(%rax) - movl %esi,80(%rax) - xorl %eax,%eax - jmp L$enc_key_ret - -.p2align 4 -L$10rounds_alt: - movdqa L$key_rotate(%rip),%xmm5 - movl $8,%r10d - movdqa L$key_rcon1(%rip),%xmm4 - movdqa %xmm0,%xmm2 - movdqu %xmm0,(%rdx) - jmp L$oop_key128 - -.p2align 4 -L$oop_key128: -.byte 102,15,56,0,197 -.byte 102,15,56,221,196 - pslld $1,%xmm4 - leaq 16(%rax),%rax - - movdqa %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm3,%xmm2 - - pxor %xmm2,%xmm0 - movdqu %xmm0,-16(%rax) - movdqa %xmm0,%xmm2 - - decl %r10d - jnz L$oop_key128 - - movdqa L$key_rcon1b(%rip),%xmm4 - -.byte 102,15,56,0,197 -.byte 102,15,56,221,196 - pslld $1,%xmm4 - - movdqa %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm3,%xmm2 - - pxor %xmm2,%xmm0 - movdqu %xmm0,(%rax) - - movdqa %xmm0,%xmm2 -.byte 102,15,56,0,197 -.byte 102,15,56,221,196 - - movdqa %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm2,%xmm3 - pslldq $4,%xmm2 - pxor %xmm3,%xmm2 - - pxor %xmm2,%xmm0 - movdqu %xmm0,16(%rax) - - movl %esi,96(%rax) - xorl %eax,%eax - jmp L$enc_key_ret - -.p2align 4 -L$12rounds: - movq 16(%rdi),%xmm2 - movl $11,%esi - cmpl $268435456,%r10d - je L$12rounds_alt - - movups %xmm0,(%rdx) -.byte 102,15,58,223,202,1 - call L$key_expansion_192a_cold -.byte 102,15,58,223,202,2 - call L$key_expansion_192b -.byte 102,15,58,223,202,4 - call L$key_expansion_192a -.byte 102,15,58,223,202,8 - call L$key_expansion_192b -.byte 102,15,58,223,202,16 - call L$key_expansion_192a -.byte 102,15,58,223,202,32 - call L$key_expansion_192b -.byte 102,15,58,223,202,64 - call L$key_expansion_192a -.byte 102,15,58,223,202,128 - call L$key_expansion_192b - movups %xmm0,(%rax) - movl %esi,48(%rax) - xorq %rax,%rax - jmp L$enc_key_ret - -.p2align 4 -L$12rounds_alt: - movdqa L$key_rotate192(%rip),%xmm5 - movdqa L$key_rcon1(%rip),%xmm4 - movl $8,%r10d - movdqu %xmm0,(%rdx) - jmp L$oop_key192 - -.p2align 4 -L$oop_key192: - movq %xmm2,0(%rax) - movdqa %xmm2,%xmm1 -.byte 102,15,56,0,213 -.byte 102,15,56,221,212 - pslld $1,%xmm4 - leaq 24(%rax),%rax - - movdqa %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm3,%xmm0 - - pshufd $255,%xmm0,%xmm3 - pxor %xmm1,%xmm3 - pslldq $4,%xmm1 - pxor %xmm1,%xmm3 - - pxor %xmm2,%xmm0 - pxor %xmm3,%xmm2 - movdqu %xmm0,-16(%rax) - - decl %r10d - jnz L$oop_key192 - - movl %esi,32(%rax) - xorl %eax,%eax - jmp L$enc_key_ret - -.p2align 4 -L$14rounds: - movups 16(%rdi),%xmm2 - movl $13,%esi - leaq 16(%rax),%rax - cmpl $268435456,%r10d - je L$14rounds_alt - - movups %xmm0,(%rdx) - movups %xmm2,16(%rdx) -.byte 102,15,58,223,202,1 - call L$key_expansion_256a_cold -.byte 102,15,58,223,200,1 - call L$key_expansion_256b -.byte 102,15,58,223,202,2 - call L$key_expansion_256a -.byte 102,15,58,223,200,2 - call L$key_expansion_256b -.byte 102,15,58,223,202,4 - call L$key_expansion_256a -.byte 102,15,58,223,200,4 - call L$key_expansion_256b -.byte 102,15,58,223,202,8 - call L$key_expansion_256a -.byte 102,15,58,223,200,8 - call L$key_expansion_256b -.byte 102,15,58,223,202,16 - call L$key_expansion_256a -.byte 102,15,58,223,200,16 - call L$key_expansion_256b -.byte 102,15,58,223,202,32 - call L$key_expansion_256a -.byte 102,15,58,223,200,32 - call L$key_expansion_256b -.byte 102,15,58,223,202,64 - call L$key_expansion_256a - movups %xmm0,(%rax) - movl %esi,16(%rax) - xorq %rax,%rax - jmp L$enc_key_ret - -.p2align 4 -L$14rounds_alt: - movdqa L$key_rotate(%rip),%xmm5 - movdqa L$key_rcon1(%rip),%xmm4 - movl $7,%r10d - movdqu %xmm0,0(%rdx) - movdqa %xmm2,%xmm1 - movdqu %xmm2,16(%rdx) - jmp L$oop_key256 - -.p2align 4 -L$oop_key256: -.byte 102,15,56,0,213 -.byte 102,15,56,221,212 - - movdqa %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm0,%xmm3 - pslldq $4,%xmm0 - pxor %xmm3,%xmm0 - pslld $1,%xmm4 - - pxor %xmm2,%xmm0 - movdqu %xmm0,(%rax) - - decl %r10d - jz L$done_key256 - - pshufd $255,%xmm0,%xmm2 - pxor %xmm3,%xmm3 -.byte 102,15,56,221,211 - - movdqa %xmm1,%xmm3 - pslldq $4,%xmm1 - pxor %xmm1,%xmm3 - pslldq $4,%xmm1 - pxor %xmm1,%xmm3 - pslldq $4,%xmm1 - pxor %xmm3,%xmm1 - - pxor %xmm1,%xmm2 - movdqu %xmm2,16(%rax) - leaq 32(%rax),%rax - movdqa %xmm2,%xmm1 - - jmp L$oop_key256 - -L$done_key256: - movl %esi,16(%rax) - xorl %eax,%eax - jmp L$enc_key_ret - -.p2align 4 -L$bad_keybits: - movq $-2,%rax -L$enc_key_ret: - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - addq $8,%rsp - .byte 0xf3,0xc3 -L$SEH_end_set_encrypt_key: - -.p2align 4 -L$key_expansion_128: - movups %xmm0,(%rax) - leaq 16(%rax),%rax -L$key_expansion_128_cold: - shufps $16,%xmm0,%xmm4 - xorps %xmm4,%xmm0 - shufps $140,%xmm0,%xmm4 - xorps %xmm4,%xmm0 - shufps $255,%xmm1,%xmm1 - xorps %xmm1,%xmm0 - .byte 0xf3,0xc3 - -.p2align 4 -L$key_expansion_192a: - movups %xmm0,(%rax) - leaq 16(%rax),%rax -L$key_expansion_192a_cold: - movaps %xmm2,%xmm5 -L$key_expansion_192b_warm: - shufps $16,%xmm0,%xmm4 - movdqa %xmm2,%xmm3 - xorps %xmm4,%xmm0 - shufps $140,%xmm0,%xmm4 - pslldq $4,%xmm3 - xorps %xmm4,%xmm0 - pshufd $85,%xmm1,%xmm1 - pxor %xmm3,%xmm2 - pxor %xmm1,%xmm0 - pshufd $255,%xmm0,%xmm3 - pxor %xmm3,%xmm2 - .byte 0xf3,0xc3 - -.p2align 4 -L$key_expansion_192b: - movaps %xmm0,%xmm3 - shufps $68,%xmm0,%xmm5 - movups %xmm5,(%rax) - shufps $78,%xmm2,%xmm3 - movups %xmm3,16(%rax) - leaq 32(%rax),%rax - jmp L$key_expansion_192b_warm - -.p2align 4 -L$key_expansion_256a: - movups %xmm2,(%rax) - leaq 16(%rax),%rax -L$key_expansion_256a_cold: - shufps $16,%xmm0,%xmm4 - xorps %xmm4,%xmm0 - shufps $140,%xmm0,%xmm4 - xorps %xmm4,%xmm0 - shufps $255,%xmm1,%xmm1 - xorps %xmm1,%xmm0 - .byte 0xf3,0xc3 - -.p2align 4 -L$key_expansion_256b: - movups %xmm0,(%rax) - leaq 16(%rax),%rax - - shufps $16,%xmm2,%xmm4 - xorps %xmm4,%xmm2 - shufps $140,%xmm2,%xmm4 - xorps %xmm4,%xmm2 - shufps $170,%xmm1,%xmm1 - xorps %xmm1,%xmm2 - .byte 0xf3,0xc3 - - -.p2align 6 -L$bswap_mask: -.byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -L$increment32: -.long 6,6,6,0 -L$increment64: -.long 1,0,0,0 -L$xts_magic: -.long 0x87,0,1,0 -L$increment1: -.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 -L$key_rotate: -.long 0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d -L$key_rotate192: -.long 0x04070605,0x04070605,0x04070605,0x04070605 -L$key_rcon1: -.long 1,1,1,1 -L$key_rcon1b: -.long 0x1b,0x1b,0x1b,0x1b - -.byte 65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69,83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.p2align 6 -#endif diff --git a/third_party/boringssl/mac-x86_64/crypto/aes/bsaes-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/aes/bsaes-x86_64.S deleted file mode 100644 index c2d04776a9bd2..0000000000000 --- a/third_party/boringssl/mac-x86_64/crypto/aes/bsaes-x86_64.S +++ /dev/null @@ -1,2504 +0,0 @@ -#if defined(__x86_64__) -.text - - - - - -.p2align 6 -_bsaes_encrypt8: - leaq L$BS0(%rip),%r11 - - movdqa (%rax),%xmm8 - leaq 16(%rax),%rax - movdqa 80(%r11),%xmm7 - pxor %xmm8,%xmm15 - pxor %xmm8,%xmm0 - pxor %xmm8,%xmm1 - pxor %xmm8,%xmm2 -.byte 102,68,15,56,0,255 -.byte 102,15,56,0,199 - pxor %xmm8,%xmm3 - pxor %xmm8,%xmm4 -.byte 102,15,56,0,207 -.byte 102,15,56,0,215 - pxor %xmm8,%xmm5 - pxor %xmm8,%xmm6 -.byte 102,15,56,0,223 -.byte 102,15,56,0,231 -.byte 102,15,56,0,239 -.byte 102,15,56,0,247 -_bsaes_encrypt8_bitslice: - movdqa 0(%r11),%xmm7 - movdqa 16(%r11),%xmm8 - movdqa %xmm5,%xmm9 - psrlq $1,%xmm5 - movdqa %xmm3,%xmm10 - psrlq $1,%xmm3 - pxor %xmm6,%xmm5 - pxor %xmm4,%xmm3 - pand %xmm7,%xmm5 - pand %xmm7,%xmm3 - pxor %xmm5,%xmm6 - psllq $1,%xmm5 - pxor %xmm3,%xmm4 - psllq $1,%xmm3 - pxor %xmm9,%xmm5 - pxor %xmm10,%xmm3 - movdqa %xmm1,%xmm9 - psrlq $1,%xmm1 - movdqa %xmm15,%xmm10 - psrlq $1,%xmm15 - pxor %xmm2,%xmm1 - pxor %xmm0,%xmm15 - pand %xmm7,%xmm1 - pand %xmm7,%xmm15 - pxor %xmm1,%xmm2 - psllq $1,%xmm1 - pxor %xmm15,%xmm0 - psllq $1,%xmm15 - pxor %xmm9,%xmm1 - pxor %xmm10,%xmm15 - movdqa 32(%r11),%xmm7 - movdqa %xmm4,%xmm9 - psrlq $2,%xmm4 - movdqa %xmm3,%xmm10 - psrlq $2,%xmm3 - pxor %xmm6,%xmm4 - pxor %xmm5,%xmm3 - pand %xmm8,%xmm4 - pand %xmm8,%xmm3 - pxor %xmm4,%xmm6 - psllq $2,%xmm4 - pxor %xmm3,%xmm5 - psllq $2,%xmm3 - pxor %xmm9,%xmm4 - pxor %xmm10,%xmm3 - movdqa %xmm0,%xmm9 - psrlq $2,%xmm0 - movdqa %xmm15,%xmm10 - psrlq $2,%xmm15 - pxor %xmm2,%xmm0 - pxor %xmm1,%xmm15 - pand %xmm8,%xmm0 - pand %xmm8,%xmm15 - pxor %xmm0,%xmm2 - psllq $2,%xmm0 - pxor %xmm15,%xmm1 - psllq $2,%xmm15 - pxor %xmm9,%xmm0 - pxor %xmm10,%xmm15 - movdqa %xmm2,%xmm9 - psrlq $4,%xmm2 - movdqa %xmm1,%xmm10 - psrlq $4,%xmm1 - pxor %xmm6,%xmm2 - pxor %xmm5,%xmm1 - pand %xmm7,%xmm2 - pand %xmm7,%xmm1 - pxor %xmm2,%xmm6 - psllq $4,%xmm2 - pxor %xmm1,%xmm5 - psllq $4,%xmm1 - pxor %xmm9,%xmm2 - pxor %xmm10,%xmm1 - movdqa %xmm0,%xmm9 - psrlq $4,%xmm0 - movdqa %xmm15,%xmm10 - psrlq $4,%xmm15 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm15 - pand %xmm7,%xmm0 - pand %xmm7,%xmm15 - pxor %xmm0,%xmm4 - psllq $4,%xmm0 - pxor %xmm15,%xmm3 - psllq $4,%xmm15 - pxor %xmm9,%xmm0 - pxor %xmm10,%xmm15 - decl %r10d - jmp L$enc_sbox -.p2align 4 -L$enc_loop: - pxor 0(%rax),%xmm15 - pxor 16(%rax),%xmm0 - pxor 32(%rax),%xmm1 - pxor 48(%rax),%xmm2 -.byte 102,68,15,56,0,255 -.byte 102,15,56,0,199 - pxor 64(%rax),%xmm3 - pxor 80(%rax),%xmm4 -.byte 102,15,56,0,207 -.byte 102,15,56,0,215 - pxor 96(%rax),%xmm5 - pxor 112(%rax),%xmm6 -.byte 102,15,56,0,223 -.byte 102,15,56,0,231 -.byte 102,15,56,0,239 -.byte 102,15,56,0,247 - leaq 128(%rax),%rax -L$enc_sbox: - pxor %xmm5,%xmm4 - pxor %xmm0,%xmm1 - pxor %xmm15,%xmm2 - pxor %xmm1,%xmm5 - pxor %xmm15,%xmm4 - - pxor %xmm2,%xmm5 - pxor %xmm6,%xmm2 - pxor %xmm4,%xmm6 - pxor %xmm3,%xmm2 - pxor %xmm4,%xmm3 - pxor %xmm0,%xmm2 - - pxor %xmm6,%xmm1 - pxor %xmm4,%xmm0 - movdqa %xmm6,%xmm10 - movdqa %xmm0,%xmm9 - movdqa %xmm4,%xmm8 - movdqa %xmm1,%xmm12 - movdqa %xmm5,%xmm11 - - pxor %xmm3,%xmm10 - pxor %xmm1,%xmm9 - pxor %xmm2,%xmm8 - movdqa %xmm10,%xmm13 - pxor %xmm3,%xmm12 - movdqa %xmm9,%xmm7 - pxor %xmm15,%xmm11 - movdqa %xmm10,%xmm14 - - por %xmm8,%xmm9 - por %xmm11,%xmm10 - pxor %xmm7,%xmm14 - pand %xmm11,%xmm13 - pxor %xmm8,%xmm11 - pand %xmm8,%xmm7 - pand %xmm11,%xmm14 - movdqa %xmm2,%xmm11 - pxor %xmm15,%xmm11 - pand %xmm11,%xmm12 - pxor %xmm12,%xmm10 - pxor %xmm12,%xmm9 - movdqa %xmm6,%xmm12 - movdqa %xmm4,%xmm11 - pxor %xmm0,%xmm12 - pxor %xmm5,%xmm11 - movdqa %xmm12,%xmm8 - pand %xmm11,%xmm12 - por %xmm11,%xmm8 - pxor %xmm12,%xmm7 - pxor %xmm14,%xmm10 - pxor %xmm13,%xmm9 - pxor %xmm14,%xmm8 - movdqa %xmm1,%xmm11 - pxor %xmm13,%xmm7 - movdqa %xmm3,%xmm12 - pxor %xmm13,%xmm8 - movdqa %xmm0,%xmm13 - pand %xmm2,%xmm11 - movdqa %xmm6,%xmm14 - pand %xmm15,%xmm12 - pand %xmm4,%xmm13 - por %xmm5,%xmm14 - pxor %xmm11,%xmm10 - pxor %xmm12,%xmm9 - pxor %xmm13,%xmm8 - pxor %xmm14,%xmm7 - - - - - - movdqa %xmm10,%xmm11 - pand %xmm8,%xmm10 - pxor %xmm9,%xmm11 - - movdqa %xmm7,%xmm13 - movdqa %xmm11,%xmm14 - pxor %xmm10,%xmm13 - pand %xmm13,%xmm14 - - movdqa %xmm8,%xmm12 - pxor %xmm9,%xmm14 - pxor %xmm7,%xmm12 - - pxor %xmm9,%xmm10 - - pand %xmm10,%xmm12 - - movdqa %xmm13,%xmm9 - pxor %xmm7,%xmm12 - - pxor %xmm12,%xmm9 - pxor %xmm12,%xmm8 - - pand %xmm7,%xmm9 - - pxor %xmm9,%xmm13 - pxor %xmm9,%xmm8 - - pand %xmm14,%xmm13 - - pxor %xmm11,%xmm13 - movdqa %xmm5,%xmm11 - movdqa %xmm4,%xmm7 - movdqa %xmm14,%xmm9 - pxor %xmm13,%xmm9 - pand %xmm5,%xmm9 - pxor %xmm4,%xmm5 - pand %xmm14,%xmm4 - pand %xmm13,%xmm5 - pxor %xmm4,%xmm5 - pxor %xmm9,%xmm4 - pxor %xmm15,%xmm11 - pxor %xmm2,%xmm7 - pxor %xmm12,%xmm14 - pxor %xmm8,%xmm13 - movdqa %xmm14,%xmm10 - movdqa %xmm12,%xmm9 - pxor %xmm13,%xmm10 - pxor %xmm8,%xmm9 - pand %xmm11,%xmm10 - pand %xmm15,%xmm9 - pxor %xmm7,%xmm11 - pxor %xmm2,%xmm15 - pand %xmm14,%xmm7 - pand %xmm12,%xmm2 - pand %xmm13,%xmm11 - pand %xmm8,%xmm15 - pxor %xmm11,%xmm7 - pxor %xmm2,%xmm15 - pxor %xmm10,%xmm11 - pxor %xmm9,%xmm2 - pxor %xmm11,%xmm5 - pxor %xmm11,%xmm15 - pxor %xmm7,%xmm4 - pxor %xmm7,%xmm2 - - movdqa %xmm6,%xmm11 - movdqa %xmm0,%xmm7 - pxor %xmm3,%xmm11 - pxor %xmm1,%xmm7 - movdqa %xmm14,%xmm10 - movdqa %xmm12,%xmm9 - pxor %xmm13,%xmm10 - pxor %xmm8,%xmm9 - pand %xmm11,%xmm10 - pand %xmm3,%xmm9 - pxor %xmm7,%xmm11 - pxor %xmm1,%xmm3 - pand %xmm14,%xmm7 - pand %xmm12,%xmm1 - pand %xmm13,%xmm11 - pand %xmm8,%xmm3 - pxor %xmm11,%xmm7 - pxor %xmm1,%xmm3 - pxor %xmm10,%xmm11 - pxor %xmm9,%xmm1 - pxor %xmm12,%xmm14 - pxor %xmm8,%xmm13 - movdqa %xmm14,%xmm10 - pxor %xmm13,%xmm10 - pand %xmm6,%xmm10 - pxor %xmm0,%xmm6 - pand %xmm14,%xmm0 - pand %xmm13,%xmm6 - pxor %xmm0,%xmm6 - pxor %xmm10,%xmm0 - pxor %xmm11,%xmm6 - pxor %xmm11,%xmm3 - pxor %xmm7,%xmm0 - pxor %xmm7,%xmm1 - pxor %xmm15,%xmm6 - pxor %xmm5,%xmm0 - pxor %xmm6,%xmm3 - pxor %xmm15,%xmm5 - pxor %xmm0,%xmm15 - - pxor %xmm4,%xmm0 - pxor %xmm1,%xmm4 - pxor %xmm2,%xmm1 - pxor %xmm4,%xmm2 - pxor %xmm4,%xmm3 - - pxor %xmm2,%xmm5 - decl %r10d - jl L$enc_done - pshufd $147,%xmm15,%xmm7 - pshufd $147,%xmm0,%xmm8 - pxor %xmm7,%xmm15 - pshufd $147,%xmm3,%xmm9 - pxor %xmm8,%xmm0 - pshufd $147,%xmm5,%xmm10 - pxor %xmm9,%xmm3 - pshufd $147,%xmm2,%xmm11 - pxor %xmm10,%xmm5 - pshufd $147,%xmm6,%xmm12 - pxor %xmm11,%xmm2 - pshufd $147,%xmm1,%xmm13 - pxor %xmm12,%xmm6 - pshufd $147,%xmm4,%xmm14 - pxor %xmm13,%xmm1 - pxor %xmm14,%xmm4 - - pxor %xmm15,%xmm8 - pxor %xmm4,%xmm7 - pxor %xmm4,%xmm8 - pshufd $78,%xmm15,%xmm15 - pxor %xmm0,%xmm9 - pshufd $78,%xmm0,%xmm0 - pxor %xmm2,%xmm12 - pxor %xmm7,%xmm15 - pxor %xmm6,%xmm13 - pxor %xmm8,%xmm0 - pxor %xmm5,%xmm11 - pshufd $78,%xmm2,%xmm7 - pxor %xmm1,%xmm14 - pshufd $78,%xmm6,%xmm8 - pxor %xmm3,%xmm10 - pshufd $78,%xmm5,%xmm2 - pxor %xmm4,%xmm10 - pshufd $78,%xmm4,%xmm6 - pxor %xmm4,%xmm11 - pshufd $78,%xmm1,%xmm5 - pxor %xmm11,%xmm7 - pshufd $78,%xmm3,%xmm1 - pxor %xmm12,%xmm8 - pxor %xmm10,%xmm2 - pxor %xmm14,%xmm6 - pxor %xmm13,%xmm5 - movdqa %xmm7,%xmm3 - pxor %xmm9,%xmm1 - movdqa %xmm8,%xmm4 - movdqa 48(%r11),%xmm7 - jnz L$enc_loop - movdqa 64(%r11),%xmm7 - jmp L$enc_loop -.p2align 4 -L$enc_done: - movdqa 0(%r11),%xmm7 - movdqa 16(%r11),%xmm8 - movdqa %xmm1,%xmm9 - psrlq $1,%xmm1 - movdqa %xmm2,%xmm10 - psrlq $1,%xmm2 - pxor %xmm4,%xmm1 - pxor %xmm6,%xmm2 - pand %xmm7,%xmm1 - pand %xmm7,%xmm2 - pxor %xmm1,%xmm4 - psllq $1,%xmm1 - pxor %xmm2,%xmm6 - psllq $1,%xmm2 - pxor %xmm9,%xmm1 - pxor %xmm10,%xmm2 - movdqa %xmm3,%xmm9 - psrlq $1,%xmm3 - movdqa %xmm15,%xmm10 - psrlq $1,%xmm15 - pxor %xmm5,%xmm3 - pxor %xmm0,%xmm15 - pand %xmm7,%xmm3 - pand %xmm7,%xmm15 - pxor %xmm3,%xmm5 - psllq $1,%xmm3 - pxor %xmm15,%xmm0 - psllq $1,%xmm15 - pxor %xmm9,%xmm3 - pxor %xmm10,%xmm15 - movdqa 32(%r11),%xmm7 - movdqa %xmm6,%xmm9 - psrlq $2,%xmm6 - movdqa %xmm2,%xmm10 - psrlq $2,%xmm2 - pxor %xmm4,%xmm6 - pxor %xmm1,%xmm2 - pand %xmm8,%xmm6 - pand %xmm8,%xmm2 - pxor %xmm6,%xmm4 - psllq $2,%xmm6 - pxor %xmm2,%xmm1 - psllq $2,%xmm2 - pxor %xmm9,%xmm6 - pxor %xmm10,%xmm2 - movdqa %xmm0,%xmm9 - psrlq $2,%xmm0 - movdqa %xmm15,%xmm10 - psrlq $2,%xmm15 - pxor %xmm5,%xmm0 - pxor %xmm3,%xmm15 - pand %xmm8,%xmm0 - pand %xmm8,%xmm15 - pxor %xmm0,%xmm5 - psllq $2,%xmm0 - pxor %xmm15,%xmm3 - psllq $2,%xmm15 - pxor %xmm9,%xmm0 - pxor %xmm10,%xmm15 - movdqa %xmm5,%xmm9 - psrlq $4,%xmm5 - movdqa %xmm3,%xmm10 - psrlq $4,%xmm3 - pxor %xmm4,%xmm5 - pxor %xmm1,%xmm3 - pand %xmm7,%xmm5 - pand %xmm7,%xmm3 - pxor %xmm5,%xmm4 - psllq $4,%xmm5 - pxor %xmm3,%xmm1 - psllq $4,%xmm3 - pxor %xmm9,%xmm5 - pxor %xmm10,%xmm3 - movdqa %xmm0,%xmm9 - psrlq $4,%xmm0 - movdqa %xmm15,%xmm10 - psrlq $4,%xmm15 - pxor %xmm6,%xmm0 - pxor %xmm2,%xmm15 - pand %xmm7,%xmm0 - pand %xmm7,%xmm15 - pxor %xmm0,%xmm6 - psllq $4,%xmm0 - pxor %xmm15,%xmm2 - psllq $4,%xmm15 - pxor %xmm9,%xmm0 - pxor %xmm10,%xmm15 - movdqa (%rax),%xmm7 - pxor %xmm7,%xmm3 - pxor %xmm7,%xmm5 - pxor %xmm7,%xmm2 - pxor %xmm7,%xmm6 - pxor %xmm7,%xmm1 - pxor %xmm7,%xmm4 - pxor %xmm7,%xmm15 - pxor %xmm7,%xmm0 - .byte 0xf3,0xc3 - - - -.p2align 6 -_bsaes_decrypt8: - leaq L$BS0(%rip),%r11 - - movdqa (%rax),%xmm8 - leaq 16(%rax),%rax - movdqa -48(%r11),%xmm7 - pxor %xmm8,%xmm15 - pxor %xmm8,%xmm0 - pxor %xmm8,%xmm1 - pxor %xmm8,%xmm2 -.byte 102,68,15,56,0,255 -.byte 102,15,56,0,199 - pxor %xmm8,%xmm3 - pxor %xmm8,%xmm4 -.byte 102,15,56,0,207 -.byte 102,15,56,0,215 - pxor %xmm8,%xmm5 - pxor %xmm8,%xmm6 -.byte 102,15,56,0,223 -.byte 102,15,56,0,231 -.byte 102,15,56,0,239 -.byte 102,15,56,0,247 - movdqa 0(%r11),%xmm7 - movdqa 16(%r11),%xmm8 - movdqa %xmm5,%xmm9 - psrlq $1,%xmm5 - movdqa %xmm3,%xmm10 - psrlq $1,%xmm3 - pxor %xmm6,%xmm5 - pxor %xmm4,%xmm3 - pand %xmm7,%xmm5 - pand %xmm7,%xmm3 - pxor %xmm5,%xmm6 - psllq $1,%xmm5 - pxor %xmm3,%xmm4 - psllq $1,%xmm3 - pxor %xmm9,%xmm5 - pxor %xmm10,%xmm3 - movdqa %xmm1,%xmm9 - psrlq $1,%xmm1 - movdqa %xmm15,%xmm10 - psrlq $1,%xmm15 - pxor %xmm2,%xmm1 - pxor %xmm0,%xmm15 - pand %xmm7,%xmm1 - pand %xmm7,%xmm15 - pxor %xmm1,%xmm2 - psllq $1,%xmm1 - pxor %xmm15,%xmm0 - psllq $1,%xmm15 - pxor %xmm9,%xmm1 - pxor %xmm10,%xmm15 - movdqa 32(%r11),%xmm7 - movdqa %xmm4,%xmm9 - psrlq $2,%xmm4 - movdqa %xmm3,%xmm10 - psrlq $2,%xmm3 - pxor %xmm6,%xmm4 - pxor %xmm5,%xmm3 - pand %xmm8,%xmm4 - pand %xmm8,%xmm3 - pxor %xmm4,%xmm6 - psllq $2,%xmm4 - pxor %xmm3,%xmm5 - psllq $2,%xmm3 - pxor %xmm9,%xmm4 - pxor %xmm10,%xmm3 - movdqa %xmm0,%xmm9 - psrlq $2,%xmm0 - movdqa %xmm15,%xmm10 - psrlq $2,%xmm15 - pxor %xmm2,%xmm0 - pxor %xmm1,%xmm15 - pand %xmm8,%xmm0 - pand %xmm8,%xmm15 - pxor %xmm0,%xmm2 - psllq $2,%xmm0 - pxor %xmm15,%xmm1 - psllq $2,%xmm15 - pxor %xmm9,%xmm0 - pxor %xmm10,%xmm15 - movdqa %xmm2,%xmm9 - psrlq $4,%xmm2 - movdqa %xmm1,%xmm10 - psrlq $4,%xmm1 - pxor %xmm6,%xmm2 - pxor %xmm5,%xmm1 - pand %xmm7,%xmm2 - pand %xmm7,%xmm1 - pxor %xmm2,%xmm6 - psllq $4,%xmm2 - pxor %xmm1,%xmm5 - psllq $4,%xmm1 - pxor %xmm9,%xmm2 - pxor %xmm10,%xmm1 - movdqa %xmm0,%xmm9 - psrlq $4,%xmm0 - movdqa %xmm15,%xmm10 - psrlq $4,%xmm15 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm15 - pand %xmm7,%xmm0 - pand %xmm7,%xmm15 - pxor %xmm0,%xmm4 - psllq $4,%xmm0 - pxor %xmm15,%xmm3 - psllq $4,%xmm15 - pxor %xmm9,%xmm0 - pxor %xmm10,%xmm15 - decl %r10d - jmp L$dec_sbox -.p2align 4 -L$dec_loop: - pxor 0(%rax),%xmm15 - pxor 16(%rax),%xmm0 - pxor 32(%rax),%xmm1 - pxor 48(%rax),%xmm2 -.byte 102,68,15,56,0,255 -.byte 102,15,56,0,199 - pxor 64(%rax),%xmm3 - pxor 80(%rax),%xmm4 -.byte 102,15,56,0,207 -.byte 102,15,56,0,215 - pxor 96(%rax),%xmm5 - pxor 112(%rax),%xmm6 -.byte 102,15,56,0,223 -.byte 102,15,56,0,231 -.byte 102,15,56,0,239 -.byte 102,15,56,0,247 - leaq 128(%rax),%rax -L$dec_sbox: - pxor %xmm3,%xmm2 - - pxor %xmm6,%xmm3 - pxor %xmm6,%xmm1 - pxor %xmm3,%xmm5 - pxor %xmm5,%xmm6 - pxor %xmm6,%xmm0 - - pxor %xmm0,%xmm15 - pxor %xmm4,%xmm1 - pxor %xmm15,%xmm2 - pxor %xmm15,%xmm4 - pxor %xmm2,%xmm0 - movdqa %xmm2,%xmm10 - movdqa %xmm6,%xmm9 - movdqa %xmm0,%xmm8 - movdqa %xmm3,%xmm12 - movdqa %xmm4,%xmm11 - - pxor %xmm15,%xmm10 - pxor %xmm3,%xmm9 - pxor %xmm5,%xmm8 - movdqa %xmm10,%xmm13 - pxor %xmm15,%xmm12 - movdqa %xmm9,%xmm7 - pxor %xmm1,%xmm11 - movdqa %xmm10,%xmm14 - - por %xmm8,%xmm9 - por %xmm11,%xmm10 - pxor %xmm7,%xmm14 - pand %xmm11,%xmm13 - pxor %xmm8,%xmm11 - pand %xmm8,%xmm7 - pand %xmm11,%xmm14 - movdqa %xmm5,%xmm11 - pxor %xmm1,%xmm11 - pand %xmm11,%xmm12 - pxor %xmm12,%xmm10 - pxor %xmm12,%xmm9 - movdqa %xmm2,%xmm12 - movdqa %xmm0,%xmm11 - pxor %xmm6,%xmm12 - pxor %xmm4,%xmm11 - movdqa %xmm12,%xmm8 - pand %xmm11,%xmm12 - por %xmm11,%xmm8 - pxor %xmm12,%xmm7 - pxor %xmm14,%xmm10 - pxor %xmm13,%xmm9 - pxor %xmm14,%xmm8 - movdqa %xmm3,%xmm11 - pxor %xmm13,%xmm7 - movdqa %xmm15,%xmm12 - pxor %xmm13,%xmm8 - movdqa %xmm6,%xmm13 - pand %xmm5,%xmm11 - movdqa %xmm2,%xmm14 - pand %xmm1,%xmm12 - pand %xmm0,%xmm13 - por %xmm4,%xmm14 - pxor %xmm11,%xmm10 - pxor %xmm12,%xmm9 - pxor %xmm13,%xmm8 - pxor %xmm14,%xmm7 - - - - - - movdqa %xmm10,%xmm11 - pand %xmm8,%xmm10 - pxor %xmm9,%xmm11 - - movdqa %xmm7,%xmm13 - movdqa %xmm11,%xmm14 - pxor %xmm10,%xmm13 - pand %xmm13,%xmm14 - - movdqa %xmm8,%xmm12 - pxor %xmm9,%xmm14 - pxor %xmm7,%xmm12 - - pxor %xmm9,%xmm10 - - pand %xmm10,%xmm12 - - movdqa %xmm13,%xmm9 - pxor %xmm7,%xmm12 - - pxor %xmm12,%xmm9 - pxor %xmm12,%xmm8 - - pand %xmm7,%xmm9 - - pxor %xmm9,%xmm13 - pxor %xmm9,%xmm8 - - pand %xmm14,%xmm13 - - pxor %xmm11,%xmm13 - movdqa %xmm4,%xmm11 - movdqa %xmm0,%xmm7 - movdqa %xmm14,%xmm9 - pxor %xmm13,%xmm9 - pand %xmm4,%xmm9 - pxor %xmm0,%xmm4 - pand %xmm14,%xmm0 - pand %xmm13,%xmm4 - pxor %xmm0,%xmm4 - pxor %xmm9,%xmm0 - pxor %xmm1,%xmm11 - pxor %xmm5,%xmm7 - pxor %xmm12,%xmm14 - pxor %xmm8,%xmm13 - movdqa %xmm14,%xmm10 - movdqa %xmm12,%xmm9 - pxor %xmm13,%xmm10 - pxor %xmm8,%xmm9 - pand %xmm11,%xmm10 - pand %xmm1,%xmm9 - pxor %xmm7,%xmm11 - pxor %xmm5,%xmm1 - pand %xmm14,%xmm7 - pand %xmm12,%xmm5 - pand %xmm13,%xmm11 - pand %xmm8,%xmm1 - pxor %xmm11,%xmm7 - pxor %xmm5,%xmm1 - pxor %xmm10,%xmm11 - pxor %xmm9,%xmm5 - pxor %xmm11,%xmm4 - pxor %xmm11,%xmm1 - pxor %xmm7,%xmm0 - pxor %xmm7,%xmm5 - - movdqa %xmm2,%xmm11 - movdqa %xmm6,%xmm7 - pxor %xmm15,%xmm11 - pxor %xmm3,%xmm7 - movdqa %xmm14,%xmm10 - movdqa %xmm12,%xmm9 - pxor %xmm13,%xmm10 - pxor %xmm8,%xmm9 - pand %xmm11,%xmm10 - pand %xmm15,%xmm9 - pxor %xmm7,%xmm11 - pxor %xmm3,%xmm15 - pand %xmm14,%xmm7 - pand %xmm12,%xmm3 - pand %xmm13,%xmm11 - pand %xmm8,%xmm15 - pxor %xmm11,%xmm7 - pxor %xmm3,%xmm15 - pxor %xmm10,%xmm11 - pxor %xmm9,%xmm3 - pxor %xmm12,%xmm14 - pxor %xmm8,%xmm13 - movdqa %xmm14,%xmm10 - pxor %xmm13,%xmm10 - pand %xmm2,%xmm10 - pxor %xmm6,%xmm2 - pand %xmm14,%xmm6 - pand %xmm13,%xmm2 - pxor %xmm6,%xmm2 - pxor %xmm10,%xmm6 - pxor %xmm11,%xmm2 - pxor %xmm11,%xmm15 - pxor %xmm7,%xmm6 - pxor %xmm7,%xmm3 - pxor %xmm6,%xmm0 - pxor %xmm4,%xmm5 - - pxor %xmm0,%xmm3 - pxor %xmm6,%xmm1 - pxor %xmm6,%xmm4 - pxor %xmm1,%xmm3 - pxor %xmm15,%xmm6 - pxor %xmm4,%xmm3 - pxor %xmm5,%xmm2 - pxor %xmm0,%xmm5 - pxor %xmm3,%xmm2 - - pxor %xmm15,%xmm3 - pxor %xmm2,%xmm6 - decl %r10d - jl L$dec_done - - pshufd $78,%xmm15,%xmm7 - pshufd $78,%xmm2,%xmm13 - pxor %xmm15,%xmm7 - pshufd $78,%xmm4,%xmm14 - pxor %xmm2,%xmm13 - pshufd $78,%xmm0,%xmm8 - pxor %xmm4,%xmm14 - pshufd $78,%xmm5,%xmm9 - pxor %xmm0,%xmm8 - pshufd $78,%xmm3,%xmm10 - pxor %xmm5,%xmm9 - pxor %xmm13,%xmm15 - pxor %xmm13,%xmm0 - pshufd $78,%xmm1,%xmm11 - pxor %xmm3,%xmm10 - pxor %xmm7,%xmm5 - pxor %xmm8,%xmm3 - pshufd $78,%xmm6,%xmm12 - pxor %xmm1,%xmm11 - pxor %xmm14,%xmm0 - pxor %xmm9,%xmm1 - pxor %xmm6,%xmm12 - - pxor %xmm14,%xmm5 - pxor %xmm13,%xmm3 - pxor %xmm13,%xmm1 - pxor %xmm10,%xmm6 - pxor %xmm11,%xmm2 - pxor %xmm14,%xmm1 - pxor %xmm14,%xmm6 - pxor %xmm12,%xmm4 - pshufd $147,%xmm15,%xmm7 - pshufd $147,%xmm0,%xmm8 - pxor %xmm7,%xmm15 - pshufd $147,%xmm5,%xmm9 - pxor %xmm8,%xmm0 - pshufd $147,%xmm3,%xmm10 - pxor %xmm9,%xmm5 - pshufd $147,%xmm1,%xmm11 - pxor %xmm10,%xmm3 - pshufd $147,%xmm6,%xmm12 - pxor %xmm11,%xmm1 - pshufd $147,%xmm2,%xmm13 - pxor %xmm12,%xmm6 - pshufd $147,%xmm4,%xmm14 - pxor %xmm13,%xmm2 - pxor %xmm14,%xmm4 - - pxor %xmm15,%xmm8 - pxor %xmm4,%xmm7 - pxor %xmm4,%xmm8 - pshufd $78,%xmm15,%xmm15 - pxor %xmm0,%xmm9 - pshufd $78,%xmm0,%xmm0 - pxor %xmm1,%xmm12 - pxor %xmm7,%xmm15 - pxor %xmm6,%xmm13 - pxor %xmm8,%xmm0 - pxor %xmm3,%xmm11 - pshufd $78,%xmm1,%xmm7 - pxor %xmm2,%xmm14 - pshufd $78,%xmm6,%xmm8 - pxor %xmm5,%xmm10 - pshufd $78,%xmm3,%xmm1 - pxor %xmm4,%xmm10 - pshufd $78,%xmm4,%xmm6 - pxor %xmm4,%xmm11 - pshufd $78,%xmm2,%xmm3 - pxor %xmm11,%xmm7 - pshufd $78,%xmm5,%xmm2 - pxor %xmm12,%xmm8 - pxor %xmm1,%xmm10 - pxor %xmm14,%xmm6 - pxor %xmm3,%xmm13 - movdqa %xmm7,%xmm3 - pxor %xmm9,%xmm2 - movdqa %xmm13,%xmm5 - movdqa %xmm8,%xmm4 - movdqa %xmm2,%xmm1 - movdqa %xmm10,%xmm2 - movdqa -16(%r11),%xmm7 - jnz L$dec_loop - movdqa -32(%r11),%xmm7 - jmp L$dec_loop -.p2align 4 -L$dec_done: - movdqa 0(%r11),%xmm7 - movdqa 16(%r11),%xmm8 - movdqa %xmm2,%xmm9 - psrlq $1,%xmm2 - movdqa %xmm1,%xmm10 - psrlq $1,%xmm1 - pxor %xmm4,%xmm2 - pxor %xmm6,%xmm1 - pand %xmm7,%xmm2 - pand %xmm7,%xmm1 - pxor %xmm2,%xmm4 - psllq $1,%xmm2 - pxor %xmm1,%xmm6 - psllq $1,%xmm1 - pxor %xmm9,%xmm2 - pxor %xmm10,%xmm1 - movdqa %xmm5,%xmm9 - psrlq $1,%xmm5 - movdqa %xmm15,%xmm10 - psrlq $1,%xmm15 - pxor %xmm3,%xmm5 - pxor %xmm0,%xmm15 - pand %xmm7,%xmm5 - pand %xmm7,%xmm15 - pxor %xmm5,%xmm3 - psllq $1,%xmm5 - pxor %xmm15,%xmm0 - psllq $1,%xmm15 - pxor %xmm9,%xmm5 - pxor %xmm10,%xmm15 - movdqa 32(%r11),%xmm7 - movdqa %xmm6,%xmm9 - psrlq $2,%xmm6 - movdqa %xmm1,%xmm10 - psrlq $2,%xmm1 - pxor %xmm4,%xmm6 - pxor %xmm2,%xmm1 - pand %xmm8,%xmm6 - pand %xmm8,%xmm1 - pxor %xmm6,%xmm4 - psllq $2,%xmm6 - pxor %xmm1,%xmm2 - psllq $2,%xmm1 - pxor %xmm9,%xmm6 - pxor %xmm10,%xmm1 - movdqa %xmm0,%xmm9 - psrlq $2,%xmm0 - movdqa %xmm15,%xmm10 - psrlq $2,%xmm15 - pxor %xmm3,%xmm0 - pxor %xmm5,%xmm15 - pand %xmm8,%xmm0 - pand %xmm8,%xmm15 - pxor %xmm0,%xmm3 - psllq $2,%xmm0 - pxor %xmm15,%xmm5 - psllq $2,%xmm15 - pxor %xmm9,%xmm0 - pxor %xmm10,%xmm15 - movdqa %xmm3,%xmm9 - psrlq $4,%xmm3 - movdqa %xmm5,%xmm10 - psrlq $4,%xmm5 - pxor %xmm4,%xmm3 - pxor %xmm2,%xmm5 - pand %xmm7,%xmm3 - pand %xmm7,%xmm5 - pxor %xmm3,%xmm4 - psllq $4,%xmm3 - pxor %xmm5,%xmm2 - psllq $4,%xmm5 - pxor %xmm9,%xmm3 - pxor %xmm10,%xmm5 - movdqa %xmm0,%xmm9 - psrlq $4,%xmm0 - movdqa %xmm15,%xmm10 - psrlq $4,%xmm15 - pxor %xmm6,%xmm0 - pxor %xmm1,%xmm15 - pand %xmm7,%xmm0 - pand %xmm7,%xmm15 - pxor %xmm0,%xmm6 - psllq $4,%xmm0 - pxor %xmm15,%xmm1 - psllq $4,%xmm15 - pxor %xmm9,%xmm0 - pxor %xmm10,%xmm15 - movdqa (%rax),%xmm7 - pxor %xmm7,%xmm5 - pxor %xmm7,%xmm3 - pxor %xmm7,%xmm1 - pxor %xmm7,%xmm6 - pxor %xmm7,%xmm2 - pxor %xmm7,%xmm4 - pxor %xmm7,%xmm15 - pxor %xmm7,%xmm0 - .byte 0xf3,0xc3 - - -.p2align 4 -_bsaes_key_convert: - leaq L$masks(%rip),%r11 - movdqu (%rcx),%xmm7 - leaq 16(%rcx),%rcx - movdqa 0(%r11),%xmm0 - movdqa 16(%r11),%xmm1 - movdqa 32(%r11),%xmm2 - movdqa 48(%r11),%xmm3 - movdqa 64(%r11),%xmm4 - pcmpeqd %xmm5,%xmm5 - - movdqu (%rcx),%xmm6 - movdqa %xmm7,(%rax) - leaq 16(%rax),%rax - decl %r10d - jmp L$key_loop -.p2align 4 -L$key_loop: -.byte 102,15,56,0,244 - - movdqa %xmm0,%xmm8 - movdqa %xmm1,%xmm9 - - pand %xmm6,%xmm8 - pand %xmm6,%xmm9 - movdqa %xmm2,%xmm10 - pcmpeqb %xmm0,%xmm8 - psllq $4,%xmm0 - movdqa %xmm3,%xmm11 - pcmpeqb %xmm1,%xmm9 - psllq $4,%xmm1 - - pand %xmm6,%xmm10 - pand %xmm6,%xmm11 - movdqa %xmm0,%xmm12 - pcmpeqb %xmm2,%xmm10 - psllq $4,%xmm2 - movdqa %xmm1,%xmm13 - pcmpeqb %xmm3,%xmm11 - psllq $4,%xmm3 - - movdqa %xmm2,%xmm14 - movdqa %xmm3,%xmm15 - pxor %xmm5,%xmm8 - pxor %xmm5,%xmm9 - - pand %xmm6,%xmm12 - pand %xmm6,%xmm13 - movdqa %xmm8,0(%rax) - pcmpeqb %xmm0,%xmm12 - psrlq $4,%xmm0 - movdqa %xmm9,16(%rax) - pcmpeqb %xmm1,%xmm13 - psrlq $4,%xmm1 - leaq 16(%rcx),%rcx - - pand %xmm6,%xmm14 - pand %xmm6,%xmm15 - movdqa %xmm10,32(%rax) - pcmpeqb %xmm2,%xmm14 - psrlq $4,%xmm2 - movdqa %xmm11,48(%rax) - pcmpeqb %xmm3,%xmm15 - psrlq $4,%xmm3 - movdqu (%rcx),%xmm6 - - pxor %xmm5,%xmm13 - pxor %xmm5,%xmm14 - movdqa %xmm12,64(%rax) - movdqa %xmm13,80(%rax) - movdqa %xmm14,96(%rax) - movdqa %xmm15,112(%rax) - leaq 128(%rax),%rax - decl %r10d - jnz L$key_loop - - movdqa 80(%r11),%xmm7 - - .byte 0xf3,0xc3 - - -.globl _bsaes_cbc_encrypt -.private_extern _bsaes_cbc_encrypt - -.p2align 4 -_bsaes_cbc_encrypt: - cmpl $0,%r9d - jne _asm_AES_cbc_encrypt - cmpq $128,%rdx - jb _asm_AES_cbc_encrypt - - movq %rsp,%rax -L$cbc_dec_prologue: - pushq %rbp - pushq %rbx - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - leaq -72(%rsp),%rsp - movq %rsp,%rbp - movl 240(%rcx),%eax - movq %rdi,%r12 - movq %rsi,%r13 - movq %rdx,%r14 - movq %rcx,%r15 - movq %r8,%rbx - shrq $4,%r14 - - movl %eax,%edx - shlq $7,%rax - subq $96,%rax - subq %rax,%rsp - - movq %rsp,%rax - movq %r15,%rcx - movl %edx,%r10d - call _bsaes_key_convert - pxor (%rsp),%xmm7 - movdqa %xmm6,(%rax) - movdqa %xmm7,(%rsp) - - movdqu (%rbx),%xmm14 - subq $8,%r14 -L$cbc_dec_loop: - movdqu 0(%r12),%xmm15 - movdqu 16(%r12),%xmm0 - movdqu 32(%r12),%xmm1 - movdqu 48(%r12),%xmm2 - movdqu 64(%r12),%xmm3 - movdqu 80(%r12),%xmm4 - movq %rsp,%rax - movdqu 96(%r12),%xmm5 - movl %edx,%r10d - movdqu 112(%r12),%xmm6 - movdqa %xmm14,32(%rbp) - - call _bsaes_decrypt8 - - pxor 32(%rbp),%xmm15 - movdqu 0(%r12),%xmm7 - movdqu 16(%r12),%xmm8 - pxor %xmm7,%xmm0 - movdqu 32(%r12),%xmm9 - pxor %xmm8,%xmm5 - movdqu 48(%r12),%xmm10 - pxor %xmm9,%xmm3 - movdqu 64(%r12),%xmm11 - pxor %xmm10,%xmm1 - movdqu 80(%r12),%xmm12 - pxor %xmm11,%xmm6 - movdqu 96(%r12),%xmm13 - pxor %xmm12,%xmm2 - movdqu 112(%r12),%xmm14 - pxor %xmm13,%xmm4 - movdqu %xmm15,0(%r13) - leaq 128(%r12),%r12 - movdqu %xmm0,16(%r13) - movdqu %xmm5,32(%r13) - movdqu %xmm3,48(%r13) - movdqu %xmm1,64(%r13) - movdqu %xmm6,80(%r13) - movdqu %xmm2,96(%r13) - movdqu %xmm4,112(%r13) - leaq 128(%r13),%r13 - subq $8,%r14 - jnc L$cbc_dec_loop - - addq $8,%r14 - jz L$cbc_dec_done - - movdqu 0(%r12),%xmm15 - movq %rsp,%rax - movl %edx,%r10d - cmpq $2,%r14 - jb L$cbc_dec_one - movdqu 16(%r12),%xmm0 - je L$cbc_dec_two - movdqu 32(%r12),%xmm1 - cmpq $4,%r14 - jb L$cbc_dec_three - movdqu 48(%r12),%xmm2 - je L$cbc_dec_four - movdqu 64(%r12),%xmm3 - cmpq $6,%r14 - jb L$cbc_dec_five - movdqu 80(%r12),%xmm4 - je L$cbc_dec_six - movdqu 96(%r12),%xmm5 - movdqa %xmm14,32(%rbp) - call _bsaes_decrypt8 - pxor 32(%rbp),%xmm15 - movdqu 0(%r12),%xmm7 - movdqu 16(%r12),%xmm8 - pxor %xmm7,%xmm0 - movdqu 32(%r12),%xmm9 - pxor %xmm8,%xmm5 - movdqu 48(%r12),%xmm10 - pxor %xmm9,%xmm3 - movdqu 64(%r12),%xmm11 - pxor %xmm10,%xmm1 - movdqu 80(%r12),%xmm12 - pxor %xmm11,%xmm6 - movdqu 96(%r12),%xmm14 - pxor %xmm12,%xmm2 - movdqu %xmm15,0(%r13) - movdqu %xmm0,16(%r13) - movdqu %xmm5,32(%r13) - movdqu %xmm3,48(%r13) - movdqu %xmm1,64(%r13) - movdqu %xmm6,80(%r13) - movdqu %xmm2,96(%r13) - jmp L$cbc_dec_done -.p2align 4 -L$cbc_dec_six: - movdqa %xmm14,32(%rbp) - call _bsaes_decrypt8 - pxor 32(%rbp),%xmm15 - movdqu 0(%r12),%xmm7 - movdqu 16(%r12),%xmm8 - pxor %xmm7,%xmm0 - movdqu 32(%r12),%xmm9 - pxor %xmm8,%xmm5 - movdqu 48(%r12),%xmm10 - pxor %xmm9,%xmm3 - movdqu 64(%r12),%xmm11 - pxor %xmm10,%xmm1 - movdqu 80(%r12),%xmm14 - pxor %xmm11,%xmm6 - movdqu %xmm15,0(%r13) - movdqu %xmm0,16(%r13) - movdqu %xmm5,32(%r13) - movdqu %xmm3,48(%r13) - movdqu %xmm1,64(%r13) - movdqu %xmm6,80(%r13) - jmp L$cbc_dec_done -.p2align 4 -L$cbc_dec_five: - movdqa %xmm14,32(%rbp) - call _bsaes_decrypt8 - pxor 32(%rbp),%xmm15 - movdqu 0(%r12),%xmm7 - movdqu 16(%r12),%xmm8 - pxor %xmm7,%xmm0 - movdqu 32(%r12),%xmm9 - pxor %xmm8,%xmm5 - movdqu 48(%r12),%xmm10 - pxor %xmm9,%xmm3 - movdqu 64(%r12),%xmm14 - pxor %xmm10,%xmm1 - movdqu %xmm15,0(%r13) - movdqu %xmm0,16(%r13) - movdqu %xmm5,32(%r13) - movdqu %xmm3,48(%r13) - movdqu %xmm1,64(%r13) - jmp L$cbc_dec_done -.p2align 4 -L$cbc_dec_four: - movdqa %xmm14,32(%rbp) - call _bsaes_decrypt8 - pxor 32(%rbp),%xmm15 - movdqu 0(%r12),%xmm7 - movdqu 16(%r12),%xmm8 - pxor %xmm7,%xmm0 - movdqu 32(%r12),%xmm9 - pxor %xmm8,%xmm5 - movdqu 48(%r12),%xmm14 - pxor %xmm9,%xmm3 - movdqu %xmm15,0(%r13) - movdqu %xmm0,16(%r13) - movdqu %xmm5,32(%r13) - movdqu %xmm3,48(%r13) - jmp L$cbc_dec_done -.p2align 4 -L$cbc_dec_three: - movdqa %xmm14,32(%rbp) - call _bsaes_decrypt8 - pxor 32(%rbp),%xmm15 - movdqu 0(%r12),%xmm7 - movdqu 16(%r12),%xmm8 - pxor %xmm7,%xmm0 - movdqu 32(%r12),%xmm14 - pxor %xmm8,%xmm5 - movdqu %xmm15,0(%r13) - movdqu %xmm0,16(%r13) - movdqu %xmm5,32(%r13) - jmp L$cbc_dec_done -.p2align 4 -L$cbc_dec_two: - movdqa %xmm14,32(%rbp) - call _bsaes_decrypt8 - pxor 32(%rbp),%xmm15 - movdqu 0(%r12),%xmm7 - movdqu 16(%r12),%xmm14 - pxor %xmm7,%xmm0 - movdqu %xmm15,0(%r13) - movdqu %xmm0,16(%r13) - jmp L$cbc_dec_done -.p2align 4 -L$cbc_dec_one: - leaq (%r12),%rdi - leaq 32(%rbp),%rsi - leaq (%r15),%rdx - call _asm_AES_decrypt - pxor 32(%rbp),%xmm14 - movdqu %xmm14,(%r13) - movdqa %xmm15,%xmm14 - -L$cbc_dec_done: - movdqu %xmm14,(%rbx) - leaq (%rsp),%rax - pxor %xmm0,%xmm0 -L$cbc_dec_bzero: - movdqa %xmm0,0(%rax) - movdqa %xmm0,16(%rax) - leaq 32(%rax),%rax - cmpq %rax,%rbp - ja L$cbc_dec_bzero - - leaq (%rbp),%rsp - movq 72(%rsp),%r15 - movq 80(%rsp),%r14 - movq 88(%rsp),%r13 - movq 96(%rsp),%r12 - movq 104(%rsp),%rbx - movq 112(%rsp),%rax - leaq 120(%rsp),%rsp - movq %rax,%rbp -L$cbc_dec_epilogue: - .byte 0xf3,0xc3 - - -.globl _bsaes_ctr32_encrypt_blocks -.private_extern _bsaes_ctr32_encrypt_blocks - -.p2align 4 -_bsaes_ctr32_encrypt_blocks: - movq %rsp,%rax -L$ctr_enc_prologue: - pushq %rbp - pushq %rbx - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - leaq -72(%rsp),%rsp - movq %rsp,%rbp - movdqu (%r8),%xmm0 - movl 240(%rcx),%eax - movq %rdi,%r12 - movq %rsi,%r13 - movq %rdx,%r14 - movq %rcx,%r15 - movdqa %xmm0,32(%rbp) - cmpq $8,%rdx - jb L$ctr_enc_short - - movl %eax,%ebx - shlq $7,%rax - subq $96,%rax - subq %rax,%rsp - - movq %rsp,%rax - movq %r15,%rcx - movl %ebx,%r10d - call _bsaes_key_convert - pxor %xmm6,%xmm7 - movdqa %xmm7,(%rax) - - movdqa (%rsp),%xmm8 - leaq L$ADD1(%rip),%r11 - movdqa 32(%rbp),%xmm15 - movdqa -32(%r11),%xmm7 -.byte 102,68,15,56,0,199 -.byte 102,68,15,56,0,255 - movdqa %xmm8,(%rsp) - jmp L$ctr_enc_loop -.p2align 4 -L$ctr_enc_loop: - movdqa %xmm15,32(%rbp) - movdqa %xmm15,%xmm0 - movdqa %xmm15,%xmm1 - paddd 0(%r11),%xmm0 - movdqa %xmm15,%xmm2 - paddd 16(%r11),%xmm1 - movdqa %xmm15,%xmm3 - paddd 32(%r11),%xmm2 - movdqa %xmm15,%xmm4 - paddd 48(%r11),%xmm3 - movdqa %xmm15,%xmm5 - paddd 64(%r11),%xmm4 - movdqa %xmm15,%xmm6 - paddd 80(%r11),%xmm5 - paddd 96(%r11),%xmm6 - - - - movdqa (%rsp),%xmm8 - leaq 16(%rsp),%rax - movdqa -16(%r11),%xmm7 - pxor %xmm8,%xmm15 - pxor %xmm8,%xmm0 - pxor %xmm8,%xmm1 - pxor %xmm8,%xmm2 -.byte 102,68,15,56,0,255 -.byte 102,15,56,0,199 - pxor %xmm8,%xmm3 - pxor %xmm8,%xmm4 -.byte 102,15,56,0,207 -.byte 102,15,56,0,215 - pxor %xmm8,%xmm5 - pxor %xmm8,%xmm6 -.byte 102,15,56,0,223 -.byte 102,15,56,0,231 -.byte 102,15,56,0,239 -.byte 102,15,56,0,247 - leaq L$BS0(%rip),%r11 - movl %ebx,%r10d - - call _bsaes_encrypt8_bitslice - - subq $8,%r14 - jc L$ctr_enc_loop_done - - movdqu 0(%r12),%xmm7 - movdqu 16(%r12),%xmm8 - movdqu 32(%r12),%xmm9 - movdqu 48(%r12),%xmm10 - movdqu 64(%r12),%xmm11 - movdqu 80(%r12),%xmm12 - movdqu 96(%r12),%xmm13 - movdqu 112(%r12),%xmm14 - leaq 128(%r12),%r12 - pxor %xmm15,%xmm7 - movdqa 32(%rbp),%xmm15 - pxor %xmm8,%xmm0 - movdqu %xmm7,0(%r13) - pxor %xmm9,%xmm3 - movdqu %xmm0,16(%r13) - pxor %xmm10,%xmm5 - movdqu %xmm3,32(%r13) - pxor %xmm11,%xmm2 - movdqu %xmm5,48(%r13) - pxor %xmm12,%xmm6 - movdqu %xmm2,64(%r13) - pxor %xmm13,%xmm1 - movdqu %xmm6,80(%r13) - pxor %xmm14,%xmm4 - movdqu %xmm1,96(%r13) - leaq L$ADD1(%rip),%r11 - movdqu %xmm4,112(%r13) - leaq 128(%r13),%r13 - paddd 112(%r11),%xmm15 - jnz L$ctr_enc_loop - - jmp L$ctr_enc_done -.p2align 4 -L$ctr_enc_loop_done: - addq $8,%r14 - movdqu 0(%r12),%xmm7 - pxor %xmm7,%xmm15 - movdqu %xmm15,0(%r13) - cmpq $2,%r14 - jb L$ctr_enc_done - movdqu 16(%r12),%xmm8 - pxor %xmm8,%xmm0 - movdqu %xmm0,16(%r13) - je L$ctr_enc_done - movdqu 32(%r12),%xmm9 - pxor %xmm9,%xmm3 - movdqu %xmm3,32(%r13) - cmpq $4,%r14 - jb L$ctr_enc_done - movdqu 48(%r12),%xmm10 - pxor %xmm10,%xmm5 - movdqu %xmm5,48(%r13) - je L$ctr_enc_done - movdqu 64(%r12),%xmm11 - pxor %xmm11,%xmm2 - movdqu %xmm2,64(%r13) - cmpq $6,%r14 - jb L$ctr_enc_done - movdqu 80(%r12),%xmm12 - pxor %xmm12,%xmm6 - movdqu %xmm6,80(%r13) - je L$ctr_enc_done - movdqu 96(%r12),%xmm13 - pxor %xmm13,%xmm1 - movdqu %xmm1,96(%r13) - jmp L$ctr_enc_done - -.p2align 4 -L$ctr_enc_short: - leaq 32(%rbp),%rdi - leaq 48(%rbp),%rsi - leaq (%r15),%rdx - call _asm_AES_encrypt - movdqu (%r12),%xmm0 - leaq 16(%r12),%r12 - movl 44(%rbp),%eax - bswapl %eax - pxor 48(%rbp),%xmm0 - incl %eax - movdqu %xmm0,(%r13) - bswapl %eax - leaq 16(%r13),%r13 - movl %eax,44(%rsp) - decq %r14 - jnz L$ctr_enc_short - -L$ctr_enc_done: - leaq (%rsp),%rax - pxor %xmm0,%xmm0 -L$ctr_enc_bzero: - movdqa %xmm0,0(%rax) - movdqa %xmm0,16(%rax) - leaq 32(%rax),%rax - cmpq %rax,%rbp - ja L$ctr_enc_bzero - - leaq (%rbp),%rsp - movq 72(%rsp),%r15 - movq 80(%rsp),%r14 - movq 88(%rsp),%r13 - movq 96(%rsp),%r12 - movq 104(%rsp),%rbx - movq 112(%rsp),%rax - leaq 120(%rsp),%rsp - movq %rax,%rbp -L$ctr_enc_epilogue: - .byte 0xf3,0xc3 - -.globl _bsaes_xts_encrypt -.private_extern _bsaes_xts_encrypt - -.p2align 4 -_bsaes_xts_encrypt: - movq %rsp,%rax -L$xts_enc_prologue: - pushq %rbp - pushq %rbx - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - leaq -72(%rsp),%rsp - movq %rsp,%rbp - movq %rdi,%r12 - movq %rsi,%r13 - movq %rdx,%r14 - movq %rcx,%r15 - - leaq (%r9),%rdi - leaq 32(%rbp),%rsi - leaq (%r8),%rdx - call _asm_AES_encrypt - - movl 240(%r15),%eax - movq %r14,%rbx - - movl %eax,%edx - shlq $7,%rax - subq $96,%rax - subq %rax,%rsp - - movq %rsp,%rax - movq %r15,%rcx - movl %edx,%r10d - call _bsaes_key_convert - pxor %xmm6,%xmm7 - movdqa %xmm7,(%rax) - - andq $-16,%r14 - subq $128,%rsp - movdqa 32(%rbp),%xmm6 - - pxor %xmm14,%xmm14 - movdqa L$xts_magic(%rip),%xmm12 - pcmpgtd %xmm6,%xmm14 - - subq $128,%r14 - jc L$xts_enc_short - jmp L$xts_enc_loop - -.p2align 4 -L$xts_enc_loop: - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm15 - movdqa %xmm6,0(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm0 - movdqa %xmm6,16(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 0(%r12),%xmm7 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm1 - movdqa %xmm6,32(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 16(%r12),%xmm8 - pxor %xmm7,%xmm15 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm2 - movdqa %xmm6,48(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 32(%r12),%xmm9 - pxor %xmm8,%xmm0 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm3 - movdqa %xmm6,64(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 48(%r12),%xmm10 - pxor %xmm9,%xmm1 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm4 - movdqa %xmm6,80(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 64(%r12),%xmm11 - pxor %xmm10,%xmm2 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm5 - movdqa %xmm6,96(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 80(%r12),%xmm12 - pxor %xmm11,%xmm3 - movdqu 96(%r12),%xmm13 - pxor %xmm12,%xmm4 - movdqu 112(%r12),%xmm14 - leaq 128(%r12),%r12 - movdqa %xmm6,112(%rsp) - pxor %xmm13,%xmm5 - leaq 128(%rsp),%rax - pxor %xmm14,%xmm6 - movl %edx,%r10d - - call _bsaes_encrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm3 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm5 - movdqu %xmm3,32(%r13) - pxor 64(%rsp),%xmm2 - movdqu %xmm5,48(%r13) - pxor 80(%rsp),%xmm6 - movdqu %xmm2,64(%r13) - pxor 96(%rsp),%xmm1 - movdqu %xmm6,80(%r13) - pxor 112(%rsp),%xmm4 - movdqu %xmm1,96(%r13) - movdqu %xmm4,112(%r13) - leaq 128(%r13),%r13 - - movdqa 112(%rsp),%xmm6 - pxor %xmm14,%xmm14 - movdqa L$xts_magic(%rip),%xmm12 - pcmpgtd %xmm6,%xmm14 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - - subq $128,%r14 - jnc L$xts_enc_loop - -L$xts_enc_short: - addq $128,%r14 - jz L$xts_enc_done - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm15 - movdqa %xmm6,0(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm0 - movdqa %xmm6,16(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 0(%r12),%xmm7 - cmpq $16,%r14 - je L$xts_enc_1 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm1 - movdqa %xmm6,32(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 16(%r12),%xmm8 - cmpq $32,%r14 - je L$xts_enc_2 - pxor %xmm7,%xmm15 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm2 - movdqa %xmm6,48(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 32(%r12),%xmm9 - cmpq $48,%r14 - je L$xts_enc_3 - pxor %xmm8,%xmm0 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm3 - movdqa %xmm6,64(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 48(%r12),%xmm10 - cmpq $64,%r14 - je L$xts_enc_4 - pxor %xmm9,%xmm1 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm4 - movdqa %xmm6,80(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 64(%r12),%xmm11 - cmpq $80,%r14 - je L$xts_enc_5 - pxor %xmm10,%xmm2 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm5 - movdqa %xmm6,96(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 80(%r12),%xmm12 - cmpq $96,%r14 - je L$xts_enc_6 - pxor %xmm11,%xmm3 - movdqu 96(%r12),%xmm13 - pxor %xmm12,%xmm4 - movdqa %xmm6,112(%rsp) - leaq 112(%r12),%r12 - pxor %xmm13,%xmm5 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_encrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm3 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm5 - movdqu %xmm3,32(%r13) - pxor 64(%rsp),%xmm2 - movdqu %xmm5,48(%r13) - pxor 80(%rsp),%xmm6 - movdqu %xmm2,64(%r13) - pxor 96(%rsp),%xmm1 - movdqu %xmm6,80(%r13) - movdqu %xmm1,96(%r13) - leaq 112(%r13),%r13 - - movdqa 112(%rsp),%xmm6 - jmp L$xts_enc_done -.p2align 4 -L$xts_enc_6: - pxor %xmm11,%xmm3 - leaq 96(%r12),%r12 - pxor %xmm12,%xmm4 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_encrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm3 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm5 - movdqu %xmm3,32(%r13) - pxor 64(%rsp),%xmm2 - movdqu %xmm5,48(%r13) - pxor 80(%rsp),%xmm6 - movdqu %xmm2,64(%r13) - movdqu %xmm6,80(%r13) - leaq 96(%r13),%r13 - - movdqa 96(%rsp),%xmm6 - jmp L$xts_enc_done -.p2align 4 -L$xts_enc_5: - pxor %xmm10,%xmm2 - leaq 80(%r12),%r12 - pxor %xmm11,%xmm3 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_encrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm3 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm5 - movdqu %xmm3,32(%r13) - pxor 64(%rsp),%xmm2 - movdqu %xmm5,48(%r13) - movdqu %xmm2,64(%r13) - leaq 80(%r13),%r13 - - movdqa 80(%rsp),%xmm6 - jmp L$xts_enc_done -.p2align 4 -L$xts_enc_4: - pxor %xmm9,%xmm1 - leaq 64(%r12),%r12 - pxor %xmm10,%xmm2 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_encrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm3 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm5 - movdqu %xmm3,32(%r13) - movdqu %xmm5,48(%r13) - leaq 64(%r13),%r13 - - movdqa 64(%rsp),%xmm6 - jmp L$xts_enc_done -.p2align 4 -L$xts_enc_3: - pxor %xmm8,%xmm0 - leaq 48(%r12),%r12 - pxor %xmm9,%xmm1 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_encrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm3 - movdqu %xmm0,16(%r13) - movdqu %xmm3,32(%r13) - leaq 48(%r13),%r13 - - movdqa 48(%rsp),%xmm6 - jmp L$xts_enc_done -.p2align 4 -L$xts_enc_2: - pxor %xmm7,%xmm15 - leaq 32(%r12),%r12 - pxor %xmm8,%xmm0 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_encrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - movdqu %xmm0,16(%r13) - leaq 32(%r13),%r13 - - movdqa 32(%rsp),%xmm6 - jmp L$xts_enc_done -.p2align 4 -L$xts_enc_1: - pxor %xmm15,%xmm7 - leaq 16(%r12),%r12 - movdqa %xmm7,32(%rbp) - leaq 32(%rbp),%rdi - leaq 32(%rbp),%rsi - leaq (%r15),%rdx - call _asm_AES_encrypt - pxor 32(%rbp),%xmm15 - - - - - - movdqu %xmm15,0(%r13) - leaq 16(%r13),%r13 - - movdqa 16(%rsp),%xmm6 - -L$xts_enc_done: - andl $15,%ebx - jz L$xts_enc_ret - movq %r13,%rdx - -L$xts_enc_steal: - movzbl (%r12),%eax - movzbl -16(%rdx),%ecx - leaq 1(%r12),%r12 - movb %al,-16(%rdx) - movb %cl,0(%rdx) - leaq 1(%rdx),%rdx - subl $1,%ebx - jnz L$xts_enc_steal - - movdqu -16(%r13),%xmm15 - leaq 32(%rbp),%rdi - pxor %xmm6,%xmm15 - leaq 32(%rbp),%rsi - movdqa %xmm15,32(%rbp) - leaq (%r15),%rdx - call _asm_AES_encrypt - pxor 32(%rbp),%xmm6 - movdqu %xmm6,-16(%r13) - -L$xts_enc_ret: - leaq (%rsp),%rax - pxor %xmm0,%xmm0 -L$xts_enc_bzero: - movdqa %xmm0,0(%rax) - movdqa %xmm0,16(%rax) - leaq 32(%rax),%rax - cmpq %rax,%rbp - ja L$xts_enc_bzero - - leaq (%rbp),%rsp - movq 72(%rsp),%r15 - movq 80(%rsp),%r14 - movq 88(%rsp),%r13 - movq 96(%rsp),%r12 - movq 104(%rsp),%rbx - movq 112(%rsp),%rax - leaq 120(%rsp),%rsp - movq %rax,%rbp -L$xts_enc_epilogue: - .byte 0xf3,0xc3 - - -.globl _bsaes_xts_decrypt -.private_extern _bsaes_xts_decrypt - -.p2align 4 -_bsaes_xts_decrypt: - movq %rsp,%rax -L$xts_dec_prologue: - pushq %rbp - pushq %rbx - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - leaq -72(%rsp),%rsp - movq %rsp,%rbp - movq %rdi,%r12 - movq %rsi,%r13 - movq %rdx,%r14 - movq %rcx,%r15 - - leaq (%r9),%rdi - leaq 32(%rbp),%rsi - leaq (%r8),%rdx - call _asm_AES_encrypt - - movl 240(%r15),%eax - movq %r14,%rbx - - movl %eax,%edx - shlq $7,%rax - subq $96,%rax - subq %rax,%rsp - - movq %rsp,%rax - movq %r15,%rcx - movl %edx,%r10d - call _bsaes_key_convert - pxor (%rsp),%xmm7 - movdqa %xmm6,(%rax) - movdqa %xmm7,(%rsp) - - xorl %eax,%eax - andq $-16,%r14 - testl $15,%ebx - setnz %al - shlq $4,%rax - subq %rax,%r14 - - subq $128,%rsp - movdqa 32(%rbp),%xmm6 - - pxor %xmm14,%xmm14 - movdqa L$xts_magic(%rip),%xmm12 - pcmpgtd %xmm6,%xmm14 - - subq $128,%r14 - jc L$xts_dec_short - jmp L$xts_dec_loop - -.p2align 4 -L$xts_dec_loop: - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm15 - movdqa %xmm6,0(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm0 - movdqa %xmm6,16(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 0(%r12),%xmm7 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm1 - movdqa %xmm6,32(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 16(%r12),%xmm8 - pxor %xmm7,%xmm15 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm2 - movdqa %xmm6,48(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 32(%r12),%xmm9 - pxor %xmm8,%xmm0 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm3 - movdqa %xmm6,64(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 48(%r12),%xmm10 - pxor %xmm9,%xmm1 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm4 - movdqa %xmm6,80(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 64(%r12),%xmm11 - pxor %xmm10,%xmm2 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm5 - movdqa %xmm6,96(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 80(%r12),%xmm12 - pxor %xmm11,%xmm3 - movdqu 96(%r12),%xmm13 - pxor %xmm12,%xmm4 - movdqu 112(%r12),%xmm14 - leaq 128(%r12),%r12 - movdqa %xmm6,112(%rsp) - pxor %xmm13,%xmm5 - leaq 128(%rsp),%rax - pxor %xmm14,%xmm6 - movl %edx,%r10d - - call _bsaes_decrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm5 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm3 - movdqu %xmm5,32(%r13) - pxor 64(%rsp),%xmm1 - movdqu %xmm3,48(%r13) - pxor 80(%rsp),%xmm6 - movdqu %xmm1,64(%r13) - pxor 96(%rsp),%xmm2 - movdqu %xmm6,80(%r13) - pxor 112(%rsp),%xmm4 - movdqu %xmm2,96(%r13) - movdqu %xmm4,112(%r13) - leaq 128(%r13),%r13 - - movdqa 112(%rsp),%xmm6 - pxor %xmm14,%xmm14 - movdqa L$xts_magic(%rip),%xmm12 - pcmpgtd %xmm6,%xmm14 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - - subq $128,%r14 - jnc L$xts_dec_loop - -L$xts_dec_short: - addq $128,%r14 - jz L$xts_dec_done - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm15 - movdqa %xmm6,0(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm0 - movdqa %xmm6,16(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 0(%r12),%xmm7 - cmpq $16,%r14 - je L$xts_dec_1 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm1 - movdqa %xmm6,32(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 16(%r12),%xmm8 - cmpq $32,%r14 - je L$xts_dec_2 - pxor %xmm7,%xmm15 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm2 - movdqa %xmm6,48(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 32(%r12),%xmm9 - cmpq $48,%r14 - je L$xts_dec_3 - pxor %xmm8,%xmm0 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm3 - movdqa %xmm6,64(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 48(%r12),%xmm10 - cmpq $64,%r14 - je L$xts_dec_4 - pxor %xmm9,%xmm1 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm4 - movdqa %xmm6,80(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 64(%r12),%xmm11 - cmpq $80,%r14 - je L$xts_dec_5 - pxor %xmm10,%xmm2 - pshufd $19,%xmm14,%xmm13 - pxor %xmm14,%xmm14 - movdqa %xmm6,%xmm5 - movdqa %xmm6,96(%rsp) - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - pcmpgtd %xmm6,%xmm14 - pxor %xmm13,%xmm6 - movdqu 80(%r12),%xmm12 - cmpq $96,%r14 - je L$xts_dec_6 - pxor %xmm11,%xmm3 - movdqu 96(%r12),%xmm13 - pxor %xmm12,%xmm4 - movdqa %xmm6,112(%rsp) - leaq 112(%r12),%r12 - pxor %xmm13,%xmm5 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_decrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm5 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm3 - movdqu %xmm5,32(%r13) - pxor 64(%rsp),%xmm1 - movdqu %xmm3,48(%r13) - pxor 80(%rsp),%xmm6 - movdqu %xmm1,64(%r13) - pxor 96(%rsp),%xmm2 - movdqu %xmm6,80(%r13) - movdqu %xmm2,96(%r13) - leaq 112(%r13),%r13 - - movdqa 112(%rsp),%xmm6 - jmp L$xts_dec_done -.p2align 4 -L$xts_dec_6: - pxor %xmm11,%xmm3 - leaq 96(%r12),%r12 - pxor %xmm12,%xmm4 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_decrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm5 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm3 - movdqu %xmm5,32(%r13) - pxor 64(%rsp),%xmm1 - movdqu %xmm3,48(%r13) - pxor 80(%rsp),%xmm6 - movdqu %xmm1,64(%r13) - movdqu %xmm6,80(%r13) - leaq 96(%r13),%r13 - - movdqa 96(%rsp),%xmm6 - jmp L$xts_dec_done -.p2align 4 -L$xts_dec_5: - pxor %xmm10,%xmm2 - leaq 80(%r12),%r12 - pxor %xmm11,%xmm3 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_decrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm5 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm3 - movdqu %xmm5,32(%r13) - pxor 64(%rsp),%xmm1 - movdqu %xmm3,48(%r13) - movdqu %xmm1,64(%r13) - leaq 80(%r13),%r13 - - movdqa 80(%rsp),%xmm6 - jmp L$xts_dec_done -.p2align 4 -L$xts_dec_4: - pxor %xmm9,%xmm1 - leaq 64(%r12),%r12 - pxor %xmm10,%xmm2 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_decrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm5 - movdqu %xmm0,16(%r13) - pxor 48(%rsp),%xmm3 - movdqu %xmm5,32(%r13) - movdqu %xmm3,48(%r13) - leaq 64(%r13),%r13 - - movdqa 64(%rsp),%xmm6 - jmp L$xts_dec_done -.p2align 4 -L$xts_dec_3: - pxor %xmm8,%xmm0 - leaq 48(%r12),%r12 - pxor %xmm9,%xmm1 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_decrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - pxor 32(%rsp),%xmm5 - movdqu %xmm0,16(%r13) - movdqu %xmm5,32(%r13) - leaq 48(%r13),%r13 - - movdqa 48(%rsp),%xmm6 - jmp L$xts_dec_done -.p2align 4 -L$xts_dec_2: - pxor %xmm7,%xmm15 - leaq 32(%r12),%r12 - pxor %xmm8,%xmm0 - leaq 128(%rsp),%rax - movl %edx,%r10d - - call _bsaes_decrypt8 - - pxor 0(%rsp),%xmm15 - pxor 16(%rsp),%xmm0 - movdqu %xmm15,0(%r13) - movdqu %xmm0,16(%r13) - leaq 32(%r13),%r13 - - movdqa 32(%rsp),%xmm6 - jmp L$xts_dec_done -.p2align 4 -L$xts_dec_1: - pxor %xmm15,%xmm7 - leaq 16(%r12),%r12 - movdqa %xmm7,32(%rbp) - leaq 32(%rbp),%rdi - leaq 32(%rbp),%rsi - leaq (%r15),%rdx - call _asm_AES_decrypt - pxor 32(%rbp),%xmm15 - - - - - - movdqu %xmm15,0(%r13) - leaq 16(%r13),%r13 - - movdqa 16(%rsp),%xmm6 - -L$xts_dec_done: - andl $15,%ebx - jz L$xts_dec_ret - - pxor %xmm14,%xmm14 - movdqa L$xts_magic(%rip),%xmm12 - pcmpgtd %xmm6,%xmm14 - pshufd $19,%xmm14,%xmm13 - movdqa %xmm6,%xmm5 - paddq %xmm6,%xmm6 - pand %xmm12,%xmm13 - movdqu (%r12),%xmm15 - pxor %xmm13,%xmm6 - - leaq 32(%rbp),%rdi - pxor %xmm6,%xmm15 - leaq 32(%rbp),%rsi - movdqa %xmm15,32(%rbp) - leaq (%r15),%rdx - call _asm_AES_decrypt - pxor 32(%rbp),%xmm6 - movq %r13,%rdx - movdqu %xmm6,(%r13) - -L$xts_dec_steal: - movzbl 16(%r12),%eax - movzbl (%rdx),%ecx - leaq 1(%r12),%r12 - movb %al,(%rdx) - movb %cl,16(%rdx) - leaq 1(%rdx),%rdx - subl $1,%ebx - jnz L$xts_dec_steal - - movdqu (%r13),%xmm15 - leaq 32(%rbp),%rdi - pxor %xmm5,%xmm15 - leaq 32(%rbp),%rsi - movdqa %xmm15,32(%rbp) - leaq (%r15),%rdx - call _asm_AES_decrypt - pxor 32(%rbp),%xmm5 - movdqu %xmm5,(%r13) - -L$xts_dec_ret: - leaq (%rsp),%rax - pxor %xmm0,%xmm0 -L$xts_dec_bzero: - movdqa %xmm0,0(%rax) - movdqa %xmm0,16(%rax) - leaq 32(%rax),%rax - cmpq %rax,%rbp - ja L$xts_dec_bzero - - leaq (%rbp),%rsp - movq 72(%rsp),%r15 - movq 80(%rsp),%r14 - movq 88(%rsp),%r13 - movq 96(%rsp),%r12 - movq 104(%rsp),%rbx - movq 112(%rsp),%rax - leaq 120(%rsp),%rsp - movq %rax,%rbp -L$xts_dec_epilogue: - .byte 0xf3,0xc3 - - -.p2align 6 -_bsaes_const: -L$M0ISR: -.quad 0x0a0e0206070b0f03, 0x0004080c0d010509 -L$ISRM0: -.quad 0x01040b0e0205080f, 0x0306090c00070a0d -L$ISR: -.quad 0x0504070602010003, 0x0f0e0d0c080b0a09 -L$BS0: -.quad 0x5555555555555555, 0x5555555555555555 -L$BS1: -.quad 0x3333333333333333, 0x3333333333333333 -L$BS2: -.quad 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f -L$SR: -.quad 0x0504070600030201, 0x0f0e0d0c0a09080b -L$SRM0: -.quad 0x0304090e00050a0f, 0x01060b0c0207080d -L$M0SR: -.quad 0x0a0e02060f03070b, 0x0004080c05090d01 -L$SWPUP: -.quad 0x0706050403020100, 0x0c0d0e0f0b0a0908 -L$SWPUPM0SR: -.quad 0x0a0d02060c03070b, 0x0004080f05090e01 -L$ADD1: -.quad 0x0000000000000000, 0x0000000100000000 -L$ADD2: -.quad 0x0000000000000000, 0x0000000200000000 -L$ADD3: -.quad 0x0000000000000000, 0x0000000300000000 -L$ADD4: -.quad 0x0000000000000000, 0x0000000400000000 -L$ADD5: -.quad 0x0000000000000000, 0x0000000500000000 -L$ADD6: -.quad 0x0000000000000000, 0x0000000600000000 -L$ADD7: -.quad 0x0000000000000000, 0x0000000700000000 -L$ADD8: -.quad 0x0000000000000000, 0x0000000800000000 -L$xts_magic: -.long 0x87,0,1,0 -L$masks: -.quad 0x0101010101010101, 0x0101010101010101 -.quad 0x0202020202020202, 0x0202020202020202 -.quad 0x0404040404040404, 0x0404040404040404 -.quad 0x0808080808080808, 0x0808080808080808 -L$M0: -.quad 0x02060a0e03070b0f, 0x0004080c0105090d -L$63: -.quad 0x6363636363636363, 0x6363636363636363 -.byte 66,105,116,45,115,108,105,99,101,100,32,65,69,83,32,102,111,114,32,120,56,54,95,54,52,47,83,83,83,69,51,44,32,69,109,105,108,105,97,32,75,195,164,115,112,101,114,44,32,80,101,116,101,114,32,83,99,104,119,97,98,101,44,32,65,110,100,121,32,80,111,108,121,97,107,111,118,0 -.p2align 6 - -#endif diff --git a/third_party/boringssl/mac-x86_64/crypto/aes/vpaes-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/aes/vpaes-x86_64.S deleted file mode 100644 index 711ea4372659e..0000000000000 --- a/third_party/boringssl/mac-x86_64/crypto/aes/vpaes-x86_64.S +++ /dev/null @@ -1,834 +0,0 @@ -#if defined(__x86_64__) -.text - - - - - - - - - - - - - - - - - -.p2align 4 -_vpaes_encrypt_core: - movq %rdx,%r9 - movq $16,%r11 - movl 240(%rdx),%eax - movdqa %xmm9,%xmm1 - movdqa L$k_ipt(%rip),%xmm2 - pandn %xmm0,%xmm1 - movdqu (%r9),%xmm5 - psrld $4,%xmm1 - pand %xmm9,%xmm0 -.byte 102,15,56,0,208 - movdqa L$k_ipt+16(%rip),%xmm0 -.byte 102,15,56,0,193 - pxor %xmm5,%xmm2 - addq $16,%r9 - pxor %xmm2,%xmm0 - leaq L$k_mc_backward(%rip),%r10 - jmp L$enc_entry - -.p2align 4 -L$enc_loop: - - movdqa %xmm13,%xmm4 - movdqa %xmm12,%xmm0 -.byte 102,15,56,0,226 -.byte 102,15,56,0,195 - pxor %xmm5,%xmm4 - movdqa %xmm15,%xmm5 - pxor %xmm4,%xmm0 - movdqa -64(%r11,%r10,1),%xmm1 -.byte 102,15,56,0,234 - movdqa (%r11,%r10,1),%xmm4 - movdqa %xmm14,%xmm2 -.byte 102,15,56,0,211 - movdqa %xmm0,%xmm3 - pxor %xmm5,%xmm2 -.byte 102,15,56,0,193 - addq $16,%r9 - pxor %xmm2,%xmm0 -.byte 102,15,56,0,220 - addq $16,%r11 - pxor %xmm0,%xmm3 -.byte 102,15,56,0,193 - andq $48,%r11 - subq $1,%rax - pxor %xmm3,%xmm0 - -L$enc_entry: - - movdqa %xmm9,%xmm1 - movdqa %xmm11,%xmm5 - pandn %xmm0,%xmm1 - psrld $4,%xmm1 - pand %xmm9,%xmm0 -.byte 102,15,56,0,232 - movdqa %xmm10,%xmm3 - pxor %xmm1,%xmm0 -.byte 102,15,56,0,217 - movdqa %xmm10,%xmm4 - pxor %xmm5,%xmm3 -.byte 102,15,56,0,224 - movdqa %xmm10,%xmm2 - pxor %xmm5,%xmm4 -.byte 102,15,56,0,211 - movdqa %xmm10,%xmm3 - pxor %xmm0,%xmm2 -.byte 102,15,56,0,220 - movdqu (%r9),%xmm5 - pxor %xmm1,%xmm3 - jnz L$enc_loop - - - movdqa -96(%r10),%xmm4 - movdqa -80(%r10),%xmm0 -.byte 102,15,56,0,226 - pxor %xmm5,%xmm4 -.byte 102,15,56,0,195 - movdqa 64(%r11,%r10,1),%xmm1 - pxor %xmm4,%xmm0 -.byte 102,15,56,0,193 - .byte 0xf3,0xc3 - - - - - - - - -.p2align 4 -_vpaes_decrypt_core: - movq %rdx,%r9 - movl 240(%rdx),%eax - movdqa %xmm9,%xmm1 - movdqa L$k_dipt(%rip),%xmm2 - pandn %xmm0,%xmm1 - movq %rax,%r11 - psrld $4,%xmm1 - movdqu (%r9),%xmm5 - shlq $4,%r11 - pand %xmm9,%xmm0 -.byte 102,15,56,0,208 - movdqa L$k_dipt+16(%rip),%xmm0 - xorq $48,%r11 - leaq L$k_dsbd(%rip),%r10 -.byte 102,15,56,0,193 - andq $48,%r11 - pxor %xmm5,%xmm2 - movdqa L$k_mc_forward+48(%rip),%xmm5 - pxor %xmm2,%xmm0 - addq $16,%r9 - addq %r10,%r11 - jmp L$dec_entry - -.p2align 4 -L$dec_loop: - - - - movdqa -32(%r10),%xmm4 - movdqa -16(%r10),%xmm1 -.byte 102,15,56,0,226 -.byte 102,15,56,0,203 - pxor %xmm4,%xmm0 - movdqa 0(%r10),%xmm4 - pxor %xmm1,%xmm0 - movdqa 16(%r10),%xmm1 - -.byte 102,15,56,0,226 -.byte 102,15,56,0,197 -.byte 102,15,56,0,203 - pxor %xmm4,%xmm0 - movdqa 32(%r10),%xmm4 - pxor %xmm1,%xmm0 - movdqa 48(%r10),%xmm1 - -.byte 102,15,56,0,226 -.byte 102,15,56,0,197 -.byte 102,15,56,0,203 - pxor %xmm4,%xmm0 - movdqa 64(%r10),%xmm4 - pxor %xmm1,%xmm0 - movdqa 80(%r10),%xmm1 - -.byte 102,15,56,0,226 -.byte 102,15,56,0,197 -.byte 102,15,56,0,203 - pxor %xmm4,%xmm0 - addq $16,%r9 -.byte 102,15,58,15,237,12 - pxor %xmm1,%xmm0 - subq $1,%rax - -L$dec_entry: - - movdqa %xmm9,%xmm1 - pandn %xmm0,%xmm1 - movdqa %xmm11,%xmm2 - psrld $4,%xmm1 - pand %xmm9,%xmm0 -.byte 102,15,56,0,208 - movdqa %xmm10,%xmm3 - pxor %xmm1,%xmm0 -.byte 102,15,56,0,217 - movdqa %xmm10,%xmm4 - pxor %xmm2,%xmm3 -.byte 102,15,56,0,224 - pxor %xmm2,%xmm4 - movdqa %xmm10,%xmm2 -.byte 102,15,56,0,211 - movdqa %xmm10,%xmm3 - pxor %xmm0,%xmm2 -.byte 102,15,56,0,220 - movdqu (%r9),%xmm0 - pxor %xmm1,%xmm3 - jnz L$dec_loop - - - movdqa 96(%r10),%xmm4 -.byte 102,15,56,0,226 - pxor %xmm0,%xmm4 - movdqa 112(%r10),%xmm0 - movdqa -352(%r11),%xmm2 -.byte 102,15,56,0,195 - pxor %xmm4,%xmm0 -.byte 102,15,56,0,194 - .byte 0xf3,0xc3 - - - - - - - - -.p2align 4 -_vpaes_schedule_core: - - - - - - call _vpaes_preheat - movdqa L$k_rcon(%rip),%xmm8 - movdqu (%rdi),%xmm0 - - - movdqa %xmm0,%xmm3 - leaq L$k_ipt(%rip),%r11 - call _vpaes_schedule_transform - movdqa %xmm0,%xmm7 - - leaq L$k_sr(%rip),%r10 - testq %rcx,%rcx - jnz L$schedule_am_decrypting - - - movdqu %xmm0,(%rdx) - jmp L$schedule_go - -L$schedule_am_decrypting: - - movdqa (%r8,%r10,1),%xmm1 -.byte 102,15,56,0,217 - movdqu %xmm3,(%rdx) - xorq $48,%r8 - -L$schedule_go: - cmpl $192,%esi - ja L$schedule_256 - je L$schedule_192 - - - - - - - - - - -L$schedule_128: - movl $10,%esi - -L$oop_schedule_128: - call _vpaes_schedule_round - decq %rsi - jz L$schedule_mangle_last - call _vpaes_schedule_mangle - jmp L$oop_schedule_128 - - - - - - - - - - - - - - - - -.p2align 4 -L$schedule_192: - movdqu 8(%rdi),%xmm0 - call _vpaes_schedule_transform - movdqa %xmm0,%xmm6 - pxor %xmm4,%xmm4 - movhlps %xmm4,%xmm6 - movl $4,%esi - -L$oop_schedule_192: - call _vpaes_schedule_round -.byte 102,15,58,15,198,8 - call _vpaes_schedule_mangle - call _vpaes_schedule_192_smear - call _vpaes_schedule_mangle - call _vpaes_schedule_round - decq %rsi - jz L$schedule_mangle_last - call _vpaes_schedule_mangle - call _vpaes_schedule_192_smear - jmp L$oop_schedule_192 - - - - - - - - - - - -.p2align 4 -L$schedule_256: - movdqu 16(%rdi),%xmm0 - call _vpaes_schedule_transform - movl $7,%esi - -L$oop_schedule_256: - call _vpaes_schedule_mangle - movdqa %xmm0,%xmm6 - - - call _vpaes_schedule_round - decq %rsi - jz L$schedule_mangle_last - call _vpaes_schedule_mangle - - - pshufd $255,%xmm0,%xmm0 - movdqa %xmm7,%xmm5 - movdqa %xmm6,%xmm7 - call _vpaes_schedule_low_round - movdqa %xmm5,%xmm7 - - jmp L$oop_schedule_256 - - - - - - - - - - - - -.p2align 4 -L$schedule_mangle_last: - - leaq L$k_deskew(%rip),%r11 - testq %rcx,%rcx - jnz L$schedule_mangle_last_dec - - - movdqa (%r8,%r10,1),%xmm1 -.byte 102,15,56,0,193 - leaq L$k_opt(%rip),%r11 - addq $32,%rdx - -L$schedule_mangle_last_dec: - addq $-16,%rdx - pxor L$k_s63(%rip),%xmm0 - call _vpaes_schedule_transform - movdqu %xmm0,(%rdx) - - - pxor %xmm0,%xmm0 - pxor %xmm1,%xmm1 - pxor %xmm2,%xmm2 - pxor %xmm3,%xmm3 - pxor %xmm4,%xmm4 - pxor %xmm5,%xmm5 - pxor %xmm6,%xmm6 - pxor %xmm7,%xmm7 - .byte 0xf3,0xc3 - - - - - - - - - - - - - - - - - -.p2align 4 -_vpaes_schedule_192_smear: - pshufd $128,%xmm6,%xmm1 - pshufd $254,%xmm7,%xmm0 - pxor %xmm1,%xmm6 - pxor %xmm1,%xmm1 - pxor %xmm0,%xmm6 - movdqa %xmm6,%xmm0 - movhlps %xmm1,%xmm6 - .byte 0xf3,0xc3 - - - - - - - - - - - - - - - - - - - - - -.p2align 4 -_vpaes_schedule_round: - - pxor %xmm1,%xmm1 -.byte 102,65,15,58,15,200,15 -.byte 102,69,15,58,15,192,15 - pxor %xmm1,%xmm7 - - - pshufd $255,%xmm0,%xmm0 -.byte 102,15,58,15,192,1 - - - - -_vpaes_schedule_low_round: - - movdqa %xmm7,%xmm1 - pslldq $4,%xmm7 - pxor %xmm1,%xmm7 - movdqa %xmm7,%xmm1 - pslldq $8,%xmm7 - pxor %xmm1,%xmm7 - pxor L$k_s63(%rip),%xmm7 - - - movdqa %xmm9,%xmm1 - pandn %xmm0,%xmm1 - psrld $4,%xmm1 - pand %xmm9,%xmm0 - movdqa %xmm11,%xmm2 -.byte 102,15,56,0,208 - pxor %xmm1,%xmm0 - movdqa %xmm10,%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 - movdqa %xmm10,%xmm4 -.byte 102,15,56,0,224 - pxor %xmm2,%xmm4 - movdqa %xmm10,%xmm2 -.byte 102,15,56,0,211 - pxor %xmm0,%xmm2 - movdqa %xmm10,%xmm3 -.byte 102,15,56,0,220 - pxor %xmm1,%xmm3 - movdqa %xmm13,%xmm4 -.byte 102,15,56,0,226 - movdqa %xmm12,%xmm0 -.byte 102,15,56,0,195 - pxor %xmm4,%xmm0 - - - pxor %xmm7,%xmm0 - movdqa %xmm0,%xmm7 - .byte 0xf3,0xc3 - - - - - - - - - - - - -.p2align 4 -_vpaes_schedule_transform: - movdqa %xmm9,%xmm1 - pandn %xmm0,%xmm1 - psrld $4,%xmm1 - pand %xmm9,%xmm0 - movdqa (%r11),%xmm2 -.byte 102,15,56,0,208 - movdqa 16(%r11),%xmm0 -.byte 102,15,56,0,193 - pxor %xmm2,%xmm0 - .byte 0xf3,0xc3 - - - - - - - - - - - - - - - - - - - - - - - - - - -.p2align 4 -_vpaes_schedule_mangle: - movdqa %xmm0,%xmm4 - movdqa L$k_mc_forward(%rip),%xmm5 - testq %rcx,%rcx - jnz L$schedule_mangle_dec - - - addq $16,%rdx - pxor L$k_s63(%rip),%xmm4 -.byte 102,15,56,0,229 - movdqa %xmm4,%xmm3 -.byte 102,15,56,0,229 - pxor %xmm4,%xmm3 -.byte 102,15,56,0,229 - pxor %xmm4,%xmm3 - - jmp L$schedule_mangle_both -.p2align 4 -L$schedule_mangle_dec: - - leaq L$k_dksd(%rip),%r11 - movdqa %xmm9,%xmm1 - pandn %xmm4,%xmm1 - psrld $4,%xmm1 - pand %xmm9,%xmm4 - - movdqa 0(%r11),%xmm2 -.byte 102,15,56,0,212 - movdqa 16(%r11),%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 -.byte 102,15,56,0,221 - - movdqa 32(%r11),%xmm2 -.byte 102,15,56,0,212 - pxor %xmm3,%xmm2 - movdqa 48(%r11),%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 -.byte 102,15,56,0,221 - - movdqa 64(%r11),%xmm2 -.byte 102,15,56,0,212 - pxor %xmm3,%xmm2 - movdqa 80(%r11),%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 -.byte 102,15,56,0,221 - - movdqa 96(%r11),%xmm2 -.byte 102,15,56,0,212 - pxor %xmm3,%xmm2 - movdqa 112(%r11),%xmm3 -.byte 102,15,56,0,217 - pxor %xmm2,%xmm3 - - addq $-16,%rdx - -L$schedule_mangle_both: - movdqa (%r8,%r10,1),%xmm1 -.byte 102,15,56,0,217 - addq $-16,%r8 - andq $48,%r8 - movdqu %xmm3,(%rdx) - .byte 0xf3,0xc3 - - - - - -.globl _vpaes_set_encrypt_key -.private_extern _vpaes_set_encrypt_key - -.p2align 4 -_vpaes_set_encrypt_key: - movl %esi,%eax - shrl $5,%eax - addl $5,%eax - movl %eax,240(%rdx) - - movl $0,%ecx - movl $48,%r8d - call _vpaes_schedule_core - xorl %eax,%eax - .byte 0xf3,0xc3 - - -.globl _vpaes_set_decrypt_key -.private_extern _vpaes_set_decrypt_key - -.p2align 4 -_vpaes_set_decrypt_key: - movl %esi,%eax - shrl $5,%eax - addl $5,%eax - movl %eax,240(%rdx) - shll $4,%eax - leaq 16(%rdx,%rax,1),%rdx - - movl $1,%ecx - movl %esi,%r8d - shrl $1,%r8d - andl $32,%r8d - xorl $32,%r8d - call _vpaes_schedule_core - xorl %eax,%eax - .byte 0xf3,0xc3 - - -.globl _vpaes_encrypt -.private_extern _vpaes_encrypt - -.p2align 4 -_vpaes_encrypt: - movdqu (%rdi),%xmm0 - call _vpaes_preheat - call _vpaes_encrypt_core - movdqu %xmm0,(%rsi) - .byte 0xf3,0xc3 - - -.globl _vpaes_decrypt -.private_extern _vpaes_decrypt - -.p2align 4 -_vpaes_decrypt: - movdqu (%rdi),%xmm0 - call _vpaes_preheat - call _vpaes_decrypt_core - movdqu %xmm0,(%rsi) - .byte 0xf3,0xc3 - -.globl _vpaes_cbc_encrypt -.private_extern _vpaes_cbc_encrypt - -.p2align 4 -_vpaes_cbc_encrypt: - xchgq %rcx,%rdx - subq $16,%rcx - jc L$cbc_abort - movdqu (%r8),%xmm6 - subq %rdi,%rsi - call _vpaes_preheat - cmpl $0,%r9d - je L$cbc_dec_loop - jmp L$cbc_enc_loop -.p2align 4 -L$cbc_enc_loop: - movdqu (%rdi),%xmm0 - pxor %xmm6,%xmm0 - call _vpaes_encrypt_core - movdqa %xmm0,%xmm6 - movdqu %xmm0,(%rsi,%rdi,1) - leaq 16(%rdi),%rdi - subq $16,%rcx - jnc L$cbc_enc_loop - jmp L$cbc_done -.p2align 4 -L$cbc_dec_loop: - movdqu (%rdi),%xmm0 - movdqa %xmm0,%xmm7 - call _vpaes_decrypt_core - pxor %xmm6,%xmm0 - movdqa %xmm7,%xmm6 - movdqu %xmm0,(%rsi,%rdi,1) - leaq 16(%rdi),%rdi - subq $16,%rcx - jnc L$cbc_dec_loop -L$cbc_done: - movdqu %xmm6,(%r8) -L$cbc_abort: - .byte 0xf3,0xc3 - - - - - - - - -.p2align 4 -_vpaes_preheat: - leaq L$k_s0F(%rip),%r10 - movdqa -32(%r10),%xmm10 - movdqa -16(%r10),%xmm11 - movdqa 0(%r10),%xmm9 - movdqa 48(%r10),%xmm13 - movdqa 64(%r10),%xmm12 - movdqa 80(%r10),%xmm15 - movdqa 96(%r10),%xmm14 - .byte 0xf3,0xc3 - - - - - - - -.p2align 6 -_vpaes_consts: -L$k_inv: -.quad 0x0E05060F0D080180, 0x040703090A0B0C02 -.quad 0x01040A060F0B0780, 0x030D0E0C02050809 - -L$k_s0F: -.quad 0x0F0F0F0F0F0F0F0F, 0x0F0F0F0F0F0F0F0F - -L$k_ipt: -.quad 0xC2B2E8985A2A7000, 0xCABAE09052227808 -.quad 0x4C01307D317C4D00, 0xCD80B1FCB0FDCC81 - -L$k_sb1: -.quad 0xB19BE18FCB503E00, 0xA5DF7A6E142AF544 -.quad 0x3618D415FAE22300, 0x3BF7CCC10D2ED9EF -L$k_sb2: -.quad 0xE27A93C60B712400, 0x5EB7E955BC982FCD -.quad 0x69EB88400AE12900, 0xC2A163C8AB82234A -L$k_sbo: -.quad 0xD0D26D176FBDC700, 0x15AABF7AC502A878 -.quad 0xCFE474A55FBB6A00, 0x8E1E90D1412B35FA - -L$k_mc_forward: -.quad 0x0407060500030201, 0x0C0F0E0D080B0A09 -.quad 0x080B0A0904070605, 0x000302010C0F0E0D -.quad 0x0C0F0E0D080B0A09, 0x0407060500030201 -.quad 0x000302010C0F0E0D, 0x080B0A0904070605 - -L$k_mc_backward: -.quad 0x0605040702010003, 0x0E0D0C0F0A09080B -.quad 0x020100030E0D0C0F, 0x0A09080B06050407 -.quad 0x0E0D0C0F0A09080B, 0x0605040702010003 -.quad 0x0A09080B06050407, 0x020100030E0D0C0F - -L$k_sr: -.quad 0x0706050403020100, 0x0F0E0D0C0B0A0908 -.quad 0x030E09040F0A0500, 0x0B06010C07020D08 -.quad 0x0F060D040B020900, 0x070E050C030A0108 -.quad 0x0B0E0104070A0D00, 0x0306090C0F020508 - -L$k_rcon: -.quad 0x1F8391B9AF9DEEB6, 0x702A98084D7C7D81 - -L$k_s63: -.quad 0x5B5B5B5B5B5B5B5B, 0x5B5B5B5B5B5B5B5B - -L$k_opt: -.quad 0xFF9F4929D6B66000, 0xF7974121DEBE6808 -.quad 0x01EDBD5150BCEC00, 0xE10D5DB1B05C0CE0 - -L$k_deskew: -.quad 0x07E4A34047A4E300, 0x1DFEB95A5DBEF91A -.quad 0x5F36B5DC83EA6900, 0x2841C2ABF49D1E77 - - - - - -L$k_dksd: -.quad 0xFEB91A5DA3E44700, 0x0740E3A45A1DBEF9 -.quad 0x41C277F4B5368300, 0x5FDC69EAAB289D1E -L$k_dksb: -.quad 0x9A4FCA1F8550D500, 0x03D653861CC94C99 -.quad 0x115BEDA7B6FC4A00, 0xD993256F7E3482C8 -L$k_dkse: -.quad 0xD5031CCA1FC9D600, 0x53859A4C994F5086 -.quad 0xA23196054FDC7BE8, 0xCD5EF96A20B31487 -L$k_dks9: -.quad 0xB6116FC87ED9A700, 0x4AED933482255BFC -.quad 0x4576516227143300, 0x8BB89FACE9DAFDCE - - - - - -L$k_dipt: -.quad 0x0F505B040B545F00, 0x154A411E114E451A -.quad 0x86E383E660056500, 0x12771772F491F194 - -L$k_dsb9: -.quad 0x851C03539A86D600, 0xCAD51F504F994CC9 -.quad 0xC03B1789ECD74900, 0x725E2C9EB2FBA565 -L$k_dsbd: -.quad 0x7D57CCDFE6B1A200, 0xF56E9B13882A4439 -.quad 0x3CE2FAF724C6CB00, 0x2931180D15DEEFD3 -L$k_dsbb: -.quad 0xD022649296B44200, 0x602646F6B0F2D404 -.quad 0xC19498A6CD596700, 0xF3FF0C3E3255AA6B -L$k_dsbe: -.quad 0x46F2929626D4D000, 0x2242600464B4F6B0 -.quad 0x0C55A6CDFFAAC100, 0x9467F36B98593E32 -L$k_dsbo: -.quad 0x1387EA537EF94000, 0xC7AA6DB9D4943E2D -.quad 0x12D7560F93441D00, 0xCA4B8159D8C58E9C -.byte 86,101,99,116,111,114,32,80,101,114,109,117,116,97,116,105,111,110,32,65,69,83,32,102,111,114,32,120,56,54,95,54,52,47,83,83,83,69,51,44,32,77,105,107,101,32,72,97,109,98,117,114,103,32,40,83,116,97,110,102,111,114,100,32,85,110,105,118,101,114,115,105,116,121,41,0 -.p2align 6 - -#endif diff --git a/third_party/boringssl/mac-x86_64/crypto/bn/rsaz-avx2.S b/third_party/boringssl/mac-x86_64/crypto/bn/rsaz-avx2.S deleted file mode 100644 index 8ba2019a1cfba..0000000000000 --- a/third_party/boringssl/mac-x86_64/crypto/bn/rsaz-avx2.S +++ /dev/null @@ -1,34 +0,0 @@ -#if defined(__x86_64__) -.text - -.globl _rsaz_avx2_eligible -.private_extern _rsaz_avx2_eligible - -_rsaz_avx2_eligible: - xorl %eax,%eax - .byte 0xf3,0xc3 - - -.globl _rsaz_1024_sqr_avx2 -.private_extern _rsaz_1024_sqr_avx2 -.globl _rsaz_1024_mul_avx2 -.private_extern _rsaz_1024_mul_avx2 -.globl _rsaz_1024_norm2red_avx2 -.private_extern _rsaz_1024_norm2red_avx2 -.globl _rsaz_1024_red2norm_avx2 -.private_extern _rsaz_1024_red2norm_avx2 -.globl _rsaz_1024_scatter5_avx2 -.private_extern _rsaz_1024_scatter5_avx2 -.globl _rsaz_1024_gather5_avx2 -.private_extern _rsaz_1024_gather5_avx2 - -_rsaz_1024_sqr_avx2: -_rsaz_1024_mul_avx2: -_rsaz_1024_norm2red_avx2: -_rsaz_1024_red2norm_avx2: -_rsaz_1024_scatter5_avx2: -_rsaz_1024_gather5_avx2: -.byte 0x0f,0x0b - .byte 0xf3,0xc3 - -#endif diff --git a/third_party/boringssl/mac-x86_64/crypto/bn/rsaz-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/bn/rsaz-x86_64.S deleted file mode 100644 index 5e9e82feb025b..0000000000000 --- a/third_party/boringssl/mac-x86_64/crypto/bn/rsaz-x86_64.S +++ /dev/null @@ -1,1126 +0,0 @@ -#if defined(__x86_64__) -.text - - - -.globl _rsaz_512_sqr -.private_extern _rsaz_512_sqr - -.p2align 5 -_rsaz_512_sqr: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - subq $128+24,%rsp -L$sqr_body: - movq %rdx,%rbp - movq (%rsi),%rdx - movq 8(%rsi),%rax - movq %rcx,128(%rsp) - jmp L$oop_sqr - -.p2align 5 -L$oop_sqr: - movl %r8d,128+8(%rsp) - - movq %rdx,%rbx - mulq %rdx - movq %rax,%r8 - movq 16(%rsi),%rax - movq %rdx,%r9 - - mulq %rbx - addq %rax,%r9 - movq 24(%rsi),%rax - movq %rdx,%r10 - adcq $0,%r10 - - mulq %rbx - addq %rax,%r10 - movq 32(%rsi),%rax - movq %rdx,%r11 - adcq $0,%r11 - - mulq %rbx - addq %rax,%r11 - movq 40(%rsi),%rax - movq %rdx,%r12 - adcq $0,%r12 - - mulq %rbx - addq %rax,%r12 - movq 48(%rsi),%rax - movq %rdx,%r13 - adcq $0,%r13 - - mulq %rbx - addq %rax,%r13 - movq 56(%rsi),%rax - movq %rdx,%r14 - adcq $0,%r14 - - mulq %rbx - addq %rax,%r14 - movq %rbx,%rax - movq %rdx,%r15 - adcq $0,%r15 - - addq %r8,%r8 - movq %r9,%rcx - adcq %r9,%r9 - - mulq %rax - movq %rax,(%rsp) - addq %rdx,%r8 - adcq $0,%r9 - - movq %r8,8(%rsp) - shrq $63,%rcx - - - movq 8(%rsi),%r8 - movq 16(%rsi),%rax - mulq %r8 - addq %rax,%r10 - movq 24(%rsi),%rax - movq %rdx,%rbx - adcq $0,%rbx - - mulq %r8 - addq %rax,%r11 - movq 32(%rsi),%rax - adcq $0,%rdx - addq %rbx,%r11 - movq %rdx,%rbx - adcq $0,%rbx - - mulq %r8 - addq %rax,%r12 - movq 40(%rsi),%rax - adcq $0,%rdx - addq %rbx,%r12 - movq %rdx,%rbx - adcq $0,%rbx - - mulq %r8 - addq %rax,%r13 - movq 48(%rsi),%rax - adcq $0,%rdx - addq %rbx,%r13 - movq %rdx,%rbx - adcq $0,%rbx - - mulq %r8 - addq %rax,%r14 - movq 56(%rsi),%rax - adcq $0,%rdx - addq %rbx,%r14 - movq %rdx,%rbx - adcq $0,%rbx - - mulq %r8 - addq %rax,%r15 - movq %r8,%rax - adcq $0,%rdx - addq %rbx,%r15 - movq %rdx,%r8 - movq %r10,%rdx - adcq $0,%r8 - - addq %rdx,%rdx - leaq (%rcx,%r10,2),%r10 - movq %r11,%rbx - adcq %r11,%r11 - - mulq %rax - addq %rax,%r9 - adcq %rdx,%r10 - adcq $0,%r11 - - movq %r9,16(%rsp) - movq %r10,24(%rsp) - shrq $63,%rbx - - - movq 16(%rsi),%r9 - movq 24(%rsi),%rax - mulq %r9 - addq %rax,%r12 - movq 32(%rsi),%rax - movq %rdx,%rcx - adcq $0,%rcx - - mulq %r9 - addq %rax,%r13 - movq 40(%rsi),%rax - adcq $0,%rdx - addq %rcx,%r13 - movq %rdx,%rcx - adcq $0,%rcx - - mulq %r9 - addq %rax,%r14 - movq 48(%rsi),%rax - adcq $0,%rdx - addq %rcx,%r14 - movq %rdx,%rcx - adcq $0,%rcx - - mulq %r9 - movq %r12,%r10 - leaq (%rbx,%r12,2),%r12 - addq %rax,%r15 - movq 56(%rsi),%rax - adcq $0,%rdx - addq %rcx,%r15 - movq %rdx,%rcx - adcq $0,%rcx - - mulq %r9 - shrq $63,%r10 - addq %rax,%r8 - movq %r9,%rax - adcq $0,%rdx - addq %rcx,%r8 - movq %rdx,%r9 - adcq $0,%r9 - - movq %r13,%rcx - leaq (%r10,%r13,2),%r13 - - mulq %rax - addq %rax,%r11 - adcq %rdx,%r12 - adcq $0,%r13 - - movq %r11,32(%rsp) - movq %r12,40(%rsp) - shrq $63,%rcx - - - movq 24(%rsi),%r10 - movq 32(%rsi),%rax - mulq %r10 - addq %rax,%r14 - movq 40(%rsi),%rax - movq %rdx,%rbx - adcq $0,%rbx - - mulq %r10 - addq %rax,%r15 - movq 48(%rsi),%rax - adcq $0,%rdx - addq %rbx,%r15 - movq %rdx,%rbx - adcq $0,%rbx - - mulq %r10 - movq %r14,%r12 - leaq (%rcx,%r14,2),%r14 - addq %rax,%r8 - movq 56(%rsi),%rax - adcq $0,%rdx - addq %rbx,%r8 - movq %rdx,%rbx - adcq $0,%rbx - - mulq %r10 - shrq $63,%r12 - addq %rax,%r9 - movq %r10,%rax - adcq $0,%rdx - addq %rbx,%r9 - movq %rdx,%r10 - adcq $0,%r10 - - movq %r15,%rbx - leaq (%r12,%r15,2),%r15 - - mulq %rax - addq %rax,%r13 - adcq %rdx,%r14 - adcq $0,%r15 - - movq %r13,48(%rsp) - movq %r14,56(%rsp) - shrq $63,%rbx - - - movq 32(%rsi),%r11 - movq 40(%rsi),%rax - mulq %r11 - addq %rax,%r8 - movq 48(%rsi),%rax - movq %rdx,%rcx - adcq $0,%rcx - - mulq %r11 - addq %rax,%r9 - movq 56(%rsi),%rax - adcq $0,%rdx - movq %r8,%r12 - leaq (%rbx,%r8,2),%r8 - addq %rcx,%r9 - movq %rdx,%rcx - adcq $0,%rcx - - mulq %r11 - shrq $63,%r12 - addq %rax,%r10 - movq %r11,%rax - adcq $0,%rdx - addq %rcx,%r10 - movq %rdx,%r11 - adcq $0,%r11 - - movq %r9,%rcx - leaq (%r12,%r9,2),%r9 - - mulq %rax - addq %rax,%r15 - adcq %rdx,%r8 - adcq $0,%r9 - - movq %r15,64(%rsp) - movq %r8,72(%rsp) - shrq $63,%rcx - - - movq 40(%rsi),%r12 - movq 48(%rsi),%rax - mulq %r12 - addq %rax,%r10 - movq 56(%rsi),%rax - movq %rdx,%rbx - adcq $0,%rbx - - mulq %r12 - addq %rax,%r11 - movq %r12,%rax - movq %r10,%r15 - leaq (%rcx,%r10,2),%r10 - adcq $0,%rdx - shrq $63,%r15 - addq %rbx,%r11 - movq %rdx,%r12 - adcq $0,%r12 - - movq %r11,%rbx - leaq (%r15,%r11,2),%r11 - - mulq %rax - addq %rax,%r9 - adcq %rdx,%r10 - adcq $0,%r11 - - movq %r9,80(%rsp) - movq %r10,88(%rsp) - - - movq 48(%rsi),%r13 - movq 56(%rsi),%rax - mulq %r13 - addq %rax,%r12 - movq %r13,%rax - movq %rdx,%r13 - adcq $0,%r13 - - xorq %r14,%r14 - shlq $1,%rbx - adcq %r12,%r12 - adcq %r13,%r13 - adcq %r14,%r14 - - mulq %rax - addq %rax,%r11 - adcq %rdx,%r12 - adcq $0,%r13 - - movq %r11,96(%rsp) - movq %r12,104(%rsp) - - - movq 56(%rsi),%rax - mulq %rax - addq %rax,%r13 - adcq $0,%rdx - - addq %rdx,%r14 - - movq %r13,112(%rsp) - movq %r14,120(%rsp) - - movq (%rsp),%r8 - movq 8(%rsp),%r9 - movq 16(%rsp),%r10 - movq 24(%rsp),%r11 - movq 32(%rsp),%r12 - movq 40(%rsp),%r13 - movq 48(%rsp),%r14 - movq 56(%rsp),%r15 - - call __rsaz_512_reduce - - addq 64(%rsp),%r8 - adcq 72(%rsp),%r9 - adcq 80(%rsp),%r10 - adcq 88(%rsp),%r11 - adcq 96(%rsp),%r12 - adcq 104(%rsp),%r13 - adcq 112(%rsp),%r14 - adcq 120(%rsp),%r15 - sbbq %rcx,%rcx - - call __rsaz_512_subtract - - movq %r8,%rdx - movq %r9,%rax - movl 128+8(%rsp),%r8d - movq %rdi,%rsi - - decl %r8d - jnz L$oop_sqr - - leaq 128+24+48(%rsp),%rax - movq -48(%rax),%r15 - movq -40(%rax),%r14 - movq -32(%rax),%r13 - movq -24(%rax),%r12 - movq -16(%rax),%rbp - movq -8(%rax),%rbx - leaq (%rax),%rsp -L$sqr_epilogue: - .byte 0xf3,0xc3 - -.globl _rsaz_512_mul -.private_extern _rsaz_512_mul - -.p2align 5 -_rsaz_512_mul: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - subq $128+24,%rsp -L$mul_body: -.byte 102,72,15,110,199 -.byte 102,72,15,110,201 - movq %r8,128(%rsp) - movq (%rdx),%rbx - movq %rdx,%rbp - call __rsaz_512_mul - -.byte 102,72,15,126,199 -.byte 102,72,15,126,205 - - movq (%rsp),%r8 - movq 8(%rsp),%r9 - movq 16(%rsp),%r10 - movq 24(%rsp),%r11 - movq 32(%rsp),%r12 - movq 40(%rsp),%r13 - movq 48(%rsp),%r14 - movq 56(%rsp),%r15 - - call __rsaz_512_reduce - addq 64(%rsp),%r8 - adcq 72(%rsp),%r9 - adcq 80(%rsp),%r10 - adcq 88(%rsp),%r11 - adcq 96(%rsp),%r12 - adcq 104(%rsp),%r13 - adcq 112(%rsp),%r14 - adcq 120(%rsp),%r15 - sbbq %rcx,%rcx - - call __rsaz_512_subtract - - leaq 128+24+48(%rsp),%rax - movq -48(%rax),%r15 - movq -40(%rax),%r14 - movq -32(%rax),%r13 - movq -24(%rax),%r12 - movq -16(%rax),%rbp - movq -8(%rax),%rbx - leaq (%rax),%rsp -L$mul_epilogue: - .byte 0xf3,0xc3 - -.globl _rsaz_512_mul_gather4 -.private_extern _rsaz_512_mul_gather4 - -.p2align 5 -_rsaz_512_mul_gather4: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - movl %r9d,%r9d - subq $128+24,%rsp -L$mul_gather4_body: - movl 64(%rdx,%r9,4),%eax -.byte 102,72,15,110,199 - movl (%rdx,%r9,4),%ebx -.byte 102,72,15,110,201 - movq %r8,128(%rsp) - - shlq $32,%rax - orq %rax,%rbx - movq (%rsi),%rax - movq 8(%rsi),%rcx - leaq 128(%rdx,%r9,4),%rbp - mulq %rbx - movq %rax,(%rsp) - movq %rcx,%rax - movq %rdx,%r8 - - mulq %rbx - movd (%rbp),%xmm4 - addq %rax,%r8 - movq 16(%rsi),%rax - movq %rdx,%r9 - adcq $0,%r9 - - mulq %rbx - movd 64(%rbp),%xmm5 - addq %rax,%r9 - movq 24(%rsi),%rax - movq %rdx,%r10 - adcq $0,%r10 - - mulq %rbx - pslldq $4,%xmm5 - addq %rax,%r10 - movq 32(%rsi),%rax - movq %rdx,%r11 - adcq $0,%r11 - - mulq %rbx - por %xmm5,%xmm4 - addq %rax,%r11 - movq 40(%rsi),%rax - movq %rdx,%r12 - adcq $0,%r12 - - mulq %rbx - addq %rax,%r12 - movq 48(%rsi),%rax - movq %rdx,%r13 - adcq $0,%r13 - - mulq %rbx - leaq 128(%rbp),%rbp - addq %rax,%r13 - movq 56(%rsi),%rax - movq %rdx,%r14 - adcq $0,%r14 - - mulq %rbx -.byte 102,72,15,126,227 - addq %rax,%r14 - movq (%rsi),%rax - movq %rdx,%r15 - adcq $0,%r15 - - leaq 8(%rsp),%rdi - movl $7,%ecx - jmp L$oop_mul_gather - -.p2align 5 -L$oop_mul_gather: - mulq %rbx - addq %rax,%r8 - movq 8(%rsi),%rax - movq %r8,(%rdi) - movq %rdx,%r8 - adcq $0,%r8 - - mulq %rbx - movd (%rbp),%xmm4 - addq %rax,%r9 - movq 16(%rsi),%rax - adcq $0,%rdx - addq %r9,%r8 - movq %rdx,%r9 - adcq $0,%r9 - - mulq %rbx - movd 64(%rbp),%xmm5 - addq %rax,%r10 - movq 24(%rsi),%rax - adcq $0,%rdx - addq %r10,%r9 - movq %rdx,%r10 - adcq $0,%r10 - - mulq %rbx - pslldq $4,%xmm5 - addq %rax,%r11 - movq 32(%rsi),%rax - adcq $0,%rdx - addq %r11,%r10 - movq %rdx,%r11 - adcq $0,%r11 - - mulq %rbx - por %xmm5,%xmm4 - addq %rax,%r12 - movq 40(%rsi),%rax - adcq $0,%rdx - addq %r12,%r11 - movq %rdx,%r12 - adcq $0,%r12 - - mulq %rbx - addq %rax,%r13 - movq 48(%rsi),%rax - adcq $0,%rdx - addq %r13,%r12 - movq %rdx,%r13 - adcq $0,%r13 - - mulq %rbx - addq %rax,%r14 - movq 56(%rsi),%rax - adcq $0,%rdx - addq %r14,%r13 - movq %rdx,%r14 - adcq $0,%r14 - - mulq %rbx -.byte 102,72,15,126,227 - addq %rax,%r15 - movq (%rsi),%rax - adcq $0,%rdx - addq %r15,%r14 - movq %rdx,%r15 - adcq $0,%r15 - - leaq 128(%rbp),%rbp - leaq 8(%rdi),%rdi - - decl %ecx - jnz L$oop_mul_gather - - movq %r8,(%rdi) - movq %r9,8(%rdi) - movq %r10,16(%rdi) - movq %r11,24(%rdi) - movq %r12,32(%rdi) - movq %r13,40(%rdi) - movq %r14,48(%rdi) - movq %r15,56(%rdi) - -.byte 102,72,15,126,199 -.byte 102,72,15,126,205 - - movq (%rsp),%r8 - movq 8(%rsp),%r9 - movq 16(%rsp),%r10 - movq 24(%rsp),%r11 - movq 32(%rsp),%r12 - movq 40(%rsp),%r13 - movq 48(%rsp),%r14 - movq 56(%rsp),%r15 - - call __rsaz_512_reduce - addq 64(%rsp),%r8 - adcq 72(%rsp),%r9 - adcq 80(%rsp),%r10 - adcq 88(%rsp),%r11 - adcq 96(%rsp),%r12 - adcq 104(%rsp),%r13 - adcq 112(%rsp),%r14 - adcq 120(%rsp),%r15 - sbbq %rcx,%rcx - - call __rsaz_512_subtract - - leaq 128+24+48(%rsp),%rax - movq -48(%rax),%r15 - movq -40(%rax),%r14 - movq -32(%rax),%r13 - movq -24(%rax),%r12 - movq -16(%rax),%rbp - movq -8(%rax),%rbx - leaq (%rax),%rsp -L$mul_gather4_epilogue: - .byte 0xf3,0xc3 - -.globl _rsaz_512_mul_scatter4 -.private_extern _rsaz_512_mul_scatter4 - -.p2align 5 -_rsaz_512_mul_scatter4: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - movl %r9d,%r9d - subq $128+24,%rsp -L$mul_scatter4_body: - leaq (%r8,%r9,4),%r8 -.byte 102,72,15,110,199 -.byte 102,72,15,110,202 -.byte 102,73,15,110,208 - movq %rcx,128(%rsp) - - movq %rdi,%rbp - movq (%rdi),%rbx - call __rsaz_512_mul - -.byte 102,72,15,126,199 -.byte 102,72,15,126,205 - - movq (%rsp),%r8 - movq 8(%rsp),%r9 - movq 16(%rsp),%r10 - movq 24(%rsp),%r11 - movq 32(%rsp),%r12 - movq 40(%rsp),%r13 - movq 48(%rsp),%r14 - movq 56(%rsp),%r15 - - call __rsaz_512_reduce - addq 64(%rsp),%r8 - adcq 72(%rsp),%r9 - adcq 80(%rsp),%r10 - adcq 88(%rsp),%r11 - adcq 96(%rsp),%r12 - adcq 104(%rsp),%r13 - adcq 112(%rsp),%r14 - adcq 120(%rsp),%r15 -.byte 102,72,15,126,214 - sbbq %rcx,%rcx - - call __rsaz_512_subtract - - movl %r8d,0(%rsi) - shrq $32,%r8 - movl %r9d,128(%rsi) - shrq $32,%r9 - movl %r10d,256(%rsi) - shrq $32,%r10 - movl %r11d,384(%rsi) - shrq $32,%r11 - movl %r12d,512(%rsi) - shrq $32,%r12 - movl %r13d,640(%rsi) - shrq $32,%r13 - movl %r14d,768(%rsi) - shrq $32,%r14 - movl %r15d,896(%rsi) - shrq $32,%r15 - movl %r8d,64(%rsi) - movl %r9d,192(%rsi) - movl %r10d,320(%rsi) - movl %r11d,448(%rsi) - movl %r12d,576(%rsi) - movl %r13d,704(%rsi) - movl %r14d,832(%rsi) - movl %r15d,960(%rsi) - - leaq 128+24+48(%rsp),%rax - movq -48(%rax),%r15 - movq -40(%rax),%r14 - movq -32(%rax),%r13 - movq -24(%rax),%r12 - movq -16(%rax),%rbp - movq -8(%rax),%rbx - leaq (%rax),%rsp -L$mul_scatter4_epilogue: - .byte 0xf3,0xc3 - -.globl _rsaz_512_mul_by_one -.private_extern _rsaz_512_mul_by_one - -.p2align 5 -_rsaz_512_mul_by_one: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - subq $128+24,%rsp -L$mul_by_one_body: - movq %rdx,%rbp - movq %rcx,128(%rsp) - - movq (%rsi),%r8 - pxor %xmm0,%xmm0 - movq 8(%rsi),%r9 - movq 16(%rsi),%r10 - movq 24(%rsi),%r11 - movq 32(%rsi),%r12 - movq 40(%rsi),%r13 - movq 48(%rsi),%r14 - movq 56(%rsi),%r15 - - movdqa %xmm0,(%rsp) - movdqa %xmm0,16(%rsp) - movdqa %xmm0,32(%rsp) - movdqa %xmm0,48(%rsp) - movdqa %xmm0,64(%rsp) - movdqa %xmm0,80(%rsp) - movdqa %xmm0,96(%rsp) - call __rsaz_512_reduce - movq %r8,(%rdi) - movq %r9,8(%rdi) - movq %r10,16(%rdi) - movq %r11,24(%rdi) - movq %r12,32(%rdi) - movq %r13,40(%rdi) - movq %r14,48(%rdi) - movq %r15,56(%rdi) - - leaq 128+24+48(%rsp),%rax - movq -48(%rax),%r15 - movq -40(%rax),%r14 - movq -32(%rax),%r13 - movq -24(%rax),%r12 - movq -16(%rax),%rbp - movq -8(%rax),%rbx - leaq (%rax),%rsp -L$mul_by_one_epilogue: - .byte 0xf3,0xc3 - - -.p2align 5 -__rsaz_512_reduce: - movq %r8,%rbx - imulq 128+8(%rsp),%rbx - movq 0(%rbp),%rax - movl $8,%ecx - jmp L$reduction_loop - -.p2align 5 -L$reduction_loop: - mulq %rbx - movq 8(%rbp),%rax - negq %r8 - movq %rdx,%r8 - adcq $0,%r8 - - mulq %rbx - addq %rax,%r9 - movq 16(%rbp),%rax - adcq $0,%rdx - addq %r9,%r8 - movq %rdx,%r9 - adcq $0,%r9 - - mulq %rbx - addq %rax,%r10 - movq 24(%rbp),%rax - adcq $0,%rdx - addq %r10,%r9 - movq %rdx,%r10 - adcq $0,%r10 - - mulq %rbx - addq %rax,%r11 - movq 32(%rbp),%rax - adcq $0,%rdx - addq %r11,%r10 - movq 128+8(%rsp),%rsi - - - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbx - addq %rax,%r12 - movq 40(%rbp),%rax - adcq $0,%rdx - imulq %r8,%rsi - addq %r12,%r11 - movq %rdx,%r12 - adcq $0,%r12 - - mulq %rbx - addq %rax,%r13 - movq 48(%rbp),%rax - adcq $0,%rdx - addq %r13,%r12 - movq %rdx,%r13 - adcq $0,%r13 - - mulq %rbx - addq %rax,%r14 - movq 56(%rbp),%rax - adcq $0,%rdx - addq %r14,%r13 - movq %rdx,%r14 - adcq $0,%r14 - - mulq %rbx - movq %rsi,%rbx - addq %rax,%r15 - movq 0(%rbp),%rax - adcq $0,%rdx - addq %r15,%r14 - movq %rdx,%r15 - adcq $0,%r15 - - decl %ecx - jne L$reduction_loop - - .byte 0xf3,0xc3 - - -.p2align 5 -__rsaz_512_subtract: - movq %r8,(%rdi) - movq %r9,8(%rdi) - movq %r10,16(%rdi) - movq %r11,24(%rdi) - movq %r12,32(%rdi) - movq %r13,40(%rdi) - movq %r14,48(%rdi) - movq %r15,56(%rdi) - - movq 0(%rbp),%r8 - movq 8(%rbp),%r9 - negq %r8 - notq %r9 - andq %rcx,%r8 - movq 16(%rbp),%r10 - andq %rcx,%r9 - notq %r10 - movq 24(%rbp),%r11 - andq %rcx,%r10 - notq %r11 - movq 32(%rbp),%r12 - andq %rcx,%r11 - notq %r12 - movq 40(%rbp),%r13 - andq %rcx,%r12 - notq %r13 - movq 48(%rbp),%r14 - andq %rcx,%r13 - notq %r14 - movq 56(%rbp),%r15 - andq %rcx,%r14 - notq %r15 - andq %rcx,%r15 - - addq (%rdi),%r8 - adcq 8(%rdi),%r9 - adcq 16(%rdi),%r10 - adcq 24(%rdi),%r11 - adcq 32(%rdi),%r12 - adcq 40(%rdi),%r13 - adcq 48(%rdi),%r14 - adcq 56(%rdi),%r15 - - movq %r8,(%rdi) - movq %r9,8(%rdi) - movq %r10,16(%rdi) - movq %r11,24(%rdi) - movq %r12,32(%rdi) - movq %r13,40(%rdi) - movq %r14,48(%rdi) - movq %r15,56(%rdi) - - .byte 0xf3,0xc3 - - -.p2align 5 -__rsaz_512_mul: - leaq 8(%rsp),%rdi - - movq (%rsi),%rax - mulq %rbx - movq %rax,(%rdi) - movq 8(%rsi),%rax - movq %rdx,%r8 - - mulq %rbx - addq %rax,%r8 - movq 16(%rsi),%rax - movq %rdx,%r9 - adcq $0,%r9 - - mulq %rbx - addq %rax,%r9 - movq 24(%rsi),%rax - movq %rdx,%r10 - adcq $0,%r10 - - mulq %rbx - addq %rax,%r10 - movq 32(%rsi),%rax - movq %rdx,%r11 - adcq $0,%r11 - - mulq %rbx - addq %rax,%r11 - movq 40(%rsi),%rax - movq %rdx,%r12 - adcq $0,%r12 - - mulq %rbx - addq %rax,%r12 - movq 48(%rsi),%rax - movq %rdx,%r13 - adcq $0,%r13 - - mulq %rbx - addq %rax,%r13 - movq 56(%rsi),%rax - movq %rdx,%r14 - adcq $0,%r14 - - mulq %rbx - addq %rax,%r14 - movq (%rsi),%rax - movq %rdx,%r15 - adcq $0,%r15 - - leaq 8(%rbp),%rbp - leaq 8(%rdi),%rdi - - movl $7,%ecx - jmp L$oop_mul - -.p2align 5 -L$oop_mul: - movq (%rbp),%rbx - mulq %rbx - addq %rax,%r8 - movq 8(%rsi),%rax - movq %r8,(%rdi) - movq %rdx,%r8 - adcq $0,%r8 - - mulq %rbx - addq %rax,%r9 - movq 16(%rsi),%rax - adcq $0,%rdx - addq %r9,%r8 - movq %rdx,%r9 - adcq $0,%r9 - - mulq %rbx - addq %rax,%r10 - movq 24(%rsi),%rax - adcq $0,%rdx - addq %r10,%r9 - movq %rdx,%r10 - adcq $0,%r10 - - mulq %rbx - addq %rax,%r11 - movq 32(%rsi),%rax - adcq $0,%rdx - addq %r11,%r10 - movq %rdx,%r11 - adcq $0,%r11 - - mulq %rbx - addq %rax,%r12 - movq 40(%rsi),%rax - adcq $0,%rdx - addq %r12,%r11 - movq %rdx,%r12 - adcq $0,%r12 - - mulq %rbx - addq %rax,%r13 - movq 48(%rsi),%rax - adcq $0,%rdx - addq %r13,%r12 - movq %rdx,%r13 - adcq $0,%r13 - - mulq %rbx - addq %rax,%r14 - movq 56(%rsi),%rax - adcq $0,%rdx - addq %r14,%r13 - movq %rdx,%r14 - leaq 8(%rbp),%rbp - adcq $0,%r14 - - mulq %rbx - addq %rax,%r15 - movq (%rsi),%rax - adcq $0,%rdx - addq %r15,%r14 - movq %rdx,%r15 - adcq $0,%r15 - - leaq 8(%rdi),%rdi - - decl %ecx - jnz L$oop_mul - - movq %r8,(%rdi) - movq %r9,8(%rdi) - movq %r10,16(%rdi) - movq %r11,24(%rdi) - movq %r12,32(%rdi) - movq %r13,40(%rdi) - movq %r14,48(%rdi) - movq %r15,56(%rdi) - - .byte 0xf3,0xc3 - -.globl _rsaz_512_scatter4 -.private_extern _rsaz_512_scatter4 - -.p2align 4 -_rsaz_512_scatter4: - leaq (%rdi,%rdx,4),%rdi - movl $8,%r9d - jmp L$oop_scatter -.p2align 4 -L$oop_scatter: - movq (%rsi),%rax - leaq 8(%rsi),%rsi - movl %eax,(%rdi) - shrq $32,%rax - movl %eax,64(%rdi) - leaq 128(%rdi),%rdi - decl %r9d - jnz L$oop_scatter - .byte 0xf3,0xc3 - - -.globl _rsaz_512_gather4 -.private_extern _rsaz_512_gather4 - -.p2align 4 -_rsaz_512_gather4: - leaq (%rsi,%rdx,4),%rsi - movl $8,%r9d - jmp L$oop_gather -.p2align 4 -L$oop_gather: - movl (%rsi),%eax - movl 64(%rsi),%r8d - leaq 128(%rsi),%rsi - shlq $32,%r8 - orq %r8,%rax - movq %rax,(%rdi) - leaq 8(%rdi),%rdi - decl %r9d - jnz L$oop_gather - .byte 0xf3,0xc3 - -#endif diff --git a/third_party/boringssl/mac-x86_64/crypto/bn/x86_64-mont.S b/third_party/boringssl/mac-x86_64/crypto/bn/x86_64-mont.S deleted file mode 100644 index 6b9bc05bf4e2f..0000000000000 --- a/third_party/boringssl/mac-x86_64/crypto/bn/x86_64-mont.S +++ /dev/null @@ -1,726 +0,0 @@ -#if defined(__x86_64__) -.text - - - -.globl _bn_mul_mont -.private_extern _bn_mul_mont - -.p2align 4 -_bn_mul_mont: - testl $3,%r9d - jnz L$mul_enter - cmpl $8,%r9d - jb L$mul_enter - cmpq %rsi,%rdx - jne L$mul4x_enter - testl $7,%r9d - jz L$sqr8x_enter - jmp L$mul4x_enter - -.p2align 4 -L$mul_enter: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - movl %r9d,%r9d - leaq 2(%r9),%r10 - movq %rsp,%r11 - negq %r10 - leaq (%rsp,%r10,8),%rsp - andq $-1024,%rsp - - movq %r11,8(%rsp,%r9,8) -L$mul_body: - movq %rdx,%r12 - movq (%r8),%r8 - movq (%r12),%rbx - movq (%rsi),%rax - - xorq %r14,%r14 - xorq %r15,%r15 - - movq %r8,%rbp - mulq %rbx - movq %rax,%r10 - movq (%rcx),%rax - - imulq %r10,%rbp - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r10 - movq 8(%rsi),%rax - adcq $0,%rdx - movq %rdx,%r13 - - leaq 1(%r15),%r15 - jmp L$1st_enter - -.p2align 4 -L$1st: - addq %rax,%r13 - movq (%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r11,%r13 - movq %r10,%r11 - adcq $0,%rdx - movq %r13,-16(%rsp,%r15,8) - movq %rdx,%r13 - -L$1st_enter: - mulq %rbx - addq %rax,%r11 - movq (%rcx,%r15,8),%rax - adcq $0,%rdx - leaq 1(%r15),%r15 - movq %rdx,%r10 - - mulq %rbp - cmpq %r9,%r15 - jne L$1st - - addq %rax,%r13 - movq (%rsi),%rax - adcq $0,%rdx - addq %r11,%r13 - adcq $0,%rdx - movq %r13,-16(%rsp,%r15,8) - movq %rdx,%r13 - movq %r10,%r11 - - xorq %rdx,%rdx - addq %r11,%r13 - adcq $0,%rdx - movq %r13,-8(%rsp,%r9,8) - movq %rdx,(%rsp,%r9,8) - - leaq 1(%r14),%r14 - jmp L$outer -.p2align 4 -L$outer: - movq (%r12,%r14,8),%rbx - xorq %r15,%r15 - movq %r8,%rbp - movq (%rsp),%r10 - mulq %rbx - addq %rax,%r10 - movq (%rcx),%rax - adcq $0,%rdx - - imulq %r10,%rbp - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r10 - movq 8(%rsi),%rax - adcq $0,%rdx - movq 8(%rsp),%r10 - movq %rdx,%r13 - - leaq 1(%r15),%r15 - jmp L$inner_enter - -.p2align 4 -L$inner: - addq %rax,%r13 - movq (%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r10,%r13 - movq (%rsp,%r15,8),%r10 - adcq $0,%rdx - movq %r13,-16(%rsp,%r15,8) - movq %rdx,%r13 - -L$inner_enter: - mulq %rbx - addq %rax,%r11 - movq (%rcx,%r15,8),%rax - adcq $0,%rdx - addq %r11,%r10 - movq %rdx,%r11 - adcq $0,%r11 - leaq 1(%r15),%r15 - - mulq %rbp - cmpq %r9,%r15 - jne L$inner - - addq %rax,%r13 - movq (%rsi),%rax - adcq $0,%rdx - addq %r10,%r13 - movq (%rsp,%r15,8),%r10 - adcq $0,%rdx - movq %r13,-16(%rsp,%r15,8) - movq %rdx,%r13 - - xorq %rdx,%rdx - addq %r11,%r13 - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-8(%rsp,%r9,8) - movq %rdx,(%rsp,%r9,8) - - leaq 1(%r14),%r14 - cmpq %r9,%r14 - jb L$outer - - xorq %r14,%r14 - movq (%rsp),%rax - leaq (%rsp),%rsi - movq %r9,%r15 - jmp L$sub -.p2align 4 -L$sub: sbbq (%rcx,%r14,8),%rax - movq %rax,(%rdi,%r14,8) - movq 8(%rsi,%r14,8),%rax - leaq 1(%r14),%r14 - decq %r15 - jnz L$sub - - sbbq $0,%rax - xorq %r14,%r14 - movq %r9,%r15 -.p2align 4 -L$copy: - movq (%rsp,%r14,8),%rsi - movq (%rdi,%r14,8),%rcx - xorq %rcx,%rsi - andq %rax,%rsi - xorq %rcx,%rsi - movq %r14,(%rsp,%r14,8) - movq %rsi,(%rdi,%r14,8) - leaq 1(%r14),%r14 - subq $1,%r15 - jnz L$copy - - movq 8(%rsp,%r9,8),%rsi - movq $1,%rax - movq (%rsi),%r15 - movq 8(%rsi),%r14 - movq 16(%rsi),%r13 - movq 24(%rsi),%r12 - movq 32(%rsi),%rbp - movq 40(%rsi),%rbx - leaq 48(%rsi),%rsp -L$mul_epilogue: - .byte 0xf3,0xc3 - - -.p2align 4 -bn_mul4x_mont: -L$mul4x_enter: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - movl %r9d,%r9d - leaq 4(%r9),%r10 - movq %rsp,%r11 - negq %r10 - leaq (%rsp,%r10,8),%rsp - andq $-1024,%rsp - - movq %r11,8(%rsp,%r9,8) -L$mul4x_body: - movq %rdi,16(%rsp,%r9,8) - movq %rdx,%r12 - movq (%r8),%r8 - movq (%r12),%rbx - movq (%rsi),%rax - - xorq %r14,%r14 - xorq %r15,%r15 - - movq %r8,%rbp - mulq %rbx - movq %rax,%r10 - movq (%rcx),%rax - - imulq %r10,%rbp - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r10 - movq 8(%rsi),%rax - adcq $0,%rdx - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq 8(%rcx),%rax - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq 16(%rsi),%rax - adcq $0,%rdx - addq %r11,%rdi - leaq 4(%r15),%r15 - adcq $0,%rdx - movq %rdi,(%rsp) - movq %rdx,%r13 - jmp L$1st4x -.p2align 4 -L$1st4x: - mulq %rbx - addq %rax,%r10 - movq -16(%rcx,%r15,8),%rax - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq -8(%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-24(%rsp,%r15,8) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq -8(%rcx,%r15,8),%rax - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq (%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %rdi,-16(%rsp,%r15,8) - movq %rdx,%r13 - - mulq %rbx - addq %rax,%r10 - movq (%rcx,%r15,8),%rax - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq 8(%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-8(%rsp,%r15,8) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq 8(%rcx,%r15,8),%rax - adcq $0,%rdx - leaq 4(%r15),%r15 - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq -16(%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %rdi,-32(%rsp,%r15,8) - movq %rdx,%r13 - cmpq %r9,%r15 - jb L$1st4x - - mulq %rbx - addq %rax,%r10 - movq -16(%rcx,%r15,8),%rax - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq -8(%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-24(%rsp,%r15,8) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq -8(%rcx,%r15,8),%rax - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq (%rsi),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %rdi,-16(%rsp,%r15,8) - movq %rdx,%r13 - - xorq %rdi,%rdi - addq %r10,%r13 - adcq $0,%rdi - movq %r13,-8(%rsp,%r15,8) - movq %rdi,(%rsp,%r15,8) - - leaq 1(%r14),%r14 -.p2align 2 -L$outer4x: - movq (%r12,%r14,8),%rbx - xorq %r15,%r15 - movq (%rsp),%r10 - movq %r8,%rbp - mulq %rbx - addq %rax,%r10 - movq (%rcx),%rax - adcq $0,%rdx - - imulq %r10,%rbp - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r10 - movq 8(%rsi),%rax - adcq $0,%rdx - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq 8(%rcx),%rax - adcq $0,%rdx - addq 8(%rsp),%r11 - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq 16(%rsi),%rax - adcq $0,%rdx - addq %r11,%rdi - leaq 4(%r15),%r15 - adcq $0,%rdx - movq %rdi,(%rsp) - movq %rdx,%r13 - jmp L$inner4x -.p2align 4 -L$inner4x: - mulq %rbx - addq %rax,%r10 - movq -16(%rcx,%r15,8),%rax - adcq $0,%rdx - addq -16(%rsp,%r15,8),%r10 - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq -8(%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-24(%rsp,%r15,8) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq -8(%rcx,%r15,8),%rax - adcq $0,%rdx - addq -8(%rsp,%r15,8),%r11 - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq (%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %rdi,-16(%rsp,%r15,8) - movq %rdx,%r13 - - mulq %rbx - addq %rax,%r10 - movq (%rcx,%r15,8),%rax - adcq $0,%rdx - addq (%rsp,%r15,8),%r10 - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq 8(%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-8(%rsp,%r15,8) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq 8(%rcx,%r15,8),%rax - adcq $0,%rdx - addq 8(%rsp,%r15,8),%r11 - adcq $0,%rdx - leaq 4(%r15),%r15 - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq -16(%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %rdi,-32(%rsp,%r15,8) - movq %rdx,%r13 - cmpq %r9,%r15 - jb L$inner4x - - mulq %rbx - addq %rax,%r10 - movq -16(%rcx,%r15,8),%rax - adcq $0,%rdx - addq -16(%rsp,%r15,8),%r10 - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq -8(%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-24(%rsp,%r15,8) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq -8(%rcx,%r15,8),%rax - adcq $0,%rdx - addq -8(%rsp,%r15,8),%r11 - adcq $0,%rdx - leaq 1(%r14),%r14 - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq (%rsi),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %rdi,-16(%rsp,%r15,8) - movq %rdx,%r13 - - xorq %rdi,%rdi - addq %r10,%r13 - adcq $0,%rdi - addq (%rsp,%r9,8),%r13 - adcq $0,%rdi - movq %r13,-8(%rsp,%r15,8) - movq %rdi,(%rsp,%r15,8) - - cmpq %r9,%r14 - jb L$outer4x - movq 16(%rsp,%r9,8),%rdi - movq 0(%rsp),%rax - movq 8(%rsp),%rdx - shrq $2,%r9 - leaq (%rsp),%rsi - xorq %r14,%r14 - - subq 0(%rcx),%rax - movq 16(%rsi),%rbx - movq 24(%rsi),%rbp - sbbq 8(%rcx),%rdx - leaq -1(%r9),%r15 - jmp L$sub4x -.p2align 4 -L$sub4x: - movq %rax,0(%rdi,%r14,8) - movq %rdx,8(%rdi,%r14,8) - sbbq 16(%rcx,%r14,8),%rbx - movq 32(%rsi,%r14,8),%rax - movq 40(%rsi,%r14,8),%rdx - sbbq 24(%rcx,%r14,8),%rbp - movq %rbx,16(%rdi,%r14,8) - movq %rbp,24(%rdi,%r14,8) - sbbq 32(%rcx,%r14,8),%rax - movq 48(%rsi,%r14,8),%rbx - movq 56(%rsi,%r14,8),%rbp - sbbq 40(%rcx,%r14,8),%rdx - leaq 4(%r14),%r14 - decq %r15 - jnz L$sub4x - - movq %rax,0(%rdi,%r14,8) - movq 32(%rsi,%r14,8),%rax - sbbq 16(%rcx,%r14,8),%rbx - movq %rdx,8(%rdi,%r14,8) - sbbq 24(%rcx,%r14,8),%rbp - movq %rbx,16(%rdi,%r14,8) - - sbbq $0,%rax - movq %rax,%xmm0 - punpcklqdq %xmm0,%xmm0 - movq %rbp,24(%rdi,%r14,8) - xorq %r14,%r14 - - movq %r9,%r15 - pxor %xmm5,%xmm5 - jmp L$copy4x -.p2align 4 -L$copy4x: - movdqu (%rsp,%r14,1),%xmm2 - movdqu 16(%rsp,%r14,1),%xmm4 - movdqu (%rdi,%r14,1),%xmm1 - movdqu 16(%rdi,%r14,1),%xmm3 - pxor %xmm1,%xmm2 - pxor %xmm3,%xmm4 - pand %xmm0,%xmm2 - pand %xmm0,%xmm4 - pxor %xmm1,%xmm2 - pxor %xmm3,%xmm4 - movdqu %xmm2,(%rdi,%r14,1) - movdqu %xmm4,16(%rdi,%r14,1) - movdqa %xmm5,(%rsp,%r14,1) - movdqa %xmm5,16(%rsp,%r14,1) - - leaq 32(%r14),%r14 - decq %r15 - jnz L$copy4x - - shlq $2,%r9 - movq 8(%rsp,%r9,8),%rsi - movq $1,%rax - movq (%rsi),%r15 - movq 8(%rsi),%r14 - movq 16(%rsi),%r13 - movq 24(%rsi),%r12 - movq 32(%rsi),%rbp - movq 40(%rsi),%rbx - leaq 48(%rsi),%rsp -L$mul4x_epilogue: - .byte 0xf3,0xc3 - - - - -.p2align 5 -bn_sqr8x_mont: -L$sqr8x_enter: - movq %rsp,%rax - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - - movl %r9d,%r10d - shll $3,%r9d - shlq $3+2,%r10 - negq %r9 - - - - - - - leaq -64(%rsp,%r9,4),%r11 - movq (%r8),%r8 - subq %rsi,%r11 - andq $4095,%r11 - cmpq %r11,%r10 - jb L$sqr8x_sp_alt - subq %r11,%rsp - leaq -64(%rsp,%r9,4),%rsp - jmp L$sqr8x_sp_done - -.p2align 5 -L$sqr8x_sp_alt: - leaq 4096-64(,%r9,4),%r10 - leaq -64(%rsp,%r9,4),%rsp - subq %r10,%r11 - movq $0,%r10 - cmovcq %r10,%r11 - subq %r11,%rsp -L$sqr8x_sp_done: - andq $-64,%rsp - movq %r9,%r10 - negq %r9 - - leaq 64(%rsp,%r9,2),%r11 - movq %r8,32(%rsp) - movq %rax,40(%rsp) -L$sqr8x_body: - - movq %r9,%rbp -.byte 102,73,15,110,211 - shrq $3+2,%rbp - movl _OPENSSL_ia32cap_P+8(%rip),%eax - jmp L$sqr8x_copy_n - -.p2align 5 -L$sqr8x_copy_n: - movq 0(%rcx),%xmm0 - movq 8(%rcx),%xmm1 - movq 16(%rcx),%xmm3 - movq 24(%rcx),%xmm4 - leaq 32(%rcx),%rcx - movdqa %xmm0,0(%r11) - movdqa %xmm1,16(%r11) - movdqa %xmm3,32(%r11) - movdqa %xmm4,48(%r11) - leaq 64(%r11),%r11 - decq %rbp - jnz L$sqr8x_copy_n - - pxor %xmm0,%xmm0 -.byte 102,72,15,110,207 -.byte 102,73,15,110,218 - call _bn_sqr8x_internal - - pxor %xmm0,%xmm0 - leaq 48(%rsp),%rax - leaq 64(%rsp,%r9,2),%rdx - shrq $3+2,%r9 - movq 40(%rsp),%rsi - jmp L$sqr8x_zero - -.p2align 5 -L$sqr8x_zero: - movdqa %xmm0,0(%rax) - movdqa %xmm0,16(%rax) - movdqa %xmm0,32(%rax) - movdqa %xmm0,48(%rax) - leaq 64(%rax),%rax - movdqa %xmm0,0(%rdx) - movdqa %xmm0,16(%rdx) - movdqa %xmm0,32(%rdx) - movdqa %xmm0,48(%rdx) - leaq 64(%rdx),%rdx - decq %r9 - jnz L$sqr8x_zero - - movq $1,%rax - movq -48(%rsi),%r15 - movq -40(%rsi),%r14 - movq -32(%rsi),%r13 - movq -24(%rsi),%r12 - movq -16(%rsi),%rbp - movq -8(%rsi),%rbx - leaq (%rsi),%rsp -L$sqr8x_epilogue: - .byte 0xf3,0xc3 - -.byte 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105,112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.p2align 4 -#endif diff --git a/third_party/boringssl/mac-x86_64/crypto/bn/x86_64-mont5.S b/third_party/boringssl/mac-x86_64/crypto/bn/x86_64-mont5.S deleted file mode 100644 index 2e8f469c14d61..0000000000000 --- a/third_party/boringssl/mac-x86_64/crypto/bn/x86_64-mont5.S +++ /dev/null @@ -1,1822 +0,0 @@ -#if defined(__x86_64__) -.text - - - -.globl _bn_mul_mont_gather5 -.private_extern _bn_mul_mont_gather5 - -.p2align 6 -_bn_mul_mont_gather5: - testl $7,%r9d - jnz L$mul_enter - jmp L$mul4x_enter - -.p2align 4 -L$mul_enter: - movl %r9d,%r9d - movq %rsp,%rax - movl 8(%rsp),%r10d - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - leaq 2(%r9),%r11 - negq %r11 - leaq (%rsp,%r11,8),%rsp - andq $-1024,%rsp - - movq %rax,8(%rsp,%r9,8) -L$mul_body: - movq %rdx,%r12 - movq %r10,%r11 - shrq $3,%r10 - andq $7,%r11 - notq %r10 - leaq L$magic_masks(%rip),%rax - andq $3,%r10 - leaq 96(%r12,%r11,8),%r12 - movq 0(%rax,%r10,8),%xmm4 - movq 8(%rax,%r10,8),%xmm5 - movq 16(%rax,%r10,8),%xmm6 - movq 24(%rax,%r10,8),%xmm7 - - movq -96(%r12),%xmm0 - movq -32(%r12),%xmm1 - pand %xmm4,%xmm0 - movq 32(%r12),%xmm2 - pand %xmm5,%xmm1 - movq 96(%r12),%xmm3 - pand %xmm6,%xmm2 - por %xmm1,%xmm0 - pand %xmm7,%xmm3 - por %xmm2,%xmm0 - leaq 256(%r12),%r12 - por %xmm3,%xmm0 - -.byte 102,72,15,126,195 - - movq (%r8),%r8 - movq (%rsi),%rax - - xorq %r14,%r14 - xorq %r15,%r15 - - movq -96(%r12),%xmm0 - movq -32(%r12),%xmm1 - pand %xmm4,%xmm0 - movq 32(%r12),%xmm2 - pand %xmm5,%xmm1 - - movq %r8,%rbp - mulq %rbx - movq %rax,%r10 - movq (%rcx),%rax - - movq 96(%r12),%xmm3 - pand %xmm6,%xmm2 - por %xmm1,%xmm0 - pand %xmm7,%xmm3 - - imulq %r10,%rbp - movq %rdx,%r11 - - por %xmm2,%xmm0 - leaq 256(%r12),%r12 - por %xmm3,%xmm0 - - mulq %rbp - addq %rax,%r10 - movq 8(%rsi),%rax - adcq $0,%rdx - movq %rdx,%r13 - - leaq 1(%r15),%r15 - jmp L$1st_enter - -.p2align 4 -L$1st: - addq %rax,%r13 - movq (%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r11,%r13 - movq %r10,%r11 - adcq $0,%rdx - movq %r13,-16(%rsp,%r15,8) - movq %rdx,%r13 - -L$1st_enter: - mulq %rbx - addq %rax,%r11 - movq (%rcx,%r15,8),%rax - adcq $0,%rdx - leaq 1(%r15),%r15 - movq %rdx,%r10 - - mulq %rbp - cmpq %r9,%r15 - jne L$1st - -.byte 102,72,15,126,195 - - addq %rax,%r13 - movq (%rsi),%rax - adcq $0,%rdx - addq %r11,%r13 - adcq $0,%rdx - movq %r13,-16(%rsp,%r15,8) - movq %rdx,%r13 - movq %r10,%r11 - - xorq %rdx,%rdx - addq %r11,%r13 - adcq $0,%rdx - movq %r13,-8(%rsp,%r9,8) - movq %rdx,(%rsp,%r9,8) - - leaq 1(%r14),%r14 - jmp L$outer -.p2align 4 -L$outer: - xorq %r15,%r15 - movq %r8,%rbp - movq (%rsp),%r10 - - movq -96(%r12),%xmm0 - movq -32(%r12),%xmm1 - pand %xmm4,%xmm0 - movq 32(%r12),%xmm2 - pand %xmm5,%xmm1 - - mulq %rbx - addq %rax,%r10 - movq (%rcx),%rax - adcq $0,%rdx - - movq 96(%r12),%xmm3 - pand %xmm6,%xmm2 - por %xmm1,%xmm0 - pand %xmm7,%xmm3 - - imulq %r10,%rbp - movq %rdx,%r11 - - por %xmm2,%xmm0 - leaq 256(%r12),%r12 - por %xmm3,%xmm0 - - mulq %rbp - addq %rax,%r10 - movq 8(%rsi),%rax - adcq $0,%rdx - movq 8(%rsp),%r10 - movq %rdx,%r13 - - leaq 1(%r15),%r15 - jmp L$inner_enter - -.p2align 4 -L$inner: - addq %rax,%r13 - movq (%rsi,%r15,8),%rax - adcq $0,%rdx - addq %r10,%r13 - movq (%rsp,%r15,8),%r10 - adcq $0,%rdx - movq %r13,-16(%rsp,%r15,8) - movq %rdx,%r13 - -L$inner_enter: - mulq %rbx - addq %rax,%r11 - movq (%rcx,%r15,8),%rax - adcq $0,%rdx - addq %r11,%r10 - movq %rdx,%r11 - adcq $0,%r11 - leaq 1(%r15),%r15 - - mulq %rbp - cmpq %r9,%r15 - jne L$inner - -.byte 102,72,15,126,195 - - addq %rax,%r13 - movq (%rsi),%rax - adcq $0,%rdx - addq %r10,%r13 - movq (%rsp,%r15,8),%r10 - adcq $0,%rdx - movq %r13,-16(%rsp,%r15,8) - movq %rdx,%r13 - - xorq %rdx,%rdx - addq %r11,%r13 - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-8(%rsp,%r9,8) - movq %rdx,(%rsp,%r9,8) - - leaq 1(%r14),%r14 - cmpq %r9,%r14 - jb L$outer - - xorq %r14,%r14 - movq (%rsp),%rax - leaq (%rsp),%rsi - movq %r9,%r15 - jmp L$sub -.p2align 4 -L$sub: sbbq (%rcx,%r14,8),%rax - movq %rax,(%rdi,%r14,8) - movq 8(%rsi,%r14,8),%rax - leaq 1(%r14),%r14 - decq %r15 - jnz L$sub - - sbbq $0,%rax - xorq %r14,%r14 - movq %r9,%r15 -.p2align 4 -L$copy: - movq (%rsp,%r14,8),%rsi - movq (%rdi,%r14,8),%rcx - xorq %rcx,%rsi - andq %rax,%rsi - xorq %rcx,%rsi - movq %r14,(%rsp,%r14,8) - movq %rsi,(%rdi,%r14,8) - leaq 1(%r14),%r14 - subq $1,%r15 - jnz L$copy - - movq 8(%rsp,%r9,8),%rsi - movq $1,%rax - movq -48(%rsi),%r15 - movq -40(%rsi),%r14 - movq -32(%rsi),%r13 - movq -24(%rsi),%r12 - movq -16(%rsi),%rbp - movq -8(%rsi),%rbx - leaq (%rsi),%rsp -L$mul_epilogue: - .byte 0xf3,0xc3 - - -.p2align 5 -bn_mul4x_mont_gather5: -L$mul4x_enter: -.byte 0x67 - movq %rsp,%rax - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 -.byte 0x67 - movl %r9d,%r10d - shll $3,%r9d - shll $3+2,%r10d - negq %r9 - - - - - - - - - leaq -64(%rsp,%r9,2),%r11 - subq %rsi,%r11 - andq $4095,%r11 - cmpq %r11,%r10 - jb L$mul4xsp_alt - subq %r11,%rsp - leaq -64(%rsp,%r9,2),%rsp - jmp L$mul4xsp_done - -.p2align 5 -L$mul4xsp_alt: - leaq 4096-64(,%r9,2),%r10 - leaq -64(%rsp,%r9,2),%rsp - subq %r10,%r11 - movq $0,%r10 - cmovcq %r10,%r11 - subq %r11,%rsp -L$mul4xsp_done: - andq $-64,%rsp - negq %r9 - - movq %rax,40(%rsp) -L$mul4x_body: - - call mul4x_internal - - movq 40(%rsp),%rsi - movq $1,%rax - movq -48(%rsi),%r15 - movq -40(%rsi),%r14 - movq -32(%rsi),%r13 - movq -24(%rsi),%r12 - movq -16(%rsi),%rbp - movq -8(%rsi),%rbx - leaq (%rsi),%rsp -L$mul4x_epilogue: - .byte 0xf3,0xc3 - - - -.p2align 5 -mul4x_internal: - shlq $5,%r9 - movl 8(%rax),%r10d - leaq 256(%rdx,%r9,1),%r13 - shrq $5,%r9 - movq %r10,%r11 - shrq $3,%r10 - andq $7,%r11 - notq %r10 - leaq L$magic_masks(%rip),%rax - andq $3,%r10 - leaq 96(%rdx,%r11,8),%r12 - movq 0(%rax,%r10,8),%xmm4 - movq 8(%rax,%r10,8),%xmm5 - addq $7,%r11 - movq 16(%rax,%r10,8),%xmm6 - movq 24(%rax,%r10,8),%xmm7 - andq $7,%r11 - - movq -96(%r12),%xmm0 - leaq 256(%r12),%r14 - movq -32(%r12),%xmm1 - pand %xmm4,%xmm0 - movq 32(%r12),%xmm2 - pand %xmm5,%xmm1 - movq 96(%r12),%xmm3 - pand %xmm6,%xmm2 -.byte 0x67 - por %xmm1,%xmm0 - movq -96(%r14),%xmm1 -.byte 0x67 - pand %xmm7,%xmm3 -.byte 0x67 - por %xmm2,%xmm0 - movq -32(%r14),%xmm2 -.byte 0x67 - pand %xmm4,%xmm1 -.byte 0x67 - por %xmm3,%xmm0 - movq 32(%r14),%xmm3 - -.byte 102,72,15,126,195 - movq 96(%r14),%xmm0 - movq %r13,16+8(%rsp) - movq %rdi,56+8(%rsp) - - movq (%r8),%r8 - movq (%rsi),%rax - leaq (%rsi,%r9,1),%rsi - negq %r9 - - movq %r8,%rbp - mulq %rbx - movq %rax,%r10 - movq (%rcx),%rax - - pand %xmm5,%xmm2 - pand %xmm6,%xmm3 - por %xmm2,%xmm1 - - imulq %r10,%rbp - - - - - - - - leaq 64+8(%rsp,%r11,8),%r14 - movq %rdx,%r11 - - pand %xmm7,%xmm0 - por %xmm3,%xmm1 - leaq 512(%r12),%r12 - por %xmm1,%xmm0 - - mulq %rbp - addq %rax,%r10 - movq 8(%rsi,%r9,1),%rax - adcq $0,%rdx - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq 16(%rcx),%rax - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq 16(%rsi,%r9,1),%rax - adcq $0,%rdx - addq %r11,%rdi - leaq 32(%r9),%r15 - leaq 64(%rcx),%rcx - adcq $0,%rdx - movq %rdi,(%r14) - movq %rdx,%r13 - jmp L$1st4x - -.p2align 5 -L$1st4x: - mulq %rbx - addq %rax,%r10 - movq -32(%rcx),%rax - leaq 32(%r14),%r14 - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq -8(%rsi,%r15,1),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-24(%r14) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq -16(%rcx),%rax - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq (%rsi,%r15,1),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %rdi,-16(%r14) - movq %rdx,%r13 - - mulq %rbx - addq %rax,%r10 - movq 0(%rcx),%rax - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq 8(%rsi,%r15,1),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-8(%r14) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq 16(%rcx),%rax - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq 16(%rsi,%r15,1),%rax - adcq $0,%rdx - addq %r11,%rdi - leaq 64(%rcx),%rcx - adcq $0,%rdx - movq %rdi,(%r14) - movq %rdx,%r13 - - addq $32,%r15 - jnz L$1st4x - - mulq %rbx - addq %rax,%r10 - movq -32(%rcx),%rax - leaq 32(%r14),%r14 - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq -8(%rsi),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %r13,-24(%r14) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq -16(%rcx),%rax - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq (%rsi,%r9,1),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %rdi,-16(%r14) - movq %rdx,%r13 - -.byte 102,72,15,126,195 - leaq (%rcx,%r9,2),%rcx - - xorq %rdi,%rdi - addq %r10,%r13 - adcq $0,%rdi - movq %r13,-8(%r14) - - jmp L$outer4x - -.p2align 5 -L$outer4x: - movq (%r14,%r9,1),%r10 - movq %r8,%rbp - mulq %rbx - addq %rax,%r10 - movq (%rcx),%rax - adcq $0,%rdx - - movq -96(%r12),%xmm0 - movq -32(%r12),%xmm1 - pand %xmm4,%xmm0 - movq 32(%r12),%xmm2 - pand %xmm5,%xmm1 - movq 96(%r12),%xmm3 - - imulq %r10,%rbp -.byte 0x67 - movq %rdx,%r11 - movq %rdi,(%r14) - - pand %xmm6,%xmm2 - por %xmm1,%xmm0 - pand %xmm7,%xmm3 - por %xmm2,%xmm0 - leaq (%r14,%r9,1),%r14 - leaq 256(%r12),%r12 - por %xmm3,%xmm0 - - mulq %rbp - addq %rax,%r10 - movq 8(%rsi,%r9,1),%rax - adcq $0,%rdx - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq 16(%rcx),%rax - adcq $0,%rdx - addq 8(%r14),%r11 - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq 16(%rsi,%r9,1),%rax - adcq $0,%rdx - addq %r11,%rdi - leaq 32(%r9),%r15 - leaq 64(%rcx),%rcx - adcq $0,%rdx - movq %rdx,%r13 - jmp L$inner4x - -.p2align 5 -L$inner4x: - mulq %rbx - addq %rax,%r10 - movq -32(%rcx),%rax - adcq $0,%rdx - addq 16(%r14),%r10 - leaq 32(%r14),%r14 - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq -8(%rsi,%r15,1),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %rdi,-32(%r14) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq -16(%rcx),%rax - adcq $0,%rdx - addq -8(%r14),%r11 - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq (%rsi,%r15,1),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %r13,-24(%r14) - movq %rdx,%r13 - - mulq %rbx - addq %rax,%r10 - movq 0(%rcx),%rax - adcq $0,%rdx - addq (%r14),%r10 - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq 8(%rsi,%r15,1),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %rdi,-16(%r14) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq 16(%rcx),%rax - adcq $0,%rdx - addq 8(%r14),%r11 - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq 16(%rsi,%r15,1),%rax - adcq $0,%rdx - addq %r11,%rdi - leaq 64(%rcx),%rcx - adcq $0,%rdx - movq %r13,-8(%r14) - movq %rdx,%r13 - - addq $32,%r15 - jnz L$inner4x - - mulq %rbx - addq %rax,%r10 - movq -32(%rcx),%rax - adcq $0,%rdx - addq 16(%r14),%r10 - leaq 32(%r14),%r14 - adcq $0,%rdx - movq %rdx,%r11 - - mulq %rbp - addq %rax,%r13 - movq -8(%rsi),%rax - adcq $0,%rdx - addq %r10,%r13 - adcq $0,%rdx - movq %rdi,-32(%r14) - movq %rdx,%rdi - - mulq %rbx - addq %rax,%r11 - movq %rbp,%rax - movq -16(%rcx),%rbp - adcq $0,%rdx - addq -8(%r14),%r11 - adcq $0,%rdx - movq %rdx,%r10 - - mulq %rbp - addq %rax,%rdi - movq (%rsi,%r9,1),%rax - adcq $0,%rdx - addq %r11,%rdi - adcq $0,%rdx - movq %r13,-24(%r14) - movq %rdx,%r13 - -.byte 102,72,15,126,195 - movq %rdi,-16(%r14) - leaq (%rcx,%r9,2),%rcx - - xorq %rdi,%rdi - addq %r10,%r13 - adcq $0,%rdi - addq (%r14),%r13 - adcq $0,%rdi - movq %r13,-8(%r14) - - cmpq 16+8(%rsp),%r12 - jb L$outer4x - subq %r13,%rbp - adcq %r15,%r15 - orq %r15,%rdi - xorq $1,%rdi - leaq (%r14,%r9,1),%rbx - leaq (%rcx,%rdi,8),%rbp - movq %r9,%rcx - sarq $3+2,%rcx - movq 56+8(%rsp),%rdi - jmp L$sqr4x_sub - -.globl _bn_power5 -.private_extern _bn_power5 - -.p2align 5 -_bn_power5: - movq %rsp,%rax - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - movl %r9d,%r10d - shll $3,%r9d - shll $3+2,%r10d - negq %r9 - movq (%r8),%r8 - - - - - - - - leaq -64(%rsp,%r9,2),%r11 - subq %rsi,%r11 - andq $4095,%r11 - cmpq %r11,%r10 - jb L$pwr_sp_alt - subq %r11,%rsp - leaq -64(%rsp,%r9,2),%rsp - jmp L$pwr_sp_done - -.p2align 5 -L$pwr_sp_alt: - leaq 4096-64(,%r9,2),%r10 - leaq -64(%rsp,%r9,2),%rsp - subq %r10,%r11 - movq $0,%r10 - cmovcq %r10,%r11 - subq %r11,%rsp -L$pwr_sp_done: - andq $-64,%rsp - movq %r9,%r10 - negq %r9 - - - - - - - - - - - movq %r8,32(%rsp) - movq %rax,40(%rsp) -L$power5_body: -.byte 102,72,15,110,207 -.byte 102,72,15,110,209 -.byte 102,73,15,110,218 -.byte 102,72,15,110,226 - - call __bn_sqr8x_internal - call __bn_sqr8x_internal - call __bn_sqr8x_internal - call __bn_sqr8x_internal - call __bn_sqr8x_internal - -.byte 102,72,15,126,209 -.byte 102,72,15,126,226 - movq %rsi,%rdi - movq 40(%rsp),%rax - leaq 32(%rsp),%r8 - - call mul4x_internal - - movq 40(%rsp),%rsi - movq $1,%rax - movq -48(%rsi),%r15 - movq -40(%rsi),%r14 - movq -32(%rsi),%r13 - movq -24(%rsi),%r12 - movq -16(%rsi),%rbp - movq -8(%rsi),%rbx - leaq (%rsi),%rsp -L$power5_epilogue: - .byte 0xf3,0xc3 - - -.globl _bn_sqr8x_internal -.private_extern _bn_sqr8x_internal -.private_extern _bn_sqr8x_internal - -.p2align 5 -_bn_sqr8x_internal: -__bn_sqr8x_internal: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - leaq 32(%r10),%rbp - leaq (%rsi,%r9,1),%rsi - - movq %r9,%rcx - - - movq -32(%rsi,%rbp,1),%r14 - leaq 48+8(%rsp,%r9,2),%rdi - movq -24(%rsi,%rbp,1),%rax - leaq -32(%rdi,%rbp,1),%rdi - movq -16(%rsi,%rbp,1),%rbx - movq %rax,%r15 - - mulq %r14 - movq %rax,%r10 - movq %rbx,%rax - movq %rdx,%r11 - movq %r10,-24(%rdi,%rbp,1) - - mulq %r14 - addq %rax,%r11 - movq %rbx,%rax - adcq $0,%rdx - movq %r11,-16(%rdi,%rbp,1) - movq %rdx,%r10 - - - movq -8(%rsi,%rbp,1),%rbx - mulq %r15 - movq %rax,%r12 - movq %rbx,%rax - movq %rdx,%r13 - - leaq (%rbp),%rcx - mulq %r14 - addq %rax,%r10 - movq %rbx,%rax - movq %rdx,%r11 - adcq $0,%r11 - addq %r12,%r10 - adcq $0,%r11 - movq %r10,-8(%rdi,%rcx,1) - jmp L$sqr4x_1st - -.p2align 5 -L$sqr4x_1st: - movq (%rsi,%rcx,1),%rbx - mulq %r15 - addq %rax,%r13 - movq %rbx,%rax - movq %rdx,%r12 - adcq $0,%r12 - - mulq %r14 - addq %rax,%r11 - movq %rbx,%rax - movq 8(%rsi,%rcx,1),%rbx - movq %rdx,%r10 - adcq $0,%r10 - addq %r13,%r11 - adcq $0,%r10 - - - mulq %r15 - addq %rax,%r12 - movq %rbx,%rax - movq %r11,(%rdi,%rcx,1) - movq %rdx,%r13 - adcq $0,%r13 - - mulq %r14 - addq %rax,%r10 - movq %rbx,%rax - movq 16(%rsi,%rcx,1),%rbx - movq %rdx,%r11 - adcq $0,%r11 - addq %r12,%r10 - adcq $0,%r11 - - mulq %r15 - addq %rax,%r13 - movq %rbx,%rax - movq %r10,8(%rdi,%rcx,1) - movq %rdx,%r12 - adcq $0,%r12 - - mulq %r14 - addq %rax,%r11 - movq %rbx,%rax - movq 24(%rsi,%rcx,1),%rbx - movq %rdx,%r10 - adcq $0,%r10 - addq %r13,%r11 - adcq $0,%r10 - - - mulq %r15 - addq %rax,%r12 - movq %rbx,%rax - movq %r11,16(%rdi,%rcx,1) - movq %rdx,%r13 - adcq $0,%r13 - leaq 32(%rcx),%rcx - - mulq %r14 - addq %rax,%r10 - movq %rbx,%rax - movq %rdx,%r11 - adcq $0,%r11 - addq %r12,%r10 - adcq $0,%r11 - movq %r10,-8(%rdi,%rcx,1) - - cmpq $0,%rcx - jne L$sqr4x_1st - - mulq %r15 - addq %rax,%r13 - leaq 16(%rbp),%rbp - adcq $0,%rdx - addq %r11,%r13 - adcq $0,%rdx - - movq %r13,(%rdi) - movq %rdx,%r12 - movq %rdx,8(%rdi) - jmp L$sqr4x_outer - -.p2align 5 -L$sqr4x_outer: - movq -32(%rsi,%rbp,1),%r14 - leaq 48+8(%rsp,%r9,2),%rdi - movq -24(%rsi,%rbp,1),%rax - leaq -32(%rdi,%rbp,1),%rdi - movq -16(%rsi,%rbp,1),%rbx - movq %rax,%r15 - - mulq %r14 - movq -24(%rdi,%rbp,1),%r10 - addq %rax,%r10 - movq %rbx,%rax - adcq $0,%rdx - movq %r10,-24(%rdi,%rbp,1) - movq %rdx,%r11 - - mulq %r14 - addq %rax,%r11 - movq %rbx,%rax - adcq $0,%rdx - addq -16(%rdi,%rbp,1),%r11 - movq %rdx,%r10 - adcq $0,%r10 - movq %r11,-16(%rdi,%rbp,1) - - xorq %r12,%r12 - - movq -8(%rsi,%rbp,1),%rbx - mulq %r15 - addq %rax,%r12 - movq %rbx,%rax - adcq $0,%rdx - addq -8(%rdi,%rbp,1),%r12 - movq %rdx,%r13 - adcq $0,%r13 - - mulq %r14 - addq %rax,%r10 - movq %rbx,%rax - adcq $0,%rdx - addq %r12,%r10 - movq %rdx,%r11 - adcq $0,%r11 - movq %r10,-8(%rdi,%rbp,1) - - leaq (%rbp),%rcx - jmp L$sqr4x_inner - -.p2align 5 -L$sqr4x_inner: - movq (%rsi,%rcx,1),%rbx - mulq %r15 - addq %rax,%r13 - movq %rbx,%rax - movq %rdx,%r12 - adcq $0,%r12 - addq (%rdi,%rcx,1),%r13 - adcq $0,%r12 - -.byte 0x67 - mulq %r14 - addq %rax,%r11 - movq %rbx,%rax - movq 8(%rsi,%rcx,1),%rbx - movq %rdx,%r10 - adcq $0,%r10 - addq %r13,%r11 - adcq $0,%r10 - - mulq %r15 - addq %rax,%r12 - movq %r11,(%rdi,%rcx,1) - movq %rbx,%rax - movq %rdx,%r13 - adcq $0,%r13 - addq 8(%rdi,%rcx,1),%r12 - leaq 16(%rcx),%rcx - adcq $0,%r13 - - mulq %r14 - addq %rax,%r10 - movq %rbx,%rax - adcq $0,%rdx - addq %r12,%r10 - movq %rdx,%r11 - adcq $0,%r11 - movq %r10,-8(%rdi,%rcx,1) - - cmpq $0,%rcx - jne L$sqr4x_inner - -.byte 0x67 - mulq %r15 - addq %rax,%r13 - adcq $0,%rdx - addq %r11,%r13 - adcq $0,%rdx - - movq %r13,(%rdi) - movq %rdx,%r12 - movq %rdx,8(%rdi) - - addq $16,%rbp - jnz L$sqr4x_outer - - - movq -32(%rsi),%r14 - leaq 48+8(%rsp,%r9,2),%rdi - movq -24(%rsi),%rax - leaq -32(%rdi,%rbp,1),%rdi - movq -16(%rsi),%rbx - movq %rax,%r15 - - mulq %r14 - addq %rax,%r10 - movq %rbx,%rax - movq %rdx,%r11 - adcq $0,%r11 - - mulq %r14 - addq %rax,%r11 - movq %rbx,%rax - movq %r10,-24(%rdi) - movq %rdx,%r10 - adcq $0,%r10 - addq %r13,%r11 - movq -8(%rsi),%rbx - adcq $0,%r10 - - mulq %r15 - addq %rax,%r12 - movq %rbx,%rax - movq %r11,-16(%rdi) - movq %rdx,%r13 - adcq $0,%r13 - - mulq %r14 - addq %rax,%r10 - movq %rbx,%rax - movq %rdx,%r11 - adcq $0,%r11 - addq %r12,%r10 - adcq $0,%r11 - movq %r10,-8(%rdi) - - mulq %r15 - addq %rax,%r13 - movq -16(%rsi),%rax - adcq $0,%rdx - addq %r11,%r13 - adcq $0,%rdx - - movq %r13,(%rdi) - movq %rdx,%r12 - movq %rdx,8(%rdi) - - mulq %rbx - addq $16,%rbp - xorq %r14,%r14 - subq %r9,%rbp - xorq %r15,%r15 - - addq %r12,%rax - adcq $0,%rdx - movq %rax,8(%rdi) - movq %rdx,16(%rdi) - movq %r15,24(%rdi) - - movq -16(%rsi,%rbp,1),%rax - leaq 48+8(%rsp),%rdi - xorq %r10,%r10 - movq 8(%rdi),%r11 - - leaq (%r14,%r10,2),%r12 - shrq $63,%r10 - leaq (%rcx,%r11,2),%r13 - shrq $63,%r11 - orq %r10,%r13 - movq 16(%rdi),%r10 - movq %r11,%r14 - mulq %rax - negq %r15 - movq 24(%rdi),%r11 - adcq %rax,%r12 - movq -8(%rsi,%rbp,1),%rax - movq %r12,(%rdi) - adcq %rdx,%r13 - - leaq (%r14,%r10,2),%rbx - movq %r13,8(%rdi) - sbbq %r15,%r15 - shrq $63,%r10 - leaq (%rcx,%r11,2),%r8 - shrq $63,%r11 - orq %r10,%r8 - movq 32(%rdi),%r10 - movq %r11,%r14 - mulq %rax - negq %r15 - movq 40(%rdi),%r11 - adcq %rax,%rbx - movq 0(%rsi,%rbp,1),%rax - movq %rbx,16(%rdi) - adcq %rdx,%r8 - leaq 16(%rbp),%rbp - movq %r8,24(%rdi) - sbbq %r15,%r15 - leaq 64(%rdi),%rdi - jmp L$sqr4x_shift_n_add - -.p2align 5 -L$sqr4x_shift_n_add: - leaq (%r14,%r10,2),%r12 - shrq $63,%r10 - leaq (%rcx,%r11,2),%r13 - shrq $63,%r11 - orq %r10,%r13 - movq -16(%rdi),%r10 - movq %r11,%r14 - mulq %rax - negq %r15 - movq -8(%rdi),%r11 - adcq %rax,%r12 - movq -8(%rsi,%rbp,1),%rax - movq %r12,-32(%rdi) - adcq %rdx,%r13 - - leaq (%r14,%r10,2),%rbx - movq %r13,-24(%rdi) - sbbq %r15,%r15 - shrq $63,%r10 - leaq (%rcx,%r11,2),%r8 - shrq $63,%r11 - orq %r10,%r8 - movq 0(%rdi),%r10 - movq %r11,%r14 - mulq %rax - negq %r15 - movq 8(%rdi),%r11 - adcq %rax,%rbx - movq 0(%rsi,%rbp,1),%rax - movq %rbx,-16(%rdi) - adcq %rdx,%r8 - - leaq (%r14,%r10,2),%r12 - movq %r8,-8(%rdi) - sbbq %r15,%r15 - shrq $63,%r10 - leaq (%rcx,%r11,2),%r13 - shrq $63,%r11 - orq %r10,%r13 - movq 16(%rdi),%r10 - movq %r11,%r14 - mulq %rax - negq %r15 - movq 24(%rdi),%r11 - adcq %rax,%r12 - movq 8(%rsi,%rbp,1),%rax - movq %r12,0(%rdi) - adcq %rdx,%r13 - - leaq (%r14,%r10,2),%rbx - movq %r13,8(%rdi) - sbbq %r15,%r15 - shrq $63,%r10 - leaq (%rcx,%r11,2),%r8 - shrq $63,%r11 - orq %r10,%r8 - movq 32(%rdi),%r10 - movq %r11,%r14 - mulq %rax - negq %r15 - movq 40(%rdi),%r11 - adcq %rax,%rbx - movq 16(%rsi,%rbp,1),%rax - movq %rbx,16(%rdi) - adcq %rdx,%r8 - movq %r8,24(%rdi) - sbbq %r15,%r15 - leaq 64(%rdi),%rdi - addq $32,%rbp - jnz L$sqr4x_shift_n_add - - leaq (%r14,%r10,2),%r12 -.byte 0x67 - shrq $63,%r10 - leaq (%rcx,%r11,2),%r13 - shrq $63,%r11 - orq %r10,%r13 - movq -16(%rdi),%r10 - movq %r11,%r14 - mulq %rax - negq %r15 - movq -8(%rdi),%r11 - adcq %rax,%r12 - movq -8(%rsi),%rax - movq %r12,-32(%rdi) - adcq %rdx,%r13 - - leaq (%r14,%r10,2),%rbx - movq %r13,-24(%rdi) - sbbq %r15,%r15 - shrq $63,%r10 - leaq (%rcx,%r11,2),%r8 - shrq $63,%r11 - orq %r10,%r8 - mulq %rax - negq %r15 - adcq %rax,%rbx - adcq %rdx,%r8 - movq %rbx,-16(%rdi) - movq %r8,-8(%rdi) -.byte 102,72,15,126,213 -sqr8x_reduction: - xorq %rax,%rax - leaq (%rbp,%r9,2),%rcx - leaq 48+8(%rsp,%r9,2),%rdx - movq %rcx,0+8(%rsp) - leaq 48+8(%rsp,%r9,1),%rdi - movq %rdx,8+8(%rsp) - negq %r9 - jmp L$8x_reduction_loop - -.p2align 5 -L$8x_reduction_loop: - leaq (%rdi,%r9,1),%rdi -.byte 0x66 - movq 0(%rdi),%rbx - movq 8(%rdi),%r9 - movq 16(%rdi),%r10 - movq 24(%rdi),%r11 - movq 32(%rdi),%r12 - movq 40(%rdi),%r13 - movq 48(%rdi),%r14 - movq 56(%rdi),%r15 - movq %rax,(%rdx) - leaq 64(%rdi),%rdi - -.byte 0x67 - movq %rbx,%r8 - imulq 32+8(%rsp),%rbx - movq 0(%rbp),%rax - movl $8,%ecx - jmp L$8x_reduce - -.p2align 5 -L$8x_reduce: - mulq %rbx - movq 16(%rbp),%rax - negq %r8 - movq %rdx,%r8 - adcq $0,%r8 - - mulq %rbx - addq %rax,%r9 - movq 32(%rbp),%rax - adcq $0,%rdx - addq %r9,%r8 - movq %rbx,48-8+8(%rsp,%rcx,8) - movq %rdx,%r9 - adcq $0,%r9 - - mulq %rbx - addq %rax,%r10 - movq 48(%rbp),%rax - adcq $0,%rdx - addq %r10,%r9 - movq 32+8(%rsp),%rsi - movq %rdx,%r10 - adcq $0,%r10 - - mulq %rbx - addq %rax,%r11 - movq 64(%rbp),%rax - adcq $0,%rdx - imulq %r8,%rsi - addq %r11,%r10 - movq %rdx,%r11 - adcq $0,%r11 - - mulq %rbx - addq %rax,%r12 - movq 80(%rbp),%rax - adcq $0,%rdx - addq %r12,%r11 - movq %rdx,%r12 - adcq $0,%r12 - - mulq %rbx - addq %rax,%r13 - movq 96(%rbp),%rax - adcq $0,%rdx - addq %r13,%r12 - movq %rdx,%r13 - adcq $0,%r13 - - mulq %rbx - addq %rax,%r14 - movq 112(%rbp),%rax - adcq $0,%rdx - addq %r14,%r13 - movq %rdx,%r14 - adcq $0,%r14 - - mulq %rbx - movq %rsi,%rbx - addq %rax,%r15 - movq 0(%rbp),%rax - adcq $0,%rdx - addq %r15,%r14 - movq %rdx,%r15 - adcq $0,%r15 - - decl %ecx - jnz L$8x_reduce - - leaq 128(%rbp),%rbp - xorq %rax,%rax - movq 8+8(%rsp),%rdx - cmpq 0+8(%rsp),%rbp - jae L$8x_no_tail - -.byte 0x66 - addq 0(%rdi),%r8 - adcq 8(%rdi),%r9 - adcq 16(%rdi),%r10 - adcq 24(%rdi),%r11 - adcq 32(%rdi),%r12 - adcq 40(%rdi),%r13 - adcq 48(%rdi),%r14 - adcq 56(%rdi),%r15 - sbbq %rsi,%rsi - - movq 48+56+8(%rsp),%rbx - movl $8,%ecx - movq 0(%rbp),%rax - jmp L$8x_tail - -.p2align 5 -L$8x_tail: - mulq %rbx - addq %rax,%r8 - movq 16(%rbp),%rax - movq %r8,(%rdi) - movq %rdx,%r8 - adcq $0,%r8 - - mulq %rbx - addq %rax,%r9 - movq 32(%rbp),%rax - adcq $0,%rdx - addq %r9,%r8 - leaq 8(%rdi),%rdi - movq %rdx,%r9 - adcq $0,%r9 - - mulq %rbx - addq %rax,%r10 - movq 48(%rbp),%rax - adcq $0,%rdx - addq %r10,%r9 - movq %rdx,%r10 - adcq $0,%r10 - - mulq %rbx - addq %rax,%r11 - movq 64(%rbp),%rax - adcq $0,%rdx - addq %r11,%r10 - movq %rdx,%r11 - adcq $0,%r11 - - mulq %rbx - addq %rax,%r12 - movq 80(%rbp),%rax - adcq $0,%rdx - addq %r12,%r11 - movq %rdx,%r12 - adcq $0,%r12 - - mulq %rbx - addq %rax,%r13 - movq 96(%rbp),%rax - adcq $0,%rdx - addq %r13,%r12 - movq %rdx,%r13 - adcq $0,%r13 - - mulq %rbx - addq %rax,%r14 - movq 112(%rbp),%rax - adcq $0,%rdx - addq %r14,%r13 - movq %rdx,%r14 - adcq $0,%r14 - - mulq %rbx - movq 48-16+8(%rsp,%rcx,8),%rbx - addq %rax,%r15 - adcq $0,%rdx - addq %r15,%r14 - movq 0(%rbp),%rax - movq %rdx,%r15 - adcq $0,%r15 - - decl %ecx - jnz L$8x_tail - - leaq 128(%rbp),%rbp - movq 8+8(%rsp),%rdx - cmpq 0+8(%rsp),%rbp - jae L$8x_tail_done - - movq 48+56+8(%rsp),%rbx - negq %rsi - movq 0(%rbp),%rax - adcq 0(%rdi),%r8 - adcq 8(%rdi),%r9 - adcq 16(%rdi),%r10 - adcq 24(%rdi),%r11 - adcq 32(%rdi),%r12 - adcq 40(%rdi),%r13 - adcq 48(%rdi),%r14 - adcq 56(%rdi),%r15 - sbbq %rsi,%rsi - - movl $8,%ecx - jmp L$8x_tail - -.p2align 5 -L$8x_tail_done: - addq (%rdx),%r8 - xorq %rax,%rax - - negq %rsi -L$8x_no_tail: - adcq 0(%rdi),%r8 - adcq 8(%rdi),%r9 - adcq 16(%rdi),%r10 - adcq 24(%rdi),%r11 - adcq 32(%rdi),%r12 - adcq 40(%rdi),%r13 - adcq 48(%rdi),%r14 - adcq 56(%rdi),%r15 - adcq $0,%rax - movq -16(%rbp),%rcx - xorq %rsi,%rsi - -.byte 102,72,15,126,213 - - movq %r8,0(%rdi) - movq %r9,8(%rdi) -.byte 102,73,15,126,217 - movq %r10,16(%rdi) - movq %r11,24(%rdi) - movq %r12,32(%rdi) - movq %r13,40(%rdi) - movq %r14,48(%rdi) - movq %r15,56(%rdi) - leaq 64(%rdi),%rdi - - cmpq %rdx,%rdi - jb L$8x_reduction_loop - - subq %r15,%rcx - leaq (%rdi,%r9,1),%rbx - adcq %rsi,%rsi - movq %r9,%rcx - orq %rsi,%rax -.byte 102,72,15,126,207 - xorq $1,%rax -.byte 102,72,15,126,206 - leaq (%rbp,%rax,8),%rbp - sarq $3+2,%rcx - jmp L$sqr4x_sub - -.p2align 5 -L$sqr4x_sub: -.byte 0x66 - movq 0(%rbx),%r12 - movq 8(%rbx),%r13 - sbbq 0(%rbp),%r12 - movq 16(%rbx),%r14 - sbbq 16(%rbp),%r13 - movq 24(%rbx),%r15 - leaq 32(%rbx),%rbx - sbbq 32(%rbp),%r14 - movq %r12,0(%rdi) - sbbq 48(%rbp),%r15 - leaq 64(%rbp),%rbp - movq %r13,8(%rdi) - movq %r14,16(%rdi) - movq %r15,24(%rdi) - leaq 32(%rdi),%rdi - - incq %rcx - jnz L$sqr4x_sub - movq %r9,%r10 - negq %r9 - .byte 0xf3,0xc3 - -.globl _bn_from_montgomery -.private_extern _bn_from_montgomery - -.p2align 5 -_bn_from_montgomery: - testl $7,%r9d - jz bn_from_mont8x - xorl %eax,%eax - .byte 0xf3,0xc3 - - - -.p2align 5 -bn_from_mont8x: -.byte 0x67 - movq %rsp,%rax - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 -.byte 0x67 - movl %r9d,%r10d - shll $3,%r9d - shll $3+2,%r10d - negq %r9 - movq (%r8),%r8 - - - - - - - - leaq -64(%rsp,%r9,2),%r11 - subq %rsi,%r11 - andq $4095,%r11 - cmpq %r11,%r10 - jb L$from_sp_alt - subq %r11,%rsp - leaq -64(%rsp,%r9,2),%rsp - jmp L$from_sp_done - -.p2align 5 -L$from_sp_alt: - leaq 4096-64(,%r9,2),%r10 - leaq -64(%rsp,%r9,2),%rsp - subq %r10,%r11 - movq $0,%r10 - cmovcq %r10,%r11 - subq %r11,%rsp -L$from_sp_done: - andq $-64,%rsp - movq %r9,%r10 - negq %r9 - - - - - - - - - - - movq %r8,32(%rsp) - movq %rax,40(%rsp) -L$from_body: - movq %r9,%r11 - leaq 48(%rsp),%rax - pxor %xmm0,%xmm0 - jmp L$mul_by_1 - -.p2align 5 -L$mul_by_1: - movdqu (%rsi),%xmm1 - movdqu 16(%rsi),%xmm2 - movdqu 32(%rsi),%xmm3 - movdqa %xmm0,(%rax,%r9,1) - movdqu 48(%rsi),%xmm4 - movdqa %xmm0,16(%rax,%r9,1) -.byte 0x48,0x8d,0xb6,0x40,0x00,0x00,0x00 - movdqa %xmm1,(%rax) - movdqa %xmm0,32(%rax,%r9,1) - movdqa %xmm2,16(%rax) - movdqa %xmm0,48(%rax,%r9,1) - movdqa %xmm3,32(%rax) - movdqa %xmm4,48(%rax) - leaq 64(%rax),%rax - subq $64,%r11 - jnz L$mul_by_1 - -.byte 102,72,15,110,207 -.byte 102,72,15,110,209 -.byte 0x67 - movq %rcx,%rbp -.byte 102,73,15,110,218 - call sqr8x_reduction - - pxor %xmm0,%xmm0 - leaq 48(%rsp),%rax - movq 40(%rsp),%rsi - jmp L$from_mont_zero - -.p2align 5 -L$from_mont_zero: - movdqa %xmm0,0(%rax) - movdqa %xmm0,16(%rax) - movdqa %xmm0,32(%rax) - movdqa %xmm0,48(%rax) - leaq 64(%rax),%rax - subq $32,%r9 - jnz L$from_mont_zero - - movq $1,%rax - movq -48(%rsi),%r15 - movq -40(%rsi),%r14 - movq -32(%rsi),%r13 - movq -24(%rsi),%r12 - movq -16(%rsi),%rbp - movq -8(%rsi),%rbx - leaq (%rsi),%rsp -L$from_epilogue: - .byte 0xf3,0xc3 - -.globl _bn_scatter5 -.private_extern _bn_scatter5 - -.p2align 4 -_bn_scatter5: - cmpl $0,%esi - jz L$scatter_epilogue - leaq (%rdx,%rcx,8),%rdx -L$scatter: - movq (%rdi),%rax - leaq 8(%rdi),%rdi - movq %rax,(%rdx) - leaq 256(%rdx),%rdx - subl $1,%esi - jnz L$scatter -L$scatter_epilogue: - .byte 0xf3,0xc3 - - -.globl _bn_gather5 -.private_extern _bn_gather5 - -.p2align 4 -_bn_gather5: - movl %ecx,%r11d - shrl $3,%ecx - andq $7,%r11 - notl %ecx - leaq L$magic_masks(%rip),%rax - andl $3,%ecx - leaq 128(%rdx,%r11,8),%rdx - movq 0(%rax,%rcx,8),%xmm4 - movq 8(%rax,%rcx,8),%xmm5 - movq 16(%rax,%rcx,8),%xmm6 - movq 24(%rax,%rcx,8),%xmm7 - jmp L$gather -.p2align 4 -L$gather: - movq -128(%rdx),%xmm0 - movq -64(%rdx),%xmm1 - pand %xmm4,%xmm0 - movq 0(%rdx),%xmm2 - pand %xmm5,%xmm1 - movq 64(%rdx),%xmm3 - pand %xmm6,%xmm2 - por %xmm1,%xmm0 - pand %xmm7,%xmm3 -.byte 0x67,0x67 - por %xmm2,%xmm0 - leaq 256(%rdx),%rdx - por %xmm3,%xmm0 - - movq %xmm0,(%rdi) - leaq 8(%rdi),%rdi - subl $1,%esi - jnz L$gather - .byte 0xf3,0xc3 -L$SEH_end_bn_gather5: - -.p2align 6 -L$magic_masks: -.long 0,0, 0,0, 0,0, -1,-1 -.long 0,0, 0,0, 0,0, 0,0 -.byte 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105,112,108,105,99,97,116,105,111,110,32,119,105,116,104,32,115,99,97,116,116,101,114,47,103,97,116,104,101,114,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -#endif diff --git a/third_party/boringssl/mac-x86_64/crypto/cpu-x86_64-asm.S b/third_party/boringssl/mac-x86_64/crypto/cpu-x86_64-asm.S deleted file mode 100644 index 0dde04d8fcba7..0000000000000 --- a/third_party/boringssl/mac-x86_64/crypto/cpu-x86_64-asm.S +++ /dev/null @@ -1,143 +0,0 @@ -#if defined(__x86_64__) -.text - -.globl _OPENSSL_ia32_cpuid -.private_extern _OPENSSL_ia32_cpuid - -.p2align 4 -_OPENSSL_ia32_cpuid: - - - movq %rdi,%rdi - movq %rbx,%r8 - - xorl %eax,%eax - movl %eax,8(%rdi) - cpuid - movl %eax,%r11d - - xorl %eax,%eax - cmpl $1970169159,%ebx - setne %al - movl %eax,%r9d - cmpl $1231384169,%edx - setne %al - orl %eax,%r9d - cmpl $1818588270,%ecx - setne %al - orl %eax,%r9d - jz L$intel - - cmpl $1752462657,%ebx - setne %al - movl %eax,%r10d - cmpl $1769238117,%edx - setne %al - orl %eax,%r10d - cmpl $1145913699,%ecx - setne %al - orl %eax,%r10d - jnz L$intel - - - - - movl $2147483648,%eax - cpuid - - - cmpl $2147483649,%eax - jb L$intel - movl %eax,%r10d - movl $2147483649,%eax - cpuid - - - orl %ecx,%r9d - andl $2049,%r9d - - cmpl $2147483656,%r10d - jb L$intel - - movl $2147483656,%eax - cpuid - - movzbq %cl,%r10 - incq %r10 - - movl $1,%eax - cpuid - - btl $28,%edx - jnc L$generic - shrl $16,%ebx - cmpb %r10b,%bl - ja L$generic - andl $4026531839,%edx - jmp L$generic - -L$intel: - cmpl $4,%r11d - movl $-1,%r10d - jb L$nocacheinfo - - movl $4,%eax - movl $0,%ecx - cpuid - movl %eax,%r10d - shrl $14,%r10d - andl $4095,%r10d - - cmpl $7,%r11d - jb L$nocacheinfo - - movl $7,%eax - xorl %ecx,%ecx - cpuid - movl %ebx,8(%rdi) - -L$nocacheinfo: - movl $1,%eax - cpuid - - andl $3220176895,%edx - cmpl $0,%r9d - jne L$notintel - orl $1073741824,%edx -L$notintel: - btl $28,%edx - jnc L$generic - andl $4026531839,%edx - cmpl $0,%r10d - je L$generic - - orl $268435456,%edx - shrl $16,%ebx - cmpb $1,%bl - ja L$generic - andl $4026531839,%edx -L$generic: - andl $2048,%r9d - andl $4294965247,%ecx - orl %ecx,%r9d - - movl %edx,%r10d - btl $27,%r9d - jnc L$clear_avx - xorl %ecx,%ecx -.byte 0x0f,0x01,0xd0 - andl $6,%eax - cmpl $6,%eax - je L$done -L$clear_avx: - movl $4026525695,%eax - andl %eax,%r9d - andl $4294967263,8(%rdi) -L$done: - movl %r9d,4(%rdi) - movl %r10d,0(%rdi) - movq %r8,%rbx - .byte 0xf3,0xc3 - - -#endif diff --git a/third_party/boringssl/mac-x86_64/crypto/md5/md5-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/md5/md5-x86_64.S deleted file mode 100644 index 1e61479bc4773..0000000000000 --- a/third_party/boringssl/mac-x86_64/crypto/md5/md5-x86_64.S +++ /dev/null @@ -1,671 +0,0 @@ -#if defined(__x86_64__) -.text -.p2align 4 - -.globl _md5_block_asm_data_order -.private_extern _md5_block_asm_data_order - -_md5_block_asm_data_order: - pushq %rbp - pushq %rbx - pushq %r12 - pushq %r14 - pushq %r15 -L$prologue: - - - - - movq %rdi,%rbp - shlq $6,%rdx - leaq (%rsi,%rdx,1),%rdi - movl 0(%rbp),%eax - movl 4(%rbp),%ebx - movl 8(%rbp),%ecx - movl 12(%rbp),%edx - - - - - - - - cmpq %rdi,%rsi - je L$end - - -L$loop: - movl %eax,%r8d - movl %ebx,%r9d - movl %ecx,%r14d - movl %edx,%r15d - movl 0(%rsi),%r10d - movl %edx,%r11d - xorl %ecx,%r11d - leal -680876936(%rax,%r10,1),%eax - andl %ebx,%r11d - xorl %edx,%r11d - movl 4(%rsi),%r10d - addl %r11d,%eax - roll $7,%eax - movl %ecx,%r11d - addl %ebx,%eax - xorl %ebx,%r11d - leal -389564586(%rdx,%r10,1),%edx - andl %eax,%r11d - xorl %ecx,%r11d - movl 8(%rsi),%r10d - addl %r11d,%edx - roll $12,%edx - movl %ebx,%r11d - addl %eax,%edx - xorl %eax,%r11d - leal 606105819(%rcx,%r10,1),%ecx - andl %edx,%r11d - xorl %ebx,%r11d - movl 12(%rsi),%r10d - addl %r11d,%ecx - roll $17,%ecx - movl %eax,%r11d - addl %edx,%ecx - xorl %edx,%r11d - leal -1044525330(%rbx,%r10,1),%ebx - andl %ecx,%r11d - xorl %eax,%r11d - movl 16(%rsi),%r10d - addl %r11d,%ebx - roll $22,%ebx - movl %edx,%r11d - addl %ecx,%ebx - xorl %ecx,%r11d - leal -176418897(%rax,%r10,1),%eax - andl %ebx,%r11d - xorl %edx,%r11d - movl 20(%rsi),%r10d - addl %r11d,%eax - roll $7,%eax - movl %ecx,%r11d - addl %ebx,%eax - xorl %ebx,%r11d - leal 1200080426(%rdx,%r10,1),%edx - andl %eax,%r11d - xorl %ecx,%r11d - movl 24(%rsi),%r10d - addl %r11d,%edx - roll $12,%edx - movl %ebx,%r11d - addl %eax,%edx - xorl %eax,%r11d - leal -1473231341(%rcx,%r10,1),%ecx - andl %edx,%r11d - xorl %ebx,%r11d - movl 28(%rsi),%r10d - addl %r11d,%ecx - roll $17,%ecx - movl %eax,%r11d - addl %edx,%ecx - xorl %edx,%r11d - leal -45705983(%rbx,%r10,1),%ebx - andl %ecx,%r11d - xorl %eax,%r11d - movl 32(%rsi),%r10d - addl %r11d,%ebx - roll $22,%ebx - movl %edx,%r11d - addl %ecx,%ebx - xorl %ecx,%r11d - leal 1770035416(%rax,%r10,1),%eax - andl %ebx,%r11d - xorl %edx,%r11d - movl 36(%rsi),%r10d - addl %r11d,%eax - roll $7,%eax - movl %ecx,%r11d - addl %ebx,%eax - xorl %ebx,%r11d - leal -1958414417(%rdx,%r10,1),%edx - andl %eax,%r11d - xorl %ecx,%r11d - movl 40(%rsi),%r10d - addl %r11d,%edx - roll $12,%edx - movl %ebx,%r11d - addl %eax,%edx - xorl %eax,%r11d - leal -42063(%rcx,%r10,1),%ecx - andl %edx,%r11d - xorl %ebx,%r11d - movl 44(%rsi),%r10d - addl %r11d,%ecx - roll $17,%ecx - movl %eax,%r11d - addl %edx,%ecx - xorl %edx,%r11d - leal -1990404162(%rbx,%r10,1),%ebx - andl %ecx,%r11d - xorl %eax,%r11d - movl 48(%rsi),%r10d - addl %r11d,%ebx - roll $22,%ebx - movl %edx,%r11d - addl %ecx,%ebx - xorl %ecx,%r11d - leal 1804603682(%rax,%r10,1),%eax - andl %ebx,%r11d - xorl %edx,%r11d - movl 52(%rsi),%r10d - addl %r11d,%eax - roll $7,%eax - movl %ecx,%r11d - addl %ebx,%eax - xorl %ebx,%r11d - leal -40341101(%rdx,%r10,1),%edx - andl %eax,%r11d - xorl %ecx,%r11d - movl 56(%rsi),%r10d - addl %r11d,%edx - roll $12,%edx - movl %ebx,%r11d - addl %eax,%edx - xorl %eax,%r11d - leal -1502002290(%rcx,%r10,1),%ecx - andl %edx,%r11d - xorl %ebx,%r11d - movl 60(%rsi),%r10d - addl %r11d,%ecx - roll $17,%ecx - movl %eax,%r11d - addl %edx,%ecx - xorl %edx,%r11d - leal 1236535329(%rbx,%r10,1),%ebx - andl %ecx,%r11d - xorl %eax,%r11d - movl 0(%rsi),%r10d - addl %r11d,%ebx - roll $22,%ebx - movl %edx,%r11d - addl %ecx,%ebx - movl 4(%rsi),%r10d - movl %edx,%r11d - movl %edx,%r12d - notl %r11d - leal -165796510(%rax,%r10,1),%eax - andl %ebx,%r12d - andl %ecx,%r11d - movl 24(%rsi),%r10d - orl %r11d,%r12d - movl %ecx,%r11d - addl %r12d,%eax - movl %ecx,%r12d - roll $5,%eax - addl %ebx,%eax - notl %r11d - leal -1069501632(%rdx,%r10,1),%edx - andl %eax,%r12d - andl %ebx,%r11d - movl 44(%rsi),%r10d - orl %r11d,%r12d - movl %ebx,%r11d - addl %r12d,%edx - movl %ebx,%r12d - roll $9,%edx - addl %eax,%edx - notl %r11d - leal 643717713(%rcx,%r10,1),%ecx - andl %edx,%r12d - andl %eax,%r11d - movl 0(%rsi),%r10d - orl %r11d,%r12d - movl %eax,%r11d - addl %r12d,%ecx - movl %eax,%r12d - roll $14,%ecx - addl %edx,%ecx - notl %r11d - leal -373897302(%rbx,%r10,1),%ebx - andl %ecx,%r12d - andl %edx,%r11d - movl 20(%rsi),%r10d - orl %r11d,%r12d - movl %edx,%r11d - addl %r12d,%ebx - movl %edx,%r12d - roll $20,%ebx - addl %ecx,%ebx - notl %r11d - leal -701558691(%rax,%r10,1),%eax - andl %ebx,%r12d - andl %ecx,%r11d - movl 40(%rsi),%r10d - orl %r11d,%r12d - movl %ecx,%r11d - addl %r12d,%eax - movl %ecx,%r12d - roll $5,%eax - addl %ebx,%eax - notl %r11d - leal 38016083(%rdx,%r10,1),%edx - andl %eax,%r12d - andl %ebx,%r11d - movl 60(%rsi),%r10d - orl %r11d,%r12d - movl %ebx,%r11d - addl %r12d,%edx - movl %ebx,%r12d - roll $9,%edx - addl %eax,%edx - notl %r11d - leal -660478335(%rcx,%r10,1),%ecx - andl %edx,%r12d - andl %eax,%r11d - movl 16(%rsi),%r10d - orl %r11d,%r12d - movl %eax,%r11d - addl %r12d,%ecx - movl %eax,%r12d - roll $14,%ecx - addl %edx,%ecx - notl %r11d - leal -405537848(%rbx,%r10,1),%ebx - andl %ecx,%r12d - andl %edx,%r11d - movl 36(%rsi),%r10d - orl %r11d,%r12d - movl %edx,%r11d - addl %r12d,%ebx - movl %edx,%r12d - roll $20,%ebx - addl %ecx,%ebx - notl %r11d - leal 568446438(%rax,%r10,1),%eax - andl %ebx,%r12d - andl %ecx,%r11d - movl 56(%rsi),%r10d - orl %r11d,%r12d - movl %ecx,%r11d - addl %r12d,%eax - movl %ecx,%r12d - roll $5,%eax - addl %ebx,%eax - notl %r11d - leal -1019803690(%rdx,%r10,1),%edx - andl %eax,%r12d - andl %ebx,%r11d - movl 12(%rsi),%r10d - orl %r11d,%r12d - movl %ebx,%r11d - addl %r12d,%edx - movl %ebx,%r12d - roll $9,%edx - addl %eax,%edx - notl %r11d - leal -187363961(%rcx,%r10,1),%ecx - andl %edx,%r12d - andl %eax,%r11d - movl 32(%rsi),%r10d - orl %r11d,%r12d - movl %eax,%r11d - addl %r12d,%ecx - movl %eax,%r12d - roll $14,%ecx - addl %edx,%ecx - notl %r11d - leal 1163531501(%rbx,%r10,1),%ebx - andl %ecx,%r12d - andl %edx,%r11d - movl 52(%rsi),%r10d - orl %r11d,%r12d - movl %edx,%r11d - addl %r12d,%ebx - movl %edx,%r12d - roll $20,%ebx - addl %ecx,%ebx - notl %r11d - leal -1444681467(%rax,%r10,1),%eax - andl %ebx,%r12d - andl %ecx,%r11d - movl 8(%rsi),%r10d - orl %r11d,%r12d - movl %ecx,%r11d - addl %r12d,%eax - movl %ecx,%r12d - roll $5,%eax - addl %ebx,%eax - notl %r11d - leal -51403784(%rdx,%r10,1),%edx - andl %eax,%r12d - andl %ebx,%r11d - movl 28(%rsi),%r10d - orl %r11d,%r12d - movl %ebx,%r11d - addl %r12d,%edx - movl %ebx,%r12d - roll $9,%edx - addl %eax,%edx - notl %r11d - leal 1735328473(%rcx,%r10,1),%ecx - andl %edx,%r12d - andl %eax,%r11d - movl 48(%rsi),%r10d - orl %r11d,%r12d - movl %eax,%r11d - addl %r12d,%ecx - movl %eax,%r12d - roll $14,%ecx - addl %edx,%ecx - notl %r11d - leal -1926607734(%rbx,%r10,1),%ebx - andl %ecx,%r12d - andl %edx,%r11d - movl 0(%rsi),%r10d - orl %r11d,%r12d - movl %edx,%r11d - addl %r12d,%ebx - movl %edx,%r12d - roll $20,%ebx - addl %ecx,%ebx - movl 20(%rsi),%r10d - movl %ecx,%r11d - leal -378558(%rax,%r10,1),%eax - movl 32(%rsi),%r10d - xorl %edx,%r11d - xorl %ebx,%r11d - addl %r11d,%eax - roll $4,%eax - movl %ebx,%r11d - addl %ebx,%eax - leal -2022574463(%rdx,%r10,1),%edx - movl 44(%rsi),%r10d - xorl %ecx,%r11d - xorl %eax,%r11d - addl %r11d,%edx - roll $11,%edx - movl %eax,%r11d - addl %eax,%edx - leal 1839030562(%rcx,%r10,1),%ecx - movl 56(%rsi),%r10d - xorl %ebx,%r11d - xorl %edx,%r11d - addl %r11d,%ecx - roll $16,%ecx - movl %edx,%r11d - addl %edx,%ecx - leal -35309556(%rbx,%r10,1),%ebx - movl 4(%rsi),%r10d - xorl %eax,%r11d - xorl %ecx,%r11d - addl %r11d,%ebx - roll $23,%ebx - movl %ecx,%r11d - addl %ecx,%ebx - leal -1530992060(%rax,%r10,1),%eax - movl 16(%rsi),%r10d - xorl %edx,%r11d - xorl %ebx,%r11d - addl %r11d,%eax - roll $4,%eax - movl %ebx,%r11d - addl %ebx,%eax - leal 1272893353(%rdx,%r10,1),%edx - movl 28(%rsi),%r10d - xorl %ecx,%r11d - xorl %eax,%r11d - addl %r11d,%edx - roll $11,%edx - movl %eax,%r11d - addl %eax,%edx - leal -155497632(%rcx,%r10,1),%ecx - movl 40(%rsi),%r10d - xorl %ebx,%r11d - xorl %edx,%r11d - addl %r11d,%ecx - roll $16,%ecx - movl %edx,%r11d - addl %edx,%ecx - leal -1094730640(%rbx,%r10,1),%ebx - movl 52(%rsi),%r10d - xorl %eax,%r11d - xorl %ecx,%r11d - addl %r11d,%ebx - roll $23,%ebx - movl %ecx,%r11d - addl %ecx,%ebx - leal 681279174(%rax,%r10,1),%eax - movl 0(%rsi),%r10d - xorl %edx,%r11d - xorl %ebx,%r11d - addl %r11d,%eax - roll $4,%eax - movl %ebx,%r11d - addl %ebx,%eax - leal -358537222(%rdx,%r10,1),%edx - movl 12(%rsi),%r10d - xorl %ecx,%r11d - xorl %eax,%r11d - addl %r11d,%edx - roll $11,%edx - movl %eax,%r11d - addl %eax,%edx - leal -722521979(%rcx,%r10,1),%ecx - movl 24(%rsi),%r10d - xorl %ebx,%r11d - xorl %edx,%r11d - addl %r11d,%ecx - roll $16,%ecx - movl %edx,%r11d - addl %edx,%ecx - leal 76029189(%rbx,%r10,1),%ebx - movl 36(%rsi),%r10d - xorl %eax,%r11d - xorl %ecx,%r11d - addl %r11d,%ebx - roll $23,%ebx - movl %ecx,%r11d - addl %ecx,%ebx - leal -640364487(%rax,%r10,1),%eax - movl 48(%rsi),%r10d - xorl %edx,%r11d - xorl %ebx,%r11d - addl %r11d,%eax - roll $4,%eax - movl %ebx,%r11d - addl %ebx,%eax - leal -421815835(%rdx,%r10,1),%edx - movl 60(%rsi),%r10d - xorl %ecx,%r11d - xorl %eax,%r11d - addl %r11d,%edx - roll $11,%edx - movl %eax,%r11d - addl %eax,%edx - leal 530742520(%rcx,%r10,1),%ecx - movl 8(%rsi),%r10d - xorl %ebx,%r11d - xorl %edx,%r11d - addl %r11d,%ecx - roll $16,%ecx - movl %edx,%r11d - addl %edx,%ecx - leal -995338651(%rbx,%r10,1),%ebx - movl 0(%rsi),%r10d - xorl %eax,%r11d - xorl %ecx,%r11d - addl %r11d,%ebx - roll $23,%ebx - movl %ecx,%r11d - addl %ecx,%ebx - movl 0(%rsi),%r10d - movl $4294967295,%r11d - xorl %edx,%r11d - leal -198630844(%rax,%r10,1),%eax - orl %ebx,%r11d - xorl %ecx,%r11d - addl %r11d,%eax - movl 28(%rsi),%r10d - movl $4294967295,%r11d - roll $6,%eax - xorl %ecx,%r11d - addl %ebx,%eax - leal 1126891415(%rdx,%r10,1),%edx - orl %eax,%r11d - xorl %ebx,%r11d - addl %r11d,%edx - movl 56(%rsi),%r10d - movl $4294967295,%r11d - roll $10,%edx - xorl %ebx,%r11d - addl %eax,%edx - leal -1416354905(%rcx,%r10,1),%ecx - orl %edx,%r11d - xorl %eax,%r11d - addl %r11d,%ecx - movl 20(%rsi),%r10d - movl $4294967295,%r11d - roll $15,%ecx - xorl %eax,%r11d - addl %edx,%ecx - leal -57434055(%rbx,%r10,1),%ebx - orl %ecx,%r11d - xorl %edx,%r11d - addl %r11d,%ebx - movl 48(%rsi),%r10d - movl $4294967295,%r11d - roll $21,%ebx - xorl %edx,%r11d - addl %ecx,%ebx - leal 1700485571(%rax,%r10,1),%eax - orl %ebx,%r11d - xorl %ecx,%r11d - addl %r11d,%eax - movl 12(%rsi),%r10d - movl $4294967295,%r11d - roll $6,%eax - xorl %ecx,%r11d - addl %ebx,%eax - leal -1894986606(%rdx,%r10,1),%edx - orl %eax,%r11d - xorl %ebx,%r11d - addl %r11d,%edx - movl 40(%rsi),%r10d - movl $4294967295,%r11d - roll $10,%edx - xorl %ebx,%r11d - addl %eax,%edx - leal -1051523(%rcx,%r10,1),%ecx - orl %edx,%r11d - xorl %eax,%r11d - addl %r11d,%ecx - movl 4(%rsi),%r10d - movl $4294967295,%r11d - roll $15,%ecx - xorl %eax,%r11d - addl %edx,%ecx - leal -2054922799(%rbx,%r10,1),%ebx - orl %ecx,%r11d - xorl %edx,%r11d - addl %r11d,%ebx - movl 32(%rsi),%r10d - movl $4294967295,%r11d - roll $21,%ebx - xorl %edx,%r11d - addl %ecx,%ebx - leal 1873313359(%rax,%r10,1),%eax - orl %ebx,%r11d - xorl %ecx,%r11d - addl %r11d,%eax - movl 60(%rsi),%r10d - movl $4294967295,%r11d - roll $6,%eax - xorl %ecx,%r11d - addl %ebx,%eax - leal -30611744(%rdx,%r10,1),%edx - orl %eax,%r11d - xorl %ebx,%r11d - addl %r11d,%edx - movl 24(%rsi),%r10d - movl $4294967295,%r11d - roll $10,%edx - xorl %ebx,%r11d - addl %eax,%edx - leal -1560198380(%rcx,%r10,1),%ecx - orl %edx,%r11d - xorl %eax,%r11d - addl %r11d,%ecx - movl 52(%rsi),%r10d - movl $4294967295,%r11d - roll $15,%ecx - xorl %eax,%r11d - addl %edx,%ecx - leal 1309151649(%rbx,%r10,1),%ebx - orl %ecx,%r11d - xorl %edx,%r11d - addl %r11d,%ebx - movl 16(%rsi),%r10d - movl $4294967295,%r11d - roll $21,%ebx - xorl %edx,%r11d - addl %ecx,%ebx - leal -145523070(%rax,%r10,1),%eax - orl %ebx,%r11d - xorl %ecx,%r11d - addl %r11d,%eax - movl 44(%rsi),%r10d - movl $4294967295,%r11d - roll $6,%eax - xorl %ecx,%r11d - addl %ebx,%eax - leal -1120210379(%rdx,%r10,1),%edx - orl %eax,%r11d - xorl %ebx,%r11d - addl %r11d,%edx - movl 8(%rsi),%r10d - movl $4294967295,%r11d - roll $10,%edx - xorl %ebx,%r11d - addl %eax,%edx - leal 718787259(%rcx,%r10,1),%ecx - orl %edx,%r11d - xorl %eax,%r11d - addl %r11d,%ecx - movl 36(%rsi),%r10d - movl $4294967295,%r11d - roll $15,%ecx - xorl %eax,%r11d - addl %edx,%ecx - leal -343485551(%rbx,%r10,1),%ebx - orl %ecx,%r11d - xorl %edx,%r11d - addl %r11d,%ebx - movl 0(%rsi),%r10d - movl $4294967295,%r11d - roll $21,%ebx - xorl %edx,%r11d - addl %ecx,%ebx - - addl %r8d,%eax - addl %r9d,%ebx - addl %r14d,%ecx - addl %r15d,%edx - - - addq $64,%rsi - cmpq %rdi,%rsi - jb L$loop - - -L$end: - movl %eax,0(%rbp) - movl %ebx,4(%rbp) - movl %ecx,8(%rbp) - movl %edx,12(%rbp) - - movq (%rsp),%r15 - movq 8(%rsp),%r14 - movq 16(%rsp),%r12 - movq 24(%rsp),%rbx - movq 32(%rsp),%rbp - addq $40,%rsp -L$epilogue: - .byte 0xf3,0xc3 - -#endif diff --git a/third_party/boringssl/mac-x86_64/crypto/modes/aesni-gcm-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/modes/aesni-gcm-x86_64.S deleted file mode 100644 index 21d5ad67e00d2..0000000000000 --- a/third_party/boringssl/mac-x86_64/crypto/modes/aesni-gcm-x86_64.S +++ /dev/null @@ -1,19 +0,0 @@ -#if defined(__x86_64__) -.text - -.globl _aesni_gcm_encrypt -.private_extern _aesni_gcm_encrypt - -_aesni_gcm_encrypt: - xorl %eax,%eax - .byte 0xf3,0xc3 - - -.globl _aesni_gcm_decrypt -.private_extern _aesni_gcm_decrypt - -_aesni_gcm_decrypt: - xorl %eax,%eax - .byte 0xf3,0xc3 - -#endif diff --git a/third_party/boringssl/mac-x86_64/crypto/modes/ghash-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/modes/ghash-x86_64.S deleted file mode 100644 index 305a91cb60c72..0000000000000 --- a/third_party/boringssl/mac-x86_64/crypto/modes/ghash-x86_64.S +++ /dev/null @@ -1,1328 +0,0 @@ -#if defined(__x86_64__) -.text - - -.globl _gcm_gmult_4bit -.private_extern _gcm_gmult_4bit - -.p2align 4 -_gcm_gmult_4bit: - pushq %rbx - pushq %rbp - pushq %r12 -L$gmult_prologue: - - movzbq 15(%rdi),%r8 - leaq L$rem_4bit(%rip),%r11 - xorq %rax,%rax - xorq %rbx,%rbx - movb %r8b,%al - movb %r8b,%bl - shlb $4,%al - movq $14,%rcx - movq 8(%rsi,%rax,1),%r8 - movq (%rsi,%rax,1),%r9 - andb $240,%bl - movq %r8,%rdx - jmp L$oop1 - -.p2align 4 -L$oop1: - shrq $4,%r8 - andq $15,%rdx - movq %r9,%r10 - movb (%rdi,%rcx,1),%al - shrq $4,%r9 - xorq 8(%rsi,%rbx,1),%r8 - shlq $60,%r10 - xorq (%rsi,%rbx,1),%r9 - movb %al,%bl - xorq (%r11,%rdx,8),%r9 - movq %r8,%rdx - shlb $4,%al - xorq %r10,%r8 - decq %rcx - js L$break1 - - shrq $4,%r8 - andq $15,%rdx - movq %r9,%r10 - shrq $4,%r9 - xorq 8(%rsi,%rax,1),%r8 - shlq $60,%r10 - xorq (%rsi,%rax,1),%r9 - andb $240,%bl - xorq (%r11,%rdx,8),%r9 - movq %r8,%rdx - xorq %r10,%r8 - jmp L$oop1 - -.p2align 4 -L$break1: - shrq $4,%r8 - andq $15,%rdx - movq %r9,%r10 - shrq $4,%r9 - xorq 8(%rsi,%rax,1),%r8 - shlq $60,%r10 - xorq (%rsi,%rax,1),%r9 - andb $240,%bl - xorq (%r11,%rdx,8),%r9 - movq %r8,%rdx - xorq %r10,%r8 - - shrq $4,%r8 - andq $15,%rdx - movq %r9,%r10 - shrq $4,%r9 - xorq 8(%rsi,%rbx,1),%r8 - shlq $60,%r10 - xorq (%rsi,%rbx,1),%r9 - xorq %r10,%r8 - xorq (%r11,%rdx,8),%r9 - - bswapq %r8 - bswapq %r9 - movq %r8,8(%rdi) - movq %r9,(%rdi) - - movq 16(%rsp),%rbx - leaq 24(%rsp),%rsp -L$gmult_epilogue: - .byte 0xf3,0xc3 - -.globl _gcm_ghash_4bit -.private_extern _gcm_ghash_4bit - -.p2align 4 -_gcm_ghash_4bit: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - subq $280,%rsp -L$ghash_prologue: - movq %rdx,%r14 - movq %rcx,%r15 - subq $-128,%rsi - leaq 16+128(%rsp),%rbp - xorl %edx,%edx - movq 0+0-128(%rsi),%r8 - movq 0+8-128(%rsi),%rax - movb %al,%dl - shrq $4,%rax - movq %r8,%r10 - shrq $4,%r8 - movq 16+0-128(%rsi),%r9 - shlb $4,%dl - movq 16+8-128(%rsi),%rbx - shlq $60,%r10 - movb %dl,0(%rsp) - orq %r10,%rax - movb %bl,%dl - shrq $4,%rbx - movq %r9,%r10 - shrq $4,%r9 - movq %r8,0(%rbp) - movq 32+0-128(%rsi),%r8 - shlb $4,%dl - movq %rax,0-128(%rbp) - movq 32+8-128(%rsi),%rax - shlq $60,%r10 - movb %dl,1(%rsp) - orq %r10,%rbx - movb %al,%dl - shrq $4,%rax - movq %r8,%r10 - shrq $4,%r8 - movq %r9,8(%rbp) - movq 48+0-128(%rsi),%r9 - shlb $4,%dl - movq %rbx,8-128(%rbp) - movq 48+8-128(%rsi),%rbx - shlq $60,%r10 - movb %dl,2(%rsp) - orq %r10,%rax - movb %bl,%dl - shrq $4,%rbx - movq %r9,%r10 - shrq $4,%r9 - movq %r8,16(%rbp) - movq 64+0-128(%rsi),%r8 - shlb $4,%dl - movq %rax,16-128(%rbp) - movq 64+8-128(%rsi),%rax - shlq $60,%r10 - movb %dl,3(%rsp) - orq %r10,%rbx - movb %al,%dl - shrq $4,%rax - movq %r8,%r10 - shrq $4,%r8 - movq %r9,24(%rbp) - movq 80+0-128(%rsi),%r9 - shlb $4,%dl - movq %rbx,24-128(%rbp) - movq 80+8-128(%rsi),%rbx - shlq $60,%r10 - movb %dl,4(%rsp) - orq %r10,%rax - movb %bl,%dl - shrq $4,%rbx - movq %r9,%r10 - shrq $4,%r9 - movq %r8,32(%rbp) - movq 96+0-128(%rsi),%r8 - shlb $4,%dl - movq %rax,32-128(%rbp) - movq 96+8-128(%rsi),%rax - shlq $60,%r10 - movb %dl,5(%rsp) - orq %r10,%rbx - movb %al,%dl - shrq $4,%rax - movq %r8,%r10 - shrq $4,%r8 - movq %r9,40(%rbp) - movq 112+0-128(%rsi),%r9 - shlb $4,%dl - movq %rbx,40-128(%rbp) - movq 112+8-128(%rsi),%rbx - shlq $60,%r10 - movb %dl,6(%rsp) - orq %r10,%rax - movb %bl,%dl - shrq $4,%rbx - movq %r9,%r10 - shrq $4,%r9 - movq %r8,48(%rbp) - movq 128+0-128(%rsi),%r8 - shlb $4,%dl - movq %rax,48-128(%rbp) - movq 128+8-128(%rsi),%rax - shlq $60,%r10 - movb %dl,7(%rsp) - orq %r10,%rbx - movb %al,%dl - shrq $4,%rax - movq %r8,%r10 - shrq $4,%r8 - movq %r9,56(%rbp) - movq 144+0-128(%rsi),%r9 - shlb $4,%dl - movq %rbx,56-128(%rbp) - movq 144+8-128(%rsi),%rbx - shlq $60,%r10 - movb %dl,8(%rsp) - orq %r10,%rax - movb %bl,%dl - shrq $4,%rbx - movq %r9,%r10 - shrq $4,%r9 - movq %r8,64(%rbp) - movq 160+0-128(%rsi),%r8 - shlb $4,%dl - movq %rax,64-128(%rbp) - movq 160+8-128(%rsi),%rax - shlq $60,%r10 - movb %dl,9(%rsp) - orq %r10,%rbx - movb %al,%dl - shrq $4,%rax - movq %r8,%r10 - shrq $4,%r8 - movq %r9,72(%rbp) - movq 176+0-128(%rsi),%r9 - shlb $4,%dl - movq %rbx,72-128(%rbp) - movq 176+8-128(%rsi),%rbx - shlq $60,%r10 - movb %dl,10(%rsp) - orq %r10,%rax - movb %bl,%dl - shrq $4,%rbx - movq %r9,%r10 - shrq $4,%r9 - movq %r8,80(%rbp) - movq 192+0-128(%rsi),%r8 - shlb $4,%dl - movq %rax,80-128(%rbp) - movq 192+8-128(%rsi),%rax - shlq $60,%r10 - movb %dl,11(%rsp) - orq %r10,%rbx - movb %al,%dl - shrq $4,%rax - movq %r8,%r10 - shrq $4,%r8 - movq %r9,88(%rbp) - movq 208+0-128(%rsi),%r9 - shlb $4,%dl - movq %rbx,88-128(%rbp) - movq 208+8-128(%rsi),%rbx - shlq $60,%r10 - movb %dl,12(%rsp) - orq %r10,%rax - movb %bl,%dl - shrq $4,%rbx - movq %r9,%r10 - shrq $4,%r9 - movq %r8,96(%rbp) - movq 224+0-128(%rsi),%r8 - shlb $4,%dl - movq %rax,96-128(%rbp) - movq 224+8-128(%rsi),%rax - shlq $60,%r10 - movb %dl,13(%rsp) - orq %r10,%rbx - movb %al,%dl - shrq $4,%rax - movq %r8,%r10 - shrq $4,%r8 - movq %r9,104(%rbp) - movq 240+0-128(%rsi),%r9 - shlb $4,%dl - movq %rbx,104-128(%rbp) - movq 240+8-128(%rsi),%rbx - shlq $60,%r10 - movb %dl,14(%rsp) - orq %r10,%rax - movb %bl,%dl - shrq $4,%rbx - movq %r9,%r10 - shrq $4,%r9 - movq %r8,112(%rbp) - shlb $4,%dl - movq %rax,112-128(%rbp) - shlq $60,%r10 - movb %dl,15(%rsp) - orq %r10,%rbx - movq %r9,120(%rbp) - movq %rbx,120-128(%rbp) - addq $-128,%rsi - movq 8(%rdi),%r8 - movq 0(%rdi),%r9 - addq %r14,%r15 - leaq L$rem_8bit(%rip),%r11 - jmp L$outer_loop -.p2align 4 -L$outer_loop: - xorq (%r14),%r9 - movq 8(%r14),%rdx - leaq 16(%r14),%r14 - xorq %r8,%rdx - movq %r9,(%rdi) - movq %rdx,8(%rdi) - shrq $32,%rdx - xorq %rax,%rax - roll $8,%edx - movb %dl,%al - movzbl %dl,%ebx - shlb $4,%al - shrl $4,%ebx - roll $8,%edx - movq 8(%rsi,%rax,1),%r8 - movq (%rsi,%rax,1),%r9 - movb %dl,%al - movzbl %dl,%ecx - shlb $4,%al - movzbq (%rsp,%rbx,1),%r12 - shrl $4,%ecx - xorq %r8,%r12 - movq %r9,%r10 - shrq $8,%r8 - movzbq %r12b,%r12 - shrq $8,%r9 - xorq -128(%rbp,%rbx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rbx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r12,2),%r12 - movzbl %dl,%ebx - shlb $4,%al - movzbq (%rsp,%rcx,1),%r13 - shrl $4,%ebx - shlq $48,%r12 - xorq %r8,%r13 - movq %r9,%r10 - xorq %r12,%r9 - shrq $8,%r8 - movzbq %r13b,%r13 - shrq $8,%r9 - xorq -128(%rbp,%rcx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rcx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r13,2),%r13 - movzbl %dl,%ecx - shlb $4,%al - movzbq (%rsp,%rbx,1),%r12 - shrl $4,%ecx - shlq $48,%r13 - xorq %r8,%r12 - movq %r9,%r10 - xorq %r13,%r9 - shrq $8,%r8 - movzbq %r12b,%r12 - movl 8(%rdi),%edx - shrq $8,%r9 - xorq -128(%rbp,%rbx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rbx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r12,2),%r12 - movzbl %dl,%ebx - shlb $4,%al - movzbq (%rsp,%rcx,1),%r13 - shrl $4,%ebx - shlq $48,%r12 - xorq %r8,%r13 - movq %r9,%r10 - xorq %r12,%r9 - shrq $8,%r8 - movzbq %r13b,%r13 - shrq $8,%r9 - xorq -128(%rbp,%rcx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rcx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r13,2),%r13 - movzbl %dl,%ecx - shlb $4,%al - movzbq (%rsp,%rbx,1),%r12 - shrl $4,%ecx - shlq $48,%r13 - xorq %r8,%r12 - movq %r9,%r10 - xorq %r13,%r9 - shrq $8,%r8 - movzbq %r12b,%r12 - shrq $8,%r9 - xorq -128(%rbp,%rbx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rbx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r12,2),%r12 - movzbl %dl,%ebx - shlb $4,%al - movzbq (%rsp,%rcx,1),%r13 - shrl $4,%ebx - shlq $48,%r12 - xorq %r8,%r13 - movq %r9,%r10 - xorq %r12,%r9 - shrq $8,%r8 - movzbq %r13b,%r13 - shrq $8,%r9 - xorq -128(%rbp,%rcx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rcx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r13,2),%r13 - movzbl %dl,%ecx - shlb $4,%al - movzbq (%rsp,%rbx,1),%r12 - shrl $4,%ecx - shlq $48,%r13 - xorq %r8,%r12 - movq %r9,%r10 - xorq %r13,%r9 - shrq $8,%r8 - movzbq %r12b,%r12 - movl 4(%rdi),%edx - shrq $8,%r9 - xorq -128(%rbp,%rbx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rbx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r12,2),%r12 - movzbl %dl,%ebx - shlb $4,%al - movzbq (%rsp,%rcx,1),%r13 - shrl $4,%ebx - shlq $48,%r12 - xorq %r8,%r13 - movq %r9,%r10 - xorq %r12,%r9 - shrq $8,%r8 - movzbq %r13b,%r13 - shrq $8,%r9 - xorq -128(%rbp,%rcx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rcx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r13,2),%r13 - movzbl %dl,%ecx - shlb $4,%al - movzbq (%rsp,%rbx,1),%r12 - shrl $4,%ecx - shlq $48,%r13 - xorq %r8,%r12 - movq %r9,%r10 - xorq %r13,%r9 - shrq $8,%r8 - movzbq %r12b,%r12 - shrq $8,%r9 - xorq -128(%rbp,%rbx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rbx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r12,2),%r12 - movzbl %dl,%ebx - shlb $4,%al - movzbq (%rsp,%rcx,1),%r13 - shrl $4,%ebx - shlq $48,%r12 - xorq %r8,%r13 - movq %r9,%r10 - xorq %r12,%r9 - shrq $8,%r8 - movzbq %r13b,%r13 - shrq $8,%r9 - xorq -128(%rbp,%rcx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rcx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r13,2),%r13 - movzbl %dl,%ecx - shlb $4,%al - movzbq (%rsp,%rbx,1),%r12 - shrl $4,%ecx - shlq $48,%r13 - xorq %r8,%r12 - movq %r9,%r10 - xorq %r13,%r9 - shrq $8,%r8 - movzbq %r12b,%r12 - movl 0(%rdi),%edx - shrq $8,%r9 - xorq -128(%rbp,%rbx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rbx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r12,2),%r12 - movzbl %dl,%ebx - shlb $4,%al - movzbq (%rsp,%rcx,1),%r13 - shrl $4,%ebx - shlq $48,%r12 - xorq %r8,%r13 - movq %r9,%r10 - xorq %r12,%r9 - shrq $8,%r8 - movzbq %r13b,%r13 - shrq $8,%r9 - xorq -128(%rbp,%rcx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rcx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r13,2),%r13 - movzbl %dl,%ecx - shlb $4,%al - movzbq (%rsp,%rbx,1),%r12 - shrl $4,%ecx - shlq $48,%r13 - xorq %r8,%r12 - movq %r9,%r10 - xorq %r13,%r9 - shrq $8,%r8 - movzbq %r12b,%r12 - shrq $8,%r9 - xorq -128(%rbp,%rbx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rbx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r12,2),%r12 - movzbl %dl,%ebx - shlb $4,%al - movzbq (%rsp,%rcx,1),%r13 - shrl $4,%ebx - shlq $48,%r12 - xorq %r8,%r13 - movq %r9,%r10 - xorq %r12,%r9 - shrq $8,%r8 - movzbq %r13b,%r13 - shrq $8,%r9 - xorq -128(%rbp,%rcx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rcx,8),%r9 - roll $8,%edx - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - movb %dl,%al - xorq %r10,%r8 - movzwq (%r11,%r13,2),%r13 - movzbl %dl,%ecx - shlb $4,%al - movzbq (%rsp,%rbx,1),%r12 - andl $240,%ecx - shlq $48,%r13 - xorq %r8,%r12 - movq %r9,%r10 - xorq %r13,%r9 - shrq $8,%r8 - movzbq %r12b,%r12 - movl -4(%rdi),%edx - shrq $8,%r9 - xorq -128(%rbp,%rbx,8),%r8 - shlq $56,%r10 - xorq (%rbp,%rbx,8),%r9 - movzwq (%r11,%r12,2),%r12 - xorq 8(%rsi,%rax,1),%r8 - xorq (%rsi,%rax,1),%r9 - shlq $48,%r12 - xorq %r10,%r8 - xorq %r12,%r9 - movzbq %r8b,%r13 - shrq $4,%r8 - movq %r9,%r10 - shlb $4,%r13b - shrq $4,%r9 - xorq 8(%rsi,%rcx,1),%r8 - movzwq (%r11,%r13,2),%r13 - shlq $60,%r10 - xorq (%rsi,%rcx,1),%r9 - xorq %r10,%r8 - shlq $48,%r13 - bswapq %r8 - xorq %r13,%r9 - bswapq %r9 - cmpq %r15,%r14 - jb L$outer_loop - movq %r8,8(%rdi) - movq %r9,(%rdi) - - leaq 280(%rsp),%rsi - movq 0(%rsi),%r15 - movq 8(%rsi),%r14 - movq 16(%rsi),%r13 - movq 24(%rsi),%r12 - movq 32(%rsi),%rbp - movq 40(%rsi),%rbx - leaq 48(%rsi),%rsp -L$ghash_epilogue: - .byte 0xf3,0xc3 - -.globl _gcm_init_clmul -.private_extern _gcm_init_clmul - -.p2align 4 -_gcm_init_clmul: -L$_init_clmul: - movdqu (%rsi),%xmm2 - pshufd $78,%xmm2,%xmm2 - - - pshufd $255,%xmm2,%xmm4 - movdqa %xmm2,%xmm3 - psllq $1,%xmm2 - pxor %xmm5,%xmm5 - psrlq $63,%xmm3 - pcmpgtd %xmm4,%xmm5 - pslldq $8,%xmm3 - por %xmm3,%xmm2 - - - pand L$0x1c2_polynomial(%rip),%xmm5 - pxor %xmm5,%xmm2 - - - pshufd $78,%xmm2,%xmm6 - movdqa %xmm2,%xmm0 - pxor %xmm2,%xmm6 - movdqa %xmm0,%xmm1 - pshufd $78,%xmm0,%xmm3 - pxor %xmm0,%xmm3 -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,222,0 - pxor %xmm0,%xmm3 - pxor %xmm1,%xmm3 - - movdqa %xmm3,%xmm4 - psrldq $8,%xmm3 - pslldq $8,%xmm4 - pxor %xmm3,%xmm1 - pxor %xmm4,%xmm0 - - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - - - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 - pshufd $78,%xmm2,%xmm3 - pshufd $78,%xmm0,%xmm4 - pxor %xmm2,%xmm3 - movdqu %xmm2,0(%rdi) - pxor %xmm0,%xmm4 - movdqu %xmm0,16(%rdi) -.byte 102,15,58,15,227,8 - movdqu %xmm4,32(%rdi) - movdqa %xmm0,%xmm1 - pshufd $78,%xmm0,%xmm3 - pxor %xmm0,%xmm3 -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,222,0 - pxor %xmm0,%xmm3 - pxor %xmm1,%xmm3 - - movdqa %xmm3,%xmm4 - psrldq $8,%xmm3 - pslldq $8,%xmm4 - pxor %xmm3,%xmm1 - pxor %xmm4,%xmm0 - - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - - - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 - movdqa %xmm0,%xmm5 - movdqa %xmm0,%xmm1 - pshufd $78,%xmm0,%xmm3 - pxor %xmm0,%xmm3 -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,222,0 - pxor %xmm0,%xmm3 - pxor %xmm1,%xmm3 - - movdqa %xmm3,%xmm4 - psrldq $8,%xmm3 - pslldq $8,%xmm4 - pxor %xmm3,%xmm1 - pxor %xmm4,%xmm0 - - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - - - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 - pshufd $78,%xmm5,%xmm3 - pshufd $78,%xmm0,%xmm4 - pxor %xmm5,%xmm3 - movdqu %xmm5,48(%rdi) - pxor %xmm0,%xmm4 - movdqu %xmm0,64(%rdi) -.byte 102,15,58,15,227,8 - movdqu %xmm4,80(%rdi) - .byte 0xf3,0xc3 - -.globl _gcm_gmult_clmul -.private_extern _gcm_gmult_clmul - -.p2align 4 -_gcm_gmult_clmul: -L$_gmult_clmul: - movdqu (%rdi),%xmm0 - movdqa L$bswap_mask(%rip),%xmm5 - movdqu (%rsi),%xmm2 - movdqu 32(%rsi),%xmm4 -.byte 102,15,56,0,197 - movdqa %xmm0,%xmm1 - pshufd $78,%xmm0,%xmm3 - pxor %xmm0,%xmm3 -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,220,0 - pxor %xmm0,%xmm3 - pxor %xmm1,%xmm3 - - movdqa %xmm3,%xmm4 - psrldq $8,%xmm3 - pslldq $8,%xmm4 - pxor %xmm3,%xmm1 - pxor %xmm4,%xmm0 - - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - - - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 -.byte 102,15,56,0,197 - movdqu %xmm0,(%rdi) - .byte 0xf3,0xc3 - -.globl _gcm_ghash_clmul -.private_extern _gcm_ghash_clmul - -.p2align 5 -_gcm_ghash_clmul: -L$_ghash_clmul: - movdqa L$bswap_mask(%rip),%xmm10 - - movdqu (%rdi),%xmm0 - movdqu (%rsi),%xmm2 - movdqu 32(%rsi),%xmm7 -.byte 102,65,15,56,0,194 - - subq $16,%rcx - jz L$odd_tail - - movdqu 16(%rsi),%xmm6 - movl _OPENSSL_ia32cap_P+4(%rip),%eax - cmpq $48,%rcx - jb L$skip4x - - andl $71303168,%eax - cmpl $4194304,%eax - je L$skip4x - - subq $48,%rcx - movq $11547335547999543296,%rax - movdqu 48(%rsi),%xmm14 - movdqu 64(%rsi),%xmm15 - - - - - movdqu 48(%rdx),%xmm3 - movdqu 32(%rdx),%xmm11 -.byte 102,65,15,56,0,218 -.byte 102,69,15,56,0,218 - movdqa %xmm3,%xmm5 - pshufd $78,%xmm3,%xmm4 - pxor %xmm3,%xmm4 -.byte 102,15,58,68,218,0 -.byte 102,15,58,68,234,17 -.byte 102,15,58,68,231,0 - - movdqa %xmm11,%xmm13 - pshufd $78,%xmm11,%xmm12 - pxor %xmm11,%xmm12 -.byte 102,68,15,58,68,222,0 -.byte 102,68,15,58,68,238,17 -.byte 102,68,15,58,68,231,16 - xorps %xmm11,%xmm3 - xorps %xmm13,%xmm5 - movups 80(%rsi),%xmm7 - xorps %xmm12,%xmm4 - - movdqu 16(%rdx),%xmm11 - movdqu 0(%rdx),%xmm8 -.byte 102,69,15,56,0,218 -.byte 102,69,15,56,0,194 - movdqa %xmm11,%xmm13 - pshufd $78,%xmm11,%xmm12 - pxor %xmm8,%xmm0 - pxor %xmm11,%xmm12 -.byte 102,69,15,58,68,222,0 - movdqa %xmm0,%xmm1 - pshufd $78,%xmm0,%xmm8 - pxor %xmm0,%xmm8 -.byte 102,69,15,58,68,238,17 -.byte 102,68,15,58,68,231,0 - xorps %xmm11,%xmm3 - xorps %xmm13,%xmm5 - - leaq 64(%rdx),%rdx - subq $64,%rcx - jc L$tail4x - - jmp L$mod4_loop -.p2align 5 -L$mod4_loop: -.byte 102,65,15,58,68,199,0 - xorps %xmm12,%xmm4 - movdqu 48(%rdx),%xmm11 -.byte 102,69,15,56,0,218 -.byte 102,65,15,58,68,207,17 - xorps %xmm3,%xmm0 - movdqu 32(%rdx),%xmm3 - movdqa %xmm11,%xmm13 -.byte 102,68,15,58,68,199,16 - pshufd $78,%xmm11,%xmm12 - xorps %xmm5,%xmm1 - pxor %xmm11,%xmm12 -.byte 102,65,15,56,0,218 - movups 32(%rsi),%xmm7 - xorps %xmm4,%xmm8 -.byte 102,68,15,58,68,218,0 - pshufd $78,%xmm3,%xmm4 - - pxor %xmm0,%xmm8 - movdqa %xmm3,%xmm5 - pxor %xmm1,%xmm8 - pxor %xmm3,%xmm4 - movdqa %xmm8,%xmm9 -.byte 102,68,15,58,68,234,17 - pslldq $8,%xmm8 - psrldq $8,%xmm9 - pxor %xmm8,%xmm0 - movdqa L$7_mask(%rip),%xmm8 - pxor %xmm9,%xmm1 -.byte 102,76,15,110,200 - - pand %xmm0,%xmm8 -.byte 102,69,15,56,0,200 - pxor %xmm0,%xmm9 -.byte 102,68,15,58,68,231,0 - psllq $57,%xmm9 - movdqa %xmm9,%xmm8 - pslldq $8,%xmm9 -.byte 102,15,58,68,222,0 - psrldq $8,%xmm8 - pxor %xmm9,%xmm0 - pxor %xmm8,%xmm1 - movdqu 0(%rdx),%xmm8 - - movdqa %xmm0,%xmm9 - psrlq $1,%xmm0 -.byte 102,15,58,68,238,17 - xorps %xmm11,%xmm3 - movdqu 16(%rdx),%xmm11 -.byte 102,69,15,56,0,218 -.byte 102,15,58,68,231,16 - xorps %xmm13,%xmm5 - movups 80(%rsi),%xmm7 -.byte 102,69,15,56,0,194 - pxor %xmm9,%xmm1 - pxor %xmm0,%xmm9 - psrlq $5,%xmm0 - - movdqa %xmm11,%xmm13 - pxor %xmm12,%xmm4 - pshufd $78,%xmm11,%xmm12 - pxor %xmm9,%xmm0 - pxor %xmm8,%xmm1 - pxor %xmm11,%xmm12 -.byte 102,69,15,58,68,222,0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 - movdqa %xmm0,%xmm1 -.byte 102,69,15,58,68,238,17 - xorps %xmm11,%xmm3 - pshufd $78,%xmm0,%xmm8 - pxor %xmm0,%xmm8 - -.byte 102,68,15,58,68,231,0 - xorps %xmm13,%xmm5 - - leaq 64(%rdx),%rdx - subq $64,%rcx - jnc L$mod4_loop - -L$tail4x: -.byte 102,65,15,58,68,199,0 -.byte 102,65,15,58,68,207,17 -.byte 102,68,15,58,68,199,16 - xorps %xmm12,%xmm4 - xorps %xmm3,%xmm0 - xorps %xmm5,%xmm1 - pxor %xmm0,%xmm1 - pxor %xmm4,%xmm8 - - pxor %xmm1,%xmm8 - pxor %xmm0,%xmm1 - - movdqa %xmm8,%xmm9 - psrldq $8,%xmm8 - pslldq $8,%xmm9 - pxor %xmm8,%xmm1 - pxor %xmm9,%xmm0 - - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - - - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 - addq $64,%rcx - jz L$done - movdqu 32(%rsi),%xmm7 - subq $16,%rcx - jz L$odd_tail -L$skip4x: - - - - - - movdqu (%rdx),%xmm8 - movdqu 16(%rdx),%xmm3 -.byte 102,69,15,56,0,194 -.byte 102,65,15,56,0,218 - pxor %xmm8,%xmm0 - - movdqa %xmm3,%xmm5 - pshufd $78,%xmm3,%xmm4 - pxor %xmm3,%xmm4 -.byte 102,15,58,68,218,0 -.byte 102,15,58,68,234,17 -.byte 102,15,58,68,231,0 - - leaq 32(%rdx),%rdx - nop - subq $32,%rcx - jbe L$even_tail - nop - jmp L$mod_loop - -.p2align 5 -L$mod_loop: - movdqa %xmm0,%xmm1 - movdqa %xmm4,%xmm8 - pshufd $78,%xmm0,%xmm4 - pxor %xmm0,%xmm4 - -.byte 102,15,58,68,198,0 -.byte 102,15,58,68,206,17 -.byte 102,15,58,68,231,16 - - pxor %xmm3,%xmm0 - pxor %xmm5,%xmm1 - movdqu (%rdx),%xmm9 - pxor %xmm0,%xmm8 -.byte 102,69,15,56,0,202 - movdqu 16(%rdx),%xmm3 - - pxor %xmm1,%xmm8 - pxor %xmm9,%xmm1 - pxor %xmm8,%xmm4 -.byte 102,65,15,56,0,218 - movdqa %xmm4,%xmm8 - psrldq $8,%xmm8 - pslldq $8,%xmm4 - pxor %xmm8,%xmm1 - pxor %xmm4,%xmm0 - - movdqa %xmm3,%xmm5 - - movdqa %xmm0,%xmm9 - movdqa %xmm0,%xmm8 - psllq $5,%xmm0 - pxor %xmm0,%xmm8 -.byte 102,15,58,68,218,0 - psllq $1,%xmm0 - pxor %xmm8,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm8 - pslldq $8,%xmm0 - psrldq $8,%xmm8 - pxor %xmm9,%xmm0 - pshufd $78,%xmm5,%xmm4 - pxor %xmm8,%xmm1 - pxor %xmm5,%xmm4 - - movdqa %xmm0,%xmm9 - psrlq $1,%xmm0 -.byte 102,15,58,68,234,17 - pxor %xmm9,%xmm1 - pxor %xmm0,%xmm9 - psrlq $5,%xmm0 - pxor %xmm9,%xmm0 - leaq 32(%rdx),%rdx - psrlq $1,%xmm0 -.byte 102,15,58,68,231,0 - pxor %xmm1,%xmm0 - - subq $32,%rcx - ja L$mod_loop - -L$even_tail: - movdqa %xmm0,%xmm1 - movdqa %xmm4,%xmm8 - pshufd $78,%xmm0,%xmm4 - pxor %xmm0,%xmm4 - -.byte 102,15,58,68,198,0 -.byte 102,15,58,68,206,17 -.byte 102,15,58,68,231,16 - - pxor %xmm3,%xmm0 - pxor %xmm5,%xmm1 - pxor %xmm0,%xmm8 - pxor %xmm1,%xmm8 - pxor %xmm8,%xmm4 - movdqa %xmm4,%xmm8 - psrldq $8,%xmm8 - pslldq $8,%xmm4 - pxor %xmm8,%xmm1 - pxor %xmm4,%xmm0 - - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - - - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 - testq %rcx,%rcx - jnz L$done - -L$odd_tail: - movdqu (%rdx),%xmm8 -.byte 102,69,15,56,0,194 - pxor %xmm8,%xmm0 - movdqa %xmm0,%xmm1 - pshufd $78,%xmm0,%xmm3 - pxor %xmm0,%xmm3 -.byte 102,15,58,68,194,0 -.byte 102,15,58,68,202,17 -.byte 102,15,58,68,223,0 - pxor %xmm0,%xmm3 - pxor %xmm1,%xmm3 - - movdqa %xmm3,%xmm4 - psrldq $8,%xmm3 - pslldq $8,%xmm4 - pxor %xmm3,%xmm1 - pxor %xmm4,%xmm0 - - movdqa %xmm0,%xmm4 - movdqa %xmm0,%xmm3 - psllq $5,%xmm0 - pxor %xmm0,%xmm3 - psllq $1,%xmm0 - pxor %xmm3,%xmm0 - psllq $57,%xmm0 - movdqa %xmm0,%xmm3 - pslldq $8,%xmm0 - psrldq $8,%xmm3 - pxor %xmm4,%xmm0 - pxor %xmm3,%xmm1 - - - movdqa %xmm0,%xmm4 - psrlq $1,%xmm0 - pxor %xmm4,%xmm1 - pxor %xmm0,%xmm4 - psrlq $5,%xmm0 - pxor %xmm4,%xmm0 - psrlq $1,%xmm0 - pxor %xmm1,%xmm0 -L$done: -.byte 102,65,15,56,0,194 - movdqu %xmm0,(%rdi) - .byte 0xf3,0xc3 - -.globl _gcm_init_avx -.private_extern _gcm_init_avx - -.p2align 5 -_gcm_init_avx: - jmp L$_init_clmul - -.globl _gcm_gmult_avx -.private_extern _gcm_gmult_avx - -.p2align 5 -_gcm_gmult_avx: - jmp L$_gmult_clmul - -.globl _gcm_ghash_avx -.private_extern _gcm_ghash_avx - -.p2align 5 -_gcm_ghash_avx: - jmp L$_ghash_clmul - -.p2align 6 -L$bswap_mask: -.byte 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -L$0x1c2_polynomial: -.byte 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc2 -L$7_mask: -.long 7,0,7,0 -L$7_mask_poly: -.long 7,0,450,0 -.p2align 6 - -L$rem_4bit: -.long 0,0,0,471859200,0,943718400,0,610271232 -.long 0,1887436800,0,1822425088,0,1220542464,0,1423966208 -.long 0,3774873600,0,4246732800,0,3644850176,0,3311403008 -.long 0,2441084928,0,2376073216,0,2847932416,0,3051356160 - -L$rem_8bit: -.value 0x0000,0x01C2,0x0384,0x0246,0x0708,0x06CA,0x048C,0x054E -.value 0x0E10,0x0FD2,0x0D94,0x0C56,0x0918,0x08DA,0x0A9C,0x0B5E -.value 0x1C20,0x1DE2,0x1FA4,0x1E66,0x1B28,0x1AEA,0x18AC,0x196E -.value 0x1230,0x13F2,0x11B4,0x1076,0x1538,0x14FA,0x16BC,0x177E -.value 0x3840,0x3982,0x3BC4,0x3A06,0x3F48,0x3E8A,0x3CCC,0x3D0E -.value 0x3650,0x3792,0x35D4,0x3416,0x3158,0x309A,0x32DC,0x331E -.value 0x2460,0x25A2,0x27E4,0x2626,0x2368,0x22AA,0x20EC,0x212E -.value 0x2A70,0x2BB2,0x29F4,0x2836,0x2D78,0x2CBA,0x2EFC,0x2F3E -.value 0x7080,0x7142,0x7304,0x72C6,0x7788,0x764A,0x740C,0x75CE -.value 0x7E90,0x7F52,0x7D14,0x7CD6,0x7998,0x785A,0x7A1C,0x7BDE -.value 0x6CA0,0x6D62,0x6F24,0x6EE6,0x6BA8,0x6A6A,0x682C,0x69EE -.value 0x62B0,0x6372,0x6134,0x60F6,0x65B8,0x647A,0x663C,0x67FE -.value 0x48C0,0x4902,0x4B44,0x4A86,0x4FC8,0x4E0A,0x4C4C,0x4D8E -.value 0x46D0,0x4712,0x4554,0x4496,0x41D8,0x401A,0x425C,0x439E -.value 0x54E0,0x5522,0x5764,0x56A6,0x53E8,0x522A,0x506C,0x51AE -.value 0x5AF0,0x5B32,0x5974,0x58B6,0x5DF8,0x5C3A,0x5E7C,0x5FBE -.value 0xE100,0xE0C2,0xE284,0xE346,0xE608,0xE7CA,0xE58C,0xE44E -.value 0xEF10,0xEED2,0xEC94,0xED56,0xE818,0xE9DA,0xEB9C,0xEA5E -.value 0xFD20,0xFCE2,0xFEA4,0xFF66,0xFA28,0xFBEA,0xF9AC,0xF86E -.value 0xF330,0xF2F2,0xF0B4,0xF176,0xF438,0xF5FA,0xF7BC,0xF67E -.value 0xD940,0xD882,0xDAC4,0xDB06,0xDE48,0xDF8A,0xDDCC,0xDC0E -.value 0xD750,0xD692,0xD4D4,0xD516,0xD058,0xD19A,0xD3DC,0xD21E -.value 0xC560,0xC4A2,0xC6E4,0xC726,0xC268,0xC3AA,0xC1EC,0xC02E -.value 0xCB70,0xCAB2,0xC8F4,0xC936,0xCC78,0xCDBA,0xCFFC,0xCE3E -.value 0x9180,0x9042,0x9204,0x93C6,0x9688,0x974A,0x950C,0x94CE -.value 0x9F90,0x9E52,0x9C14,0x9DD6,0x9898,0x995A,0x9B1C,0x9ADE -.value 0x8DA0,0x8C62,0x8E24,0x8FE6,0x8AA8,0x8B6A,0x892C,0x88EE -.value 0x83B0,0x8272,0x8034,0x81F6,0x84B8,0x857A,0x873C,0x86FE -.value 0xA9C0,0xA802,0xAA44,0xAB86,0xAEC8,0xAF0A,0xAD4C,0xAC8E -.value 0xA7D0,0xA612,0xA454,0xA596,0xA0D8,0xA11A,0xA35C,0xA29E -.value 0xB5E0,0xB422,0xB664,0xB7A6,0xB2E8,0xB32A,0xB16C,0xB0AE -.value 0xBBF0,0xBA32,0xB874,0xB9B6,0xBCF8,0xBD3A,0xBF7C,0xBEBE - -.byte 71,72,65,83,72,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.p2align 6 -#endif diff --git a/third_party/boringssl/mac-x86_64/crypto/rand/rdrand-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/rand/rdrand-x86_64.S deleted file mode 100644 index f0df296e1a3c8..0000000000000 --- a/third_party/boringssl/mac-x86_64/crypto/rand/rdrand-x86_64.S +++ /dev/null @@ -1,48 +0,0 @@ -#if defined(__x86_64__) -.text - - - - -.globl _CRYPTO_rdrand -.private_extern _CRYPTO_rdrand - -.p2align 4 -_CRYPTO_rdrand: - xorq %rax,%rax - - -.byte 0x48, 0x0f, 0xc7, 0xf1 - - adcq %rax,%rax - movq %rcx,0(%rdi) - .byte 0xf3,0xc3 - - - - - -.globl _CRYPTO_rdrand_multiple8_buf -.private_extern _CRYPTO_rdrand_multiple8_buf - -.p2align 4 -_CRYPTO_rdrand_multiple8_buf: - testq %rsi,%rsi - jz L$out - movq $8,%rdx -L$loop: - - -.byte 0x48, 0x0f, 0xc7, 0xf1 - jnc L$err - movq %rcx,0(%rdi) - addq %rdx,%rdi - subq %rdx,%rsi - jnz L$loop -L$out: - movq $1,%rax - .byte 0xf3,0xc3 -L$err: - xorq %rax,%rax - .byte 0xf3,0xc3 -#endif diff --git a/third_party/boringssl/mac-x86_64/crypto/rc4/rc4-md5-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/rc4/rc4-md5-x86_64.S deleted file mode 100644 index 31ee7d26dffd6..0000000000000 --- a/third_party/boringssl/mac-x86_64/crypto/rc4/rc4-md5-x86_64.S +++ /dev/null @@ -1,1262 +0,0 @@ -#if defined(__x86_64__) -.text -.p2align 4 - -.globl _rc4_md5_enc -.private_extern _rc4_md5_enc - -_rc4_md5_enc: - cmpq $0,%r9 - je L$abort - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - subq $40,%rsp -L$body: - movq %rcx,%r11 - movq %r9,%r12 - movq %rsi,%r13 - movq %rdx,%r14 - movq %r8,%r15 - xorq %rbp,%rbp - xorq %rcx,%rcx - - leaq 8(%rdi),%rdi - movb -8(%rdi),%bpl - movb -4(%rdi),%cl - - incb %bpl - subq %r13,%r14 - movl (%rdi,%rbp,4),%eax - addb %al,%cl - leaq (%rdi,%rbp,4),%rsi - shlq $6,%r12 - addq %r15,%r12 - movq %r12,16(%rsp) - - movq %r11,24(%rsp) - movl 0(%r11),%r8d - movl 4(%r11),%r9d - movl 8(%r11),%r10d - movl 12(%r11),%r11d - jmp L$oop - -.p2align 4 -L$oop: - movl %r8d,0(%rsp) - movl %r9d,4(%rsp) - movl %r10d,8(%rsp) - movl %r11d,%r12d - movl %r11d,12(%rsp) - pxor %xmm0,%xmm0 - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r9d,%r12d - addl 0(%r15),%r8d - addb %dl,%al - movl 4(%rsi),%ebx - addl $3614090360,%r8d - xorl %r11d,%r12d - movzbl %al,%eax - movl %edx,0(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $7,%r8d - movl %r10d,%r12d - movd (%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - pxor %xmm1,%xmm1 - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r8d,%r12d - addl 4(%r15),%r11d - addb %dl,%bl - movl 8(%rsi),%eax - addl $3905402710,%r11d - xorl %r10d,%r12d - movzbl %bl,%ebx - movl %edx,4(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $12,%r11d - movl %r9d,%r12d - movd (%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r11d,%r12d - addl 8(%r15),%r10d - addb %dl,%al - movl 12(%rsi),%ebx - addl $606105819,%r10d - xorl %r9d,%r12d - movzbl %al,%eax - movl %edx,8(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $17,%r10d - movl %r8d,%r12d - pinsrw $1,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r10d,%r12d - addl 12(%r15),%r9d - addb %dl,%bl - movl 16(%rsi),%eax - addl $3250441966,%r9d - xorl %r8d,%r12d - movzbl %bl,%ebx - movl %edx,12(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $22,%r9d - movl %r11d,%r12d - pinsrw $1,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r9d,%r12d - addl 16(%r15),%r8d - addb %dl,%al - movl 20(%rsi),%ebx - addl $4118548399,%r8d - xorl %r11d,%r12d - movzbl %al,%eax - movl %edx,16(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $7,%r8d - movl %r10d,%r12d - pinsrw $2,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r8d,%r12d - addl 20(%r15),%r11d - addb %dl,%bl - movl 24(%rsi),%eax - addl $1200080426,%r11d - xorl %r10d,%r12d - movzbl %bl,%ebx - movl %edx,20(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $12,%r11d - movl %r9d,%r12d - pinsrw $2,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r11d,%r12d - addl 24(%r15),%r10d - addb %dl,%al - movl 28(%rsi),%ebx - addl $2821735955,%r10d - xorl %r9d,%r12d - movzbl %al,%eax - movl %edx,24(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $17,%r10d - movl %r8d,%r12d - pinsrw $3,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r10d,%r12d - addl 28(%r15),%r9d - addb %dl,%bl - movl 32(%rsi),%eax - addl $4249261313,%r9d - xorl %r8d,%r12d - movzbl %bl,%ebx - movl %edx,28(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $22,%r9d - movl %r11d,%r12d - pinsrw $3,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r9d,%r12d - addl 32(%r15),%r8d - addb %dl,%al - movl 36(%rsi),%ebx - addl $1770035416,%r8d - xorl %r11d,%r12d - movzbl %al,%eax - movl %edx,32(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $7,%r8d - movl %r10d,%r12d - pinsrw $4,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r8d,%r12d - addl 36(%r15),%r11d - addb %dl,%bl - movl 40(%rsi),%eax - addl $2336552879,%r11d - xorl %r10d,%r12d - movzbl %bl,%ebx - movl %edx,36(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $12,%r11d - movl %r9d,%r12d - pinsrw $4,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r11d,%r12d - addl 40(%r15),%r10d - addb %dl,%al - movl 44(%rsi),%ebx - addl $4294925233,%r10d - xorl %r9d,%r12d - movzbl %al,%eax - movl %edx,40(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $17,%r10d - movl %r8d,%r12d - pinsrw $5,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r10d,%r12d - addl 44(%r15),%r9d - addb %dl,%bl - movl 48(%rsi),%eax - addl $2304563134,%r9d - xorl %r8d,%r12d - movzbl %bl,%ebx - movl %edx,44(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $22,%r9d - movl %r11d,%r12d - pinsrw $5,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r9d,%r12d - addl 48(%r15),%r8d - addb %dl,%al - movl 52(%rsi),%ebx - addl $1804603682,%r8d - xorl %r11d,%r12d - movzbl %al,%eax - movl %edx,48(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $7,%r8d - movl %r10d,%r12d - pinsrw $6,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r8d,%r12d - addl 52(%r15),%r11d - addb %dl,%bl - movl 56(%rsi),%eax - addl $4254626195,%r11d - xorl %r10d,%r12d - movzbl %bl,%ebx - movl %edx,52(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $12,%r11d - movl %r9d,%r12d - pinsrw $6,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r11d,%r12d - addl 56(%r15),%r10d - addb %dl,%al - movl 60(%rsi),%ebx - addl $2792965006,%r10d - xorl %r9d,%r12d - movzbl %al,%eax - movl %edx,56(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $17,%r10d - movl %r8d,%r12d - pinsrw $7,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movdqu (%r13),%xmm2 - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r10d,%r12d - addl 60(%r15),%r9d - addb %dl,%bl - movl 64(%rsi),%eax - addl $1236535329,%r9d - xorl %r8d,%r12d - movzbl %bl,%ebx - movl %edx,60(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $22,%r9d - movl %r10d,%r12d - pinsrw $7,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - psllq $8,%xmm1 - pxor %xmm0,%xmm2 - pxor %xmm1,%xmm2 - pxor %xmm0,%xmm0 - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r11d,%r12d - addl 4(%r15),%r8d - addb %dl,%al - movl 68(%rsi),%ebx - addl $4129170786,%r8d - xorl %r10d,%r12d - movzbl %al,%eax - movl %edx,64(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $5,%r8d - movl %r9d,%r12d - movd (%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - pxor %xmm1,%xmm1 - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r10d,%r12d - addl 24(%r15),%r11d - addb %dl,%bl - movl 72(%rsi),%eax - addl $3225465664,%r11d - xorl %r9d,%r12d - movzbl %bl,%ebx - movl %edx,68(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $9,%r11d - movl %r8d,%r12d - movd (%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r9d,%r12d - addl 44(%r15),%r10d - addb %dl,%al - movl 76(%rsi),%ebx - addl $643717713,%r10d - xorl %r8d,%r12d - movzbl %al,%eax - movl %edx,72(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $14,%r10d - movl %r11d,%r12d - pinsrw $1,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r8d,%r12d - addl 0(%r15),%r9d - addb %dl,%bl - movl 80(%rsi),%eax - addl $3921069994,%r9d - xorl %r11d,%r12d - movzbl %bl,%ebx - movl %edx,76(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $20,%r9d - movl %r10d,%r12d - pinsrw $1,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r11d,%r12d - addl 20(%r15),%r8d - addb %dl,%al - movl 84(%rsi),%ebx - addl $3593408605,%r8d - xorl %r10d,%r12d - movzbl %al,%eax - movl %edx,80(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $5,%r8d - movl %r9d,%r12d - pinsrw $2,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r10d,%r12d - addl 40(%r15),%r11d - addb %dl,%bl - movl 88(%rsi),%eax - addl $38016083,%r11d - xorl %r9d,%r12d - movzbl %bl,%ebx - movl %edx,84(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $9,%r11d - movl %r8d,%r12d - pinsrw $2,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r9d,%r12d - addl 60(%r15),%r10d - addb %dl,%al - movl 92(%rsi),%ebx - addl $3634488961,%r10d - xorl %r8d,%r12d - movzbl %al,%eax - movl %edx,88(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $14,%r10d - movl %r11d,%r12d - pinsrw $3,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r8d,%r12d - addl 16(%r15),%r9d - addb %dl,%bl - movl 96(%rsi),%eax - addl $3889429448,%r9d - xorl %r11d,%r12d - movzbl %bl,%ebx - movl %edx,92(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $20,%r9d - movl %r10d,%r12d - pinsrw $3,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r11d,%r12d - addl 36(%r15),%r8d - addb %dl,%al - movl 100(%rsi),%ebx - addl $568446438,%r8d - xorl %r10d,%r12d - movzbl %al,%eax - movl %edx,96(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $5,%r8d - movl %r9d,%r12d - pinsrw $4,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r10d,%r12d - addl 56(%r15),%r11d - addb %dl,%bl - movl 104(%rsi),%eax - addl $3275163606,%r11d - xorl %r9d,%r12d - movzbl %bl,%ebx - movl %edx,100(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $9,%r11d - movl %r8d,%r12d - pinsrw $4,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r9d,%r12d - addl 12(%r15),%r10d - addb %dl,%al - movl 108(%rsi),%ebx - addl $4107603335,%r10d - xorl %r8d,%r12d - movzbl %al,%eax - movl %edx,104(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $14,%r10d - movl %r11d,%r12d - pinsrw $5,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r8d,%r12d - addl 32(%r15),%r9d - addb %dl,%bl - movl 112(%rsi),%eax - addl $1163531501,%r9d - xorl %r11d,%r12d - movzbl %bl,%ebx - movl %edx,108(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $20,%r9d - movl %r10d,%r12d - pinsrw $5,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r11d,%r12d - addl 52(%r15),%r8d - addb %dl,%al - movl 116(%rsi),%ebx - addl $2850285829,%r8d - xorl %r10d,%r12d - movzbl %al,%eax - movl %edx,112(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $5,%r8d - movl %r9d,%r12d - pinsrw $6,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r10d,%r12d - addl 8(%r15),%r11d - addb %dl,%bl - movl 120(%rsi),%eax - addl $4243563512,%r11d - xorl %r9d,%r12d - movzbl %bl,%ebx - movl %edx,116(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $9,%r11d - movl %r8d,%r12d - pinsrw $6,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %eax,(%rdi,%rcx,4) - andl %r9d,%r12d - addl 28(%r15),%r10d - addb %dl,%al - movl 124(%rsi),%ebx - addl $1735328473,%r10d - xorl %r8d,%r12d - movzbl %al,%eax - movl %edx,120(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $14,%r10d - movl %r11d,%r12d - pinsrw $7,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movdqu 16(%r13),%xmm3 - addb $32,%bpl - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %ebx,(%rdi,%rcx,4) - andl %r8d,%r12d - addl 48(%r15),%r9d - addb %dl,%bl - movl 0(%rdi,%rbp,4),%eax - addl $2368359562,%r9d - xorl %r11d,%r12d - movzbl %bl,%ebx - movl %edx,124(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $20,%r9d - movl %r11d,%r12d - pinsrw $7,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movq %rcx,%rsi - xorq %rcx,%rcx - movb %sil,%cl - leaq (%rdi,%rbp,4),%rsi - psllq $8,%xmm1 - pxor %xmm0,%xmm3 - pxor %xmm1,%xmm3 - pxor %xmm0,%xmm0 - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %eax,(%rdi,%rcx,4) - xorl %r9d,%r12d - addl 20(%r15),%r8d - addb %dl,%al - movl 4(%rsi),%ebx - addl $4294588738,%r8d - movzbl %al,%eax - addl %r12d,%r8d - movl %edx,0(%rsi) - addb %bl,%cl - roll $4,%r8d - movl %r10d,%r12d - movd (%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - pxor %xmm1,%xmm1 - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %ebx,(%rdi,%rcx,4) - xorl %r8d,%r12d - addl 32(%r15),%r11d - addb %dl,%bl - movl 8(%rsi),%eax - addl $2272392833,%r11d - movzbl %bl,%ebx - addl %r12d,%r11d - movl %edx,4(%rsi) - addb %al,%cl - roll $11,%r11d - movl %r9d,%r12d - movd (%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %eax,(%rdi,%rcx,4) - xorl %r11d,%r12d - addl 44(%r15),%r10d - addb %dl,%al - movl 12(%rsi),%ebx - addl $1839030562,%r10d - movzbl %al,%eax - addl %r12d,%r10d - movl %edx,8(%rsi) - addb %bl,%cl - roll $16,%r10d - movl %r8d,%r12d - pinsrw $1,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %ebx,(%rdi,%rcx,4) - xorl %r10d,%r12d - addl 56(%r15),%r9d - addb %dl,%bl - movl 16(%rsi),%eax - addl $4259657740,%r9d - movzbl %bl,%ebx - addl %r12d,%r9d - movl %edx,12(%rsi) - addb %al,%cl - roll $23,%r9d - movl %r11d,%r12d - pinsrw $1,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %eax,(%rdi,%rcx,4) - xorl %r9d,%r12d - addl 4(%r15),%r8d - addb %dl,%al - movl 20(%rsi),%ebx - addl $2763975236,%r8d - movzbl %al,%eax - addl %r12d,%r8d - movl %edx,16(%rsi) - addb %bl,%cl - roll $4,%r8d - movl %r10d,%r12d - pinsrw $2,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %ebx,(%rdi,%rcx,4) - xorl %r8d,%r12d - addl 16(%r15),%r11d - addb %dl,%bl - movl 24(%rsi),%eax - addl $1272893353,%r11d - movzbl %bl,%ebx - addl %r12d,%r11d - movl %edx,20(%rsi) - addb %al,%cl - roll $11,%r11d - movl %r9d,%r12d - pinsrw $2,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %eax,(%rdi,%rcx,4) - xorl %r11d,%r12d - addl 28(%r15),%r10d - addb %dl,%al - movl 28(%rsi),%ebx - addl $4139469664,%r10d - movzbl %al,%eax - addl %r12d,%r10d - movl %edx,24(%rsi) - addb %bl,%cl - roll $16,%r10d - movl %r8d,%r12d - pinsrw $3,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %ebx,(%rdi,%rcx,4) - xorl %r10d,%r12d - addl 40(%r15),%r9d - addb %dl,%bl - movl 32(%rsi),%eax - addl $3200236656,%r9d - movzbl %bl,%ebx - addl %r12d,%r9d - movl %edx,28(%rsi) - addb %al,%cl - roll $23,%r9d - movl %r11d,%r12d - pinsrw $3,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %eax,(%rdi,%rcx,4) - xorl %r9d,%r12d - addl 52(%r15),%r8d - addb %dl,%al - movl 36(%rsi),%ebx - addl $681279174,%r8d - movzbl %al,%eax - addl %r12d,%r8d - movl %edx,32(%rsi) - addb %bl,%cl - roll $4,%r8d - movl %r10d,%r12d - pinsrw $4,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %ebx,(%rdi,%rcx,4) - xorl %r8d,%r12d - addl 0(%r15),%r11d - addb %dl,%bl - movl 40(%rsi),%eax - addl $3936430074,%r11d - movzbl %bl,%ebx - addl %r12d,%r11d - movl %edx,36(%rsi) - addb %al,%cl - roll $11,%r11d - movl %r9d,%r12d - pinsrw $4,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %eax,(%rdi,%rcx,4) - xorl %r11d,%r12d - addl 12(%r15),%r10d - addb %dl,%al - movl 44(%rsi),%ebx - addl $3572445317,%r10d - movzbl %al,%eax - addl %r12d,%r10d - movl %edx,40(%rsi) - addb %bl,%cl - roll $16,%r10d - movl %r8d,%r12d - pinsrw $5,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %ebx,(%rdi,%rcx,4) - xorl %r10d,%r12d - addl 24(%r15),%r9d - addb %dl,%bl - movl 48(%rsi),%eax - addl $76029189,%r9d - movzbl %bl,%ebx - addl %r12d,%r9d - movl %edx,44(%rsi) - addb %al,%cl - roll $23,%r9d - movl %r11d,%r12d - pinsrw $5,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %eax,(%rdi,%rcx,4) - xorl %r9d,%r12d - addl 36(%r15),%r8d - addb %dl,%al - movl 52(%rsi),%ebx - addl $3654602809,%r8d - movzbl %al,%eax - addl %r12d,%r8d - movl %edx,48(%rsi) - addb %bl,%cl - roll $4,%r8d - movl %r10d,%r12d - pinsrw $6,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %ebx,(%rdi,%rcx,4) - xorl %r8d,%r12d - addl 48(%r15),%r11d - addb %dl,%bl - movl 56(%rsi),%eax - addl $3873151461,%r11d - movzbl %bl,%ebx - addl %r12d,%r11d - movl %edx,52(%rsi) - addb %al,%cl - roll $11,%r11d - movl %r9d,%r12d - pinsrw $6,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %eax,(%rdi,%rcx,4) - xorl %r11d,%r12d - addl 60(%r15),%r10d - addb %dl,%al - movl 60(%rsi),%ebx - addl $530742520,%r10d - movzbl %al,%eax - addl %r12d,%r10d - movl %edx,56(%rsi) - addb %bl,%cl - roll $16,%r10d - movl %r8d,%r12d - pinsrw $7,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movdqu 32(%r13),%xmm4 - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %ebx,(%rdi,%rcx,4) - xorl %r10d,%r12d - addl 8(%r15),%r9d - addb %dl,%bl - movl 64(%rsi),%eax - addl $3299628645,%r9d - movzbl %bl,%ebx - addl %r12d,%r9d - movl %edx,60(%rsi) - addb %al,%cl - roll $23,%r9d - movl $-1,%r12d - pinsrw $7,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - psllq $8,%xmm1 - pxor %xmm0,%xmm4 - pxor %xmm1,%xmm4 - pxor %xmm0,%xmm0 - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %eax,(%rdi,%rcx,4) - orl %r9d,%r12d - addl 0(%r15),%r8d - addb %dl,%al - movl 68(%rsi),%ebx - addl $4096336452,%r8d - movzbl %al,%eax - xorl %r10d,%r12d - movl %edx,64(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $6,%r8d - movl $-1,%r12d - movd (%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - pxor %xmm1,%xmm1 - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %ebx,(%rdi,%rcx,4) - orl %r8d,%r12d - addl 28(%r15),%r11d - addb %dl,%bl - movl 72(%rsi),%eax - addl $1126891415,%r11d - movzbl %bl,%ebx - xorl %r9d,%r12d - movl %edx,68(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $10,%r11d - movl $-1,%r12d - movd (%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %eax,(%rdi,%rcx,4) - orl %r11d,%r12d - addl 56(%r15),%r10d - addb %dl,%al - movl 76(%rsi),%ebx - addl $2878612391,%r10d - movzbl %al,%eax - xorl %r8d,%r12d - movl %edx,72(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $15,%r10d - movl $-1,%r12d - pinsrw $1,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %ebx,(%rdi,%rcx,4) - orl %r10d,%r12d - addl 20(%r15),%r9d - addb %dl,%bl - movl 80(%rsi),%eax - addl $4237533241,%r9d - movzbl %bl,%ebx - xorl %r11d,%r12d - movl %edx,76(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $21,%r9d - movl $-1,%r12d - pinsrw $1,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %eax,(%rdi,%rcx,4) - orl %r9d,%r12d - addl 48(%r15),%r8d - addb %dl,%al - movl 84(%rsi),%ebx - addl $1700485571,%r8d - movzbl %al,%eax - xorl %r10d,%r12d - movl %edx,80(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $6,%r8d - movl $-1,%r12d - pinsrw $2,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %ebx,(%rdi,%rcx,4) - orl %r8d,%r12d - addl 12(%r15),%r11d - addb %dl,%bl - movl 88(%rsi),%eax - addl $2399980690,%r11d - movzbl %bl,%ebx - xorl %r9d,%r12d - movl %edx,84(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $10,%r11d - movl $-1,%r12d - pinsrw $2,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %eax,(%rdi,%rcx,4) - orl %r11d,%r12d - addl 40(%r15),%r10d - addb %dl,%al - movl 92(%rsi),%ebx - addl $4293915773,%r10d - movzbl %al,%eax - xorl %r8d,%r12d - movl %edx,88(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $15,%r10d - movl $-1,%r12d - pinsrw $3,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %ebx,(%rdi,%rcx,4) - orl %r10d,%r12d - addl 4(%r15),%r9d - addb %dl,%bl - movl 96(%rsi),%eax - addl $2240044497,%r9d - movzbl %bl,%ebx - xorl %r11d,%r12d - movl %edx,92(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $21,%r9d - movl $-1,%r12d - pinsrw $3,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %eax,(%rdi,%rcx,4) - orl %r9d,%r12d - addl 32(%r15),%r8d - addb %dl,%al - movl 100(%rsi),%ebx - addl $1873313359,%r8d - movzbl %al,%eax - xorl %r10d,%r12d - movl %edx,96(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $6,%r8d - movl $-1,%r12d - pinsrw $4,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %ebx,(%rdi,%rcx,4) - orl %r8d,%r12d - addl 60(%r15),%r11d - addb %dl,%bl - movl 104(%rsi),%eax - addl $4264355552,%r11d - movzbl %bl,%ebx - xorl %r9d,%r12d - movl %edx,100(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $10,%r11d - movl $-1,%r12d - pinsrw $4,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %eax,(%rdi,%rcx,4) - orl %r11d,%r12d - addl 24(%r15),%r10d - addb %dl,%al - movl 108(%rsi),%ebx - addl $2734768916,%r10d - movzbl %al,%eax - xorl %r8d,%r12d - movl %edx,104(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $15,%r10d - movl $-1,%r12d - pinsrw $5,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %ebx,(%rdi,%rcx,4) - orl %r10d,%r12d - addl 52(%r15),%r9d - addb %dl,%bl - movl 112(%rsi),%eax - addl $1309151649,%r9d - movzbl %bl,%ebx - xorl %r11d,%r12d - movl %edx,108(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $21,%r9d - movl $-1,%r12d - pinsrw $5,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movl (%rdi,%rcx,4),%edx - xorl %r11d,%r12d - movl %eax,(%rdi,%rcx,4) - orl %r9d,%r12d - addl 16(%r15),%r8d - addb %dl,%al - movl 116(%rsi),%ebx - addl $4149444226,%r8d - movzbl %al,%eax - xorl %r10d,%r12d - movl %edx,112(%rsi) - addl %r12d,%r8d - addb %bl,%cl - roll $6,%r8d - movl $-1,%r12d - pinsrw $6,(%rdi,%rax,4),%xmm0 - - addl %r9d,%r8d - movl (%rdi,%rcx,4),%edx - xorl %r10d,%r12d - movl %ebx,(%rdi,%rcx,4) - orl %r8d,%r12d - addl 44(%r15),%r11d - addb %dl,%bl - movl 120(%rsi),%eax - addl $3174756917,%r11d - movzbl %bl,%ebx - xorl %r9d,%r12d - movl %edx,116(%rsi) - addl %r12d,%r11d - addb %al,%cl - roll $10,%r11d - movl $-1,%r12d - pinsrw $6,(%rdi,%rbx,4),%xmm1 - - addl %r8d,%r11d - movl (%rdi,%rcx,4),%edx - xorl %r9d,%r12d - movl %eax,(%rdi,%rcx,4) - orl %r11d,%r12d - addl 8(%r15),%r10d - addb %dl,%al - movl 124(%rsi),%ebx - addl $718787259,%r10d - movzbl %al,%eax - xorl %r8d,%r12d - movl %edx,120(%rsi) - addl %r12d,%r10d - addb %bl,%cl - roll $15,%r10d - movl $-1,%r12d - pinsrw $7,(%rdi,%rax,4),%xmm0 - - addl %r11d,%r10d - movdqu 48(%r13),%xmm5 - addb $32,%bpl - movl (%rdi,%rcx,4),%edx - xorl %r8d,%r12d - movl %ebx,(%rdi,%rcx,4) - orl %r10d,%r12d - addl 36(%r15),%r9d - addb %dl,%bl - movl 0(%rdi,%rbp,4),%eax - addl $3951481745,%r9d - movzbl %bl,%ebx - xorl %r11d,%r12d - movl %edx,124(%rsi) - addl %r12d,%r9d - addb %al,%cl - roll $21,%r9d - movl $-1,%r12d - pinsrw $7,(%rdi,%rbx,4),%xmm1 - - addl %r10d,%r9d - movq %rbp,%rsi - xorq %rbp,%rbp - movb %sil,%bpl - movq %rcx,%rsi - xorq %rcx,%rcx - movb %sil,%cl - leaq (%rdi,%rbp,4),%rsi - psllq $8,%xmm1 - pxor %xmm0,%xmm5 - pxor %xmm1,%xmm5 - addl 0(%rsp),%r8d - addl 4(%rsp),%r9d - addl 8(%rsp),%r10d - addl 12(%rsp),%r11d - - movdqu %xmm2,(%r14,%r13,1) - movdqu %xmm3,16(%r14,%r13,1) - movdqu %xmm4,32(%r14,%r13,1) - movdqu %xmm5,48(%r14,%r13,1) - leaq 64(%r15),%r15 - leaq 64(%r13),%r13 - cmpq 16(%rsp),%r15 - jb L$oop - - movq 24(%rsp),%r12 - subb %al,%cl - movl %r8d,0(%r12) - movl %r9d,4(%r12) - movl %r10d,8(%r12) - movl %r11d,12(%r12) - subb $1,%bpl - movl %ebp,-8(%rdi) - movl %ecx,-4(%rdi) - - movq 40(%rsp),%r15 - movq 48(%rsp),%r14 - movq 56(%rsp),%r13 - movq 64(%rsp),%r12 - movq 72(%rsp),%rbp - movq 80(%rsp),%rbx - leaq 88(%rsp),%rsp -L$epilogue: -L$abort: - .byte 0xf3,0xc3 - -#endif diff --git a/third_party/boringssl/mac-x86_64/crypto/rc4/rc4-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/rc4/rc4-x86_64.S deleted file mode 100644 index 780818476c51a..0000000000000 --- a/third_party/boringssl/mac-x86_64/crypto/rc4/rc4-x86_64.S +++ /dev/null @@ -1,595 +0,0 @@ -#if defined(__x86_64__) -.text - - -.globl _asm_RC4 -.private_extern _asm_RC4 - -.p2align 4 -_asm_RC4: - orq %rsi,%rsi - jne L$entry - .byte 0xf3,0xc3 -L$entry: - pushq %rbx - pushq %r12 - pushq %r13 -L$prologue: - movq %rsi,%r11 - movq %rdx,%r12 - movq %rcx,%r13 - xorq %r10,%r10 - xorq %rcx,%rcx - - leaq 8(%rdi),%rdi - movb -8(%rdi),%r10b - movb -4(%rdi),%cl - cmpl $-1,256(%rdi) - je L$RC4_CHAR - movl _OPENSSL_ia32cap_P(%rip),%r8d - xorq %rbx,%rbx - incb %r10b - subq %r10,%rbx - subq %r12,%r13 - movl (%rdi,%r10,4),%eax - testq $-16,%r11 - jz L$loop1 - btl $30,%r8d - jc L$intel - andq $7,%rbx - leaq 1(%r10),%rsi - jz L$oop8 - subq %rbx,%r11 -L$oop8_warmup: - addb %al,%cl - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - movl %edx,(%rdi,%r10,4) - addb %dl,%al - incb %r10b - movl (%rdi,%rax,4),%edx - movl (%rdi,%r10,4),%eax - xorb (%r12),%dl - movb %dl,(%r12,%r13,1) - leaq 1(%r12),%r12 - decq %rbx - jnz L$oop8_warmup - - leaq 1(%r10),%rsi - jmp L$oop8 -.p2align 4 -L$oop8: - addb %al,%cl - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - movl 0(%rdi,%rsi,4),%ebx - rorq $8,%r8 - movl %edx,0(%rdi,%r10,4) - addb %al,%dl - movb (%rdi,%rdx,4),%r8b - addb %bl,%cl - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - movl 4(%rdi,%rsi,4),%eax - rorq $8,%r8 - movl %edx,4(%rdi,%r10,4) - addb %bl,%dl - movb (%rdi,%rdx,4),%r8b - addb %al,%cl - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - movl 8(%rdi,%rsi,4),%ebx - rorq $8,%r8 - movl %edx,8(%rdi,%r10,4) - addb %al,%dl - movb (%rdi,%rdx,4),%r8b - addb %bl,%cl - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - movl 12(%rdi,%rsi,4),%eax - rorq $8,%r8 - movl %edx,12(%rdi,%r10,4) - addb %bl,%dl - movb (%rdi,%rdx,4),%r8b - addb %al,%cl - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - movl 16(%rdi,%rsi,4),%ebx - rorq $8,%r8 - movl %edx,16(%rdi,%r10,4) - addb %al,%dl - movb (%rdi,%rdx,4),%r8b - addb %bl,%cl - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - movl 20(%rdi,%rsi,4),%eax - rorq $8,%r8 - movl %edx,20(%rdi,%r10,4) - addb %bl,%dl - movb (%rdi,%rdx,4),%r8b - addb %al,%cl - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - movl 24(%rdi,%rsi,4),%ebx - rorq $8,%r8 - movl %edx,24(%rdi,%r10,4) - addb %al,%dl - movb (%rdi,%rdx,4),%r8b - addb $8,%sil - addb %bl,%cl - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - movl -4(%rdi,%rsi,4),%eax - rorq $8,%r8 - movl %edx,28(%rdi,%r10,4) - addb %bl,%dl - movb (%rdi,%rdx,4),%r8b - addb $8,%r10b - rorq $8,%r8 - subq $8,%r11 - - xorq (%r12),%r8 - movq %r8,(%r12,%r13,1) - leaq 8(%r12),%r12 - - testq $-8,%r11 - jnz L$oop8 - cmpq $0,%r11 - jne L$loop1 - jmp L$exit - -.p2align 4 -L$intel: - testq $-32,%r11 - jz L$loop1 - andq $15,%rbx - jz L$oop16_is_hot - subq %rbx,%r11 -L$oop16_warmup: - addb %al,%cl - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - movl %edx,(%rdi,%r10,4) - addb %dl,%al - incb %r10b - movl (%rdi,%rax,4),%edx - movl (%rdi,%r10,4),%eax - xorb (%r12),%dl - movb %dl,(%r12,%r13,1) - leaq 1(%r12),%r12 - decq %rbx - jnz L$oop16_warmup - - movq %rcx,%rbx - xorq %rcx,%rcx - movb %bl,%cl - -L$oop16_is_hot: - leaq (%rdi,%r10,4),%rsi - addb %al,%cl - movl (%rdi,%rcx,4),%edx - pxor %xmm0,%xmm0 - movl %eax,(%rdi,%rcx,4) - addb %dl,%al - movl 4(%rsi),%ebx - movzbl %al,%eax - movl %edx,0(%rsi) - addb %bl,%cl - pinsrw $0,(%rdi,%rax,4),%xmm0 - jmp L$oop16_enter -.p2align 4 -L$oop16: - addb %al,%cl - movl (%rdi,%rcx,4),%edx - pxor %xmm0,%xmm2 - psllq $8,%xmm1 - pxor %xmm0,%xmm0 - movl %eax,(%rdi,%rcx,4) - addb %dl,%al - movl 4(%rsi),%ebx - movzbl %al,%eax - movl %edx,0(%rsi) - pxor %xmm1,%xmm2 - addb %bl,%cl - pinsrw $0,(%rdi,%rax,4),%xmm0 - movdqu %xmm2,(%r12,%r13,1) - leaq 16(%r12),%r12 -L$oop16_enter: - movl (%rdi,%rcx,4),%edx - pxor %xmm1,%xmm1 - movl %ebx,(%rdi,%rcx,4) - addb %dl,%bl - movl 8(%rsi),%eax - movzbl %bl,%ebx - movl %edx,4(%rsi) - addb %al,%cl - pinsrw $0,(%rdi,%rbx,4),%xmm1 - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - addb %dl,%al - movl 12(%rsi),%ebx - movzbl %al,%eax - movl %edx,8(%rsi) - addb %bl,%cl - pinsrw $1,(%rdi,%rax,4),%xmm0 - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - addb %dl,%bl - movl 16(%rsi),%eax - movzbl %bl,%ebx - movl %edx,12(%rsi) - addb %al,%cl - pinsrw $1,(%rdi,%rbx,4),%xmm1 - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - addb %dl,%al - movl 20(%rsi),%ebx - movzbl %al,%eax - movl %edx,16(%rsi) - addb %bl,%cl - pinsrw $2,(%rdi,%rax,4),%xmm0 - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - addb %dl,%bl - movl 24(%rsi),%eax - movzbl %bl,%ebx - movl %edx,20(%rsi) - addb %al,%cl - pinsrw $2,(%rdi,%rbx,4),%xmm1 - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - addb %dl,%al - movl 28(%rsi),%ebx - movzbl %al,%eax - movl %edx,24(%rsi) - addb %bl,%cl - pinsrw $3,(%rdi,%rax,4),%xmm0 - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - addb %dl,%bl - movl 32(%rsi),%eax - movzbl %bl,%ebx - movl %edx,28(%rsi) - addb %al,%cl - pinsrw $3,(%rdi,%rbx,4),%xmm1 - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - addb %dl,%al - movl 36(%rsi),%ebx - movzbl %al,%eax - movl %edx,32(%rsi) - addb %bl,%cl - pinsrw $4,(%rdi,%rax,4),%xmm0 - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - addb %dl,%bl - movl 40(%rsi),%eax - movzbl %bl,%ebx - movl %edx,36(%rsi) - addb %al,%cl - pinsrw $4,(%rdi,%rbx,4),%xmm1 - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - addb %dl,%al - movl 44(%rsi),%ebx - movzbl %al,%eax - movl %edx,40(%rsi) - addb %bl,%cl - pinsrw $5,(%rdi,%rax,4),%xmm0 - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - addb %dl,%bl - movl 48(%rsi),%eax - movzbl %bl,%ebx - movl %edx,44(%rsi) - addb %al,%cl - pinsrw $5,(%rdi,%rbx,4),%xmm1 - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - addb %dl,%al - movl 52(%rsi),%ebx - movzbl %al,%eax - movl %edx,48(%rsi) - addb %bl,%cl - pinsrw $6,(%rdi,%rax,4),%xmm0 - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - addb %dl,%bl - movl 56(%rsi),%eax - movzbl %bl,%ebx - movl %edx,52(%rsi) - addb %al,%cl - pinsrw $6,(%rdi,%rbx,4),%xmm1 - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - addb %dl,%al - movl 60(%rsi),%ebx - movzbl %al,%eax - movl %edx,56(%rsi) - addb %bl,%cl - pinsrw $7,(%rdi,%rax,4),%xmm0 - addb $16,%r10b - movdqu (%r12),%xmm2 - movl (%rdi,%rcx,4),%edx - movl %ebx,(%rdi,%rcx,4) - addb %dl,%bl - movzbl %bl,%ebx - movl %edx,60(%rsi) - leaq (%rdi,%r10,4),%rsi - pinsrw $7,(%rdi,%rbx,4),%xmm1 - movl (%rsi),%eax - movq %rcx,%rbx - xorq %rcx,%rcx - subq $16,%r11 - movb %bl,%cl - testq $-16,%r11 - jnz L$oop16 - - psllq $8,%xmm1 - pxor %xmm0,%xmm2 - pxor %xmm1,%xmm2 - movdqu %xmm2,(%r12,%r13,1) - leaq 16(%r12),%r12 - - cmpq $0,%r11 - jne L$loop1 - jmp L$exit - -.p2align 4 -L$loop1: - addb %al,%cl - movl (%rdi,%rcx,4),%edx - movl %eax,(%rdi,%rcx,4) - movl %edx,(%rdi,%r10,4) - addb %dl,%al - incb %r10b - movl (%rdi,%rax,4),%edx - movl (%rdi,%r10,4),%eax - xorb (%r12),%dl - movb %dl,(%r12,%r13,1) - leaq 1(%r12),%r12 - decq %r11 - jnz L$loop1 - jmp L$exit - -.p2align 4 -L$RC4_CHAR: - addb $1,%r10b - movzbl (%rdi,%r10,1),%eax - testq $-8,%r11 - jz L$cloop1 - jmp L$cloop8 -.p2align 4 -L$cloop8: - movl (%r12),%r8d - movl 4(%r12),%r9d - addb %al,%cl - leaq 1(%r10),%rsi - movzbl (%rdi,%rcx,1),%edx - movzbl %sil,%esi - movzbl (%rdi,%rsi,1),%ebx - movb %al,(%rdi,%rcx,1) - cmpq %rsi,%rcx - movb %dl,(%rdi,%r10,1) - jne L$cmov0 - movq %rax,%rbx -L$cmov0: - addb %al,%dl - xorb (%rdi,%rdx,1),%r8b - rorl $8,%r8d - addb %bl,%cl - leaq 1(%rsi),%r10 - movzbl (%rdi,%rcx,1),%edx - movzbl %r10b,%r10d - movzbl (%rdi,%r10,1),%eax - movb %bl,(%rdi,%rcx,1) - cmpq %r10,%rcx - movb %dl,(%rdi,%rsi,1) - jne L$cmov1 - movq %rbx,%rax -L$cmov1: - addb %bl,%dl - xorb (%rdi,%rdx,1),%r8b - rorl $8,%r8d - addb %al,%cl - leaq 1(%r10),%rsi - movzbl (%rdi,%rcx,1),%edx - movzbl %sil,%esi - movzbl (%rdi,%rsi,1),%ebx - movb %al,(%rdi,%rcx,1) - cmpq %rsi,%rcx - movb %dl,(%rdi,%r10,1) - jne L$cmov2 - movq %rax,%rbx -L$cmov2: - addb %al,%dl - xorb (%rdi,%rdx,1),%r8b - rorl $8,%r8d - addb %bl,%cl - leaq 1(%rsi),%r10 - movzbl (%rdi,%rcx,1),%edx - movzbl %r10b,%r10d - movzbl (%rdi,%r10,1),%eax - movb %bl,(%rdi,%rcx,1) - cmpq %r10,%rcx - movb %dl,(%rdi,%rsi,1) - jne L$cmov3 - movq %rbx,%rax -L$cmov3: - addb %bl,%dl - xorb (%rdi,%rdx,1),%r8b - rorl $8,%r8d - addb %al,%cl - leaq 1(%r10),%rsi - movzbl (%rdi,%rcx,1),%edx - movzbl %sil,%esi - movzbl (%rdi,%rsi,1),%ebx - movb %al,(%rdi,%rcx,1) - cmpq %rsi,%rcx - movb %dl,(%rdi,%r10,1) - jne L$cmov4 - movq %rax,%rbx -L$cmov4: - addb %al,%dl - xorb (%rdi,%rdx,1),%r9b - rorl $8,%r9d - addb %bl,%cl - leaq 1(%rsi),%r10 - movzbl (%rdi,%rcx,1),%edx - movzbl %r10b,%r10d - movzbl (%rdi,%r10,1),%eax - movb %bl,(%rdi,%rcx,1) - cmpq %r10,%rcx - movb %dl,(%rdi,%rsi,1) - jne L$cmov5 - movq %rbx,%rax -L$cmov5: - addb %bl,%dl - xorb (%rdi,%rdx,1),%r9b - rorl $8,%r9d - addb %al,%cl - leaq 1(%r10),%rsi - movzbl (%rdi,%rcx,1),%edx - movzbl %sil,%esi - movzbl (%rdi,%rsi,1),%ebx - movb %al,(%rdi,%rcx,1) - cmpq %rsi,%rcx - movb %dl,(%rdi,%r10,1) - jne L$cmov6 - movq %rax,%rbx -L$cmov6: - addb %al,%dl - xorb (%rdi,%rdx,1),%r9b - rorl $8,%r9d - addb %bl,%cl - leaq 1(%rsi),%r10 - movzbl (%rdi,%rcx,1),%edx - movzbl %r10b,%r10d - movzbl (%rdi,%r10,1),%eax - movb %bl,(%rdi,%rcx,1) - cmpq %r10,%rcx - movb %dl,(%rdi,%rsi,1) - jne L$cmov7 - movq %rbx,%rax -L$cmov7: - addb %bl,%dl - xorb (%rdi,%rdx,1),%r9b - rorl $8,%r9d - leaq -8(%r11),%r11 - movl %r8d,(%r13) - leaq 8(%r12),%r12 - movl %r9d,4(%r13) - leaq 8(%r13),%r13 - - testq $-8,%r11 - jnz L$cloop8 - cmpq $0,%r11 - jne L$cloop1 - jmp L$exit -.p2align 4 -L$cloop1: - addb %al,%cl - movzbl %cl,%ecx - movzbl (%rdi,%rcx,1),%edx - movb %al,(%rdi,%rcx,1) - movb %dl,(%rdi,%r10,1) - addb %al,%dl - addb $1,%r10b - movzbl %dl,%edx - movzbl %r10b,%r10d - movzbl (%rdi,%rdx,1),%edx - movzbl (%rdi,%r10,1),%eax - xorb (%r12),%dl - leaq 1(%r12),%r12 - movb %dl,(%r13) - leaq 1(%r13),%r13 - subq $1,%r11 - jnz L$cloop1 - jmp L$exit - -.p2align 4 -L$exit: - subb $1,%r10b - movl %r10d,-8(%rdi) - movl %ecx,-4(%rdi) - - movq (%rsp),%r13 - movq 8(%rsp),%r12 - movq 16(%rsp),%rbx - addq $24,%rsp -L$epilogue: - .byte 0xf3,0xc3 - -.globl _asm_RC4_set_key -.private_extern _asm_RC4_set_key - -.p2align 4 -_asm_RC4_set_key: - leaq 8(%rdi),%rdi - leaq (%rdx,%rsi,1),%rdx - negq %rsi - movq %rsi,%rcx - xorl %eax,%eax - xorq %r9,%r9 - xorq %r10,%r10 - xorq %r11,%r11 - - movl _OPENSSL_ia32cap_P(%rip),%r8d - btl $20,%r8d - jc L$c1stloop - jmp L$w1stloop - -.p2align 4 -L$w1stloop: - movl %eax,(%rdi,%rax,4) - addb $1,%al - jnc L$w1stloop - - xorq %r9,%r9 - xorq %r8,%r8 -.p2align 4 -L$w2ndloop: - movl (%rdi,%r9,4),%r10d - addb (%rdx,%rsi,1),%r8b - addb %r10b,%r8b - addq $1,%rsi - movl (%rdi,%r8,4),%r11d - cmovzq %rcx,%rsi - movl %r10d,(%rdi,%r8,4) - movl %r11d,(%rdi,%r9,4) - addb $1,%r9b - jnc L$w2ndloop - jmp L$exit_key - -.p2align 4 -L$c1stloop: - movb %al,(%rdi,%rax,1) - addb $1,%al - jnc L$c1stloop - - xorq %r9,%r9 - xorq %r8,%r8 -.p2align 4 -L$c2ndloop: - movb (%rdi,%r9,1),%r10b - addb (%rdx,%rsi,1),%r8b - addb %r10b,%r8b - addq $1,%rsi - movb (%rdi,%r8,1),%r11b - jnz L$cnowrap - movq %rcx,%rsi -L$cnowrap: - movb %r10b,(%rdi,%r8,1) - movb %r11b,(%rdi,%r9,1) - addb $1,%r9b - jnc L$c2ndloop - movl $-1,256(%rdi) - -.p2align 4 -L$exit_key: - xorl %eax,%eax - movl %eax,-8(%rdi) - movl %eax,-4(%rdi) - .byte 0xf3,0xc3 - -#endif diff --git a/third_party/boringssl/mac-x86_64/crypto/sha/sha1-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/sha/sha1-x86_64.S deleted file mode 100644 index 044dc5b7cd0f4..0000000000000 --- a/third_party/boringssl/mac-x86_64/crypto/sha/sha1-x86_64.S +++ /dev/null @@ -1,2425 +0,0 @@ -#if defined(__x86_64__) -.text - - -.globl _sha1_block_data_order -.private_extern _sha1_block_data_order - -.p2align 4 -_sha1_block_data_order: - movl _OPENSSL_ia32cap_P+0(%rip),%r9d - movl _OPENSSL_ia32cap_P+4(%rip),%r8d - movl _OPENSSL_ia32cap_P+8(%rip),%r10d - testl $512,%r8d - jz L$ialu - jmp _ssse3_shortcut - -.p2align 4 -L$ialu: - movq %rsp,%rax - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - movq %rdi,%r8 - subq $72,%rsp - movq %rsi,%r9 - andq $-64,%rsp - movq %rdx,%r10 - movq %rax,64(%rsp) -L$prologue: - - movl 0(%r8),%esi - movl 4(%r8),%edi - movl 8(%r8),%r11d - movl 12(%r8),%r12d - movl 16(%r8),%r13d - jmp L$loop - -.p2align 4 -L$loop: - movl 0(%r9),%edx - bswapl %edx - movl 4(%r9),%ebp - movl %r12d,%eax - movl %edx,0(%rsp) - movl %esi,%ecx - bswapl %ebp - xorl %r11d,%eax - roll $5,%ecx - andl %edi,%eax - leal 1518500249(%rdx,%r13,1),%r13d - addl %ecx,%r13d - xorl %r12d,%eax - roll $30,%edi - addl %eax,%r13d - movl 8(%r9),%r14d - movl %r11d,%eax - movl %ebp,4(%rsp) - movl %r13d,%ecx - bswapl %r14d - xorl %edi,%eax - roll $5,%ecx - andl %esi,%eax - leal 1518500249(%rbp,%r12,1),%r12d - addl %ecx,%r12d - xorl %r11d,%eax - roll $30,%esi - addl %eax,%r12d - movl 12(%r9),%edx - movl %edi,%eax - movl %r14d,8(%rsp) - movl %r12d,%ecx - bswapl %edx - xorl %esi,%eax - roll $5,%ecx - andl %r13d,%eax - leal 1518500249(%r14,%r11,1),%r11d - addl %ecx,%r11d - xorl %edi,%eax - roll $30,%r13d - addl %eax,%r11d - movl 16(%r9),%ebp - movl %esi,%eax - movl %edx,12(%rsp) - movl %r11d,%ecx - bswapl %ebp - xorl %r13d,%eax - roll $5,%ecx - andl %r12d,%eax - leal 1518500249(%rdx,%rdi,1),%edi - addl %ecx,%edi - xorl %esi,%eax - roll $30,%r12d - addl %eax,%edi - movl 20(%r9),%r14d - movl %r13d,%eax - movl %ebp,16(%rsp) - movl %edi,%ecx - bswapl %r14d - xorl %r12d,%eax - roll $5,%ecx - andl %r11d,%eax - leal 1518500249(%rbp,%rsi,1),%esi - addl %ecx,%esi - xorl %r13d,%eax - roll $30,%r11d - addl %eax,%esi - movl 24(%r9),%edx - movl %r12d,%eax - movl %r14d,20(%rsp) - movl %esi,%ecx - bswapl %edx - xorl %r11d,%eax - roll $5,%ecx - andl %edi,%eax - leal 1518500249(%r14,%r13,1),%r13d - addl %ecx,%r13d - xorl %r12d,%eax - roll $30,%edi - addl %eax,%r13d - movl 28(%r9),%ebp - movl %r11d,%eax - movl %edx,24(%rsp) - movl %r13d,%ecx - bswapl %ebp - xorl %edi,%eax - roll $5,%ecx - andl %esi,%eax - leal 1518500249(%rdx,%r12,1),%r12d - addl %ecx,%r12d - xorl %r11d,%eax - roll $30,%esi - addl %eax,%r12d - movl 32(%r9),%r14d - movl %edi,%eax - movl %ebp,28(%rsp) - movl %r12d,%ecx - bswapl %r14d - xorl %esi,%eax - roll $5,%ecx - andl %r13d,%eax - leal 1518500249(%rbp,%r11,1),%r11d - addl %ecx,%r11d - xorl %edi,%eax - roll $30,%r13d - addl %eax,%r11d - movl 36(%r9),%edx - movl %esi,%eax - movl %r14d,32(%rsp) - movl %r11d,%ecx - bswapl %edx - xorl %r13d,%eax - roll $5,%ecx - andl %r12d,%eax - leal 1518500249(%r14,%rdi,1),%edi - addl %ecx,%edi - xorl %esi,%eax - roll $30,%r12d - addl %eax,%edi - movl 40(%r9),%ebp - movl %r13d,%eax - movl %edx,36(%rsp) - movl %edi,%ecx - bswapl %ebp - xorl %r12d,%eax - roll $5,%ecx - andl %r11d,%eax - leal 1518500249(%rdx,%rsi,1),%esi - addl %ecx,%esi - xorl %r13d,%eax - roll $30,%r11d - addl %eax,%esi - movl 44(%r9),%r14d - movl %r12d,%eax - movl %ebp,40(%rsp) - movl %esi,%ecx - bswapl %r14d - xorl %r11d,%eax - roll $5,%ecx - andl %edi,%eax - leal 1518500249(%rbp,%r13,1),%r13d - addl %ecx,%r13d - xorl %r12d,%eax - roll $30,%edi - addl %eax,%r13d - movl 48(%r9),%edx - movl %r11d,%eax - movl %r14d,44(%rsp) - movl %r13d,%ecx - bswapl %edx - xorl %edi,%eax - roll $5,%ecx - andl %esi,%eax - leal 1518500249(%r14,%r12,1),%r12d - addl %ecx,%r12d - xorl %r11d,%eax - roll $30,%esi - addl %eax,%r12d - movl 52(%r9),%ebp - movl %edi,%eax - movl %edx,48(%rsp) - movl %r12d,%ecx - bswapl %ebp - xorl %esi,%eax - roll $5,%ecx - andl %r13d,%eax - leal 1518500249(%rdx,%r11,1),%r11d - addl %ecx,%r11d - xorl %edi,%eax - roll $30,%r13d - addl %eax,%r11d - movl 56(%r9),%r14d - movl %esi,%eax - movl %ebp,52(%rsp) - movl %r11d,%ecx - bswapl %r14d - xorl %r13d,%eax - roll $5,%ecx - andl %r12d,%eax - leal 1518500249(%rbp,%rdi,1),%edi - addl %ecx,%edi - xorl %esi,%eax - roll $30,%r12d - addl %eax,%edi - movl 60(%r9),%edx - movl %r13d,%eax - movl %r14d,56(%rsp) - movl %edi,%ecx - bswapl %edx - xorl %r12d,%eax - roll $5,%ecx - andl %r11d,%eax - leal 1518500249(%r14,%rsi,1),%esi - addl %ecx,%esi - xorl %r13d,%eax - roll $30,%r11d - addl %eax,%esi - xorl 0(%rsp),%ebp - movl %r12d,%eax - movl %edx,60(%rsp) - movl %esi,%ecx - xorl 8(%rsp),%ebp - xorl %r11d,%eax - roll $5,%ecx - xorl 32(%rsp),%ebp - andl %edi,%eax - leal 1518500249(%rdx,%r13,1),%r13d - roll $30,%edi - xorl %r12d,%eax - addl %ecx,%r13d - roll $1,%ebp - addl %eax,%r13d - xorl 4(%rsp),%r14d - movl %r11d,%eax - movl %ebp,0(%rsp) - movl %r13d,%ecx - xorl 12(%rsp),%r14d - xorl %edi,%eax - roll $5,%ecx - xorl 36(%rsp),%r14d - andl %esi,%eax - leal 1518500249(%rbp,%r12,1),%r12d - roll $30,%esi - xorl %r11d,%eax - addl %ecx,%r12d - roll $1,%r14d - addl %eax,%r12d - xorl 8(%rsp),%edx - movl %edi,%eax - movl %r14d,4(%rsp) - movl %r12d,%ecx - xorl 16(%rsp),%edx - xorl %esi,%eax - roll $5,%ecx - xorl 40(%rsp),%edx - andl %r13d,%eax - leal 1518500249(%r14,%r11,1),%r11d - roll $30,%r13d - xorl %edi,%eax - addl %ecx,%r11d - roll $1,%edx - addl %eax,%r11d - xorl 12(%rsp),%ebp - movl %esi,%eax - movl %edx,8(%rsp) - movl %r11d,%ecx - xorl 20(%rsp),%ebp - xorl %r13d,%eax - roll $5,%ecx - xorl 44(%rsp),%ebp - andl %r12d,%eax - leal 1518500249(%rdx,%rdi,1),%edi - roll $30,%r12d - xorl %esi,%eax - addl %ecx,%edi - roll $1,%ebp - addl %eax,%edi - xorl 16(%rsp),%r14d - movl %r13d,%eax - movl %ebp,12(%rsp) - movl %edi,%ecx - xorl 24(%rsp),%r14d - xorl %r12d,%eax - roll $5,%ecx - xorl 48(%rsp),%r14d - andl %r11d,%eax - leal 1518500249(%rbp,%rsi,1),%esi - roll $30,%r11d - xorl %r13d,%eax - addl %ecx,%esi - roll $1,%r14d - addl %eax,%esi - xorl 20(%rsp),%edx - movl %edi,%eax - movl %r14d,16(%rsp) - movl %esi,%ecx - xorl 28(%rsp),%edx - xorl %r12d,%eax - roll $5,%ecx - xorl 52(%rsp),%edx - leal 1859775393(%r14,%r13,1),%r13d - xorl %r11d,%eax - addl %ecx,%r13d - roll $30,%edi - addl %eax,%r13d - roll $1,%edx - xorl 24(%rsp),%ebp - movl %esi,%eax - movl %edx,20(%rsp) - movl %r13d,%ecx - xorl 32(%rsp),%ebp - xorl %r11d,%eax - roll $5,%ecx - xorl 56(%rsp),%ebp - leal 1859775393(%rdx,%r12,1),%r12d - xorl %edi,%eax - addl %ecx,%r12d - roll $30,%esi - addl %eax,%r12d - roll $1,%ebp - xorl 28(%rsp),%r14d - movl %r13d,%eax - movl %ebp,24(%rsp) - movl %r12d,%ecx - xorl 36(%rsp),%r14d - xorl %edi,%eax - roll $5,%ecx - xorl 60(%rsp),%r14d - leal 1859775393(%rbp,%r11,1),%r11d - xorl %esi,%eax - addl %ecx,%r11d - roll $30,%r13d - addl %eax,%r11d - roll $1,%r14d - xorl 32(%rsp),%edx - movl %r12d,%eax - movl %r14d,28(%rsp) - movl %r11d,%ecx - xorl 40(%rsp),%edx - xorl %esi,%eax - roll $5,%ecx - xorl 0(%rsp),%edx - leal 1859775393(%r14,%rdi,1),%edi - xorl %r13d,%eax - addl %ecx,%edi - roll $30,%r12d - addl %eax,%edi - roll $1,%edx - xorl 36(%rsp),%ebp - movl %r11d,%eax - movl %edx,32(%rsp) - movl %edi,%ecx - xorl 44(%rsp),%ebp - xorl %r13d,%eax - roll $5,%ecx - xorl 4(%rsp),%ebp - leal 1859775393(%rdx,%rsi,1),%esi - xorl %r12d,%eax - addl %ecx,%esi - roll $30,%r11d - addl %eax,%esi - roll $1,%ebp - xorl 40(%rsp),%r14d - movl %edi,%eax - movl %ebp,36(%rsp) - movl %esi,%ecx - xorl 48(%rsp),%r14d - xorl %r12d,%eax - roll $5,%ecx - xorl 8(%rsp),%r14d - leal 1859775393(%rbp,%r13,1),%r13d - xorl %r11d,%eax - addl %ecx,%r13d - roll $30,%edi - addl %eax,%r13d - roll $1,%r14d - xorl 44(%rsp),%edx - movl %esi,%eax - movl %r14d,40(%rsp) - movl %r13d,%ecx - xorl 52(%rsp),%edx - xorl %r11d,%eax - roll $5,%ecx - xorl 12(%rsp),%edx - leal 1859775393(%r14,%r12,1),%r12d - xorl %edi,%eax - addl %ecx,%r12d - roll $30,%esi - addl %eax,%r12d - roll $1,%edx - xorl 48(%rsp),%ebp - movl %r13d,%eax - movl %edx,44(%rsp) - movl %r12d,%ecx - xorl 56(%rsp),%ebp - xorl %edi,%eax - roll $5,%ecx - xorl 16(%rsp),%ebp - leal 1859775393(%rdx,%r11,1),%r11d - xorl %esi,%eax - addl %ecx,%r11d - roll $30,%r13d - addl %eax,%r11d - roll $1,%ebp - xorl 52(%rsp),%r14d - movl %r12d,%eax - movl %ebp,48(%rsp) - movl %r11d,%ecx - xorl 60(%rsp),%r14d - xorl %esi,%eax - roll $5,%ecx - xorl 20(%rsp),%r14d - leal 1859775393(%rbp,%rdi,1),%edi - xorl %r13d,%eax - addl %ecx,%edi - roll $30,%r12d - addl %eax,%edi - roll $1,%r14d - xorl 56(%rsp),%edx - movl %r11d,%eax - movl %r14d,52(%rsp) - movl %edi,%ecx - xorl 0(%rsp),%edx - xorl %r13d,%eax - roll $5,%ecx - xorl 24(%rsp),%edx - leal 1859775393(%r14,%rsi,1),%esi - xorl %r12d,%eax - addl %ecx,%esi - roll $30,%r11d - addl %eax,%esi - roll $1,%edx - xorl 60(%rsp),%ebp - movl %edi,%eax - movl %edx,56(%rsp) - movl %esi,%ecx - xorl 4(%rsp),%ebp - xorl %r12d,%eax - roll $5,%ecx - xorl 28(%rsp),%ebp - leal 1859775393(%rdx,%r13,1),%r13d - xorl %r11d,%eax - addl %ecx,%r13d - roll $30,%edi - addl %eax,%r13d - roll $1,%ebp - xorl 0(%rsp),%r14d - movl %esi,%eax - movl %ebp,60(%rsp) - movl %r13d,%ecx - xorl 8(%rsp),%r14d - xorl %r11d,%eax - roll $5,%ecx - xorl 32(%rsp),%r14d - leal 1859775393(%rbp,%r12,1),%r12d - xorl %edi,%eax - addl %ecx,%r12d - roll $30,%esi - addl %eax,%r12d - roll $1,%r14d - xorl 4(%rsp),%edx - movl %r13d,%eax - movl %r14d,0(%rsp) - movl %r12d,%ecx - xorl 12(%rsp),%edx - xorl %edi,%eax - roll $5,%ecx - xorl 36(%rsp),%edx - leal 1859775393(%r14,%r11,1),%r11d - xorl %esi,%eax - addl %ecx,%r11d - roll $30,%r13d - addl %eax,%r11d - roll $1,%edx - xorl 8(%rsp),%ebp - movl %r12d,%eax - movl %edx,4(%rsp) - movl %r11d,%ecx - xorl 16(%rsp),%ebp - xorl %esi,%eax - roll $5,%ecx - xorl 40(%rsp),%ebp - leal 1859775393(%rdx,%rdi,1),%edi - xorl %r13d,%eax - addl %ecx,%edi - roll $30,%r12d - addl %eax,%edi - roll $1,%ebp - xorl 12(%rsp),%r14d - movl %r11d,%eax - movl %ebp,8(%rsp) - movl %edi,%ecx - xorl 20(%rsp),%r14d - xorl %r13d,%eax - roll $5,%ecx - xorl 44(%rsp),%r14d - leal 1859775393(%rbp,%rsi,1),%esi - xorl %r12d,%eax - addl %ecx,%esi - roll $30,%r11d - addl %eax,%esi - roll $1,%r14d - xorl 16(%rsp),%edx - movl %edi,%eax - movl %r14d,12(%rsp) - movl %esi,%ecx - xorl 24(%rsp),%edx - xorl %r12d,%eax - roll $5,%ecx - xorl 48(%rsp),%edx - leal 1859775393(%r14,%r13,1),%r13d - xorl %r11d,%eax - addl %ecx,%r13d - roll $30,%edi - addl %eax,%r13d - roll $1,%edx - xorl 20(%rsp),%ebp - movl %esi,%eax - movl %edx,16(%rsp) - movl %r13d,%ecx - xorl 28(%rsp),%ebp - xorl %r11d,%eax - roll $5,%ecx - xorl 52(%rsp),%ebp - leal 1859775393(%rdx,%r12,1),%r12d - xorl %edi,%eax - addl %ecx,%r12d - roll $30,%esi - addl %eax,%r12d - roll $1,%ebp - xorl 24(%rsp),%r14d - movl %r13d,%eax - movl %ebp,20(%rsp) - movl %r12d,%ecx - xorl 32(%rsp),%r14d - xorl %edi,%eax - roll $5,%ecx - xorl 56(%rsp),%r14d - leal 1859775393(%rbp,%r11,1),%r11d - xorl %esi,%eax - addl %ecx,%r11d - roll $30,%r13d - addl %eax,%r11d - roll $1,%r14d - xorl 28(%rsp),%edx - movl %r12d,%eax - movl %r14d,24(%rsp) - movl %r11d,%ecx - xorl 36(%rsp),%edx - xorl %esi,%eax - roll $5,%ecx - xorl 60(%rsp),%edx - leal 1859775393(%r14,%rdi,1),%edi - xorl %r13d,%eax - addl %ecx,%edi - roll $30,%r12d - addl %eax,%edi - roll $1,%edx - xorl 32(%rsp),%ebp - movl %r11d,%eax - movl %edx,28(%rsp) - movl %edi,%ecx - xorl 40(%rsp),%ebp - xorl %r13d,%eax - roll $5,%ecx - xorl 0(%rsp),%ebp - leal 1859775393(%rdx,%rsi,1),%esi - xorl %r12d,%eax - addl %ecx,%esi - roll $30,%r11d - addl %eax,%esi - roll $1,%ebp - xorl 36(%rsp),%r14d - movl %r12d,%eax - movl %ebp,32(%rsp) - movl %r12d,%ebx - xorl 44(%rsp),%r14d - andl %r11d,%eax - movl %esi,%ecx - xorl 4(%rsp),%r14d - leal -1894007588(%rbp,%r13,1),%r13d - xorl %r11d,%ebx - roll $5,%ecx - addl %eax,%r13d - roll $1,%r14d - andl %edi,%ebx - addl %ecx,%r13d - roll $30,%edi - addl %ebx,%r13d - xorl 40(%rsp),%edx - movl %r11d,%eax - movl %r14d,36(%rsp) - movl %r11d,%ebx - xorl 48(%rsp),%edx - andl %edi,%eax - movl %r13d,%ecx - xorl 8(%rsp),%edx - leal -1894007588(%r14,%r12,1),%r12d - xorl %edi,%ebx - roll $5,%ecx - addl %eax,%r12d - roll $1,%edx - andl %esi,%ebx - addl %ecx,%r12d - roll $30,%esi - addl %ebx,%r12d - xorl 44(%rsp),%ebp - movl %edi,%eax - movl %edx,40(%rsp) - movl %edi,%ebx - xorl 52(%rsp),%ebp - andl %esi,%eax - movl %r12d,%ecx - xorl 12(%rsp),%ebp - leal -1894007588(%rdx,%r11,1),%r11d - xorl %esi,%ebx - roll $5,%ecx - addl %eax,%r11d - roll $1,%ebp - andl %r13d,%ebx - addl %ecx,%r11d - roll $30,%r13d - addl %ebx,%r11d - xorl 48(%rsp),%r14d - movl %esi,%eax - movl %ebp,44(%rsp) - movl %esi,%ebx - xorl 56(%rsp),%r14d - andl %r13d,%eax - movl %r11d,%ecx - xorl 16(%rsp),%r14d - leal -1894007588(%rbp,%rdi,1),%edi - xorl %r13d,%ebx - roll $5,%ecx - addl %eax,%edi - roll $1,%r14d - andl %r12d,%ebx - addl %ecx,%edi - roll $30,%r12d - addl %ebx,%edi - xorl 52(%rsp),%edx - movl %r13d,%eax - movl %r14d,48(%rsp) - movl %r13d,%ebx - xorl 60(%rsp),%edx - andl %r12d,%eax - movl %edi,%ecx - xorl 20(%rsp),%edx - leal -1894007588(%r14,%rsi,1),%esi - xorl %r12d,%ebx - roll $5,%ecx - addl %eax,%esi - roll $1,%edx - andl %r11d,%ebx - addl %ecx,%esi - roll $30,%r11d - addl %ebx,%esi - xorl 56(%rsp),%ebp - movl %r12d,%eax - movl %edx,52(%rsp) - movl %r12d,%ebx - xorl 0(%rsp),%ebp - andl %r11d,%eax - movl %esi,%ecx - xorl 24(%rsp),%ebp - leal -1894007588(%rdx,%r13,1),%r13d - xorl %r11d,%ebx - roll $5,%ecx - addl %eax,%r13d - roll $1,%ebp - andl %edi,%ebx - addl %ecx,%r13d - roll $30,%edi - addl %ebx,%r13d - xorl 60(%rsp),%r14d - movl %r11d,%eax - movl %ebp,56(%rsp) - movl %r11d,%ebx - xorl 4(%rsp),%r14d - andl %edi,%eax - movl %r13d,%ecx - xorl 28(%rsp),%r14d - leal -1894007588(%rbp,%r12,1),%r12d - xorl %edi,%ebx - roll $5,%ecx - addl %eax,%r12d - roll $1,%r14d - andl %esi,%ebx - addl %ecx,%r12d - roll $30,%esi - addl %ebx,%r12d - xorl 0(%rsp),%edx - movl %edi,%eax - movl %r14d,60(%rsp) - movl %edi,%ebx - xorl 8(%rsp),%edx - andl %esi,%eax - movl %r12d,%ecx - xorl 32(%rsp),%edx - leal -1894007588(%r14,%r11,1),%r11d - xorl %esi,%ebx - roll $5,%ecx - addl %eax,%r11d - roll $1,%edx - andl %r13d,%ebx - addl %ecx,%r11d - roll $30,%r13d - addl %ebx,%r11d - xorl 4(%rsp),%ebp - movl %esi,%eax - movl %edx,0(%rsp) - movl %esi,%ebx - xorl 12(%rsp),%ebp - andl %r13d,%eax - movl %r11d,%ecx - xorl 36(%rsp),%ebp - leal -1894007588(%rdx,%rdi,1),%edi - xorl %r13d,%ebx - roll $5,%ecx - addl %eax,%edi - roll $1,%ebp - andl %r12d,%ebx - addl %ecx,%edi - roll $30,%r12d - addl %ebx,%edi - xorl 8(%rsp),%r14d - movl %r13d,%eax - movl %ebp,4(%rsp) - movl %r13d,%ebx - xorl 16(%rsp),%r14d - andl %r12d,%eax - movl %edi,%ecx - xorl 40(%rsp),%r14d - leal -1894007588(%rbp,%rsi,1),%esi - xorl %r12d,%ebx - roll $5,%ecx - addl %eax,%esi - roll $1,%r14d - andl %r11d,%ebx - addl %ecx,%esi - roll $30,%r11d - addl %ebx,%esi - xorl 12(%rsp),%edx - movl %r12d,%eax - movl %r14d,8(%rsp) - movl %r12d,%ebx - xorl 20(%rsp),%edx - andl %r11d,%eax - movl %esi,%ecx - xorl 44(%rsp),%edx - leal -1894007588(%r14,%r13,1),%r13d - xorl %r11d,%ebx - roll $5,%ecx - addl %eax,%r13d - roll $1,%edx - andl %edi,%ebx - addl %ecx,%r13d - roll $30,%edi - addl %ebx,%r13d - xorl 16(%rsp),%ebp - movl %r11d,%eax - movl %edx,12(%rsp) - movl %r11d,%ebx - xorl 24(%rsp),%ebp - andl %edi,%eax - movl %r13d,%ecx - xorl 48(%rsp),%ebp - leal -1894007588(%rdx,%r12,1),%r12d - xorl %edi,%ebx - roll $5,%ecx - addl %eax,%r12d - roll $1,%ebp - andl %esi,%ebx - addl %ecx,%r12d - roll $30,%esi - addl %ebx,%r12d - xorl 20(%rsp),%r14d - movl %edi,%eax - movl %ebp,16(%rsp) - movl %edi,%ebx - xorl 28(%rsp),%r14d - andl %esi,%eax - movl %r12d,%ecx - xorl 52(%rsp),%r14d - leal -1894007588(%rbp,%r11,1),%r11d - xorl %esi,%ebx - roll $5,%ecx - addl %eax,%r11d - roll $1,%r14d - andl %r13d,%ebx - addl %ecx,%r11d - roll $30,%r13d - addl %ebx,%r11d - xorl 24(%rsp),%edx - movl %esi,%eax - movl %r14d,20(%rsp) - movl %esi,%ebx - xorl 32(%rsp),%edx - andl %r13d,%eax - movl %r11d,%ecx - xorl 56(%rsp),%edx - leal -1894007588(%r14,%rdi,1),%edi - xorl %r13d,%ebx - roll $5,%ecx - addl %eax,%edi - roll $1,%edx - andl %r12d,%ebx - addl %ecx,%edi - roll $30,%r12d - addl %ebx,%edi - xorl 28(%rsp),%ebp - movl %r13d,%eax - movl %edx,24(%rsp) - movl %r13d,%ebx - xorl 36(%rsp),%ebp - andl %r12d,%eax - movl %edi,%ecx - xorl 60(%rsp),%ebp - leal -1894007588(%rdx,%rsi,1),%esi - xorl %r12d,%ebx - roll $5,%ecx - addl %eax,%esi - roll $1,%ebp - andl %r11d,%ebx - addl %ecx,%esi - roll $30,%r11d - addl %ebx,%esi - xorl 32(%rsp),%r14d - movl %r12d,%eax - movl %ebp,28(%rsp) - movl %r12d,%ebx - xorl 40(%rsp),%r14d - andl %r11d,%eax - movl %esi,%ecx - xorl 0(%rsp),%r14d - leal -1894007588(%rbp,%r13,1),%r13d - xorl %r11d,%ebx - roll $5,%ecx - addl %eax,%r13d - roll $1,%r14d - andl %edi,%ebx - addl %ecx,%r13d - roll $30,%edi - addl %ebx,%r13d - xorl 36(%rsp),%edx - movl %r11d,%eax - movl %r14d,32(%rsp) - movl %r11d,%ebx - xorl 44(%rsp),%edx - andl %edi,%eax - movl %r13d,%ecx - xorl 4(%rsp),%edx - leal -1894007588(%r14,%r12,1),%r12d - xorl %edi,%ebx - roll $5,%ecx - addl %eax,%r12d - roll $1,%edx - andl %esi,%ebx - addl %ecx,%r12d - roll $30,%esi - addl %ebx,%r12d - xorl 40(%rsp),%ebp - movl %edi,%eax - movl %edx,36(%rsp) - movl %edi,%ebx - xorl 48(%rsp),%ebp - andl %esi,%eax - movl %r12d,%ecx - xorl 8(%rsp),%ebp - leal -1894007588(%rdx,%r11,1),%r11d - xorl %esi,%ebx - roll $5,%ecx - addl %eax,%r11d - roll $1,%ebp - andl %r13d,%ebx - addl %ecx,%r11d - roll $30,%r13d - addl %ebx,%r11d - xorl 44(%rsp),%r14d - movl %esi,%eax - movl %ebp,40(%rsp) - movl %esi,%ebx - xorl 52(%rsp),%r14d - andl %r13d,%eax - movl %r11d,%ecx - xorl 12(%rsp),%r14d - leal -1894007588(%rbp,%rdi,1),%edi - xorl %r13d,%ebx - roll $5,%ecx - addl %eax,%edi - roll $1,%r14d - andl %r12d,%ebx - addl %ecx,%edi - roll $30,%r12d - addl %ebx,%edi - xorl 48(%rsp),%edx - movl %r13d,%eax - movl %r14d,44(%rsp) - movl %r13d,%ebx - xorl 56(%rsp),%edx - andl %r12d,%eax - movl %edi,%ecx - xorl 16(%rsp),%edx - leal -1894007588(%r14,%rsi,1),%esi - xorl %r12d,%ebx - roll $5,%ecx - addl %eax,%esi - roll $1,%edx - andl %r11d,%ebx - addl %ecx,%esi - roll $30,%r11d - addl %ebx,%esi - xorl 52(%rsp),%ebp - movl %edi,%eax - movl %edx,48(%rsp) - movl %esi,%ecx - xorl 60(%rsp),%ebp - xorl %r12d,%eax - roll $5,%ecx - xorl 20(%rsp),%ebp - leal -899497514(%rdx,%r13,1),%r13d - xorl %r11d,%eax - addl %ecx,%r13d - roll $30,%edi - addl %eax,%r13d - roll $1,%ebp - xorl 56(%rsp),%r14d - movl %esi,%eax - movl %ebp,52(%rsp) - movl %r13d,%ecx - xorl 0(%rsp),%r14d - xorl %r11d,%eax - roll $5,%ecx - xorl 24(%rsp),%r14d - leal -899497514(%rbp,%r12,1),%r12d - xorl %edi,%eax - addl %ecx,%r12d - roll $30,%esi - addl %eax,%r12d - roll $1,%r14d - xorl 60(%rsp),%edx - movl %r13d,%eax - movl %r14d,56(%rsp) - movl %r12d,%ecx - xorl 4(%rsp),%edx - xorl %edi,%eax - roll $5,%ecx - xorl 28(%rsp),%edx - leal -899497514(%r14,%r11,1),%r11d - xorl %esi,%eax - addl %ecx,%r11d - roll $30,%r13d - addl %eax,%r11d - roll $1,%edx - xorl 0(%rsp),%ebp - movl %r12d,%eax - movl %edx,60(%rsp) - movl %r11d,%ecx - xorl 8(%rsp),%ebp - xorl %esi,%eax - roll $5,%ecx - xorl 32(%rsp),%ebp - leal -899497514(%rdx,%rdi,1),%edi - xorl %r13d,%eax - addl %ecx,%edi - roll $30,%r12d - addl %eax,%edi - roll $1,%ebp - xorl 4(%rsp),%r14d - movl %r11d,%eax - movl %ebp,0(%rsp) - movl %edi,%ecx - xorl 12(%rsp),%r14d - xorl %r13d,%eax - roll $5,%ecx - xorl 36(%rsp),%r14d - leal -899497514(%rbp,%rsi,1),%esi - xorl %r12d,%eax - addl %ecx,%esi - roll $30,%r11d - addl %eax,%esi - roll $1,%r14d - xorl 8(%rsp),%edx - movl %edi,%eax - movl %r14d,4(%rsp) - movl %esi,%ecx - xorl 16(%rsp),%edx - xorl %r12d,%eax - roll $5,%ecx - xorl 40(%rsp),%edx - leal -899497514(%r14,%r13,1),%r13d - xorl %r11d,%eax - addl %ecx,%r13d - roll $30,%edi - addl %eax,%r13d - roll $1,%edx - xorl 12(%rsp),%ebp - movl %esi,%eax - movl %edx,8(%rsp) - movl %r13d,%ecx - xorl 20(%rsp),%ebp - xorl %r11d,%eax - roll $5,%ecx - xorl 44(%rsp),%ebp - leal -899497514(%rdx,%r12,1),%r12d - xorl %edi,%eax - addl %ecx,%r12d - roll $30,%esi - addl %eax,%r12d - roll $1,%ebp - xorl 16(%rsp),%r14d - movl %r13d,%eax - movl %ebp,12(%rsp) - movl %r12d,%ecx - xorl 24(%rsp),%r14d - xorl %edi,%eax - roll $5,%ecx - xorl 48(%rsp),%r14d - leal -899497514(%rbp,%r11,1),%r11d - xorl %esi,%eax - addl %ecx,%r11d - roll $30,%r13d - addl %eax,%r11d - roll $1,%r14d - xorl 20(%rsp),%edx - movl %r12d,%eax - movl %r14d,16(%rsp) - movl %r11d,%ecx - xorl 28(%rsp),%edx - xorl %esi,%eax - roll $5,%ecx - xorl 52(%rsp),%edx - leal -899497514(%r14,%rdi,1),%edi - xorl %r13d,%eax - addl %ecx,%edi - roll $30,%r12d - addl %eax,%edi - roll $1,%edx - xorl 24(%rsp),%ebp - movl %r11d,%eax - movl %edx,20(%rsp) - movl %edi,%ecx - xorl 32(%rsp),%ebp - xorl %r13d,%eax - roll $5,%ecx - xorl 56(%rsp),%ebp - leal -899497514(%rdx,%rsi,1),%esi - xorl %r12d,%eax - addl %ecx,%esi - roll $30,%r11d - addl %eax,%esi - roll $1,%ebp - xorl 28(%rsp),%r14d - movl %edi,%eax - movl %ebp,24(%rsp) - movl %esi,%ecx - xorl 36(%rsp),%r14d - xorl %r12d,%eax - roll $5,%ecx - xorl 60(%rsp),%r14d - leal -899497514(%rbp,%r13,1),%r13d - xorl %r11d,%eax - addl %ecx,%r13d - roll $30,%edi - addl %eax,%r13d - roll $1,%r14d - xorl 32(%rsp),%edx - movl %esi,%eax - movl %r14d,28(%rsp) - movl %r13d,%ecx - xorl 40(%rsp),%edx - xorl %r11d,%eax - roll $5,%ecx - xorl 0(%rsp),%edx - leal -899497514(%r14,%r12,1),%r12d - xorl %edi,%eax - addl %ecx,%r12d - roll $30,%esi - addl %eax,%r12d - roll $1,%edx - xorl 36(%rsp),%ebp - movl %r13d,%eax - - movl %r12d,%ecx - xorl 44(%rsp),%ebp - xorl %edi,%eax - roll $5,%ecx - xorl 4(%rsp),%ebp - leal -899497514(%rdx,%r11,1),%r11d - xorl %esi,%eax - addl %ecx,%r11d - roll $30,%r13d - addl %eax,%r11d - roll $1,%ebp - xorl 40(%rsp),%r14d - movl %r12d,%eax - - movl %r11d,%ecx - xorl 48(%rsp),%r14d - xorl %esi,%eax - roll $5,%ecx - xorl 8(%rsp),%r14d - leal -899497514(%rbp,%rdi,1),%edi - xorl %r13d,%eax - addl %ecx,%edi - roll $30,%r12d - addl %eax,%edi - roll $1,%r14d - xorl 44(%rsp),%edx - movl %r11d,%eax - - movl %edi,%ecx - xorl 52(%rsp),%edx - xorl %r13d,%eax - roll $5,%ecx - xorl 12(%rsp),%edx - leal -899497514(%r14,%rsi,1),%esi - xorl %r12d,%eax - addl %ecx,%esi - roll $30,%r11d - addl %eax,%esi - roll $1,%edx - xorl 48(%rsp),%ebp - movl %edi,%eax - - movl %esi,%ecx - xorl 56(%rsp),%ebp - xorl %r12d,%eax - roll $5,%ecx - xorl 16(%rsp),%ebp - leal -899497514(%rdx,%r13,1),%r13d - xorl %r11d,%eax - addl %ecx,%r13d - roll $30,%edi - addl %eax,%r13d - roll $1,%ebp - xorl 52(%rsp),%r14d - movl %esi,%eax - - movl %r13d,%ecx - xorl 60(%rsp),%r14d - xorl %r11d,%eax - roll $5,%ecx - xorl 20(%rsp),%r14d - leal -899497514(%rbp,%r12,1),%r12d - xorl %edi,%eax - addl %ecx,%r12d - roll $30,%esi - addl %eax,%r12d - roll $1,%r14d - xorl 56(%rsp),%edx - movl %r13d,%eax - - movl %r12d,%ecx - xorl 0(%rsp),%edx - xorl %edi,%eax - roll $5,%ecx - xorl 24(%rsp),%edx - leal -899497514(%r14,%r11,1),%r11d - xorl %esi,%eax - addl %ecx,%r11d - roll $30,%r13d - addl %eax,%r11d - roll $1,%edx - xorl 60(%rsp),%ebp - movl %r12d,%eax - - movl %r11d,%ecx - xorl 4(%rsp),%ebp - xorl %esi,%eax - roll $5,%ecx - xorl 28(%rsp),%ebp - leal -899497514(%rdx,%rdi,1),%edi - xorl %r13d,%eax - addl %ecx,%edi - roll $30,%r12d - addl %eax,%edi - roll $1,%ebp - movl %r11d,%eax - movl %edi,%ecx - xorl %r13d,%eax - leal -899497514(%rbp,%rsi,1),%esi - roll $5,%ecx - xorl %r12d,%eax - addl %ecx,%esi - roll $30,%r11d - addl %eax,%esi - addl 0(%r8),%esi - addl 4(%r8),%edi - addl 8(%r8),%r11d - addl 12(%r8),%r12d - addl 16(%r8),%r13d - movl %esi,0(%r8) - movl %edi,4(%r8) - movl %r11d,8(%r8) - movl %r12d,12(%r8) - movl %r13d,16(%r8) - - subq $1,%r10 - leaq 64(%r9),%r9 - jnz L$loop - - movq 64(%rsp),%rsi - movq -40(%rsi),%r14 - movq -32(%rsi),%r13 - movq -24(%rsi),%r12 - movq -16(%rsi),%rbp - movq -8(%rsi),%rbx - leaq (%rsi),%rsp -L$epilogue: - .byte 0xf3,0xc3 - - -.p2align 4 -sha1_block_data_order_ssse3: -_ssse3_shortcut: - movq %rsp,%rax - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - leaq -64(%rsp),%rsp - movq %rax,%r14 - andq $-64,%rsp - movq %rdi,%r8 - movq %rsi,%r9 - movq %rdx,%r10 - - shlq $6,%r10 - addq %r9,%r10 - leaq K_XX_XX+64(%rip),%r11 - - movl 0(%r8),%eax - movl 4(%r8),%ebx - movl 8(%r8),%ecx - movl 12(%r8),%edx - movl %ebx,%esi - movl 16(%r8),%ebp - movl %ecx,%edi - xorl %edx,%edi - andl %edi,%esi - - movdqa 64(%r11),%xmm6 - movdqa -64(%r11),%xmm9 - movdqu 0(%r9),%xmm0 - movdqu 16(%r9),%xmm1 - movdqu 32(%r9),%xmm2 - movdqu 48(%r9),%xmm3 -.byte 102,15,56,0,198 -.byte 102,15,56,0,206 -.byte 102,15,56,0,214 - addq $64,%r9 - paddd %xmm9,%xmm0 -.byte 102,15,56,0,222 - paddd %xmm9,%xmm1 - paddd %xmm9,%xmm2 - movdqa %xmm0,0(%rsp) - psubd %xmm9,%xmm0 - movdqa %xmm1,16(%rsp) - psubd %xmm9,%xmm1 - movdqa %xmm2,32(%rsp) - psubd %xmm9,%xmm2 - jmp L$oop_ssse3 -.p2align 4 -L$oop_ssse3: - rorl $2,%ebx - pshufd $238,%xmm0,%xmm4 - xorl %edx,%esi - movdqa %xmm3,%xmm8 - paddd %xmm3,%xmm9 - movl %eax,%edi - addl 0(%rsp),%ebp - punpcklqdq %xmm1,%xmm4 - xorl %ecx,%ebx - roll $5,%eax - addl %esi,%ebp - psrldq $4,%xmm8 - andl %ebx,%edi - xorl %ecx,%ebx - pxor %xmm0,%xmm4 - addl %eax,%ebp - rorl $7,%eax - pxor %xmm2,%xmm8 - xorl %ecx,%edi - movl %ebp,%esi - addl 4(%rsp),%edx - pxor %xmm8,%xmm4 - xorl %ebx,%eax - roll $5,%ebp - movdqa %xmm9,48(%rsp) - addl %edi,%edx - andl %eax,%esi - movdqa %xmm4,%xmm10 - xorl %ebx,%eax - addl %ebp,%edx - rorl $7,%ebp - movdqa %xmm4,%xmm8 - xorl %ebx,%esi - pslldq $12,%xmm10 - paddd %xmm4,%xmm4 - movl %edx,%edi - addl 8(%rsp),%ecx - psrld $31,%xmm8 - xorl %eax,%ebp - roll $5,%edx - addl %esi,%ecx - movdqa %xmm10,%xmm9 - andl %ebp,%edi - xorl %eax,%ebp - psrld $30,%xmm10 - addl %edx,%ecx - rorl $7,%edx - por %xmm8,%xmm4 - xorl %eax,%edi - movl %ecx,%esi - addl 12(%rsp),%ebx - pslld $2,%xmm9 - pxor %xmm10,%xmm4 - xorl %ebp,%edx - movdqa -64(%r11),%xmm10 - roll $5,%ecx - addl %edi,%ebx - andl %edx,%esi - pxor %xmm9,%xmm4 - xorl %ebp,%edx - addl %ecx,%ebx - rorl $7,%ecx - pshufd $238,%xmm1,%xmm5 - xorl %ebp,%esi - movdqa %xmm4,%xmm9 - paddd %xmm4,%xmm10 - movl %ebx,%edi - addl 16(%rsp),%eax - punpcklqdq %xmm2,%xmm5 - xorl %edx,%ecx - roll $5,%ebx - addl %esi,%eax - psrldq $4,%xmm9 - andl %ecx,%edi - xorl %edx,%ecx - pxor %xmm1,%xmm5 - addl %ebx,%eax - rorl $7,%ebx - pxor %xmm3,%xmm9 - xorl %edx,%edi - movl %eax,%esi - addl 20(%rsp),%ebp - pxor %xmm9,%xmm5 - xorl %ecx,%ebx - roll $5,%eax - movdqa %xmm10,0(%rsp) - addl %edi,%ebp - andl %ebx,%esi - movdqa %xmm5,%xmm8 - xorl %ecx,%ebx - addl %eax,%ebp - rorl $7,%eax - movdqa %xmm5,%xmm9 - xorl %ecx,%esi - pslldq $12,%xmm8 - paddd %xmm5,%xmm5 - movl %ebp,%edi - addl 24(%rsp),%edx - psrld $31,%xmm9 - xorl %ebx,%eax - roll $5,%ebp - addl %esi,%edx - movdqa %xmm8,%xmm10 - andl %eax,%edi - xorl %ebx,%eax - psrld $30,%xmm8 - addl %ebp,%edx - rorl $7,%ebp - por %xmm9,%xmm5 - xorl %ebx,%edi - movl %edx,%esi - addl 28(%rsp),%ecx - pslld $2,%xmm10 - pxor %xmm8,%xmm5 - xorl %eax,%ebp - movdqa -32(%r11),%xmm8 - roll $5,%edx - addl %edi,%ecx - andl %ebp,%esi - pxor %xmm10,%xmm5 - xorl %eax,%ebp - addl %edx,%ecx - rorl $7,%edx - pshufd $238,%xmm2,%xmm6 - xorl %eax,%esi - movdqa %xmm5,%xmm10 - paddd %xmm5,%xmm8 - movl %ecx,%edi - addl 32(%rsp),%ebx - punpcklqdq %xmm3,%xmm6 - xorl %ebp,%edx - roll $5,%ecx - addl %esi,%ebx - psrldq $4,%xmm10 - andl %edx,%edi - xorl %ebp,%edx - pxor %xmm2,%xmm6 - addl %ecx,%ebx - rorl $7,%ecx - pxor %xmm4,%xmm10 - xorl %ebp,%edi - movl %ebx,%esi - addl 36(%rsp),%eax - pxor %xmm10,%xmm6 - xorl %edx,%ecx - roll $5,%ebx - movdqa %xmm8,16(%rsp) - addl %edi,%eax - andl %ecx,%esi - movdqa %xmm6,%xmm9 - xorl %edx,%ecx - addl %ebx,%eax - rorl $7,%ebx - movdqa %xmm6,%xmm10 - xorl %edx,%esi - pslldq $12,%xmm9 - paddd %xmm6,%xmm6 - movl %eax,%edi - addl 40(%rsp),%ebp - psrld $31,%xmm10 - xorl %ecx,%ebx - roll $5,%eax - addl %esi,%ebp - movdqa %xmm9,%xmm8 - andl %ebx,%edi - xorl %ecx,%ebx - psrld $30,%xmm9 - addl %eax,%ebp - rorl $7,%eax - por %xmm10,%xmm6 - xorl %ecx,%edi - movl %ebp,%esi - addl 44(%rsp),%edx - pslld $2,%xmm8 - pxor %xmm9,%xmm6 - xorl %ebx,%eax - movdqa -32(%r11),%xmm9 - roll $5,%ebp - addl %edi,%edx - andl %eax,%esi - pxor %xmm8,%xmm6 - xorl %ebx,%eax - addl %ebp,%edx - rorl $7,%ebp - pshufd $238,%xmm3,%xmm7 - xorl %ebx,%esi - movdqa %xmm6,%xmm8 - paddd %xmm6,%xmm9 - movl %edx,%edi - addl 48(%rsp),%ecx - punpcklqdq %xmm4,%xmm7 - xorl %eax,%ebp - roll $5,%edx - addl %esi,%ecx - psrldq $4,%xmm8 - andl %ebp,%edi - xorl %eax,%ebp - pxor %xmm3,%xmm7 - addl %edx,%ecx - rorl $7,%edx - pxor %xmm5,%xmm8 - xorl %eax,%edi - movl %ecx,%esi - addl 52(%rsp),%ebx - pxor %xmm8,%xmm7 - xorl %ebp,%edx - roll $5,%ecx - movdqa %xmm9,32(%rsp) - addl %edi,%ebx - andl %edx,%esi - movdqa %xmm7,%xmm10 - xorl %ebp,%edx - addl %ecx,%ebx - rorl $7,%ecx - movdqa %xmm7,%xmm8 - xorl %ebp,%esi - pslldq $12,%xmm10 - paddd %xmm7,%xmm7 - movl %ebx,%edi - addl 56(%rsp),%eax - psrld $31,%xmm8 - xorl %edx,%ecx - roll $5,%ebx - addl %esi,%eax - movdqa %xmm10,%xmm9 - andl %ecx,%edi - xorl %edx,%ecx - psrld $30,%xmm10 - addl %ebx,%eax - rorl $7,%ebx - por %xmm8,%xmm7 - xorl %edx,%edi - movl %eax,%esi - addl 60(%rsp),%ebp - pslld $2,%xmm9 - pxor %xmm10,%xmm7 - xorl %ecx,%ebx - movdqa -32(%r11),%xmm10 - roll $5,%eax - addl %edi,%ebp - andl %ebx,%esi - pxor %xmm9,%xmm7 - pshufd $238,%xmm6,%xmm9 - xorl %ecx,%ebx - addl %eax,%ebp - rorl $7,%eax - pxor %xmm4,%xmm0 - xorl %ecx,%esi - movl %ebp,%edi - addl 0(%rsp),%edx - punpcklqdq %xmm7,%xmm9 - xorl %ebx,%eax - roll $5,%ebp - pxor %xmm1,%xmm0 - addl %esi,%edx - andl %eax,%edi - movdqa %xmm10,%xmm8 - xorl %ebx,%eax - paddd %xmm7,%xmm10 - addl %ebp,%edx - pxor %xmm9,%xmm0 - rorl $7,%ebp - xorl %ebx,%edi - movl %edx,%esi - addl 4(%rsp),%ecx - movdqa %xmm0,%xmm9 - xorl %eax,%ebp - roll $5,%edx - movdqa %xmm10,48(%rsp) - addl %edi,%ecx - andl %ebp,%esi - xorl %eax,%ebp - pslld $2,%xmm0 - addl %edx,%ecx - rorl $7,%edx - psrld $30,%xmm9 - xorl %eax,%esi - movl %ecx,%edi - addl 8(%rsp),%ebx - por %xmm9,%xmm0 - xorl %ebp,%edx - roll $5,%ecx - pshufd $238,%xmm7,%xmm10 - addl %esi,%ebx - andl %edx,%edi - xorl %ebp,%edx - addl %ecx,%ebx - addl 12(%rsp),%eax - xorl %ebp,%edi - movl %ebx,%esi - roll $5,%ebx - addl %edi,%eax - xorl %edx,%esi - rorl $7,%ecx - addl %ebx,%eax - pxor %xmm5,%xmm1 - addl 16(%rsp),%ebp - xorl %ecx,%esi - punpcklqdq %xmm0,%xmm10 - movl %eax,%edi - roll $5,%eax - pxor %xmm2,%xmm1 - addl %esi,%ebp - xorl %ecx,%edi - movdqa %xmm8,%xmm9 - rorl $7,%ebx - paddd %xmm0,%xmm8 - addl %eax,%ebp - pxor %xmm10,%xmm1 - addl 20(%rsp),%edx - xorl %ebx,%edi - movl %ebp,%esi - roll $5,%ebp - movdqa %xmm1,%xmm10 - addl %edi,%edx - xorl %ebx,%esi - movdqa %xmm8,0(%rsp) - rorl $7,%eax - addl %ebp,%edx - addl 24(%rsp),%ecx - pslld $2,%xmm1 - xorl %eax,%esi - movl %edx,%edi - psrld $30,%xmm10 - roll $5,%edx - addl %esi,%ecx - xorl %eax,%edi - rorl $7,%ebp - por %xmm10,%xmm1 - addl %edx,%ecx - addl 28(%rsp),%ebx - pshufd $238,%xmm0,%xmm8 - xorl %ebp,%edi - movl %ecx,%esi - roll $5,%ecx - addl %edi,%ebx - xorl %ebp,%esi - rorl $7,%edx - addl %ecx,%ebx - pxor %xmm6,%xmm2 - addl 32(%rsp),%eax - xorl %edx,%esi - punpcklqdq %xmm1,%xmm8 - movl %ebx,%edi - roll $5,%ebx - pxor %xmm3,%xmm2 - addl %esi,%eax - xorl %edx,%edi - movdqa 0(%r11),%xmm10 - rorl $7,%ecx - paddd %xmm1,%xmm9 - addl %ebx,%eax - pxor %xmm8,%xmm2 - addl 36(%rsp),%ebp - xorl %ecx,%edi - movl %eax,%esi - roll $5,%eax - movdqa %xmm2,%xmm8 - addl %edi,%ebp - xorl %ecx,%esi - movdqa %xmm9,16(%rsp) - rorl $7,%ebx - addl %eax,%ebp - addl 40(%rsp),%edx - pslld $2,%xmm2 - xorl %ebx,%esi - movl %ebp,%edi - psrld $30,%xmm8 - roll $5,%ebp - addl %esi,%edx - xorl %ebx,%edi - rorl $7,%eax - por %xmm8,%xmm2 - addl %ebp,%edx - addl 44(%rsp),%ecx - pshufd $238,%xmm1,%xmm9 - xorl %eax,%edi - movl %edx,%esi - roll $5,%edx - addl %edi,%ecx - xorl %eax,%esi - rorl $7,%ebp - addl %edx,%ecx - pxor %xmm7,%xmm3 - addl 48(%rsp),%ebx - xorl %ebp,%esi - punpcklqdq %xmm2,%xmm9 - movl %ecx,%edi - roll $5,%ecx - pxor %xmm4,%xmm3 - addl %esi,%ebx - xorl %ebp,%edi - movdqa %xmm10,%xmm8 - rorl $7,%edx - paddd %xmm2,%xmm10 - addl %ecx,%ebx - pxor %xmm9,%xmm3 - addl 52(%rsp),%eax - xorl %edx,%edi - movl %ebx,%esi - roll $5,%ebx - movdqa %xmm3,%xmm9 - addl %edi,%eax - xorl %edx,%esi - movdqa %xmm10,32(%rsp) - rorl $7,%ecx - addl %ebx,%eax - addl 56(%rsp),%ebp - pslld $2,%xmm3 - xorl %ecx,%esi - movl %eax,%edi - psrld $30,%xmm9 - roll $5,%eax - addl %esi,%ebp - xorl %ecx,%edi - rorl $7,%ebx - por %xmm9,%xmm3 - addl %eax,%ebp - addl 60(%rsp),%edx - pshufd $238,%xmm2,%xmm10 - xorl %ebx,%edi - movl %ebp,%esi - roll $5,%ebp - addl %edi,%edx - xorl %ebx,%esi - rorl $7,%eax - addl %ebp,%edx - pxor %xmm0,%xmm4 - addl 0(%rsp),%ecx - xorl %eax,%esi - punpcklqdq %xmm3,%xmm10 - movl %edx,%edi - roll $5,%edx - pxor %xmm5,%xmm4 - addl %esi,%ecx - xorl %eax,%edi - movdqa %xmm8,%xmm9 - rorl $7,%ebp - paddd %xmm3,%xmm8 - addl %edx,%ecx - pxor %xmm10,%xmm4 - addl 4(%rsp),%ebx - xorl %ebp,%edi - movl %ecx,%esi - roll $5,%ecx - movdqa %xmm4,%xmm10 - addl %edi,%ebx - xorl %ebp,%esi - movdqa %xmm8,48(%rsp) - rorl $7,%edx - addl %ecx,%ebx - addl 8(%rsp),%eax - pslld $2,%xmm4 - xorl %edx,%esi - movl %ebx,%edi - psrld $30,%xmm10 - roll $5,%ebx - addl %esi,%eax - xorl %edx,%edi - rorl $7,%ecx - por %xmm10,%xmm4 - addl %ebx,%eax - addl 12(%rsp),%ebp - pshufd $238,%xmm3,%xmm8 - xorl %ecx,%edi - movl %eax,%esi - roll $5,%eax - addl %edi,%ebp - xorl %ecx,%esi - rorl $7,%ebx - addl %eax,%ebp - pxor %xmm1,%xmm5 - addl 16(%rsp),%edx - xorl %ebx,%esi - punpcklqdq %xmm4,%xmm8 - movl %ebp,%edi - roll $5,%ebp - pxor %xmm6,%xmm5 - addl %esi,%edx - xorl %ebx,%edi - movdqa %xmm9,%xmm10 - rorl $7,%eax - paddd %xmm4,%xmm9 - addl %ebp,%edx - pxor %xmm8,%xmm5 - addl 20(%rsp),%ecx - xorl %eax,%edi - movl %edx,%esi - roll $5,%edx - movdqa %xmm5,%xmm8 - addl %edi,%ecx - xorl %eax,%esi - movdqa %xmm9,0(%rsp) - rorl $7,%ebp - addl %edx,%ecx - addl 24(%rsp),%ebx - pslld $2,%xmm5 - xorl %ebp,%esi - movl %ecx,%edi - psrld $30,%xmm8 - roll $5,%ecx - addl %esi,%ebx - xorl %ebp,%edi - rorl $7,%edx - por %xmm8,%xmm5 - addl %ecx,%ebx - addl 28(%rsp),%eax - pshufd $238,%xmm4,%xmm9 - rorl $7,%ecx - movl %ebx,%esi - xorl %edx,%edi - roll $5,%ebx - addl %edi,%eax - xorl %ecx,%esi - xorl %edx,%ecx - addl %ebx,%eax - pxor %xmm2,%xmm6 - addl 32(%rsp),%ebp - andl %ecx,%esi - xorl %edx,%ecx - rorl $7,%ebx - punpcklqdq %xmm5,%xmm9 - movl %eax,%edi - xorl %ecx,%esi - pxor %xmm7,%xmm6 - roll $5,%eax - addl %esi,%ebp - movdqa %xmm10,%xmm8 - xorl %ebx,%edi - paddd %xmm5,%xmm10 - xorl %ecx,%ebx - pxor %xmm9,%xmm6 - addl %eax,%ebp - addl 36(%rsp),%edx - andl %ebx,%edi - xorl %ecx,%ebx - rorl $7,%eax - movdqa %xmm6,%xmm9 - movl %ebp,%esi - xorl %ebx,%edi - movdqa %xmm10,16(%rsp) - roll $5,%ebp - addl %edi,%edx - xorl %eax,%esi - pslld $2,%xmm6 - xorl %ebx,%eax - addl %ebp,%edx - psrld $30,%xmm9 - addl 40(%rsp),%ecx - andl %eax,%esi - xorl %ebx,%eax - por %xmm9,%xmm6 - rorl $7,%ebp - movl %edx,%edi - xorl %eax,%esi - roll $5,%edx - pshufd $238,%xmm5,%xmm10 - addl %esi,%ecx - xorl %ebp,%edi - xorl %eax,%ebp - addl %edx,%ecx - addl 44(%rsp),%ebx - andl %ebp,%edi - xorl %eax,%ebp - rorl $7,%edx - movl %ecx,%esi - xorl %ebp,%edi - roll $5,%ecx - addl %edi,%ebx - xorl %edx,%esi - xorl %ebp,%edx - addl %ecx,%ebx - pxor %xmm3,%xmm7 - addl 48(%rsp),%eax - andl %edx,%esi - xorl %ebp,%edx - rorl $7,%ecx - punpcklqdq %xmm6,%xmm10 - movl %ebx,%edi - xorl %edx,%esi - pxor %xmm0,%xmm7 - roll $5,%ebx - addl %esi,%eax - movdqa 32(%r11),%xmm9 - xorl %ecx,%edi - paddd %xmm6,%xmm8 - xorl %edx,%ecx - pxor %xmm10,%xmm7 - addl %ebx,%eax - addl 52(%rsp),%ebp - andl %ecx,%edi - xorl %edx,%ecx - rorl $7,%ebx - movdqa %xmm7,%xmm10 - movl %eax,%esi - xorl %ecx,%edi - movdqa %xmm8,32(%rsp) - roll $5,%eax - addl %edi,%ebp - xorl %ebx,%esi - pslld $2,%xmm7 - xorl %ecx,%ebx - addl %eax,%ebp - psrld $30,%xmm10 - addl 56(%rsp),%edx - andl %ebx,%esi - xorl %ecx,%ebx - por %xmm10,%xmm7 - rorl $7,%eax - movl %ebp,%edi - xorl %ebx,%esi - roll $5,%ebp - pshufd $238,%xmm6,%xmm8 - addl %esi,%edx - xorl %eax,%edi - xorl %ebx,%eax - addl %ebp,%edx - addl 60(%rsp),%ecx - andl %eax,%edi - xorl %ebx,%eax - rorl $7,%ebp - movl %edx,%esi - xorl %eax,%edi - roll $5,%edx - addl %edi,%ecx - xorl %ebp,%esi - xorl %eax,%ebp - addl %edx,%ecx - pxor %xmm4,%xmm0 - addl 0(%rsp),%ebx - andl %ebp,%esi - xorl %eax,%ebp - rorl $7,%edx - punpcklqdq %xmm7,%xmm8 - movl %ecx,%edi - xorl %ebp,%esi - pxor %xmm1,%xmm0 - roll $5,%ecx - addl %esi,%ebx - movdqa %xmm9,%xmm10 - xorl %edx,%edi - paddd %xmm7,%xmm9 - xorl %ebp,%edx - pxor %xmm8,%xmm0 - addl %ecx,%ebx - addl 4(%rsp),%eax - andl %edx,%edi - xorl %ebp,%edx - rorl $7,%ecx - movdqa %xmm0,%xmm8 - movl %ebx,%esi - xorl %edx,%edi - movdqa %xmm9,48(%rsp) - roll $5,%ebx - addl %edi,%eax - xorl %ecx,%esi - pslld $2,%xmm0 - xorl %edx,%ecx - addl %ebx,%eax - psrld $30,%xmm8 - addl 8(%rsp),%ebp - andl %ecx,%esi - xorl %edx,%ecx - por %xmm8,%xmm0 - rorl $7,%ebx - movl %eax,%edi - xorl %ecx,%esi - roll $5,%eax - pshufd $238,%xmm7,%xmm9 - addl %esi,%ebp - xorl %ebx,%edi - xorl %ecx,%ebx - addl %eax,%ebp - addl 12(%rsp),%edx - andl %ebx,%edi - xorl %ecx,%ebx - rorl $7,%eax - movl %ebp,%esi - xorl %ebx,%edi - roll $5,%ebp - addl %edi,%edx - xorl %eax,%esi - xorl %ebx,%eax - addl %ebp,%edx - pxor %xmm5,%xmm1 - addl 16(%rsp),%ecx - andl %eax,%esi - xorl %ebx,%eax - rorl $7,%ebp - punpcklqdq %xmm0,%xmm9 - movl %edx,%edi - xorl %eax,%esi - pxor %xmm2,%xmm1 - roll $5,%edx - addl %esi,%ecx - movdqa %xmm10,%xmm8 - xorl %ebp,%edi - paddd %xmm0,%xmm10 - xorl %eax,%ebp - pxor %xmm9,%xmm1 - addl %edx,%ecx - addl 20(%rsp),%ebx - andl %ebp,%edi - xorl %eax,%ebp - rorl $7,%edx - movdqa %xmm1,%xmm9 - movl %ecx,%esi - xorl %ebp,%edi - movdqa %xmm10,0(%rsp) - roll $5,%ecx - addl %edi,%ebx - xorl %edx,%esi - pslld $2,%xmm1 - xorl %ebp,%edx - addl %ecx,%ebx - psrld $30,%xmm9 - addl 24(%rsp),%eax - andl %edx,%esi - xorl %ebp,%edx - por %xmm9,%xmm1 - rorl $7,%ecx - movl %ebx,%edi - xorl %edx,%esi - roll $5,%ebx - pshufd $238,%xmm0,%xmm10 - addl %esi,%eax - xorl %ecx,%edi - xorl %edx,%ecx - addl %ebx,%eax - addl 28(%rsp),%ebp - andl %ecx,%edi - xorl %edx,%ecx - rorl $7,%ebx - movl %eax,%esi - xorl %ecx,%edi - roll $5,%eax - addl %edi,%ebp - xorl %ebx,%esi - xorl %ecx,%ebx - addl %eax,%ebp - pxor %xmm6,%xmm2 - addl 32(%rsp),%edx - andl %ebx,%esi - xorl %ecx,%ebx - rorl $7,%eax - punpcklqdq %xmm1,%xmm10 - movl %ebp,%edi - xorl %ebx,%esi - pxor %xmm3,%xmm2 - roll $5,%ebp - addl %esi,%edx - movdqa %xmm8,%xmm9 - xorl %eax,%edi - paddd %xmm1,%xmm8 - xorl %ebx,%eax - pxor %xmm10,%xmm2 - addl %ebp,%edx - addl 36(%rsp),%ecx - andl %eax,%edi - xorl %ebx,%eax - rorl $7,%ebp - movdqa %xmm2,%xmm10 - movl %edx,%esi - xorl %eax,%edi - movdqa %xmm8,16(%rsp) - roll $5,%edx - addl %edi,%ecx - xorl %ebp,%esi - pslld $2,%xmm2 - xorl %eax,%ebp - addl %edx,%ecx - psrld $30,%xmm10 - addl 40(%rsp),%ebx - andl %ebp,%esi - xorl %eax,%ebp - por %xmm10,%xmm2 - rorl $7,%edx - movl %ecx,%edi - xorl %ebp,%esi - roll $5,%ecx - pshufd $238,%xmm1,%xmm8 - addl %esi,%ebx - xorl %edx,%edi - xorl %ebp,%edx - addl %ecx,%ebx - addl 44(%rsp),%eax - andl %edx,%edi - xorl %ebp,%edx - rorl $7,%ecx - movl %ebx,%esi - xorl %edx,%edi - roll $5,%ebx - addl %edi,%eax - xorl %edx,%esi - addl %ebx,%eax - pxor %xmm7,%xmm3 - addl 48(%rsp),%ebp - xorl %ecx,%esi - punpcklqdq %xmm2,%xmm8 - movl %eax,%edi - roll $5,%eax - pxor %xmm4,%xmm3 - addl %esi,%ebp - xorl %ecx,%edi - movdqa %xmm9,%xmm10 - rorl $7,%ebx - paddd %xmm2,%xmm9 - addl %eax,%ebp - pxor %xmm8,%xmm3 - addl 52(%rsp),%edx - xorl %ebx,%edi - movl %ebp,%esi - roll $5,%ebp - movdqa %xmm3,%xmm8 - addl %edi,%edx - xorl %ebx,%esi - movdqa %xmm9,32(%rsp) - rorl $7,%eax - addl %ebp,%edx - addl 56(%rsp),%ecx - pslld $2,%xmm3 - xorl %eax,%esi - movl %edx,%edi - psrld $30,%xmm8 - roll $5,%edx - addl %esi,%ecx - xorl %eax,%edi - rorl $7,%ebp - por %xmm8,%xmm3 - addl %edx,%ecx - addl 60(%rsp),%ebx - xorl %ebp,%edi - movl %ecx,%esi - roll $5,%ecx - addl %edi,%ebx - xorl %ebp,%esi - rorl $7,%edx - addl %ecx,%ebx - addl 0(%rsp),%eax - xorl %edx,%esi - movl %ebx,%edi - roll $5,%ebx - paddd %xmm3,%xmm10 - addl %esi,%eax - xorl %edx,%edi - movdqa %xmm10,48(%rsp) - rorl $7,%ecx - addl %ebx,%eax - addl 4(%rsp),%ebp - xorl %ecx,%edi - movl %eax,%esi - roll $5,%eax - addl %edi,%ebp - xorl %ecx,%esi - rorl $7,%ebx - addl %eax,%ebp - addl 8(%rsp),%edx - xorl %ebx,%esi - movl %ebp,%edi - roll $5,%ebp - addl %esi,%edx - xorl %ebx,%edi - rorl $7,%eax - addl %ebp,%edx - addl 12(%rsp),%ecx - xorl %eax,%edi - movl %edx,%esi - roll $5,%edx - addl %edi,%ecx - xorl %eax,%esi - rorl $7,%ebp - addl %edx,%ecx - cmpq %r10,%r9 - je L$done_ssse3 - movdqa 64(%r11),%xmm6 - movdqa -64(%r11),%xmm9 - movdqu 0(%r9),%xmm0 - movdqu 16(%r9),%xmm1 - movdqu 32(%r9),%xmm2 - movdqu 48(%r9),%xmm3 -.byte 102,15,56,0,198 - addq $64,%r9 - addl 16(%rsp),%ebx - xorl %ebp,%esi - movl %ecx,%edi -.byte 102,15,56,0,206 - roll $5,%ecx - addl %esi,%ebx - xorl %ebp,%edi - rorl $7,%edx - paddd %xmm9,%xmm0 - addl %ecx,%ebx - addl 20(%rsp),%eax - xorl %edx,%edi - movl %ebx,%esi - movdqa %xmm0,0(%rsp) - roll $5,%ebx - addl %edi,%eax - xorl %edx,%esi - rorl $7,%ecx - psubd %xmm9,%xmm0 - addl %ebx,%eax - addl 24(%rsp),%ebp - xorl %ecx,%esi - movl %eax,%edi - roll $5,%eax - addl %esi,%ebp - xorl %ecx,%edi - rorl $7,%ebx - addl %eax,%ebp - addl 28(%rsp),%edx - xorl %ebx,%edi - movl %ebp,%esi - roll $5,%ebp - addl %edi,%edx - xorl %ebx,%esi - rorl $7,%eax - addl %ebp,%edx - addl 32(%rsp),%ecx - xorl %eax,%esi - movl %edx,%edi -.byte 102,15,56,0,214 - roll $5,%edx - addl %esi,%ecx - xorl %eax,%edi - rorl $7,%ebp - paddd %xmm9,%xmm1 - addl %edx,%ecx - addl 36(%rsp),%ebx - xorl %ebp,%edi - movl %ecx,%esi - movdqa %xmm1,16(%rsp) - roll $5,%ecx - addl %edi,%ebx - xorl %ebp,%esi - rorl $7,%edx - psubd %xmm9,%xmm1 - addl %ecx,%ebx - addl 40(%rsp),%eax - xorl %edx,%esi - movl %ebx,%edi - roll $5,%ebx - addl %esi,%eax - xorl %edx,%edi - rorl $7,%ecx - addl %ebx,%eax - addl 44(%rsp),%ebp - xorl %ecx,%edi - movl %eax,%esi - roll $5,%eax - addl %edi,%ebp - xorl %ecx,%esi - rorl $7,%ebx - addl %eax,%ebp - addl 48(%rsp),%edx - xorl %ebx,%esi - movl %ebp,%edi -.byte 102,15,56,0,222 - roll $5,%ebp - addl %esi,%edx - xorl %ebx,%edi - rorl $7,%eax - paddd %xmm9,%xmm2 - addl %ebp,%edx - addl 52(%rsp),%ecx - xorl %eax,%edi - movl %edx,%esi - movdqa %xmm2,32(%rsp) - roll $5,%edx - addl %edi,%ecx - xorl %eax,%esi - rorl $7,%ebp - psubd %xmm9,%xmm2 - addl %edx,%ecx - addl 56(%rsp),%ebx - xorl %ebp,%esi - movl %ecx,%edi - roll $5,%ecx - addl %esi,%ebx - xorl %ebp,%edi - rorl $7,%edx - addl %ecx,%ebx - addl 60(%rsp),%eax - xorl %edx,%edi - movl %ebx,%esi - roll $5,%ebx - addl %edi,%eax - rorl $7,%ecx - addl %ebx,%eax - addl 0(%r8),%eax - addl 4(%r8),%esi - addl 8(%r8),%ecx - addl 12(%r8),%edx - movl %eax,0(%r8) - addl 16(%r8),%ebp - movl %esi,4(%r8) - movl %esi,%ebx - movl %ecx,8(%r8) - movl %ecx,%edi - movl %edx,12(%r8) - xorl %edx,%edi - movl %ebp,16(%r8) - andl %edi,%esi - jmp L$oop_ssse3 - -.p2align 4 -L$done_ssse3: - addl 16(%rsp),%ebx - xorl %ebp,%esi - movl %ecx,%edi - roll $5,%ecx - addl %esi,%ebx - xorl %ebp,%edi - rorl $7,%edx - addl %ecx,%ebx - addl 20(%rsp),%eax - xorl %edx,%edi - movl %ebx,%esi - roll $5,%ebx - addl %edi,%eax - xorl %edx,%esi - rorl $7,%ecx - addl %ebx,%eax - addl 24(%rsp),%ebp - xorl %ecx,%esi - movl %eax,%edi - roll $5,%eax - addl %esi,%ebp - xorl %ecx,%edi - rorl $7,%ebx - addl %eax,%ebp - addl 28(%rsp),%edx - xorl %ebx,%edi - movl %ebp,%esi - roll $5,%ebp - addl %edi,%edx - xorl %ebx,%esi - rorl $7,%eax - addl %ebp,%edx - addl 32(%rsp),%ecx - xorl %eax,%esi - movl %edx,%edi - roll $5,%edx - addl %esi,%ecx - xorl %eax,%edi - rorl $7,%ebp - addl %edx,%ecx - addl 36(%rsp),%ebx - xorl %ebp,%edi - movl %ecx,%esi - roll $5,%ecx - addl %edi,%ebx - xorl %ebp,%esi - rorl $7,%edx - addl %ecx,%ebx - addl 40(%rsp),%eax - xorl %edx,%esi - movl %ebx,%edi - roll $5,%ebx - addl %esi,%eax - xorl %edx,%edi - rorl $7,%ecx - addl %ebx,%eax - addl 44(%rsp),%ebp - xorl %ecx,%edi - movl %eax,%esi - roll $5,%eax - addl %edi,%ebp - xorl %ecx,%esi - rorl $7,%ebx - addl %eax,%ebp - addl 48(%rsp),%edx - xorl %ebx,%esi - movl %ebp,%edi - roll $5,%ebp - addl %esi,%edx - xorl %ebx,%edi - rorl $7,%eax - addl %ebp,%edx - addl 52(%rsp),%ecx - xorl %eax,%edi - movl %edx,%esi - roll $5,%edx - addl %edi,%ecx - xorl %eax,%esi - rorl $7,%ebp - addl %edx,%ecx - addl 56(%rsp),%ebx - xorl %ebp,%esi - movl %ecx,%edi - roll $5,%ecx - addl %esi,%ebx - xorl %ebp,%edi - rorl $7,%edx - addl %ecx,%ebx - addl 60(%rsp),%eax - xorl %edx,%edi - movl %ebx,%esi - roll $5,%ebx - addl %edi,%eax - rorl $7,%ecx - addl %ebx,%eax - addl 0(%r8),%eax - addl 4(%r8),%esi - addl 8(%r8),%ecx - movl %eax,0(%r8) - addl 12(%r8),%edx - movl %esi,4(%r8) - addl 16(%r8),%ebp - movl %ecx,8(%r8) - movl %edx,12(%r8) - movl %ebp,16(%r8) - leaq (%r14),%rsi - movq -40(%rsi),%r14 - movq -32(%rsi),%r13 - movq -24(%rsi),%r12 - movq -16(%rsi),%rbp - movq -8(%rsi),%rbx - leaq (%rsi),%rsp -L$epilogue_ssse3: - .byte 0xf3,0xc3 - -.p2align 6 -K_XX_XX: -.long 0x5a827999,0x5a827999,0x5a827999,0x5a827999 -.long 0x5a827999,0x5a827999,0x5a827999,0x5a827999 -.long 0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1 -.long 0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1 -.long 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc -.long 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc -.long 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6 -.long 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6 -.long 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f -.long 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f -.byte 0xf,0xe,0xd,0xc,0xb,0xa,0x9,0x8,0x7,0x6,0x5,0x4,0x3,0x2,0x1,0x0 -.byte 83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -.p2align 6 -#endif diff --git a/third_party/boringssl/mac-x86_64/crypto/sha/sha256-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/sha/sha256-x86_64.S deleted file mode 100644 index da02d4c2dc952..0000000000000 --- a/third_party/boringssl/mac-x86_64/crypto/sha/sha256-x86_64.S +++ /dev/null @@ -1,2843 +0,0 @@ -#if defined(__x86_64__) -.text - - -.globl _sha256_block_data_order -.private_extern _sha256_block_data_order - -.p2align 4 -_sha256_block_data_order: - leaq _OPENSSL_ia32cap_P(%rip),%r11 - movl 0(%r11),%r9d - movl 4(%r11),%r10d - movl 8(%r11),%r11d - testl $512,%r10d - jnz L$ssse3_shortcut - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - movq %rsp,%r11 - shlq $4,%rdx - subq $64+32,%rsp - leaq (%rsi,%rdx,4),%rdx - andq $-64,%rsp - movq %rdi,64+0(%rsp) - movq %rsi,64+8(%rsp) - movq %rdx,64+16(%rsp) - movq %r11,64+24(%rsp) -L$prologue: - - movl 0(%rdi),%eax - movl 4(%rdi),%ebx - movl 8(%rdi),%ecx - movl 12(%rdi),%edx - movl 16(%rdi),%r8d - movl 20(%rdi),%r9d - movl 24(%rdi),%r10d - movl 28(%rdi),%r11d - jmp L$loop - -.p2align 4 -L$loop: - movl %ebx,%edi - leaq K256(%rip),%rbp - xorl %ecx,%edi - movl 0(%rsi),%r12d - movl %r8d,%r13d - movl %eax,%r14d - bswapl %r12d - rorl $14,%r13d - movl %r9d,%r15d - - xorl %r8d,%r13d - rorl $9,%r14d - xorl %r10d,%r15d - - movl %r12d,0(%rsp) - xorl %eax,%r14d - andl %r8d,%r15d - - rorl $5,%r13d - addl %r11d,%r12d - xorl %r10d,%r15d - - rorl $11,%r14d - xorl %r8d,%r13d - addl %r15d,%r12d - - movl %eax,%r15d - addl (%rbp),%r12d - xorl %eax,%r14d - - xorl %ebx,%r15d - rorl $6,%r13d - movl %ebx,%r11d - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%r11d - addl %r12d,%edx - addl %r12d,%r11d - - leaq 4(%rbp),%rbp - addl %r14d,%r11d - movl 4(%rsi),%r12d - movl %edx,%r13d - movl %r11d,%r14d - bswapl %r12d - rorl $14,%r13d - movl %r8d,%edi - - xorl %edx,%r13d - rorl $9,%r14d - xorl %r9d,%edi - - movl %r12d,4(%rsp) - xorl %r11d,%r14d - andl %edx,%edi - - rorl $5,%r13d - addl %r10d,%r12d - xorl %r9d,%edi - - rorl $11,%r14d - xorl %edx,%r13d - addl %edi,%r12d - - movl %r11d,%edi - addl (%rbp),%r12d - xorl %r11d,%r14d - - xorl %eax,%edi - rorl $6,%r13d - movl %eax,%r10d - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%r10d - addl %r12d,%ecx - addl %r12d,%r10d - - leaq 4(%rbp),%rbp - addl %r14d,%r10d - movl 8(%rsi),%r12d - movl %ecx,%r13d - movl %r10d,%r14d - bswapl %r12d - rorl $14,%r13d - movl %edx,%r15d - - xorl %ecx,%r13d - rorl $9,%r14d - xorl %r8d,%r15d - - movl %r12d,8(%rsp) - xorl %r10d,%r14d - andl %ecx,%r15d - - rorl $5,%r13d - addl %r9d,%r12d - xorl %r8d,%r15d - - rorl $11,%r14d - xorl %ecx,%r13d - addl %r15d,%r12d - - movl %r10d,%r15d - addl (%rbp),%r12d - xorl %r10d,%r14d - - xorl %r11d,%r15d - rorl $6,%r13d - movl %r11d,%r9d - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%r9d - addl %r12d,%ebx - addl %r12d,%r9d - - leaq 4(%rbp),%rbp - addl %r14d,%r9d - movl 12(%rsi),%r12d - movl %ebx,%r13d - movl %r9d,%r14d - bswapl %r12d - rorl $14,%r13d - movl %ecx,%edi - - xorl %ebx,%r13d - rorl $9,%r14d - xorl %edx,%edi - - movl %r12d,12(%rsp) - xorl %r9d,%r14d - andl %ebx,%edi - - rorl $5,%r13d - addl %r8d,%r12d - xorl %edx,%edi - - rorl $11,%r14d - xorl %ebx,%r13d - addl %edi,%r12d - - movl %r9d,%edi - addl (%rbp),%r12d - xorl %r9d,%r14d - - xorl %r10d,%edi - rorl $6,%r13d - movl %r10d,%r8d - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%r8d - addl %r12d,%eax - addl %r12d,%r8d - - leaq 20(%rbp),%rbp - addl %r14d,%r8d - movl 16(%rsi),%r12d - movl %eax,%r13d - movl %r8d,%r14d - bswapl %r12d - rorl $14,%r13d - movl %ebx,%r15d - - xorl %eax,%r13d - rorl $9,%r14d - xorl %ecx,%r15d - - movl %r12d,16(%rsp) - xorl %r8d,%r14d - andl %eax,%r15d - - rorl $5,%r13d - addl %edx,%r12d - xorl %ecx,%r15d - - rorl $11,%r14d - xorl %eax,%r13d - addl %r15d,%r12d - - movl %r8d,%r15d - addl (%rbp),%r12d - xorl %r8d,%r14d - - xorl %r9d,%r15d - rorl $6,%r13d - movl %r9d,%edx - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%edx - addl %r12d,%r11d - addl %r12d,%edx - - leaq 4(%rbp),%rbp - addl %r14d,%edx - movl 20(%rsi),%r12d - movl %r11d,%r13d - movl %edx,%r14d - bswapl %r12d - rorl $14,%r13d - movl %eax,%edi - - xorl %r11d,%r13d - rorl $9,%r14d - xorl %ebx,%edi - - movl %r12d,20(%rsp) - xorl %edx,%r14d - andl %r11d,%edi - - rorl $5,%r13d - addl %ecx,%r12d - xorl %ebx,%edi - - rorl $11,%r14d - xorl %r11d,%r13d - addl %edi,%r12d - - movl %edx,%edi - addl (%rbp),%r12d - xorl %edx,%r14d - - xorl %r8d,%edi - rorl $6,%r13d - movl %r8d,%ecx - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%ecx - addl %r12d,%r10d - addl %r12d,%ecx - - leaq 4(%rbp),%rbp - addl %r14d,%ecx - movl 24(%rsi),%r12d - movl %r10d,%r13d - movl %ecx,%r14d - bswapl %r12d - rorl $14,%r13d - movl %r11d,%r15d - - xorl %r10d,%r13d - rorl $9,%r14d - xorl %eax,%r15d - - movl %r12d,24(%rsp) - xorl %ecx,%r14d - andl %r10d,%r15d - - rorl $5,%r13d - addl %ebx,%r12d - xorl %eax,%r15d - - rorl $11,%r14d - xorl %r10d,%r13d - addl %r15d,%r12d - - movl %ecx,%r15d - addl (%rbp),%r12d - xorl %ecx,%r14d - - xorl %edx,%r15d - rorl $6,%r13d - movl %edx,%ebx - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%ebx - addl %r12d,%r9d - addl %r12d,%ebx - - leaq 4(%rbp),%rbp - addl %r14d,%ebx - movl 28(%rsi),%r12d - movl %r9d,%r13d - movl %ebx,%r14d - bswapl %r12d - rorl $14,%r13d - movl %r10d,%edi - - xorl %r9d,%r13d - rorl $9,%r14d - xorl %r11d,%edi - - movl %r12d,28(%rsp) - xorl %ebx,%r14d - andl %r9d,%edi - - rorl $5,%r13d - addl %eax,%r12d - xorl %r11d,%edi - - rorl $11,%r14d - xorl %r9d,%r13d - addl %edi,%r12d - - movl %ebx,%edi - addl (%rbp),%r12d - xorl %ebx,%r14d - - xorl %ecx,%edi - rorl $6,%r13d - movl %ecx,%eax - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%eax - addl %r12d,%r8d - addl %r12d,%eax - - leaq 20(%rbp),%rbp - addl %r14d,%eax - movl 32(%rsi),%r12d - movl %r8d,%r13d - movl %eax,%r14d - bswapl %r12d - rorl $14,%r13d - movl %r9d,%r15d - - xorl %r8d,%r13d - rorl $9,%r14d - xorl %r10d,%r15d - - movl %r12d,32(%rsp) - xorl %eax,%r14d - andl %r8d,%r15d - - rorl $5,%r13d - addl %r11d,%r12d - xorl %r10d,%r15d - - rorl $11,%r14d - xorl %r8d,%r13d - addl %r15d,%r12d - - movl %eax,%r15d - addl (%rbp),%r12d - xorl %eax,%r14d - - xorl %ebx,%r15d - rorl $6,%r13d - movl %ebx,%r11d - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%r11d - addl %r12d,%edx - addl %r12d,%r11d - - leaq 4(%rbp),%rbp - addl %r14d,%r11d - movl 36(%rsi),%r12d - movl %edx,%r13d - movl %r11d,%r14d - bswapl %r12d - rorl $14,%r13d - movl %r8d,%edi - - xorl %edx,%r13d - rorl $9,%r14d - xorl %r9d,%edi - - movl %r12d,36(%rsp) - xorl %r11d,%r14d - andl %edx,%edi - - rorl $5,%r13d - addl %r10d,%r12d - xorl %r9d,%edi - - rorl $11,%r14d - xorl %edx,%r13d - addl %edi,%r12d - - movl %r11d,%edi - addl (%rbp),%r12d - xorl %r11d,%r14d - - xorl %eax,%edi - rorl $6,%r13d - movl %eax,%r10d - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%r10d - addl %r12d,%ecx - addl %r12d,%r10d - - leaq 4(%rbp),%rbp - addl %r14d,%r10d - movl 40(%rsi),%r12d - movl %ecx,%r13d - movl %r10d,%r14d - bswapl %r12d - rorl $14,%r13d - movl %edx,%r15d - - xorl %ecx,%r13d - rorl $9,%r14d - xorl %r8d,%r15d - - movl %r12d,40(%rsp) - xorl %r10d,%r14d - andl %ecx,%r15d - - rorl $5,%r13d - addl %r9d,%r12d - xorl %r8d,%r15d - - rorl $11,%r14d - xorl %ecx,%r13d - addl %r15d,%r12d - - movl %r10d,%r15d - addl (%rbp),%r12d - xorl %r10d,%r14d - - xorl %r11d,%r15d - rorl $6,%r13d - movl %r11d,%r9d - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%r9d - addl %r12d,%ebx - addl %r12d,%r9d - - leaq 4(%rbp),%rbp - addl %r14d,%r9d - movl 44(%rsi),%r12d - movl %ebx,%r13d - movl %r9d,%r14d - bswapl %r12d - rorl $14,%r13d - movl %ecx,%edi - - xorl %ebx,%r13d - rorl $9,%r14d - xorl %edx,%edi - - movl %r12d,44(%rsp) - xorl %r9d,%r14d - andl %ebx,%edi - - rorl $5,%r13d - addl %r8d,%r12d - xorl %edx,%edi - - rorl $11,%r14d - xorl %ebx,%r13d - addl %edi,%r12d - - movl %r9d,%edi - addl (%rbp),%r12d - xorl %r9d,%r14d - - xorl %r10d,%edi - rorl $6,%r13d - movl %r10d,%r8d - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%r8d - addl %r12d,%eax - addl %r12d,%r8d - - leaq 20(%rbp),%rbp - addl %r14d,%r8d - movl 48(%rsi),%r12d - movl %eax,%r13d - movl %r8d,%r14d - bswapl %r12d - rorl $14,%r13d - movl %ebx,%r15d - - xorl %eax,%r13d - rorl $9,%r14d - xorl %ecx,%r15d - - movl %r12d,48(%rsp) - xorl %r8d,%r14d - andl %eax,%r15d - - rorl $5,%r13d - addl %edx,%r12d - xorl %ecx,%r15d - - rorl $11,%r14d - xorl %eax,%r13d - addl %r15d,%r12d - - movl %r8d,%r15d - addl (%rbp),%r12d - xorl %r8d,%r14d - - xorl %r9d,%r15d - rorl $6,%r13d - movl %r9d,%edx - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%edx - addl %r12d,%r11d - addl %r12d,%edx - - leaq 4(%rbp),%rbp - addl %r14d,%edx - movl 52(%rsi),%r12d - movl %r11d,%r13d - movl %edx,%r14d - bswapl %r12d - rorl $14,%r13d - movl %eax,%edi - - xorl %r11d,%r13d - rorl $9,%r14d - xorl %ebx,%edi - - movl %r12d,52(%rsp) - xorl %edx,%r14d - andl %r11d,%edi - - rorl $5,%r13d - addl %ecx,%r12d - xorl %ebx,%edi - - rorl $11,%r14d - xorl %r11d,%r13d - addl %edi,%r12d - - movl %edx,%edi - addl (%rbp),%r12d - xorl %edx,%r14d - - xorl %r8d,%edi - rorl $6,%r13d - movl %r8d,%ecx - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%ecx - addl %r12d,%r10d - addl %r12d,%ecx - - leaq 4(%rbp),%rbp - addl %r14d,%ecx - movl 56(%rsi),%r12d - movl %r10d,%r13d - movl %ecx,%r14d - bswapl %r12d - rorl $14,%r13d - movl %r11d,%r15d - - xorl %r10d,%r13d - rorl $9,%r14d - xorl %eax,%r15d - - movl %r12d,56(%rsp) - xorl %ecx,%r14d - andl %r10d,%r15d - - rorl $5,%r13d - addl %ebx,%r12d - xorl %eax,%r15d - - rorl $11,%r14d - xorl %r10d,%r13d - addl %r15d,%r12d - - movl %ecx,%r15d - addl (%rbp),%r12d - xorl %ecx,%r14d - - xorl %edx,%r15d - rorl $6,%r13d - movl %edx,%ebx - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%ebx - addl %r12d,%r9d - addl %r12d,%ebx - - leaq 4(%rbp),%rbp - addl %r14d,%ebx - movl 60(%rsi),%r12d - movl %r9d,%r13d - movl %ebx,%r14d - bswapl %r12d - rorl $14,%r13d - movl %r10d,%edi - - xorl %r9d,%r13d - rorl $9,%r14d - xorl %r11d,%edi - - movl %r12d,60(%rsp) - xorl %ebx,%r14d - andl %r9d,%edi - - rorl $5,%r13d - addl %eax,%r12d - xorl %r11d,%edi - - rorl $11,%r14d - xorl %r9d,%r13d - addl %edi,%r12d - - movl %ebx,%edi - addl (%rbp),%r12d - xorl %ebx,%r14d - - xorl %ecx,%edi - rorl $6,%r13d - movl %ecx,%eax - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%eax - addl %r12d,%r8d - addl %r12d,%eax - - leaq 20(%rbp),%rbp - jmp L$rounds_16_xx -.p2align 4 -L$rounds_16_xx: - movl 4(%rsp),%r13d - movl 56(%rsp),%r15d - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%eax - movl %r15d,%r14d - rorl $2,%r15d - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%r15d - shrl $10,%r14d - - rorl $17,%r15d - xorl %r13d,%r12d - xorl %r14d,%r15d - addl 36(%rsp),%r12d - - addl 0(%rsp),%r12d - movl %r8d,%r13d - addl %r15d,%r12d - movl %eax,%r14d - rorl $14,%r13d - movl %r9d,%r15d - - xorl %r8d,%r13d - rorl $9,%r14d - xorl %r10d,%r15d - - movl %r12d,0(%rsp) - xorl %eax,%r14d - andl %r8d,%r15d - - rorl $5,%r13d - addl %r11d,%r12d - xorl %r10d,%r15d - - rorl $11,%r14d - xorl %r8d,%r13d - addl %r15d,%r12d - - movl %eax,%r15d - addl (%rbp),%r12d - xorl %eax,%r14d - - xorl %ebx,%r15d - rorl $6,%r13d - movl %ebx,%r11d - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%r11d - addl %r12d,%edx - addl %r12d,%r11d - - leaq 4(%rbp),%rbp - movl 8(%rsp),%r13d - movl 60(%rsp),%edi - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%r11d - movl %edi,%r14d - rorl $2,%edi - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%edi - shrl $10,%r14d - - rorl $17,%edi - xorl %r13d,%r12d - xorl %r14d,%edi - addl 40(%rsp),%r12d - - addl 4(%rsp),%r12d - movl %edx,%r13d - addl %edi,%r12d - movl %r11d,%r14d - rorl $14,%r13d - movl %r8d,%edi - - xorl %edx,%r13d - rorl $9,%r14d - xorl %r9d,%edi - - movl %r12d,4(%rsp) - xorl %r11d,%r14d - andl %edx,%edi - - rorl $5,%r13d - addl %r10d,%r12d - xorl %r9d,%edi - - rorl $11,%r14d - xorl %edx,%r13d - addl %edi,%r12d - - movl %r11d,%edi - addl (%rbp),%r12d - xorl %r11d,%r14d - - xorl %eax,%edi - rorl $6,%r13d - movl %eax,%r10d - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%r10d - addl %r12d,%ecx - addl %r12d,%r10d - - leaq 4(%rbp),%rbp - movl 12(%rsp),%r13d - movl 0(%rsp),%r15d - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%r10d - movl %r15d,%r14d - rorl $2,%r15d - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%r15d - shrl $10,%r14d - - rorl $17,%r15d - xorl %r13d,%r12d - xorl %r14d,%r15d - addl 44(%rsp),%r12d - - addl 8(%rsp),%r12d - movl %ecx,%r13d - addl %r15d,%r12d - movl %r10d,%r14d - rorl $14,%r13d - movl %edx,%r15d - - xorl %ecx,%r13d - rorl $9,%r14d - xorl %r8d,%r15d - - movl %r12d,8(%rsp) - xorl %r10d,%r14d - andl %ecx,%r15d - - rorl $5,%r13d - addl %r9d,%r12d - xorl %r8d,%r15d - - rorl $11,%r14d - xorl %ecx,%r13d - addl %r15d,%r12d - - movl %r10d,%r15d - addl (%rbp),%r12d - xorl %r10d,%r14d - - xorl %r11d,%r15d - rorl $6,%r13d - movl %r11d,%r9d - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%r9d - addl %r12d,%ebx - addl %r12d,%r9d - - leaq 4(%rbp),%rbp - movl 16(%rsp),%r13d - movl 4(%rsp),%edi - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%r9d - movl %edi,%r14d - rorl $2,%edi - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%edi - shrl $10,%r14d - - rorl $17,%edi - xorl %r13d,%r12d - xorl %r14d,%edi - addl 48(%rsp),%r12d - - addl 12(%rsp),%r12d - movl %ebx,%r13d - addl %edi,%r12d - movl %r9d,%r14d - rorl $14,%r13d - movl %ecx,%edi - - xorl %ebx,%r13d - rorl $9,%r14d - xorl %edx,%edi - - movl %r12d,12(%rsp) - xorl %r9d,%r14d - andl %ebx,%edi - - rorl $5,%r13d - addl %r8d,%r12d - xorl %edx,%edi - - rorl $11,%r14d - xorl %ebx,%r13d - addl %edi,%r12d - - movl %r9d,%edi - addl (%rbp),%r12d - xorl %r9d,%r14d - - xorl %r10d,%edi - rorl $6,%r13d - movl %r10d,%r8d - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%r8d - addl %r12d,%eax - addl %r12d,%r8d - - leaq 20(%rbp),%rbp - movl 20(%rsp),%r13d - movl 8(%rsp),%r15d - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%r8d - movl %r15d,%r14d - rorl $2,%r15d - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%r15d - shrl $10,%r14d - - rorl $17,%r15d - xorl %r13d,%r12d - xorl %r14d,%r15d - addl 52(%rsp),%r12d - - addl 16(%rsp),%r12d - movl %eax,%r13d - addl %r15d,%r12d - movl %r8d,%r14d - rorl $14,%r13d - movl %ebx,%r15d - - xorl %eax,%r13d - rorl $9,%r14d - xorl %ecx,%r15d - - movl %r12d,16(%rsp) - xorl %r8d,%r14d - andl %eax,%r15d - - rorl $5,%r13d - addl %edx,%r12d - xorl %ecx,%r15d - - rorl $11,%r14d - xorl %eax,%r13d - addl %r15d,%r12d - - movl %r8d,%r15d - addl (%rbp),%r12d - xorl %r8d,%r14d - - xorl %r9d,%r15d - rorl $6,%r13d - movl %r9d,%edx - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%edx - addl %r12d,%r11d - addl %r12d,%edx - - leaq 4(%rbp),%rbp - movl 24(%rsp),%r13d - movl 12(%rsp),%edi - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%edx - movl %edi,%r14d - rorl $2,%edi - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%edi - shrl $10,%r14d - - rorl $17,%edi - xorl %r13d,%r12d - xorl %r14d,%edi - addl 56(%rsp),%r12d - - addl 20(%rsp),%r12d - movl %r11d,%r13d - addl %edi,%r12d - movl %edx,%r14d - rorl $14,%r13d - movl %eax,%edi - - xorl %r11d,%r13d - rorl $9,%r14d - xorl %ebx,%edi - - movl %r12d,20(%rsp) - xorl %edx,%r14d - andl %r11d,%edi - - rorl $5,%r13d - addl %ecx,%r12d - xorl %ebx,%edi - - rorl $11,%r14d - xorl %r11d,%r13d - addl %edi,%r12d - - movl %edx,%edi - addl (%rbp),%r12d - xorl %edx,%r14d - - xorl %r8d,%edi - rorl $6,%r13d - movl %r8d,%ecx - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%ecx - addl %r12d,%r10d - addl %r12d,%ecx - - leaq 4(%rbp),%rbp - movl 28(%rsp),%r13d - movl 16(%rsp),%r15d - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%ecx - movl %r15d,%r14d - rorl $2,%r15d - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%r15d - shrl $10,%r14d - - rorl $17,%r15d - xorl %r13d,%r12d - xorl %r14d,%r15d - addl 60(%rsp),%r12d - - addl 24(%rsp),%r12d - movl %r10d,%r13d - addl %r15d,%r12d - movl %ecx,%r14d - rorl $14,%r13d - movl %r11d,%r15d - - xorl %r10d,%r13d - rorl $9,%r14d - xorl %eax,%r15d - - movl %r12d,24(%rsp) - xorl %ecx,%r14d - andl %r10d,%r15d - - rorl $5,%r13d - addl %ebx,%r12d - xorl %eax,%r15d - - rorl $11,%r14d - xorl %r10d,%r13d - addl %r15d,%r12d - - movl %ecx,%r15d - addl (%rbp),%r12d - xorl %ecx,%r14d - - xorl %edx,%r15d - rorl $6,%r13d - movl %edx,%ebx - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%ebx - addl %r12d,%r9d - addl %r12d,%ebx - - leaq 4(%rbp),%rbp - movl 32(%rsp),%r13d - movl 20(%rsp),%edi - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%ebx - movl %edi,%r14d - rorl $2,%edi - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%edi - shrl $10,%r14d - - rorl $17,%edi - xorl %r13d,%r12d - xorl %r14d,%edi - addl 0(%rsp),%r12d - - addl 28(%rsp),%r12d - movl %r9d,%r13d - addl %edi,%r12d - movl %ebx,%r14d - rorl $14,%r13d - movl %r10d,%edi - - xorl %r9d,%r13d - rorl $9,%r14d - xorl %r11d,%edi - - movl %r12d,28(%rsp) - xorl %ebx,%r14d - andl %r9d,%edi - - rorl $5,%r13d - addl %eax,%r12d - xorl %r11d,%edi - - rorl $11,%r14d - xorl %r9d,%r13d - addl %edi,%r12d - - movl %ebx,%edi - addl (%rbp),%r12d - xorl %ebx,%r14d - - xorl %ecx,%edi - rorl $6,%r13d - movl %ecx,%eax - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%eax - addl %r12d,%r8d - addl %r12d,%eax - - leaq 20(%rbp),%rbp - movl 36(%rsp),%r13d - movl 24(%rsp),%r15d - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%eax - movl %r15d,%r14d - rorl $2,%r15d - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%r15d - shrl $10,%r14d - - rorl $17,%r15d - xorl %r13d,%r12d - xorl %r14d,%r15d - addl 4(%rsp),%r12d - - addl 32(%rsp),%r12d - movl %r8d,%r13d - addl %r15d,%r12d - movl %eax,%r14d - rorl $14,%r13d - movl %r9d,%r15d - - xorl %r8d,%r13d - rorl $9,%r14d - xorl %r10d,%r15d - - movl %r12d,32(%rsp) - xorl %eax,%r14d - andl %r8d,%r15d - - rorl $5,%r13d - addl %r11d,%r12d - xorl %r10d,%r15d - - rorl $11,%r14d - xorl %r8d,%r13d - addl %r15d,%r12d - - movl %eax,%r15d - addl (%rbp),%r12d - xorl %eax,%r14d - - xorl %ebx,%r15d - rorl $6,%r13d - movl %ebx,%r11d - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%r11d - addl %r12d,%edx - addl %r12d,%r11d - - leaq 4(%rbp),%rbp - movl 40(%rsp),%r13d - movl 28(%rsp),%edi - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%r11d - movl %edi,%r14d - rorl $2,%edi - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%edi - shrl $10,%r14d - - rorl $17,%edi - xorl %r13d,%r12d - xorl %r14d,%edi - addl 8(%rsp),%r12d - - addl 36(%rsp),%r12d - movl %edx,%r13d - addl %edi,%r12d - movl %r11d,%r14d - rorl $14,%r13d - movl %r8d,%edi - - xorl %edx,%r13d - rorl $9,%r14d - xorl %r9d,%edi - - movl %r12d,36(%rsp) - xorl %r11d,%r14d - andl %edx,%edi - - rorl $5,%r13d - addl %r10d,%r12d - xorl %r9d,%edi - - rorl $11,%r14d - xorl %edx,%r13d - addl %edi,%r12d - - movl %r11d,%edi - addl (%rbp),%r12d - xorl %r11d,%r14d - - xorl %eax,%edi - rorl $6,%r13d - movl %eax,%r10d - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%r10d - addl %r12d,%ecx - addl %r12d,%r10d - - leaq 4(%rbp),%rbp - movl 44(%rsp),%r13d - movl 32(%rsp),%r15d - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%r10d - movl %r15d,%r14d - rorl $2,%r15d - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%r15d - shrl $10,%r14d - - rorl $17,%r15d - xorl %r13d,%r12d - xorl %r14d,%r15d - addl 12(%rsp),%r12d - - addl 40(%rsp),%r12d - movl %ecx,%r13d - addl %r15d,%r12d - movl %r10d,%r14d - rorl $14,%r13d - movl %edx,%r15d - - xorl %ecx,%r13d - rorl $9,%r14d - xorl %r8d,%r15d - - movl %r12d,40(%rsp) - xorl %r10d,%r14d - andl %ecx,%r15d - - rorl $5,%r13d - addl %r9d,%r12d - xorl %r8d,%r15d - - rorl $11,%r14d - xorl %ecx,%r13d - addl %r15d,%r12d - - movl %r10d,%r15d - addl (%rbp),%r12d - xorl %r10d,%r14d - - xorl %r11d,%r15d - rorl $6,%r13d - movl %r11d,%r9d - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%r9d - addl %r12d,%ebx - addl %r12d,%r9d - - leaq 4(%rbp),%rbp - movl 48(%rsp),%r13d - movl 36(%rsp),%edi - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%r9d - movl %edi,%r14d - rorl $2,%edi - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%edi - shrl $10,%r14d - - rorl $17,%edi - xorl %r13d,%r12d - xorl %r14d,%edi - addl 16(%rsp),%r12d - - addl 44(%rsp),%r12d - movl %ebx,%r13d - addl %edi,%r12d - movl %r9d,%r14d - rorl $14,%r13d - movl %ecx,%edi - - xorl %ebx,%r13d - rorl $9,%r14d - xorl %edx,%edi - - movl %r12d,44(%rsp) - xorl %r9d,%r14d - andl %ebx,%edi - - rorl $5,%r13d - addl %r8d,%r12d - xorl %edx,%edi - - rorl $11,%r14d - xorl %ebx,%r13d - addl %edi,%r12d - - movl %r9d,%edi - addl (%rbp),%r12d - xorl %r9d,%r14d - - xorl %r10d,%edi - rorl $6,%r13d - movl %r10d,%r8d - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%r8d - addl %r12d,%eax - addl %r12d,%r8d - - leaq 20(%rbp),%rbp - movl 52(%rsp),%r13d - movl 40(%rsp),%r15d - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%r8d - movl %r15d,%r14d - rorl $2,%r15d - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%r15d - shrl $10,%r14d - - rorl $17,%r15d - xorl %r13d,%r12d - xorl %r14d,%r15d - addl 20(%rsp),%r12d - - addl 48(%rsp),%r12d - movl %eax,%r13d - addl %r15d,%r12d - movl %r8d,%r14d - rorl $14,%r13d - movl %ebx,%r15d - - xorl %eax,%r13d - rorl $9,%r14d - xorl %ecx,%r15d - - movl %r12d,48(%rsp) - xorl %r8d,%r14d - andl %eax,%r15d - - rorl $5,%r13d - addl %edx,%r12d - xorl %ecx,%r15d - - rorl $11,%r14d - xorl %eax,%r13d - addl %r15d,%r12d - - movl %r8d,%r15d - addl (%rbp),%r12d - xorl %r8d,%r14d - - xorl %r9d,%r15d - rorl $6,%r13d - movl %r9d,%edx - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%edx - addl %r12d,%r11d - addl %r12d,%edx - - leaq 4(%rbp),%rbp - movl 56(%rsp),%r13d - movl 44(%rsp),%edi - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%edx - movl %edi,%r14d - rorl $2,%edi - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%edi - shrl $10,%r14d - - rorl $17,%edi - xorl %r13d,%r12d - xorl %r14d,%edi - addl 24(%rsp),%r12d - - addl 52(%rsp),%r12d - movl %r11d,%r13d - addl %edi,%r12d - movl %edx,%r14d - rorl $14,%r13d - movl %eax,%edi - - xorl %r11d,%r13d - rorl $9,%r14d - xorl %ebx,%edi - - movl %r12d,52(%rsp) - xorl %edx,%r14d - andl %r11d,%edi - - rorl $5,%r13d - addl %ecx,%r12d - xorl %ebx,%edi - - rorl $11,%r14d - xorl %r11d,%r13d - addl %edi,%r12d - - movl %edx,%edi - addl (%rbp),%r12d - xorl %edx,%r14d - - xorl %r8d,%edi - rorl $6,%r13d - movl %r8d,%ecx - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%ecx - addl %r12d,%r10d - addl %r12d,%ecx - - leaq 4(%rbp),%rbp - movl 60(%rsp),%r13d - movl 48(%rsp),%r15d - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%ecx - movl %r15d,%r14d - rorl $2,%r15d - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%r15d - shrl $10,%r14d - - rorl $17,%r15d - xorl %r13d,%r12d - xorl %r14d,%r15d - addl 28(%rsp),%r12d - - addl 56(%rsp),%r12d - movl %r10d,%r13d - addl %r15d,%r12d - movl %ecx,%r14d - rorl $14,%r13d - movl %r11d,%r15d - - xorl %r10d,%r13d - rorl $9,%r14d - xorl %eax,%r15d - - movl %r12d,56(%rsp) - xorl %ecx,%r14d - andl %r10d,%r15d - - rorl $5,%r13d - addl %ebx,%r12d - xorl %eax,%r15d - - rorl $11,%r14d - xorl %r10d,%r13d - addl %r15d,%r12d - - movl %ecx,%r15d - addl (%rbp),%r12d - xorl %ecx,%r14d - - xorl %edx,%r15d - rorl $6,%r13d - movl %edx,%ebx - - andl %r15d,%edi - rorl $2,%r14d - addl %r13d,%r12d - - xorl %edi,%ebx - addl %r12d,%r9d - addl %r12d,%ebx - - leaq 4(%rbp),%rbp - movl 0(%rsp),%r13d - movl 52(%rsp),%edi - - movl %r13d,%r12d - rorl $11,%r13d - addl %r14d,%ebx - movl %edi,%r14d - rorl $2,%edi - - xorl %r12d,%r13d - shrl $3,%r12d - rorl $7,%r13d - xorl %r14d,%edi - shrl $10,%r14d - - rorl $17,%edi - xorl %r13d,%r12d - xorl %r14d,%edi - addl 32(%rsp),%r12d - - addl 60(%rsp),%r12d - movl %r9d,%r13d - addl %edi,%r12d - movl %ebx,%r14d - rorl $14,%r13d - movl %r10d,%edi - - xorl %r9d,%r13d - rorl $9,%r14d - xorl %r11d,%edi - - movl %r12d,60(%rsp) - xorl %ebx,%r14d - andl %r9d,%edi - - rorl $5,%r13d - addl %eax,%r12d - xorl %r11d,%edi - - rorl $11,%r14d - xorl %r9d,%r13d - addl %edi,%r12d - - movl %ebx,%edi - addl (%rbp),%r12d - xorl %ebx,%r14d - - xorl %ecx,%edi - rorl $6,%r13d - movl %ecx,%eax - - andl %edi,%r15d - rorl $2,%r14d - addl %r13d,%r12d - - xorl %r15d,%eax - addl %r12d,%r8d - addl %r12d,%eax - - leaq 20(%rbp),%rbp - cmpb $0,3(%rbp) - jnz L$rounds_16_xx - - movq 64+0(%rsp),%rdi - addl %r14d,%eax - leaq 64(%rsi),%rsi - - addl 0(%rdi),%eax - addl 4(%rdi),%ebx - addl 8(%rdi),%ecx - addl 12(%rdi),%edx - addl 16(%rdi),%r8d - addl 20(%rdi),%r9d - addl 24(%rdi),%r10d - addl 28(%rdi),%r11d - - cmpq 64+16(%rsp),%rsi - - movl %eax,0(%rdi) - movl %ebx,4(%rdi) - movl %ecx,8(%rdi) - movl %edx,12(%rdi) - movl %r8d,16(%rdi) - movl %r9d,20(%rdi) - movl %r10d,24(%rdi) - movl %r11d,28(%rdi) - jb L$loop - - movq 64+24(%rsp),%rsi - movq (%rsi),%r15 - movq 8(%rsi),%r14 - movq 16(%rsi),%r13 - movq 24(%rsi),%r12 - movq 32(%rsi),%rbp - movq 40(%rsi),%rbx - leaq 48(%rsi),%rsp -L$epilogue: - .byte 0xf3,0xc3 - -.p2align 6 - -K256: -.long 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5 -.long 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5 -.long 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5 -.long 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5 -.long 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3 -.long 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3 -.long 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174 -.long 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174 -.long 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc -.long 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc -.long 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da -.long 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da -.long 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7 -.long 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7 -.long 0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967 -.long 0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967 -.long 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13 -.long 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13 -.long 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85 -.long 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85 -.long 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3 -.long 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3 -.long 0xd192e819,0xd6990624,0xf40e3585,0x106aa070 -.long 0xd192e819,0xd6990624,0xf40e3585,0x106aa070 -.long 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5 -.long 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5 -.long 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3 -.long 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3 -.long 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208 -.long 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208 -.long 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2 -.long 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2 - -.long 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f -.long 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f -.long 0x03020100,0x0b0a0908,0xffffffff,0xffffffff -.long 0x03020100,0x0b0a0908,0xffffffff,0xffffffff -.long 0xffffffff,0xffffffff,0x03020100,0x0b0a0908 -.long 0xffffffff,0xffffffff,0x03020100,0x0b0a0908 -.byte 83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 - -.p2align 6 -sha256_block_data_order_ssse3: -L$ssse3_shortcut: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - movq %rsp,%r11 - shlq $4,%rdx - subq $96,%rsp - leaq (%rsi,%rdx,4),%rdx - andq $-64,%rsp - movq %rdi,64+0(%rsp) - movq %rsi,64+8(%rsp) - movq %rdx,64+16(%rsp) - movq %r11,64+24(%rsp) -L$prologue_ssse3: - - movl 0(%rdi),%eax - movl 4(%rdi),%ebx - movl 8(%rdi),%ecx - movl 12(%rdi),%edx - movl 16(%rdi),%r8d - movl 20(%rdi),%r9d - movl 24(%rdi),%r10d - movl 28(%rdi),%r11d - - - jmp L$loop_ssse3 -.p2align 4 -L$loop_ssse3: - movdqa K256+512(%rip),%xmm7 - movdqu 0(%rsi),%xmm0 - movdqu 16(%rsi),%xmm1 - movdqu 32(%rsi),%xmm2 -.byte 102,15,56,0,199 - movdqu 48(%rsi),%xmm3 - leaq K256(%rip),%rbp -.byte 102,15,56,0,207 - movdqa 0(%rbp),%xmm4 - movdqa 32(%rbp),%xmm5 -.byte 102,15,56,0,215 - paddd %xmm0,%xmm4 - movdqa 64(%rbp),%xmm6 -.byte 102,15,56,0,223 - movdqa 96(%rbp),%xmm7 - paddd %xmm1,%xmm5 - paddd %xmm2,%xmm6 - paddd %xmm3,%xmm7 - movdqa %xmm4,0(%rsp) - movl %eax,%r14d - movdqa %xmm5,16(%rsp) - movl %ebx,%edi - movdqa %xmm6,32(%rsp) - xorl %ecx,%edi - movdqa %xmm7,48(%rsp) - movl %r8d,%r13d - jmp L$ssse3_00_47 - -.p2align 4 -L$ssse3_00_47: - subq $-128,%rbp - rorl $14,%r13d - movdqa %xmm1,%xmm4 - movl %r14d,%eax - movl %r9d,%r12d - movdqa %xmm3,%xmm7 - rorl $9,%r14d - xorl %r8d,%r13d - xorl %r10d,%r12d - rorl $5,%r13d - xorl %eax,%r14d -.byte 102,15,58,15,224,4 - andl %r8d,%r12d - xorl %r8d,%r13d -.byte 102,15,58,15,250,4 - addl 0(%rsp),%r11d - movl %eax,%r15d - xorl %r10d,%r12d - rorl $11,%r14d - movdqa %xmm4,%xmm5 - xorl %ebx,%r15d - addl %r12d,%r11d - movdqa %xmm4,%xmm6 - rorl $6,%r13d - andl %r15d,%edi - psrld $3,%xmm4 - xorl %eax,%r14d - addl %r13d,%r11d - xorl %ebx,%edi - paddd %xmm7,%xmm0 - rorl $2,%r14d - addl %r11d,%edx - psrld $7,%xmm6 - addl %edi,%r11d - movl %edx,%r13d - pshufd $250,%xmm3,%xmm7 - addl %r11d,%r14d - rorl $14,%r13d - pslld $14,%xmm5 - movl %r14d,%r11d - movl %r8d,%r12d - pxor %xmm6,%xmm4 - rorl $9,%r14d - xorl %edx,%r13d - xorl %r9d,%r12d - rorl $5,%r13d - psrld $11,%xmm6 - xorl %r11d,%r14d - pxor %xmm5,%xmm4 - andl %edx,%r12d - xorl %edx,%r13d - pslld $11,%xmm5 - addl 4(%rsp),%r10d - movl %r11d,%edi - pxor %xmm6,%xmm4 - xorl %r9d,%r12d - rorl $11,%r14d - movdqa %xmm7,%xmm6 - xorl %eax,%edi - addl %r12d,%r10d - pxor %xmm5,%xmm4 - rorl $6,%r13d - andl %edi,%r15d - xorl %r11d,%r14d - psrld $10,%xmm7 - addl %r13d,%r10d - xorl %eax,%r15d - paddd %xmm4,%xmm0 - rorl $2,%r14d - addl %r10d,%ecx - psrlq $17,%xmm6 - addl %r15d,%r10d - movl %ecx,%r13d - addl %r10d,%r14d - pxor %xmm6,%xmm7 - rorl $14,%r13d - movl %r14d,%r10d - movl %edx,%r12d - rorl $9,%r14d - psrlq $2,%xmm6 - xorl %ecx,%r13d - xorl %r8d,%r12d - pxor %xmm6,%xmm7 - rorl $5,%r13d - xorl %r10d,%r14d - andl %ecx,%r12d - pshufd $128,%xmm7,%xmm7 - xorl %ecx,%r13d - addl 8(%rsp),%r9d - movl %r10d,%r15d - psrldq $8,%xmm7 - xorl %r8d,%r12d - rorl $11,%r14d - xorl %r11d,%r15d - addl %r12d,%r9d - rorl $6,%r13d - paddd %xmm7,%xmm0 - andl %r15d,%edi - xorl %r10d,%r14d - addl %r13d,%r9d - pshufd $80,%xmm0,%xmm7 - xorl %r11d,%edi - rorl $2,%r14d - addl %r9d,%ebx - movdqa %xmm7,%xmm6 - addl %edi,%r9d - movl %ebx,%r13d - psrld $10,%xmm7 - addl %r9d,%r14d - rorl $14,%r13d - psrlq $17,%xmm6 - movl %r14d,%r9d - movl %ecx,%r12d - pxor %xmm6,%xmm7 - rorl $9,%r14d - xorl %ebx,%r13d - xorl %edx,%r12d - rorl $5,%r13d - xorl %r9d,%r14d - psrlq $2,%xmm6 - andl %ebx,%r12d - xorl %ebx,%r13d - addl 12(%rsp),%r8d - pxor %xmm6,%xmm7 - movl %r9d,%edi - xorl %edx,%r12d - rorl $11,%r14d - pshufd $8,%xmm7,%xmm7 - xorl %r10d,%edi - addl %r12d,%r8d - movdqa 0(%rbp),%xmm6 - rorl $6,%r13d - andl %edi,%r15d - pslldq $8,%xmm7 - xorl %r9d,%r14d - addl %r13d,%r8d - xorl %r10d,%r15d - paddd %xmm7,%xmm0 - rorl $2,%r14d - addl %r8d,%eax - addl %r15d,%r8d - paddd %xmm0,%xmm6 - movl %eax,%r13d - addl %r8d,%r14d - movdqa %xmm6,0(%rsp) - rorl $14,%r13d - movdqa %xmm2,%xmm4 - movl %r14d,%r8d - movl %ebx,%r12d - movdqa %xmm0,%xmm7 - rorl $9,%r14d - xorl %eax,%r13d - xorl %ecx,%r12d - rorl $5,%r13d - xorl %r8d,%r14d -.byte 102,15,58,15,225,4 - andl %eax,%r12d - xorl %eax,%r13d -.byte 102,15,58,15,251,4 - addl 16(%rsp),%edx - movl %r8d,%r15d - xorl %ecx,%r12d - rorl $11,%r14d - movdqa %xmm4,%xmm5 - xorl %r9d,%r15d - addl %r12d,%edx - movdqa %xmm4,%xmm6 - rorl $6,%r13d - andl %r15d,%edi - psrld $3,%xmm4 - xorl %r8d,%r14d - addl %r13d,%edx - xorl %r9d,%edi - paddd %xmm7,%xmm1 - rorl $2,%r14d - addl %edx,%r11d - psrld $7,%xmm6 - addl %edi,%edx - movl %r11d,%r13d - pshufd $250,%xmm0,%xmm7 - addl %edx,%r14d - rorl $14,%r13d - pslld $14,%xmm5 - movl %r14d,%edx - movl %eax,%r12d - pxor %xmm6,%xmm4 - rorl $9,%r14d - xorl %r11d,%r13d - xorl %ebx,%r12d - rorl $5,%r13d - psrld $11,%xmm6 - xorl %edx,%r14d - pxor %xmm5,%xmm4 - andl %r11d,%r12d - xorl %r11d,%r13d - pslld $11,%xmm5 - addl 20(%rsp),%ecx - movl %edx,%edi - pxor %xmm6,%xmm4 - xorl %ebx,%r12d - rorl $11,%r14d - movdqa %xmm7,%xmm6 - xorl %r8d,%edi - addl %r12d,%ecx - pxor %xmm5,%xmm4 - rorl $6,%r13d - andl %edi,%r15d - xorl %edx,%r14d - psrld $10,%xmm7 - addl %r13d,%ecx - xorl %r8d,%r15d - paddd %xmm4,%xmm1 - rorl $2,%r14d - addl %ecx,%r10d - psrlq $17,%xmm6 - addl %r15d,%ecx - movl %r10d,%r13d - addl %ecx,%r14d - pxor %xmm6,%xmm7 - rorl $14,%r13d - movl %r14d,%ecx - movl %r11d,%r12d - rorl $9,%r14d - psrlq $2,%xmm6 - xorl %r10d,%r13d - xorl %eax,%r12d - pxor %xmm6,%xmm7 - rorl $5,%r13d - xorl %ecx,%r14d - andl %r10d,%r12d - pshufd $128,%xmm7,%xmm7 - xorl %r10d,%r13d - addl 24(%rsp),%ebx - movl %ecx,%r15d - psrldq $8,%xmm7 - xorl %eax,%r12d - rorl $11,%r14d - xorl %edx,%r15d - addl %r12d,%ebx - rorl $6,%r13d - paddd %xmm7,%xmm1 - andl %r15d,%edi - xorl %ecx,%r14d - addl %r13d,%ebx - pshufd $80,%xmm1,%xmm7 - xorl %edx,%edi - rorl $2,%r14d - addl %ebx,%r9d - movdqa %xmm7,%xmm6 - addl %edi,%ebx - movl %r9d,%r13d - psrld $10,%xmm7 - addl %ebx,%r14d - rorl $14,%r13d - psrlq $17,%xmm6 - movl %r14d,%ebx - movl %r10d,%r12d - pxor %xmm6,%xmm7 - rorl $9,%r14d - xorl %r9d,%r13d - xorl %r11d,%r12d - rorl $5,%r13d - xorl %ebx,%r14d - psrlq $2,%xmm6 - andl %r9d,%r12d - xorl %r9d,%r13d - addl 28(%rsp),%eax - pxor %xmm6,%xmm7 - movl %ebx,%edi - xorl %r11d,%r12d - rorl $11,%r14d - pshufd $8,%xmm7,%xmm7 - xorl %ecx,%edi - addl %r12d,%eax - movdqa 32(%rbp),%xmm6 - rorl $6,%r13d - andl %edi,%r15d - pslldq $8,%xmm7 - xorl %ebx,%r14d - addl %r13d,%eax - xorl %ecx,%r15d - paddd %xmm7,%xmm1 - rorl $2,%r14d - addl %eax,%r8d - addl %r15d,%eax - paddd %xmm1,%xmm6 - movl %r8d,%r13d - addl %eax,%r14d - movdqa %xmm6,16(%rsp) - rorl $14,%r13d - movdqa %xmm3,%xmm4 - movl %r14d,%eax - movl %r9d,%r12d - movdqa %xmm1,%xmm7 - rorl $9,%r14d - xorl %r8d,%r13d - xorl %r10d,%r12d - rorl $5,%r13d - xorl %eax,%r14d -.byte 102,15,58,15,226,4 - andl %r8d,%r12d - xorl %r8d,%r13d -.byte 102,15,58,15,248,4 - addl 32(%rsp),%r11d - movl %eax,%r15d - xorl %r10d,%r12d - rorl $11,%r14d - movdqa %xmm4,%xmm5 - xorl %ebx,%r15d - addl %r12d,%r11d - movdqa %xmm4,%xmm6 - rorl $6,%r13d - andl %r15d,%edi - psrld $3,%xmm4 - xorl %eax,%r14d - addl %r13d,%r11d - xorl %ebx,%edi - paddd %xmm7,%xmm2 - rorl $2,%r14d - addl %r11d,%edx - psrld $7,%xmm6 - addl %edi,%r11d - movl %edx,%r13d - pshufd $250,%xmm1,%xmm7 - addl %r11d,%r14d - rorl $14,%r13d - pslld $14,%xmm5 - movl %r14d,%r11d - movl %r8d,%r12d - pxor %xmm6,%xmm4 - rorl $9,%r14d - xorl %edx,%r13d - xorl %r9d,%r12d - rorl $5,%r13d - psrld $11,%xmm6 - xorl %r11d,%r14d - pxor %xmm5,%xmm4 - andl %edx,%r12d - xorl %edx,%r13d - pslld $11,%xmm5 - addl 36(%rsp),%r10d - movl %r11d,%edi - pxor %xmm6,%xmm4 - xorl %r9d,%r12d - rorl $11,%r14d - movdqa %xmm7,%xmm6 - xorl %eax,%edi - addl %r12d,%r10d - pxor %xmm5,%xmm4 - rorl $6,%r13d - andl %edi,%r15d - xorl %r11d,%r14d - psrld $10,%xmm7 - addl %r13d,%r10d - xorl %eax,%r15d - paddd %xmm4,%xmm2 - rorl $2,%r14d - addl %r10d,%ecx - psrlq $17,%xmm6 - addl %r15d,%r10d - movl %ecx,%r13d - addl %r10d,%r14d - pxor %xmm6,%xmm7 - rorl $14,%r13d - movl %r14d,%r10d - movl %edx,%r12d - rorl $9,%r14d - psrlq $2,%xmm6 - xorl %ecx,%r13d - xorl %r8d,%r12d - pxor %xmm6,%xmm7 - rorl $5,%r13d - xorl %r10d,%r14d - andl %ecx,%r12d - pshufd $128,%xmm7,%xmm7 - xorl %ecx,%r13d - addl 40(%rsp),%r9d - movl %r10d,%r15d - psrldq $8,%xmm7 - xorl %r8d,%r12d - rorl $11,%r14d - xorl %r11d,%r15d - addl %r12d,%r9d - rorl $6,%r13d - paddd %xmm7,%xmm2 - andl %r15d,%edi - xorl %r10d,%r14d - addl %r13d,%r9d - pshufd $80,%xmm2,%xmm7 - xorl %r11d,%edi - rorl $2,%r14d - addl %r9d,%ebx - movdqa %xmm7,%xmm6 - addl %edi,%r9d - movl %ebx,%r13d - psrld $10,%xmm7 - addl %r9d,%r14d - rorl $14,%r13d - psrlq $17,%xmm6 - movl %r14d,%r9d - movl %ecx,%r12d - pxor %xmm6,%xmm7 - rorl $9,%r14d - xorl %ebx,%r13d - xorl %edx,%r12d - rorl $5,%r13d - xorl %r9d,%r14d - psrlq $2,%xmm6 - andl %ebx,%r12d - xorl %ebx,%r13d - addl 44(%rsp),%r8d - pxor %xmm6,%xmm7 - movl %r9d,%edi - xorl %edx,%r12d - rorl $11,%r14d - pshufd $8,%xmm7,%xmm7 - xorl %r10d,%edi - addl %r12d,%r8d - movdqa 64(%rbp),%xmm6 - rorl $6,%r13d - andl %edi,%r15d - pslldq $8,%xmm7 - xorl %r9d,%r14d - addl %r13d,%r8d - xorl %r10d,%r15d - paddd %xmm7,%xmm2 - rorl $2,%r14d - addl %r8d,%eax - addl %r15d,%r8d - paddd %xmm2,%xmm6 - movl %eax,%r13d - addl %r8d,%r14d - movdqa %xmm6,32(%rsp) - rorl $14,%r13d - movdqa %xmm0,%xmm4 - movl %r14d,%r8d - movl %ebx,%r12d - movdqa %xmm2,%xmm7 - rorl $9,%r14d - xorl %eax,%r13d - xorl %ecx,%r12d - rorl $5,%r13d - xorl %r8d,%r14d -.byte 102,15,58,15,227,4 - andl %eax,%r12d - xorl %eax,%r13d -.byte 102,15,58,15,249,4 - addl 48(%rsp),%edx - movl %r8d,%r15d - xorl %ecx,%r12d - rorl $11,%r14d - movdqa %xmm4,%xmm5 - xorl %r9d,%r15d - addl %r12d,%edx - movdqa %xmm4,%xmm6 - rorl $6,%r13d - andl %r15d,%edi - psrld $3,%xmm4 - xorl %r8d,%r14d - addl %r13d,%edx - xorl %r9d,%edi - paddd %xmm7,%xmm3 - rorl $2,%r14d - addl %edx,%r11d - psrld $7,%xmm6 - addl %edi,%edx - movl %r11d,%r13d - pshufd $250,%xmm2,%xmm7 - addl %edx,%r14d - rorl $14,%r13d - pslld $14,%xmm5 - movl %r14d,%edx - movl %eax,%r12d - pxor %xmm6,%xmm4 - rorl $9,%r14d - xorl %r11d,%r13d - xorl %ebx,%r12d - rorl $5,%r13d - psrld $11,%xmm6 - xorl %edx,%r14d - pxor %xmm5,%xmm4 - andl %r11d,%r12d - xorl %r11d,%r13d - pslld $11,%xmm5 - addl 52(%rsp),%ecx - movl %edx,%edi - pxor %xmm6,%xmm4 - xorl %ebx,%r12d - rorl $11,%r14d - movdqa %xmm7,%xmm6 - xorl %r8d,%edi - addl %r12d,%ecx - pxor %xmm5,%xmm4 - rorl $6,%r13d - andl %edi,%r15d - xorl %edx,%r14d - psrld $10,%xmm7 - addl %r13d,%ecx - xorl %r8d,%r15d - paddd %xmm4,%xmm3 - rorl $2,%r14d - addl %ecx,%r10d - psrlq $17,%xmm6 - addl %r15d,%ecx - movl %r10d,%r13d - addl %ecx,%r14d - pxor %xmm6,%xmm7 - rorl $14,%r13d - movl %r14d,%ecx - movl %r11d,%r12d - rorl $9,%r14d - psrlq $2,%xmm6 - xorl %r10d,%r13d - xorl %eax,%r12d - pxor %xmm6,%xmm7 - rorl $5,%r13d - xorl %ecx,%r14d - andl %r10d,%r12d - pshufd $128,%xmm7,%xmm7 - xorl %r10d,%r13d - addl 56(%rsp),%ebx - movl %ecx,%r15d - psrldq $8,%xmm7 - xorl %eax,%r12d - rorl $11,%r14d - xorl %edx,%r15d - addl %r12d,%ebx - rorl $6,%r13d - paddd %xmm7,%xmm3 - andl %r15d,%edi - xorl %ecx,%r14d - addl %r13d,%ebx - pshufd $80,%xmm3,%xmm7 - xorl %edx,%edi - rorl $2,%r14d - addl %ebx,%r9d - movdqa %xmm7,%xmm6 - addl %edi,%ebx - movl %r9d,%r13d - psrld $10,%xmm7 - addl %ebx,%r14d - rorl $14,%r13d - psrlq $17,%xmm6 - movl %r14d,%ebx - movl %r10d,%r12d - pxor %xmm6,%xmm7 - rorl $9,%r14d - xorl %r9d,%r13d - xorl %r11d,%r12d - rorl $5,%r13d - xorl %ebx,%r14d - psrlq $2,%xmm6 - andl %r9d,%r12d - xorl %r9d,%r13d - addl 60(%rsp),%eax - pxor %xmm6,%xmm7 - movl %ebx,%edi - xorl %r11d,%r12d - rorl $11,%r14d - pshufd $8,%xmm7,%xmm7 - xorl %ecx,%edi - addl %r12d,%eax - movdqa 96(%rbp),%xmm6 - rorl $6,%r13d - andl %edi,%r15d - pslldq $8,%xmm7 - xorl %ebx,%r14d - addl %r13d,%eax - xorl %ecx,%r15d - paddd %xmm7,%xmm3 - rorl $2,%r14d - addl %eax,%r8d - addl %r15d,%eax - paddd %xmm3,%xmm6 - movl %r8d,%r13d - addl %eax,%r14d - movdqa %xmm6,48(%rsp) - cmpb $0,131(%rbp) - jne L$ssse3_00_47 - rorl $14,%r13d - movl %r14d,%eax - movl %r9d,%r12d - rorl $9,%r14d - xorl %r8d,%r13d - xorl %r10d,%r12d - rorl $5,%r13d - xorl %eax,%r14d - andl %r8d,%r12d - xorl %r8d,%r13d - addl 0(%rsp),%r11d - movl %eax,%r15d - xorl %r10d,%r12d - rorl $11,%r14d - xorl %ebx,%r15d - addl %r12d,%r11d - rorl $6,%r13d - andl %r15d,%edi - xorl %eax,%r14d - addl %r13d,%r11d - xorl %ebx,%edi - rorl $2,%r14d - addl %r11d,%edx - addl %edi,%r11d - movl %edx,%r13d - addl %r11d,%r14d - rorl $14,%r13d - movl %r14d,%r11d - movl %r8d,%r12d - rorl $9,%r14d - xorl %edx,%r13d - xorl %r9d,%r12d - rorl $5,%r13d - xorl %r11d,%r14d - andl %edx,%r12d - xorl %edx,%r13d - addl 4(%rsp),%r10d - movl %r11d,%edi - xorl %r9d,%r12d - rorl $11,%r14d - xorl %eax,%edi - addl %r12d,%r10d - rorl $6,%r13d - andl %edi,%r15d - xorl %r11d,%r14d - addl %r13d,%r10d - xorl %eax,%r15d - rorl $2,%r14d - addl %r10d,%ecx - addl %r15d,%r10d - movl %ecx,%r13d - addl %r10d,%r14d - rorl $14,%r13d - movl %r14d,%r10d - movl %edx,%r12d - rorl $9,%r14d - xorl %ecx,%r13d - xorl %r8d,%r12d - rorl $5,%r13d - xorl %r10d,%r14d - andl %ecx,%r12d - xorl %ecx,%r13d - addl 8(%rsp),%r9d - movl %r10d,%r15d - xorl %r8d,%r12d - rorl $11,%r14d - xorl %r11d,%r15d - addl %r12d,%r9d - rorl $6,%r13d - andl %r15d,%edi - xorl %r10d,%r14d - addl %r13d,%r9d - xorl %r11d,%edi - rorl $2,%r14d - addl %r9d,%ebx - addl %edi,%r9d - movl %ebx,%r13d - addl %r9d,%r14d - rorl $14,%r13d - movl %r14d,%r9d - movl %ecx,%r12d - rorl $9,%r14d - xorl %ebx,%r13d - xorl %edx,%r12d - rorl $5,%r13d - xorl %r9d,%r14d - andl %ebx,%r12d - xorl %ebx,%r13d - addl 12(%rsp),%r8d - movl %r9d,%edi - xorl %edx,%r12d - rorl $11,%r14d - xorl %r10d,%edi - addl %r12d,%r8d - rorl $6,%r13d - andl %edi,%r15d - xorl %r9d,%r14d - addl %r13d,%r8d - xorl %r10d,%r15d - rorl $2,%r14d - addl %r8d,%eax - addl %r15d,%r8d - movl %eax,%r13d - addl %r8d,%r14d - rorl $14,%r13d - movl %r14d,%r8d - movl %ebx,%r12d - rorl $9,%r14d - xorl %eax,%r13d - xorl %ecx,%r12d - rorl $5,%r13d - xorl %r8d,%r14d - andl %eax,%r12d - xorl %eax,%r13d - addl 16(%rsp),%edx - movl %r8d,%r15d - xorl %ecx,%r12d - rorl $11,%r14d - xorl %r9d,%r15d - addl %r12d,%edx - rorl $6,%r13d - andl %r15d,%edi - xorl %r8d,%r14d - addl %r13d,%edx - xorl %r9d,%edi - rorl $2,%r14d - addl %edx,%r11d - addl %edi,%edx - movl %r11d,%r13d - addl %edx,%r14d - rorl $14,%r13d - movl %r14d,%edx - movl %eax,%r12d - rorl $9,%r14d - xorl %r11d,%r13d - xorl %ebx,%r12d - rorl $5,%r13d - xorl %edx,%r14d - andl %r11d,%r12d - xorl %r11d,%r13d - addl 20(%rsp),%ecx - movl %edx,%edi - xorl %ebx,%r12d - rorl $11,%r14d - xorl %r8d,%edi - addl %r12d,%ecx - rorl $6,%r13d - andl %edi,%r15d - xorl %edx,%r14d - addl %r13d,%ecx - xorl %r8d,%r15d - rorl $2,%r14d - addl %ecx,%r10d - addl %r15d,%ecx - movl %r10d,%r13d - addl %ecx,%r14d - rorl $14,%r13d - movl %r14d,%ecx - movl %r11d,%r12d - rorl $9,%r14d - xorl %r10d,%r13d - xorl %eax,%r12d - rorl $5,%r13d - xorl %ecx,%r14d - andl %r10d,%r12d - xorl %r10d,%r13d - addl 24(%rsp),%ebx - movl %ecx,%r15d - xorl %eax,%r12d - rorl $11,%r14d - xorl %edx,%r15d - addl %r12d,%ebx - rorl $6,%r13d - andl %r15d,%edi - xorl %ecx,%r14d - addl %r13d,%ebx - xorl %edx,%edi - rorl $2,%r14d - addl %ebx,%r9d - addl %edi,%ebx - movl %r9d,%r13d - addl %ebx,%r14d - rorl $14,%r13d - movl %r14d,%ebx - movl %r10d,%r12d - rorl $9,%r14d - xorl %r9d,%r13d - xorl %r11d,%r12d - rorl $5,%r13d - xorl %ebx,%r14d - andl %r9d,%r12d - xorl %r9d,%r13d - addl 28(%rsp),%eax - movl %ebx,%edi - xorl %r11d,%r12d - rorl $11,%r14d - xorl %ecx,%edi - addl %r12d,%eax - rorl $6,%r13d - andl %edi,%r15d - xorl %ebx,%r14d - addl %r13d,%eax - xorl %ecx,%r15d - rorl $2,%r14d - addl %eax,%r8d - addl %r15d,%eax - movl %r8d,%r13d - addl %eax,%r14d - rorl $14,%r13d - movl %r14d,%eax - movl %r9d,%r12d - rorl $9,%r14d - xorl %r8d,%r13d - xorl %r10d,%r12d - rorl $5,%r13d - xorl %eax,%r14d - andl %r8d,%r12d - xorl %r8d,%r13d - addl 32(%rsp),%r11d - movl %eax,%r15d - xorl %r10d,%r12d - rorl $11,%r14d - xorl %ebx,%r15d - addl %r12d,%r11d - rorl $6,%r13d - andl %r15d,%edi - xorl %eax,%r14d - addl %r13d,%r11d - xorl %ebx,%edi - rorl $2,%r14d - addl %r11d,%edx - addl %edi,%r11d - movl %edx,%r13d - addl %r11d,%r14d - rorl $14,%r13d - movl %r14d,%r11d - movl %r8d,%r12d - rorl $9,%r14d - xorl %edx,%r13d - xorl %r9d,%r12d - rorl $5,%r13d - xorl %r11d,%r14d - andl %edx,%r12d - xorl %edx,%r13d - addl 36(%rsp),%r10d - movl %r11d,%edi - xorl %r9d,%r12d - rorl $11,%r14d - xorl %eax,%edi - addl %r12d,%r10d - rorl $6,%r13d - andl %edi,%r15d - xorl %r11d,%r14d - addl %r13d,%r10d - xorl %eax,%r15d - rorl $2,%r14d - addl %r10d,%ecx - addl %r15d,%r10d - movl %ecx,%r13d - addl %r10d,%r14d - rorl $14,%r13d - movl %r14d,%r10d - movl %edx,%r12d - rorl $9,%r14d - xorl %ecx,%r13d - xorl %r8d,%r12d - rorl $5,%r13d - xorl %r10d,%r14d - andl %ecx,%r12d - xorl %ecx,%r13d - addl 40(%rsp),%r9d - movl %r10d,%r15d - xorl %r8d,%r12d - rorl $11,%r14d - xorl %r11d,%r15d - addl %r12d,%r9d - rorl $6,%r13d - andl %r15d,%edi - xorl %r10d,%r14d - addl %r13d,%r9d - xorl %r11d,%edi - rorl $2,%r14d - addl %r9d,%ebx - addl %edi,%r9d - movl %ebx,%r13d - addl %r9d,%r14d - rorl $14,%r13d - movl %r14d,%r9d - movl %ecx,%r12d - rorl $9,%r14d - xorl %ebx,%r13d - xorl %edx,%r12d - rorl $5,%r13d - xorl %r9d,%r14d - andl %ebx,%r12d - xorl %ebx,%r13d - addl 44(%rsp),%r8d - movl %r9d,%edi - xorl %edx,%r12d - rorl $11,%r14d - xorl %r10d,%edi - addl %r12d,%r8d - rorl $6,%r13d - andl %edi,%r15d - xorl %r9d,%r14d - addl %r13d,%r8d - xorl %r10d,%r15d - rorl $2,%r14d - addl %r8d,%eax - addl %r15d,%r8d - movl %eax,%r13d - addl %r8d,%r14d - rorl $14,%r13d - movl %r14d,%r8d - movl %ebx,%r12d - rorl $9,%r14d - xorl %eax,%r13d - xorl %ecx,%r12d - rorl $5,%r13d - xorl %r8d,%r14d - andl %eax,%r12d - xorl %eax,%r13d - addl 48(%rsp),%edx - movl %r8d,%r15d - xorl %ecx,%r12d - rorl $11,%r14d - xorl %r9d,%r15d - addl %r12d,%edx - rorl $6,%r13d - andl %r15d,%edi - xorl %r8d,%r14d - addl %r13d,%edx - xorl %r9d,%edi - rorl $2,%r14d - addl %edx,%r11d - addl %edi,%edx - movl %r11d,%r13d - addl %edx,%r14d - rorl $14,%r13d - movl %r14d,%edx - movl %eax,%r12d - rorl $9,%r14d - xorl %r11d,%r13d - xorl %ebx,%r12d - rorl $5,%r13d - xorl %edx,%r14d - andl %r11d,%r12d - xorl %r11d,%r13d - addl 52(%rsp),%ecx - movl %edx,%edi - xorl %ebx,%r12d - rorl $11,%r14d - xorl %r8d,%edi - addl %r12d,%ecx - rorl $6,%r13d - andl %edi,%r15d - xorl %edx,%r14d - addl %r13d,%ecx - xorl %r8d,%r15d - rorl $2,%r14d - addl %ecx,%r10d - addl %r15d,%ecx - movl %r10d,%r13d - addl %ecx,%r14d - rorl $14,%r13d - movl %r14d,%ecx - movl %r11d,%r12d - rorl $9,%r14d - xorl %r10d,%r13d - xorl %eax,%r12d - rorl $5,%r13d - xorl %ecx,%r14d - andl %r10d,%r12d - xorl %r10d,%r13d - addl 56(%rsp),%ebx - movl %ecx,%r15d - xorl %eax,%r12d - rorl $11,%r14d - xorl %edx,%r15d - addl %r12d,%ebx - rorl $6,%r13d - andl %r15d,%edi - xorl %ecx,%r14d - addl %r13d,%ebx - xorl %edx,%edi - rorl $2,%r14d - addl %ebx,%r9d - addl %edi,%ebx - movl %r9d,%r13d - addl %ebx,%r14d - rorl $14,%r13d - movl %r14d,%ebx - movl %r10d,%r12d - rorl $9,%r14d - xorl %r9d,%r13d - xorl %r11d,%r12d - rorl $5,%r13d - xorl %ebx,%r14d - andl %r9d,%r12d - xorl %r9d,%r13d - addl 60(%rsp),%eax - movl %ebx,%edi - xorl %r11d,%r12d - rorl $11,%r14d - xorl %ecx,%edi - addl %r12d,%eax - rorl $6,%r13d - andl %edi,%r15d - xorl %ebx,%r14d - addl %r13d,%eax - xorl %ecx,%r15d - rorl $2,%r14d - addl %eax,%r8d - addl %r15d,%eax - movl %r8d,%r13d - addl %eax,%r14d - movq 64+0(%rsp),%rdi - movl %r14d,%eax - - addl 0(%rdi),%eax - leaq 64(%rsi),%rsi - addl 4(%rdi),%ebx - addl 8(%rdi),%ecx - addl 12(%rdi),%edx - addl 16(%rdi),%r8d - addl 20(%rdi),%r9d - addl 24(%rdi),%r10d - addl 28(%rdi),%r11d - - cmpq 64+16(%rsp),%rsi - - movl %eax,0(%rdi) - movl %ebx,4(%rdi) - movl %ecx,8(%rdi) - movl %edx,12(%rdi) - movl %r8d,16(%rdi) - movl %r9d,20(%rdi) - movl %r10d,24(%rdi) - movl %r11d,28(%rdi) - jb L$loop_ssse3 - - movq 64+24(%rsp),%rsi - movq (%rsi),%r15 - movq 8(%rsi),%r14 - movq 16(%rsi),%r13 - movq 24(%rsi),%r12 - movq 32(%rsi),%rbp - movq 40(%rsi),%rbx - leaq 48(%rsi),%rsp -L$epilogue_ssse3: - .byte 0xf3,0xc3 - -#endif diff --git a/third_party/boringssl/mac-x86_64/crypto/sha/sha512-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/sha/sha512-x86_64.S deleted file mode 100644 index 2f5d912425cf3..0000000000000 --- a/third_party/boringssl/mac-x86_64/crypto/sha/sha512-x86_64.S +++ /dev/null @@ -1,1786 +0,0 @@ -#if defined(__x86_64__) -.text - - -.globl _sha512_block_data_order -.private_extern _sha512_block_data_order - -.p2align 4 -_sha512_block_data_order: - pushq %rbx - pushq %rbp - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - movq %rsp,%r11 - shlq $4,%rdx - subq $128+32,%rsp - leaq (%rsi,%rdx,8),%rdx - andq $-64,%rsp - movq %rdi,128+0(%rsp) - movq %rsi,128+8(%rsp) - movq %rdx,128+16(%rsp) - movq %r11,128+24(%rsp) -L$prologue: - - movq 0(%rdi),%rax - movq 8(%rdi),%rbx - movq 16(%rdi),%rcx - movq 24(%rdi),%rdx - movq 32(%rdi),%r8 - movq 40(%rdi),%r9 - movq 48(%rdi),%r10 - movq 56(%rdi),%r11 - jmp L$loop - -.p2align 4 -L$loop: - movq %rbx,%rdi - leaq K512(%rip),%rbp - xorq %rcx,%rdi - movq 0(%rsi),%r12 - movq %r8,%r13 - movq %rax,%r14 - bswapq %r12 - rorq $23,%r13 - movq %r9,%r15 - - xorq %r8,%r13 - rorq $5,%r14 - xorq %r10,%r15 - - movq %r12,0(%rsp) - xorq %rax,%r14 - andq %r8,%r15 - - rorq $4,%r13 - addq %r11,%r12 - xorq %r10,%r15 - - rorq $6,%r14 - xorq %r8,%r13 - addq %r15,%r12 - - movq %rax,%r15 - addq (%rbp),%r12 - xorq %rax,%r14 - - xorq %rbx,%r15 - rorq $14,%r13 - movq %rbx,%r11 - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%r11 - addq %r12,%rdx - addq %r12,%r11 - - leaq 8(%rbp),%rbp - addq %r14,%r11 - movq 8(%rsi),%r12 - movq %rdx,%r13 - movq %r11,%r14 - bswapq %r12 - rorq $23,%r13 - movq %r8,%rdi - - xorq %rdx,%r13 - rorq $5,%r14 - xorq %r9,%rdi - - movq %r12,8(%rsp) - xorq %r11,%r14 - andq %rdx,%rdi - - rorq $4,%r13 - addq %r10,%r12 - xorq %r9,%rdi - - rorq $6,%r14 - xorq %rdx,%r13 - addq %rdi,%r12 - - movq %r11,%rdi - addq (%rbp),%r12 - xorq %r11,%r14 - - xorq %rax,%rdi - rorq $14,%r13 - movq %rax,%r10 - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%r10 - addq %r12,%rcx - addq %r12,%r10 - - leaq 24(%rbp),%rbp - addq %r14,%r10 - movq 16(%rsi),%r12 - movq %rcx,%r13 - movq %r10,%r14 - bswapq %r12 - rorq $23,%r13 - movq %rdx,%r15 - - xorq %rcx,%r13 - rorq $5,%r14 - xorq %r8,%r15 - - movq %r12,16(%rsp) - xorq %r10,%r14 - andq %rcx,%r15 - - rorq $4,%r13 - addq %r9,%r12 - xorq %r8,%r15 - - rorq $6,%r14 - xorq %rcx,%r13 - addq %r15,%r12 - - movq %r10,%r15 - addq (%rbp),%r12 - xorq %r10,%r14 - - xorq %r11,%r15 - rorq $14,%r13 - movq %r11,%r9 - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%r9 - addq %r12,%rbx - addq %r12,%r9 - - leaq 8(%rbp),%rbp - addq %r14,%r9 - movq 24(%rsi),%r12 - movq %rbx,%r13 - movq %r9,%r14 - bswapq %r12 - rorq $23,%r13 - movq %rcx,%rdi - - xorq %rbx,%r13 - rorq $5,%r14 - xorq %rdx,%rdi - - movq %r12,24(%rsp) - xorq %r9,%r14 - andq %rbx,%rdi - - rorq $4,%r13 - addq %r8,%r12 - xorq %rdx,%rdi - - rorq $6,%r14 - xorq %rbx,%r13 - addq %rdi,%r12 - - movq %r9,%rdi - addq (%rbp),%r12 - xorq %r9,%r14 - - xorq %r10,%rdi - rorq $14,%r13 - movq %r10,%r8 - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%r8 - addq %r12,%rax - addq %r12,%r8 - - leaq 24(%rbp),%rbp - addq %r14,%r8 - movq 32(%rsi),%r12 - movq %rax,%r13 - movq %r8,%r14 - bswapq %r12 - rorq $23,%r13 - movq %rbx,%r15 - - xorq %rax,%r13 - rorq $5,%r14 - xorq %rcx,%r15 - - movq %r12,32(%rsp) - xorq %r8,%r14 - andq %rax,%r15 - - rorq $4,%r13 - addq %rdx,%r12 - xorq %rcx,%r15 - - rorq $6,%r14 - xorq %rax,%r13 - addq %r15,%r12 - - movq %r8,%r15 - addq (%rbp),%r12 - xorq %r8,%r14 - - xorq %r9,%r15 - rorq $14,%r13 - movq %r9,%rdx - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%rdx - addq %r12,%r11 - addq %r12,%rdx - - leaq 8(%rbp),%rbp - addq %r14,%rdx - movq 40(%rsi),%r12 - movq %r11,%r13 - movq %rdx,%r14 - bswapq %r12 - rorq $23,%r13 - movq %rax,%rdi - - xorq %r11,%r13 - rorq $5,%r14 - xorq %rbx,%rdi - - movq %r12,40(%rsp) - xorq %rdx,%r14 - andq %r11,%rdi - - rorq $4,%r13 - addq %rcx,%r12 - xorq %rbx,%rdi - - rorq $6,%r14 - xorq %r11,%r13 - addq %rdi,%r12 - - movq %rdx,%rdi - addq (%rbp),%r12 - xorq %rdx,%r14 - - xorq %r8,%rdi - rorq $14,%r13 - movq %r8,%rcx - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%rcx - addq %r12,%r10 - addq %r12,%rcx - - leaq 24(%rbp),%rbp - addq %r14,%rcx - movq 48(%rsi),%r12 - movq %r10,%r13 - movq %rcx,%r14 - bswapq %r12 - rorq $23,%r13 - movq %r11,%r15 - - xorq %r10,%r13 - rorq $5,%r14 - xorq %rax,%r15 - - movq %r12,48(%rsp) - xorq %rcx,%r14 - andq %r10,%r15 - - rorq $4,%r13 - addq %rbx,%r12 - xorq %rax,%r15 - - rorq $6,%r14 - xorq %r10,%r13 - addq %r15,%r12 - - movq %rcx,%r15 - addq (%rbp),%r12 - xorq %rcx,%r14 - - xorq %rdx,%r15 - rorq $14,%r13 - movq %rdx,%rbx - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%rbx - addq %r12,%r9 - addq %r12,%rbx - - leaq 8(%rbp),%rbp - addq %r14,%rbx - movq 56(%rsi),%r12 - movq %r9,%r13 - movq %rbx,%r14 - bswapq %r12 - rorq $23,%r13 - movq %r10,%rdi - - xorq %r9,%r13 - rorq $5,%r14 - xorq %r11,%rdi - - movq %r12,56(%rsp) - xorq %rbx,%r14 - andq %r9,%rdi - - rorq $4,%r13 - addq %rax,%r12 - xorq %r11,%rdi - - rorq $6,%r14 - xorq %r9,%r13 - addq %rdi,%r12 - - movq %rbx,%rdi - addq (%rbp),%r12 - xorq %rbx,%r14 - - xorq %rcx,%rdi - rorq $14,%r13 - movq %rcx,%rax - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%rax - addq %r12,%r8 - addq %r12,%rax - - leaq 24(%rbp),%rbp - addq %r14,%rax - movq 64(%rsi),%r12 - movq %r8,%r13 - movq %rax,%r14 - bswapq %r12 - rorq $23,%r13 - movq %r9,%r15 - - xorq %r8,%r13 - rorq $5,%r14 - xorq %r10,%r15 - - movq %r12,64(%rsp) - xorq %rax,%r14 - andq %r8,%r15 - - rorq $4,%r13 - addq %r11,%r12 - xorq %r10,%r15 - - rorq $6,%r14 - xorq %r8,%r13 - addq %r15,%r12 - - movq %rax,%r15 - addq (%rbp),%r12 - xorq %rax,%r14 - - xorq %rbx,%r15 - rorq $14,%r13 - movq %rbx,%r11 - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%r11 - addq %r12,%rdx - addq %r12,%r11 - - leaq 8(%rbp),%rbp - addq %r14,%r11 - movq 72(%rsi),%r12 - movq %rdx,%r13 - movq %r11,%r14 - bswapq %r12 - rorq $23,%r13 - movq %r8,%rdi - - xorq %rdx,%r13 - rorq $5,%r14 - xorq %r9,%rdi - - movq %r12,72(%rsp) - xorq %r11,%r14 - andq %rdx,%rdi - - rorq $4,%r13 - addq %r10,%r12 - xorq %r9,%rdi - - rorq $6,%r14 - xorq %rdx,%r13 - addq %rdi,%r12 - - movq %r11,%rdi - addq (%rbp),%r12 - xorq %r11,%r14 - - xorq %rax,%rdi - rorq $14,%r13 - movq %rax,%r10 - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%r10 - addq %r12,%rcx - addq %r12,%r10 - - leaq 24(%rbp),%rbp - addq %r14,%r10 - movq 80(%rsi),%r12 - movq %rcx,%r13 - movq %r10,%r14 - bswapq %r12 - rorq $23,%r13 - movq %rdx,%r15 - - xorq %rcx,%r13 - rorq $5,%r14 - xorq %r8,%r15 - - movq %r12,80(%rsp) - xorq %r10,%r14 - andq %rcx,%r15 - - rorq $4,%r13 - addq %r9,%r12 - xorq %r8,%r15 - - rorq $6,%r14 - xorq %rcx,%r13 - addq %r15,%r12 - - movq %r10,%r15 - addq (%rbp),%r12 - xorq %r10,%r14 - - xorq %r11,%r15 - rorq $14,%r13 - movq %r11,%r9 - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%r9 - addq %r12,%rbx - addq %r12,%r9 - - leaq 8(%rbp),%rbp - addq %r14,%r9 - movq 88(%rsi),%r12 - movq %rbx,%r13 - movq %r9,%r14 - bswapq %r12 - rorq $23,%r13 - movq %rcx,%rdi - - xorq %rbx,%r13 - rorq $5,%r14 - xorq %rdx,%rdi - - movq %r12,88(%rsp) - xorq %r9,%r14 - andq %rbx,%rdi - - rorq $4,%r13 - addq %r8,%r12 - xorq %rdx,%rdi - - rorq $6,%r14 - xorq %rbx,%r13 - addq %rdi,%r12 - - movq %r9,%rdi - addq (%rbp),%r12 - xorq %r9,%r14 - - xorq %r10,%rdi - rorq $14,%r13 - movq %r10,%r8 - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%r8 - addq %r12,%rax - addq %r12,%r8 - - leaq 24(%rbp),%rbp - addq %r14,%r8 - movq 96(%rsi),%r12 - movq %rax,%r13 - movq %r8,%r14 - bswapq %r12 - rorq $23,%r13 - movq %rbx,%r15 - - xorq %rax,%r13 - rorq $5,%r14 - xorq %rcx,%r15 - - movq %r12,96(%rsp) - xorq %r8,%r14 - andq %rax,%r15 - - rorq $4,%r13 - addq %rdx,%r12 - xorq %rcx,%r15 - - rorq $6,%r14 - xorq %rax,%r13 - addq %r15,%r12 - - movq %r8,%r15 - addq (%rbp),%r12 - xorq %r8,%r14 - - xorq %r9,%r15 - rorq $14,%r13 - movq %r9,%rdx - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%rdx - addq %r12,%r11 - addq %r12,%rdx - - leaq 8(%rbp),%rbp - addq %r14,%rdx - movq 104(%rsi),%r12 - movq %r11,%r13 - movq %rdx,%r14 - bswapq %r12 - rorq $23,%r13 - movq %rax,%rdi - - xorq %r11,%r13 - rorq $5,%r14 - xorq %rbx,%rdi - - movq %r12,104(%rsp) - xorq %rdx,%r14 - andq %r11,%rdi - - rorq $4,%r13 - addq %rcx,%r12 - xorq %rbx,%rdi - - rorq $6,%r14 - xorq %r11,%r13 - addq %rdi,%r12 - - movq %rdx,%rdi - addq (%rbp),%r12 - xorq %rdx,%r14 - - xorq %r8,%rdi - rorq $14,%r13 - movq %r8,%rcx - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%rcx - addq %r12,%r10 - addq %r12,%rcx - - leaq 24(%rbp),%rbp - addq %r14,%rcx - movq 112(%rsi),%r12 - movq %r10,%r13 - movq %rcx,%r14 - bswapq %r12 - rorq $23,%r13 - movq %r11,%r15 - - xorq %r10,%r13 - rorq $5,%r14 - xorq %rax,%r15 - - movq %r12,112(%rsp) - xorq %rcx,%r14 - andq %r10,%r15 - - rorq $4,%r13 - addq %rbx,%r12 - xorq %rax,%r15 - - rorq $6,%r14 - xorq %r10,%r13 - addq %r15,%r12 - - movq %rcx,%r15 - addq (%rbp),%r12 - xorq %rcx,%r14 - - xorq %rdx,%r15 - rorq $14,%r13 - movq %rdx,%rbx - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%rbx - addq %r12,%r9 - addq %r12,%rbx - - leaq 8(%rbp),%rbp - addq %r14,%rbx - movq 120(%rsi),%r12 - movq %r9,%r13 - movq %rbx,%r14 - bswapq %r12 - rorq $23,%r13 - movq %r10,%rdi - - xorq %r9,%r13 - rorq $5,%r14 - xorq %r11,%rdi - - movq %r12,120(%rsp) - xorq %rbx,%r14 - andq %r9,%rdi - - rorq $4,%r13 - addq %rax,%r12 - xorq %r11,%rdi - - rorq $6,%r14 - xorq %r9,%r13 - addq %rdi,%r12 - - movq %rbx,%rdi - addq (%rbp),%r12 - xorq %rbx,%r14 - - xorq %rcx,%rdi - rorq $14,%r13 - movq %rcx,%rax - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%rax - addq %r12,%r8 - addq %r12,%rax - - leaq 24(%rbp),%rbp - jmp L$rounds_16_xx -.p2align 4 -L$rounds_16_xx: - movq 8(%rsp),%r13 - movq 112(%rsp),%r15 - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%rax - movq %r15,%r14 - rorq $42,%r15 - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%r15 - shrq $6,%r14 - - rorq $19,%r15 - xorq %r13,%r12 - xorq %r14,%r15 - addq 72(%rsp),%r12 - - addq 0(%rsp),%r12 - movq %r8,%r13 - addq %r15,%r12 - movq %rax,%r14 - rorq $23,%r13 - movq %r9,%r15 - - xorq %r8,%r13 - rorq $5,%r14 - xorq %r10,%r15 - - movq %r12,0(%rsp) - xorq %rax,%r14 - andq %r8,%r15 - - rorq $4,%r13 - addq %r11,%r12 - xorq %r10,%r15 - - rorq $6,%r14 - xorq %r8,%r13 - addq %r15,%r12 - - movq %rax,%r15 - addq (%rbp),%r12 - xorq %rax,%r14 - - xorq %rbx,%r15 - rorq $14,%r13 - movq %rbx,%r11 - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%r11 - addq %r12,%rdx - addq %r12,%r11 - - leaq 8(%rbp),%rbp - movq 16(%rsp),%r13 - movq 120(%rsp),%rdi - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%r11 - movq %rdi,%r14 - rorq $42,%rdi - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%rdi - shrq $6,%r14 - - rorq $19,%rdi - xorq %r13,%r12 - xorq %r14,%rdi - addq 80(%rsp),%r12 - - addq 8(%rsp),%r12 - movq %rdx,%r13 - addq %rdi,%r12 - movq %r11,%r14 - rorq $23,%r13 - movq %r8,%rdi - - xorq %rdx,%r13 - rorq $5,%r14 - xorq %r9,%rdi - - movq %r12,8(%rsp) - xorq %r11,%r14 - andq %rdx,%rdi - - rorq $4,%r13 - addq %r10,%r12 - xorq %r9,%rdi - - rorq $6,%r14 - xorq %rdx,%r13 - addq %rdi,%r12 - - movq %r11,%rdi - addq (%rbp),%r12 - xorq %r11,%r14 - - xorq %rax,%rdi - rorq $14,%r13 - movq %rax,%r10 - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%r10 - addq %r12,%rcx - addq %r12,%r10 - - leaq 24(%rbp),%rbp - movq 24(%rsp),%r13 - movq 0(%rsp),%r15 - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%r10 - movq %r15,%r14 - rorq $42,%r15 - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%r15 - shrq $6,%r14 - - rorq $19,%r15 - xorq %r13,%r12 - xorq %r14,%r15 - addq 88(%rsp),%r12 - - addq 16(%rsp),%r12 - movq %rcx,%r13 - addq %r15,%r12 - movq %r10,%r14 - rorq $23,%r13 - movq %rdx,%r15 - - xorq %rcx,%r13 - rorq $5,%r14 - xorq %r8,%r15 - - movq %r12,16(%rsp) - xorq %r10,%r14 - andq %rcx,%r15 - - rorq $4,%r13 - addq %r9,%r12 - xorq %r8,%r15 - - rorq $6,%r14 - xorq %rcx,%r13 - addq %r15,%r12 - - movq %r10,%r15 - addq (%rbp),%r12 - xorq %r10,%r14 - - xorq %r11,%r15 - rorq $14,%r13 - movq %r11,%r9 - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%r9 - addq %r12,%rbx - addq %r12,%r9 - - leaq 8(%rbp),%rbp - movq 32(%rsp),%r13 - movq 8(%rsp),%rdi - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%r9 - movq %rdi,%r14 - rorq $42,%rdi - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%rdi - shrq $6,%r14 - - rorq $19,%rdi - xorq %r13,%r12 - xorq %r14,%rdi - addq 96(%rsp),%r12 - - addq 24(%rsp),%r12 - movq %rbx,%r13 - addq %rdi,%r12 - movq %r9,%r14 - rorq $23,%r13 - movq %rcx,%rdi - - xorq %rbx,%r13 - rorq $5,%r14 - xorq %rdx,%rdi - - movq %r12,24(%rsp) - xorq %r9,%r14 - andq %rbx,%rdi - - rorq $4,%r13 - addq %r8,%r12 - xorq %rdx,%rdi - - rorq $6,%r14 - xorq %rbx,%r13 - addq %rdi,%r12 - - movq %r9,%rdi - addq (%rbp),%r12 - xorq %r9,%r14 - - xorq %r10,%rdi - rorq $14,%r13 - movq %r10,%r8 - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%r8 - addq %r12,%rax - addq %r12,%r8 - - leaq 24(%rbp),%rbp - movq 40(%rsp),%r13 - movq 16(%rsp),%r15 - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%r8 - movq %r15,%r14 - rorq $42,%r15 - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%r15 - shrq $6,%r14 - - rorq $19,%r15 - xorq %r13,%r12 - xorq %r14,%r15 - addq 104(%rsp),%r12 - - addq 32(%rsp),%r12 - movq %rax,%r13 - addq %r15,%r12 - movq %r8,%r14 - rorq $23,%r13 - movq %rbx,%r15 - - xorq %rax,%r13 - rorq $5,%r14 - xorq %rcx,%r15 - - movq %r12,32(%rsp) - xorq %r8,%r14 - andq %rax,%r15 - - rorq $4,%r13 - addq %rdx,%r12 - xorq %rcx,%r15 - - rorq $6,%r14 - xorq %rax,%r13 - addq %r15,%r12 - - movq %r8,%r15 - addq (%rbp),%r12 - xorq %r8,%r14 - - xorq %r9,%r15 - rorq $14,%r13 - movq %r9,%rdx - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%rdx - addq %r12,%r11 - addq %r12,%rdx - - leaq 8(%rbp),%rbp - movq 48(%rsp),%r13 - movq 24(%rsp),%rdi - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%rdx - movq %rdi,%r14 - rorq $42,%rdi - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%rdi - shrq $6,%r14 - - rorq $19,%rdi - xorq %r13,%r12 - xorq %r14,%rdi - addq 112(%rsp),%r12 - - addq 40(%rsp),%r12 - movq %r11,%r13 - addq %rdi,%r12 - movq %rdx,%r14 - rorq $23,%r13 - movq %rax,%rdi - - xorq %r11,%r13 - rorq $5,%r14 - xorq %rbx,%rdi - - movq %r12,40(%rsp) - xorq %rdx,%r14 - andq %r11,%rdi - - rorq $4,%r13 - addq %rcx,%r12 - xorq %rbx,%rdi - - rorq $6,%r14 - xorq %r11,%r13 - addq %rdi,%r12 - - movq %rdx,%rdi - addq (%rbp),%r12 - xorq %rdx,%r14 - - xorq %r8,%rdi - rorq $14,%r13 - movq %r8,%rcx - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%rcx - addq %r12,%r10 - addq %r12,%rcx - - leaq 24(%rbp),%rbp - movq 56(%rsp),%r13 - movq 32(%rsp),%r15 - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%rcx - movq %r15,%r14 - rorq $42,%r15 - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%r15 - shrq $6,%r14 - - rorq $19,%r15 - xorq %r13,%r12 - xorq %r14,%r15 - addq 120(%rsp),%r12 - - addq 48(%rsp),%r12 - movq %r10,%r13 - addq %r15,%r12 - movq %rcx,%r14 - rorq $23,%r13 - movq %r11,%r15 - - xorq %r10,%r13 - rorq $5,%r14 - xorq %rax,%r15 - - movq %r12,48(%rsp) - xorq %rcx,%r14 - andq %r10,%r15 - - rorq $4,%r13 - addq %rbx,%r12 - xorq %rax,%r15 - - rorq $6,%r14 - xorq %r10,%r13 - addq %r15,%r12 - - movq %rcx,%r15 - addq (%rbp),%r12 - xorq %rcx,%r14 - - xorq %rdx,%r15 - rorq $14,%r13 - movq %rdx,%rbx - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%rbx - addq %r12,%r9 - addq %r12,%rbx - - leaq 8(%rbp),%rbp - movq 64(%rsp),%r13 - movq 40(%rsp),%rdi - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%rbx - movq %rdi,%r14 - rorq $42,%rdi - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%rdi - shrq $6,%r14 - - rorq $19,%rdi - xorq %r13,%r12 - xorq %r14,%rdi - addq 0(%rsp),%r12 - - addq 56(%rsp),%r12 - movq %r9,%r13 - addq %rdi,%r12 - movq %rbx,%r14 - rorq $23,%r13 - movq %r10,%rdi - - xorq %r9,%r13 - rorq $5,%r14 - xorq %r11,%rdi - - movq %r12,56(%rsp) - xorq %rbx,%r14 - andq %r9,%rdi - - rorq $4,%r13 - addq %rax,%r12 - xorq %r11,%rdi - - rorq $6,%r14 - xorq %r9,%r13 - addq %rdi,%r12 - - movq %rbx,%rdi - addq (%rbp),%r12 - xorq %rbx,%r14 - - xorq %rcx,%rdi - rorq $14,%r13 - movq %rcx,%rax - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%rax - addq %r12,%r8 - addq %r12,%rax - - leaq 24(%rbp),%rbp - movq 72(%rsp),%r13 - movq 48(%rsp),%r15 - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%rax - movq %r15,%r14 - rorq $42,%r15 - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%r15 - shrq $6,%r14 - - rorq $19,%r15 - xorq %r13,%r12 - xorq %r14,%r15 - addq 8(%rsp),%r12 - - addq 64(%rsp),%r12 - movq %r8,%r13 - addq %r15,%r12 - movq %rax,%r14 - rorq $23,%r13 - movq %r9,%r15 - - xorq %r8,%r13 - rorq $5,%r14 - xorq %r10,%r15 - - movq %r12,64(%rsp) - xorq %rax,%r14 - andq %r8,%r15 - - rorq $4,%r13 - addq %r11,%r12 - xorq %r10,%r15 - - rorq $6,%r14 - xorq %r8,%r13 - addq %r15,%r12 - - movq %rax,%r15 - addq (%rbp),%r12 - xorq %rax,%r14 - - xorq %rbx,%r15 - rorq $14,%r13 - movq %rbx,%r11 - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%r11 - addq %r12,%rdx - addq %r12,%r11 - - leaq 8(%rbp),%rbp - movq 80(%rsp),%r13 - movq 56(%rsp),%rdi - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%r11 - movq %rdi,%r14 - rorq $42,%rdi - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%rdi - shrq $6,%r14 - - rorq $19,%rdi - xorq %r13,%r12 - xorq %r14,%rdi - addq 16(%rsp),%r12 - - addq 72(%rsp),%r12 - movq %rdx,%r13 - addq %rdi,%r12 - movq %r11,%r14 - rorq $23,%r13 - movq %r8,%rdi - - xorq %rdx,%r13 - rorq $5,%r14 - xorq %r9,%rdi - - movq %r12,72(%rsp) - xorq %r11,%r14 - andq %rdx,%rdi - - rorq $4,%r13 - addq %r10,%r12 - xorq %r9,%rdi - - rorq $6,%r14 - xorq %rdx,%r13 - addq %rdi,%r12 - - movq %r11,%rdi - addq (%rbp),%r12 - xorq %r11,%r14 - - xorq %rax,%rdi - rorq $14,%r13 - movq %rax,%r10 - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%r10 - addq %r12,%rcx - addq %r12,%r10 - - leaq 24(%rbp),%rbp - movq 88(%rsp),%r13 - movq 64(%rsp),%r15 - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%r10 - movq %r15,%r14 - rorq $42,%r15 - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%r15 - shrq $6,%r14 - - rorq $19,%r15 - xorq %r13,%r12 - xorq %r14,%r15 - addq 24(%rsp),%r12 - - addq 80(%rsp),%r12 - movq %rcx,%r13 - addq %r15,%r12 - movq %r10,%r14 - rorq $23,%r13 - movq %rdx,%r15 - - xorq %rcx,%r13 - rorq $5,%r14 - xorq %r8,%r15 - - movq %r12,80(%rsp) - xorq %r10,%r14 - andq %rcx,%r15 - - rorq $4,%r13 - addq %r9,%r12 - xorq %r8,%r15 - - rorq $6,%r14 - xorq %rcx,%r13 - addq %r15,%r12 - - movq %r10,%r15 - addq (%rbp),%r12 - xorq %r10,%r14 - - xorq %r11,%r15 - rorq $14,%r13 - movq %r11,%r9 - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%r9 - addq %r12,%rbx - addq %r12,%r9 - - leaq 8(%rbp),%rbp - movq 96(%rsp),%r13 - movq 72(%rsp),%rdi - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%r9 - movq %rdi,%r14 - rorq $42,%rdi - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%rdi - shrq $6,%r14 - - rorq $19,%rdi - xorq %r13,%r12 - xorq %r14,%rdi - addq 32(%rsp),%r12 - - addq 88(%rsp),%r12 - movq %rbx,%r13 - addq %rdi,%r12 - movq %r9,%r14 - rorq $23,%r13 - movq %rcx,%rdi - - xorq %rbx,%r13 - rorq $5,%r14 - xorq %rdx,%rdi - - movq %r12,88(%rsp) - xorq %r9,%r14 - andq %rbx,%rdi - - rorq $4,%r13 - addq %r8,%r12 - xorq %rdx,%rdi - - rorq $6,%r14 - xorq %rbx,%r13 - addq %rdi,%r12 - - movq %r9,%rdi - addq (%rbp),%r12 - xorq %r9,%r14 - - xorq %r10,%rdi - rorq $14,%r13 - movq %r10,%r8 - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%r8 - addq %r12,%rax - addq %r12,%r8 - - leaq 24(%rbp),%rbp - movq 104(%rsp),%r13 - movq 80(%rsp),%r15 - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%r8 - movq %r15,%r14 - rorq $42,%r15 - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%r15 - shrq $6,%r14 - - rorq $19,%r15 - xorq %r13,%r12 - xorq %r14,%r15 - addq 40(%rsp),%r12 - - addq 96(%rsp),%r12 - movq %rax,%r13 - addq %r15,%r12 - movq %r8,%r14 - rorq $23,%r13 - movq %rbx,%r15 - - xorq %rax,%r13 - rorq $5,%r14 - xorq %rcx,%r15 - - movq %r12,96(%rsp) - xorq %r8,%r14 - andq %rax,%r15 - - rorq $4,%r13 - addq %rdx,%r12 - xorq %rcx,%r15 - - rorq $6,%r14 - xorq %rax,%r13 - addq %r15,%r12 - - movq %r8,%r15 - addq (%rbp),%r12 - xorq %r8,%r14 - - xorq %r9,%r15 - rorq $14,%r13 - movq %r9,%rdx - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%rdx - addq %r12,%r11 - addq %r12,%rdx - - leaq 8(%rbp),%rbp - movq 112(%rsp),%r13 - movq 88(%rsp),%rdi - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%rdx - movq %rdi,%r14 - rorq $42,%rdi - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%rdi - shrq $6,%r14 - - rorq $19,%rdi - xorq %r13,%r12 - xorq %r14,%rdi - addq 48(%rsp),%r12 - - addq 104(%rsp),%r12 - movq %r11,%r13 - addq %rdi,%r12 - movq %rdx,%r14 - rorq $23,%r13 - movq %rax,%rdi - - xorq %r11,%r13 - rorq $5,%r14 - xorq %rbx,%rdi - - movq %r12,104(%rsp) - xorq %rdx,%r14 - andq %r11,%rdi - - rorq $4,%r13 - addq %rcx,%r12 - xorq %rbx,%rdi - - rorq $6,%r14 - xorq %r11,%r13 - addq %rdi,%r12 - - movq %rdx,%rdi - addq (%rbp),%r12 - xorq %rdx,%r14 - - xorq %r8,%rdi - rorq $14,%r13 - movq %r8,%rcx - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%rcx - addq %r12,%r10 - addq %r12,%rcx - - leaq 24(%rbp),%rbp - movq 120(%rsp),%r13 - movq 96(%rsp),%r15 - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%rcx - movq %r15,%r14 - rorq $42,%r15 - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%r15 - shrq $6,%r14 - - rorq $19,%r15 - xorq %r13,%r12 - xorq %r14,%r15 - addq 56(%rsp),%r12 - - addq 112(%rsp),%r12 - movq %r10,%r13 - addq %r15,%r12 - movq %rcx,%r14 - rorq $23,%r13 - movq %r11,%r15 - - xorq %r10,%r13 - rorq $5,%r14 - xorq %rax,%r15 - - movq %r12,112(%rsp) - xorq %rcx,%r14 - andq %r10,%r15 - - rorq $4,%r13 - addq %rbx,%r12 - xorq %rax,%r15 - - rorq $6,%r14 - xorq %r10,%r13 - addq %r15,%r12 - - movq %rcx,%r15 - addq (%rbp),%r12 - xorq %rcx,%r14 - - xorq %rdx,%r15 - rorq $14,%r13 - movq %rdx,%rbx - - andq %r15,%rdi - rorq $28,%r14 - addq %r13,%r12 - - xorq %rdi,%rbx - addq %r12,%r9 - addq %r12,%rbx - - leaq 8(%rbp),%rbp - movq 0(%rsp),%r13 - movq 104(%rsp),%rdi - - movq %r13,%r12 - rorq $7,%r13 - addq %r14,%rbx - movq %rdi,%r14 - rorq $42,%rdi - - xorq %r12,%r13 - shrq $7,%r12 - rorq $1,%r13 - xorq %r14,%rdi - shrq $6,%r14 - - rorq $19,%rdi - xorq %r13,%r12 - xorq %r14,%rdi - addq 64(%rsp),%r12 - - addq 120(%rsp),%r12 - movq %r9,%r13 - addq %rdi,%r12 - movq %rbx,%r14 - rorq $23,%r13 - movq %r10,%rdi - - xorq %r9,%r13 - rorq $5,%r14 - xorq %r11,%rdi - - movq %r12,120(%rsp) - xorq %rbx,%r14 - andq %r9,%rdi - - rorq $4,%r13 - addq %rax,%r12 - xorq %r11,%rdi - - rorq $6,%r14 - xorq %r9,%r13 - addq %rdi,%r12 - - movq %rbx,%rdi - addq (%rbp),%r12 - xorq %rbx,%r14 - - xorq %rcx,%rdi - rorq $14,%r13 - movq %rcx,%rax - - andq %rdi,%r15 - rorq $28,%r14 - addq %r13,%r12 - - xorq %r15,%rax - addq %r12,%r8 - addq %r12,%rax - - leaq 24(%rbp),%rbp - cmpb $0,7(%rbp) - jnz L$rounds_16_xx - - movq 128+0(%rsp),%rdi - addq %r14,%rax - leaq 128(%rsi),%rsi - - addq 0(%rdi),%rax - addq 8(%rdi),%rbx - addq 16(%rdi),%rcx - addq 24(%rdi),%rdx - addq 32(%rdi),%r8 - addq 40(%rdi),%r9 - addq 48(%rdi),%r10 - addq 56(%rdi),%r11 - - cmpq 128+16(%rsp),%rsi - - movq %rax,0(%rdi) - movq %rbx,8(%rdi) - movq %rcx,16(%rdi) - movq %rdx,24(%rdi) - movq %r8,32(%rdi) - movq %r9,40(%rdi) - movq %r10,48(%rdi) - movq %r11,56(%rdi) - jb L$loop - - movq 128+24(%rsp),%rsi - movq (%rsi),%r15 - movq 8(%rsi),%r14 - movq 16(%rsi),%r13 - movq 24(%rsi),%r12 - movq 32(%rsi),%rbp - movq 40(%rsi),%rbx - leaq 48(%rsi),%rsp -L$epilogue: - .byte 0xf3,0xc3 - -.p2align 6 - -K512: -.quad 0x428a2f98d728ae22,0x7137449123ef65cd -.quad 0x428a2f98d728ae22,0x7137449123ef65cd -.quad 0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc -.quad 0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc -.quad 0x3956c25bf348b538,0x59f111f1b605d019 -.quad 0x3956c25bf348b538,0x59f111f1b605d019 -.quad 0x923f82a4af194f9b,0xab1c5ed5da6d8118 -.quad 0x923f82a4af194f9b,0xab1c5ed5da6d8118 -.quad 0xd807aa98a3030242,0x12835b0145706fbe -.quad 0xd807aa98a3030242,0x12835b0145706fbe -.quad 0x243185be4ee4b28c,0x550c7dc3d5ffb4e2 -.quad 0x243185be4ee4b28c,0x550c7dc3d5ffb4e2 -.quad 0x72be5d74f27b896f,0x80deb1fe3b1696b1 -.quad 0x72be5d74f27b896f,0x80deb1fe3b1696b1 -.quad 0x9bdc06a725c71235,0xc19bf174cf692694 -.quad 0x9bdc06a725c71235,0xc19bf174cf692694 -.quad 0xe49b69c19ef14ad2,0xefbe4786384f25e3 -.quad 0xe49b69c19ef14ad2,0xefbe4786384f25e3 -.quad 0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65 -.quad 0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65 -.quad 0x2de92c6f592b0275,0x4a7484aa6ea6e483 -.quad 0x2de92c6f592b0275,0x4a7484aa6ea6e483 -.quad 0x5cb0a9dcbd41fbd4,0x76f988da831153b5 -.quad 0x5cb0a9dcbd41fbd4,0x76f988da831153b5 -.quad 0x983e5152ee66dfab,0xa831c66d2db43210 -.quad 0x983e5152ee66dfab,0xa831c66d2db43210 -.quad 0xb00327c898fb213f,0xbf597fc7beef0ee4 -.quad 0xb00327c898fb213f,0xbf597fc7beef0ee4 -.quad 0xc6e00bf33da88fc2,0xd5a79147930aa725 -.quad 0xc6e00bf33da88fc2,0xd5a79147930aa725 -.quad 0x06ca6351e003826f,0x142929670a0e6e70 -.quad 0x06ca6351e003826f,0x142929670a0e6e70 -.quad 0x27b70a8546d22ffc,0x2e1b21385c26c926 -.quad 0x27b70a8546d22ffc,0x2e1b21385c26c926 -.quad 0x4d2c6dfc5ac42aed,0x53380d139d95b3df -.quad 0x4d2c6dfc5ac42aed,0x53380d139d95b3df -.quad 0x650a73548baf63de,0x766a0abb3c77b2a8 -.quad 0x650a73548baf63de,0x766a0abb3c77b2a8 -.quad 0x81c2c92e47edaee6,0x92722c851482353b -.quad 0x81c2c92e47edaee6,0x92722c851482353b -.quad 0xa2bfe8a14cf10364,0xa81a664bbc423001 -.quad 0xa2bfe8a14cf10364,0xa81a664bbc423001 -.quad 0xc24b8b70d0f89791,0xc76c51a30654be30 -.quad 0xc24b8b70d0f89791,0xc76c51a30654be30 -.quad 0xd192e819d6ef5218,0xd69906245565a910 -.quad 0xd192e819d6ef5218,0xd69906245565a910 -.quad 0xf40e35855771202a,0x106aa07032bbd1b8 -.quad 0xf40e35855771202a,0x106aa07032bbd1b8 -.quad 0x19a4c116b8d2d0c8,0x1e376c085141ab53 -.quad 0x19a4c116b8d2d0c8,0x1e376c085141ab53 -.quad 0x2748774cdf8eeb99,0x34b0bcb5e19b48a8 -.quad 0x2748774cdf8eeb99,0x34b0bcb5e19b48a8 -.quad 0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb -.quad 0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb -.quad 0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3 -.quad 0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3 -.quad 0x748f82ee5defb2fc,0x78a5636f43172f60 -.quad 0x748f82ee5defb2fc,0x78a5636f43172f60 -.quad 0x84c87814a1f0ab72,0x8cc702081a6439ec -.quad 0x84c87814a1f0ab72,0x8cc702081a6439ec -.quad 0x90befffa23631e28,0xa4506cebde82bde9 -.quad 0x90befffa23631e28,0xa4506cebde82bde9 -.quad 0xbef9a3f7b2c67915,0xc67178f2e372532b -.quad 0xbef9a3f7b2c67915,0xc67178f2e372532b -.quad 0xca273eceea26619c,0xd186b8c721c0c207 -.quad 0xca273eceea26619c,0xd186b8c721c0c207 -.quad 0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178 -.quad 0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178 -.quad 0x06f067aa72176fba,0x0a637dc5a2c898a6 -.quad 0x06f067aa72176fba,0x0a637dc5a2c898a6 -.quad 0x113f9804bef90dae,0x1b710b35131c471b -.quad 0x113f9804bef90dae,0x1b710b35131c471b -.quad 0x28db77f523047d84,0x32caab7b40c72493 -.quad 0x28db77f523047d84,0x32caab7b40c72493 -.quad 0x3c9ebe0a15c9bebc,0x431d67c49c100d4c -.quad 0x3c9ebe0a15c9bebc,0x431d67c49c100d4c -.quad 0x4cc5d4becb3e42b6,0x597f299cfc657e2a -.quad 0x4cc5d4becb3e42b6,0x597f299cfc657e2a -.quad 0x5fcb6fab3ad6faec,0x6c44198c4a475817 -.quad 0x5fcb6fab3ad6faec,0x6c44198c4a475817 - -.quad 0x0001020304050607,0x08090a0b0c0d0e0f -.quad 0x0001020304050607,0x08090a0b0c0d0e0f -.byte 83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -#endif diff --git a/third_party/boringssl/win-x86/crypto/aes/aes-586.asm b/third_party/boringssl/win-x86/crypto/aes/aes-586.asm deleted file mode 100644 index 42ca0267e7a10..0000000000000 --- a/third_party/boringssl/win-x86/crypto/aes/aes-586.asm +++ /dev/null @@ -1,3219 +0,0 @@ -%ifidn __OUTPUT_FORMAT__,obj -section code use32 class=code align=64 -%elifidn __OUTPUT_FORMAT__,win32 -%ifdef __YASM_VERSION_ID__ -%if __YASM_VERSION_ID__ < 01010000h -%error yasm version 1.1.0 or later needed. -%endif -; Yasm automatically includes .00 and complains about redefining it. -; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html -%else -$@feat.00 equ 1 -%endif -section .text code align=64 -%else -section .text code -%endif -align 16 -__x86_AES_encrypt_compact: - mov DWORD [20+esp],edi - xor eax,DWORD [edi] - xor ebx,DWORD [4+edi] - xor ecx,DWORD [8+edi] - xor edx,DWORD [12+edi] - mov esi,DWORD [240+edi] - lea esi,[esi*1+esi-2] - lea esi,[esi*8+edi] - mov DWORD [24+esp],esi - mov edi,DWORD [ebp-128] - mov esi,DWORD [ebp-96] - mov edi,DWORD [ebp-64] - mov esi,DWORD [ebp-32] - mov edi,DWORD [ebp] - mov esi,DWORD [32+ebp] - mov edi,DWORD [64+ebp] - mov esi,DWORD [96+ebp] -align 16 -L$000loop: - mov esi,eax - and esi,255 - movzx esi,BYTE [esi*1+ebp-128] - movzx edi,bh - movzx edi,BYTE [edi*1+ebp-128] - shl edi,8 - xor esi,edi - mov edi,ecx - shr edi,16 - and edi,255 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,16 - xor esi,edi - mov edi,edx - shr edi,24 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,24 - xor esi,edi - mov DWORD [4+esp],esi - mov esi,ebx - and esi,255 - shr ebx,16 - movzx esi,BYTE [esi*1+ebp-128] - movzx edi,ch - movzx edi,BYTE [edi*1+ebp-128] - shl edi,8 - xor esi,edi - mov edi,edx - shr edi,16 - and edi,255 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,16 - xor esi,edi - mov edi,eax - shr edi,24 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,24 - xor esi,edi - mov DWORD [8+esp],esi - mov esi,ecx - and esi,255 - shr ecx,24 - movzx esi,BYTE [esi*1+ebp-128] - movzx edi,dh - movzx edi,BYTE [edi*1+ebp-128] - shl edi,8 - xor esi,edi - mov edi,eax - shr edi,16 - and edx,255 - and edi,255 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,16 - xor esi,edi - movzx edi,bh - movzx edi,BYTE [edi*1+ebp-128] - shl edi,24 - xor esi,edi - and edx,255 - movzx edx,BYTE [edx*1+ebp-128] - movzx eax,ah - movzx eax,BYTE [eax*1+ebp-128] - shl eax,8 - xor edx,eax - mov eax,DWORD [4+esp] - and ebx,255 - movzx ebx,BYTE [ebx*1+ebp-128] - shl ebx,16 - xor edx,ebx - mov ebx,DWORD [8+esp] - movzx ecx,BYTE [ecx*1+ebp-128] - shl ecx,24 - xor edx,ecx - mov ecx,esi - mov ebp,2155905152 - and ebp,ecx - lea edi,[ecx*1+ecx] - mov esi,ebp - shr ebp,7 - and edi,4278124286 - sub esi,ebp - mov ebp,ecx - and esi,454761243 - ror ebp,16 - xor esi,edi - mov edi,ecx - xor ecx,esi - ror edi,24 - xor esi,ebp - rol ecx,24 - xor esi,edi - mov ebp,2155905152 - xor ecx,esi - and ebp,edx - lea edi,[edx*1+edx] - mov esi,ebp - shr ebp,7 - and edi,4278124286 - sub esi,ebp - mov ebp,edx - and esi,454761243 - ror ebp,16 - xor esi,edi - mov edi,edx - xor edx,esi - ror edi,24 - xor esi,ebp - rol edx,24 - xor esi,edi - mov ebp,2155905152 - xor edx,esi - and ebp,eax - lea edi,[eax*1+eax] - mov esi,ebp - shr ebp,7 - and edi,4278124286 - sub esi,ebp - mov ebp,eax - and esi,454761243 - ror ebp,16 - xor esi,edi - mov edi,eax - xor eax,esi - ror edi,24 - xor esi,ebp - rol eax,24 - xor esi,edi - mov ebp,2155905152 - xor eax,esi - and ebp,ebx - lea edi,[ebx*1+ebx] - mov esi,ebp - shr ebp,7 - and edi,4278124286 - sub esi,ebp - mov ebp,ebx - and esi,454761243 - ror ebp,16 - xor esi,edi - mov edi,ebx - xor ebx,esi - ror edi,24 - xor esi,ebp - rol ebx,24 - xor esi,edi - xor ebx,esi - mov edi,DWORD [20+esp] - mov ebp,DWORD [28+esp] - add edi,16 - xor eax,DWORD [edi] - xor ebx,DWORD [4+edi] - xor ecx,DWORD [8+edi] - xor edx,DWORD [12+edi] - cmp edi,DWORD [24+esp] - mov DWORD [20+esp],edi - jb NEAR L$000loop - mov esi,eax - and esi,255 - movzx esi,BYTE [esi*1+ebp-128] - movzx edi,bh - movzx edi,BYTE [edi*1+ebp-128] - shl edi,8 - xor esi,edi - mov edi,ecx - shr edi,16 - and edi,255 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,16 - xor esi,edi - mov edi,edx - shr edi,24 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,24 - xor esi,edi - mov DWORD [4+esp],esi - mov esi,ebx - and esi,255 - shr ebx,16 - movzx esi,BYTE [esi*1+ebp-128] - movzx edi,ch - movzx edi,BYTE [edi*1+ebp-128] - shl edi,8 - xor esi,edi - mov edi,edx - shr edi,16 - and edi,255 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,16 - xor esi,edi - mov edi,eax - shr edi,24 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,24 - xor esi,edi - mov DWORD [8+esp],esi - mov esi,ecx - and esi,255 - shr ecx,24 - movzx esi,BYTE [esi*1+ebp-128] - movzx edi,dh - movzx edi,BYTE [edi*1+ebp-128] - shl edi,8 - xor esi,edi - mov edi,eax - shr edi,16 - and edx,255 - and edi,255 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,16 - xor esi,edi - movzx edi,bh - movzx edi,BYTE [edi*1+ebp-128] - shl edi,24 - xor esi,edi - mov edi,DWORD [20+esp] - and edx,255 - movzx edx,BYTE [edx*1+ebp-128] - movzx eax,ah - movzx eax,BYTE [eax*1+ebp-128] - shl eax,8 - xor edx,eax - mov eax,DWORD [4+esp] - and ebx,255 - movzx ebx,BYTE [ebx*1+ebp-128] - shl ebx,16 - xor edx,ebx - mov ebx,DWORD [8+esp] - movzx ecx,BYTE [ecx*1+ebp-128] - shl ecx,24 - xor edx,ecx - mov ecx,esi - xor eax,DWORD [16+edi] - xor ebx,DWORD [20+edi] - xor ecx,DWORD [24+edi] - xor edx,DWORD [28+edi] - ret -align 16 -__sse_AES_encrypt_compact: - pxor mm0,[edi] - pxor mm4,[8+edi] - mov esi,DWORD [240+edi] - lea esi,[esi*1+esi-2] - lea esi,[esi*8+edi] - mov DWORD [24+esp],esi - mov eax,454761243 - mov DWORD [8+esp],eax - mov DWORD [12+esp],eax - mov eax,DWORD [ebp-128] - mov ebx,DWORD [ebp-96] - mov ecx,DWORD [ebp-64] - mov edx,DWORD [ebp-32] - mov eax,DWORD [ebp] - mov ebx,DWORD [32+ebp] - mov ecx,DWORD [64+ebp] - mov edx,DWORD [96+ebp] -align 16 -L$001loop: - pshufw mm1,mm0,8 - pshufw mm5,mm4,13 - movd eax,mm1 - movd ebx,mm5 - mov DWORD [20+esp],edi - movzx esi,al - movzx edx,ah - pshufw mm2,mm0,13 - movzx ecx,BYTE [esi*1+ebp-128] - movzx edi,bl - movzx edx,BYTE [edx*1+ebp-128] - shr eax,16 - shl edx,8 - movzx esi,BYTE [edi*1+ebp-128] - movzx edi,bh - shl esi,16 - pshufw mm6,mm4,8 - or ecx,esi - movzx esi,BYTE [edi*1+ebp-128] - movzx edi,ah - shl esi,24 - shr ebx,16 - or edx,esi - movzx esi,BYTE [edi*1+ebp-128] - movzx edi,bh - shl esi,8 - or ecx,esi - movzx esi,BYTE [edi*1+ebp-128] - movzx edi,al - shl esi,24 - or ecx,esi - movzx esi,BYTE [edi*1+ebp-128] - movzx edi,bl - movd eax,mm2 - movd mm0,ecx - movzx ecx,BYTE [edi*1+ebp-128] - movzx edi,ah - shl ecx,16 - movd ebx,mm6 - or ecx,esi - movzx esi,BYTE [edi*1+ebp-128] - movzx edi,bh - shl esi,24 - or ecx,esi - movzx esi,BYTE [edi*1+ebp-128] - movzx edi,bl - shl esi,8 - shr ebx,16 - or ecx,esi - movzx esi,BYTE [edi*1+ebp-128] - movzx edi,al - shr eax,16 - movd mm1,ecx - movzx ecx,BYTE [edi*1+ebp-128] - movzx edi,ah - shl ecx,16 - and eax,255 - or ecx,esi - punpckldq mm0,mm1 - movzx esi,BYTE [edi*1+ebp-128] - movzx edi,bh - shl esi,24 - and ebx,255 - movzx eax,BYTE [eax*1+ebp-128] - or ecx,esi - shl eax,16 - movzx esi,BYTE [edi*1+ebp-128] - or edx,eax - shl esi,8 - movzx ebx,BYTE [ebx*1+ebp-128] - or ecx,esi - or edx,ebx - mov edi,DWORD [20+esp] - movd mm4,ecx - movd mm5,edx - punpckldq mm4,mm5 - add edi,16 - cmp edi,DWORD [24+esp] - ja NEAR L$002out - movq mm2,[8+esp] - pxor mm3,mm3 - pxor mm7,mm7 - movq mm1,mm0 - movq mm5,mm4 - pcmpgtb mm3,mm0 - pcmpgtb mm7,mm4 - pand mm3,mm2 - pand mm7,mm2 - pshufw mm2,mm0,177 - pshufw mm6,mm4,177 - paddb mm0,mm0 - paddb mm4,mm4 - pxor mm0,mm3 - pxor mm4,mm7 - pshufw mm3,mm2,177 - pshufw mm7,mm6,177 - pxor mm1,mm0 - pxor mm5,mm4 - pxor mm0,mm2 - pxor mm4,mm6 - movq mm2,mm3 - movq mm6,mm7 - pslld mm3,8 - pslld mm7,8 - psrld mm2,24 - psrld mm6,24 - pxor mm0,mm3 - pxor mm4,mm7 - pxor mm0,mm2 - pxor mm4,mm6 - movq mm3,mm1 - movq mm7,mm5 - movq mm2,[edi] - movq mm6,[8+edi] - psrld mm1,8 - psrld mm5,8 - mov eax,DWORD [ebp-128] - pslld mm3,24 - pslld mm7,24 - mov ebx,DWORD [ebp-64] - pxor mm0,mm1 - pxor mm4,mm5 - mov ecx,DWORD [ebp] - pxor mm0,mm3 - pxor mm4,mm7 - mov edx,DWORD [64+ebp] - pxor mm0,mm2 - pxor mm4,mm6 - jmp NEAR L$001loop -align 16 -L$002out: - pxor mm0,[edi] - pxor mm4,[8+edi] - ret -align 16 -__x86_AES_encrypt: - mov DWORD [20+esp],edi - xor eax,DWORD [edi] - xor ebx,DWORD [4+edi] - xor ecx,DWORD [8+edi] - xor edx,DWORD [12+edi] - mov esi,DWORD [240+edi] - lea esi,[esi*1+esi-2] - lea esi,[esi*8+edi] - mov DWORD [24+esp],esi -align 16 -L$003loop: - mov esi,eax - and esi,255 - mov esi,DWORD [esi*8+ebp] - movzx edi,bh - xor esi,DWORD [3+edi*8+ebp] - mov edi,ecx - shr edi,16 - and edi,255 - xor esi,DWORD [2+edi*8+ebp] - mov edi,edx - shr edi,24 - xor esi,DWORD [1+edi*8+ebp] - mov DWORD [4+esp],esi - mov esi,ebx - and esi,255 - shr ebx,16 - mov esi,DWORD [esi*8+ebp] - movzx edi,ch - xor esi,DWORD [3+edi*8+ebp] - mov edi,edx - shr edi,16 - and edi,255 - xor esi,DWORD [2+edi*8+ebp] - mov edi,eax - shr edi,24 - xor esi,DWORD [1+edi*8+ebp] - mov DWORD [8+esp],esi - mov esi,ecx - and esi,255 - shr ecx,24 - mov esi,DWORD [esi*8+ebp] - movzx edi,dh - xor esi,DWORD [3+edi*8+ebp] - mov edi,eax - shr edi,16 - and edx,255 - and edi,255 - xor esi,DWORD [2+edi*8+ebp] - movzx edi,bh - xor esi,DWORD [1+edi*8+ebp] - mov edi,DWORD [20+esp] - mov edx,DWORD [edx*8+ebp] - movzx eax,ah - xor edx,DWORD [3+eax*8+ebp] - mov eax,DWORD [4+esp] - and ebx,255 - xor edx,DWORD [2+ebx*8+ebp] - mov ebx,DWORD [8+esp] - xor edx,DWORD [1+ecx*8+ebp] - mov ecx,esi - add edi,16 - xor eax,DWORD [edi] - xor ebx,DWORD [4+edi] - xor ecx,DWORD [8+edi] - xor edx,DWORD [12+edi] - cmp edi,DWORD [24+esp] - mov DWORD [20+esp],edi - jb NEAR L$003loop - mov esi,eax - and esi,255 - mov esi,DWORD [2+esi*8+ebp] - and esi,255 - movzx edi,bh - mov edi,DWORD [edi*8+ebp] - and edi,65280 - xor esi,edi - mov edi,ecx - shr edi,16 - and edi,255 - mov edi,DWORD [edi*8+ebp] - and edi,16711680 - xor esi,edi - mov edi,edx - shr edi,24 - mov edi,DWORD [2+edi*8+ebp] - and edi,4278190080 - xor esi,edi - mov DWORD [4+esp],esi - mov esi,ebx - and esi,255 - shr ebx,16 - mov esi,DWORD [2+esi*8+ebp] - and esi,255 - movzx edi,ch - mov edi,DWORD [edi*8+ebp] - and edi,65280 - xor esi,edi - mov edi,edx - shr edi,16 - and edi,255 - mov edi,DWORD [edi*8+ebp] - and edi,16711680 - xor esi,edi - mov edi,eax - shr edi,24 - mov edi,DWORD [2+edi*8+ebp] - and edi,4278190080 - xor esi,edi - mov DWORD [8+esp],esi - mov esi,ecx - and esi,255 - shr ecx,24 - mov esi,DWORD [2+esi*8+ebp] - and esi,255 - movzx edi,dh - mov edi,DWORD [edi*8+ebp] - and edi,65280 - xor esi,edi - mov edi,eax - shr edi,16 - and edx,255 - and edi,255 - mov edi,DWORD [edi*8+ebp] - and edi,16711680 - xor esi,edi - movzx edi,bh - mov edi,DWORD [2+edi*8+ebp] - and edi,4278190080 - xor esi,edi - mov edi,DWORD [20+esp] - and edx,255 - mov edx,DWORD [2+edx*8+ebp] - and edx,255 - movzx eax,ah - mov eax,DWORD [eax*8+ebp] - and eax,65280 - xor edx,eax - mov eax,DWORD [4+esp] - and ebx,255 - mov ebx,DWORD [ebx*8+ebp] - and ebx,16711680 - xor edx,ebx - mov ebx,DWORD [8+esp] - mov ecx,DWORD [2+ecx*8+ebp] - and ecx,4278190080 - xor edx,ecx - mov ecx,esi - add edi,16 - xor eax,DWORD [edi] - xor ebx,DWORD [4+edi] - xor ecx,DWORD [8+edi] - xor edx,DWORD [12+edi] - ret -align 64 -L$AES_Te: -dd 2774754246,2774754246 -dd 2222750968,2222750968 -dd 2574743534,2574743534 -dd 2373680118,2373680118 -dd 234025727,234025727 -dd 3177933782,3177933782 -dd 2976870366,2976870366 -dd 1422247313,1422247313 -dd 1345335392,1345335392 -dd 50397442,50397442 -dd 2842126286,2842126286 -dd 2099981142,2099981142 -dd 436141799,436141799 -dd 1658312629,1658312629 -dd 3870010189,3870010189 -dd 2591454956,2591454956 -dd 1170918031,1170918031 -dd 2642575903,2642575903 -dd 1086966153,1086966153 -dd 2273148410,2273148410 -dd 368769775,368769775 -dd 3948501426,3948501426 -dd 3376891790,3376891790 -dd 200339707,200339707 -dd 3970805057,3970805057 -dd 1742001331,1742001331 -dd 4255294047,4255294047 -dd 3937382213,3937382213 -dd 3214711843,3214711843 -dd 4154762323,4154762323 -dd 2524082916,2524082916 -dd 1539358875,1539358875 -dd 3266819957,3266819957 -dd 486407649,486407649 -dd 2928907069,2928907069 -dd 1780885068,1780885068 -dd 1513502316,1513502316 -dd 1094664062,1094664062 -dd 49805301,49805301 -dd 1338821763,1338821763 -dd 1546925160,1546925160 -dd 4104496465,4104496465 -dd 887481809,887481809 -dd 150073849,150073849 -dd 2473685474,2473685474 -dd 1943591083,1943591083 -dd 1395732834,1395732834 -dd 1058346282,1058346282 -dd 201589768,201589768 -dd 1388824469,1388824469 -dd 1696801606,1696801606 -dd 1589887901,1589887901 -dd 672667696,672667696 -dd 2711000631,2711000631 -dd 251987210,251987210 -dd 3046808111,3046808111 -dd 151455502,151455502 -dd 907153956,907153956 -dd 2608889883,2608889883 -dd 1038279391,1038279391 -dd 652995533,652995533 -dd 1764173646,1764173646 -dd 3451040383,3451040383 -dd 2675275242,2675275242 -dd 453576978,453576978 -dd 2659418909,2659418909 -dd 1949051992,1949051992 -dd 773462580,773462580 -dd 756751158,756751158 -dd 2993581788,2993581788 -dd 3998898868,3998898868 -dd 4221608027,4221608027 -dd 4132590244,4132590244 -dd 1295727478,1295727478 -dd 1641469623,1641469623 -dd 3467883389,3467883389 -dd 2066295122,2066295122 -dd 1055122397,1055122397 -dd 1898917726,1898917726 -dd 2542044179,2542044179 -dd 4115878822,4115878822 -dd 1758581177,1758581177 -dd 0,0 -dd 753790401,753790401 -dd 1612718144,1612718144 -dd 536673507,536673507 -dd 3367088505,3367088505 -dd 3982187446,3982187446 -dd 3194645204,3194645204 -dd 1187761037,1187761037 -dd 3653156455,3653156455 -dd 1262041458,1262041458 -dd 3729410708,3729410708 -dd 3561770136,3561770136 -dd 3898103984,3898103984 -dd 1255133061,1255133061 -dd 1808847035,1808847035 -dd 720367557,720367557 -dd 3853167183,3853167183 -dd 385612781,385612781 -dd 3309519750,3309519750 -dd 3612167578,3612167578 -dd 1429418854,1429418854 -dd 2491778321,2491778321 -dd 3477423498,3477423498 -dd 284817897,284817897 -dd 100794884,100794884 -dd 2172616702,2172616702 -dd 4031795360,4031795360 -dd 1144798328,1144798328 -dd 3131023141,3131023141 -dd 3819481163,3819481163 -dd 4082192802,4082192802 -dd 4272137053,4272137053 -dd 3225436288,3225436288 -dd 2324664069,2324664069 -dd 2912064063,2912064063 -dd 3164445985,3164445985 -dd 1211644016,1211644016 -dd 83228145,83228145 -dd 3753688163,3753688163 -dd 3249976951,3249976951 -dd 1977277103,1977277103 -dd 1663115586,1663115586 -dd 806359072,806359072 -dd 452984805,452984805 -dd 250868733,250868733 -dd 1842533055,1842533055 -dd 1288555905,1288555905 -dd 336333848,336333848 -dd 890442534,890442534 -dd 804056259,804056259 -dd 3781124030,3781124030 -dd 2727843637,2727843637 -dd 3427026056,3427026056 -dd 957814574,957814574 -dd 1472513171,1472513171 -dd 4071073621,4071073621 -dd 2189328124,2189328124 -dd 1195195770,1195195770 -dd 2892260552,2892260552 -dd 3881655738,3881655738 -dd 723065138,723065138 -dd 2507371494,2507371494 -dd 2690670784,2690670784 -dd 2558624025,2558624025 -dd 3511635870,3511635870 -dd 2145180835,2145180835 -dd 1713513028,1713513028 -dd 2116692564,2116692564 -dd 2878378043,2878378043 -dd 2206763019,2206763019 -dd 3393603212,3393603212 -dd 703524551,703524551 -dd 3552098411,3552098411 -dd 1007948840,1007948840 -dd 2044649127,2044649127 -dd 3797835452,3797835452 -dd 487262998,487262998 -dd 1994120109,1994120109 -dd 1004593371,1004593371 -dd 1446130276,1446130276 -dd 1312438900,1312438900 -dd 503974420,503974420 -dd 3679013266,3679013266 -dd 168166924,168166924 -dd 1814307912,1814307912 -dd 3831258296,3831258296 -dd 1573044895,1573044895 -dd 1859376061,1859376061 -dd 4021070915,4021070915 -dd 2791465668,2791465668 -dd 2828112185,2828112185 -dd 2761266481,2761266481 -dd 937747667,937747667 -dd 2339994098,2339994098 -dd 854058965,854058965 -dd 1137232011,1137232011 -dd 1496790894,1496790894 -dd 3077402074,3077402074 -dd 2358086913,2358086913 -dd 1691735473,1691735473 -dd 3528347292,3528347292 -dd 3769215305,3769215305 -dd 3027004632,3027004632 -dd 4199962284,4199962284 -dd 133494003,133494003 -dd 636152527,636152527 -dd 2942657994,2942657994 -dd 2390391540,2390391540 -dd 3920539207,3920539207 -dd 403179536,403179536 -dd 3585784431,3585784431 -dd 2289596656,2289596656 -dd 1864705354,1864705354 -dd 1915629148,1915629148 -dd 605822008,605822008 -dd 4054230615,4054230615 -dd 3350508659,3350508659 -dd 1371981463,1371981463 -dd 602466507,602466507 -dd 2094914977,2094914977 -dd 2624877800,2624877800 -dd 555687742,555687742 -dd 3712699286,3712699286 -dd 3703422305,3703422305 -dd 2257292045,2257292045 -dd 2240449039,2240449039 -dd 2423288032,2423288032 -dd 1111375484,1111375484 -dd 3300242801,3300242801 -dd 2858837708,2858837708 -dd 3628615824,3628615824 -dd 84083462,84083462 -dd 32962295,32962295 -dd 302911004,302911004 -dd 2741068226,2741068226 -dd 1597322602,1597322602 -dd 4183250862,4183250862 -dd 3501832553,3501832553 -dd 2441512471,2441512471 -dd 1489093017,1489093017 -dd 656219450,656219450 -dd 3114180135,3114180135 -dd 954327513,954327513 -dd 335083755,335083755 -dd 3013122091,3013122091 -dd 856756514,856756514 -dd 3144247762,3144247762 -dd 1893325225,1893325225 -dd 2307821063,2307821063 -dd 2811532339,2811532339 -dd 3063651117,3063651117 -dd 572399164,572399164 -dd 2458355477,2458355477 -dd 552200649,552200649 -dd 1238290055,1238290055 -dd 4283782570,4283782570 -dd 2015897680,2015897680 -dd 2061492133,2061492133 -dd 2408352771,2408352771 -dd 4171342169,4171342169 -dd 2156497161,2156497161 -dd 386731290,386731290 -dd 3669999461,3669999461 -dd 837215959,837215959 -dd 3326231172,3326231172 -dd 3093850320,3093850320 -dd 3275833730,3275833730 -dd 2962856233,2962856233 -dd 1999449434,1999449434 -dd 286199582,286199582 -dd 3417354363,3417354363 -dd 4233385128,4233385128 -dd 3602627437,3602627437 -dd 974525996,974525996 -db 99,124,119,123,242,107,111,197 -db 48,1,103,43,254,215,171,118 -db 202,130,201,125,250,89,71,240 -db 173,212,162,175,156,164,114,192 -db 183,253,147,38,54,63,247,204 -db 52,165,229,241,113,216,49,21 -db 4,199,35,195,24,150,5,154 -db 7,18,128,226,235,39,178,117 -db 9,131,44,26,27,110,90,160 -db 82,59,214,179,41,227,47,132 -db 83,209,0,237,32,252,177,91 -db 106,203,190,57,74,76,88,207 -db 208,239,170,251,67,77,51,133 -db 69,249,2,127,80,60,159,168 -db 81,163,64,143,146,157,56,245 -db 188,182,218,33,16,255,243,210 -db 205,12,19,236,95,151,68,23 -db 196,167,126,61,100,93,25,115 -db 96,129,79,220,34,42,144,136 -db 70,238,184,20,222,94,11,219 -db 224,50,58,10,73,6,36,92 -db 194,211,172,98,145,149,228,121 -db 231,200,55,109,141,213,78,169 -db 108,86,244,234,101,122,174,8 -db 186,120,37,46,28,166,180,198 -db 232,221,116,31,75,189,139,138 -db 112,62,181,102,72,3,246,14 -db 97,53,87,185,134,193,29,158 -db 225,248,152,17,105,217,142,148 -db 155,30,135,233,206,85,40,223 -db 140,161,137,13,191,230,66,104 -db 65,153,45,15,176,84,187,22 -db 99,124,119,123,242,107,111,197 -db 48,1,103,43,254,215,171,118 -db 202,130,201,125,250,89,71,240 -db 173,212,162,175,156,164,114,192 -db 183,253,147,38,54,63,247,204 -db 52,165,229,241,113,216,49,21 -db 4,199,35,195,24,150,5,154 -db 7,18,128,226,235,39,178,117 -db 9,131,44,26,27,110,90,160 -db 82,59,214,179,41,227,47,132 -db 83,209,0,237,32,252,177,91 -db 106,203,190,57,74,76,88,207 -db 208,239,170,251,67,77,51,133 -db 69,249,2,127,80,60,159,168 -db 81,163,64,143,146,157,56,245 -db 188,182,218,33,16,255,243,210 -db 205,12,19,236,95,151,68,23 -db 196,167,126,61,100,93,25,115 -db 96,129,79,220,34,42,144,136 -db 70,238,184,20,222,94,11,219 -db 224,50,58,10,73,6,36,92 -db 194,211,172,98,145,149,228,121 -db 231,200,55,109,141,213,78,169 -db 108,86,244,234,101,122,174,8 -db 186,120,37,46,28,166,180,198 -db 232,221,116,31,75,189,139,138 -db 112,62,181,102,72,3,246,14 -db 97,53,87,185,134,193,29,158 -db 225,248,152,17,105,217,142,148 -db 155,30,135,233,206,85,40,223 -db 140,161,137,13,191,230,66,104 -db 65,153,45,15,176,84,187,22 -db 99,124,119,123,242,107,111,197 -db 48,1,103,43,254,215,171,118 -db 202,130,201,125,250,89,71,240 -db 173,212,162,175,156,164,114,192 -db 183,253,147,38,54,63,247,204 -db 52,165,229,241,113,216,49,21 -db 4,199,35,195,24,150,5,154 -db 7,18,128,226,235,39,178,117 -db 9,131,44,26,27,110,90,160 -db 82,59,214,179,41,227,47,132 -db 83,209,0,237,32,252,177,91 -db 106,203,190,57,74,76,88,207 -db 208,239,170,251,67,77,51,133 -db 69,249,2,127,80,60,159,168 -db 81,163,64,143,146,157,56,245 -db 188,182,218,33,16,255,243,210 -db 205,12,19,236,95,151,68,23 -db 196,167,126,61,100,93,25,115 -db 96,129,79,220,34,42,144,136 -db 70,238,184,20,222,94,11,219 -db 224,50,58,10,73,6,36,92 -db 194,211,172,98,145,149,228,121 -db 231,200,55,109,141,213,78,169 -db 108,86,244,234,101,122,174,8 -db 186,120,37,46,28,166,180,198 -db 232,221,116,31,75,189,139,138 -db 112,62,181,102,72,3,246,14 -db 97,53,87,185,134,193,29,158 -db 225,248,152,17,105,217,142,148 -db 155,30,135,233,206,85,40,223 -db 140,161,137,13,191,230,66,104 -db 65,153,45,15,176,84,187,22 -db 99,124,119,123,242,107,111,197 -db 48,1,103,43,254,215,171,118 -db 202,130,201,125,250,89,71,240 -db 173,212,162,175,156,164,114,192 -db 183,253,147,38,54,63,247,204 -db 52,165,229,241,113,216,49,21 -db 4,199,35,195,24,150,5,154 -db 7,18,128,226,235,39,178,117 -db 9,131,44,26,27,110,90,160 -db 82,59,214,179,41,227,47,132 -db 83,209,0,237,32,252,177,91 -db 106,203,190,57,74,76,88,207 -db 208,239,170,251,67,77,51,133 -db 69,249,2,127,80,60,159,168 -db 81,163,64,143,146,157,56,245 -db 188,182,218,33,16,255,243,210 -db 205,12,19,236,95,151,68,23 -db 196,167,126,61,100,93,25,115 -db 96,129,79,220,34,42,144,136 -db 70,238,184,20,222,94,11,219 -db 224,50,58,10,73,6,36,92 -db 194,211,172,98,145,149,228,121 -db 231,200,55,109,141,213,78,169 -db 108,86,244,234,101,122,174,8 -db 186,120,37,46,28,166,180,198 -db 232,221,116,31,75,189,139,138 -db 112,62,181,102,72,3,246,14 -db 97,53,87,185,134,193,29,158 -db 225,248,152,17,105,217,142,148 -db 155,30,135,233,206,85,40,223 -db 140,161,137,13,191,230,66,104 -db 65,153,45,15,176,84,187,22 -dd 1,2,4,8 -dd 16,32,64,128 -dd 27,54,0,0 -dd 0,0,0,0 -global _asm_AES_encrypt -align 16 -_asm_AES_encrypt: -L$_asm_AES_encrypt_begin: - push ebp - push ebx - push esi - push edi - mov esi,DWORD [20+esp] - mov edi,DWORD [28+esp] - mov eax,esp - sub esp,36 - and esp,-64 - lea ebx,[edi-127] - sub ebx,esp - neg ebx - and ebx,960 - sub esp,ebx - add esp,4 - mov DWORD [28+esp],eax - call L$004pic_point -L$004pic_point: - pop ebp - lea eax,[_OPENSSL_ia32cap_P] - lea ebp,[(L$AES_Te-L$004pic_point)+ebp] - lea ebx,[764+esp] - sub ebx,ebp - and ebx,768 - lea ebp,[2176+ebx*1+ebp] - bt DWORD [eax],25 - jnc NEAR L$005x86 - movq mm0,[esi] - movq mm4,[8+esi] - call __sse_AES_encrypt_compact - mov esp,DWORD [28+esp] - mov esi,DWORD [24+esp] - movq [esi],mm0 - movq [8+esi],mm4 - emms - pop edi - pop esi - pop ebx - pop ebp - ret -align 16 -L$005x86: - mov DWORD [24+esp],ebp - mov eax,DWORD [esi] - mov ebx,DWORD [4+esi] - mov ecx,DWORD [8+esi] - mov edx,DWORD [12+esi] - call __x86_AES_encrypt_compact - mov esp,DWORD [28+esp] - mov esi,DWORD [24+esp] - mov DWORD [esi],eax - mov DWORD [4+esi],ebx - mov DWORD [8+esi],ecx - mov DWORD [12+esi],edx - pop edi - pop esi - pop ebx - pop ebp - ret -align 16 -__x86_AES_decrypt_compact: - mov DWORD [20+esp],edi - xor eax,DWORD [edi] - xor ebx,DWORD [4+edi] - xor ecx,DWORD [8+edi] - xor edx,DWORD [12+edi] - mov esi,DWORD [240+edi] - lea esi,[esi*1+esi-2] - lea esi,[esi*8+edi] - mov DWORD [24+esp],esi - mov edi,DWORD [ebp-128] - mov esi,DWORD [ebp-96] - mov edi,DWORD [ebp-64] - mov esi,DWORD [ebp-32] - mov edi,DWORD [ebp] - mov esi,DWORD [32+ebp] - mov edi,DWORD [64+ebp] - mov esi,DWORD [96+ebp] -align 16 -L$006loop: - mov esi,eax - and esi,255 - movzx esi,BYTE [esi*1+ebp-128] - movzx edi,dh - movzx edi,BYTE [edi*1+ebp-128] - shl edi,8 - xor esi,edi - mov edi,ecx - shr edi,16 - and edi,255 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,16 - xor esi,edi - mov edi,ebx - shr edi,24 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,24 - xor esi,edi - mov DWORD [4+esp],esi - mov esi,ebx - and esi,255 - movzx esi,BYTE [esi*1+ebp-128] - movzx edi,ah - movzx edi,BYTE [edi*1+ebp-128] - shl edi,8 - xor esi,edi - mov edi,edx - shr edi,16 - and edi,255 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,16 - xor esi,edi - mov edi,ecx - shr edi,24 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,24 - xor esi,edi - mov DWORD [8+esp],esi - mov esi,ecx - and esi,255 - movzx esi,BYTE [esi*1+ebp-128] - movzx edi,bh - movzx edi,BYTE [edi*1+ebp-128] - shl edi,8 - xor esi,edi - mov edi,eax - shr edi,16 - and edi,255 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,16 - xor esi,edi - mov edi,edx - shr edi,24 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,24 - xor esi,edi - and edx,255 - movzx edx,BYTE [edx*1+ebp-128] - movzx ecx,ch - movzx ecx,BYTE [ecx*1+ebp-128] - shl ecx,8 - xor edx,ecx - mov ecx,esi - shr ebx,16 - and ebx,255 - movzx ebx,BYTE [ebx*1+ebp-128] - shl ebx,16 - xor edx,ebx - shr eax,24 - movzx eax,BYTE [eax*1+ebp-128] - shl eax,24 - xor edx,eax - mov edi,2155905152 - and edi,ecx - mov esi,edi - shr edi,7 - lea eax,[ecx*1+ecx] - sub esi,edi - and eax,4278124286 - and esi,454761243 - xor eax,esi - mov edi,2155905152 - and edi,eax - mov esi,edi - shr edi,7 - lea ebx,[eax*1+eax] - sub esi,edi - and ebx,4278124286 - and esi,454761243 - xor eax,ecx - xor ebx,esi - mov edi,2155905152 - and edi,ebx - mov esi,edi - shr edi,7 - lea ebp,[ebx*1+ebx] - sub esi,edi - and ebp,4278124286 - and esi,454761243 - xor ebx,ecx - rol ecx,8 - xor ebp,esi - xor ecx,eax - xor eax,ebp - xor ecx,ebx - xor ebx,ebp - rol eax,24 - xor ecx,ebp - rol ebx,16 - xor ecx,eax - rol ebp,8 - xor ecx,ebx - mov eax,DWORD [4+esp] - xor ecx,ebp - mov DWORD [12+esp],ecx - mov edi,2155905152 - and edi,edx - mov esi,edi - shr edi,7 - lea ebx,[edx*1+edx] - sub esi,edi - and ebx,4278124286 - and esi,454761243 - xor ebx,esi - mov edi,2155905152 - and edi,ebx - mov esi,edi - shr edi,7 - lea ecx,[ebx*1+ebx] - sub esi,edi - and ecx,4278124286 - and esi,454761243 - xor ebx,edx - xor ecx,esi - mov edi,2155905152 - and edi,ecx - mov esi,edi - shr edi,7 - lea ebp,[ecx*1+ecx] - sub esi,edi - and ebp,4278124286 - and esi,454761243 - xor ecx,edx - rol edx,8 - xor ebp,esi - xor edx,ebx - xor ebx,ebp - xor edx,ecx - xor ecx,ebp - rol ebx,24 - xor edx,ebp - rol ecx,16 - xor edx,ebx - rol ebp,8 - xor edx,ecx - mov ebx,DWORD [8+esp] - xor edx,ebp - mov DWORD [16+esp],edx - mov edi,2155905152 - and edi,eax - mov esi,edi - shr edi,7 - lea ecx,[eax*1+eax] - sub esi,edi - and ecx,4278124286 - and esi,454761243 - xor ecx,esi - mov edi,2155905152 - and edi,ecx - mov esi,edi - shr edi,7 - lea edx,[ecx*1+ecx] - sub esi,edi - and edx,4278124286 - and esi,454761243 - xor ecx,eax - xor edx,esi - mov edi,2155905152 - and edi,edx - mov esi,edi - shr edi,7 - lea ebp,[edx*1+edx] - sub esi,edi - and ebp,4278124286 - and esi,454761243 - xor edx,eax - rol eax,8 - xor ebp,esi - xor eax,ecx - xor ecx,ebp - xor eax,edx - xor edx,ebp - rol ecx,24 - xor eax,ebp - rol edx,16 - xor eax,ecx - rol ebp,8 - xor eax,edx - xor eax,ebp - mov edi,2155905152 - and edi,ebx - mov esi,edi - shr edi,7 - lea ecx,[ebx*1+ebx] - sub esi,edi - and ecx,4278124286 - and esi,454761243 - xor ecx,esi - mov edi,2155905152 - and edi,ecx - mov esi,edi - shr edi,7 - lea edx,[ecx*1+ecx] - sub esi,edi - and edx,4278124286 - and esi,454761243 - xor ecx,ebx - xor edx,esi - mov edi,2155905152 - and edi,edx - mov esi,edi - shr edi,7 - lea ebp,[edx*1+edx] - sub esi,edi - and ebp,4278124286 - and esi,454761243 - xor edx,ebx - rol ebx,8 - xor ebp,esi - xor ebx,ecx - xor ecx,ebp - xor ebx,edx - xor edx,ebp - rol ecx,24 - xor ebx,ebp - rol edx,16 - xor ebx,ecx - rol ebp,8 - xor ebx,edx - mov ecx,DWORD [12+esp] - xor ebx,ebp - mov edx,DWORD [16+esp] - mov edi,DWORD [20+esp] - mov ebp,DWORD [28+esp] - add edi,16 - xor eax,DWORD [edi] - xor ebx,DWORD [4+edi] - xor ecx,DWORD [8+edi] - xor edx,DWORD [12+edi] - cmp edi,DWORD [24+esp] - mov DWORD [20+esp],edi - jb NEAR L$006loop - mov esi,eax - and esi,255 - movzx esi,BYTE [esi*1+ebp-128] - movzx edi,dh - movzx edi,BYTE [edi*1+ebp-128] - shl edi,8 - xor esi,edi - mov edi,ecx - shr edi,16 - and edi,255 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,16 - xor esi,edi - mov edi,ebx - shr edi,24 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,24 - xor esi,edi - mov DWORD [4+esp],esi - mov esi,ebx - and esi,255 - movzx esi,BYTE [esi*1+ebp-128] - movzx edi,ah - movzx edi,BYTE [edi*1+ebp-128] - shl edi,8 - xor esi,edi - mov edi,edx - shr edi,16 - and edi,255 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,16 - xor esi,edi - mov edi,ecx - shr edi,24 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,24 - xor esi,edi - mov DWORD [8+esp],esi - mov esi,ecx - and esi,255 - movzx esi,BYTE [esi*1+ebp-128] - movzx edi,bh - movzx edi,BYTE [edi*1+ebp-128] - shl edi,8 - xor esi,edi - mov edi,eax - shr edi,16 - and edi,255 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,16 - xor esi,edi - mov edi,edx - shr edi,24 - movzx edi,BYTE [edi*1+ebp-128] - shl edi,24 - xor esi,edi - mov edi,DWORD [20+esp] - and edx,255 - movzx edx,BYTE [edx*1+ebp-128] - movzx ecx,ch - movzx ecx,BYTE [ecx*1+ebp-128] - shl ecx,8 - xor edx,ecx - mov ecx,esi - shr ebx,16 - and ebx,255 - movzx ebx,BYTE [ebx*1+ebp-128] - shl ebx,16 - xor edx,ebx - mov ebx,DWORD [8+esp] - shr eax,24 - movzx eax,BYTE [eax*1+ebp-128] - shl eax,24 - xor edx,eax - mov eax,DWORD [4+esp] - xor eax,DWORD [16+edi] - xor ebx,DWORD [20+edi] - xor ecx,DWORD [24+edi] - xor edx,DWORD [28+edi] - ret -align 16 -__sse_AES_decrypt_compact: - pxor mm0,[edi] - pxor mm4,[8+edi] - mov esi,DWORD [240+edi] - lea esi,[esi*1+esi-2] - lea esi,[esi*8+edi] - mov DWORD [24+esp],esi - mov eax,454761243 - mov DWORD [8+esp],eax - mov DWORD [12+esp],eax - mov eax,DWORD [ebp-128] - mov ebx,DWORD [ebp-96] - mov ecx,DWORD [ebp-64] - mov edx,DWORD [ebp-32] - mov eax,DWORD [ebp] - mov ebx,DWORD [32+ebp] - mov ecx,DWORD [64+ebp] - mov edx,DWORD [96+ebp] -align 16 -L$007loop: - pshufw mm1,mm0,12 - pshufw mm5,mm4,9 - movd eax,mm1 - movd ebx,mm5 - mov DWORD [20+esp],edi - movzx esi,al - movzx edx,ah - pshufw mm2,mm0,6 - movzx ecx,BYTE [esi*1+ebp-128] - movzx edi,bl - movzx edx,BYTE [edx*1+ebp-128] - shr eax,16 - shl edx,8 - movzx esi,BYTE [edi*1+ebp-128] - movzx edi,bh - shl esi,16 - pshufw mm6,mm4,3 - or ecx,esi - movzx esi,BYTE [edi*1+ebp-128] - movzx edi,ah - shl esi,24 - shr ebx,16 - or edx,esi - movzx esi,BYTE [edi*1+ebp-128] - movzx edi,bh - shl esi,24 - or ecx,esi - movzx esi,BYTE [edi*1+ebp-128] - movzx edi,al - shl esi,8 - movd eax,mm2 - or ecx,esi - movzx esi,BYTE [edi*1+ebp-128] - movzx edi,bl - shl esi,16 - movd ebx,mm6 - movd mm0,ecx - movzx ecx,BYTE [edi*1+ebp-128] - movzx edi,al - or ecx,esi - movzx esi,BYTE [edi*1+ebp-128] - movzx edi,bl - or edx,esi - movzx esi,BYTE [edi*1+ebp-128] - movzx edi,ah - shl esi,16 - shr eax,16 - or edx,esi - movzx esi,BYTE [edi*1+ebp-128] - movzx edi,bh - shr ebx,16 - shl esi,8 - movd mm1,edx - movzx edx,BYTE [edi*1+ebp-128] - movzx edi,bh - shl edx,24 - and ebx,255 - or edx,esi - punpckldq mm0,mm1 - movzx esi,BYTE [edi*1+ebp-128] - movzx edi,al - shl esi,8 - movzx eax,ah - movzx ebx,BYTE [ebx*1+ebp-128] - or ecx,esi - movzx esi,BYTE [edi*1+ebp-128] - or edx,ebx - shl esi,16 - movzx eax,BYTE [eax*1+ebp-128] - or edx,esi - shl eax,24 - or ecx,eax - mov edi,DWORD [20+esp] - movd mm4,edx - movd mm5,ecx - punpckldq mm4,mm5 - add edi,16 - cmp edi,DWORD [24+esp] - ja NEAR L$008out - movq mm3,mm0 - movq mm7,mm4 - pshufw mm2,mm0,228 - pshufw mm6,mm4,228 - movq mm1,mm0 - movq mm5,mm4 - pshufw mm0,mm0,177 - pshufw mm4,mm4,177 - pslld mm2,8 - pslld mm6,8 - psrld mm3,8 - psrld mm7,8 - pxor mm0,mm2 - pxor mm4,mm6 - pxor mm0,mm3 - pxor mm4,mm7 - pslld mm2,16 - pslld mm6,16 - psrld mm3,16 - psrld mm7,16 - pxor mm0,mm2 - pxor mm4,mm6 - pxor mm0,mm3 - pxor mm4,mm7 - movq mm3,[8+esp] - pxor mm2,mm2 - pxor mm6,mm6 - pcmpgtb mm2,mm1 - pcmpgtb mm6,mm5 - pand mm2,mm3 - pand mm6,mm3 - paddb mm1,mm1 - paddb mm5,mm5 - pxor mm1,mm2 - pxor mm5,mm6 - movq mm3,mm1 - movq mm7,mm5 - movq mm2,mm1 - movq mm6,mm5 - pxor mm0,mm1 - pxor mm4,mm5 - pslld mm3,24 - pslld mm7,24 - psrld mm2,8 - psrld mm6,8 - pxor mm0,mm3 - pxor mm4,mm7 - pxor mm0,mm2 - pxor mm4,mm6 - movq mm2,[8+esp] - pxor mm3,mm3 - pxor mm7,mm7 - pcmpgtb mm3,mm1 - pcmpgtb mm7,mm5 - pand mm3,mm2 - pand mm7,mm2 - paddb mm1,mm1 - paddb mm5,mm5 - pxor mm1,mm3 - pxor mm5,mm7 - pshufw mm3,mm1,177 - pshufw mm7,mm5,177 - pxor mm0,mm1 - pxor mm4,mm5 - pxor mm0,mm3 - pxor mm4,mm7 - pxor mm3,mm3 - pxor mm7,mm7 - pcmpgtb mm3,mm1 - pcmpgtb mm7,mm5 - pand mm3,mm2 - pand mm7,mm2 - paddb mm1,mm1 - paddb mm5,mm5 - pxor mm1,mm3 - pxor mm5,mm7 - pxor mm0,mm1 - pxor mm4,mm5 - movq mm3,mm1 - movq mm7,mm5 - pshufw mm2,mm1,177 - pshufw mm6,mm5,177 - pxor mm0,mm2 - pxor mm4,mm6 - pslld mm1,8 - pslld mm5,8 - psrld mm3,8 - psrld mm7,8 - movq mm2,[edi] - movq mm6,[8+edi] - pxor mm0,mm1 - pxor mm4,mm5 - pxor mm0,mm3 - pxor mm4,mm7 - mov eax,DWORD [ebp-128] - pslld mm1,16 - pslld mm5,16 - mov ebx,DWORD [ebp-64] - psrld mm3,16 - psrld mm7,16 - mov ecx,DWORD [ebp] - pxor mm0,mm1 - pxor mm4,mm5 - mov edx,DWORD [64+ebp] - pxor mm0,mm3 - pxor mm4,mm7 - pxor mm0,mm2 - pxor mm4,mm6 - jmp NEAR L$007loop -align 16 -L$008out: - pxor mm0,[edi] - pxor mm4,[8+edi] - ret -align 16 -__x86_AES_decrypt: - mov DWORD [20+esp],edi - xor eax,DWORD [edi] - xor ebx,DWORD [4+edi] - xor ecx,DWORD [8+edi] - xor edx,DWORD [12+edi] - mov esi,DWORD [240+edi] - lea esi,[esi*1+esi-2] - lea esi,[esi*8+edi] - mov DWORD [24+esp],esi -align 16 -L$009loop: - mov esi,eax - and esi,255 - mov esi,DWORD [esi*8+ebp] - movzx edi,dh - xor esi,DWORD [3+edi*8+ebp] - mov edi,ecx - shr edi,16 - and edi,255 - xor esi,DWORD [2+edi*8+ebp] - mov edi,ebx - shr edi,24 - xor esi,DWORD [1+edi*8+ebp] - mov DWORD [4+esp],esi - mov esi,ebx - and esi,255 - mov esi,DWORD [esi*8+ebp] - movzx edi,ah - xor esi,DWORD [3+edi*8+ebp] - mov edi,edx - shr edi,16 - and edi,255 - xor esi,DWORD [2+edi*8+ebp] - mov edi,ecx - shr edi,24 - xor esi,DWORD [1+edi*8+ebp] - mov DWORD [8+esp],esi - mov esi,ecx - and esi,255 - mov esi,DWORD [esi*8+ebp] - movzx edi,bh - xor esi,DWORD [3+edi*8+ebp] - mov edi,eax - shr edi,16 - and edi,255 - xor esi,DWORD [2+edi*8+ebp] - mov edi,edx - shr edi,24 - xor esi,DWORD [1+edi*8+ebp] - mov edi,DWORD [20+esp] - and edx,255 - mov edx,DWORD [edx*8+ebp] - movzx ecx,ch - xor edx,DWORD [3+ecx*8+ebp] - mov ecx,esi - shr ebx,16 - and ebx,255 - xor edx,DWORD [2+ebx*8+ebp] - mov ebx,DWORD [8+esp] - shr eax,24 - xor edx,DWORD [1+eax*8+ebp] - mov eax,DWORD [4+esp] - add edi,16 - xor eax,DWORD [edi] - xor ebx,DWORD [4+edi] - xor ecx,DWORD [8+edi] - xor edx,DWORD [12+edi] - cmp edi,DWORD [24+esp] - mov DWORD [20+esp],edi - jb NEAR L$009loop - lea ebp,[2176+ebp] - mov edi,DWORD [ebp-128] - mov esi,DWORD [ebp-96] - mov edi,DWORD [ebp-64] - mov esi,DWORD [ebp-32] - mov edi,DWORD [ebp] - mov esi,DWORD [32+ebp] - mov edi,DWORD [64+ebp] - mov esi,DWORD [96+ebp] - lea ebp,[ebp-128] - mov esi,eax - and esi,255 - movzx esi,BYTE [esi*1+ebp] - movzx edi,dh - movzx edi,BYTE [edi*1+ebp] - shl edi,8 - xor esi,edi - mov edi,ecx - shr edi,16 - and edi,255 - movzx edi,BYTE [edi*1+ebp] - shl edi,16 - xor esi,edi - mov edi,ebx - shr edi,24 - movzx edi,BYTE [edi*1+ebp] - shl edi,24 - xor esi,edi - mov DWORD [4+esp],esi - mov esi,ebx - and esi,255 - movzx esi,BYTE [esi*1+ebp] - movzx edi,ah - movzx edi,BYTE [edi*1+ebp] - shl edi,8 - xor esi,edi - mov edi,edx - shr edi,16 - and edi,255 - movzx edi,BYTE [edi*1+ebp] - shl edi,16 - xor esi,edi - mov edi,ecx - shr edi,24 - movzx edi,BYTE [edi*1+ebp] - shl edi,24 - xor esi,edi - mov DWORD [8+esp],esi - mov esi,ecx - and esi,255 - movzx esi,BYTE [esi*1+ebp] - movzx edi,bh - movzx edi,BYTE [edi*1+ebp] - shl edi,8 - xor esi,edi - mov edi,eax - shr edi,16 - and edi,255 - movzx edi,BYTE [edi*1+ebp] - shl edi,16 - xor esi,edi - mov edi,edx - shr edi,24 - movzx edi,BYTE [edi*1+ebp] - shl edi,24 - xor esi,edi - mov edi,DWORD [20+esp] - and edx,255 - movzx edx,BYTE [edx*1+ebp] - movzx ecx,ch - movzx ecx,BYTE [ecx*1+ebp] - shl ecx,8 - xor edx,ecx - mov ecx,esi - shr ebx,16 - and ebx,255 - movzx ebx,BYTE [ebx*1+ebp] - shl ebx,16 - xor edx,ebx - mov ebx,DWORD [8+esp] - shr eax,24 - movzx eax,BYTE [eax*1+ebp] - shl eax,24 - xor edx,eax - mov eax,DWORD [4+esp] - lea ebp,[ebp-2048] - add edi,16 - xor eax,DWORD [edi] - xor ebx,DWORD [4+edi] - xor ecx,DWORD [8+edi] - xor edx,DWORD [12+edi] - ret -align 64 -L$AES_Td: -dd 1353184337,1353184337 -dd 1399144830,1399144830 -dd 3282310938,3282310938 -dd 2522752826,2522752826 -dd 3412831035,3412831035 -dd 4047871263,4047871263 -dd 2874735276,2874735276 -dd 2466505547,2466505547 -dd 1442459680,1442459680 -dd 4134368941,4134368941 -dd 2440481928,2440481928 -dd 625738485,625738485 -dd 4242007375,4242007375 -dd 3620416197,3620416197 -dd 2151953702,2151953702 -dd 2409849525,2409849525 -dd 1230680542,1230680542 -dd 1729870373,1729870373 -dd 2551114309,2551114309 -dd 3787521629,3787521629 -dd 41234371,41234371 -dd 317738113,317738113 -dd 2744600205,2744600205 -dd 3338261355,3338261355 -dd 3881799427,3881799427 -dd 2510066197,2510066197 -dd 3950669247,3950669247 -dd 3663286933,3663286933 -dd 763608788,763608788 -dd 3542185048,3542185048 -dd 694804553,694804553 -dd 1154009486,1154009486 -dd 1787413109,1787413109 -dd 2021232372,2021232372 -dd 1799248025,1799248025 -dd 3715217703,3715217703 -dd 3058688446,3058688446 -dd 397248752,397248752 -dd 1722556617,1722556617 -dd 3023752829,3023752829 -dd 407560035,407560035 -dd 2184256229,2184256229 -dd 1613975959,1613975959 -dd 1165972322,1165972322 -dd 3765920945,3765920945 -dd 2226023355,2226023355 -dd 480281086,480281086 -dd 2485848313,2485848313 -dd 1483229296,1483229296 -dd 436028815,436028815 -dd 2272059028,2272059028 -dd 3086515026,3086515026 -dd 601060267,601060267 -dd 3791801202,3791801202 -dd 1468997603,1468997603 -dd 715871590,715871590 -dd 120122290,120122290 -dd 63092015,63092015 -dd 2591802758,2591802758 -dd 2768779219,2768779219 -dd 4068943920,4068943920 -dd 2997206819,2997206819 -dd 3127509762,3127509762 -dd 1552029421,1552029421 -dd 723308426,723308426 -dd 2461301159,2461301159 -dd 4042393587,4042393587 -dd 2715969870,2715969870 -dd 3455375973,3455375973 -dd 3586000134,3586000134 -dd 526529745,526529745 -dd 2331944644,2331944644 -dd 2639474228,2639474228 -dd 2689987490,2689987490 -dd 853641733,853641733 -dd 1978398372,1978398372 -dd 971801355,971801355 -dd 2867814464,2867814464 -dd 111112542,111112542 -dd 1360031421,1360031421 -dd 4186579262,4186579262 -dd 1023860118,1023860118 -dd 2919579357,2919579357 -dd 1186850381,1186850381 -dd 3045938321,3045938321 -dd 90031217,90031217 -dd 1876166148,1876166148 -dd 4279586912,4279586912 -dd 620468249,620468249 -dd 2548678102,2548678102 -dd 3426959497,3426959497 -dd 2006899047,2006899047 -dd 3175278768,3175278768 -dd 2290845959,2290845959 -dd 945494503,945494503 -dd 3689859193,3689859193 -dd 1191869601,1191869601 -dd 3910091388,3910091388 -dd 3374220536,3374220536 -dd 0,0 -dd 2206629897,2206629897 -dd 1223502642,1223502642 -dd 2893025566,2893025566 -dd 1316117100,1316117100 -dd 4227796733,4227796733 -dd 1446544655,1446544655 -dd 517320253,517320253 -dd 658058550,658058550 -dd 1691946762,1691946762 -dd 564550760,564550760 -dd 3511966619,3511966619 -dd 976107044,976107044 -dd 2976320012,2976320012 -dd 266819475,266819475 -dd 3533106868,3533106868 -dd 2660342555,2660342555 -dd 1338359936,1338359936 -dd 2720062561,2720062561 -dd 1766553434,1766553434 -dd 370807324,370807324 -dd 179999714,179999714 -dd 3844776128,3844776128 -dd 1138762300,1138762300 -dd 488053522,488053522 -dd 185403662,185403662 -dd 2915535858,2915535858 -dd 3114841645,3114841645 -dd 3366526484,3366526484 -dd 2233069911,2233069911 -dd 1275557295,1275557295 -dd 3151862254,3151862254 -dd 4250959779,4250959779 -dd 2670068215,2670068215 -dd 3170202204,3170202204 -dd 3309004356,3309004356 -dd 880737115,880737115 -dd 1982415755,1982415755 -dd 3703972811,3703972811 -dd 1761406390,1761406390 -dd 1676797112,1676797112 -dd 3403428311,3403428311 -dd 277177154,277177154 -dd 1076008723,1076008723 -dd 538035844,538035844 -dd 2099530373,2099530373 -dd 4164795346,4164795346 -dd 288553390,288553390 -dd 1839278535,1839278535 -dd 1261411869,1261411869 -dd 4080055004,4080055004 -dd 3964831245,3964831245 -dd 3504587127,3504587127 -dd 1813426987,1813426987 -dd 2579067049,2579067049 -dd 4199060497,4199060497 -dd 577038663,577038663 -dd 3297574056,3297574056 -dd 440397984,440397984 -dd 3626794326,3626794326 -dd 4019204898,4019204898 -dd 3343796615,3343796615 -dd 3251714265,3251714265 -dd 4272081548,4272081548 -dd 906744984,906744984 -dd 3481400742,3481400742 -dd 685669029,685669029 -dd 646887386,646887386 -dd 2764025151,2764025151 -dd 3835509292,3835509292 -dd 227702864,227702864 -dd 2613862250,2613862250 -dd 1648787028,1648787028 -dd 3256061430,3256061430 -dd 3904428176,3904428176 -dd 1593260334,1593260334 -dd 4121936770,4121936770 -dd 3196083615,3196083615 -dd 2090061929,2090061929 -dd 2838353263,2838353263 -dd 3004310991,3004310991 -dd 999926984,999926984 -dd 2809993232,2809993232 -dd 1852021992,1852021992 -dd 2075868123,2075868123 -dd 158869197,158869197 -dd 4095236462,4095236462 -dd 28809964,28809964 -dd 2828685187,2828685187 -dd 1701746150,1701746150 -dd 2129067946,2129067946 -dd 147831841,147831841 -dd 3873969647,3873969647 -dd 3650873274,3650873274 -dd 3459673930,3459673930 -dd 3557400554,3557400554 -dd 3598495785,3598495785 -dd 2947720241,2947720241 -dd 824393514,824393514 -dd 815048134,815048134 -dd 3227951669,3227951669 -dd 935087732,935087732 -dd 2798289660,2798289660 -dd 2966458592,2966458592 -dd 366520115,366520115 -dd 1251476721,1251476721 -dd 4158319681,4158319681 -dd 240176511,240176511 -dd 804688151,804688151 -dd 2379631990,2379631990 -dd 1303441219,1303441219 -dd 1414376140,1414376140 -dd 3741619940,3741619940 -dd 3820343710,3820343710 -dd 461924940,461924940 -dd 3089050817,3089050817 -dd 2136040774,2136040774 -dd 82468509,82468509 -dd 1563790337,1563790337 -dd 1937016826,1937016826 -dd 776014843,776014843 -dd 1511876531,1511876531 -dd 1389550482,1389550482 -dd 861278441,861278441 -dd 323475053,323475053 -dd 2355222426,2355222426 -dd 2047648055,2047648055 -dd 2383738969,2383738969 -dd 2302415851,2302415851 -dd 3995576782,3995576782 -dd 902390199,902390199 -dd 3991215329,3991215329 -dd 1018251130,1018251130 -dd 1507840668,1507840668 -dd 1064563285,1064563285 -dd 2043548696,2043548696 -dd 3208103795,3208103795 -dd 3939366739,3939366739 -dd 1537932639,1537932639 -dd 342834655,342834655 -dd 2262516856,2262516856 -dd 2180231114,2180231114 -dd 1053059257,1053059257 -dd 741614648,741614648 -dd 1598071746,1598071746 -dd 1925389590,1925389590 -dd 203809468,203809468 -dd 2336832552,2336832552 -dd 1100287487,1100287487 -dd 1895934009,1895934009 -dd 3736275976,3736275976 -dd 2632234200,2632234200 -dd 2428589668,2428589668 -dd 1636092795,1636092795 -dd 1890988757,1890988757 -dd 1952214088,1952214088 -dd 1113045200,1113045200 -db 82,9,106,213,48,54,165,56 -db 191,64,163,158,129,243,215,251 -db 124,227,57,130,155,47,255,135 -db 52,142,67,68,196,222,233,203 -db 84,123,148,50,166,194,35,61 -db 238,76,149,11,66,250,195,78 -db 8,46,161,102,40,217,36,178 -db 118,91,162,73,109,139,209,37 -db 114,248,246,100,134,104,152,22 -db 212,164,92,204,93,101,182,146 -db 108,112,72,80,253,237,185,218 -db 94,21,70,87,167,141,157,132 -db 144,216,171,0,140,188,211,10 -db 247,228,88,5,184,179,69,6 -db 208,44,30,143,202,63,15,2 -db 193,175,189,3,1,19,138,107 -db 58,145,17,65,79,103,220,234 -db 151,242,207,206,240,180,230,115 -db 150,172,116,34,231,173,53,133 -db 226,249,55,232,28,117,223,110 -db 71,241,26,113,29,41,197,137 -db 111,183,98,14,170,24,190,27 -db 252,86,62,75,198,210,121,32 -db 154,219,192,254,120,205,90,244 -db 31,221,168,51,136,7,199,49 -db 177,18,16,89,39,128,236,95 -db 96,81,127,169,25,181,74,13 -db 45,229,122,159,147,201,156,239 -db 160,224,59,77,174,42,245,176 -db 200,235,187,60,131,83,153,97 -db 23,43,4,126,186,119,214,38 -db 225,105,20,99,85,33,12,125 -db 82,9,106,213,48,54,165,56 -db 191,64,163,158,129,243,215,251 -db 124,227,57,130,155,47,255,135 -db 52,142,67,68,196,222,233,203 -db 84,123,148,50,166,194,35,61 -db 238,76,149,11,66,250,195,78 -db 8,46,161,102,40,217,36,178 -db 118,91,162,73,109,139,209,37 -db 114,248,246,100,134,104,152,22 -db 212,164,92,204,93,101,182,146 -db 108,112,72,80,253,237,185,218 -db 94,21,70,87,167,141,157,132 -db 144,216,171,0,140,188,211,10 -db 247,228,88,5,184,179,69,6 -db 208,44,30,143,202,63,15,2 -db 193,175,189,3,1,19,138,107 -db 58,145,17,65,79,103,220,234 -db 151,242,207,206,240,180,230,115 -db 150,172,116,34,231,173,53,133 -db 226,249,55,232,28,117,223,110 -db 71,241,26,113,29,41,197,137 -db 111,183,98,14,170,24,190,27 -db 252,86,62,75,198,210,121,32 -db 154,219,192,254,120,205,90,244 -db 31,221,168,51,136,7,199,49 -db 177,18,16,89,39,128,236,95 -db 96,81,127,169,25,181,74,13 -db 45,229,122,159,147,201,156,239 -db 160,224,59,77,174,42,245,176 -db 200,235,187,60,131,83,153,97 -db 23,43,4,126,186,119,214,38 -db 225,105,20,99,85,33,12,125 -db 82,9,106,213,48,54,165,56 -db 191,64,163,158,129,243,215,251 -db 124,227,57,130,155,47,255,135 -db 52,142,67,68,196,222,233,203 -db 84,123,148,50,166,194,35,61 -db 238,76,149,11,66,250,195,78 -db 8,46,161,102,40,217,36,178 -db 118,91,162,73,109,139,209,37 -db 114,248,246,100,134,104,152,22 -db 212,164,92,204,93,101,182,146 -db 108,112,72,80,253,237,185,218 -db 94,21,70,87,167,141,157,132 -db 144,216,171,0,140,188,211,10 -db 247,228,88,5,184,179,69,6 -db 208,44,30,143,202,63,15,2 -db 193,175,189,3,1,19,138,107 -db 58,145,17,65,79,103,220,234 -db 151,242,207,206,240,180,230,115 -db 150,172,116,34,231,173,53,133 -db 226,249,55,232,28,117,223,110 -db 71,241,26,113,29,41,197,137 -db 111,183,98,14,170,24,190,27 -db 252,86,62,75,198,210,121,32 -db 154,219,192,254,120,205,90,244 -db 31,221,168,51,136,7,199,49 -db 177,18,16,89,39,128,236,95 -db 96,81,127,169,25,181,74,13 -db 45,229,122,159,147,201,156,239 -db 160,224,59,77,174,42,245,176 -db 200,235,187,60,131,83,153,97 -db 23,43,4,126,186,119,214,38 -db 225,105,20,99,85,33,12,125 -db 82,9,106,213,48,54,165,56 -db 191,64,163,158,129,243,215,251 -db 124,227,57,130,155,47,255,135 -db 52,142,67,68,196,222,233,203 -db 84,123,148,50,166,194,35,61 -db 238,76,149,11,66,250,195,78 -db 8,46,161,102,40,217,36,178 -db 118,91,162,73,109,139,209,37 -db 114,248,246,100,134,104,152,22 -db 212,164,92,204,93,101,182,146 -db 108,112,72,80,253,237,185,218 -db 94,21,70,87,167,141,157,132 -db 144,216,171,0,140,188,211,10 -db 247,228,88,5,184,179,69,6 -db 208,44,30,143,202,63,15,2 -db 193,175,189,3,1,19,138,107 -db 58,145,17,65,79,103,220,234 -db 151,242,207,206,240,180,230,115 -db 150,172,116,34,231,173,53,133 -db 226,249,55,232,28,117,223,110 -db 71,241,26,113,29,41,197,137 -db 111,183,98,14,170,24,190,27 -db 252,86,62,75,198,210,121,32 -db 154,219,192,254,120,205,90,244 -db 31,221,168,51,136,7,199,49 -db 177,18,16,89,39,128,236,95 -db 96,81,127,169,25,181,74,13 -db 45,229,122,159,147,201,156,239 -db 160,224,59,77,174,42,245,176 -db 200,235,187,60,131,83,153,97 -db 23,43,4,126,186,119,214,38 -db 225,105,20,99,85,33,12,125 -global _asm_AES_decrypt -align 16 -_asm_AES_decrypt: -L$_asm_AES_decrypt_begin: - push ebp - push ebx - push esi - push edi - mov esi,DWORD [20+esp] - mov edi,DWORD [28+esp] - mov eax,esp - sub esp,36 - and esp,-64 - lea ebx,[edi-127] - sub ebx,esp - neg ebx - and ebx,960 - sub esp,ebx - add esp,4 - mov DWORD [28+esp],eax - call L$010pic_point -L$010pic_point: - pop ebp - lea eax,[_OPENSSL_ia32cap_P] - lea ebp,[(L$AES_Td-L$010pic_point)+ebp] - lea ebx,[764+esp] - sub ebx,ebp - and ebx,768 - lea ebp,[2176+ebx*1+ebp] - bt DWORD [eax],25 - jnc NEAR L$011x86 - movq mm0,[esi] - movq mm4,[8+esi] - call __sse_AES_decrypt_compact - mov esp,DWORD [28+esp] - mov esi,DWORD [24+esp] - movq [esi],mm0 - movq [8+esi],mm4 - emms - pop edi - pop esi - pop ebx - pop ebp - ret -align 16 -L$011x86: - mov DWORD [24+esp],ebp - mov eax,DWORD [esi] - mov ebx,DWORD [4+esi] - mov ecx,DWORD [8+esi] - mov edx,DWORD [12+esi] - call __x86_AES_decrypt_compact - mov esp,DWORD [28+esp] - mov esi,DWORD [24+esp] - mov DWORD [esi],eax - mov DWORD [4+esi],ebx - mov DWORD [8+esi],ecx - mov DWORD [12+esi],edx - pop edi - pop esi - pop ebx - pop ebp - ret -global _asm_AES_cbc_encrypt -align 16 -_asm_AES_cbc_encrypt: -L$_asm_AES_cbc_encrypt_begin: - push ebp - push ebx - push esi - push edi - mov ecx,DWORD [28+esp] - cmp ecx,0 - je NEAR L$012drop_out - call L$013pic_point -L$013pic_point: - pop ebp - lea eax,[_OPENSSL_ia32cap_P] - cmp DWORD [40+esp],0 - lea ebp,[(L$AES_Te-L$013pic_point)+ebp] - jne NEAR L$014picked_te - lea ebp,[(L$AES_Td-L$AES_Te)+ebp] -L$014picked_te: - pushfd - cld - cmp ecx,512 - jb NEAR L$015slow_way - test ecx,15 - jnz NEAR L$015slow_way - bt DWORD [eax],28 - jc NEAR L$015slow_way - lea esi,[esp-324] - and esi,-64 - mov eax,ebp - lea ebx,[2304+ebp] - mov edx,esi - and eax,4095 - and ebx,4095 - and edx,4095 - cmp edx,ebx - jb NEAR L$016tbl_break_out - sub edx,ebx - sub esi,edx - jmp NEAR L$017tbl_ok -align 4 -L$016tbl_break_out: - sub edx,eax - and edx,4095 - add edx,384 - sub esi,edx -align 4 -L$017tbl_ok: - lea edx,[24+esp] - xchg esp,esi - add esp,4 - mov DWORD [24+esp],ebp - mov DWORD [28+esp],esi - mov eax,DWORD [edx] - mov ebx,DWORD [4+edx] - mov edi,DWORD [12+edx] - mov esi,DWORD [16+edx] - mov edx,DWORD [20+edx] - mov DWORD [32+esp],eax - mov DWORD [36+esp],ebx - mov DWORD [40+esp],ecx - mov DWORD [44+esp],edi - mov DWORD [48+esp],esi - mov DWORD [316+esp],0 - mov ebx,edi - mov ecx,61 - sub ebx,ebp - mov esi,edi - and ebx,4095 - lea edi,[76+esp] - cmp ebx,2304 - jb NEAR L$018do_copy - cmp ebx,3852 - jb NEAR L$019skip_copy -align 4 -L$018do_copy: - mov DWORD [44+esp],edi -dd 2784229001 -L$019skip_copy: - mov edi,16 -align 4 -L$020prefetch_tbl: - mov eax,DWORD [ebp] - mov ebx,DWORD [32+ebp] - mov ecx,DWORD [64+ebp] - mov esi,DWORD [96+ebp] - lea ebp,[128+ebp] - sub edi,1 - jnz NEAR L$020prefetch_tbl - sub ebp,2048 - mov esi,DWORD [32+esp] - mov edi,DWORD [48+esp] - cmp edx,0 - je NEAR L$021fast_decrypt - mov eax,DWORD [edi] - mov ebx,DWORD [4+edi] -align 16 -L$022fast_enc_loop: - mov ecx,DWORD [8+edi] - mov edx,DWORD [12+edi] - xor eax,DWORD [esi] - xor ebx,DWORD [4+esi] - xor ecx,DWORD [8+esi] - xor edx,DWORD [12+esi] - mov edi,DWORD [44+esp] - call __x86_AES_encrypt - mov esi,DWORD [32+esp] - mov edi,DWORD [36+esp] - mov DWORD [edi],eax - mov DWORD [4+edi],ebx - mov DWORD [8+edi],ecx - mov DWORD [12+edi],edx - lea esi,[16+esi] - mov ecx,DWORD [40+esp] - mov DWORD [32+esp],esi - lea edx,[16+edi] - mov DWORD [36+esp],edx - sub ecx,16 - mov DWORD [40+esp],ecx - jnz NEAR L$022fast_enc_loop - mov esi,DWORD [48+esp] - mov ecx,DWORD [8+edi] - mov edx,DWORD [12+edi] - mov DWORD [esi],eax - mov DWORD [4+esi],ebx - mov DWORD [8+esi],ecx - mov DWORD [12+esi],edx - cmp DWORD [316+esp],0 - mov edi,DWORD [44+esp] - je NEAR L$023skip_ezero - mov ecx,60 - xor eax,eax -align 4 -dd 2884892297 -L$023skip_ezero: - mov esp,DWORD [28+esp] - popfd -L$012drop_out: - pop edi - pop esi - pop ebx - pop ebp - ret - pushfd -align 16 -L$021fast_decrypt: - cmp esi,DWORD [36+esp] - je NEAR L$024fast_dec_in_place - mov DWORD [52+esp],edi -align 4 -align 16 -L$025fast_dec_loop: - mov eax,DWORD [esi] - mov ebx,DWORD [4+esi] - mov ecx,DWORD [8+esi] - mov edx,DWORD [12+esi] - mov edi,DWORD [44+esp] - call __x86_AES_decrypt - mov edi,DWORD [52+esp] - mov esi,DWORD [40+esp] - xor eax,DWORD [edi] - xor ebx,DWORD [4+edi] - xor ecx,DWORD [8+edi] - xor edx,DWORD [12+edi] - mov edi,DWORD [36+esp] - mov esi,DWORD [32+esp] - mov DWORD [edi],eax - mov DWORD [4+edi],ebx - mov DWORD [8+edi],ecx - mov DWORD [12+edi],edx - mov ecx,DWORD [40+esp] - mov DWORD [52+esp],esi - lea esi,[16+esi] - mov DWORD [32+esp],esi - lea edi,[16+edi] - mov DWORD [36+esp],edi - sub ecx,16 - mov DWORD [40+esp],ecx - jnz NEAR L$025fast_dec_loop - mov edi,DWORD [52+esp] - mov esi,DWORD [48+esp] - mov eax,DWORD [edi] - mov ebx,DWORD [4+edi] - mov ecx,DWORD [8+edi] - mov edx,DWORD [12+edi] - mov DWORD [esi],eax - mov DWORD [4+esi],ebx - mov DWORD [8+esi],ecx - mov DWORD [12+esi],edx - jmp NEAR L$026fast_dec_out -align 16 -L$024fast_dec_in_place: -L$027fast_dec_in_place_loop: - mov eax,DWORD [esi] - mov ebx,DWORD [4+esi] - mov ecx,DWORD [8+esi] - mov edx,DWORD [12+esi] - lea edi,[60+esp] - mov DWORD [edi],eax - mov DWORD [4+edi],ebx - mov DWORD [8+edi],ecx - mov DWORD [12+edi],edx - mov edi,DWORD [44+esp] - call __x86_AES_decrypt - mov edi,DWORD [48+esp] - mov esi,DWORD [36+esp] - xor eax,DWORD [edi] - xor ebx,DWORD [4+edi] - xor ecx,DWORD [8+edi] - xor edx,DWORD [12+edi] - mov DWORD [esi],eax - mov DWORD [4+esi],ebx - mov DWORD [8+esi],ecx - mov DWORD [12+esi],edx - lea esi,[16+esi] - mov DWORD [36+esp],esi - lea esi,[60+esp] - mov eax,DWORD [esi] - mov ebx,DWORD [4+esi] - mov ecx,DWORD [8+esi] - mov edx,DWORD [12+esi] - mov DWORD [edi],eax - mov DWORD [4+edi],ebx - mov DWORD [8+edi],ecx - mov DWORD [12+edi],edx - mov esi,DWORD [32+esp] - mov ecx,DWORD [40+esp] - lea esi,[16+esi] - mov DWORD [32+esp],esi - sub ecx,16 - mov DWORD [40+esp],ecx - jnz NEAR L$027fast_dec_in_place_loop -align 4 -L$026fast_dec_out: - cmp DWORD [316+esp],0 - mov edi,DWORD [44+esp] - je NEAR L$028skip_dzero - mov ecx,60 - xor eax,eax -align 4 -dd 2884892297 -L$028skip_dzero: - mov esp,DWORD [28+esp] - popfd - pop edi - pop esi - pop ebx - pop ebp - ret - pushfd -align 16 -L$015slow_way: - mov eax,DWORD [eax] - mov edi,DWORD [36+esp] - lea esi,[esp-80] - and esi,-64 - lea ebx,[edi-143] - sub ebx,esi - neg ebx - and ebx,960 - sub esi,ebx - lea ebx,[768+esi] - sub ebx,ebp - and ebx,768 - lea ebp,[2176+ebx*1+ebp] - lea edx,[24+esp] - xchg esp,esi - add esp,4 - mov DWORD [24+esp],ebp - mov DWORD [28+esp],esi - mov DWORD [52+esp],eax - mov eax,DWORD [edx] - mov ebx,DWORD [4+edx] - mov esi,DWORD [16+edx] - mov edx,DWORD [20+edx] - mov DWORD [32+esp],eax - mov DWORD [36+esp],ebx - mov DWORD [40+esp],ecx - mov DWORD [44+esp],edi - mov DWORD [48+esp],esi - mov edi,esi - mov esi,eax - cmp edx,0 - je NEAR L$029slow_decrypt - cmp ecx,16 - mov edx,ebx - jb NEAR L$030slow_enc_tail - bt DWORD [52+esp],25 - jnc NEAR L$031slow_enc_x86 - movq mm0,[edi] - movq mm4,[8+edi] -align 16 -L$032slow_enc_loop_sse: - pxor mm0,[esi] - pxor mm4,[8+esi] - mov edi,DWORD [44+esp] - call __sse_AES_encrypt_compact - mov esi,DWORD [32+esp] - mov edi,DWORD [36+esp] - mov ecx,DWORD [40+esp] - movq [edi],mm0 - movq [8+edi],mm4 - lea esi,[16+esi] - mov DWORD [32+esp],esi - lea edx,[16+edi] - mov DWORD [36+esp],edx - sub ecx,16 - cmp ecx,16 - mov DWORD [40+esp],ecx - jae NEAR L$032slow_enc_loop_sse - test ecx,15 - jnz NEAR L$030slow_enc_tail - mov esi,DWORD [48+esp] - movq [esi],mm0 - movq [8+esi],mm4 - emms - mov esp,DWORD [28+esp] - popfd - pop edi - pop esi - pop ebx - pop ebp - ret - pushfd -align 16 -L$031slow_enc_x86: - mov eax,DWORD [edi] - mov ebx,DWORD [4+edi] -align 4 -L$033slow_enc_loop_x86: - mov ecx,DWORD [8+edi] - mov edx,DWORD [12+edi] - xor eax,DWORD [esi] - xor ebx,DWORD [4+esi] - xor ecx,DWORD [8+esi] - xor edx,DWORD [12+esi] - mov edi,DWORD [44+esp] - call __x86_AES_encrypt_compact - mov esi,DWORD [32+esp] - mov edi,DWORD [36+esp] - mov DWORD [edi],eax - mov DWORD [4+edi],ebx - mov DWORD [8+edi],ecx - mov DWORD [12+edi],edx - mov ecx,DWORD [40+esp] - lea esi,[16+esi] - mov DWORD [32+esp],esi - lea edx,[16+edi] - mov DWORD [36+esp],edx - sub ecx,16 - cmp ecx,16 - mov DWORD [40+esp],ecx - jae NEAR L$033slow_enc_loop_x86 - test ecx,15 - jnz NEAR L$030slow_enc_tail - mov esi,DWORD [48+esp] - mov ecx,DWORD [8+edi] - mov edx,DWORD [12+edi] - mov DWORD [esi],eax - mov DWORD [4+esi],ebx - mov DWORD [8+esi],ecx - mov DWORD [12+esi],edx - mov esp,DWORD [28+esp] - popfd - pop edi - pop esi - pop ebx - pop ebp - ret - pushfd -align 16 -L$030slow_enc_tail: - emms - mov edi,edx - mov ebx,16 - sub ebx,ecx - cmp edi,esi - je NEAR L$034enc_in_place -align 4 -dd 2767451785 - jmp NEAR L$035enc_skip_in_place -L$034enc_in_place: - lea edi,[ecx*1+edi] -L$035enc_skip_in_place: - mov ecx,ebx - xor eax,eax -align 4 -dd 2868115081 - mov edi,DWORD [48+esp] - mov esi,edx - mov eax,DWORD [edi] - mov ebx,DWORD [4+edi] - mov DWORD [40+esp],16 - jmp NEAR L$033slow_enc_loop_x86 -align 16 -L$029slow_decrypt: - bt DWORD [52+esp],25 - jnc NEAR L$036slow_dec_loop_x86 -align 4 -L$037slow_dec_loop_sse: - movq mm0,[esi] - movq mm4,[8+esi] - mov edi,DWORD [44+esp] - call __sse_AES_decrypt_compact - mov esi,DWORD [32+esp] - lea eax,[60+esp] - mov ebx,DWORD [36+esp] - mov ecx,DWORD [40+esp] - mov edi,DWORD [48+esp] - movq mm1,[esi] - movq mm5,[8+esi] - pxor mm0,[edi] - pxor mm4,[8+edi] - movq [edi],mm1 - movq [8+edi],mm5 - sub ecx,16 - jc NEAR L$038slow_dec_partial_sse - movq [ebx],mm0 - movq [8+ebx],mm4 - lea ebx,[16+ebx] - mov DWORD [36+esp],ebx - lea esi,[16+esi] - mov DWORD [32+esp],esi - mov DWORD [40+esp],ecx - jnz NEAR L$037slow_dec_loop_sse - emms - mov esp,DWORD [28+esp] - popfd - pop edi - pop esi - pop ebx - pop ebp - ret - pushfd -align 16 -L$038slow_dec_partial_sse: - movq [eax],mm0 - movq [8+eax],mm4 - emms - add ecx,16 - mov edi,ebx - mov esi,eax -align 4 -dd 2767451785 - mov esp,DWORD [28+esp] - popfd - pop edi - pop esi - pop ebx - pop ebp - ret - pushfd -align 16 -L$036slow_dec_loop_x86: - mov eax,DWORD [esi] - mov ebx,DWORD [4+esi] - mov ecx,DWORD [8+esi] - mov edx,DWORD [12+esi] - lea edi,[60+esp] - mov DWORD [edi],eax - mov DWORD [4+edi],ebx - mov DWORD [8+edi],ecx - mov DWORD [12+edi],edx - mov edi,DWORD [44+esp] - call __x86_AES_decrypt_compact - mov edi,DWORD [48+esp] - mov esi,DWORD [40+esp] - xor eax,DWORD [edi] - xor ebx,DWORD [4+edi] - xor ecx,DWORD [8+edi] - xor edx,DWORD [12+edi] - sub esi,16 - jc NEAR L$039slow_dec_partial_x86 - mov DWORD [40+esp],esi - mov esi,DWORD [36+esp] - mov DWORD [esi],eax - mov DWORD [4+esi],ebx - mov DWORD [8+esi],ecx - mov DWORD [12+esi],edx - lea esi,[16+esi] - mov DWORD [36+esp],esi - lea esi,[60+esp] - mov eax,DWORD [esi] - mov ebx,DWORD [4+esi] - mov ecx,DWORD [8+esi] - mov edx,DWORD [12+esi] - mov DWORD [edi],eax - mov DWORD [4+edi],ebx - mov DWORD [8+edi],ecx - mov DWORD [12+edi],edx - mov esi,DWORD [32+esp] - lea esi,[16+esi] - mov DWORD [32+esp],esi - jnz NEAR L$036slow_dec_loop_x86 - mov esp,DWORD [28+esp] - popfd - pop edi - pop esi - pop ebx - pop ebp - ret - pushfd -align 16 -L$039slow_dec_partial_x86: - lea esi,[60+esp] - mov DWORD [esi],eax - mov DWORD [4+esi],ebx - mov DWORD [8+esi],ecx - mov DWORD [12+esi],edx - mov esi,DWORD [32+esp] - mov eax,DWORD [esi] - mov ebx,DWORD [4+esi] - mov ecx,DWORD [8+esi] - mov edx,DWORD [12+esi] - mov DWORD [edi],eax - mov DWORD [4+edi],ebx - mov DWORD [8+edi],ecx - mov DWORD [12+edi],edx - mov ecx,DWORD [40+esp] - mov edi,DWORD [36+esp] - lea esi,[60+esp] -align 4 -dd 2767451785 - mov esp,DWORD [28+esp] - popfd - pop edi - pop esi - pop ebx - pop ebp - ret -align 16 -__x86_AES_set_encrypt_key: - push ebp - push ebx - push esi - push edi - mov esi,DWORD [24+esp] - mov edi,DWORD [32+esp] - test esi,-1 - jz NEAR L$040badpointer - test edi,-1 - jz NEAR L$040badpointer - call L$041pic_point -L$041pic_point: - pop ebp - lea ebp,[(L$AES_Te-L$041pic_point)+ebp] - lea ebp,[2176+ebp] - mov eax,DWORD [ebp-128] - mov ebx,DWORD [ebp-96] - mov ecx,DWORD [ebp-64] - mov edx,DWORD [ebp-32] - mov eax,DWORD [ebp] - mov ebx,DWORD [32+ebp] - mov ecx,DWORD [64+ebp] - mov edx,DWORD [96+ebp] - mov ecx,DWORD [28+esp] - cmp ecx,128 - je NEAR L$04210rounds - cmp ecx,192 - je NEAR L$04312rounds - cmp ecx,256 - je NEAR L$04414rounds - mov eax,-2 - jmp NEAR L$045exit -L$04210rounds: - mov eax,DWORD [esi] - mov ebx,DWORD [4+esi] - mov ecx,DWORD [8+esi] - mov edx,DWORD [12+esi] - mov DWORD [edi],eax - mov DWORD [4+edi],ebx - mov DWORD [8+edi],ecx - mov DWORD [12+edi],edx - xor ecx,ecx - jmp NEAR L$04610shortcut -align 4 -L$04710loop: - mov eax,DWORD [edi] - mov edx,DWORD [12+edi] -L$04610shortcut: - movzx esi,dl - movzx ebx,BYTE [esi*1+ebp-128] - movzx esi,dh - shl ebx,24 - xor eax,ebx - movzx ebx,BYTE [esi*1+ebp-128] - shr edx,16 - movzx esi,dl - xor eax,ebx - movzx ebx,BYTE [esi*1+ebp-128] - movzx esi,dh - shl ebx,8 - xor eax,ebx - movzx ebx,BYTE [esi*1+ebp-128] - shl ebx,16 - xor eax,ebx - xor eax,DWORD [896+ecx*4+ebp] - mov DWORD [16+edi],eax - xor eax,DWORD [4+edi] - mov DWORD [20+edi],eax - xor eax,DWORD [8+edi] - mov DWORD [24+edi],eax - xor eax,DWORD [12+edi] - mov DWORD [28+edi],eax - inc ecx - add edi,16 - cmp ecx,10 - jl NEAR L$04710loop - mov DWORD [80+edi],10 - xor eax,eax - jmp NEAR L$045exit -L$04312rounds: - mov eax,DWORD [esi] - mov ebx,DWORD [4+esi] - mov ecx,DWORD [8+esi] - mov edx,DWORD [12+esi] - mov DWORD [edi],eax - mov DWORD [4+edi],ebx - mov DWORD [8+edi],ecx - mov DWORD [12+edi],edx - mov ecx,DWORD [16+esi] - mov edx,DWORD [20+esi] - mov DWORD [16+edi],ecx - mov DWORD [20+edi],edx - xor ecx,ecx - jmp NEAR L$04812shortcut -align 4 -L$04912loop: - mov eax,DWORD [edi] - mov edx,DWORD [20+edi] -L$04812shortcut: - movzx esi,dl - movzx ebx,BYTE [esi*1+ebp-128] - movzx esi,dh - shl ebx,24 - xor eax,ebx - movzx ebx,BYTE [esi*1+ebp-128] - shr edx,16 - movzx esi,dl - xor eax,ebx - movzx ebx,BYTE [esi*1+ebp-128] - movzx esi,dh - shl ebx,8 - xor eax,ebx - movzx ebx,BYTE [esi*1+ebp-128] - shl ebx,16 - xor eax,ebx - xor eax,DWORD [896+ecx*4+ebp] - mov DWORD [24+edi],eax - xor eax,DWORD [4+edi] - mov DWORD [28+edi],eax - xor eax,DWORD [8+edi] - mov DWORD [32+edi],eax - xor eax,DWORD [12+edi] - mov DWORD [36+edi],eax - cmp ecx,7 - je NEAR L$05012break - inc ecx - xor eax,DWORD [16+edi] - mov DWORD [40+edi],eax - xor eax,DWORD [20+edi] - mov DWORD [44+edi],eax - add edi,24 - jmp NEAR L$04912loop -L$05012break: - mov DWORD [72+edi],12 - xor eax,eax - jmp NEAR L$045exit -L$04414rounds: - mov eax,DWORD [esi] - mov ebx,DWORD [4+esi] - mov ecx,DWORD [8+esi] - mov edx,DWORD [12+esi] - mov DWORD [edi],eax - mov DWORD [4+edi],ebx - mov DWORD [8+edi],ecx - mov DWORD [12+edi],edx - mov eax,DWORD [16+esi] - mov ebx,DWORD [20+esi] - mov ecx,DWORD [24+esi] - mov edx,DWORD [28+esi] - mov DWORD [16+edi],eax - mov DWORD [20+edi],ebx - mov DWORD [24+edi],ecx - mov DWORD [28+edi],edx - xor ecx,ecx - jmp NEAR L$05114shortcut -align 4 -L$05214loop: - mov edx,DWORD [28+edi] -L$05114shortcut: - mov eax,DWORD [edi] - movzx esi,dl - movzx ebx,BYTE [esi*1+ebp-128] - movzx esi,dh - shl ebx,24 - xor eax,ebx - movzx ebx,BYTE [esi*1+ebp-128] - shr edx,16 - movzx esi,dl - xor eax,ebx - movzx ebx,BYTE [esi*1+ebp-128] - movzx esi,dh - shl ebx,8 - xor eax,ebx - movzx ebx,BYTE [esi*1+ebp-128] - shl ebx,16 - xor eax,ebx - xor eax,DWORD [896+ecx*4+ebp] - mov DWORD [32+edi],eax - xor eax,DWORD [4+edi] - mov DWORD [36+edi],eax - xor eax,DWORD [8+edi] - mov DWORD [40+edi],eax - xor eax,DWORD [12+edi] - mov DWORD [44+edi],eax - cmp ecx,6 - je NEAR L$05314break - inc ecx - mov edx,eax - mov eax,DWORD [16+edi] - movzx esi,dl - movzx ebx,BYTE [esi*1+ebp-128] - movzx esi,dh - xor eax,ebx - movzx ebx,BYTE [esi*1+ebp-128] - shr edx,16 - shl ebx,8 - movzx esi,dl - xor eax,ebx - movzx ebx,BYTE [esi*1+ebp-128] - movzx esi,dh - shl ebx,16 - xor eax,ebx - movzx ebx,BYTE [esi*1+ebp-128] - shl ebx,24 - xor eax,ebx - mov DWORD [48+edi],eax - xor eax,DWORD [20+edi] - mov DWORD [52+edi],eax - xor eax,DWORD [24+edi] - mov DWORD [56+edi],eax - xor eax,DWORD [28+edi] - mov DWORD [60+edi],eax - add edi,32 - jmp NEAR L$05214loop -L$05314break: - mov DWORD [48+edi],14 - xor eax,eax - jmp NEAR L$045exit -L$040badpointer: - mov eax,-1 -L$045exit: - pop edi - pop esi - pop ebx - pop ebp - ret -global _asm_AES_set_encrypt_key -align 16 -_asm_AES_set_encrypt_key: -L$_asm_AES_set_encrypt_key_begin: - call __x86_AES_set_encrypt_key - ret -global _asm_AES_set_decrypt_key -align 16 -_asm_AES_set_decrypt_key: -L$_asm_AES_set_decrypt_key_begin: - call __x86_AES_set_encrypt_key - cmp eax,0 - je NEAR L$054proceed - ret -L$054proceed: - push ebp - push ebx - push esi - push edi - mov esi,DWORD [28+esp] - mov ecx,DWORD [240+esi] - lea ecx,[ecx*4] - lea edi,[ecx*4+esi] -align 4 -L$055invert: - mov eax,DWORD [esi] - mov ebx,DWORD [4+esi] - mov ecx,DWORD [edi] - mov edx,DWORD [4+edi] - mov DWORD [edi],eax - mov DWORD [4+edi],ebx - mov DWORD [esi],ecx - mov DWORD [4+esi],edx - mov eax,DWORD [8+esi] - mov ebx,DWORD [12+esi] - mov ecx,DWORD [8+edi] - mov edx,DWORD [12+edi] - mov DWORD [8+edi],eax - mov DWORD [12+edi],ebx - mov DWORD [8+esi],ecx - mov DWORD [12+esi],edx - add esi,16 - sub edi,16 - cmp esi,edi - jne NEAR L$055invert - mov edi,DWORD [28+esp] - mov esi,DWORD [240+edi] - lea esi,[esi*1+esi-2] - lea esi,[esi*8+edi] - mov DWORD [28+esp],esi - mov eax,DWORD [16+edi] -align 4 -L$056permute: - add edi,16 - mov ebp,2155905152 - and ebp,eax - lea ebx,[eax*1+eax] - mov esi,ebp - shr ebp,7 - sub esi,ebp - and ebx,4278124286 - and esi,454761243 - xor ebx,esi - mov ebp,2155905152 - and ebp,ebx - lea ecx,[ebx*1+ebx] - mov esi,ebp - shr ebp,7 - sub esi,ebp - and ecx,4278124286 - and esi,454761243 - xor ebx,eax - xor ecx,esi - mov ebp,2155905152 - and ebp,ecx - lea edx,[ecx*1+ecx] - mov esi,ebp - shr ebp,7 - xor ecx,eax - sub esi,ebp - and edx,4278124286 - and esi,454761243 - rol eax,8 - xor edx,esi - mov ebp,DWORD [4+edi] - xor eax,ebx - xor ebx,edx - xor eax,ecx - rol ebx,24 - xor ecx,edx - xor eax,edx - rol ecx,16 - xor eax,ebx - rol edx,8 - xor eax,ecx - mov ebx,ebp - xor eax,edx - mov DWORD [edi],eax - mov ebp,2155905152 - and ebp,ebx - lea ecx,[ebx*1+ebx] - mov esi,ebp - shr ebp,7 - sub esi,ebp - and ecx,4278124286 - and esi,454761243 - xor ecx,esi - mov ebp,2155905152 - and ebp,ecx - lea edx,[ecx*1+ecx] - mov esi,ebp - shr ebp,7 - sub esi,ebp - and edx,4278124286 - and esi,454761243 - xor ecx,ebx - xor edx,esi - mov ebp,2155905152 - and ebp,edx - lea eax,[edx*1+edx] - mov esi,ebp - shr ebp,7 - xor edx,ebx - sub esi,ebp - and eax,4278124286 - and esi,454761243 - rol ebx,8 - xor eax,esi - mov ebp,DWORD [8+edi] - xor ebx,ecx - xor ecx,eax - xor ebx,edx - rol ecx,24 - xor edx,eax - xor ebx,eax - rol edx,16 - xor ebx,ecx - rol eax,8 - xor ebx,edx - mov ecx,ebp - xor ebx,eax - mov DWORD [4+edi],ebx - mov ebp,2155905152 - and ebp,ecx - lea edx,[ecx*1+ecx] - mov esi,ebp - shr ebp,7 - sub esi,ebp - and edx,4278124286 - and esi,454761243 - xor edx,esi - mov ebp,2155905152 - and ebp,edx - lea eax,[edx*1+edx] - mov esi,ebp - shr ebp,7 - sub esi,ebp - and eax,4278124286 - and esi,454761243 - xor edx,ecx - xor eax,esi - mov ebp,2155905152 - and ebp,eax - lea ebx,[eax*1+eax] - mov esi,ebp - shr ebp,7 - xor eax,ecx - sub esi,ebp - and ebx,4278124286 - and esi,454761243 - rol ecx,8 - xor ebx,esi - mov ebp,DWORD [12+edi] - xor ecx,edx - xor edx,ebx - xor ecx,eax - rol edx,24 - xor eax,ebx - xor ecx,ebx - rol eax,16 - xor ecx,edx - rol ebx,8 - xor ecx,eax - mov edx,ebp - xor ecx,ebx - mov DWORD [8+edi],ecx - mov ebp,2155905152 - and ebp,edx - lea eax,[edx*1+edx] - mov esi,ebp - shr ebp,7 - sub esi,ebp - and eax,4278124286 - and esi,454761243 - xor eax,esi - mov ebp,2155905152 - and ebp,eax - lea ebx,[eax*1+eax] - mov esi,ebp - shr ebp,7 - sub esi,ebp - and ebx,4278124286 - and esi,454761243 - xor eax,edx - xor ebx,esi - mov ebp,2155905152 - and ebp,ebx - lea ecx,[ebx*1+ebx] - mov esi,ebp - shr ebp,7 - xor ebx,edx - sub esi,ebp - and ecx,4278124286 - and esi,454761243 - rol edx,8 - xor ecx,esi - mov ebp,DWORD [16+edi] - xor edx,eax - xor eax,ecx - xor edx,ebx - rol eax,24 - xor ebx,ecx - xor edx,ecx - rol ebx,16 - xor edx,eax - rol ecx,8 - xor edx,ebx - mov eax,ebp - xor edx,ecx - mov DWORD [12+edi],edx - cmp edi,DWORD [28+esp] - jb NEAR L$056permute - xor eax,eax - pop edi - pop esi - pop ebx - pop ebp - ret -db 65,69,83,32,102,111,114,32,120,56,54,44,32,67,82,89 -db 80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114 -db 111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -segment .bss -common _OPENSSL_ia32cap_P 16 diff --git a/third_party/boringssl/win-x86/crypto/aes/aesni-x86.asm b/third_party/boringssl/win-x86/crypto/aes/aesni-x86.asm deleted file mode 100644 index a9a595653f082..0000000000000 --- a/third_party/boringssl/win-x86/crypto/aes/aesni-x86.asm +++ /dev/null @@ -1,2424 +0,0 @@ -%ifidn __OUTPUT_FORMAT__,obj -section code use32 class=code align=64 -%elifidn __OUTPUT_FORMAT__,win32 -%ifdef __YASM_VERSION_ID__ -%if __YASM_VERSION_ID__ < 01010000h -%error yasm version 1.1.0 or later needed. -%endif -; Yasm automatically includes .00 and complains about redefining it. -; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html -%else -$@feat.00 equ 1 -%endif -section .text code align=64 -%else -section .text code -%endif -;extern _OPENSSL_ia32cap_P -global _aesni_encrypt -align 16 -_aesni_encrypt: -L$_aesni_encrypt_begin: - mov eax,DWORD [4+esp] - mov edx,DWORD [12+esp] - movups xmm2,[eax] - mov ecx,DWORD [240+edx] - mov eax,DWORD [8+esp] - movups xmm0,[edx] - movups xmm1,[16+edx] - lea edx,[32+edx] - xorps xmm2,xmm0 -L$000enc1_loop_1: -db 102,15,56,220,209 - dec ecx - movups xmm1,[edx] - lea edx,[16+edx] - jnz NEAR L$000enc1_loop_1 -db 102,15,56,221,209 - pxor xmm0,xmm0 - pxor xmm1,xmm1 - movups [eax],xmm2 - pxor xmm2,xmm2 - ret -global _aesni_decrypt -align 16 -_aesni_decrypt: -L$_aesni_decrypt_begin: - mov eax,DWORD [4+esp] - mov edx,DWORD [12+esp] - movups xmm2,[eax] - mov ecx,DWORD [240+edx] - mov eax,DWORD [8+esp] - movups xmm0,[edx] - movups xmm1,[16+edx] - lea edx,[32+edx] - xorps xmm2,xmm0 -L$001dec1_loop_2: -db 102,15,56,222,209 - dec ecx - movups xmm1,[edx] - lea edx,[16+edx] - jnz NEAR L$001dec1_loop_2 -db 102,15,56,223,209 - pxor xmm0,xmm0 - pxor xmm1,xmm1 - movups [eax],xmm2 - pxor xmm2,xmm2 - ret -align 16 -__aesni_encrypt2: - movups xmm0,[edx] - shl ecx,4 - movups xmm1,[16+edx] - xorps xmm2,xmm0 - pxor xmm3,xmm0 - movups xmm0,[32+edx] - lea edx,[32+ecx*1+edx] - neg ecx - add ecx,16 -L$002enc2_loop: -db 102,15,56,220,209 -db 102,15,56,220,217 - movups xmm1,[ecx*1+edx] - add ecx,32 -db 102,15,56,220,208 -db 102,15,56,220,216 - movups xmm0,[ecx*1+edx-16] - jnz NEAR L$002enc2_loop -db 102,15,56,220,209 -db 102,15,56,220,217 -db 102,15,56,221,208 -db 102,15,56,221,216 - ret -align 16 -__aesni_decrypt2: - movups xmm0,[edx] - shl ecx,4 - movups xmm1,[16+edx] - xorps xmm2,xmm0 - pxor xmm3,xmm0 - movups xmm0,[32+edx] - lea edx,[32+ecx*1+edx] - neg ecx - add ecx,16 -L$003dec2_loop: -db 102,15,56,222,209 -db 102,15,56,222,217 - movups xmm1,[ecx*1+edx] - add ecx,32 -db 102,15,56,222,208 -db 102,15,56,222,216 - movups xmm0,[ecx*1+edx-16] - jnz NEAR L$003dec2_loop -db 102,15,56,222,209 -db 102,15,56,222,217 -db 102,15,56,223,208 -db 102,15,56,223,216 - ret -align 16 -__aesni_encrypt3: - movups xmm0,[edx] - shl ecx,4 - movups xmm1,[16+edx] - xorps xmm2,xmm0 - pxor xmm3,xmm0 - pxor xmm4,xmm0 - movups xmm0,[32+edx] - lea edx,[32+ecx*1+edx] - neg ecx - add ecx,16 -L$004enc3_loop: -db 102,15,56,220,209 -db 102,15,56,220,217 -db 102,15,56,220,225 - movups xmm1,[ecx*1+edx] - add ecx,32 -db 102,15,56,220,208 -db 102,15,56,220,216 -db 102,15,56,220,224 - movups xmm0,[ecx*1+edx-16] - jnz NEAR L$004enc3_loop -db 102,15,56,220,209 -db 102,15,56,220,217 -db 102,15,56,220,225 -db 102,15,56,221,208 -db 102,15,56,221,216 -db 102,15,56,221,224 - ret -align 16 -__aesni_decrypt3: - movups xmm0,[edx] - shl ecx,4 - movups xmm1,[16+edx] - xorps xmm2,xmm0 - pxor xmm3,xmm0 - pxor xmm4,xmm0 - movups xmm0,[32+edx] - lea edx,[32+ecx*1+edx] - neg ecx - add ecx,16 -L$005dec3_loop: -db 102,15,56,222,209 -db 102,15,56,222,217 -db 102,15,56,222,225 - movups xmm1,[ecx*1+edx] - add ecx,32 -db 102,15,56,222,208 -db 102,15,56,222,216 -db 102,15,56,222,224 - movups xmm0,[ecx*1+edx-16] - jnz NEAR L$005dec3_loop -db 102,15,56,222,209 -db 102,15,56,222,217 -db 102,15,56,222,225 -db 102,15,56,223,208 -db 102,15,56,223,216 -db 102,15,56,223,224 - ret -align 16 -__aesni_encrypt4: - movups xmm0,[edx] - movups xmm1,[16+edx] - shl ecx,4 - xorps xmm2,xmm0 - pxor xmm3,xmm0 - pxor xmm4,xmm0 - pxor xmm5,xmm0 - movups xmm0,[32+edx] - lea edx,[32+ecx*1+edx] - neg ecx -db 15,31,64,0 - add ecx,16 -L$006enc4_loop: -db 102,15,56,220,209 -db 102,15,56,220,217 -db 102,15,56,220,225 -db 102,15,56,220,233 - movups xmm1,[ecx*1+edx] - add ecx,32 -db 102,15,56,220,208 -db 102,15,56,220,216 -db 102,15,56,220,224 -db 102,15,56,220,232 - movups xmm0,[ecx*1+edx-16] - jnz NEAR L$006enc4_loop -db 102,15,56,220,209 -db 102,15,56,220,217 -db 102,15,56,220,225 -db 102,15,56,220,233 -db 102,15,56,221,208 -db 102,15,56,221,216 -db 102,15,56,221,224 -db 102,15,56,221,232 - ret -align 16 -__aesni_decrypt4: - movups xmm0,[edx] - movups xmm1,[16+edx] - shl ecx,4 - xorps xmm2,xmm0 - pxor xmm3,xmm0 - pxor xmm4,xmm0 - pxor xmm5,xmm0 - movups xmm0,[32+edx] - lea edx,[32+ecx*1+edx] - neg ecx -db 15,31,64,0 - add ecx,16 -L$007dec4_loop: -db 102,15,56,222,209 -db 102,15,56,222,217 -db 102,15,56,222,225 -db 102,15,56,222,233 - movups xmm1,[ecx*1+edx] - add ecx,32 -db 102,15,56,222,208 -db 102,15,56,222,216 -db 102,15,56,222,224 -db 102,15,56,222,232 - movups xmm0,[ecx*1+edx-16] - jnz NEAR L$007dec4_loop -db 102,15,56,222,209 -db 102,15,56,222,217 -db 102,15,56,222,225 -db 102,15,56,222,233 -db 102,15,56,223,208 -db 102,15,56,223,216 -db 102,15,56,223,224 -db 102,15,56,223,232 - ret -align 16 -__aesni_encrypt6: - movups xmm0,[edx] - shl ecx,4 - movups xmm1,[16+edx] - xorps xmm2,xmm0 - pxor xmm3,xmm0 - pxor xmm4,xmm0 -db 102,15,56,220,209 - pxor xmm5,xmm0 - pxor xmm6,xmm0 -db 102,15,56,220,217 - lea edx,[32+ecx*1+edx] - neg ecx -db 102,15,56,220,225 - pxor xmm7,xmm0 - movups xmm0,[ecx*1+edx] - add ecx,16 - jmp NEAR L$008_aesni_encrypt6_inner -align 16 -L$009enc6_loop: -db 102,15,56,220,209 -db 102,15,56,220,217 -db 102,15,56,220,225 -L$008_aesni_encrypt6_inner: -db 102,15,56,220,233 -db 102,15,56,220,241 -db 102,15,56,220,249 -L$_aesni_encrypt6_enter: - movups xmm1,[ecx*1+edx] - add ecx,32 -db 102,15,56,220,208 -db 102,15,56,220,216 -db 102,15,56,220,224 -db 102,15,56,220,232 -db 102,15,56,220,240 -db 102,15,56,220,248 - movups xmm0,[ecx*1+edx-16] - jnz NEAR L$009enc6_loop -db 102,15,56,220,209 -db 102,15,56,220,217 -db 102,15,56,220,225 -db 102,15,56,220,233 -db 102,15,56,220,241 -db 102,15,56,220,249 -db 102,15,56,221,208 -db 102,15,56,221,216 -db 102,15,56,221,224 -db 102,15,56,221,232 -db 102,15,56,221,240 -db 102,15,56,221,248 - ret -align 16 -__aesni_decrypt6: - movups xmm0,[edx] - shl ecx,4 - movups xmm1,[16+edx] - xorps xmm2,xmm0 - pxor xmm3,xmm0 - pxor xmm4,xmm0 -db 102,15,56,222,209 - pxor xmm5,xmm0 - pxor xmm6,xmm0 -db 102,15,56,222,217 - lea edx,[32+ecx*1+edx] - neg ecx -db 102,15,56,222,225 - pxor xmm7,xmm0 - movups xmm0,[ecx*1+edx] - add ecx,16 - jmp NEAR L$010_aesni_decrypt6_inner -align 16 -L$011dec6_loop: -db 102,15,56,222,209 -db 102,15,56,222,217 -db 102,15,56,222,225 -L$010_aesni_decrypt6_inner: -db 102,15,56,222,233 -db 102,15,56,222,241 -db 102,15,56,222,249 -L$_aesni_decrypt6_enter: - movups xmm1,[ecx*1+edx] - add ecx,32 -db 102,15,56,222,208 -db 102,15,56,222,216 -db 102,15,56,222,224 -db 102,15,56,222,232 -db 102,15,56,222,240 -db 102,15,56,222,248 - movups xmm0,[ecx*1+edx-16] - jnz NEAR L$011dec6_loop -db 102,15,56,222,209 -db 102,15,56,222,217 -db 102,15,56,222,225 -db 102,15,56,222,233 -db 102,15,56,222,241 -db 102,15,56,222,249 -db 102,15,56,223,208 -db 102,15,56,223,216 -db 102,15,56,223,224 -db 102,15,56,223,232 -db 102,15,56,223,240 -db 102,15,56,223,248 - ret -global _aesni_ecb_encrypt -align 16 -_aesni_ecb_encrypt: -L$_aesni_ecb_encrypt_begin: - push ebp - push ebx - push esi - push edi - mov esi,DWORD [20+esp] - mov edi,DWORD [24+esp] - mov eax,DWORD [28+esp] - mov edx,DWORD [32+esp] - mov ebx,DWORD [36+esp] - and eax,-16 - jz NEAR L$012ecb_ret - mov ecx,DWORD [240+edx] - test ebx,ebx - jz NEAR L$013ecb_decrypt - mov ebp,edx - mov ebx,ecx - cmp eax,96 - jb NEAR L$014ecb_enc_tail - movdqu xmm2,[esi] - movdqu xmm3,[16+esi] - movdqu xmm4,[32+esi] - movdqu xmm5,[48+esi] - movdqu xmm6,[64+esi] - movdqu xmm7,[80+esi] - lea esi,[96+esi] - sub eax,96 - jmp NEAR L$015ecb_enc_loop6_enter -align 16 -L$016ecb_enc_loop6: - movups [edi],xmm2 - movdqu xmm2,[esi] - movups [16+edi],xmm3 - movdqu xmm3,[16+esi] - movups [32+edi],xmm4 - movdqu xmm4,[32+esi] - movups [48+edi],xmm5 - movdqu xmm5,[48+esi] - movups [64+edi],xmm6 - movdqu xmm6,[64+esi] - movups [80+edi],xmm7 - lea edi,[96+edi] - movdqu xmm7,[80+esi] - lea esi,[96+esi] -L$015ecb_enc_loop6_enter: - call __aesni_encrypt6 - mov edx,ebp - mov ecx,ebx - sub eax,96 - jnc NEAR L$016ecb_enc_loop6 - movups [edi],xmm2 - movups [16+edi],xmm3 - movups [32+edi],xmm4 - movups [48+edi],xmm5 - movups [64+edi],xmm6 - movups [80+edi],xmm7 - lea edi,[96+edi] - add eax,96 - jz NEAR L$012ecb_ret -L$014ecb_enc_tail: - movups xmm2,[esi] - cmp eax,32 - jb NEAR L$017ecb_enc_one - movups xmm3,[16+esi] - je NEAR L$018ecb_enc_two - movups xmm4,[32+esi] - cmp eax,64 - jb NEAR L$019ecb_enc_three - movups xmm5,[48+esi] - je NEAR L$020ecb_enc_four - movups xmm6,[64+esi] - xorps xmm7,xmm7 - call __aesni_encrypt6 - movups [edi],xmm2 - movups [16+edi],xmm3 - movups [32+edi],xmm4 - movups [48+edi],xmm5 - movups [64+edi],xmm6 - jmp NEAR L$012ecb_ret -align 16 -L$017ecb_enc_one: - movups xmm0,[edx] - movups xmm1,[16+edx] - lea edx,[32+edx] - xorps xmm2,xmm0 -L$021enc1_loop_3: -db 102,15,56,220,209 - dec ecx - movups xmm1,[edx] - lea edx,[16+edx] - jnz NEAR L$021enc1_loop_3 -db 102,15,56,221,209 - movups [edi],xmm2 - jmp NEAR L$012ecb_ret -align 16 -L$018ecb_enc_two: - call __aesni_encrypt2 - movups [edi],xmm2 - movups [16+edi],xmm3 - jmp NEAR L$012ecb_ret -align 16 -L$019ecb_enc_three: - call __aesni_encrypt3 - movups [edi],xmm2 - movups [16+edi],xmm3 - movups [32+edi],xmm4 - jmp NEAR L$012ecb_ret -align 16 -L$020ecb_enc_four: - call __aesni_encrypt4 - movups [edi],xmm2 - movups [16+edi],xmm3 - movups [32+edi],xmm4 - movups [48+edi],xmm5 - jmp NEAR L$012ecb_ret -align 16 -L$013ecb_decrypt: - mov ebp,edx - mov ebx,ecx - cmp eax,96 - jb NEAR L$022ecb_dec_tail - movdqu xmm2,[esi] - movdqu xmm3,[16+esi] - movdqu xmm4,[32+esi] - movdqu xmm5,[48+esi] - movdqu xmm6,[64+esi] - movdqu xmm7,[80+esi] - lea esi,[96+esi] - sub eax,96 - jmp NEAR L$023ecb_dec_loop6_enter -align 16 -L$024ecb_dec_loop6: - movups [edi],xmm2 - movdqu xmm2,[esi] - movups [16+edi],xmm3 - movdqu xmm3,[16+esi] - movups [32+edi],xmm4 - movdqu xmm4,[32+esi] - movups [48+edi],xmm5 - movdqu xmm5,[48+esi] - movups [64+edi],xmm6 - movdqu xmm6,[64+esi] - movups [80+edi],xmm7 - lea edi,[96+edi] - movdqu xmm7,[80+esi] - lea esi,[96+esi] -L$023ecb_dec_loop6_enter: - call __aesni_decrypt6 - mov edx,ebp - mov ecx,ebx - sub eax,96 - jnc NEAR L$024ecb_dec_loop6 - movups [edi],xmm2 - movups [16+edi],xmm3 - movups [32+edi],xmm4 - movups [48+edi],xmm5 - movups [64+edi],xmm6 - movups [80+edi],xmm7 - lea edi,[96+edi] - add eax,96 - jz NEAR L$012ecb_ret -L$022ecb_dec_tail: - movups xmm2,[esi] - cmp eax,32 - jb NEAR L$025ecb_dec_one - movups xmm3,[16+esi] - je NEAR L$026ecb_dec_two - movups xmm4,[32+esi] - cmp eax,64 - jb NEAR L$027ecb_dec_three - movups xmm5,[48+esi] - je NEAR L$028ecb_dec_four - movups xmm6,[64+esi] - xorps xmm7,xmm7 - call __aesni_decrypt6 - movups [edi],xmm2 - movups [16+edi],xmm3 - movups [32+edi],xmm4 - movups [48+edi],xmm5 - movups [64+edi],xmm6 - jmp NEAR L$012ecb_ret -align 16 -L$025ecb_dec_one: - movups xmm0,[edx] - movups xmm1,[16+edx] - lea edx,[32+edx] - xorps xmm2,xmm0 -L$029dec1_loop_4: -db 102,15,56,222,209 - dec ecx - movups xmm1,[edx] - lea edx,[16+edx] - jnz NEAR L$029dec1_loop_4 -db 102,15,56,223,209 - movups [edi],xmm2 - jmp NEAR L$012ecb_ret -align 16 -L$026ecb_dec_two: - call __aesni_decrypt2 - movups [edi],xmm2 - movups [16+edi],xmm3 - jmp NEAR L$012ecb_ret -align 16 -L$027ecb_dec_three: - call __aesni_decrypt3 - movups [edi],xmm2 - movups [16+edi],xmm3 - movups [32+edi],xmm4 - jmp NEAR L$012ecb_ret -align 16 -L$028ecb_dec_four: - call __aesni_decrypt4 - movups [edi],xmm2 - movups [16+edi],xmm3 - movups [32+edi],xmm4 - movups [48+edi],xmm5 -L$012ecb_ret: - pxor xmm0,xmm0 - pxor xmm1,xmm1 - pxor xmm2,xmm2 - pxor xmm3,xmm3 - pxor xmm4,xmm4 - pxor xmm5,xmm5 - pxor xmm6,xmm6 - pxor xmm7,xmm7 - pop edi - pop esi - pop ebx - pop ebp - ret -global _aesni_ccm64_encrypt_blocks -align 16 -_aesni_ccm64_encrypt_blocks: -L$_aesni_ccm64_encrypt_blocks_begin: - push ebp - push ebx - push esi - push edi - mov esi,DWORD [20+esp] - mov edi,DWORD [24+esp] - mov eax,DWORD [28+esp] - mov edx,DWORD [32+esp] - mov ebx,DWORD [36+esp] - mov ecx,DWORD [40+esp] - mov ebp,esp - sub esp,60 - and esp,-16 - mov DWORD [48+esp],ebp - movdqu xmm7,[ebx] - movdqu xmm3,[ecx] - mov ecx,DWORD [240+edx] - mov DWORD [esp],202182159 - mov DWORD [4+esp],134810123 - mov DWORD [8+esp],67438087 - mov DWORD [12+esp],66051 - mov ebx,1 - xor ebp,ebp - mov DWORD [16+esp],ebx - mov DWORD [20+esp],ebp - mov DWORD [24+esp],ebp - mov DWORD [28+esp],ebp - shl ecx,4 - mov ebx,16 - lea ebp,[edx] - movdqa xmm5,[esp] - movdqa xmm2,xmm7 - lea edx,[32+ecx*1+edx] - sub ebx,ecx -db 102,15,56,0,253 -L$030ccm64_enc_outer: - movups xmm0,[ebp] - mov ecx,ebx - movups xmm6,[esi] - xorps xmm2,xmm0 - movups xmm1,[16+ebp] - xorps xmm0,xmm6 - xorps xmm3,xmm0 - movups xmm0,[32+ebp] -L$031ccm64_enc2_loop: -db 102,15,56,220,209 -db 102,15,56,220,217 - movups xmm1,[ecx*1+edx] - add ecx,32 -db 102,15,56,220,208 -db 102,15,56,220,216 - movups xmm0,[ecx*1+edx-16] - jnz NEAR L$031ccm64_enc2_loop -db 102,15,56,220,209 -db 102,15,56,220,217 - paddq xmm7,[16+esp] - dec eax -db 102,15,56,221,208 -db 102,15,56,221,216 - lea esi,[16+esi] - xorps xmm6,xmm2 - movdqa xmm2,xmm7 - movups [edi],xmm6 -db 102,15,56,0,213 - lea edi,[16+edi] - jnz NEAR L$030ccm64_enc_outer - mov esp,DWORD [48+esp] - mov edi,DWORD [40+esp] - movups [edi],xmm3 - pxor xmm0,xmm0 - pxor xmm1,xmm1 - pxor xmm2,xmm2 - pxor xmm3,xmm3 - pxor xmm4,xmm4 - pxor xmm5,xmm5 - pxor xmm6,xmm6 - pxor xmm7,xmm7 - pop edi - pop esi - pop ebx - pop ebp - ret -global _aesni_ccm64_decrypt_blocks -align 16 -_aesni_ccm64_decrypt_blocks: -L$_aesni_ccm64_decrypt_blocks_begin: - push ebp - push ebx - push esi - push edi - mov esi,DWORD [20+esp] - mov edi,DWORD [24+esp] - mov eax,DWORD [28+esp] - mov edx,DWORD [32+esp] - mov ebx,DWORD [36+esp] - mov ecx,DWORD [40+esp] - mov ebp,esp - sub esp,60 - and esp,-16 - mov DWORD [48+esp],ebp - movdqu xmm7,[ebx] - movdqu xmm3,[ecx] - mov ecx,DWORD [240+edx] - mov DWORD [esp],202182159 - mov DWORD [4+esp],134810123 - mov DWORD [8+esp],67438087 - mov DWORD [12+esp],66051 - mov ebx,1 - xor ebp,ebp - mov DWORD [16+esp],ebx - mov DWORD [20+esp],ebp - mov DWORD [24+esp],ebp - mov DWORD [28+esp],ebp - movdqa xmm5,[esp] - movdqa xmm2,xmm7 - mov ebp,edx - mov ebx,ecx -db 102,15,56,0,253 - movups xmm0,[edx] - movups xmm1,[16+edx] - lea edx,[32+edx] - xorps xmm2,xmm0 -L$032enc1_loop_5: -db 102,15,56,220,209 - dec ecx - movups xmm1,[edx] - lea edx,[16+edx] - jnz NEAR L$032enc1_loop_5 -db 102,15,56,221,209 - shl ebx,4 - mov ecx,16 - movups xmm6,[esi] - paddq xmm7,[16+esp] - lea esi,[16+esi] - sub ecx,ebx - lea edx,[32+ebx*1+ebp] - mov ebx,ecx - jmp NEAR L$033ccm64_dec_outer -align 16 -L$033ccm64_dec_outer: - xorps xmm6,xmm2 - movdqa xmm2,xmm7 - movups [edi],xmm6 - lea edi,[16+edi] -db 102,15,56,0,213 - sub eax,1 - jz NEAR L$034ccm64_dec_break - movups xmm0,[ebp] - mov ecx,ebx - movups xmm1,[16+ebp] - xorps xmm6,xmm0 - xorps xmm2,xmm0 - xorps xmm3,xmm6 - movups xmm0,[32+ebp] -L$035ccm64_dec2_loop: -db 102,15,56,220,209 -db 102,15,56,220,217 - movups xmm1,[ecx*1+edx] - add ecx,32 -db 102,15,56,220,208 -db 102,15,56,220,216 - movups xmm0,[ecx*1+edx-16] - jnz NEAR L$035ccm64_dec2_loop - movups xmm6,[esi] - paddq xmm7,[16+esp] -db 102,15,56,220,209 -db 102,15,56,220,217 -db 102,15,56,221,208 -db 102,15,56,221,216 - lea esi,[16+esi] - jmp NEAR L$033ccm64_dec_outer -align 16 -L$034ccm64_dec_break: - mov ecx,DWORD [240+ebp] - mov edx,ebp - movups xmm0,[edx] - movups xmm1,[16+edx] - xorps xmm6,xmm0 - lea edx,[32+edx] - xorps xmm3,xmm6 -L$036enc1_loop_6: -db 102,15,56,220,217 - dec ecx - movups xmm1,[edx] - lea edx,[16+edx] - jnz NEAR L$036enc1_loop_6 -db 102,15,56,221,217 - mov esp,DWORD [48+esp] - mov edi,DWORD [40+esp] - movups [edi],xmm3 - pxor xmm0,xmm0 - pxor xmm1,xmm1 - pxor xmm2,xmm2 - pxor xmm3,xmm3 - pxor xmm4,xmm4 - pxor xmm5,xmm5 - pxor xmm6,xmm6 - pxor xmm7,xmm7 - pop edi - pop esi - pop ebx - pop ebp - ret -global _aesni_ctr32_encrypt_blocks -align 16 -_aesni_ctr32_encrypt_blocks: -L$_aesni_ctr32_encrypt_blocks_begin: - push ebp - push ebx - push esi - push edi - mov esi,DWORD [20+esp] - mov edi,DWORD [24+esp] - mov eax,DWORD [28+esp] - mov edx,DWORD [32+esp] - mov ebx,DWORD [36+esp] - mov ebp,esp - sub esp,88 - and esp,-16 - mov DWORD [80+esp],ebp - cmp eax,1 - je NEAR L$037ctr32_one_shortcut - movdqu xmm7,[ebx] - mov DWORD [esp],202182159 - mov DWORD [4+esp],134810123 - mov DWORD [8+esp],67438087 - mov DWORD [12+esp],66051 - mov ecx,6 - xor ebp,ebp - mov DWORD [16+esp],ecx - mov DWORD [20+esp],ecx - mov DWORD [24+esp],ecx - mov DWORD [28+esp],ebp -db 102,15,58,22,251,3 -db 102,15,58,34,253,3 - mov ecx,DWORD [240+edx] - bswap ebx - pxor xmm0,xmm0 - pxor xmm1,xmm1 - movdqa xmm2,[esp] -db 102,15,58,34,195,0 - lea ebp,[3+ebx] -db 102,15,58,34,205,0 - inc ebx -db 102,15,58,34,195,1 - inc ebp -db 102,15,58,34,205,1 - inc ebx -db 102,15,58,34,195,2 - inc ebp -db 102,15,58,34,205,2 - movdqa [48+esp],xmm0 -db 102,15,56,0,194 - movdqu xmm6,[edx] - movdqa [64+esp],xmm1 -db 102,15,56,0,202 - pshufd xmm2,xmm0,192 - pshufd xmm3,xmm0,128 - cmp eax,6 - jb NEAR L$038ctr32_tail - pxor xmm7,xmm6 - shl ecx,4 - mov ebx,16 - movdqa [32+esp],xmm7 - mov ebp,edx - sub ebx,ecx - lea edx,[32+ecx*1+edx] - sub eax,6 - jmp NEAR L$039ctr32_loop6 -align 16 -L$039ctr32_loop6: - pshufd xmm4,xmm0,64 - movdqa xmm0,[32+esp] - pshufd xmm5,xmm1,192 - pxor xmm2,xmm0 - pshufd xmm6,xmm1,128 - pxor xmm3,xmm0 - pshufd xmm7,xmm1,64 - movups xmm1,[16+ebp] - pxor xmm4,xmm0 - pxor xmm5,xmm0 -db 102,15,56,220,209 - pxor xmm6,xmm0 - pxor xmm7,xmm0 -db 102,15,56,220,217 - movups xmm0,[32+ebp] - mov ecx,ebx -db 102,15,56,220,225 -db 102,15,56,220,233 -db 102,15,56,220,241 -db 102,15,56,220,249 - call L$_aesni_encrypt6_enter - movups xmm1,[esi] - movups xmm0,[16+esi] - xorps xmm2,xmm1 - movups xmm1,[32+esi] - xorps xmm3,xmm0 - movups [edi],xmm2 - movdqa xmm0,[16+esp] - xorps xmm4,xmm1 - movdqa xmm1,[64+esp] - movups [16+edi],xmm3 - movups [32+edi],xmm4 - paddd xmm1,xmm0 - paddd xmm0,[48+esp] - movdqa xmm2,[esp] - movups xmm3,[48+esi] - movups xmm4,[64+esi] - xorps xmm5,xmm3 - movups xmm3,[80+esi] - lea esi,[96+esi] - movdqa [48+esp],xmm0 -db 102,15,56,0,194 - xorps xmm6,xmm4 - movups [48+edi],xmm5 - xorps xmm7,xmm3 - movdqa [64+esp],xmm1 -db 102,15,56,0,202 - movups [64+edi],xmm6 - pshufd xmm2,xmm0,192 - movups [80+edi],xmm7 - lea edi,[96+edi] - pshufd xmm3,xmm0,128 - sub eax,6 - jnc NEAR L$039ctr32_loop6 - add eax,6 - jz NEAR L$040ctr32_ret - movdqu xmm7,[ebp] - mov edx,ebp - pxor xmm7,[32+esp] - mov ecx,DWORD [240+ebp] -L$038ctr32_tail: - por xmm2,xmm7 - cmp eax,2 - jb NEAR L$041ctr32_one - pshufd xmm4,xmm0,64 - por xmm3,xmm7 - je NEAR L$042ctr32_two - pshufd xmm5,xmm1,192 - por xmm4,xmm7 - cmp eax,4 - jb NEAR L$043ctr32_three - pshufd xmm6,xmm1,128 - por xmm5,xmm7 - je NEAR L$044ctr32_four - por xmm6,xmm7 - call __aesni_encrypt6 - movups xmm1,[esi] - movups xmm0,[16+esi] - xorps xmm2,xmm1 - movups xmm1,[32+esi] - xorps xmm3,xmm0 - movups xmm0,[48+esi] - xorps xmm4,xmm1 - movups xmm1,[64+esi] - xorps xmm5,xmm0 - movups [edi],xmm2 - xorps xmm6,xmm1 - movups [16+edi],xmm3 - movups [32+edi],xmm4 - movups [48+edi],xmm5 - movups [64+edi],xmm6 - jmp NEAR L$040ctr32_ret -align 16 -L$037ctr32_one_shortcut: - movups xmm2,[ebx] - mov ecx,DWORD [240+edx] -L$041ctr32_one: - movups xmm0,[edx] - movups xmm1,[16+edx] - lea edx,[32+edx] - xorps xmm2,xmm0 -L$045enc1_loop_7: -db 102,15,56,220,209 - dec ecx - movups xmm1,[edx] - lea edx,[16+edx] - jnz NEAR L$045enc1_loop_7 -db 102,15,56,221,209 - movups xmm6,[esi] - xorps xmm6,xmm2 - movups [edi],xmm6 - jmp NEAR L$040ctr32_ret -align 16 -L$042ctr32_two: - call __aesni_encrypt2 - movups xmm5,[esi] - movups xmm6,[16+esi] - xorps xmm2,xmm5 - xorps xmm3,xmm6 - movups [edi],xmm2 - movups [16+edi],xmm3 - jmp NEAR L$040ctr32_ret -align 16 -L$043ctr32_three: - call __aesni_encrypt3 - movups xmm5,[esi] - movups xmm6,[16+esi] - xorps xmm2,xmm5 - movups xmm7,[32+esi] - xorps xmm3,xmm6 - movups [edi],xmm2 - xorps xmm4,xmm7 - movups [16+edi],xmm3 - movups [32+edi],xmm4 - jmp NEAR L$040ctr32_ret -align 16 -L$044ctr32_four: - call __aesni_encrypt4 - movups xmm6,[esi] - movups xmm7,[16+esi] - movups xmm1,[32+esi] - xorps xmm2,xmm6 - movups xmm0,[48+esi] - xorps xmm3,xmm7 - movups [edi],xmm2 - xorps xmm4,xmm1 - movups [16+edi],xmm3 - xorps xmm5,xmm0 - movups [32+edi],xmm4 - movups [48+edi],xmm5 -L$040ctr32_ret: - pxor xmm0,xmm0 - pxor xmm1,xmm1 - pxor xmm2,xmm2 - pxor xmm3,xmm3 - pxor xmm4,xmm4 - movdqa [32+esp],xmm0 - pxor xmm5,xmm5 - movdqa [48+esp],xmm0 - pxor xmm6,xmm6 - movdqa [64+esp],xmm0 - pxor xmm7,xmm7 - mov esp,DWORD [80+esp] - pop edi - pop esi - pop ebx - pop ebp - ret -global _aesni_xts_encrypt -align 16 -_aesni_xts_encrypt: -L$_aesni_xts_encrypt_begin: - push ebp - push ebx - push esi - push edi - mov edx,DWORD [36+esp] - mov esi,DWORD [40+esp] - mov ecx,DWORD [240+edx] - movups xmm2,[esi] - movups xmm0,[edx] - movups xmm1,[16+edx] - lea edx,[32+edx] - xorps xmm2,xmm0 -L$046enc1_loop_8: -db 102,15,56,220,209 - dec ecx - movups xmm1,[edx] - lea edx,[16+edx] - jnz NEAR L$046enc1_loop_8 -db 102,15,56,221,209 - mov esi,DWORD [20+esp] - mov edi,DWORD [24+esp] - mov eax,DWORD [28+esp] - mov edx,DWORD [32+esp] - mov ebp,esp - sub esp,120 - mov ecx,DWORD [240+edx] - and esp,-16 - mov DWORD [96+esp],135 - mov DWORD [100+esp],0 - mov DWORD [104+esp],1 - mov DWORD [108+esp],0 - mov DWORD [112+esp],eax - mov DWORD [116+esp],ebp - movdqa xmm1,xmm2 - pxor xmm0,xmm0 - movdqa xmm3,[96+esp] - pcmpgtd xmm0,xmm1 - and eax,-16 - mov ebp,edx - mov ebx,ecx - sub eax,96 - jc NEAR L$047xts_enc_short - shl ecx,4 - mov ebx,16 - sub ebx,ecx - lea edx,[32+ecx*1+edx] - jmp NEAR L$048xts_enc_loop6 -align 16 -L$048xts_enc_loop6: - pshufd xmm2,xmm0,19 - pxor xmm0,xmm0 - movdqa [esp],xmm1 - paddq xmm1,xmm1 - pand xmm2,xmm3 - pcmpgtd xmm0,xmm1 - pxor xmm1,xmm2 - pshufd xmm2,xmm0,19 - pxor xmm0,xmm0 - movdqa [16+esp],xmm1 - paddq xmm1,xmm1 - pand xmm2,xmm3 - pcmpgtd xmm0,xmm1 - pxor xmm1,xmm2 - pshufd xmm2,xmm0,19 - pxor xmm0,xmm0 - movdqa [32+esp],xmm1 - paddq xmm1,xmm1 - pand xmm2,xmm3 - pcmpgtd xmm0,xmm1 - pxor xmm1,xmm2 - pshufd xmm2,xmm0,19 - pxor xmm0,xmm0 - movdqa [48+esp],xmm1 - paddq xmm1,xmm1 - pand xmm2,xmm3 - pcmpgtd xmm0,xmm1 - pxor xmm1,xmm2 - pshufd xmm7,xmm0,19 - movdqa [64+esp],xmm1 - paddq xmm1,xmm1 - movups xmm0,[ebp] - pand xmm7,xmm3 - movups xmm2,[esi] - pxor xmm7,xmm1 - mov ecx,ebx - movdqu xmm3,[16+esi] - xorps xmm2,xmm0 - movdqu xmm4,[32+esi] - pxor xmm3,xmm0 - movdqu xmm5,[48+esi] - pxor xmm4,xmm0 - movdqu xmm6,[64+esi] - pxor xmm5,xmm0 - movdqu xmm1,[80+esi] - pxor xmm6,xmm0 - lea esi,[96+esi] - pxor xmm2,[esp] - movdqa [80+esp],xmm7 - pxor xmm7,xmm1 - movups xmm1,[16+ebp] - pxor xmm3,[16+esp] - pxor xmm4,[32+esp] -db 102,15,56,220,209 - pxor xmm5,[48+esp] - pxor xmm6,[64+esp] -db 102,15,56,220,217 - pxor xmm7,xmm0 - movups xmm0,[32+ebp] -db 102,15,56,220,225 -db 102,15,56,220,233 -db 102,15,56,220,241 -db 102,15,56,220,249 - call L$_aesni_encrypt6_enter - movdqa xmm1,[80+esp] - pxor xmm0,xmm0 - xorps xmm2,[esp] - pcmpgtd xmm0,xmm1 - xorps xmm3,[16+esp] - movups [edi],xmm2 - xorps xmm4,[32+esp] - movups [16+edi],xmm3 - xorps xmm5,[48+esp] - movups [32+edi],xmm4 - xorps xmm6,[64+esp] - movups [48+edi],xmm5 - xorps xmm7,xmm1 - movups [64+edi],xmm6 - pshufd xmm2,xmm0,19 - movups [80+edi],xmm7 - lea edi,[96+edi] - movdqa xmm3,[96+esp] - pxor xmm0,xmm0 - paddq xmm1,xmm1 - pand xmm2,xmm3 - pcmpgtd xmm0,xmm1 - pxor xmm1,xmm2 - sub eax,96 - jnc NEAR L$048xts_enc_loop6 - mov ecx,DWORD [240+ebp] - mov edx,ebp - mov ebx,ecx -L$047xts_enc_short: - add eax,96 - jz NEAR L$049xts_enc_done6x - movdqa xmm5,xmm1 - cmp eax,32 - jb NEAR L$050xts_enc_one - pshufd xmm2,xmm0,19 - pxor xmm0,xmm0 - paddq xmm1,xmm1 - pand xmm2,xmm3 - pcmpgtd xmm0,xmm1 - pxor xmm1,xmm2 - je NEAR L$051xts_enc_two - pshufd xmm2,xmm0,19 - pxor xmm0,xmm0 - movdqa xmm6,xmm1 - paddq xmm1,xmm1 - pand xmm2,xmm3 - pcmpgtd xmm0,xmm1 - pxor xmm1,xmm2 - cmp eax,64 - jb NEAR L$052xts_enc_three - pshufd xmm2,xmm0,19 - pxor xmm0,xmm0 - movdqa xmm7,xmm1 - paddq xmm1,xmm1 - pand xmm2,xmm3 - pcmpgtd xmm0,xmm1 - pxor xmm1,xmm2 - movdqa [esp],xmm5 - movdqa [16+esp],xmm6 - je NEAR L$053xts_enc_four - movdqa [32+esp],xmm7 - pshufd xmm7,xmm0,19 - movdqa [48+esp],xmm1 - paddq xmm1,xmm1 - pand xmm7,xmm3 - pxor xmm7,xmm1 - movdqu xmm2,[esi] - movdqu xmm3,[16+esi] - movdqu xmm4,[32+esi] - pxor xmm2,[esp] - movdqu xmm5,[48+esi] - pxor xmm3,[16+esp] - movdqu xmm6,[64+esi] - pxor xmm4,[32+esp] - lea esi,[80+esi] - pxor xmm5,[48+esp] - movdqa [64+esp],xmm7 - pxor xmm6,xmm7 - call __aesni_encrypt6 - movaps xmm1,[64+esp] - xorps xmm2,[esp] - xorps xmm3,[16+esp] - xorps xmm4,[32+esp] - movups [edi],xmm2 - xorps xmm5,[48+esp] - movups [16+edi],xmm3 - xorps xmm6,xmm1 - movups [32+edi],xmm4 - movups [48+edi],xmm5 - movups [64+edi],xmm6 - lea edi,[80+edi] - jmp NEAR L$054xts_enc_done -align 16 -L$050xts_enc_one: - movups xmm2,[esi] - lea esi,[16+esi] - xorps xmm2,xmm5 - movups xmm0,[edx] - movups xmm1,[16+edx] - lea edx,[32+edx] - xorps xmm2,xmm0 -L$055enc1_loop_9: -db 102,15,56,220,209 - dec ecx - movups xmm1,[edx] - lea edx,[16+edx] - jnz NEAR L$055enc1_loop_9 -db 102,15,56,221,209 - xorps xmm2,xmm5 - movups [edi],xmm2 - lea edi,[16+edi] - movdqa xmm1,xmm5 - jmp NEAR L$054xts_enc_done -align 16 -L$051xts_enc_two: - movaps xmm6,xmm1 - movups xmm2,[esi] - movups xmm3,[16+esi] - lea esi,[32+esi] - xorps xmm2,xmm5 - xorps xmm3,xmm6 - call __aesni_encrypt2 - xorps xmm2,xmm5 - xorps xmm3,xmm6 - movups [edi],xmm2 - movups [16+edi],xmm3 - lea edi,[32+edi] - movdqa xmm1,xmm6 - jmp NEAR L$054xts_enc_done -align 16 -L$052xts_enc_three: - movaps xmm7,xmm1 - movups xmm2,[esi] - movups xmm3,[16+esi] - movups xmm4,[32+esi] - lea esi,[48+esi] - xorps xmm2,xmm5 - xorps xmm3,xmm6 - xorps xmm4,xmm7 - call __aesni_encrypt3 - xorps xmm2,xmm5 - xorps xmm3,xmm6 - xorps xmm4,xmm7 - movups [edi],xmm2 - movups [16+edi],xmm3 - movups [32+edi],xmm4 - lea edi,[48+edi] - movdqa xmm1,xmm7 - jmp NEAR L$054xts_enc_done -align 16 -L$053xts_enc_four: - movaps xmm6,xmm1 - movups xmm2,[esi] - movups xmm3,[16+esi] - movups xmm4,[32+esi] - xorps xmm2,[esp] - movups xmm5,[48+esi] - lea esi,[64+esi] - xorps xmm3,[16+esp] - xorps xmm4,xmm7 - xorps xmm5,xmm6 - call __aesni_encrypt4 - xorps xmm2,[esp] - xorps xmm3,[16+esp] - xorps xmm4,xmm7 - movups [edi],xmm2 - xorps xmm5,xmm6 - movups [16+edi],xmm3 - movups [32+edi],xmm4 - movups [48+edi],xmm5 - lea edi,[64+edi] - movdqa xmm1,xmm6 - jmp NEAR L$054xts_enc_done -align 16 -L$049xts_enc_done6x: - mov eax,DWORD [112+esp] - and eax,15 - jz NEAR L$056xts_enc_ret - movdqa xmm5,xmm1 - mov DWORD [112+esp],eax - jmp NEAR L$057xts_enc_steal -align 16 -L$054xts_enc_done: - mov eax,DWORD [112+esp] - pxor xmm0,xmm0 - and eax,15 - jz NEAR L$056xts_enc_ret - pcmpgtd xmm0,xmm1 - mov DWORD [112+esp],eax - pshufd xmm5,xmm0,19 - paddq xmm1,xmm1 - pand xmm5,[96+esp] - pxor xmm5,xmm1 -L$057xts_enc_steal: - movzx ecx,BYTE [esi] - movzx edx,BYTE [edi-16] - lea esi,[1+esi] - mov BYTE [edi-16],cl - mov BYTE [edi],dl - lea edi,[1+edi] - sub eax,1 - jnz NEAR L$057xts_enc_steal - sub edi,DWORD [112+esp] - mov edx,ebp - mov ecx,ebx - movups xmm2,[edi-16] - xorps xmm2,xmm5 - movups xmm0,[edx] - movups xmm1,[16+edx] - lea edx,[32+edx] - xorps xmm2,xmm0 -L$058enc1_loop_10: -db 102,15,56,220,209 - dec ecx - movups xmm1,[edx] - lea edx,[16+edx] - jnz NEAR L$058enc1_loop_10 -db 102,15,56,221,209 - xorps xmm2,xmm5 - movups [edi-16],xmm2 -L$056xts_enc_ret: - pxor xmm0,xmm0 - pxor xmm1,xmm1 - pxor xmm2,xmm2 - movdqa [esp],xmm0 - pxor xmm3,xmm3 - movdqa [16+esp],xmm0 - pxor xmm4,xmm4 - movdqa [32+esp],xmm0 - pxor xmm5,xmm5 - movdqa [48+esp],xmm0 - pxor xmm6,xmm6 - movdqa [64+esp],xmm0 - pxor xmm7,xmm7 - movdqa [80+esp],xmm0 - mov esp,DWORD [116+esp] - pop edi - pop esi - pop ebx - pop ebp - ret -global _aesni_xts_decrypt -align 16 -_aesni_xts_decrypt: -L$_aesni_xts_decrypt_begin: - push ebp - push ebx - push esi - push edi - mov edx,DWORD [36+esp] - mov esi,DWORD [40+esp] - mov ecx,DWORD [240+edx] - movups xmm2,[esi] - movups xmm0,[edx] - movups xmm1,[16+edx] - lea edx,[32+edx] - xorps xmm2,xmm0 -L$059enc1_loop_11: -db 102,15,56,220,209 - dec ecx - movups xmm1,[edx] - lea edx,[16+edx] - jnz NEAR L$059enc1_loop_11 -db 102,15,56,221,209 - mov esi,DWORD [20+esp] - mov edi,DWORD [24+esp] - mov eax,DWORD [28+esp] - mov edx,DWORD [32+esp] - mov ebp,esp - sub esp,120 - and esp,-16 - xor ebx,ebx - test eax,15 - setnz bl - shl ebx,4 - sub eax,ebx - mov DWORD [96+esp],135 - mov DWORD [100+esp],0 - mov DWORD [104+esp],1 - mov DWORD [108+esp],0 - mov DWORD [112+esp],eax - mov DWORD [116+esp],ebp - mov ecx,DWORD [240+edx] - mov ebp,edx - mov ebx,ecx - movdqa xmm1,xmm2 - pxor xmm0,xmm0 - movdqa xmm3,[96+esp] - pcmpgtd xmm0,xmm1 - and eax,-16 - sub eax,96 - jc NEAR L$060xts_dec_short - shl ecx,4 - mov ebx,16 - sub ebx,ecx - lea edx,[32+ecx*1+edx] - jmp NEAR L$061xts_dec_loop6 -align 16 -L$061xts_dec_loop6: - pshufd xmm2,xmm0,19 - pxor xmm0,xmm0 - movdqa [esp],xmm1 - paddq xmm1,xmm1 - pand xmm2,xmm3 - pcmpgtd xmm0,xmm1 - pxor xmm1,xmm2 - pshufd xmm2,xmm0,19 - pxor xmm0,xmm0 - movdqa [16+esp],xmm1 - paddq xmm1,xmm1 - pand xmm2,xmm3 - pcmpgtd xmm0,xmm1 - pxor xmm1,xmm2 - pshufd xmm2,xmm0,19 - pxor xmm0,xmm0 - movdqa [32+esp],xmm1 - paddq xmm1,xmm1 - pand xmm2,xmm3 - pcmpgtd xmm0,xmm1 - pxor xmm1,xmm2 - pshufd xmm2,xmm0,19 - pxor xmm0,xmm0 - movdqa [48+esp],xmm1 - paddq xmm1,xmm1 - pand xmm2,xmm3 - pcmpgtd xmm0,xmm1 - pxor xmm1,xmm2 - pshufd xmm7,xmm0,19 - movdqa [64+esp],xmm1 - paddq xmm1,xmm1 - movups xmm0,[ebp] - pand xmm7,xmm3 - movups xmm2,[esi] - pxor xmm7,xmm1 - mov ecx,ebx - movdqu xmm3,[16+esi] - xorps xmm2,xmm0 - movdqu xmm4,[32+esi] - pxor xmm3,xmm0 - movdqu xmm5,[48+esi] - pxor xmm4,xmm0 - movdqu xmm6,[64+esi] - pxor xmm5,xmm0 - movdqu xmm1,[80+esi] - pxor xmm6,xmm0 - lea esi,[96+esi] - pxor xmm2,[esp] - movdqa [80+esp],xmm7 - pxor xmm7,xmm1 - movups xmm1,[16+ebp] - pxor xmm3,[16+esp] - pxor xmm4,[32+esp] -db 102,15,56,222,209 - pxor xmm5,[48+esp] - pxor xmm6,[64+esp] -db 102,15,56,222,217 - pxor xmm7,xmm0 - movups xmm0,[32+ebp] -db 102,15,56,222,225 -db 102,15,56,222,233 -db 102,15,56,222,241 -db 102,15,56,222,249 - call L$_aesni_decrypt6_enter - movdqa xmm1,[80+esp] - pxor xmm0,xmm0 - xorps xmm2,[esp] - pcmpgtd xmm0,xmm1 - xorps xmm3,[16+esp] - movups [edi],xmm2 - xorps xmm4,[32+esp] - movups [16+edi],xmm3 - xorps xmm5,[48+esp] - movups [32+edi],xmm4 - xorps xmm6,[64+esp] - movups [48+edi],xmm5 - xorps xmm7,xmm1 - movups [64+edi],xmm6 - pshufd xmm2,xmm0,19 - movups [80+edi],xmm7 - lea edi,[96+edi] - movdqa xmm3,[96+esp] - pxor xmm0,xmm0 - paddq xmm1,xmm1 - pand xmm2,xmm3 - pcmpgtd xmm0,xmm1 - pxor xmm1,xmm2 - sub eax,96 - jnc NEAR L$061xts_dec_loop6 - mov ecx,DWORD [240+ebp] - mov edx,ebp - mov ebx,ecx -L$060xts_dec_short: - add eax,96 - jz NEAR L$062xts_dec_done6x - movdqa xmm5,xmm1 - cmp eax,32 - jb NEAR L$063xts_dec_one - pshufd xmm2,xmm0,19 - pxor xmm0,xmm0 - paddq xmm1,xmm1 - pand xmm2,xmm3 - pcmpgtd xmm0,xmm1 - pxor xmm1,xmm2 - je NEAR L$064xts_dec_two - pshufd xmm2,xmm0,19 - pxor xmm0,xmm0 - movdqa xmm6,xmm1 - paddq xmm1,xmm1 - pand xmm2,xmm3 - pcmpgtd xmm0,xmm1 - pxor xmm1,xmm2 - cmp eax,64 - jb NEAR L$065xts_dec_three - pshufd xmm2,xmm0,19 - pxor xmm0,xmm0 - movdqa xmm7,xmm1 - paddq xmm1,xmm1 - pand xmm2,xmm3 - pcmpgtd xmm0,xmm1 - pxor xmm1,xmm2 - movdqa [esp],xmm5 - movdqa [16+esp],xmm6 - je NEAR L$066xts_dec_four - movdqa [32+esp],xmm7 - pshufd xmm7,xmm0,19 - movdqa [48+esp],xmm1 - paddq xmm1,xmm1 - pand xmm7,xmm3 - pxor xmm7,xmm1 - movdqu xmm2,[esi] - movdqu xmm3,[16+esi] - movdqu xmm4,[32+esi] - pxor xmm2,[esp] - movdqu xmm5,[48+esi] - pxor xmm3,[16+esp] - movdqu xmm6,[64+esi] - pxor xmm4,[32+esp] - lea esi,[80+esi] - pxor xmm5,[48+esp] - movdqa [64+esp],xmm7 - pxor xmm6,xmm7 - call __aesni_decrypt6 - movaps xmm1,[64+esp] - xorps xmm2,[esp] - xorps xmm3,[16+esp] - xorps xmm4,[32+esp] - movups [edi],xmm2 - xorps xmm5,[48+esp] - movups [16+edi],xmm3 - xorps xmm6,xmm1 - movups [32+edi],xmm4 - movups [48+edi],xmm5 - movups [64+edi],xmm6 - lea edi,[80+edi] - jmp NEAR L$067xts_dec_done -align 16 -L$063xts_dec_one: - movups xmm2,[esi] - lea esi,[16+esi] - xorps xmm2,xmm5 - movups xmm0,[edx] - movups xmm1,[16+edx] - lea edx,[32+edx] - xorps xmm2,xmm0 -L$068dec1_loop_12: -db 102,15,56,222,209 - dec ecx - movups xmm1,[edx] - lea edx,[16+edx] - jnz NEAR L$068dec1_loop_12 -db 102,15,56,223,209 - xorps xmm2,xmm5 - movups [edi],xmm2 - lea edi,[16+edi] - movdqa xmm1,xmm5 - jmp NEAR L$067xts_dec_done -align 16 -L$064xts_dec_two: - movaps xmm6,xmm1 - movups xmm2,[esi] - movups xmm3,[16+esi] - lea esi,[32+esi] - xorps xmm2,xmm5 - xorps xmm3,xmm6 - call __aesni_decrypt2 - xorps xmm2,xmm5 - xorps xmm3,xmm6 - movups [edi],xmm2 - movups [16+edi],xmm3 - lea edi,[32+edi] - movdqa xmm1,xmm6 - jmp NEAR L$067xts_dec_done -align 16 -L$065xts_dec_three: - movaps xmm7,xmm1 - movups xmm2,[esi] - movups xmm3,[16+esi] - movups xmm4,[32+esi] - lea esi,[48+esi] - xorps xmm2,xmm5 - xorps xmm3,xmm6 - xorps xmm4,xmm7 - call __aesni_decrypt3 - xorps xmm2,xmm5 - xorps xmm3,xmm6 - xorps xmm4,xmm7 - movups [edi],xmm2 - movups [16+edi],xmm3 - movups [32+edi],xmm4 - lea edi,[48+edi] - movdqa xmm1,xmm7 - jmp NEAR L$067xts_dec_done -align 16 -L$066xts_dec_four: - movaps xmm6,xmm1 - movups xmm2,[esi] - movups xmm3,[16+esi] - movups xmm4,[32+esi] - xorps xmm2,[esp] - movups xmm5,[48+esi] - lea esi,[64+esi] - xorps xmm3,[16+esp] - xorps xmm4,xmm7 - xorps xmm5,xmm6 - call __aesni_decrypt4 - xorps xmm2,[esp] - xorps xmm3,[16+esp] - xorps xmm4,xmm7 - movups [edi],xmm2 - xorps xmm5,xmm6 - movups [16+edi],xmm3 - movups [32+edi],xmm4 - movups [48+edi],xmm5 - lea edi,[64+edi] - movdqa xmm1,xmm6 - jmp NEAR L$067xts_dec_done -align 16 -L$062xts_dec_done6x: - mov eax,DWORD [112+esp] - and eax,15 - jz NEAR L$069xts_dec_ret - mov DWORD [112+esp],eax - jmp NEAR L$070xts_dec_only_one_more -align 16 -L$067xts_dec_done: - mov eax,DWORD [112+esp] - pxor xmm0,xmm0 - and eax,15 - jz NEAR L$069xts_dec_ret - pcmpgtd xmm0,xmm1 - mov DWORD [112+esp],eax - pshufd xmm2,xmm0,19 - pxor xmm0,xmm0 - movdqa xmm3,[96+esp] - paddq xmm1,xmm1 - pand xmm2,xmm3 - pcmpgtd xmm0,xmm1 - pxor xmm1,xmm2 -L$070xts_dec_only_one_more: - pshufd xmm5,xmm0,19 - movdqa xmm6,xmm1 - paddq xmm1,xmm1 - pand xmm5,xmm3 - pxor xmm5,xmm1 - mov edx,ebp - mov ecx,ebx - movups xmm2,[esi] - xorps xmm2,xmm5 - movups xmm0,[edx] - movups xmm1,[16+edx] - lea edx,[32+edx] - xorps xmm2,xmm0 -L$071dec1_loop_13: -db 102,15,56,222,209 - dec ecx - movups xmm1,[edx] - lea edx,[16+edx] - jnz NEAR L$071dec1_loop_13 -db 102,15,56,223,209 - xorps xmm2,xmm5 - movups [edi],xmm2 -L$072xts_dec_steal: - movzx ecx,BYTE [16+esi] - movzx edx,BYTE [edi] - lea esi,[1+esi] - mov BYTE [edi],cl - mov BYTE [16+edi],dl - lea edi,[1+edi] - sub eax,1 - jnz NEAR L$072xts_dec_steal - sub edi,DWORD [112+esp] - mov edx,ebp - mov ecx,ebx - movups xmm2,[edi] - xorps xmm2,xmm6 - movups xmm0,[edx] - movups xmm1,[16+edx] - lea edx,[32+edx] - xorps xmm2,xmm0 -L$073dec1_loop_14: -db 102,15,56,222,209 - dec ecx - movups xmm1,[edx] - lea edx,[16+edx] - jnz NEAR L$073dec1_loop_14 -db 102,15,56,223,209 - xorps xmm2,xmm6 - movups [edi],xmm2 -L$069xts_dec_ret: - pxor xmm0,xmm0 - pxor xmm1,xmm1 - pxor xmm2,xmm2 - movdqa [esp],xmm0 - pxor xmm3,xmm3 - movdqa [16+esp],xmm0 - pxor xmm4,xmm4 - movdqa [32+esp],xmm0 - pxor xmm5,xmm5 - movdqa [48+esp],xmm0 - pxor xmm6,xmm6 - movdqa [64+esp],xmm0 - pxor xmm7,xmm7 - movdqa [80+esp],xmm0 - mov esp,DWORD [116+esp] - pop edi - pop esi - pop ebx - pop ebp - ret -global _aesni_cbc_encrypt -align 16 -_aesni_cbc_encrypt: -L$_aesni_cbc_encrypt_begin: - push ebp - push ebx - push esi - push edi - mov esi,DWORD [20+esp] - mov ebx,esp - mov edi,DWORD [24+esp] - sub ebx,24 - mov eax,DWORD [28+esp] - and ebx,-16 - mov edx,DWORD [32+esp] - mov ebp,DWORD [36+esp] - test eax,eax - jz NEAR L$074cbc_abort - cmp DWORD [40+esp],0 - xchg ebx,esp - movups xmm7,[ebp] - mov ecx,DWORD [240+edx] - mov ebp,edx - mov DWORD [16+esp],ebx - mov ebx,ecx - je NEAR L$075cbc_decrypt - movaps xmm2,xmm7 - cmp eax,16 - jb NEAR L$076cbc_enc_tail - sub eax,16 - jmp NEAR L$077cbc_enc_loop -align 16 -L$077cbc_enc_loop: - movups xmm7,[esi] - lea esi,[16+esi] - movups xmm0,[edx] - movups xmm1,[16+edx] - xorps xmm7,xmm0 - lea edx,[32+edx] - xorps xmm2,xmm7 -L$078enc1_loop_15: -db 102,15,56,220,209 - dec ecx - movups xmm1,[edx] - lea edx,[16+edx] - jnz NEAR L$078enc1_loop_15 -db 102,15,56,221,209 - mov ecx,ebx - mov edx,ebp - movups [edi],xmm2 - lea edi,[16+edi] - sub eax,16 - jnc NEAR L$077cbc_enc_loop - add eax,16 - jnz NEAR L$076cbc_enc_tail - movaps xmm7,xmm2 - pxor xmm2,xmm2 - jmp NEAR L$079cbc_ret -L$076cbc_enc_tail: - mov ecx,eax -dd 2767451785 - mov ecx,16 - sub ecx,eax - xor eax,eax -dd 2868115081 - lea edi,[edi-16] - mov ecx,ebx - mov esi,edi - mov edx,ebp - jmp NEAR L$077cbc_enc_loop -align 16 -L$075cbc_decrypt: - cmp eax,80 - jbe NEAR L$080cbc_dec_tail - movaps [esp],xmm7 - sub eax,80 - jmp NEAR L$081cbc_dec_loop6_enter -align 16 -L$082cbc_dec_loop6: - movaps [esp],xmm0 - movups [edi],xmm7 - lea edi,[16+edi] -L$081cbc_dec_loop6_enter: - movdqu xmm2,[esi] - movdqu xmm3,[16+esi] - movdqu xmm4,[32+esi] - movdqu xmm5,[48+esi] - movdqu xmm6,[64+esi] - movdqu xmm7,[80+esi] - call __aesni_decrypt6 - movups xmm1,[esi] - movups xmm0,[16+esi] - xorps xmm2,[esp] - xorps xmm3,xmm1 - movups xmm1,[32+esi] - xorps xmm4,xmm0 - movups xmm0,[48+esi] - xorps xmm5,xmm1 - movups xmm1,[64+esi] - xorps xmm6,xmm0 - movups xmm0,[80+esi] - xorps xmm7,xmm1 - movups [edi],xmm2 - movups [16+edi],xmm3 - lea esi,[96+esi] - movups [32+edi],xmm4 - mov ecx,ebx - movups [48+edi],xmm5 - mov edx,ebp - movups [64+edi],xmm6 - lea edi,[80+edi] - sub eax,96 - ja NEAR L$082cbc_dec_loop6 - movaps xmm2,xmm7 - movaps xmm7,xmm0 - add eax,80 - jle NEAR L$083cbc_dec_clear_tail_collected - movups [edi],xmm2 - lea edi,[16+edi] -L$080cbc_dec_tail: - movups xmm2,[esi] - movaps xmm6,xmm2 - cmp eax,16 - jbe NEAR L$084cbc_dec_one - movups xmm3,[16+esi] - movaps xmm5,xmm3 - cmp eax,32 - jbe NEAR L$085cbc_dec_two - movups xmm4,[32+esi] - cmp eax,48 - jbe NEAR L$086cbc_dec_three - movups xmm5,[48+esi] - cmp eax,64 - jbe NEAR L$087cbc_dec_four - movups xmm6,[64+esi] - movaps [esp],xmm7 - movups xmm2,[esi] - xorps xmm7,xmm7 - call __aesni_decrypt6 - movups xmm1,[esi] - movups xmm0,[16+esi] - xorps xmm2,[esp] - xorps xmm3,xmm1 - movups xmm1,[32+esi] - xorps xmm4,xmm0 - movups xmm0,[48+esi] - xorps xmm5,xmm1 - movups xmm7,[64+esi] - xorps xmm6,xmm0 - movups [edi],xmm2 - movups [16+edi],xmm3 - pxor xmm3,xmm3 - movups [32+edi],xmm4 - pxor xmm4,xmm4 - movups [48+edi],xmm5 - pxor xmm5,xmm5 - lea edi,[64+edi] - movaps xmm2,xmm6 - pxor xmm6,xmm6 - sub eax,80 - jmp NEAR L$088cbc_dec_tail_collected -align 16 -L$084cbc_dec_one: - movups xmm0,[edx] - movups xmm1,[16+edx] - lea edx,[32+edx] - xorps xmm2,xmm0 -L$089dec1_loop_16: -db 102,15,56,222,209 - dec ecx - movups xmm1,[edx] - lea edx,[16+edx] - jnz NEAR L$089dec1_loop_16 -db 102,15,56,223,209 - xorps xmm2,xmm7 - movaps xmm7,xmm6 - sub eax,16 - jmp NEAR L$088cbc_dec_tail_collected -align 16 -L$085cbc_dec_two: - call __aesni_decrypt2 - xorps xmm2,xmm7 - xorps xmm3,xmm6 - movups [edi],xmm2 - movaps xmm2,xmm3 - pxor xmm3,xmm3 - lea edi,[16+edi] - movaps xmm7,xmm5 - sub eax,32 - jmp NEAR L$088cbc_dec_tail_collected -align 16 -L$086cbc_dec_three: - call __aesni_decrypt3 - xorps xmm2,xmm7 - xorps xmm3,xmm6 - xorps xmm4,xmm5 - movups [edi],xmm2 - movaps xmm2,xmm4 - pxor xmm4,xmm4 - movups [16+edi],xmm3 - pxor xmm3,xmm3 - lea edi,[32+edi] - movups xmm7,[32+esi] - sub eax,48 - jmp NEAR L$088cbc_dec_tail_collected -align 16 -L$087cbc_dec_four: - call __aesni_decrypt4 - movups xmm1,[16+esi] - movups xmm0,[32+esi] - xorps xmm2,xmm7 - movups xmm7,[48+esi] - xorps xmm3,xmm6 - movups [edi],xmm2 - xorps xmm4,xmm1 - movups [16+edi],xmm3 - pxor xmm3,xmm3 - xorps xmm5,xmm0 - movups [32+edi],xmm4 - pxor xmm4,xmm4 - lea edi,[48+edi] - movaps xmm2,xmm5 - pxor xmm5,xmm5 - sub eax,64 - jmp NEAR L$088cbc_dec_tail_collected -align 16 -L$083cbc_dec_clear_tail_collected: - pxor xmm3,xmm3 - pxor xmm4,xmm4 - pxor xmm5,xmm5 - pxor xmm6,xmm6 -L$088cbc_dec_tail_collected: - and eax,15 - jnz NEAR L$090cbc_dec_tail_partial - movups [edi],xmm2 - pxor xmm0,xmm0 - jmp NEAR L$079cbc_ret -align 16 -L$090cbc_dec_tail_partial: - movaps [esp],xmm2 - pxor xmm0,xmm0 - mov ecx,16 - mov esi,esp - sub ecx,eax -dd 2767451785 - movdqa [esp],xmm2 -L$079cbc_ret: - mov esp,DWORD [16+esp] - mov ebp,DWORD [36+esp] - pxor xmm2,xmm2 - pxor xmm1,xmm1 - movups [ebp],xmm7 - pxor xmm7,xmm7 -L$074cbc_abort: - pop edi - pop esi - pop ebx - pop ebp - ret -align 16 -__aesni_set_encrypt_key: - push ebp - push ebx - test eax,eax - jz NEAR L$091bad_pointer - test edx,edx - jz NEAR L$091bad_pointer - call L$092pic -L$092pic: - pop ebx - lea ebx,[(L$key_const-L$092pic)+ebx] - lea ebp,[_OPENSSL_ia32cap_P] - movups xmm0,[eax] - xorps xmm4,xmm4 - mov ebp,DWORD [4+ebp] - lea edx,[16+edx] - and ebp,268437504 - cmp ecx,256 - je NEAR L$09314rounds - cmp ecx,192 - je NEAR L$09412rounds - cmp ecx,128 - jne NEAR L$095bad_keybits -align 16 -L$09610rounds: - cmp ebp,268435456 - je NEAR L$09710rounds_alt - mov ecx,9 - movups [edx-16],xmm0 -db 102,15,58,223,200,1 - call L$098key_128_cold -db 102,15,58,223,200,2 - call L$099key_128 -db 102,15,58,223,200,4 - call L$099key_128 -db 102,15,58,223,200,8 - call L$099key_128 -db 102,15,58,223,200,16 - call L$099key_128 -db 102,15,58,223,200,32 - call L$099key_128 -db 102,15,58,223,200,64 - call L$099key_128 -db 102,15,58,223,200,128 - call L$099key_128 -db 102,15,58,223,200,27 - call L$099key_128 -db 102,15,58,223,200,54 - call L$099key_128 - movups [edx],xmm0 - mov DWORD [80+edx],ecx - jmp NEAR L$100good_key -align 16 -L$099key_128: - movups [edx],xmm0 - lea edx,[16+edx] -L$098key_128_cold: - shufps xmm4,xmm0,16 - xorps xmm0,xmm4 - shufps xmm4,xmm0,140 - xorps xmm0,xmm4 - shufps xmm1,xmm1,255 - xorps xmm0,xmm1 - ret -align 16 -L$09710rounds_alt: - movdqa xmm5,[ebx] - mov ecx,8 - movdqa xmm4,[32+ebx] - movdqa xmm2,xmm0 - movdqu [edx-16],xmm0 -L$101loop_key128: -db 102,15,56,0,197 -db 102,15,56,221,196 - pslld xmm4,1 - lea edx,[16+edx] - movdqa xmm3,xmm2 - pslldq xmm2,4 - pxor xmm3,xmm2 - pslldq xmm2,4 - pxor xmm3,xmm2 - pslldq xmm2,4 - pxor xmm2,xmm3 - pxor xmm0,xmm2 - movdqu [edx-16],xmm0 - movdqa xmm2,xmm0 - dec ecx - jnz NEAR L$101loop_key128 - movdqa xmm4,[48+ebx] -db 102,15,56,0,197 -db 102,15,56,221,196 - pslld xmm4,1 - movdqa xmm3,xmm2 - pslldq xmm2,4 - pxor xmm3,xmm2 - pslldq xmm2,4 - pxor xmm3,xmm2 - pslldq xmm2,4 - pxor xmm2,xmm3 - pxor xmm0,xmm2 - movdqu [edx],xmm0 - movdqa xmm2,xmm0 -db 102,15,56,0,197 -db 102,15,56,221,196 - movdqa xmm3,xmm2 - pslldq xmm2,4 - pxor xmm3,xmm2 - pslldq xmm2,4 - pxor xmm3,xmm2 - pslldq xmm2,4 - pxor xmm2,xmm3 - pxor xmm0,xmm2 - movdqu [16+edx],xmm0 - mov ecx,9 - mov DWORD [96+edx],ecx - jmp NEAR L$100good_key -align 16 -L$09412rounds: - movq xmm2,[16+eax] - cmp ebp,268435456 - je NEAR L$10212rounds_alt - mov ecx,11 - movups [edx-16],xmm0 -db 102,15,58,223,202,1 - call L$103key_192a_cold -db 102,15,58,223,202,2 - call L$104key_192b -db 102,15,58,223,202,4 - call L$105key_192a -db 102,15,58,223,202,8 - call L$104key_192b -db 102,15,58,223,202,16 - call L$105key_192a -db 102,15,58,223,202,32 - call L$104key_192b -db 102,15,58,223,202,64 - call L$105key_192a -db 102,15,58,223,202,128 - call L$104key_192b - movups [edx],xmm0 - mov DWORD [48+edx],ecx - jmp NEAR L$100good_key -align 16 -L$105key_192a: - movups [edx],xmm0 - lea edx,[16+edx] -align 16 -L$103key_192a_cold: - movaps xmm5,xmm2 -L$106key_192b_warm: - shufps xmm4,xmm0,16 - movdqa xmm3,xmm2 - xorps xmm0,xmm4 - shufps xmm4,xmm0,140 - pslldq xmm3,4 - xorps xmm0,xmm4 - pshufd xmm1,xmm1,85 - pxor xmm2,xmm3 - pxor xmm0,xmm1 - pshufd xmm3,xmm0,255 - pxor xmm2,xmm3 - ret -align 16 -L$104key_192b: - movaps xmm3,xmm0 - shufps xmm5,xmm0,68 - movups [edx],xmm5 - shufps xmm3,xmm2,78 - movups [16+edx],xmm3 - lea edx,[32+edx] - jmp NEAR L$106key_192b_warm -align 16 -L$10212rounds_alt: - movdqa xmm5,[16+ebx] - movdqa xmm4,[32+ebx] - mov ecx,8 - movdqu [edx-16],xmm0 -L$107loop_key192: - movq [edx],xmm2 - movdqa xmm1,xmm2 -db 102,15,56,0,213 -db 102,15,56,221,212 - pslld xmm4,1 - lea edx,[24+edx] - movdqa xmm3,xmm0 - pslldq xmm0,4 - pxor xmm3,xmm0 - pslldq xmm0,4 - pxor xmm3,xmm0 - pslldq xmm0,4 - pxor xmm0,xmm3 - pshufd xmm3,xmm0,255 - pxor xmm3,xmm1 - pslldq xmm1,4 - pxor xmm3,xmm1 - pxor xmm0,xmm2 - pxor xmm2,xmm3 - movdqu [edx-16],xmm0 - dec ecx - jnz NEAR L$107loop_key192 - mov ecx,11 - mov DWORD [32+edx],ecx - jmp NEAR L$100good_key -align 16 -L$09314rounds: - movups xmm2,[16+eax] - lea edx,[16+edx] - cmp ebp,268435456 - je NEAR L$10814rounds_alt - mov ecx,13 - movups [edx-32],xmm0 - movups [edx-16],xmm2 -db 102,15,58,223,202,1 - call L$109key_256a_cold -db 102,15,58,223,200,1 - call L$110key_256b -db 102,15,58,223,202,2 - call L$111key_256a -db 102,15,58,223,200,2 - call L$110key_256b -db 102,15,58,223,202,4 - call L$111key_256a -db 102,15,58,223,200,4 - call L$110key_256b -db 102,15,58,223,202,8 - call L$111key_256a -db 102,15,58,223,200,8 - call L$110key_256b -db 102,15,58,223,202,16 - call L$111key_256a -db 102,15,58,223,200,16 - call L$110key_256b -db 102,15,58,223,202,32 - call L$111key_256a -db 102,15,58,223,200,32 - call L$110key_256b -db 102,15,58,223,202,64 - call L$111key_256a - movups [edx],xmm0 - mov DWORD [16+edx],ecx - xor eax,eax - jmp NEAR L$100good_key -align 16 -L$111key_256a: - movups [edx],xmm2 - lea edx,[16+edx] -L$109key_256a_cold: - shufps xmm4,xmm0,16 - xorps xmm0,xmm4 - shufps xmm4,xmm0,140 - xorps xmm0,xmm4 - shufps xmm1,xmm1,255 - xorps xmm0,xmm1 - ret -align 16 -L$110key_256b: - movups [edx],xmm0 - lea edx,[16+edx] - shufps xmm4,xmm2,16 - xorps xmm2,xmm4 - shufps xmm4,xmm2,140 - xorps xmm2,xmm4 - shufps xmm1,xmm1,170 - xorps xmm2,xmm1 - ret -align 16 -L$10814rounds_alt: - movdqa xmm5,[ebx] - movdqa xmm4,[32+ebx] - mov ecx,7 - movdqu [edx-32],xmm0 - movdqa xmm1,xmm2 - movdqu [edx-16],xmm2 -L$112loop_key256: -db 102,15,56,0,213 -db 102,15,56,221,212 - movdqa xmm3,xmm0 - pslldq xmm0,4 - pxor xmm3,xmm0 - pslldq xmm0,4 - pxor xmm3,xmm0 - pslldq xmm0,4 - pxor xmm0,xmm3 - pslld xmm4,1 - pxor xmm0,xmm2 - movdqu [edx],xmm0 - dec ecx - jz NEAR L$113done_key256 - pshufd xmm2,xmm0,255 - pxor xmm3,xmm3 -db 102,15,56,221,211 - movdqa xmm3,xmm1 - pslldq xmm1,4 - pxor xmm3,xmm1 - pslldq xmm1,4 - pxor xmm3,xmm1 - pslldq xmm1,4 - pxor xmm1,xmm3 - pxor xmm2,xmm1 - movdqu [16+edx],xmm2 - lea edx,[32+edx] - movdqa xmm1,xmm2 - jmp NEAR L$112loop_key256 -L$113done_key256: - mov ecx,13 - mov DWORD [16+edx],ecx -L$100good_key: - pxor xmm0,xmm0 - pxor xmm1,xmm1 - pxor xmm2,xmm2 - pxor xmm3,xmm3 - pxor xmm4,xmm4 - pxor xmm5,xmm5 - xor eax,eax - pop ebx - pop ebp - ret -align 4 -L$091bad_pointer: - mov eax,-1 - pop ebx - pop ebp - ret -align 4 -L$095bad_keybits: - pxor xmm0,xmm0 - mov eax,-2 - pop ebx - pop ebp - ret -global _aesni_set_encrypt_key -align 16 -_aesni_set_encrypt_key: -L$_aesni_set_encrypt_key_begin: - mov eax,DWORD [4+esp] - mov ecx,DWORD [8+esp] - mov edx,DWORD [12+esp] - call __aesni_set_encrypt_key - ret -global _aesni_set_decrypt_key -align 16 -_aesni_set_decrypt_key: -L$_aesni_set_decrypt_key_begin: - mov eax,DWORD [4+esp] - mov ecx,DWORD [8+esp] - mov edx,DWORD [12+esp] - call __aesni_set_encrypt_key - mov edx,DWORD [12+esp] - shl ecx,4 - test eax,eax - jnz NEAR L$114dec_key_ret - lea eax,[16+ecx*1+edx] - movups xmm0,[edx] - movups xmm1,[eax] - movups [eax],xmm0 - movups [edx],xmm1 - lea edx,[16+edx] - lea eax,[eax-16] -L$115dec_key_inverse: - movups xmm0,[edx] - movups xmm1,[eax] -db 102,15,56,219,192 -db 102,15,56,219,201 - lea edx,[16+edx] - lea eax,[eax-16] - movups [16+eax],xmm0 - movups [edx-16],xmm1 - cmp eax,edx - ja NEAR L$115dec_key_inverse - movups xmm0,[edx] -db 102,15,56,219,192 - movups [edx],xmm0 - pxor xmm0,xmm0 - pxor xmm1,xmm1 - xor eax,eax -L$114dec_key_ret: - ret -align 64 -L$key_const: -dd 202313229,202313229,202313229,202313229 -dd 67569157,67569157,67569157,67569157 -dd 1,1,1,1 -dd 27,27,27,27 -db 65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69 -db 83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83 -db 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115 -db 115,108,46,111,114,103,62,0 -segment .bss -common _OPENSSL_ia32cap_P 16 diff --git a/third_party/boringssl/win-x86/crypto/aes/vpaes-x86.asm b/third_party/boringssl/win-x86/crypto/aes/vpaes-x86.asm deleted file mode 100644 index b08b05637db27..0000000000000 --- a/third_party/boringssl/win-x86/crypto/aes/vpaes-x86.asm +++ /dev/null @@ -1,649 +0,0 @@ -%ifidn __OUTPUT_FORMAT__,obj -section code use32 class=code align=64 -%elifidn __OUTPUT_FORMAT__,win32 -%ifdef __YASM_VERSION_ID__ -%if __YASM_VERSION_ID__ < 01010000h -%error yasm version 1.1.0 or later needed. -%endif -; Yasm automatically includes .00 and complains about redefining it. -; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html -%else -$@feat.00 equ 1 -%endif -section .text code align=64 -%else -section .text code -%endif -align 64 -L$_vpaes_consts: -dd 218628480,235210255,168496130,67568393 -dd 252381056,17041926,33884169,51187212 -dd 252645135,252645135,252645135,252645135 -dd 1512730624,3266504856,1377990664,3401244816 -dd 830229760,1275146365,2969422977,3447763452 -dd 3411033600,2979783055,338359620,2782886510 -dd 4209124096,907596821,221174255,1006095553 -dd 191964160,3799684038,3164090317,1589111125 -dd 182528256,1777043520,2877432650,3265356744 -dd 1874708224,3503451415,3305285752,363511674 -dd 1606117888,3487855781,1093350906,2384367825 -dd 197121,67569157,134941193,202313229 -dd 67569157,134941193,202313229,197121 -dd 134941193,202313229,197121,67569157 -dd 202313229,197121,67569157,134941193 -dd 33619971,100992007,168364043,235736079 -dd 235736079,33619971,100992007,168364043 -dd 168364043,235736079,33619971,100992007 -dd 100992007,168364043,235736079,33619971 -dd 50462976,117835012,185207048,252579084 -dd 252314880,51251460,117574920,184942860 -dd 184682752,252054788,50987272,118359308 -dd 118099200,185467140,251790600,50727180 -dd 2946363062,528716217,1300004225,1881839624 -dd 1532713819,1532713819,1532713819,1532713819 -dd 3602276352,4288629033,3737020424,4153884961 -dd 1354558464,32357713,2958822624,3775749553 -dd 1201988352,132424512,1572796698,503232858 -dd 2213177600,1597421020,4103937655,675398315 -dd 2749646592,4273543773,1511898873,121693092 -dd 3040248576,1103263732,2871565598,1608280554 -dd 2236667136,2588920351,482954393,64377734 -dd 3069987328,291237287,2117370568,3650299247 -dd 533321216,3573750986,2572112006,1401264716 -dd 1339849704,2721158661,548607111,3445553514 -dd 2128193280,3054596040,2183486460,1257083700 -dd 655635200,1165381986,3923443150,2344132524 -dd 190078720,256924420,290342170,357187870 -dd 1610966272,2263057382,4103205268,309794674 -dd 2592527872,2233205587,1335446729,3402964816 -dd 3973531904,3225098121,3002836325,1918774430 -dd 3870401024,2102906079,2284471353,4117666579 -dd 617007872,1021508343,366931923,691083277 -dd 2528395776,3491914898,2968704004,1613121270 -dd 3445188352,3247741094,844474987,4093578302 -dd 651481088,1190302358,1689581232,574775300 -dd 4289380608,206939853,2555985458,2489840491 -dd 2130264064,327674451,3566485037,3349835193 -dd 2470714624,316102159,3636825756,3393945945 -db 86,101,99,116,111,114,32,80,101,114,109,117,116,97,116,105 -db 111,110,32,65,69,83,32,102,111,114,32,120,56,54,47,83 -db 83,83,69,51,44,32,77,105,107,101,32,72,97,109,98,117 -db 114,103,32,40,83,116,97,110,102,111,114,100,32,85,110,105 -db 118,101,114,115,105,116,121,41,0 -align 64 -align 16 -__vpaes_preheat: - add ebp,DWORD [esp] - movdqa xmm7,[ebp-48] - movdqa xmm6,[ebp-16] - ret -align 16 -__vpaes_encrypt_core: - mov ecx,16 - mov eax,DWORD [240+edx] - movdqa xmm1,xmm6 - movdqa xmm2,[ebp] - pandn xmm1,xmm0 - pand xmm0,xmm6 - movdqu xmm5,[edx] -db 102,15,56,0,208 - movdqa xmm0,[16+ebp] - pxor xmm2,xmm5 - psrld xmm1,4 - add edx,16 -db 102,15,56,0,193 - lea ebx,[192+ebp] - pxor xmm0,xmm2 - jmp NEAR L$000enc_entry -align 16 -L$001enc_loop: - movdqa xmm4,[32+ebp] - movdqa xmm0,[48+ebp] -db 102,15,56,0,226 -db 102,15,56,0,195 - pxor xmm4,xmm5 - movdqa xmm5,[64+ebp] - pxor xmm0,xmm4 - movdqa xmm1,[ecx*1+ebx-64] -db 102,15,56,0,234 - movdqa xmm2,[80+ebp] - movdqa xmm4,[ecx*1+ebx] -db 102,15,56,0,211 - movdqa xmm3,xmm0 - pxor xmm2,xmm5 -db 102,15,56,0,193 - add edx,16 - pxor xmm0,xmm2 -db 102,15,56,0,220 - add ecx,16 - pxor xmm3,xmm0 -db 102,15,56,0,193 - and ecx,48 - sub eax,1 - pxor xmm0,xmm3 -L$000enc_entry: - movdqa xmm1,xmm6 - movdqa xmm5,[ebp-32] - pandn xmm1,xmm0 - psrld xmm1,4 - pand xmm0,xmm6 -db 102,15,56,0,232 - movdqa xmm3,xmm7 - pxor xmm0,xmm1 -db 102,15,56,0,217 - movdqa xmm4,xmm7 - pxor xmm3,xmm5 -db 102,15,56,0,224 - movdqa xmm2,xmm7 - pxor xmm4,xmm5 -db 102,15,56,0,211 - movdqa xmm3,xmm7 - pxor xmm2,xmm0 -db 102,15,56,0,220 - movdqu xmm5,[edx] - pxor xmm3,xmm1 - jnz NEAR L$001enc_loop - movdqa xmm4,[96+ebp] - movdqa xmm0,[112+ebp] -db 102,15,56,0,226 - pxor xmm4,xmm5 -db 102,15,56,0,195 - movdqa xmm1,[64+ecx*1+ebx] - pxor xmm0,xmm4 -db 102,15,56,0,193 - ret -align 16 -__vpaes_decrypt_core: - lea ebx,[608+ebp] - mov eax,DWORD [240+edx] - movdqa xmm1,xmm6 - movdqa xmm2,[ebx-64] - pandn xmm1,xmm0 - mov ecx,eax - psrld xmm1,4 - movdqu xmm5,[edx] - shl ecx,4 - pand xmm0,xmm6 -db 102,15,56,0,208 - movdqa xmm0,[ebx-48] - xor ecx,48 -db 102,15,56,0,193 - and ecx,48 - pxor xmm2,xmm5 - movdqa xmm5,[176+ebp] - pxor xmm0,xmm2 - add edx,16 - lea ecx,[ecx*1+ebx-352] - jmp NEAR L$002dec_entry -align 16 -L$003dec_loop: - movdqa xmm4,[ebx-32] - movdqa xmm1,[ebx-16] -db 102,15,56,0,226 -db 102,15,56,0,203 - pxor xmm0,xmm4 - movdqa xmm4,[ebx] - pxor xmm0,xmm1 - movdqa xmm1,[16+ebx] -db 102,15,56,0,226 -db 102,15,56,0,197 -db 102,15,56,0,203 - pxor xmm0,xmm4 - movdqa xmm4,[32+ebx] - pxor xmm0,xmm1 - movdqa xmm1,[48+ebx] -db 102,15,56,0,226 -db 102,15,56,0,197 -db 102,15,56,0,203 - pxor xmm0,xmm4 - movdqa xmm4,[64+ebx] - pxor xmm0,xmm1 - movdqa xmm1,[80+ebx] -db 102,15,56,0,226 -db 102,15,56,0,197 -db 102,15,56,0,203 - pxor xmm0,xmm4 - add edx,16 -db 102,15,58,15,237,12 - pxor xmm0,xmm1 - sub eax,1 -L$002dec_entry: - movdqa xmm1,xmm6 - movdqa xmm2,[ebp-32] - pandn xmm1,xmm0 - pand xmm0,xmm6 - psrld xmm1,4 -db 102,15,56,0,208 - movdqa xmm3,xmm7 - pxor xmm0,xmm1 -db 102,15,56,0,217 - movdqa xmm4,xmm7 - pxor xmm3,xmm2 -db 102,15,56,0,224 - pxor xmm4,xmm2 - movdqa xmm2,xmm7 -db 102,15,56,0,211 - movdqa xmm3,xmm7 - pxor xmm2,xmm0 -db 102,15,56,0,220 - movdqu xmm0,[edx] - pxor xmm3,xmm1 - jnz NEAR L$003dec_loop - movdqa xmm4,[96+ebx] -db 102,15,56,0,226 - pxor xmm4,xmm0 - movdqa xmm0,[112+ebx] - movdqa xmm2,[ecx] -db 102,15,56,0,195 - pxor xmm0,xmm4 -db 102,15,56,0,194 - ret -align 16 -__vpaes_schedule_core: - add ebp,DWORD [esp] - movdqu xmm0,[esi] - movdqa xmm2,[320+ebp] - movdqa xmm3,xmm0 - lea ebx,[ebp] - movdqa [4+esp],xmm2 - call __vpaes_schedule_transform - movdqa xmm7,xmm0 - test edi,edi - jnz NEAR L$004schedule_am_decrypting - movdqu [edx],xmm0 - jmp NEAR L$005schedule_go -L$004schedule_am_decrypting: - movdqa xmm1,[256+ecx*1+ebp] -db 102,15,56,0,217 - movdqu [edx],xmm3 - xor ecx,48 -L$005schedule_go: - cmp eax,192 - ja NEAR L$006schedule_256 - je NEAR L$007schedule_192 -L$008schedule_128: - mov eax,10 -L$009loop_schedule_128: - call __vpaes_schedule_round - dec eax - jz NEAR L$010schedule_mangle_last - call __vpaes_schedule_mangle - jmp NEAR L$009loop_schedule_128 -align 16 -L$007schedule_192: - movdqu xmm0,[8+esi] - call __vpaes_schedule_transform - movdqa xmm6,xmm0 - pxor xmm4,xmm4 - movhlps xmm6,xmm4 - mov eax,4 -L$011loop_schedule_192: - call __vpaes_schedule_round -db 102,15,58,15,198,8 - call __vpaes_schedule_mangle - call __vpaes_schedule_192_smear - call __vpaes_schedule_mangle - call __vpaes_schedule_round - dec eax - jz NEAR L$010schedule_mangle_last - call __vpaes_schedule_mangle - call __vpaes_schedule_192_smear - jmp NEAR L$011loop_schedule_192 -align 16 -L$006schedule_256: - movdqu xmm0,[16+esi] - call __vpaes_schedule_transform - mov eax,7 -L$012loop_schedule_256: - call __vpaes_schedule_mangle - movdqa xmm6,xmm0 - call __vpaes_schedule_round - dec eax - jz NEAR L$010schedule_mangle_last - call __vpaes_schedule_mangle - pshufd xmm0,xmm0,255 - movdqa [20+esp],xmm7 - movdqa xmm7,xmm6 - call L$_vpaes_schedule_low_round - movdqa xmm7,[20+esp] - jmp NEAR L$012loop_schedule_256 -align 16 -L$010schedule_mangle_last: - lea ebx,[384+ebp] - test edi,edi - jnz NEAR L$013schedule_mangle_last_dec - movdqa xmm1,[256+ecx*1+ebp] -db 102,15,56,0,193 - lea ebx,[352+ebp] - add edx,32 -L$013schedule_mangle_last_dec: - add edx,-16 - pxor xmm0,[336+ebp] - call __vpaes_schedule_transform - movdqu [edx],xmm0 - pxor xmm0,xmm0 - pxor xmm1,xmm1 - pxor xmm2,xmm2 - pxor xmm3,xmm3 - pxor xmm4,xmm4 - pxor xmm5,xmm5 - pxor xmm6,xmm6 - pxor xmm7,xmm7 - ret -align 16 -__vpaes_schedule_192_smear: - pshufd xmm1,xmm6,128 - pshufd xmm0,xmm7,254 - pxor xmm6,xmm1 - pxor xmm1,xmm1 - pxor xmm6,xmm0 - movdqa xmm0,xmm6 - movhlps xmm6,xmm1 - ret -align 16 -__vpaes_schedule_round: - movdqa xmm2,[8+esp] - pxor xmm1,xmm1 -db 102,15,58,15,202,15 -db 102,15,58,15,210,15 - pxor xmm7,xmm1 - pshufd xmm0,xmm0,255 -db 102,15,58,15,192,1 - movdqa [8+esp],xmm2 -L$_vpaes_schedule_low_round: - movdqa xmm1,xmm7 - pslldq xmm7,4 - pxor xmm7,xmm1 - movdqa xmm1,xmm7 - pslldq xmm7,8 - pxor xmm7,xmm1 - pxor xmm7,[336+ebp] - movdqa xmm4,[ebp-16] - movdqa xmm5,[ebp-48] - movdqa xmm1,xmm4 - pandn xmm1,xmm0 - psrld xmm1,4 - pand xmm0,xmm4 - movdqa xmm2,[ebp-32] -db 102,15,56,0,208 - pxor xmm0,xmm1 - movdqa xmm3,xmm5 -db 102,15,56,0,217 - pxor xmm3,xmm2 - movdqa xmm4,xmm5 -db 102,15,56,0,224 - pxor xmm4,xmm2 - movdqa xmm2,xmm5 -db 102,15,56,0,211 - pxor xmm2,xmm0 - movdqa xmm3,xmm5 -db 102,15,56,0,220 - pxor xmm3,xmm1 - movdqa xmm4,[32+ebp] -db 102,15,56,0,226 - movdqa xmm0,[48+ebp] -db 102,15,56,0,195 - pxor xmm0,xmm4 - pxor xmm0,xmm7 - movdqa xmm7,xmm0 - ret -align 16 -__vpaes_schedule_transform: - movdqa xmm2,[ebp-16] - movdqa xmm1,xmm2 - pandn xmm1,xmm0 - psrld xmm1,4 - pand xmm0,xmm2 - movdqa xmm2,[ebx] -db 102,15,56,0,208 - movdqa xmm0,[16+ebx] -db 102,15,56,0,193 - pxor xmm0,xmm2 - ret -align 16 -__vpaes_schedule_mangle: - movdqa xmm4,xmm0 - movdqa xmm5,[128+ebp] - test edi,edi - jnz NEAR L$014schedule_mangle_dec - add edx,16 - pxor xmm4,[336+ebp] -db 102,15,56,0,229 - movdqa xmm3,xmm4 -db 102,15,56,0,229 - pxor xmm3,xmm4 -db 102,15,56,0,229 - pxor xmm3,xmm4 - jmp NEAR L$015schedule_mangle_both -align 16 -L$014schedule_mangle_dec: - movdqa xmm2,[ebp-16] - lea esi,[416+ebp] - movdqa xmm1,xmm2 - pandn xmm1,xmm4 - psrld xmm1,4 - pand xmm4,xmm2 - movdqa xmm2,[esi] -db 102,15,56,0,212 - movdqa xmm3,[16+esi] -db 102,15,56,0,217 - pxor xmm3,xmm2 -db 102,15,56,0,221 - movdqa xmm2,[32+esi] -db 102,15,56,0,212 - pxor xmm2,xmm3 - movdqa xmm3,[48+esi] -db 102,15,56,0,217 - pxor xmm3,xmm2 -db 102,15,56,0,221 - movdqa xmm2,[64+esi] -db 102,15,56,0,212 - pxor xmm2,xmm3 - movdqa xmm3,[80+esi] -db 102,15,56,0,217 - pxor xmm3,xmm2 -db 102,15,56,0,221 - movdqa xmm2,[96+esi] -db 102,15,56,0,212 - pxor xmm2,xmm3 - movdqa xmm3,[112+esi] -db 102,15,56,0,217 - pxor xmm3,xmm2 - add edx,-16 -L$015schedule_mangle_both: - movdqa xmm1,[256+ecx*1+ebp] -db 102,15,56,0,217 - add ecx,-16 - and ecx,48 - movdqu [edx],xmm3 - ret -global _vpaes_set_encrypt_key -align 16 -_vpaes_set_encrypt_key: -L$_vpaes_set_encrypt_key_begin: - push ebp - push ebx - push esi - push edi - mov esi,DWORD [20+esp] - lea ebx,[esp-56] - mov eax,DWORD [24+esp] - and ebx,-16 - mov edx,DWORD [28+esp] - xchg ebx,esp - mov DWORD [48+esp],ebx - mov ebx,eax - shr ebx,5 - add ebx,5 - mov DWORD [240+edx],ebx - mov ecx,48 - mov edi,0 - lea ebp,[(L$_vpaes_consts+0x30-L$016pic_point)] - call __vpaes_schedule_core -L$016pic_point: - mov esp,DWORD [48+esp] - xor eax,eax - pop edi - pop esi - pop ebx - pop ebp - ret -global _vpaes_set_decrypt_key -align 16 -_vpaes_set_decrypt_key: -L$_vpaes_set_decrypt_key_begin: - push ebp - push ebx - push esi - push edi - mov esi,DWORD [20+esp] - lea ebx,[esp-56] - mov eax,DWORD [24+esp] - and ebx,-16 - mov edx,DWORD [28+esp] - xchg ebx,esp - mov DWORD [48+esp],ebx - mov ebx,eax - shr ebx,5 - add ebx,5 - mov DWORD [240+edx],ebx - shl ebx,4 - lea edx,[16+ebx*1+edx] - mov edi,1 - mov ecx,eax - shr ecx,1 - and ecx,32 - xor ecx,32 - lea ebp,[(L$_vpaes_consts+0x30-L$017pic_point)] - call __vpaes_schedule_core -L$017pic_point: - mov esp,DWORD [48+esp] - xor eax,eax - pop edi - pop esi - pop ebx - pop ebp - ret -global _vpaes_encrypt -align 16 -_vpaes_encrypt: -L$_vpaes_encrypt_begin: - push ebp - push ebx - push esi - push edi - lea ebp,[(L$_vpaes_consts+0x30-L$018pic_point)] - call __vpaes_preheat -L$018pic_point: - mov esi,DWORD [20+esp] - lea ebx,[esp-56] - mov edi,DWORD [24+esp] - and ebx,-16 - mov edx,DWORD [28+esp] - xchg ebx,esp - mov DWORD [48+esp],ebx - movdqu xmm0,[esi] - call __vpaes_encrypt_core - movdqu [edi],xmm0 - mov esp,DWORD [48+esp] - pop edi - pop esi - pop ebx - pop ebp - ret -global _vpaes_decrypt -align 16 -_vpaes_decrypt: -L$_vpaes_decrypt_begin: - push ebp - push ebx - push esi - push edi - lea ebp,[(L$_vpaes_consts+0x30-L$019pic_point)] - call __vpaes_preheat -L$019pic_point: - mov esi,DWORD [20+esp] - lea ebx,[esp-56] - mov edi,DWORD [24+esp] - and ebx,-16 - mov edx,DWORD [28+esp] - xchg ebx,esp - mov DWORD [48+esp],ebx - movdqu xmm0,[esi] - call __vpaes_decrypt_core - movdqu [edi],xmm0 - mov esp,DWORD [48+esp] - pop edi - pop esi - pop ebx - pop ebp - ret -global _vpaes_cbc_encrypt -align 16 -_vpaes_cbc_encrypt: -L$_vpaes_cbc_encrypt_begin: - push ebp - push ebx - push esi - push edi - mov esi,DWORD [20+esp] - mov edi,DWORD [24+esp] - mov eax,DWORD [28+esp] - mov edx,DWORD [32+esp] - sub eax,16 - jc NEAR L$020cbc_abort - lea ebx,[esp-56] - mov ebp,DWORD [36+esp] - and ebx,-16 - mov ecx,DWORD [40+esp] - xchg ebx,esp - movdqu xmm1,[ebp] - sub edi,esi - mov DWORD [48+esp],ebx - mov DWORD [esp],edi - mov DWORD [4+esp],edx - mov DWORD [8+esp],ebp - mov edi,eax - lea ebp,[(L$_vpaes_consts+0x30-L$021pic_point)] - call __vpaes_preheat -L$021pic_point: - cmp ecx,0 - je NEAR L$022cbc_dec_loop - jmp NEAR L$023cbc_enc_loop -align 16 -L$023cbc_enc_loop: - movdqu xmm0,[esi] - pxor xmm0,xmm1 - call __vpaes_encrypt_core - mov ebx,DWORD [esp] - mov edx,DWORD [4+esp] - movdqa xmm1,xmm0 - movdqu [esi*1+ebx],xmm0 - lea esi,[16+esi] - sub edi,16 - jnc NEAR L$023cbc_enc_loop - jmp NEAR L$024cbc_done -align 16 -L$022cbc_dec_loop: - movdqu xmm0,[esi] - movdqa [16+esp],xmm1 - movdqa [32+esp],xmm0 - call __vpaes_decrypt_core - mov ebx,DWORD [esp] - mov edx,DWORD [4+esp] - pxor xmm0,[16+esp] - movdqa xmm1,[32+esp] - movdqu [esi*1+ebx],xmm0 - lea esi,[16+esi] - sub edi,16 - jnc NEAR L$022cbc_dec_loop -L$024cbc_done: - mov ebx,DWORD [8+esp] - mov esp,DWORD [48+esp] - movdqu [ebx],xmm1 -L$020cbc_abort: - pop edi - pop esi - pop ebx - pop ebp - ret diff --git a/third_party/boringssl/win-x86/crypto/bn/bn-586.asm b/third_party/boringssl/win-x86/crypto/bn/bn-586.asm deleted file mode 100644 index b222040acae93..0000000000000 --- a/third_party/boringssl/win-x86/crypto/bn/bn-586.asm +++ /dev/null @@ -1,1523 +0,0 @@ -%ifidn __OUTPUT_FORMAT__,obj -section code use32 class=code align=64 -%elifidn __OUTPUT_FORMAT__,win32 -%ifdef __YASM_VERSION_ID__ -%if __YASM_VERSION_ID__ < 01010000h -%error yasm version 1.1.0 or later needed. -%endif -; Yasm automatically includes .00 and complains about redefining it. -; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html -%else -$@feat.00 equ 1 -%endif -section .text code align=64 -%else -section .text code -%endif -;extern _OPENSSL_ia32cap_P -global _bn_mul_add_words -align 16 -_bn_mul_add_words: -L$_bn_mul_add_words_begin: - lea eax,[_OPENSSL_ia32cap_P] - bt DWORD [eax],26 - jnc NEAR L$000maw_non_sse2 - mov eax,DWORD [4+esp] - mov edx,DWORD [8+esp] - mov ecx,DWORD [12+esp] - movd mm0,DWORD [16+esp] - pxor mm1,mm1 - jmp NEAR L$001maw_sse2_entry -align 16 -L$002maw_sse2_unrolled: - movd mm3,DWORD [eax] - paddq mm1,mm3 - movd mm2,DWORD [edx] - pmuludq mm2,mm0 - movd mm4,DWORD [4+edx] - pmuludq mm4,mm0 - movd mm6,DWORD [8+edx] - pmuludq mm6,mm0 - movd mm7,DWORD [12+edx] - pmuludq mm7,mm0 - paddq mm1,mm2 - movd mm3,DWORD [4+eax] - paddq mm3,mm4 - movd mm5,DWORD [8+eax] - paddq mm5,mm6 - movd mm4,DWORD [12+eax] - paddq mm7,mm4 - movd DWORD [eax],mm1 - movd mm2,DWORD [16+edx] - pmuludq mm2,mm0 - psrlq mm1,32 - movd mm4,DWORD [20+edx] - pmuludq mm4,mm0 - paddq mm1,mm3 - movd mm6,DWORD [24+edx] - pmuludq mm6,mm0 - movd DWORD [4+eax],mm1 - psrlq mm1,32 - movd mm3,DWORD [28+edx] - add edx,32 - pmuludq mm3,mm0 - paddq mm1,mm5 - movd mm5,DWORD [16+eax] - paddq mm2,mm5 - movd DWORD [8+eax],mm1 - psrlq mm1,32 - paddq mm1,mm7 - movd mm5,DWORD [20+eax] - paddq mm4,mm5 - movd DWORD [12+eax],mm1 - psrlq mm1,32 - paddq mm1,mm2 - movd mm5,DWORD [24+eax] - paddq mm6,mm5 - movd DWORD [16+eax],mm1 - psrlq mm1,32 - paddq mm1,mm4 - movd mm5,DWORD [28+eax] - paddq mm3,mm5 - movd DWORD [20+eax],mm1 - psrlq mm1,32 - paddq mm1,mm6 - movd DWORD [24+eax],mm1 - psrlq mm1,32 - paddq mm1,mm3 - movd DWORD [28+eax],mm1 - lea eax,[32+eax] - psrlq mm1,32 - sub ecx,8 - jz NEAR L$003maw_sse2_exit -L$001maw_sse2_entry: - test ecx,4294967288 - jnz NEAR L$002maw_sse2_unrolled -align 4 -L$004maw_sse2_loop: - movd mm2,DWORD [edx] - movd mm3,DWORD [eax] - pmuludq mm2,mm0 - lea edx,[4+edx] - paddq mm1,mm3 - paddq mm1,mm2 - movd DWORD [eax],mm1 - sub ecx,1 - psrlq mm1,32 - lea eax,[4+eax] - jnz NEAR L$004maw_sse2_loop -L$003maw_sse2_exit: - movd eax,mm1 - emms - ret -align 16 -L$000maw_non_sse2: - push ebp - push ebx - push esi - push edi - ; - xor esi,esi - mov edi,DWORD [20+esp] - mov ecx,DWORD [28+esp] - mov ebx,DWORD [24+esp] - and ecx,4294967288 - mov ebp,DWORD [32+esp] - push ecx - jz NEAR L$005maw_finish -align 16 -L$006maw_loop: - ; Round 0 - mov eax,DWORD [ebx] - mul ebp - add eax,esi - adc edx,0 - add eax,DWORD [edi] - adc edx,0 - mov DWORD [edi],eax - mov esi,edx - ; Round 4 - mov eax,DWORD [4+ebx] - mul ebp - add eax,esi - adc edx,0 - add eax,DWORD [4+edi] - adc edx,0 - mov DWORD [4+edi],eax - mov esi,edx - ; Round 8 - mov eax,DWORD [8+ebx] - mul ebp - add eax,esi - adc edx,0 - add eax,DWORD [8+edi] - adc edx,0 - mov DWORD [8+edi],eax - mov esi,edx - ; Round 12 - mov eax,DWORD [12+ebx] - mul ebp - add eax,esi - adc edx,0 - add eax,DWORD [12+edi] - adc edx,0 - mov DWORD [12+edi],eax - mov esi,edx - ; Round 16 - mov eax,DWORD [16+ebx] - mul ebp - add eax,esi - adc edx,0 - add eax,DWORD [16+edi] - adc edx,0 - mov DWORD [16+edi],eax - mov esi,edx - ; Round 20 - mov eax,DWORD [20+ebx] - mul ebp - add eax,esi - adc edx,0 - add eax,DWORD [20+edi] - adc edx,0 - mov DWORD [20+edi],eax - mov esi,edx - ; Round 24 - mov eax,DWORD [24+ebx] - mul ebp - add eax,esi - adc edx,0 - add eax,DWORD [24+edi] - adc edx,0 - mov DWORD [24+edi],eax - mov esi,edx - ; Round 28 - mov eax,DWORD [28+ebx] - mul ebp - add eax,esi - adc edx,0 - add eax,DWORD [28+edi] - adc edx,0 - mov DWORD [28+edi],eax - mov esi,edx - ; - sub ecx,8 - lea ebx,[32+ebx] - lea edi,[32+edi] - jnz NEAR L$006maw_loop -L$005maw_finish: - mov ecx,DWORD [32+esp] - and ecx,7 - jnz NEAR L$007maw_finish2 - jmp NEAR L$008maw_end -L$007maw_finish2: - ; Tail Round 0 - mov eax,DWORD [ebx] - mul ebp - add eax,esi - adc edx,0 - add eax,DWORD [edi] - adc edx,0 - dec ecx - mov DWORD [edi],eax - mov esi,edx - jz NEAR L$008maw_end - ; Tail Round 1 - mov eax,DWORD [4+ebx] - mul ebp - add eax,esi - adc edx,0 - add eax,DWORD [4+edi] - adc edx,0 - dec ecx - mov DWORD [4+edi],eax - mov esi,edx - jz NEAR L$008maw_end - ; Tail Round 2 - mov eax,DWORD [8+ebx] - mul ebp - add eax,esi - adc edx,0 - add eax,DWORD [8+edi] - adc edx,0 - dec ecx - mov DWORD [8+edi],eax - mov esi,edx - jz NEAR L$008maw_end - ; Tail Round 3 - mov eax,DWORD [12+ebx] - mul ebp - add eax,esi - adc edx,0 - add eax,DWORD [12+edi] - adc edx,0 - dec ecx - mov DWORD [12+edi],eax - mov esi,edx - jz NEAR L$008maw_end - ; Tail Round 4 - mov eax,DWORD [16+ebx] - mul ebp - add eax,esi - adc edx,0 - add eax,DWORD [16+edi] - adc edx,0 - dec ecx - mov DWORD [16+edi],eax - mov esi,edx - jz NEAR L$008maw_end - ; Tail Round 5 - mov eax,DWORD [20+ebx] - mul ebp - add eax,esi - adc edx,0 - add eax,DWORD [20+edi] - adc edx,0 - dec ecx - mov DWORD [20+edi],eax - mov esi,edx - jz NEAR L$008maw_end - ; Tail Round 6 - mov eax,DWORD [24+ebx] - mul ebp - add eax,esi - adc edx,0 - add eax,DWORD [24+edi] - adc edx,0 - mov DWORD [24+edi],eax - mov esi,edx -L$008maw_end: - mov eax,esi - pop ecx - pop edi - pop esi - pop ebx - pop ebp - ret -global _bn_mul_words -align 16 -_bn_mul_words: -L$_bn_mul_words_begin: - lea eax,[_OPENSSL_ia32cap_P] - bt DWORD [eax],26 - jnc NEAR L$009mw_non_sse2 - mov eax,DWORD [4+esp] - mov edx,DWORD [8+esp] - mov ecx,DWORD [12+esp] - movd mm0,DWORD [16+esp] - pxor mm1,mm1 -align 16 -L$010mw_sse2_loop: - movd mm2,DWORD [edx] - pmuludq mm2,mm0 - lea edx,[4+edx] - paddq mm1,mm2 - movd DWORD [eax],mm1 - sub ecx,1 - psrlq mm1,32 - lea eax,[4+eax] - jnz NEAR L$010mw_sse2_loop - movd eax,mm1 - emms - ret -align 16 -L$009mw_non_sse2: - push ebp - push ebx - push esi - push edi - ; - xor esi,esi - mov edi,DWORD [20+esp] - mov ebx,DWORD [24+esp] - mov ebp,DWORD [28+esp] - mov ecx,DWORD [32+esp] - and ebp,4294967288 - jz NEAR L$011mw_finish -L$012mw_loop: - ; Round 0 - mov eax,DWORD [ebx] - mul ecx - add eax,esi - adc edx,0 - mov DWORD [edi],eax - mov esi,edx - ; Round 4 - mov eax,DWORD [4+ebx] - mul ecx - add eax,esi - adc edx,0 - mov DWORD [4+edi],eax - mov esi,edx - ; Round 8 - mov eax,DWORD [8+ebx] - mul ecx - add eax,esi - adc edx,0 - mov DWORD [8+edi],eax - mov esi,edx - ; Round 12 - mov eax,DWORD [12+ebx] - mul ecx - add eax,esi - adc edx,0 - mov DWORD [12+edi],eax - mov esi,edx - ; Round 16 - mov eax,DWORD [16+ebx] - mul ecx - add eax,esi - adc edx,0 - mov DWORD [16+edi],eax - mov esi,edx - ; Round 20 - mov eax,DWORD [20+ebx] - mul ecx - add eax,esi - adc edx,0 - mov DWORD [20+edi],eax - mov esi,edx - ; Round 24 - mov eax,DWORD [24+ebx] - mul ecx - add eax,esi - adc edx,0 - mov DWORD [24+edi],eax - mov esi,edx - ; Round 28 - mov eax,DWORD [28+ebx] - mul ecx - add eax,esi - adc edx,0 - mov DWORD [28+edi],eax - mov esi,edx - ; - add ebx,32 - add edi,32 - sub ebp,8 - jz NEAR L$011mw_finish - jmp NEAR L$012mw_loop -L$011mw_finish: - mov ebp,DWORD [28+esp] - and ebp,7 - jnz NEAR L$013mw_finish2 - jmp NEAR L$014mw_end -L$013mw_finish2: - ; Tail Round 0 - mov eax,DWORD [ebx] - mul ecx - add eax,esi - adc edx,0 - mov DWORD [edi],eax - mov esi,edx - dec ebp - jz NEAR L$014mw_end - ; Tail Round 1 - mov eax,DWORD [4+ebx] - mul ecx - add eax,esi - adc edx,0 - mov DWORD [4+edi],eax - mov esi,edx - dec ebp - jz NEAR L$014mw_end - ; Tail Round 2 - mov eax,DWORD [8+ebx] - mul ecx - add eax,esi - adc edx,0 - mov DWORD [8+edi],eax - mov esi,edx - dec ebp - jz NEAR L$014mw_end - ; Tail Round 3 - mov eax,DWORD [12+ebx] - mul ecx - add eax,esi - adc edx,0 - mov DWORD [12+edi],eax - mov esi,edx - dec ebp - jz NEAR L$014mw_end - ; Tail Round 4 - mov eax,DWORD [16+ebx] - mul ecx - add eax,esi - adc edx,0 - mov DWORD [16+edi],eax - mov esi,edx - dec ebp - jz NEAR L$014mw_end - ; Tail Round 5 - mov eax,DWORD [20+ebx] - mul ecx - add eax,esi - adc edx,0 - mov DWORD [20+edi],eax - mov esi,edx - dec ebp - jz NEAR L$014mw_end - ; Tail Round 6 - mov eax,DWORD [24+ebx] - mul ecx - add eax,esi - adc edx,0 - mov DWORD [24+edi],eax - mov esi,edx -L$014mw_end: - mov eax,esi - pop edi - pop esi - pop ebx - pop ebp - ret -global _bn_sqr_words -align 16 -_bn_sqr_words: -L$_bn_sqr_words_begin: - lea eax,[_OPENSSL_ia32cap_P] - bt DWORD [eax],26 - jnc NEAR L$015sqr_non_sse2 - mov eax,DWORD [4+esp] - mov edx,DWORD [8+esp] - mov ecx,DWORD [12+esp] -align 16 -L$016sqr_sse2_loop: - movd mm0,DWORD [edx] - pmuludq mm0,mm0 - lea edx,[4+edx] - movq [eax],mm0 - sub ecx,1 - lea eax,[8+eax] - jnz NEAR L$016sqr_sse2_loop - emms - ret -align 16 -L$015sqr_non_sse2: - push ebp - push ebx - push esi - push edi - ; - mov esi,DWORD [20+esp] - mov edi,DWORD [24+esp] - mov ebx,DWORD [28+esp] - and ebx,4294967288 - jz NEAR L$017sw_finish -L$018sw_loop: - ; Round 0 - mov eax,DWORD [edi] - mul eax - mov DWORD [esi],eax - mov DWORD [4+esi],edx - ; Round 4 - mov eax,DWORD [4+edi] - mul eax - mov DWORD [8+esi],eax - mov DWORD [12+esi],edx - ; Round 8 - mov eax,DWORD [8+edi] - mul eax - mov DWORD [16+esi],eax - mov DWORD [20+esi],edx - ; Round 12 - mov eax,DWORD [12+edi] - mul eax - mov DWORD [24+esi],eax - mov DWORD [28+esi],edx - ; Round 16 - mov eax,DWORD [16+edi] - mul eax - mov DWORD [32+esi],eax - mov DWORD [36+esi],edx - ; Round 20 - mov eax,DWORD [20+edi] - mul eax - mov DWORD [40+esi],eax - mov DWORD [44+esi],edx - ; Round 24 - mov eax,DWORD [24+edi] - mul eax - mov DWORD [48+esi],eax - mov DWORD [52+esi],edx - ; Round 28 - mov eax,DWORD [28+edi] - mul eax - mov DWORD [56+esi],eax - mov DWORD [60+esi],edx - ; - add edi,32 - add esi,64 - sub ebx,8 - jnz NEAR L$018sw_loop -L$017sw_finish: - mov ebx,DWORD [28+esp] - and ebx,7 - jz NEAR L$019sw_end - ; Tail Round 0 - mov eax,DWORD [edi] - mul eax - mov DWORD [esi],eax - dec ebx - mov DWORD [4+esi],edx - jz NEAR L$019sw_end - ; Tail Round 1 - mov eax,DWORD [4+edi] - mul eax - mov DWORD [8+esi],eax - dec ebx - mov DWORD [12+esi],edx - jz NEAR L$019sw_end - ; Tail Round 2 - mov eax,DWORD [8+edi] - mul eax - mov DWORD [16+esi],eax - dec ebx - mov DWORD [20+esi],edx - jz NEAR L$019sw_end - ; Tail Round 3 - mov eax,DWORD [12+edi] - mul eax - mov DWORD [24+esi],eax - dec ebx - mov DWORD [28+esi],edx - jz NEAR L$019sw_end - ; Tail Round 4 - mov eax,DWORD [16+edi] - mul eax - mov DWORD [32+esi],eax - dec ebx - mov DWORD [36+esi],edx - jz NEAR L$019sw_end - ; Tail Round 5 - mov eax,DWORD [20+edi] - mul eax - mov DWORD [40+esi],eax - dec ebx - mov DWORD [44+esi],edx - jz NEAR L$019sw_end - ; Tail Round 6 - mov eax,DWORD [24+edi] - mul eax - mov DWORD [48+esi],eax - mov DWORD [52+esi],edx -L$019sw_end: - pop edi - pop esi - pop ebx - pop ebp - ret -global _bn_div_words -align 16 -_bn_div_words: -L$_bn_div_words_begin: - mov edx,DWORD [4+esp] - mov eax,DWORD [8+esp] - mov ecx,DWORD [12+esp] - div ecx - ret -global _bn_add_words -align 16 -_bn_add_words: -L$_bn_add_words_begin: - push ebp - push ebx - push esi - push edi - ; - mov ebx,DWORD [20+esp] - mov esi,DWORD [24+esp] - mov edi,DWORD [28+esp] - mov ebp,DWORD [32+esp] - xor eax,eax - and ebp,4294967288 - jz NEAR L$020aw_finish -L$021aw_loop: - ; Round 0 - mov ecx,DWORD [esi] - mov edx,DWORD [edi] - add ecx,eax - mov eax,0 - adc eax,eax - add ecx,edx - adc eax,0 - mov DWORD [ebx],ecx - ; Round 1 - mov ecx,DWORD [4+esi] - mov edx,DWORD [4+edi] - add ecx,eax - mov eax,0 - adc eax,eax - add ecx,edx - adc eax,0 - mov DWORD [4+ebx],ecx - ; Round 2 - mov ecx,DWORD [8+esi] - mov edx,DWORD [8+edi] - add ecx,eax - mov eax,0 - adc eax,eax - add ecx,edx - adc eax,0 - mov DWORD [8+ebx],ecx - ; Round 3 - mov ecx,DWORD [12+esi] - mov edx,DWORD [12+edi] - add ecx,eax - mov eax,0 - adc eax,eax - add ecx,edx - adc eax,0 - mov DWORD [12+ebx],ecx - ; Round 4 - mov ecx,DWORD [16+esi] - mov edx,DWORD [16+edi] - add ecx,eax - mov eax,0 - adc eax,eax - add ecx,edx - adc eax,0 - mov DWORD [16+ebx],ecx - ; Round 5 - mov ecx,DWORD [20+esi] - mov edx,DWORD [20+edi] - add ecx,eax - mov eax,0 - adc eax,eax - add ecx,edx - adc eax,0 - mov DWORD [20+ebx],ecx - ; Round 6 - mov ecx,DWORD [24+esi] - mov edx,DWORD [24+edi] - add ecx,eax - mov eax,0 - adc eax,eax - add ecx,edx - adc eax,0 - mov DWORD [24+ebx],ecx - ; Round 7 - mov ecx,DWORD [28+esi] - mov edx,DWORD [28+edi] - add ecx,eax - mov eax,0 - adc eax,eax - add ecx,edx - adc eax,0 - mov DWORD [28+ebx],ecx - ; - add esi,32 - add edi,32 - add ebx,32 - sub ebp,8 - jnz NEAR L$021aw_loop -L$020aw_finish: - mov ebp,DWORD [32+esp] - and ebp,7 - jz NEAR L$022aw_end - ; Tail Round 0 - mov ecx,DWORD [esi] - mov edx,DWORD [edi] - add ecx,eax - mov eax,0 - adc eax,eax - add ecx,edx - adc eax,0 - dec ebp - mov DWORD [ebx],ecx - jz NEAR L$022aw_end - ; Tail Round 1 - mov ecx,DWORD [4+esi] - mov edx,DWORD [4+edi] - add ecx,eax - mov eax,0 - adc eax,eax - add ecx,edx - adc eax,0 - dec ebp - mov DWORD [4+ebx],ecx - jz NEAR L$022aw_end - ; Tail Round 2 - mov ecx,DWORD [8+esi] - mov edx,DWORD [8+edi] - add ecx,eax - mov eax,0 - adc eax,eax - add ecx,edx - adc eax,0 - dec ebp - mov DWORD [8+ebx],ecx - jz NEAR L$022aw_end - ; Tail Round 3 - mov ecx,DWORD [12+esi] - mov edx,DWORD [12+edi] - add ecx,eax - mov eax,0 - adc eax,eax - add ecx,edx - adc eax,0 - dec ebp - mov DWORD [12+ebx],ecx - jz NEAR L$022aw_end - ; Tail Round 4 - mov ecx,DWORD [16+esi] - mov edx,DWORD [16+edi] - add ecx,eax - mov eax,0 - adc eax,eax - add ecx,edx - adc eax,0 - dec ebp - mov DWORD [16+ebx],ecx - jz NEAR L$022aw_end - ; Tail Round 5 - mov ecx,DWORD [20+esi] - mov edx,DWORD [20+edi] - add ecx,eax - mov eax,0 - adc eax,eax - add ecx,edx - adc eax,0 - dec ebp - mov DWORD [20+ebx],ecx - jz NEAR L$022aw_end - ; Tail Round 6 - mov ecx,DWORD [24+esi] - mov edx,DWORD [24+edi] - add ecx,eax - mov eax,0 - adc eax,eax - add ecx,edx - adc eax,0 - mov DWORD [24+ebx],ecx -L$022aw_end: - pop edi - pop esi - pop ebx - pop ebp - ret -global _bn_sub_words -align 16 -_bn_sub_words: -L$_bn_sub_words_begin: - push ebp - push ebx - push esi - push edi - ; - mov ebx,DWORD [20+esp] - mov esi,DWORD [24+esp] - mov edi,DWORD [28+esp] - mov ebp,DWORD [32+esp] - xor eax,eax - and ebp,4294967288 - jz NEAR L$023aw_finish -L$024aw_loop: - ; Round 0 - mov ecx,DWORD [esi] - mov edx,DWORD [edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [ebx],ecx - ; Round 1 - mov ecx,DWORD [4+esi] - mov edx,DWORD [4+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [4+ebx],ecx - ; Round 2 - mov ecx,DWORD [8+esi] - mov edx,DWORD [8+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [8+ebx],ecx - ; Round 3 - mov ecx,DWORD [12+esi] - mov edx,DWORD [12+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [12+ebx],ecx - ; Round 4 - mov ecx,DWORD [16+esi] - mov edx,DWORD [16+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [16+ebx],ecx - ; Round 5 - mov ecx,DWORD [20+esi] - mov edx,DWORD [20+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [20+ebx],ecx - ; Round 6 - mov ecx,DWORD [24+esi] - mov edx,DWORD [24+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [24+ebx],ecx - ; Round 7 - mov ecx,DWORD [28+esi] - mov edx,DWORD [28+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [28+ebx],ecx - ; - add esi,32 - add edi,32 - add ebx,32 - sub ebp,8 - jnz NEAR L$024aw_loop -L$023aw_finish: - mov ebp,DWORD [32+esp] - and ebp,7 - jz NEAR L$025aw_end - ; Tail Round 0 - mov ecx,DWORD [esi] - mov edx,DWORD [edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - dec ebp - mov DWORD [ebx],ecx - jz NEAR L$025aw_end - ; Tail Round 1 - mov ecx,DWORD [4+esi] - mov edx,DWORD [4+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - dec ebp - mov DWORD [4+ebx],ecx - jz NEAR L$025aw_end - ; Tail Round 2 - mov ecx,DWORD [8+esi] - mov edx,DWORD [8+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - dec ebp - mov DWORD [8+ebx],ecx - jz NEAR L$025aw_end - ; Tail Round 3 - mov ecx,DWORD [12+esi] - mov edx,DWORD [12+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - dec ebp - mov DWORD [12+ebx],ecx - jz NEAR L$025aw_end - ; Tail Round 4 - mov ecx,DWORD [16+esi] - mov edx,DWORD [16+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - dec ebp - mov DWORD [16+ebx],ecx - jz NEAR L$025aw_end - ; Tail Round 5 - mov ecx,DWORD [20+esi] - mov edx,DWORD [20+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - dec ebp - mov DWORD [20+ebx],ecx - jz NEAR L$025aw_end - ; Tail Round 6 - mov ecx,DWORD [24+esi] - mov edx,DWORD [24+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [24+ebx],ecx -L$025aw_end: - pop edi - pop esi - pop ebx - pop ebp - ret -global _bn_sub_part_words -align 16 -_bn_sub_part_words: -L$_bn_sub_part_words_begin: - push ebp - push ebx - push esi - push edi - ; - mov ebx,DWORD [20+esp] - mov esi,DWORD [24+esp] - mov edi,DWORD [28+esp] - mov ebp,DWORD [32+esp] - xor eax,eax - and ebp,4294967288 - jz NEAR L$026aw_finish -L$027aw_loop: - ; Round 0 - mov ecx,DWORD [esi] - mov edx,DWORD [edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [ebx],ecx - ; Round 1 - mov ecx,DWORD [4+esi] - mov edx,DWORD [4+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [4+ebx],ecx - ; Round 2 - mov ecx,DWORD [8+esi] - mov edx,DWORD [8+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [8+ebx],ecx - ; Round 3 - mov ecx,DWORD [12+esi] - mov edx,DWORD [12+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [12+ebx],ecx - ; Round 4 - mov ecx,DWORD [16+esi] - mov edx,DWORD [16+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [16+ebx],ecx - ; Round 5 - mov ecx,DWORD [20+esi] - mov edx,DWORD [20+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [20+ebx],ecx - ; Round 6 - mov ecx,DWORD [24+esi] - mov edx,DWORD [24+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [24+ebx],ecx - ; Round 7 - mov ecx,DWORD [28+esi] - mov edx,DWORD [28+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [28+ebx],ecx - ; - add esi,32 - add edi,32 - add ebx,32 - sub ebp,8 - jnz NEAR L$027aw_loop -L$026aw_finish: - mov ebp,DWORD [32+esp] - and ebp,7 - jz NEAR L$028aw_end - ; Tail Round 0 - mov ecx,DWORD [esi] - mov edx,DWORD [edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [ebx],ecx - add esi,4 - add edi,4 - add ebx,4 - dec ebp - jz NEAR L$028aw_end - ; Tail Round 1 - mov ecx,DWORD [esi] - mov edx,DWORD [edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [ebx],ecx - add esi,4 - add edi,4 - add ebx,4 - dec ebp - jz NEAR L$028aw_end - ; Tail Round 2 - mov ecx,DWORD [esi] - mov edx,DWORD [edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [ebx],ecx - add esi,4 - add edi,4 - add ebx,4 - dec ebp - jz NEAR L$028aw_end - ; Tail Round 3 - mov ecx,DWORD [esi] - mov edx,DWORD [edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [ebx],ecx - add esi,4 - add edi,4 - add ebx,4 - dec ebp - jz NEAR L$028aw_end - ; Tail Round 4 - mov ecx,DWORD [esi] - mov edx,DWORD [edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [ebx],ecx - add esi,4 - add edi,4 - add ebx,4 - dec ebp - jz NEAR L$028aw_end - ; Tail Round 5 - mov ecx,DWORD [esi] - mov edx,DWORD [edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [ebx],ecx - add esi,4 - add edi,4 - add ebx,4 - dec ebp - jz NEAR L$028aw_end - ; Tail Round 6 - mov ecx,DWORD [esi] - mov edx,DWORD [edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [ebx],ecx - add esi,4 - add edi,4 - add ebx,4 -L$028aw_end: - cmp DWORD [36+esp],0 - je NEAR L$029pw_end - mov ebp,DWORD [36+esp] - cmp ebp,0 - je NEAR L$029pw_end - jge NEAR L$030pw_pos - ; pw_neg - mov edx,0 - sub edx,ebp - mov ebp,edx - and ebp,4294967288 - jz NEAR L$031pw_neg_finish -L$032pw_neg_loop: - ; dl<0 Round 0 - mov ecx,0 - mov edx,DWORD [edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [ebx],ecx - ; dl<0 Round 1 - mov ecx,0 - mov edx,DWORD [4+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [4+ebx],ecx - ; dl<0 Round 2 - mov ecx,0 - mov edx,DWORD [8+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [8+ebx],ecx - ; dl<0 Round 3 - mov ecx,0 - mov edx,DWORD [12+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [12+ebx],ecx - ; dl<0 Round 4 - mov ecx,0 - mov edx,DWORD [16+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [16+ebx],ecx - ; dl<0 Round 5 - mov ecx,0 - mov edx,DWORD [20+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [20+ebx],ecx - ; dl<0 Round 6 - mov ecx,0 - mov edx,DWORD [24+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [24+ebx],ecx - ; dl<0 Round 7 - mov ecx,0 - mov edx,DWORD [28+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [28+ebx],ecx - ; - add edi,32 - add ebx,32 - sub ebp,8 - jnz NEAR L$032pw_neg_loop -L$031pw_neg_finish: - mov edx,DWORD [36+esp] - mov ebp,0 - sub ebp,edx - and ebp,7 - jz NEAR L$029pw_end - ; dl<0 Tail Round 0 - mov ecx,0 - mov edx,DWORD [edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - dec ebp - mov DWORD [ebx],ecx - jz NEAR L$029pw_end - ; dl<0 Tail Round 1 - mov ecx,0 - mov edx,DWORD [4+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - dec ebp - mov DWORD [4+ebx],ecx - jz NEAR L$029pw_end - ; dl<0 Tail Round 2 - mov ecx,0 - mov edx,DWORD [8+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - dec ebp - mov DWORD [8+ebx],ecx - jz NEAR L$029pw_end - ; dl<0 Tail Round 3 - mov ecx,0 - mov edx,DWORD [12+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - dec ebp - mov DWORD [12+ebx],ecx - jz NEAR L$029pw_end - ; dl<0 Tail Round 4 - mov ecx,0 - mov edx,DWORD [16+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - dec ebp - mov DWORD [16+ebx],ecx - jz NEAR L$029pw_end - ; dl<0 Tail Round 5 - mov ecx,0 - mov edx,DWORD [20+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - dec ebp - mov DWORD [20+ebx],ecx - jz NEAR L$029pw_end - ; dl<0 Tail Round 6 - mov ecx,0 - mov edx,DWORD [24+edi] - sub ecx,eax - mov eax,0 - adc eax,eax - sub ecx,edx - adc eax,0 - mov DWORD [24+ebx],ecx - jmp NEAR L$029pw_end -L$030pw_pos: - and ebp,4294967288 - jz NEAR L$033pw_pos_finish -L$034pw_pos_loop: - ; dl>0 Round 0 - mov ecx,DWORD [esi] - sub ecx,eax - mov DWORD [ebx],ecx - jnc NEAR L$035pw_nc0 - ; dl>0 Round 1 - mov ecx,DWORD [4+esi] - sub ecx,eax - mov DWORD [4+ebx],ecx - jnc NEAR L$036pw_nc1 - ; dl>0 Round 2 - mov ecx,DWORD [8+esi] - sub ecx,eax - mov DWORD [8+ebx],ecx - jnc NEAR L$037pw_nc2 - ; dl>0 Round 3 - mov ecx,DWORD [12+esi] - sub ecx,eax - mov DWORD [12+ebx],ecx - jnc NEAR L$038pw_nc3 - ; dl>0 Round 4 - mov ecx,DWORD [16+esi] - sub ecx,eax - mov DWORD [16+ebx],ecx - jnc NEAR L$039pw_nc4 - ; dl>0 Round 5 - mov ecx,DWORD [20+esi] - sub ecx,eax - mov DWORD [20+ebx],ecx - jnc NEAR L$040pw_nc5 - ; dl>0 Round 6 - mov ecx,DWORD [24+esi] - sub ecx,eax - mov DWORD [24+ebx],ecx - jnc NEAR L$041pw_nc6 - ; dl>0 Round 7 - mov ecx,DWORD [28+esi] - sub ecx,eax - mov DWORD [28+ebx],ecx - jnc NEAR L$042pw_nc7 - ; - add esi,32 - add ebx,32 - sub ebp,8 - jnz NEAR L$034pw_pos_loop -L$033pw_pos_finish: - mov ebp,DWORD [36+esp] - and ebp,7 - jz NEAR L$029pw_end - ; dl>0 Tail Round 0 - mov ecx,DWORD [esi] - sub ecx,eax - mov DWORD [ebx],ecx - jnc NEAR L$043pw_tail_nc0 - dec ebp - jz NEAR L$029pw_end - ; dl>0 Tail Round 1 - mov ecx,DWORD [4+esi] - sub ecx,eax - mov DWORD [4+ebx],ecx - jnc NEAR L$044pw_tail_nc1 - dec ebp - jz NEAR L$029pw_end - ; dl>0 Tail Round 2 - mov ecx,DWORD [8+esi] - sub ecx,eax - mov DWORD [8+ebx],ecx - jnc NEAR L$045pw_tail_nc2 - dec ebp - jz NEAR L$029pw_end - ; dl>0 Tail Round 3 - mov ecx,DWORD [12+esi] - sub ecx,eax - mov DWORD [12+ebx],ecx - jnc NEAR L$046pw_tail_nc3 - dec ebp - jz NEAR L$029pw_end - ; dl>0 Tail Round 4 - mov ecx,DWORD [16+esi] - sub ecx,eax - mov DWORD [16+ebx],ecx - jnc NEAR L$047pw_tail_nc4 - dec ebp - jz NEAR L$029pw_end - ; dl>0 Tail Round 5 - mov ecx,DWORD [20+esi] - sub ecx,eax - mov DWORD [20+ebx],ecx - jnc NEAR L$048pw_tail_nc5 - dec ebp - jz NEAR L$029pw_end - ; dl>0 Tail Round 6 - mov ecx,DWORD [24+esi] - sub ecx,eax - mov DWORD [24+ebx],ecx - jnc NEAR L$049pw_tail_nc6 - mov eax,1 - jmp NEAR L$029pw_end -L$050pw_nc_loop: - mov ecx,DWORD [esi] - mov DWORD [ebx],ecx -L$035pw_nc0: - mov ecx,DWORD [4+esi] - mov DWORD [4+ebx],ecx -L$036pw_nc1: - mov ecx,DWORD [8+esi] - mov DWORD [8+ebx],ecx -L$037pw_nc2: - mov ecx,DWORD [12+esi] - mov DWORD [12+ebx],ecx -L$038pw_nc3: - mov ecx,DWORD [16+esi] - mov DWORD [16+ebx],ecx -L$039pw_nc4: - mov ecx,DWORD [20+esi] - mov DWORD [20+ebx],ecx -L$040pw_nc5: - mov ecx,DWORD [24+esi] - mov DWORD [24+ebx],ecx -L$041pw_nc6: - mov ecx,DWORD [28+esi] - mov DWORD [28+ebx],ecx -L$042pw_nc7: - ; - add esi,32 - add ebx,32 - sub ebp,8 - jnz NEAR L$050pw_nc_loop - mov ebp,DWORD [36+esp] - and ebp,7 - jz NEAR L$051pw_nc_end - mov ecx,DWORD [esi] - mov DWORD [ebx],ecx -L$043pw_tail_nc0: - dec ebp - jz NEAR L$051pw_nc_end - mov ecx,DWORD [4+esi] - mov DWORD [4+ebx],ecx -L$044pw_tail_nc1: - dec ebp - jz NEAR L$051pw_nc_end - mov ecx,DWORD [8+esi] - mov DWORD [8+ebx],ecx -L$045pw_tail_nc2: - dec ebp - jz NEAR L$051pw_nc_end - mov ecx,DWORD [12+esi] - mov DWORD [12+ebx],ecx -L$046pw_tail_nc3: - dec ebp - jz NEAR L$051pw_nc_end - mov ecx,DWORD [16+esi] - mov DWORD [16+ebx],ecx -L$047pw_tail_nc4: - dec ebp - jz NEAR L$051pw_nc_end - mov ecx,DWORD [20+esi] - mov DWORD [20+ebx],ecx -L$048pw_tail_nc5: - dec ebp - jz NEAR L$051pw_nc_end - mov ecx,DWORD [24+esi] - mov DWORD [24+ebx],ecx -L$049pw_tail_nc6: -L$051pw_nc_end: - mov eax,0 -L$029pw_end: - pop edi - pop esi - pop ebx - pop ebp - ret -segment .bss -common _OPENSSL_ia32cap_P 16 diff --git a/third_party/boringssl/win-x86/crypto/bn/co-586.asm b/third_party/boringssl/win-x86/crypto/bn/co-586.asm deleted file mode 100644 index 5780dc841bf88..0000000000000 --- a/third_party/boringssl/win-x86/crypto/bn/co-586.asm +++ /dev/null @@ -1,1260 +0,0 @@ -%ifidn __OUTPUT_FORMAT__,obj -section code use32 class=code align=64 -%elifidn __OUTPUT_FORMAT__,win32 -%ifdef __YASM_VERSION_ID__ -%if __YASM_VERSION_ID__ < 01010000h -%error yasm version 1.1.0 or later needed. -%endif -; Yasm automatically includes .00 and complains about redefining it. -; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html -%else -$@feat.00 equ 1 -%endif -section .text code align=64 -%else -section .text code -%endif -global _bn_mul_comba8 -align 16 -_bn_mul_comba8: -L$_bn_mul_comba8_begin: - push esi - mov esi,DWORD [12+esp] - push edi - mov edi,DWORD [20+esp] - push ebp - push ebx - xor ebx,ebx - mov eax,DWORD [esi] - xor ecx,ecx - mov edx,DWORD [edi] - ; ################## Calculate word 0 - xor ebp,ebp - ; mul a[0]*b[0] - mul edx - add ebx,eax - mov eax,DWORD [20+esp] - adc ecx,edx - mov edx,DWORD [edi] - adc ebp,0 - mov DWORD [eax],ebx - mov eax,DWORD [4+esi] - ; saved r[0] - ; ################## Calculate word 1 - xor ebx,ebx - ; mul a[1]*b[0] - mul edx - add ecx,eax - mov eax,DWORD [esi] - adc ebp,edx - mov edx,DWORD [4+edi] - adc ebx,0 - ; mul a[0]*b[1] - mul edx - add ecx,eax - mov eax,DWORD [20+esp] - adc ebp,edx - mov edx,DWORD [edi] - adc ebx,0 - mov DWORD [4+eax],ecx - mov eax,DWORD [8+esi] - ; saved r[1] - ; ################## Calculate word 2 - xor ecx,ecx - ; mul a[2]*b[0] - mul edx - add ebp,eax - mov eax,DWORD [4+esi] - adc ebx,edx - mov edx,DWORD [4+edi] - adc ecx,0 - ; mul a[1]*b[1] - mul edx - add ebp,eax - mov eax,DWORD [esi] - adc ebx,edx - mov edx,DWORD [8+edi] - adc ecx,0 - ; mul a[0]*b[2] - mul edx - add ebp,eax - mov eax,DWORD [20+esp] - adc ebx,edx - mov edx,DWORD [edi] - adc ecx,0 - mov DWORD [8+eax],ebp - mov eax,DWORD [12+esi] - ; saved r[2] - ; ################## Calculate word 3 - xor ebp,ebp - ; mul a[3]*b[0] - mul edx - add ebx,eax - mov eax,DWORD [8+esi] - adc ecx,edx - mov edx,DWORD [4+edi] - adc ebp,0 - ; mul a[2]*b[1] - mul edx - add ebx,eax - mov eax,DWORD [4+esi] - adc ecx,edx - mov edx,DWORD [8+edi] - adc ebp,0 - ; mul a[1]*b[2] - mul edx - add ebx,eax - mov eax,DWORD [esi] - adc ecx,edx - mov edx,DWORD [12+edi] - adc ebp,0 - ; mul a[0]*b[3] - mul edx - add ebx,eax - mov eax,DWORD [20+esp] - adc ecx,edx - mov edx,DWORD [edi] - adc ebp,0 - mov DWORD [12+eax],ebx - mov eax,DWORD [16+esi] - ; saved r[3] - ; ################## Calculate word 4 - xor ebx,ebx - ; mul a[4]*b[0] - mul edx - add ecx,eax - mov eax,DWORD [12+esi] - adc ebp,edx - mov edx,DWORD [4+edi] - adc ebx,0 - ; mul a[3]*b[1] - mul edx - add ecx,eax - mov eax,DWORD [8+esi] - adc ebp,edx - mov edx,DWORD [8+edi] - adc ebx,0 - ; mul a[2]*b[2] - mul edx - add ecx,eax - mov eax,DWORD [4+esi] - adc ebp,edx - mov edx,DWORD [12+edi] - adc ebx,0 - ; mul a[1]*b[3] - mul edx - add ecx,eax - mov eax,DWORD [esi] - adc ebp,edx - mov edx,DWORD [16+edi] - adc ebx,0 - ; mul a[0]*b[4] - mul edx - add ecx,eax - mov eax,DWORD [20+esp] - adc ebp,edx - mov edx,DWORD [edi] - adc ebx,0 - mov DWORD [16+eax],ecx - mov eax,DWORD [20+esi] - ; saved r[4] - ; ################## Calculate word 5 - xor ecx,ecx - ; mul a[5]*b[0] - mul edx - add ebp,eax - mov eax,DWORD [16+esi] - adc ebx,edx - mov edx,DWORD [4+edi] - adc ecx,0 - ; mul a[4]*b[1] - mul edx - add ebp,eax - mov eax,DWORD [12+esi] - adc ebx,edx - mov edx,DWORD [8+edi] - adc ecx,0 - ; mul a[3]*b[2] - mul edx - add ebp,eax - mov eax,DWORD [8+esi] - adc ebx,edx - mov edx,DWORD [12+edi] - adc ecx,0 - ; mul a[2]*b[3] - mul edx - add ebp,eax - mov eax,DWORD [4+esi] - adc ebx,edx - mov edx,DWORD [16+edi] - adc ecx,0 - ; mul a[1]*b[4] - mul edx - add ebp,eax - mov eax,DWORD [esi] - adc ebx,edx - mov edx,DWORD [20+edi] - adc ecx,0 - ; mul a[0]*b[5] - mul edx - add ebp,eax - mov eax,DWORD [20+esp] - adc ebx,edx - mov edx,DWORD [edi] - adc ecx,0 - mov DWORD [20+eax],ebp - mov eax,DWORD [24+esi] - ; saved r[5] - ; ################## Calculate word 6 - xor ebp,ebp - ; mul a[6]*b[0] - mul edx - add ebx,eax - mov eax,DWORD [20+esi] - adc ecx,edx - mov edx,DWORD [4+edi] - adc ebp,0 - ; mul a[5]*b[1] - mul edx - add ebx,eax - mov eax,DWORD [16+esi] - adc ecx,edx - mov edx,DWORD [8+edi] - adc ebp,0 - ; mul a[4]*b[2] - mul edx - add ebx,eax - mov eax,DWORD [12+esi] - adc ecx,edx - mov edx,DWORD [12+edi] - adc ebp,0 - ; mul a[3]*b[3] - mul edx - add ebx,eax - mov eax,DWORD [8+esi] - adc ecx,edx - mov edx,DWORD [16+edi] - adc ebp,0 - ; mul a[2]*b[4] - mul edx - add ebx,eax - mov eax,DWORD [4+esi] - adc ecx,edx - mov edx,DWORD [20+edi] - adc ebp,0 - ; mul a[1]*b[5] - mul edx - add ebx,eax - mov eax,DWORD [esi] - adc ecx,edx - mov edx,DWORD [24+edi] - adc ebp,0 - ; mul a[0]*b[6] - mul edx - add ebx,eax - mov eax,DWORD [20+esp] - adc ecx,edx - mov edx,DWORD [edi] - adc ebp,0 - mov DWORD [24+eax],ebx - mov eax,DWORD [28+esi] - ; saved r[6] - ; ################## Calculate word 7 - xor ebx,ebx - ; mul a[7]*b[0] - mul edx - add ecx,eax - mov eax,DWORD [24+esi] - adc ebp,edx - mov edx,DWORD [4+edi] - adc ebx,0 - ; mul a[6]*b[1] - mul edx - add ecx,eax - mov eax,DWORD [20+esi] - adc ebp,edx - mov edx,DWORD [8+edi] - adc ebx,0 - ; mul a[5]*b[2] - mul edx - add ecx,eax - mov eax,DWORD [16+esi] - adc ebp,edx - mov edx,DWORD [12+edi] - adc ebx,0 - ; mul a[4]*b[3] - mul edx - add ecx,eax - mov eax,DWORD [12+esi] - adc ebp,edx - mov edx,DWORD [16+edi] - adc ebx,0 - ; mul a[3]*b[4] - mul edx - add ecx,eax - mov eax,DWORD [8+esi] - adc ebp,edx - mov edx,DWORD [20+edi] - adc ebx,0 - ; mul a[2]*b[5] - mul edx - add ecx,eax - mov eax,DWORD [4+esi] - adc ebp,edx - mov edx,DWORD [24+edi] - adc ebx,0 - ; mul a[1]*b[6] - mul edx - add ecx,eax - mov eax,DWORD [esi] - adc ebp,edx - mov edx,DWORD [28+edi] - adc ebx,0 - ; mul a[0]*b[7] - mul edx - add ecx,eax - mov eax,DWORD [20+esp] - adc ebp,edx - mov edx,DWORD [4+edi] - adc ebx,0 - mov DWORD [28+eax],ecx - mov eax,DWORD [28+esi] - ; saved r[7] - ; ################## Calculate word 8 - xor ecx,ecx - ; mul a[7]*b[1] - mul edx - add ebp,eax - mov eax,DWORD [24+esi] - adc ebx,edx - mov edx,DWORD [8+edi] - adc ecx,0 - ; mul a[6]*b[2] - mul edx - add ebp,eax - mov eax,DWORD [20+esi] - adc ebx,edx - mov edx,DWORD [12+edi] - adc ecx,0 - ; mul a[5]*b[3] - mul edx - add ebp,eax - mov eax,DWORD [16+esi] - adc ebx,edx - mov edx,DWORD [16+edi] - adc ecx,0 - ; mul a[4]*b[4] - mul edx - add ebp,eax - mov eax,DWORD [12+esi] - adc ebx,edx - mov edx,DWORD [20+edi] - adc ecx,0 - ; mul a[3]*b[5] - mul edx - add ebp,eax - mov eax,DWORD [8+esi] - adc ebx,edx - mov edx,DWORD [24+edi] - adc ecx,0 - ; mul a[2]*b[6] - mul edx - add ebp,eax - mov eax,DWORD [4+esi] - adc ebx,edx - mov edx,DWORD [28+edi] - adc ecx,0 - ; mul a[1]*b[7] - mul edx - add ebp,eax - mov eax,DWORD [20+esp] - adc ebx,edx - mov edx,DWORD [8+edi] - adc ecx,0 - mov DWORD [32+eax],ebp - mov eax,DWORD [28+esi] - ; saved r[8] - ; ################## Calculate word 9 - xor ebp,ebp - ; mul a[7]*b[2] - mul edx - add ebx,eax - mov eax,DWORD [24+esi] - adc ecx,edx - mov edx,DWORD [12+edi] - adc ebp,0 - ; mul a[6]*b[3] - mul edx - add ebx,eax - mov eax,DWORD [20+esi] - adc ecx,edx - mov edx,DWORD [16+edi] - adc ebp,0 - ; mul a[5]*b[4] - mul edx - add ebx,eax - mov eax,DWORD [16+esi] - adc ecx,edx - mov edx,DWORD [20+edi] - adc ebp,0 - ; mul a[4]*b[5] - mul edx - add ebx,eax - mov eax,DWORD [12+esi] - adc ecx,edx - mov edx,DWORD [24+edi] - adc ebp,0 - ; mul a[3]*b[6] - mul edx - add ebx,eax - mov eax,DWORD [8+esi] - adc ecx,edx - mov edx,DWORD [28+edi] - adc ebp,0 - ; mul a[2]*b[7] - mul edx - add ebx,eax - mov eax,DWORD [20+esp] - adc ecx,edx - mov edx,DWORD [12+edi] - adc ebp,0 - mov DWORD [36+eax],ebx - mov eax,DWORD [28+esi] - ; saved r[9] - ; ################## Calculate word 10 - xor ebx,ebx - ; mul a[7]*b[3] - mul edx - add ecx,eax - mov eax,DWORD [24+esi] - adc ebp,edx - mov edx,DWORD [16+edi] - adc ebx,0 - ; mul a[6]*b[4] - mul edx - add ecx,eax - mov eax,DWORD [20+esi] - adc ebp,edx - mov edx,DWORD [20+edi] - adc ebx,0 - ; mul a[5]*b[5] - mul edx - add ecx,eax - mov eax,DWORD [16+esi] - adc ebp,edx - mov edx,DWORD [24+edi] - adc ebx,0 - ; mul a[4]*b[6] - mul edx - add ecx,eax - mov eax,DWORD [12+esi] - adc ebp,edx - mov edx,DWORD [28+edi] - adc ebx,0 - ; mul a[3]*b[7] - mul edx - add ecx,eax - mov eax,DWORD [20+esp] - adc ebp,edx - mov edx,DWORD [16+edi] - adc ebx,0 - mov DWORD [40+eax],ecx - mov eax,DWORD [28+esi] - ; saved r[10] - ; ################## Calculate word 11 - xor ecx,ecx - ; mul a[7]*b[4] - mul edx - add ebp,eax - mov eax,DWORD [24+esi] - adc ebx,edx - mov edx,DWORD [20+edi] - adc ecx,0 - ; mul a[6]*b[5] - mul edx - add ebp,eax - mov eax,DWORD [20+esi] - adc ebx,edx - mov edx,DWORD [24+edi] - adc ecx,0 - ; mul a[5]*b[6] - mul edx - add ebp,eax - mov eax,DWORD [16+esi] - adc ebx,edx - mov edx,DWORD [28+edi] - adc ecx,0 - ; mul a[4]*b[7] - mul edx - add ebp,eax - mov eax,DWORD [20+esp] - adc ebx,edx - mov edx,DWORD [20+edi] - adc ecx,0 - mov DWORD [44+eax],ebp - mov eax,DWORD [28+esi] - ; saved r[11] - ; ################## Calculate word 12 - xor ebp,ebp - ; mul a[7]*b[5] - mul edx - add ebx,eax - mov eax,DWORD [24+esi] - adc ecx,edx - mov edx,DWORD [24+edi] - adc ebp,0 - ; mul a[6]*b[6] - mul edx - add ebx,eax - mov eax,DWORD [20+esi] - adc ecx,edx - mov edx,DWORD [28+edi] - adc ebp,0 - ; mul a[5]*b[7] - mul edx - add ebx,eax - mov eax,DWORD [20+esp] - adc ecx,edx - mov edx,DWORD [24+edi] - adc ebp,0 - mov DWORD [48+eax],ebx - mov eax,DWORD [28+esi] - ; saved r[12] - ; ################## Calculate word 13 - xor ebx,ebx - ; mul a[7]*b[6] - mul edx - add ecx,eax - mov eax,DWORD [24+esi] - adc ebp,edx - mov edx,DWORD [28+edi] - adc ebx,0 - ; mul a[6]*b[7] - mul edx - add ecx,eax - mov eax,DWORD [20+esp] - adc ebp,edx - mov edx,DWORD [28+edi] - adc ebx,0 - mov DWORD [52+eax],ecx - mov eax,DWORD [28+esi] - ; saved r[13] - ; ################## Calculate word 14 - xor ecx,ecx - ; mul a[7]*b[7] - mul edx - add ebp,eax - mov eax,DWORD [20+esp] - adc ebx,edx - adc ecx,0 - mov DWORD [56+eax],ebp - ; saved r[14] - ; save r[15] - mov DWORD [60+eax],ebx - pop ebx - pop ebp - pop edi - pop esi - ret -global _bn_mul_comba4 -align 16 -_bn_mul_comba4: -L$_bn_mul_comba4_begin: - push esi - mov esi,DWORD [12+esp] - push edi - mov edi,DWORD [20+esp] - push ebp - push ebx - xor ebx,ebx - mov eax,DWORD [esi] - xor ecx,ecx - mov edx,DWORD [edi] - ; ################## Calculate word 0 - xor ebp,ebp - ; mul a[0]*b[0] - mul edx - add ebx,eax - mov eax,DWORD [20+esp] - adc ecx,edx - mov edx,DWORD [edi] - adc ebp,0 - mov DWORD [eax],ebx - mov eax,DWORD [4+esi] - ; saved r[0] - ; ################## Calculate word 1 - xor ebx,ebx - ; mul a[1]*b[0] - mul edx - add ecx,eax - mov eax,DWORD [esi] - adc ebp,edx - mov edx,DWORD [4+edi] - adc ebx,0 - ; mul a[0]*b[1] - mul edx - add ecx,eax - mov eax,DWORD [20+esp] - adc ebp,edx - mov edx,DWORD [edi] - adc ebx,0 - mov DWORD [4+eax],ecx - mov eax,DWORD [8+esi] - ; saved r[1] - ; ################## Calculate word 2 - xor ecx,ecx - ; mul a[2]*b[0] - mul edx - add ebp,eax - mov eax,DWORD [4+esi] - adc ebx,edx - mov edx,DWORD [4+edi] - adc ecx,0 - ; mul a[1]*b[1] - mul edx - add ebp,eax - mov eax,DWORD [esi] - adc ebx,edx - mov edx,DWORD [8+edi] - adc ecx,0 - ; mul a[0]*b[2] - mul edx - add ebp,eax - mov eax,DWORD [20+esp] - adc ebx,edx - mov edx,DWORD [edi] - adc ecx,0 - mov DWORD [8+eax],ebp - mov eax,DWORD [12+esi] - ; saved r[2] - ; ################## Calculate word 3 - xor ebp,ebp - ; mul a[3]*b[0] - mul edx - add ebx,eax - mov eax,DWORD [8+esi] - adc ecx,edx - mov edx,DWORD [4+edi] - adc ebp,0 - ; mul a[2]*b[1] - mul edx - add ebx,eax - mov eax,DWORD [4+esi] - adc ecx,edx - mov edx,DWORD [8+edi] - adc ebp,0 - ; mul a[1]*b[2] - mul edx - add ebx,eax - mov eax,DWORD [esi] - adc ecx,edx - mov edx,DWORD [12+edi] - adc ebp,0 - ; mul a[0]*b[3] - mul edx - add ebx,eax - mov eax,DWORD [20+esp] - adc ecx,edx - mov edx,DWORD [4+edi] - adc ebp,0 - mov DWORD [12+eax],ebx - mov eax,DWORD [12+esi] - ; saved r[3] - ; ################## Calculate word 4 - xor ebx,ebx - ; mul a[3]*b[1] - mul edx - add ecx,eax - mov eax,DWORD [8+esi] - adc ebp,edx - mov edx,DWORD [8+edi] - adc ebx,0 - ; mul a[2]*b[2] - mul edx - add ecx,eax - mov eax,DWORD [4+esi] - adc ebp,edx - mov edx,DWORD [12+edi] - adc ebx,0 - ; mul a[1]*b[3] - mul edx - add ecx,eax - mov eax,DWORD [20+esp] - adc ebp,edx - mov edx,DWORD [8+edi] - adc ebx,0 - mov DWORD [16+eax],ecx - mov eax,DWORD [12+esi] - ; saved r[4] - ; ################## Calculate word 5 - xor ecx,ecx - ; mul a[3]*b[2] - mul edx - add ebp,eax - mov eax,DWORD [8+esi] - adc ebx,edx - mov edx,DWORD [12+edi] - adc ecx,0 - ; mul a[2]*b[3] - mul edx - add ebp,eax - mov eax,DWORD [20+esp] - adc ebx,edx - mov edx,DWORD [12+edi] - adc ecx,0 - mov DWORD [20+eax],ebp - mov eax,DWORD [12+esi] - ; saved r[5] - ; ################## Calculate word 6 - xor ebp,ebp - ; mul a[3]*b[3] - mul edx - add ebx,eax - mov eax,DWORD [20+esp] - adc ecx,edx - adc ebp,0 - mov DWORD [24+eax],ebx - ; saved r[6] - ; save r[7] - mov DWORD [28+eax],ecx - pop ebx - pop ebp - pop edi - pop esi - ret -global _bn_sqr_comba8 -align 16 -_bn_sqr_comba8: -L$_bn_sqr_comba8_begin: - push esi - push edi - push ebp - push ebx - mov edi,DWORD [20+esp] - mov esi,DWORD [24+esp] - xor ebx,ebx - xor ecx,ecx - mov eax,DWORD [esi] - ; ############### Calculate word 0 - xor ebp,ebp - ; sqr a[0]*a[0] - mul eax - add ebx,eax - adc ecx,edx - mov edx,DWORD [esi] - adc ebp,0 - mov DWORD [edi],ebx - mov eax,DWORD [4+esi] - ; saved r[0] - ; ############### Calculate word 1 - xor ebx,ebx - ; sqr a[1]*a[0] - mul edx - add eax,eax - adc edx,edx - adc ebx,0 - add ecx,eax - adc ebp,edx - mov eax,DWORD [8+esi] - adc ebx,0 - mov DWORD [4+edi],ecx - mov edx,DWORD [esi] - ; saved r[1] - ; ############### Calculate word 2 - xor ecx,ecx - ; sqr a[2]*a[0] - mul edx - add eax,eax - adc edx,edx - adc ecx,0 - add ebp,eax - adc ebx,edx - mov eax,DWORD [4+esi] - adc ecx,0 - ; sqr a[1]*a[1] - mul eax - add ebp,eax - adc ebx,edx - mov edx,DWORD [esi] - adc ecx,0 - mov DWORD [8+edi],ebp - mov eax,DWORD [12+esi] - ; saved r[2] - ; ############### Calculate word 3 - xor ebp,ebp - ; sqr a[3]*a[0] - mul edx - add eax,eax - adc edx,edx - adc ebp,0 - add ebx,eax - adc ecx,edx - mov eax,DWORD [8+esi] - adc ebp,0 - mov edx,DWORD [4+esi] - ; sqr a[2]*a[1] - mul edx - add eax,eax - adc edx,edx - adc ebp,0 - add ebx,eax - adc ecx,edx - mov eax,DWORD [16+esi] - adc ebp,0 - mov DWORD [12+edi],ebx - mov edx,DWORD [esi] - ; saved r[3] - ; ############### Calculate word 4 - xor ebx,ebx - ; sqr a[4]*a[0] - mul edx - add eax,eax - adc edx,edx - adc ebx,0 - add ecx,eax - adc ebp,edx - mov eax,DWORD [12+esi] - adc ebx,0 - mov edx,DWORD [4+esi] - ; sqr a[3]*a[1] - mul edx - add eax,eax - adc edx,edx - adc ebx,0 - add ecx,eax - adc ebp,edx - mov eax,DWORD [8+esi] - adc ebx,0 - ; sqr a[2]*a[2] - mul eax - add ecx,eax - adc ebp,edx - mov edx,DWORD [esi] - adc ebx,0 - mov DWORD [16+edi],ecx - mov eax,DWORD [20+esi] - ; saved r[4] - ; ############### Calculate word 5 - xor ecx,ecx - ; sqr a[5]*a[0] - mul edx - add eax,eax - adc edx,edx - adc ecx,0 - add ebp,eax - adc ebx,edx - mov eax,DWORD [16+esi] - adc ecx,0 - mov edx,DWORD [4+esi] - ; sqr a[4]*a[1] - mul edx - add eax,eax - adc edx,edx - adc ecx,0 - add ebp,eax - adc ebx,edx - mov eax,DWORD [12+esi] - adc ecx,0 - mov edx,DWORD [8+esi] - ; sqr a[3]*a[2] - mul edx - add eax,eax - adc edx,edx - adc ecx,0 - add ebp,eax - adc ebx,edx - mov eax,DWORD [24+esi] - adc ecx,0 - mov DWORD [20+edi],ebp - mov edx,DWORD [esi] - ; saved r[5] - ; ############### Calculate word 6 - xor ebp,ebp - ; sqr a[6]*a[0] - mul edx - add eax,eax - adc edx,edx - adc ebp,0 - add ebx,eax - adc ecx,edx - mov eax,DWORD [20+esi] - adc ebp,0 - mov edx,DWORD [4+esi] - ; sqr a[5]*a[1] - mul edx - add eax,eax - adc edx,edx - adc ebp,0 - add ebx,eax - adc ecx,edx - mov eax,DWORD [16+esi] - adc ebp,0 - mov edx,DWORD [8+esi] - ; sqr a[4]*a[2] - mul edx - add eax,eax - adc edx,edx - adc ebp,0 - add ebx,eax - adc ecx,edx - mov eax,DWORD [12+esi] - adc ebp,0 - ; sqr a[3]*a[3] - mul eax - add ebx,eax - adc ecx,edx - mov edx,DWORD [esi] - adc ebp,0 - mov DWORD [24+edi],ebx - mov eax,DWORD [28+esi] - ; saved r[6] - ; ############### Calculate word 7 - xor ebx,ebx - ; sqr a[7]*a[0] - mul edx - add eax,eax - adc edx,edx - adc ebx,0 - add ecx,eax - adc ebp,edx - mov eax,DWORD [24+esi] - adc ebx,0 - mov edx,DWORD [4+esi] - ; sqr a[6]*a[1] - mul edx - add eax,eax - adc edx,edx - adc ebx,0 - add ecx,eax - adc ebp,edx - mov eax,DWORD [20+esi] - adc ebx,0 - mov edx,DWORD [8+esi] - ; sqr a[5]*a[2] - mul edx - add eax,eax - adc edx,edx - adc ebx,0 - add ecx,eax - adc ebp,edx - mov eax,DWORD [16+esi] - adc ebx,0 - mov edx,DWORD [12+esi] - ; sqr a[4]*a[3] - mul edx - add eax,eax - adc edx,edx - adc ebx,0 - add ecx,eax - adc ebp,edx - mov eax,DWORD [28+esi] - adc ebx,0 - mov DWORD [28+edi],ecx - mov edx,DWORD [4+esi] - ; saved r[7] - ; ############### Calculate word 8 - xor ecx,ecx - ; sqr a[7]*a[1] - mul edx - add eax,eax - adc edx,edx - adc ecx,0 - add ebp,eax - adc ebx,edx - mov eax,DWORD [24+esi] - adc ecx,0 - mov edx,DWORD [8+esi] - ; sqr a[6]*a[2] - mul edx - add eax,eax - adc edx,edx - adc ecx,0 - add ebp,eax - adc ebx,edx - mov eax,DWORD [20+esi] - adc ecx,0 - mov edx,DWORD [12+esi] - ; sqr a[5]*a[3] - mul edx - add eax,eax - adc edx,edx - adc ecx,0 - add ebp,eax - adc ebx,edx - mov eax,DWORD [16+esi] - adc ecx,0 - ; sqr a[4]*a[4] - mul eax - add ebp,eax - adc ebx,edx - mov edx,DWORD [8+esi] - adc ecx,0 - mov DWORD [32+edi],ebp - mov eax,DWORD [28+esi] - ; saved r[8] - ; ############### Calculate word 9 - xor ebp,ebp - ; sqr a[7]*a[2] - mul edx - add eax,eax - adc edx,edx - adc ebp,0 - add ebx,eax - adc ecx,edx - mov eax,DWORD [24+esi] - adc ebp,0 - mov edx,DWORD [12+esi] - ; sqr a[6]*a[3] - mul edx - add eax,eax - adc edx,edx - adc ebp,0 - add ebx,eax - adc ecx,edx - mov eax,DWORD [20+esi] - adc ebp,0 - mov edx,DWORD [16+esi] - ; sqr a[5]*a[4] - mul edx - add eax,eax - adc edx,edx - adc ebp,0 - add ebx,eax - adc ecx,edx - mov eax,DWORD [28+esi] - adc ebp,0 - mov DWORD [36+edi],ebx - mov edx,DWORD [12+esi] - ; saved r[9] - ; ############### Calculate word 10 - xor ebx,ebx - ; sqr a[7]*a[3] - mul edx - add eax,eax - adc edx,edx - adc ebx,0 - add ecx,eax - adc ebp,edx - mov eax,DWORD [24+esi] - adc ebx,0 - mov edx,DWORD [16+esi] - ; sqr a[6]*a[4] - mul edx - add eax,eax - adc edx,edx - adc ebx,0 - add ecx,eax - adc ebp,edx - mov eax,DWORD [20+esi] - adc ebx,0 - ; sqr a[5]*a[5] - mul eax - add ecx,eax - adc ebp,edx - mov edx,DWORD [16+esi] - adc ebx,0 - mov DWORD [40+edi],ecx - mov eax,DWORD [28+esi] - ; saved r[10] - ; ############### Calculate word 11 - xor ecx,ecx - ; sqr a[7]*a[4] - mul edx - add eax,eax - adc edx,edx - adc ecx,0 - add ebp,eax - adc ebx,edx - mov eax,DWORD [24+esi] - adc ecx,0 - mov edx,DWORD [20+esi] - ; sqr a[6]*a[5] - mul edx - add eax,eax - adc edx,edx - adc ecx,0 - add ebp,eax - adc ebx,edx - mov eax,DWORD [28+esi] - adc ecx,0 - mov DWORD [44+edi],ebp - mov edx,DWORD [20+esi] - ; saved r[11] - ; ############### Calculate word 12 - xor ebp,ebp - ; sqr a[7]*a[5] - mul edx - add eax,eax - adc edx,edx - adc ebp,0 - add ebx,eax - adc ecx,edx - mov eax,DWORD [24+esi] - adc ebp,0 - ; sqr a[6]*a[6] - mul eax - add ebx,eax - adc ecx,edx - mov edx,DWORD [24+esi] - adc ebp,0 - mov DWORD [48+edi],ebx - mov eax,DWORD [28+esi] - ; saved r[12] - ; ############### Calculate word 13 - xor ebx,ebx - ; sqr a[7]*a[6] - mul edx - add eax,eax - adc edx,edx - adc ebx,0 - add ecx,eax - adc ebp,edx - mov eax,DWORD [28+esi] - adc ebx,0 - mov DWORD [52+edi],ecx - ; saved r[13] - ; ############### Calculate word 14 - xor ecx,ecx - ; sqr a[7]*a[7] - mul eax - add ebp,eax - adc ebx,edx - adc ecx,0 - mov DWORD [56+edi],ebp - ; saved r[14] - mov DWORD [60+edi],ebx - pop ebx - pop ebp - pop edi - pop esi - ret -global _bn_sqr_comba4 -align 16 -_bn_sqr_comba4: -L$_bn_sqr_comba4_begin: - push esi - push edi - push ebp - push ebx - mov edi,DWORD [20+esp] - mov esi,DWORD [24+esp] - xor ebx,ebx - xor ecx,ecx - mov eax,DWORD [esi] - ; ############### Calculate word 0 - xor ebp,ebp - ; sqr a[0]*a[0] - mul eax - add ebx,eax - adc ecx,edx - mov edx,DWORD [esi] - adc ebp,0 - mov DWORD [edi],ebx - mov eax,DWORD [4+esi] - ; saved r[0] - ; ############### Calculate word 1 - xor ebx,ebx - ; sqr a[1]*a[0] - mul edx - add eax,eax - adc edx,edx - adc ebx,0 - add ecx,eax - adc ebp,edx - mov eax,DWORD [8+esi] - adc ebx,0 - mov DWORD [4+edi],ecx - mov edx,DWORD [esi] - ; saved r[1] - ; ############### Calculate word 2 - xor ecx,ecx - ; sqr a[2]*a[0] - mul edx - add eax,eax - adc edx,edx - adc ecx,0 - add ebp,eax - adc ebx,edx - mov eax,DWORD [4+esi] - adc ecx,0 - ; sqr a[1]*a[1] - mul eax - add ebp,eax - adc ebx,edx - mov edx,DWORD [esi] - adc ecx,0 - mov DWORD [8+edi],ebp - mov eax,DWORD [12+esi] - ; saved r[2] - ; ############### Calculate word 3 - xor ebp,ebp - ; sqr a[3]*a[0] - mul edx - add eax,eax - adc edx,edx - adc ebp,0 - add ebx,eax - adc ecx,edx - mov eax,DWORD [8+esi] - adc ebp,0 - mov edx,DWORD [4+esi] - ; sqr a[2]*a[1] - mul edx - add eax,eax - adc edx,edx - adc ebp,0 - add ebx,eax - adc ecx,edx - mov eax,DWORD [12+esi] - adc ebp,0 - mov DWORD [12+edi],ebx - mov edx,DWORD [4+esi] - ; saved r[3] - ; ############### Calculate word 4 - xor ebx,ebx - ; sqr a[3]*a[1] - mul edx - add eax,eax - adc edx,edx - adc ebx,0 - add ecx,eax - adc ebp,edx - mov eax,DWORD [8+esi] - adc ebx,0 - ; sqr a[2]*a[2] - mul eax - add ecx,eax - adc ebp,edx - mov edx,DWORD [8+esi] - adc ebx,0 - mov DWORD [16+edi],ecx - mov eax,DWORD [12+esi] - ; saved r[4] - ; ############### Calculate word 5 - xor ecx,ecx - ; sqr a[3]*a[2] - mul edx - add eax,eax - adc edx,edx - adc ecx,0 - add ebp,eax - adc ebx,edx - mov eax,DWORD [12+esi] - adc ecx,0 - mov DWORD [20+edi],ebp - ; saved r[5] - ; ############### Calculate word 6 - xor ebp,ebp - ; sqr a[3]*a[3] - mul eax - add ebx,eax - adc ecx,edx - adc ebp,0 - mov DWORD [24+edi],ebx - ; saved r[6] - mov DWORD [28+edi],ecx - pop ebx - pop ebp - pop edi - pop esi - ret diff --git a/third_party/boringssl/win-x86/crypto/bn/x86-mont.asm b/third_party/boringssl/win-x86/crypto/bn/x86-mont.asm deleted file mode 100644 index de7b949927258..0000000000000 --- a/third_party/boringssl/win-x86/crypto/bn/x86-mont.asm +++ /dev/null @@ -1,469 +0,0 @@ -%ifidn __OUTPUT_FORMAT__,obj -section code use32 class=code align=64 -%elifidn __OUTPUT_FORMAT__,win32 -%ifdef __YASM_VERSION_ID__ -%if __YASM_VERSION_ID__ < 01010000h -%error yasm version 1.1.0 or later needed. -%endif -; Yasm automatically includes .00 and complains about redefining it. -; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html -%else -$@feat.00 equ 1 -%endif -section .text code align=64 -%else -section .text code -%endif -;extern _OPENSSL_ia32cap_P -global _bn_mul_mont -align 16 -_bn_mul_mont: -L$_bn_mul_mont_begin: - push ebp - push ebx - push esi - push edi - xor eax,eax - mov edi,DWORD [40+esp] - cmp edi,4 - jl NEAR L$000just_leave - lea esi,[20+esp] - lea edx,[24+esp] - mov ebp,esp - add edi,2 - neg edi - lea esp,[edi*4+esp-32] - neg edi - mov eax,esp - sub eax,edx - and eax,2047 - sub esp,eax - xor edx,esp - and edx,2048 - xor edx,2048 - sub esp,edx - and esp,-64 - mov eax,DWORD [esi] - mov ebx,DWORD [4+esi] - mov ecx,DWORD [8+esi] - mov edx,DWORD [12+esi] - mov esi,DWORD [16+esi] - mov esi,DWORD [esi] - mov DWORD [4+esp],eax - mov DWORD [8+esp],ebx - mov DWORD [12+esp],ecx - mov DWORD [16+esp],edx - mov DWORD [20+esp],esi - lea ebx,[edi-3] - mov DWORD [24+esp],ebp - lea eax,[_OPENSSL_ia32cap_P] - bt DWORD [eax],26 - jnc NEAR L$001non_sse2 - mov eax,-1 - movd mm7,eax - mov esi,DWORD [8+esp] - mov edi,DWORD [12+esp] - mov ebp,DWORD [16+esp] - xor edx,edx - xor ecx,ecx - movd mm4,DWORD [edi] - movd mm5,DWORD [esi] - movd mm3,DWORD [ebp] - pmuludq mm5,mm4 - movq mm2,mm5 - movq mm0,mm5 - pand mm0,mm7 - pmuludq mm5,[20+esp] - pmuludq mm3,mm5 - paddq mm3,mm0 - movd mm1,DWORD [4+ebp] - movd mm0,DWORD [4+esi] - psrlq mm2,32 - psrlq mm3,32 - inc ecx -align 16 -L$0021st: - pmuludq mm0,mm4 - pmuludq mm1,mm5 - paddq mm2,mm0 - paddq mm3,mm1 - movq mm0,mm2 - pand mm0,mm7 - movd mm1,DWORD [4+ecx*4+ebp] - paddq mm3,mm0 - movd mm0,DWORD [4+ecx*4+esi] - psrlq mm2,32 - movd DWORD [28+ecx*4+esp],mm3 - psrlq mm3,32 - lea ecx,[1+ecx] - cmp ecx,ebx - jl NEAR L$0021st - pmuludq mm0,mm4 - pmuludq mm1,mm5 - paddq mm2,mm0 - paddq mm3,mm1 - movq mm0,mm2 - pand mm0,mm7 - paddq mm3,mm0 - movd DWORD [28+ecx*4+esp],mm3 - psrlq mm2,32 - psrlq mm3,32 - paddq mm3,mm2 - movq [32+ebx*4+esp],mm3 - inc edx -L$003outer: - xor ecx,ecx - movd mm4,DWORD [edx*4+edi] - movd mm5,DWORD [esi] - movd mm6,DWORD [32+esp] - movd mm3,DWORD [ebp] - pmuludq mm5,mm4 - paddq mm5,mm6 - movq mm0,mm5 - movq mm2,mm5 - pand mm0,mm7 - pmuludq mm5,[20+esp] - pmuludq mm3,mm5 - paddq mm3,mm0 - movd mm6,DWORD [36+esp] - movd mm1,DWORD [4+ebp] - movd mm0,DWORD [4+esi] - psrlq mm2,32 - psrlq mm3,32 - paddq mm2,mm6 - inc ecx - dec ebx -L$004inner: - pmuludq mm0,mm4 - pmuludq mm1,mm5 - paddq mm2,mm0 - paddq mm3,mm1 - movq mm0,mm2 - movd mm6,DWORD [36+ecx*4+esp] - pand mm0,mm7 - movd mm1,DWORD [4+ecx*4+ebp] - paddq mm3,mm0 - movd mm0,DWORD [4+ecx*4+esi] - psrlq mm2,32 - movd DWORD [28+ecx*4+esp],mm3 - psrlq mm3,32 - paddq mm2,mm6 - dec ebx - lea ecx,[1+ecx] - jnz NEAR L$004inner - mov ebx,ecx - pmuludq mm0,mm4 - pmuludq mm1,mm5 - paddq mm2,mm0 - paddq mm3,mm1 - movq mm0,mm2 - pand mm0,mm7 - paddq mm3,mm0 - movd DWORD [28+ecx*4+esp],mm3 - psrlq mm2,32 - psrlq mm3,32 - movd mm6,DWORD [36+ebx*4+esp] - paddq mm3,mm2 - paddq mm3,mm6 - movq [32+ebx*4+esp],mm3 - lea edx,[1+edx] - cmp edx,ebx - jle NEAR L$003outer - emms - jmp NEAR L$005common_tail -align 16 -L$001non_sse2: - mov esi,DWORD [8+esp] - lea ebp,[1+ebx] - mov edi,DWORD [12+esp] - xor ecx,ecx - mov edx,esi - and ebp,1 - sub edx,edi - lea eax,[4+ebx*4+edi] - or ebp,edx - mov edi,DWORD [edi] - jz NEAR L$006bn_sqr_mont - mov DWORD [28+esp],eax - mov eax,DWORD [esi] - xor edx,edx -align 16 -L$007mull: - mov ebp,edx - mul edi - add ebp,eax - lea ecx,[1+ecx] - adc edx,0 - mov eax,DWORD [ecx*4+esi] - cmp ecx,ebx - mov DWORD [28+ecx*4+esp],ebp - jl NEAR L$007mull - mov ebp,edx - mul edi - mov edi,DWORD [20+esp] - add eax,ebp - mov esi,DWORD [16+esp] - adc edx,0 - imul edi,DWORD [32+esp] - mov DWORD [32+ebx*4+esp],eax - xor ecx,ecx - mov DWORD [36+ebx*4+esp],edx - mov DWORD [40+ebx*4+esp],ecx - mov eax,DWORD [esi] - mul edi - add eax,DWORD [32+esp] - mov eax,DWORD [4+esi] - adc edx,0 - inc ecx - jmp NEAR L$0082ndmadd -align 16 -L$0091stmadd: - mov ebp,edx - mul edi - add ebp,DWORD [32+ecx*4+esp] - lea ecx,[1+ecx] - adc edx,0 - add ebp,eax - mov eax,DWORD [ecx*4+esi] - adc edx,0 - cmp ecx,ebx - mov DWORD [28+ecx*4+esp],ebp - jl NEAR L$0091stmadd - mov ebp,edx - mul edi - add eax,DWORD [32+ebx*4+esp] - mov edi,DWORD [20+esp] - adc edx,0 - mov esi,DWORD [16+esp] - add ebp,eax - adc edx,0 - imul edi,DWORD [32+esp] - xor ecx,ecx - add edx,DWORD [36+ebx*4+esp] - mov DWORD [32+ebx*4+esp],ebp - adc ecx,0 - mov eax,DWORD [esi] - mov DWORD [36+ebx*4+esp],edx - mov DWORD [40+ebx*4+esp],ecx - mul edi - add eax,DWORD [32+esp] - mov eax,DWORD [4+esi] - adc edx,0 - mov ecx,1 -align 16 -L$0082ndmadd: - mov ebp,edx - mul edi - add ebp,DWORD [32+ecx*4+esp] - lea ecx,[1+ecx] - adc edx,0 - add ebp,eax - mov eax,DWORD [ecx*4+esi] - adc edx,0 - cmp ecx,ebx - mov DWORD [24+ecx*4+esp],ebp - jl NEAR L$0082ndmadd - mov ebp,edx - mul edi - add ebp,DWORD [32+ebx*4+esp] - adc edx,0 - add ebp,eax - adc edx,0 - mov DWORD [28+ebx*4+esp],ebp - xor eax,eax - mov ecx,DWORD [12+esp] - add edx,DWORD [36+ebx*4+esp] - adc eax,DWORD [40+ebx*4+esp] - lea ecx,[4+ecx] - mov DWORD [32+ebx*4+esp],edx - cmp ecx,DWORD [28+esp] - mov DWORD [36+ebx*4+esp],eax - je NEAR L$005common_tail - mov edi,DWORD [ecx] - mov esi,DWORD [8+esp] - mov DWORD [12+esp],ecx - xor ecx,ecx - xor edx,edx - mov eax,DWORD [esi] - jmp NEAR L$0091stmadd -align 16 -L$006bn_sqr_mont: - mov DWORD [esp],ebx - mov DWORD [12+esp],ecx - mov eax,edi - mul edi - mov DWORD [32+esp],eax - mov ebx,edx - shr edx,1 - and ebx,1 - inc ecx -align 16 -L$010sqr: - mov eax,DWORD [ecx*4+esi] - mov ebp,edx - mul edi - add eax,ebp - lea ecx,[1+ecx] - adc edx,0 - lea ebp,[eax*2+ebx] - shr eax,31 - cmp ecx,DWORD [esp] - mov ebx,eax - mov DWORD [28+ecx*4+esp],ebp - jl NEAR L$010sqr - mov eax,DWORD [ecx*4+esi] - mov ebp,edx - mul edi - add eax,ebp - mov edi,DWORD [20+esp] - adc edx,0 - mov esi,DWORD [16+esp] - lea ebp,[eax*2+ebx] - imul edi,DWORD [32+esp] - shr eax,31 - mov DWORD [32+ecx*4+esp],ebp - lea ebp,[edx*2+eax] - mov eax,DWORD [esi] - shr edx,31 - mov DWORD [36+ecx*4+esp],ebp - mov DWORD [40+ecx*4+esp],edx - mul edi - add eax,DWORD [32+esp] - mov ebx,ecx - adc edx,0 - mov eax,DWORD [4+esi] - mov ecx,1 -align 16 -L$0113rdmadd: - mov ebp,edx - mul edi - add ebp,DWORD [32+ecx*4+esp] - adc edx,0 - add ebp,eax - mov eax,DWORD [4+ecx*4+esi] - adc edx,0 - mov DWORD [28+ecx*4+esp],ebp - mov ebp,edx - mul edi - add ebp,DWORD [36+ecx*4+esp] - lea ecx,[2+ecx] - adc edx,0 - add ebp,eax - mov eax,DWORD [ecx*4+esi] - adc edx,0 - cmp ecx,ebx - mov DWORD [24+ecx*4+esp],ebp - jl NEAR L$0113rdmadd - mov ebp,edx - mul edi - add ebp,DWORD [32+ebx*4+esp] - adc edx,0 - add ebp,eax - adc edx,0 - mov DWORD [28+ebx*4+esp],ebp - mov ecx,DWORD [12+esp] - xor eax,eax - mov esi,DWORD [8+esp] - add edx,DWORD [36+ebx*4+esp] - adc eax,DWORD [40+ebx*4+esp] - mov DWORD [32+ebx*4+esp],edx - cmp ecx,ebx - mov DWORD [36+ebx*4+esp],eax - je NEAR L$005common_tail - mov edi,DWORD [4+ecx*4+esi] - lea ecx,[1+ecx] - mov eax,edi - mov DWORD [12+esp],ecx - mul edi - add eax,DWORD [32+ecx*4+esp] - adc edx,0 - mov DWORD [32+ecx*4+esp],eax - xor ebp,ebp - cmp ecx,ebx - lea ecx,[1+ecx] - je NEAR L$012sqrlast - mov ebx,edx - shr edx,1 - and ebx,1 -align 16 -L$013sqradd: - mov eax,DWORD [ecx*4+esi] - mov ebp,edx - mul edi - add eax,ebp - lea ebp,[eax*1+eax] - adc edx,0 - shr eax,31 - add ebp,DWORD [32+ecx*4+esp] - lea ecx,[1+ecx] - adc eax,0 - add ebp,ebx - adc eax,0 - cmp ecx,DWORD [esp] - mov DWORD [28+ecx*4+esp],ebp - mov ebx,eax - jle NEAR L$013sqradd - mov ebp,edx - add edx,edx - shr ebp,31 - add edx,ebx - adc ebp,0 -L$012sqrlast: - mov edi,DWORD [20+esp] - mov esi,DWORD [16+esp] - imul edi,DWORD [32+esp] - add edx,DWORD [32+ecx*4+esp] - mov eax,DWORD [esi] - adc ebp,0 - mov DWORD [32+ecx*4+esp],edx - mov DWORD [36+ecx*4+esp],ebp - mul edi - add eax,DWORD [32+esp] - lea ebx,[ecx-1] - adc edx,0 - mov ecx,1 - mov eax,DWORD [4+esi] - jmp NEAR L$0113rdmadd -align 16 -L$005common_tail: - mov ebp,DWORD [16+esp] - mov edi,DWORD [4+esp] - lea esi,[32+esp] - mov eax,DWORD [esi] - mov ecx,ebx - xor edx,edx -align 16 -L$014sub: - sbb eax,DWORD [edx*4+ebp] - mov DWORD [edx*4+edi],eax - dec ecx - mov eax,DWORD [4+edx*4+esi] - lea edx,[1+edx] - jge NEAR L$014sub - sbb eax,0 -align 16 -L$015copy: - mov edx,DWORD [ebx*4+esi] - mov ebp,DWORD [ebx*4+edi] - xor edx,ebp - and edx,eax - xor edx,ebp - mov DWORD [ebx*4+esi],ecx - mov DWORD [ebx*4+edi],edx - dec ebx - jge NEAR L$015copy - mov esp,DWORD [24+esp] - mov eax,1 -L$000just_leave: - pop edi - pop esi - pop ebx - pop ebp - ret -db 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105 -db 112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56 -db 54,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121 -db 32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46 -db 111,114,103,62,0 -segment .bss -common _OPENSSL_ia32cap_P 16 diff --git a/third_party/boringssl/win-x86/crypto/cpu-x86-asm.asm b/third_party/boringssl/win-x86/crypto/cpu-x86-asm.asm deleted file mode 100644 index 4317a73bc884d..0000000000000 --- a/third_party/boringssl/win-x86/crypto/cpu-x86-asm.asm +++ /dev/null @@ -1,303 +0,0 @@ -%ifidn __OUTPUT_FORMAT__,obj -section code use32 class=code align=64 -%elifidn __OUTPUT_FORMAT__,win32 -%ifdef __YASM_VERSION_ID__ -%if __YASM_VERSION_ID__ < 01010000h -%error yasm version 1.1.0 or later needed. -%endif -; Yasm automatically includes .00 and complains about redefining it. -; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html -%else -$@feat.00 equ 1 -%endif -section .text code align=64 -%else -section .text code -%endif -global _OPENSSL_ia32_cpuid -align 16 -_OPENSSL_ia32_cpuid: -L$_OPENSSL_ia32_cpuid_begin: - push ebp - push ebx - push esi - push edi - xor edx,edx - pushfd - pop eax - mov ecx,eax - xor eax,2097152 - push eax - popfd - pushfd - pop eax - xor ecx,eax - xor eax,eax - bt ecx,21 - jnc NEAR L$000nocpuid - mov esi,DWORD [20+esp] - mov DWORD [8+esi],eax - cpuid - mov edi,eax - xor eax,eax - cmp ebx,1970169159 - setne al - mov ebp,eax - cmp edx,1231384169 - setne al - or ebp,eax - cmp ecx,1818588270 - setne al - or ebp,eax - jz NEAR L$001intel - cmp ebx,1752462657 - setne al - mov esi,eax - cmp edx,1769238117 - setne al - or esi,eax - cmp ecx,1145913699 - setne al - or esi,eax - jnz NEAR L$001intel - mov eax,2147483648 - cpuid - cmp eax,2147483649 - jb NEAR L$001intel - mov esi,eax - mov eax,2147483649 - cpuid - or ebp,ecx - and ebp,2049 - cmp esi,2147483656 - jb NEAR L$001intel - mov eax,2147483656 - cpuid - movzx esi,cl - inc esi - mov eax,1 - xor ecx,ecx - cpuid - bt edx,28 - jnc NEAR L$002generic - shr ebx,16 - and ebx,255 - cmp ebx,esi - ja NEAR L$002generic - and edx,4026531839 - jmp NEAR L$002generic -L$001intel: - cmp edi,7 - jb NEAR L$003cacheinfo - mov esi,DWORD [20+esp] - mov eax,7 - xor ecx,ecx - cpuid - mov DWORD [8+esi],ebx -L$003cacheinfo: - cmp edi,4 - mov edi,-1 - jb NEAR L$004nocacheinfo - mov eax,4 - mov ecx,0 - cpuid - mov edi,eax - shr edi,14 - and edi,4095 -L$004nocacheinfo: - mov eax,1 - xor ecx,ecx - cpuid - and edx,3220176895 - cmp ebp,0 - jne NEAR L$005notintel - or edx,1073741824 -L$005notintel: - bt edx,28 - jnc NEAR L$002generic - and edx,4026531839 - cmp edi,0 - je NEAR L$002generic - or edx,268435456 - shr ebx,16 - cmp bl,1 - ja NEAR L$002generic - and edx,4026531839 -L$002generic: - and ebp,2048 - and ecx,4294965247 - mov esi,edx - or ebp,ecx - bt ecx,27 - jnc NEAR L$006clear_avx - xor ecx,ecx -db 15,1,208 - and eax,6 - cmp eax,6 - je NEAR L$007done - cmp eax,2 - je NEAR L$006clear_avx -L$008clear_xmm: - and ebp,4261412861 - and esi,4278190079 -L$006clear_avx: - and ebp,4026525695 - mov edi,DWORD [20+esp] - and DWORD [8+edi],4294967263 -L$007done: - mov eax,esi - mov edx,ebp -L$000nocpuid: - pop edi - pop esi - pop ebx - pop ebp - ret -;extern _OPENSSL_ia32cap_P -global _OPENSSL_rdtsc -align 16 -_OPENSSL_rdtsc: -L$_OPENSSL_rdtsc_begin: - xor eax,eax - xor edx,edx - lea ecx,[_OPENSSL_ia32cap_P] - bt DWORD [ecx],4 - jnc NEAR L$009notsc - rdtsc -L$009notsc: - ret -global _OPENSSL_instrument_halt -align 16 -_OPENSSL_instrument_halt: -L$_OPENSSL_instrument_halt_begin: - lea ecx,[_OPENSSL_ia32cap_P] - bt DWORD [ecx],4 - jnc NEAR L$010nohalt -dd 2421723150 - and eax,3 - jnz NEAR L$010nohalt - pushfd - pop eax - bt eax,9 - jnc NEAR L$010nohalt - rdtsc - push edx - push eax - hlt - rdtsc - sub eax,DWORD [esp] - sbb edx,DWORD [4+esp] - add esp,8 - ret -L$010nohalt: - xor eax,eax - xor edx,edx - ret -global _OPENSSL_far_spin -align 16 -_OPENSSL_far_spin: -L$_OPENSSL_far_spin_begin: - pushfd - pop eax - bt eax,9 - jnc NEAR L$011nospin - mov eax,DWORD [4+esp] - mov ecx,DWORD [8+esp] -dd 2430111262 - xor eax,eax - mov edx,DWORD [ecx] - jmp NEAR L$012spin -align 16 -L$012spin: - inc eax - cmp edx,DWORD [ecx] - je NEAR L$012spin -dd 529567888 - ret -L$011nospin: - xor eax,eax - xor edx,edx - ret -global _OPENSSL_wipe_cpu -align 16 -_OPENSSL_wipe_cpu: -L$_OPENSSL_wipe_cpu_begin: - xor eax,eax - xor edx,edx - lea ecx,[_OPENSSL_ia32cap_P] - mov ecx,DWORD [ecx] - bt DWORD [ecx],1 - jnc NEAR L$013no_x87 - and ecx,83886080 - cmp ecx,83886080 - jne NEAR L$014no_sse2 - pxor xmm0,xmm0 - pxor xmm1,xmm1 - pxor xmm2,xmm2 - pxor xmm3,xmm3 - pxor xmm4,xmm4 - pxor xmm5,xmm5 - pxor xmm6,xmm6 - pxor xmm7,xmm7 -L$014no_sse2: -dd 4007259865,4007259865,4007259865,4007259865,2430851995 -L$013no_x87: - lea eax,[4+esp] - ret -global _OPENSSL_atomic_add -align 16 -_OPENSSL_atomic_add: -L$_OPENSSL_atomic_add_begin: - mov edx,DWORD [4+esp] - mov ecx,DWORD [8+esp] - push ebx - nop - mov eax,DWORD [edx] -L$015spin: - lea ebx,[ecx*1+eax] - nop -dd 447811568 - jne NEAR L$015spin - mov eax,ebx - pop ebx - ret -global _OPENSSL_indirect_call -align 16 -_OPENSSL_indirect_call: -L$_OPENSSL_indirect_call_begin: - push ebp - mov ebp,esp - sub esp,28 - mov ecx,DWORD [12+ebp] - mov DWORD [esp],ecx - mov edx,DWORD [16+ebp] - mov DWORD [4+esp],edx - mov eax,DWORD [20+ebp] - mov DWORD [8+esp],eax - mov eax,DWORD [24+ebp] - mov DWORD [12+esp],eax - mov eax,DWORD [28+ebp] - mov DWORD [16+esp],eax - mov eax,DWORD [32+ebp] - mov DWORD [20+esp],eax - mov eax,DWORD [36+ebp] - mov DWORD [24+esp],eax - call DWORD [8+ebp] - mov esp,ebp - pop ebp - ret -global _OPENSSL_ia32_rdrand -align 16 -_OPENSSL_ia32_rdrand: -L$_OPENSSL_ia32_rdrand_begin: - mov ecx,8 -L$016loop: -db 15,199,240 - jc NEAR L$017break - loop L$016loop -L$017break: - cmp eax,0 - cmove eax,ecx - ret -segment .bss -common _OPENSSL_ia32cap_P 16 diff --git a/third_party/boringssl/win-x86/crypto/md5/md5-586.asm b/third_party/boringssl/win-x86/crypto/md5/md5-586.asm deleted file mode 100644 index 67ee21651fc45..0000000000000 --- a/third_party/boringssl/win-x86/crypto/md5/md5-586.asm +++ /dev/null @@ -1,691 +0,0 @@ -%ifidn __OUTPUT_FORMAT__,obj -section code use32 class=code align=64 -%elifidn __OUTPUT_FORMAT__,win32 -%ifdef __YASM_VERSION_ID__ -%if __YASM_VERSION_ID__ < 01010000h -%error yasm version 1.1.0 or later needed. -%endif -; Yasm automatically includes .00 and complains about redefining it. -; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html -%else -$@feat.00 equ 1 -%endif -section .text code align=64 -%else -section .text code -%endif -global _md5_block_asm_data_order -align 16 -_md5_block_asm_data_order: -L$_md5_block_asm_data_order_begin: - push esi - push edi - mov edi,DWORD [12+esp] - mov esi,DWORD [16+esp] - mov ecx,DWORD [20+esp] - push ebp - shl ecx,6 - push ebx - add ecx,esi - sub ecx,64 - mov eax,DWORD [edi] - push ecx - mov ebx,DWORD [4+edi] - mov ecx,DWORD [8+edi] - mov edx,DWORD [12+edi] -L$000start: - ; - ; R0 section - mov edi,ecx - mov ebp,DWORD [esi] - ; R0 0 - xor edi,edx - and edi,ebx - lea eax,[3614090360+ebp*1+eax] - xor edi,edx - add eax,edi - mov edi,ebx - rol eax,7 - mov ebp,DWORD [4+esi] - add eax,ebx - ; R0 1 - xor edi,ecx - and edi,eax - lea edx,[3905402710+ebp*1+edx] - xor edi,ecx - add edx,edi - mov edi,eax - rol edx,12 - mov ebp,DWORD [8+esi] - add edx,eax - ; R0 2 - xor edi,ebx - and edi,edx - lea ecx,[606105819+ebp*1+ecx] - xor edi,ebx - add ecx,edi - mov edi,edx - rol ecx,17 - mov ebp,DWORD [12+esi] - add ecx,edx - ; R0 3 - xor edi,eax - and edi,ecx - lea ebx,[3250441966+ebp*1+ebx] - xor edi,eax - add ebx,edi - mov edi,ecx - rol ebx,22 - mov ebp,DWORD [16+esi] - add ebx,ecx - ; R0 4 - xor edi,edx - and edi,ebx - lea eax,[4118548399+ebp*1+eax] - xor edi,edx - add eax,edi - mov edi,ebx - rol eax,7 - mov ebp,DWORD [20+esi] - add eax,ebx - ; R0 5 - xor edi,ecx - and edi,eax - lea edx,[1200080426+ebp*1+edx] - xor edi,ecx - add edx,edi - mov edi,eax - rol edx,12 - mov ebp,DWORD [24+esi] - add edx,eax - ; R0 6 - xor edi,ebx - and edi,edx - lea ecx,[2821735955+ebp*1+ecx] - xor edi,ebx - add ecx,edi - mov edi,edx - rol ecx,17 - mov ebp,DWORD [28+esi] - add ecx,edx - ; R0 7 - xor edi,eax - and edi,ecx - lea ebx,[4249261313+ebp*1+ebx] - xor edi,eax - add ebx,edi - mov edi,ecx - rol ebx,22 - mov ebp,DWORD [32+esi] - add ebx,ecx - ; R0 8 - xor edi,edx - and edi,ebx - lea eax,[1770035416+ebp*1+eax] - xor edi,edx - add eax,edi - mov edi,ebx - rol eax,7 - mov ebp,DWORD [36+esi] - add eax,ebx - ; R0 9 - xor edi,ecx - and edi,eax - lea edx,[2336552879+ebp*1+edx] - xor edi,ecx - add edx,edi - mov edi,eax - rol edx,12 - mov ebp,DWORD [40+esi] - add edx,eax - ; R0 10 - xor edi,ebx - and edi,edx - lea ecx,[4294925233+ebp*1+ecx] - xor edi,ebx - add ecx,edi - mov edi,edx - rol ecx,17 - mov ebp,DWORD [44+esi] - add ecx,edx - ; R0 11 - xor edi,eax - and edi,ecx - lea ebx,[2304563134+ebp*1+ebx] - xor edi,eax - add ebx,edi - mov edi,ecx - rol ebx,22 - mov ebp,DWORD [48+esi] - add ebx,ecx - ; R0 12 - xor edi,edx - and edi,ebx - lea eax,[1804603682+ebp*1+eax] - xor edi,edx - add eax,edi - mov edi,ebx - rol eax,7 - mov ebp,DWORD [52+esi] - add eax,ebx - ; R0 13 - xor edi,ecx - and edi,eax - lea edx,[4254626195+ebp*1+edx] - xor edi,ecx - add edx,edi - mov edi,eax - rol edx,12 - mov ebp,DWORD [56+esi] - add edx,eax - ; R0 14 - xor edi,ebx - and edi,edx - lea ecx,[2792965006+ebp*1+ecx] - xor edi,ebx - add ecx,edi - mov edi,edx - rol ecx,17 - mov ebp,DWORD [60+esi] - add ecx,edx - ; R0 15 - xor edi,eax - and edi,ecx - lea ebx,[1236535329+ebp*1+ebx] - xor edi,eax - add ebx,edi - mov edi,ecx - rol ebx,22 - mov ebp,DWORD [4+esi] - add ebx,ecx - ; - ; R1 section - ; R1 16 - lea eax,[4129170786+ebp*1+eax] - xor edi,ebx - and edi,edx - mov ebp,DWORD [24+esi] - xor edi,ecx - add eax,edi - mov edi,ebx - rol eax,5 - add eax,ebx - ; R1 17 - lea edx,[3225465664+ebp*1+edx] - xor edi,eax - and edi,ecx - mov ebp,DWORD [44+esi] - xor edi,ebx - add edx,edi - mov edi,eax - rol edx,9 - add edx,eax - ; R1 18 - lea ecx,[643717713+ebp*1+ecx] - xor edi,edx - and edi,ebx - mov ebp,DWORD [esi] - xor edi,eax - add ecx,edi - mov edi,edx - rol ecx,14 - add ecx,edx - ; R1 19 - lea ebx,[3921069994+ebp*1+ebx] - xor edi,ecx - and edi,eax - mov ebp,DWORD [20+esi] - xor edi,edx - add ebx,edi - mov edi,ecx - rol ebx,20 - add ebx,ecx - ; R1 20 - lea eax,[3593408605+ebp*1+eax] - xor edi,ebx - and edi,edx - mov ebp,DWORD [40+esi] - xor edi,ecx - add eax,edi - mov edi,ebx - rol eax,5 - add eax,ebx - ; R1 21 - lea edx,[38016083+ebp*1+edx] - xor edi,eax - and edi,ecx - mov ebp,DWORD [60+esi] - xor edi,ebx - add edx,edi - mov edi,eax - rol edx,9 - add edx,eax - ; R1 22 - lea ecx,[3634488961+ebp*1+ecx] - xor edi,edx - and edi,ebx - mov ebp,DWORD [16+esi] - xor edi,eax - add ecx,edi - mov edi,edx - rol ecx,14 - add ecx,edx - ; R1 23 - lea ebx,[3889429448+ebp*1+ebx] - xor edi,ecx - and edi,eax - mov ebp,DWORD [36+esi] - xor edi,edx - add ebx,edi - mov edi,ecx - rol ebx,20 - add ebx,ecx - ; R1 24 - lea eax,[568446438+ebp*1+eax] - xor edi,ebx - and edi,edx - mov ebp,DWORD [56+esi] - xor edi,ecx - add eax,edi - mov edi,ebx - rol eax,5 - add eax,ebx - ; R1 25 - lea edx,[3275163606+ebp*1+edx] - xor edi,eax - and edi,ecx - mov ebp,DWORD [12+esi] - xor edi,ebx - add edx,edi - mov edi,eax - rol edx,9 - add edx,eax - ; R1 26 - lea ecx,[4107603335+ebp*1+ecx] - xor edi,edx - and edi,ebx - mov ebp,DWORD [32+esi] - xor edi,eax - add ecx,edi - mov edi,edx - rol ecx,14 - add ecx,edx - ; R1 27 - lea ebx,[1163531501+ebp*1+ebx] - xor edi,ecx - and edi,eax - mov ebp,DWORD [52+esi] - xor edi,edx - add ebx,edi - mov edi,ecx - rol ebx,20 - add ebx,ecx - ; R1 28 - lea eax,[2850285829+ebp*1+eax] - xor edi,ebx - and edi,edx - mov ebp,DWORD [8+esi] - xor edi,ecx - add eax,edi - mov edi,ebx - rol eax,5 - add eax,ebx - ; R1 29 - lea edx,[4243563512+ebp*1+edx] - xor edi,eax - and edi,ecx - mov ebp,DWORD [28+esi] - xor edi,ebx - add edx,edi - mov edi,eax - rol edx,9 - add edx,eax - ; R1 30 - lea ecx,[1735328473+ebp*1+ecx] - xor edi,edx - and edi,ebx - mov ebp,DWORD [48+esi] - xor edi,eax - add ecx,edi - mov edi,edx - rol ecx,14 - add ecx,edx - ; R1 31 - lea ebx,[2368359562+ebp*1+ebx] - xor edi,ecx - and edi,eax - mov ebp,DWORD [20+esi] - xor edi,edx - add ebx,edi - mov edi,ecx - rol ebx,20 - add ebx,ecx - ; - ; R2 section - ; R2 32 - xor edi,edx - xor edi,ebx - lea eax,[4294588738+ebp*1+eax] - add eax,edi - rol eax,4 - mov ebp,DWORD [32+esi] - mov edi,ebx - ; R2 33 - lea edx,[2272392833+ebp*1+edx] - add eax,ebx - xor edi,ecx - xor edi,eax - mov ebp,DWORD [44+esi] - add edx,edi - mov edi,eax - rol edx,11 - add edx,eax - ; R2 34 - xor edi,ebx - xor edi,edx - lea ecx,[1839030562+ebp*1+ecx] - add ecx,edi - rol ecx,16 - mov ebp,DWORD [56+esi] - mov edi,edx - ; R2 35 - lea ebx,[4259657740+ebp*1+ebx] - add ecx,edx - xor edi,eax - xor edi,ecx - mov ebp,DWORD [4+esi] - add ebx,edi - mov edi,ecx - rol ebx,23 - add ebx,ecx - ; R2 36 - xor edi,edx - xor edi,ebx - lea eax,[2763975236+ebp*1+eax] - add eax,edi - rol eax,4 - mov ebp,DWORD [16+esi] - mov edi,ebx - ; R2 37 - lea edx,[1272893353+ebp*1+edx] - add eax,ebx - xor edi,ecx - xor edi,eax - mov ebp,DWORD [28+esi] - add edx,edi - mov edi,eax - rol edx,11 - add edx,eax - ; R2 38 - xor edi,ebx - xor edi,edx - lea ecx,[4139469664+ebp*1+ecx] - add ecx,edi - rol ecx,16 - mov ebp,DWORD [40+esi] - mov edi,edx - ; R2 39 - lea ebx,[3200236656+ebp*1+ebx] - add ecx,edx - xor edi,eax - xor edi,ecx - mov ebp,DWORD [52+esi] - add ebx,edi - mov edi,ecx - rol ebx,23 - add ebx,ecx - ; R2 40 - xor edi,edx - xor edi,ebx - lea eax,[681279174+ebp*1+eax] - add eax,edi - rol eax,4 - mov ebp,DWORD [esi] - mov edi,ebx - ; R2 41 - lea edx,[3936430074+ebp*1+edx] - add eax,ebx - xor edi,ecx - xor edi,eax - mov ebp,DWORD [12+esi] - add edx,edi - mov edi,eax - rol edx,11 - add edx,eax - ; R2 42 - xor edi,ebx - xor edi,edx - lea ecx,[3572445317+ebp*1+ecx] - add ecx,edi - rol ecx,16 - mov ebp,DWORD [24+esi] - mov edi,edx - ; R2 43 - lea ebx,[76029189+ebp*1+ebx] - add ecx,edx - xor edi,eax - xor edi,ecx - mov ebp,DWORD [36+esi] - add ebx,edi - mov edi,ecx - rol ebx,23 - add ebx,ecx - ; R2 44 - xor edi,edx - xor edi,ebx - lea eax,[3654602809+ebp*1+eax] - add eax,edi - rol eax,4 - mov ebp,DWORD [48+esi] - mov edi,ebx - ; R2 45 - lea edx,[3873151461+ebp*1+edx] - add eax,ebx - xor edi,ecx - xor edi,eax - mov ebp,DWORD [60+esi] - add edx,edi - mov edi,eax - rol edx,11 - add edx,eax - ; R2 46 - xor edi,ebx - xor edi,edx - lea ecx,[530742520+ebp*1+ecx] - add ecx,edi - rol ecx,16 - mov ebp,DWORD [8+esi] - mov edi,edx - ; R2 47 - lea ebx,[3299628645+ebp*1+ebx] - add ecx,edx - xor edi,eax - xor edi,ecx - mov ebp,DWORD [esi] - add ebx,edi - mov edi,-1 - rol ebx,23 - add ebx,ecx - ; - ; R3 section - ; R3 48 - xor edi,edx - or edi,ebx - lea eax,[4096336452+ebp*1+eax] - xor edi,ecx - mov ebp,DWORD [28+esi] - add eax,edi - mov edi,-1 - rol eax,6 - xor edi,ecx - add eax,ebx - ; R3 49 - or edi,eax - lea edx,[1126891415+ebp*1+edx] - xor edi,ebx - mov ebp,DWORD [56+esi] - add edx,edi - mov edi,-1 - rol edx,10 - xor edi,ebx - add edx,eax - ; R3 50 - or edi,edx - lea ecx,[2878612391+ebp*1+ecx] - xor edi,eax - mov ebp,DWORD [20+esi] - add ecx,edi - mov edi,-1 - rol ecx,15 - xor edi,eax - add ecx,edx - ; R3 51 - or edi,ecx - lea ebx,[4237533241+ebp*1+ebx] - xor edi,edx - mov ebp,DWORD [48+esi] - add ebx,edi - mov edi,-1 - rol ebx,21 - xor edi,edx - add ebx,ecx - ; R3 52 - or edi,ebx - lea eax,[1700485571+ebp*1+eax] - xor edi,ecx - mov ebp,DWORD [12+esi] - add eax,edi - mov edi,-1 - rol eax,6 - xor edi,ecx - add eax,ebx - ; R3 53 - or edi,eax - lea edx,[2399980690+ebp*1+edx] - xor edi,ebx - mov ebp,DWORD [40+esi] - add edx,edi - mov edi,-1 - rol edx,10 - xor edi,ebx - add edx,eax - ; R3 54 - or edi,edx - lea ecx,[4293915773+ebp*1+ecx] - xor edi,eax - mov ebp,DWORD [4+esi] - add ecx,edi - mov edi,-1 - rol ecx,15 - xor edi,eax - add ecx,edx - ; R3 55 - or edi,ecx - lea ebx,[2240044497+ebp*1+ebx] - xor edi,edx - mov ebp,DWORD [32+esi] - add ebx,edi - mov edi,-1 - rol ebx,21 - xor edi,edx - add ebx,ecx - ; R3 56 - or edi,ebx - lea eax,[1873313359+ebp*1+eax] - xor edi,ecx - mov ebp,DWORD [60+esi] - add eax,edi - mov edi,-1 - rol eax,6 - xor edi,ecx - add eax,ebx - ; R3 57 - or edi,eax - lea edx,[4264355552+ebp*1+edx] - xor edi,ebx - mov ebp,DWORD [24+esi] - add edx,edi - mov edi,-1 - rol edx,10 - xor edi,ebx - add edx,eax - ; R3 58 - or edi,edx - lea ecx,[2734768916+ebp*1+ecx] - xor edi,eax - mov ebp,DWORD [52+esi] - add ecx,edi - mov edi,-1 - rol ecx,15 - xor edi,eax - add ecx,edx - ; R3 59 - or edi,ecx - lea ebx,[1309151649+ebp*1+ebx] - xor edi,edx - mov ebp,DWORD [16+esi] - add ebx,edi - mov edi,-1 - rol ebx,21 - xor edi,edx - add ebx,ecx - ; R3 60 - or edi,ebx - lea eax,[4149444226+ebp*1+eax] - xor edi,ecx - mov ebp,DWORD [44+esi] - add eax,edi - mov edi,-1 - rol eax,6 - xor edi,ecx - add eax,ebx - ; R3 61 - or edi,eax - lea edx,[3174756917+ebp*1+edx] - xor edi,ebx - mov ebp,DWORD [8+esi] - add edx,edi - mov edi,-1 - rol edx,10 - xor edi,ebx - add edx,eax - ; R3 62 - or edi,edx - lea ecx,[718787259+ebp*1+ecx] - xor edi,eax - mov ebp,DWORD [36+esi] - add ecx,edi - mov edi,-1 - rol ecx,15 - xor edi,eax - add ecx,edx - ; R3 63 - or edi,ecx - lea ebx,[3951481745+ebp*1+ebx] - xor edi,edx - mov ebp,DWORD [24+esp] - add ebx,edi - add esi,64 - rol ebx,21 - mov edi,DWORD [ebp] - add ebx,ecx - add eax,edi - mov edi,DWORD [4+ebp] - add ebx,edi - mov edi,DWORD [8+ebp] - add ecx,edi - mov edi,DWORD [12+ebp] - add edx,edi - mov DWORD [ebp],eax - mov DWORD [4+ebp],ebx - mov edi,DWORD [esp] - mov DWORD [8+ebp],ecx - mov DWORD [12+ebp],edx - cmp edi,esi - jae NEAR L$000start - pop eax - pop ebx - pop ebp - pop edi - pop esi - ret diff --git a/third_party/boringssl/win-x86/crypto/modes/ghash-x86.asm b/third_party/boringssl/win-x86/crypto/modes/ghash-x86.asm deleted file mode 100644 index eb493aca63675..0000000000000 --- a/third_party/boringssl/win-x86/crypto/modes/ghash-x86.asm +++ /dev/null @@ -1,1265 +0,0 @@ -%ifidn __OUTPUT_FORMAT__,obj -section code use32 class=code align=64 -%elifidn __OUTPUT_FORMAT__,win32 -%ifdef __YASM_VERSION_ID__ -%if __YASM_VERSION_ID__ < 01010000h -%error yasm version 1.1.0 or later needed. -%endif -; Yasm automatically includes .00 and complains about redefining it. -; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html -%else -$@feat.00 equ 1 -%endif -section .text code align=64 -%else -section .text code -%endif -global _gcm_gmult_4bit_x86 -align 16 -_gcm_gmult_4bit_x86: -L$_gcm_gmult_4bit_x86_begin: - push ebp - push ebx - push esi - push edi - sub esp,84 - mov edi,DWORD [104+esp] - mov esi,DWORD [108+esp] - mov ebp,DWORD [edi] - mov edx,DWORD [4+edi] - mov ecx,DWORD [8+edi] - mov ebx,DWORD [12+edi] - mov DWORD [16+esp],0 - mov DWORD [20+esp],471859200 - mov DWORD [24+esp],943718400 - mov DWORD [28+esp],610271232 - mov DWORD [32+esp],1887436800 - mov DWORD [36+esp],1822425088 - mov DWORD [40+esp],1220542464 - mov DWORD [44+esp],1423966208 - mov DWORD [48+esp],3774873600 - mov DWORD [52+esp],4246732800 - mov DWORD [56+esp],3644850176 - mov DWORD [60+esp],3311403008 - mov DWORD [64+esp],2441084928 - mov DWORD [68+esp],2376073216 - mov DWORD [72+esp],2847932416 - mov DWORD [76+esp],3051356160 - mov DWORD [esp],ebp - mov DWORD [4+esp],edx - mov DWORD [8+esp],ecx - mov DWORD [12+esp],ebx - shr ebx,20 - and ebx,240 - mov ebp,DWORD [4+ebx*1+esi] - mov edx,DWORD [ebx*1+esi] - mov ecx,DWORD [12+ebx*1+esi] - mov ebx,DWORD [8+ebx*1+esi] - xor eax,eax - mov edi,15 - jmp NEAR L$000x86_loop -align 16 -L$000x86_loop: - mov al,bl - shrd ebx,ecx,4 - and al,15 - shrd ecx,edx,4 - shrd edx,ebp,4 - shr ebp,4 - xor ebp,DWORD [16+eax*4+esp] - mov al,BYTE [edi*1+esp] - and al,240 - xor ebx,DWORD [8+eax*1+esi] - xor ecx,DWORD [12+eax*1+esi] - xor edx,DWORD [eax*1+esi] - xor ebp,DWORD [4+eax*1+esi] - dec edi - js NEAR L$001x86_break - mov al,bl - shrd ebx,ecx,4 - and al,15 - shrd ecx,edx,4 - shrd edx,ebp,4 - shr ebp,4 - xor ebp,DWORD [16+eax*4+esp] - mov al,BYTE [edi*1+esp] - shl al,4 - xor ebx,DWORD [8+eax*1+esi] - xor ecx,DWORD [12+eax*1+esi] - xor edx,DWORD [eax*1+esi] - xor ebp,DWORD [4+eax*1+esi] - jmp NEAR L$000x86_loop -align 16 -L$001x86_break: - bswap ebx - bswap ecx - bswap edx - bswap ebp - mov edi,DWORD [104+esp] - mov DWORD [12+edi],ebx - mov DWORD [8+edi],ecx - mov DWORD [4+edi],edx - mov DWORD [edi],ebp - add esp,84 - pop edi - pop esi - pop ebx - pop ebp - ret -global _gcm_ghash_4bit_x86 -align 16 -_gcm_ghash_4bit_x86: -L$_gcm_ghash_4bit_x86_begin: - push ebp - push ebx - push esi - push edi - sub esp,84 - mov ebx,DWORD [104+esp] - mov esi,DWORD [108+esp] - mov edi,DWORD [112+esp] - mov ecx,DWORD [116+esp] - add ecx,edi - mov DWORD [116+esp],ecx - mov ebp,DWORD [ebx] - mov edx,DWORD [4+ebx] - mov ecx,DWORD [8+ebx] - mov ebx,DWORD [12+ebx] - mov DWORD [16+esp],0 - mov DWORD [20+esp],471859200 - mov DWORD [24+esp],943718400 - mov DWORD [28+esp],610271232 - mov DWORD [32+esp],1887436800 - mov DWORD [36+esp],1822425088 - mov DWORD [40+esp],1220542464 - mov DWORD [44+esp],1423966208 - mov DWORD [48+esp],3774873600 - mov DWORD [52+esp],4246732800 - mov DWORD [56+esp],3644850176 - mov DWORD [60+esp],3311403008 - mov DWORD [64+esp],2441084928 - mov DWORD [68+esp],2376073216 - mov DWORD [72+esp],2847932416 - mov DWORD [76+esp],3051356160 -align 16 -L$002x86_outer_loop: - xor ebx,DWORD [12+edi] - xor ecx,DWORD [8+edi] - xor edx,DWORD [4+edi] - xor ebp,DWORD [edi] - mov DWORD [12+esp],ebx - mov DWORD [8+esp],ecx - mov DWORD [4+esp],edx - mov DWORD [esp],ebp - shr ebx,20 - and ebx,240 - mov ebp,DWORD [4+ebx*1+esi] - mov edx,DWORD [ebx*1+esi] - mov ecx,DWORD [12+ebx*1+esi] - mov ebx,DWORD [8+ebx*1+esi] - xor eax,eax - mov edi,15 - jmp NEAR L$003x86_loop -align 16 -L$003x86_loop: - mov al,bl - shrd ebx,ecx,4 - and al,15 - shrd ecx,edx,4 - shrd edx,ebp,4 - shr ebp,4 - xor ebp,DWORD [16+eax*4+esp] - mov al,BYTE [edi*1+esp] - and al,240 - xor ebx,DWORD [8+eax*1+esi] - xor ecx,DWORD [12+eax*1+esi] - xor edx,DWORD [eax*1+esi] - xor ebp,DWORD [4+eax*1+esi] - dec edi - js NEAR L$004x86_break - mov al,bl - shrd ebx,ecx,4 - and al,15 - shrd ecx,edx,4 - shrd edx,ebp,4 - shr ebp,4 - xor ebp,DWORD [16+eax*4+esp] - mov al,BYTE [edi*1+esp] - shl al,4 - xor ebx,DWORD [8+eax*1+esi] - xor ecx,DWORD [12+eax*1+esi] - xor edx,DWORD [eax*1+esi] - xor ebp,DWORD [4+eax*1+esi] - jmp NEAR L$003x86_loop -align 16 -L$004x86_break: - bswap ebx - bswap ecx - bswap edx - bswap ebp - mov edi,DWORD [112+esp] - lea edi,[16+edi] - cmp edi,DWORD [116+esp] - mov DWORD [112+esp],edi - jb NEAR L$002x86_outer_loop - mov edi,DWORD [104+esp] - mov DWORD [12+edi],ebx - mov DWORD [8+edi],ecx - mov DWORD [4+edi],edx - mov DWORD [edi],ebp - add esp,84 - pop edi - pop esi - pop ebx - pop ebp - ret -global _gcm_gmult_4bit_mmx -align 16 -_gcm_gmult_4bit_mmx: -L$_gcm_gmult_4bit_mmx_begin: - push ebp - push ebx - push esi - push edi - mov edi,DWORD [20+esp] - mov esi,DWORD [24+esp] - call L$005pic_point -L$005pic_point: - pop eax - lea eax,[(L$rem_4bit-L$005pic_point)+eax] - movzx ebx,BYTE [15+edi] - xor ecx,ecx - mov edx,ebx - mov cl,dl - mov ebp,14 - shl cl,4 - and edx,240 - movq mm0,[8+ecx*1+esi] - movq mm1,[ecx*1+esi] - movd ebx,mm0 - jmp NEAR L$006mmx_loop -align 16 -L$006mmx_loop: - psrlq mm0,4 - and ebx,15 - movq mm2,mm1 - psrlq mm1,4 - pxor mm0,[8+edx*1+esi] - mov cl,BYTE [ebp*1+edi] - psllq mm2,60 - pxor mm1,[ebx*8+eax] - dec ebp - movd ebx,mm0 - pxor mm1,[edx*1+esi] - mov edx,ecx - pxor mm0,mm2 - js NEAR L$007mmx_break - shl cl,4 - and ebx,15 - psrlq mm0,4 - and edx,240 - movq mm2,mm1 - psrlq mm1,4 - pxor mm0,[8+ecx*1+esi] - psllq mm2,60 - pxor mm1,[ebx*8+eax] - movd ebx,mm0 - pxor mm1,[ecx*1+esi] - pxor mm0,mm2 - jmp NEAR L$006mmx_loop -align 16 -L$007mmx_break: - shl cl,4 - and ebx,15 - psrlq mm0,4 - and edx,240 - movq mm2,mm1 - psrlq mm1,4 - pxor mm0,[8+ecx*1+esi] - psllq mm2,60 - pxor mm1,[ebx*8+eax] - movd ebx,mm0 - pxor mm1,[ecx*1+esi] - pxor mm0,mm2 - psrlq mm0,4 - and ebx,15 - movq mm2,mm1 - psrlq mm1,4 - pxor mm0,[8+edx*1+esi] - psllq mm2,60 - pxor mm1,[ebx*8+eax] - movd ebx,mm0 - pxor mm1,[edx*1+esi] - pxor mm0,mm2 - psrlq mm0,32 - movd edx,mm1 - psrlq mm1,32 - movd ecx,mm0 - movd ebp,mm1 - bswap ebx - bswap edx - bswap ecx - bswap ebp - emms - mov DWORD [12+edi],ebx - mov DWORD [4+edi],edx - mov DWORD [8+edi],ecx - mov DWORD [edi],ebp - pop edi - pop esi - pop ebx - pop ebp - ret -global _gcm_ghash_4bit_mmx -align 16 -_gcm_ghash_4bit_mmx: -L$_gcm_ghash_4bit_mmx_begin: - push ebp - push ebx - push esi - push edi - mov eax,DWORD [20+esp] - mov ebx,DWORD [24+esp] - mov ecx,DWORD [28+esp] - mov edx,DWORD [32+esp] - mov ebp,esp - call L$008pic_point -L$008pic_point: - pop esi - lea esi,[(L$rem_8bit-L$008pic_point)+esi] - sub esp,544 - and esp,-64 - sub esp,16 - add edx,ecx - mov DWORD [544+esp],eax - mov DWORD [552+esp],edx - mov DWORD [556+esp],ebp - add ebx,128 - lea edi,[144+esp] - lea ebp,[400+esp] - mov edx,DWORD [ebx-120] - movq mm0,[ebx-120] - movq mm3,[ebx-128] - shl edx,4 - mov BYTE [esp],dl - mov edx,DWORD [ebx-104] - movq mm2,[ebx-104] - movq mm5,[ebx-112] - movq [edi-128],mm0 - psrlq mm0,4 - movq [edi],mm3 - movq mm7,mm3 - psrlq mm3,4 - shl edx,4 - mov BYTE [1+esp],dl - mov edx,DWORD [ebx-88] - movq mm1,[ebx-88] - psllq mm7,60 - movq mm4,[ebx-96] - por mm0,mm7 - movq [edi-120],mm2 - psrlq mm2,4 - movq [8+edi],mm5 - movq mm6,mm5 - movq [ebp-128],mm0 - psrlq mm5,4 - movq [ebp],mm3 - shl edx,4 - mov BYTE [2+esp],dl - mov edx,DWORD [ebx-72] - movq mm0,[ebx-72] - psllq mm6,60 - movq mm3,[ebx-80] - por mm2,mm6 - movq [edi-112],mm1 - psrlq mm1,4 - movq [16+edi],mm4 - movq mm7,mm4 - movq [ebp-120],mm2 - psrlq mm4,4 - movq [8+ebp],mm5 - shl edx,4 - mov BYTE [3+esp],dl - mov edx,DWORD [ebx-56] - movq mm2,[ebx-56] - psllq mm7,60 - movq mm5,[ebx-64] - por mm1,mm7 - movq [edi-104],mm0 - psrlq mm0,4 - movq [24+edi],mm3 - movq mm6,mm3 - movq [ebp-112],mm1 - psrlq mm3,4 - movq [16+ebp],mm4 - shl edx,4 - mov BYTE [4+esp],dl - mov edx,DWORD [ebx-40] - movq mm1,[ebx-40] - psllq mm6,60 - movq mm4,[ebx-48] - por mm0,mm6 - movq [edi-96],mm2 - psrlq mm2,4 - movq [32+edi],mm5 - movq mm7,mm5 - movq [ebp-104],mm0 - psrlq mm5,4 - movq [24+ebp],mm3 - shl edx,4 - mov BYTE [5+esp],dl - mov edx,DWORD [ebx-24] - movq mm0,[ebx-24] - psllq mm7,60 - movq mm3,[ebx-32] - por mm2,mm7 - movq [edi-88],mm1 - psrlq mm1,4 - movq [40+edi],mm4 - movq mm6,mm4 - movq [ebp-96],mm2 - psrlq mm4,4 - movq [32+ebp],mm5 - shl edx,4 - mov BYTE [6+esp],dl - mov edx,DWORD [ebx-8] - movq mm2,[ebx-8] - psllq mm6,60 - movq mm5,[ebx-16] - por mm1,mm6 - movq [edi-80],mm0 - psrlq mm0,4 - movq [48+edi],mm3 - movq mm7,mm3 - movq [ebp-88],mm1 - psrlq mm3,4 - movq [40+ebp],mm4 - shl edx,4 - mov BYTE [7+esp],dl - mov edx,DWORD [8+ebx] - movq mm1,[8+ebx] - psllq mm7,60 - movq mm4,[ebx] - por mm0,mm7 - movq [edi-72],mm2 - psrlq mm2,4 - movq [56+edi],mm5 - movq mm6,mm5 - movq [ebp-80],mm0 - psrlq mm5,4 - movq [48+ebp],mm3 - shl edx,4 - mov BYTE [8+esp],dl - mov edx,DWORD [24+ebx] - movq mm0,[24+ebx] - psllq mm6,60 - movq mm3,[16+ebx] - por mm2,mm6 - movq [edi-64],mm1 - psrlq mm1,4 - movq [64+edi],mm4 - movq mm7,mm4 - movq [ebp-72],mm2 - psrlq mm4,4 - movq [56+ebp],mm5 - shl edx,4 - mov BYTE [9+esp],dl - mov edx,DWORD [40+ebx] - movq mm2,[40+ebx] - psllq mm7,60 - movq mm5,[32+ebx] - por mm1,mm7 - movq [edi-56],mm0 - psrlq mm0,4 - movq [72+edi],mm3 - movq mm6,mm3 - movq [ebp-64],mm1 - psrlq mm3,4 - movq [64+ebp],mm4 - shl edx,4 - mov BYTE [10+esp],dl - mov edx,DWORD [56+ebx] - movq mm1,[56+ebx] - psllq mm6,60 - movq mm4,[48+ebx] - por mm0,mm6 - movq [edi-48],mm2 - psrlq mm2,4 - movq [80+edi],mm5 - movq mm7,mm5 - movq [ebp-56],mm0 - psrlq mm5,4 - movq [72+ebp],mm3 - shl edx,4 - mov BYTE [11+esp],dl - mov edx,DWORD [72+ebx] - movq mm0,[72+ebx] - psllq mm7,60 - movq mm3,[64+ebx] - por mm2,mm7 - movq [edi-40],mm1 - psrlq mm1,4 - movq [88+edi],mm4 - movq mm6,mm4 - movq [ebp-48],mm2 - psrlq mm4,4 - movq [80+ebp],mm5 - shl edx,4 - mov BYTE [12+esp],dl - mov edx,DWORD [88+ebx] - movq mm2,[88+ebx] - psllq mm6,60 - movq mm5,[80+ebx] - por mm1,mm6 - movq [edi-32],mm0 - psrlq mm0,4 - movq [96+edi],mm3 - movq mm7,mm3 - movq [ebp-40],mm1 - psrlq mm3,4 - movq [88+ebp],mm4 - shl edx,4 - mov BYTE [13+esp],dl - mov edx,DWORD [104+ebx] - movq mm1,[104+ebx] - psllq mm7,60 - movq mm4,[96+ebx] - por mm0,mm7 - movq [edi-24],mm2 - psrlq mm2,4 - movq [104+edi],mm5 - movq mm6,mm5 - movq [ebp-32],mm0 - psrlq mm5,4 - movq [96+ebp],mm3 - shl edx,4 - mov BYTE [14+esp],dl - mov edx,DWORD [120+ebx] - movq mm0,[120+ebx] - psllq mm6,60 - movq mm3,[112+ebx] - por mm2,mm6 - movq [edi-16],mm1 - psrlq mm1,4 - movq [112+edi],mm4 - movq mm7,mm4 - movq [ebp-24],mm2 - psrlq mm4,4 - movq [104+ebp],mm5 - shl edx,4 - mov BYTE [15+esp],dl - psllq mm7,60 - por mm1,mm7 - movq [edi-8],mm0 - psrlq mm0,4 - movq [120+edi],mm3 - movq mm6,mm3 - movq [ebp-16],mm1 - psrlq mm3,4 - movq [112+ebp],mm4 - psllq mm6,60 - por mm0,mm6 - movq [ebp-8],mm0 - movq [120+ebp],mm3 - movq mm6,[eax] - mov ebx,DWORD [8+eax] - mov edx,DWORD [12+eax] -align 16 -L$009outer: - xor edx,DWORD [12+ecx] - xor ebx,DWORD [8+ecx] - pxor mm6,[ecx] - lea ecx,[16+ecx] - mov DWORD [536+esp],ebx - movq [528+esp],mm6 - mov DWORD [548+esp],ecx - xor eax,eax - rol edx,8 - mov al,dl - mov ebp,eax - and al,15 - shr ebp,4 - pxor mm0,mm0 - rol edx,8 - pxor mm1,mm1 - pxor mm2,mm2 - movq mm7,[16+eax*8+esp] - movq mm6,[144+eax*8+esp] - mov al,dl - movd ebx,mm7 - psrlq mm7,8 - movq mm3,mm6 - mov edi,eax - psrlq mm6,8 - pxor mm7,[272+ebp*8+esp] - and al,15 - psllq mm3,56 - shr edi,4 - pxor mm7,[16+eax*8+esp] - rol edx,8 - pxor mm6,[144+eax*8+esp] - pxor mm7,mm3 - pxor mm6,[400+ebp*8+esp] - xor bl,BYTE [ebp*1+esp] - mov al,dl - movd ecx,mm7 - movzx ebx,bl - psrlq mm7,8 - movq mm3,mm6 - mov ebp,eax - psrlq mm6,8 - pxor mm7,[272+edi*8+esp] - and al,15 - psllq mm3,56 - shr ebp,4 - pinsrw mm2,WORD [ebx*2+esi],2 - pxor mm7,[16+eax*8+esp] - rol edx,8 - pxor mm6,[144+eax*8+esp] - pxor mm7,mm3 - pxor mm6,[400+edi*8+esp] - xor cl,BYTE [edi*1+esp] - mov al,dl - mov edx,DWORD [536+esp] - movd ebx,mm7 - movzx ecx,cl - psrlq mm7,8 - movq mm3,mm6 - mov edi,eax - psrlq mm6,8 - pxor mm7,[272+ebp*8+esp] - and al,15 - psllq mm3,56 - pxor mm6,mm2 - shr edi,4 - pinsrw mm1,WORD [ecx*2+esi],2 - pxor mm7,[16+eax*8+esp] - rol edx,8 - pxor mm6,[144+eax*8+esp] - pxor mm7,mm3 - pxor mm6,[400+ebp*8+esp] - xor bl,BYTE [ebp*1+esp] - mov al,dl - movd ecx,mm7 - movzx ebx,bl - psrlq mm7,8 - movq mm3,mm6 - mov ebp,eax - psrlq mm6,8 - pxor mm7,[272+edi*8+esp] - and al,15 - psllq mm3,56 - pxor mm6,mm1 - shr ebp,4 - pinsrw mm0,WORD [ebx*2+esi],2 - pxor mm7,[16+eax*8+esp] - rol edx,8 - pxor mm6,[144+eax*8+esp] - pxor mm7,mm3 - pxor mm6,[400+edi*8+esp] - xor cl,BYTE [edi*1+esp] - mov al,dl - movd ebx,mm7 - movzx ecx,cl - psrlq mm7,8 - movq mm3,mm6 - mov edi,eax - psrlq mm6,8 - pxor mm7,[272+ebp*8+esp] - and al,15 - psllq mm3,56 - pxor mm6,mm0 - shr edi,4 - pinsrw mm2,WORD [ecx*2+esi],2 - pxor mm7,[16+eax*8+esp] - rol edx,8 - pxor mm6,[144+eax*8+esp] - pxor mm7,mm3 - pxor mm6,[400+ebp*8+esp] - xor bl,BYTE [ebp*1+esp] - mov al,dl - movd ecx,mm7 - movzx ebx,bl - psrlq mm7,8 - movq mm3,mm6 - mov ebp,eax - psrlq mm6,8 - pxor mm7,[272+edi*8+esp] - and al,15 - psllq mm3,56 - pxor mm6,mm2 - shr ebp,4 - pinsrw mm1,WORD [ebx*2+esi],2 - pxor mm7,[16+eax*8+esp] - rol edx,8 - pxor mm6,[144+eax*8+esp] - pxor mm7,mm3 - pxor mm6,[400+edi*8+esp] - xor cl,BYTE [edi*1+esp] - mov al,dl - mov edx,DWORD [532+esp] - movd ebx,mm7 - movzx ecx,cl - psrlq mm7,8 - movq mm3,mm6 - mov edi,eax - psrlq mm6,8 - pxor mm7,[272+ebp*8+esp] - and al,15 - psllq mm3,56 - pxor mm6,mm1 - shr edi,4 - pinsrw mm0,WORD [ecx*2+esi],2 - pxor mm7,[16+eax*8+esp] - rol edx,8 - pxor mm6,[144+eax*8+esp] - pxor mm7,mm3 - pxor mm6,[400+ebp*8+esp] - xor bl,BYTE [ebp*1+esp] - mov al,dl - movd ecx,mm7 - movzx ebx,bl - psrlq mm7,8 - movq mm3,mm6 - mov ebp,eax - psrlq mm6,8 - pxor mm7,[272+edi*8+esp] - and al,15 - psllq mm3,56 - pxor mm6,mm0 - shr ebp,4 - pinsrw mm2,WORD [ebx*2+esi],2 - pxor mm7,[16+eax*8+esp] - rol edx,8 - pxor mm6,[144+eax*8+esp] - pxor mm7,mm3 - pxor mm6,[400+edi*8+esp] - xor cl,BYTE [edi*1+esp] - mov al,dl - movd ebx,mm7 - movzx ecx,cl - psrlq mm7,8 - movq mm3,mm6 - mov edi,eax - psrlq mm6,8 - pxor mm7,[272+ebp*8+esp] - and al,15 - psllq mm3,56 - pxor mm6,mm2 - shr edi,4 - pinsrw mm1,WORD [ecx*2+esi],2 - pxor mm7,[16+eax*8+esp] - rol edx,8 - pxor mm6,[144+eax*8+esp] - pxor mm7,mm3 - pxor mm6,[400+ebp*8+esp] - xor bl,BYTE [ebp*1+esp] - mov al,dl - movd ecx,mm7 - movzx ebx,bl - psrlq mm7,8 - movq mm3,mm6 - mov ebp,eax - psrlq mm6,8 - pxor mm7,[272+edi*8+esp] - and al,15 - psllq mm3,56 - pxor mm6,mm1 - shr ebp,4 - pinsrw mm0,WORD [ebx*2+esi],2 - pxor mm7,[16+eax*8+esp] - rol edx,8 - pxor mm6,[144+eax*8+esp] - pxor mm7,mm3 - pxor mm6,[400+edi*8+esp] - xor cl,BYTE [edi*1+esp] - mov al,dl - mov edx,DWORD [528+esp] - movd ebx,mm7 - movzx ecx,cl - psrlq mm7,8 - movq mm3,mm6 - mov edi,eax - psrlq mm6,8 - pxor mm7,[272+ebp*8+esp] - and al,15 - psllq mm3,56 - pxor mm6,mm0 - shr edi,4 - pinsrw mm2,WORD [ecx*2+esi],2 - pxor mm7,[16+eax*8+esp] - rol edx,8 - pxor mm6,[144+eax*8+esp] - pxor mm7,mm3 - pxor mm6,[400+ebp*8+esp] - xor bl,BYTE [ebp*1+esp] - mov al,dl - movd ecx,mm7 - movzx ebx,bl - psrlq mm7,8 - movq mm3,mm6 - mov ebp,eax - psrlq mm6,8 - pxor mm7,[272+edi*8+esp] - and al,15 - psllq mm3,56 - pxor mm6,mm2 - shr ebp,4 - pinsrw mm1,WORD [ebx*2+esi],2 - pxor mm7,[16+eax*8+esp] - rol edx,8 - pxor mm6,[144+eax*8+esp] - pxor mm7,mm3 - pxor mm6,[400+edi*8+esp] - xor cl,BYTE [edi*1+esp] - mov al,dl - movd ebx,mm7 - movzx ecx,cl - psrlq mm7,8 - movq mm3,mm6 - mov edi,eax - psrlq mm6,8 - pxor mm7,[272+ebp*8+esp] - and al,15 - psllq mm3,56 - pxor mm6,mm1 - shr edi,4 - pinsrw mm0,WORD [ecx*2+esi],2 - pxor mm7,[16+eax*8+esp] - rol edx,8 - pxor mm6,[144+eax*8+esp] - pxor mm7,mm3 - pxor mm6,[400+ebp*8+esp] - xor bl,BYTE [ebp*1+esp] - mov al,dl - movd ecx,mm7 - movzx ebx,bl - psrlq mm7,8 - movq mm3,mm6 - mov ebp,eax - psrlq mm6,8 - pxor mm7,[272+edi*8+esp] - and al,15 - psllq mm3,56 - pxor mm6,mm0 - shr ebp,4 - pinsrw mm2,WORD [ebx*2+esi],2 - pxor mm7,[16+eax*8+esp] - rol edx,8 - pxor mm6,[144+eax*8+esp] - pxor mm7,mm3 - pxor mm6,[400+edi*8+esp] - xor cl,BYTE [edi*1+esp] - mov al,dl - mov edx,DWORD [524+esp] - movd ebx,mm7 - movzx ecx,cl - psrlq mm7,8 - movq mm3,mm6 - mov edi,eax - psrlq mm6,8 - pxor mm7,[272+ebp*8+esp] - and al,15 - psllq mm3,56 - pxor mm6,mm2 - shr edi,4 - pinsrw mm1,WORD [ecx*2+esi],2 - pxor mm7,[16+eax*8+esp] - pxor mm6,[144+eax*8+esp] - xor bl,BYTE [ebp*1+esp] - pxor mm7,mm3 - pxor mm6,[400+ebp*8+esp] - movzx ebx,bl - pxor mm2,mm2 - psllq mm1,4 - movd ecx,mm7 - psrlq mm7,4 - movq mm3,mm6 - psrlq mm6,4 - shl ecx,4 - pxor mm7,[16+edi*8+esp] - psllq mm3,60 - movzx ecx,cl - pxor mm7,mm3 - pxor mm6,[144+edi*8+esp] - pinsrw mm0,WORD [ebx*2+esi],2 - pxor mm6,mm1 - movd edx,mm7 - pinsrw mm2,WORD [ecx*2+esi],3 - psllq mm0,12 - pxor mm6,mm0 - psrlq mm7,32 - pxor mm6,mm2 - mov ecx,DWORD [548+esp] - movd ebx,mm7 - movq mm3,mm6 - psllw mm6,8 - psrlw mm3,8 - por mm6,mm3 - bswap edx - pshufw mm6,mm6,27 - bswap ebx - cmp ecx,DWORD [552+esp] - jne NEAR L$009outer - mov eax,DWORD [544+esp] - mov DWORD [12+eax],edx - mov DWORD [8+eax],ebx - movq [eax],mm6 - mov esp,DWORD [556+esp] - emms - pop edi - pop esi - pop ebx - pop ebp - ret -global _gcm_init_clmul -align 16 -_gcm_init_clmul: -L$_gcm_init_clmul_begin: - mov edx,DWORD [4+esp] - mov eax,DWORD [8+esp] - call L$010pic -L$010pic: - pop ecx - lea ecx,[(L$bswap-L$010pic)+ecx] - movdqu xmm2,[eax] - pshufd xmm2,xmm2,78 - pshufd xmm4,xmm2,255 - movdqa xmm3,xmm2 - psllq xmm2,1 - pxor xmm5,xmm5 - psrlq xmm3,63 - pcmpgtd xmm5,xmm4 - pslldq xmm3,8 - por xmm2,xmm3 - pand xmm5,[16+ecx] - pxor xmm2,xmm5 - movdqa xmm0,xmm2 - movdqa xmm1,xmm0 - pshufd xmm3,xmm0,78 - pshufd xmm4,xmm2,78 - pxor xmm3,xmm0 - pxor xmm4,xmm2 -db 102,15,58,68,194,0 -db 102,15,58,68,202,17 -db 102,15,58,68,220,0 - xorps xmm3,xmm0 - xorps xmm3,xmm1 - movdqa xmm4,xmm3 - psrldq xmm3,8 - pslldq xmm4,8 - pxor xmm1,xmm3 - pxor xmm0,xmm4 - movdqa xmm4,xmm0 - movdqa xmm3,xmm0 - psllq xmm0,5 - pxor xmm3,xmm0 - psllq xmm0,1 - pxor xmm0,xmm3 - psllq xmm0,57 - movdqa xmm3,xmm0 - pslldq xmm0,8 - psrldq xmm3,8 - pxor xmm0,xmm4 - pxor xmm1,xmm3 - movdqa xmm4,xmm0 - psrlq xmm0,1 - pxor xmm1,xmm4 - pxor xmm4,xmm0 - psrlq xmm0,5 - pxor xmm0,xmm4 - psrlq xmm0,1 - pxor xmm0,xmm1 - pshufd xmm3,xmm2,78 - pshufd xmm4,xmm0,78 - pxor xmm3,xmm2 - movdqu [edx],xmm2 - pxor xmm4,xmm0 - movdqu [16+edx],xmm0 -db 102,15,58,15,227,8 - movdqu [32+edx],xmm4 - ret -global _gcm_gmult_clmul -align 16 -_gcm_gmult_clmul: -L$_gcm_gmult_clmul_begin: - mov eax,DWORD [4+esp] - mov edx,DWORD [8+esp] - call L$011pic -L$011pic: - pop ecx - lea ecx,[(L$bswap-L$011pic)+ecx] - movdqu xmm0,[eax] - movdqa xmm5,[ecx] - movups xmm2,[edx] -db 102,15,56,0,197 - movups xmm4,[32+edx] - movdqa xmm1,xmm0 - pshufd xmm3,xmm0,78 - pxor xmm3,xmm0 -db 102,15,58,68,194,0 -db 102,15,58,68,202,17 -db 102,15,58,68,220,0 - xorps xmm3,xmm0 - xorps xmm3,xmm1 - movdqa xmm4,xmm3 - psrldq xmm3,8 - pslldq xmm4,8 - pxor xmm1,xmm3 - pxor xmm0,xmm4 - movdqa xmm4,xmm0 - movdqa xmm3,xmm0 - psllq xmm0,5 - pxor xmm3,xmm0 - psllq xmm0,1 - pxor xmm0,xmm3 - psllq xmm0,57 - movdqa xmm3,xmm0 - pslldq xmm0,8 - psrldq xmm3,8 - pxor xmm0,xmm4 - pxor xmm1,xmm3 - movdqa xmm4,xmm0 - psrlq xmm0,1 - pxor xmm1,xmm4 - pxor xmm4,xmm0 - psrlq xmm0,5 - pxor xmm0,xmm4 - psrlq xmm0,1 - pxor xmm0,xmm1 -db 102,15,56,0,197 - movdqu [eax],xmm0 - ret -global _gcm_ghash_clmul -align 16 -_gcm_ghash_clmul: -L$_gcm_ghash_clmul_begin: - push ebp - push ebx - push esi - push edi - mov eax,DWORD [20+esp] - mov edx,DWORD [24+esp] - mov esi,DWORD [28+esp] - mov ebx,DWORD [32+esp] - call L$012pic -L$012pic: - pop ecx - lea ecx,[(L$bswap-L$012pic)+ecx] - movdqu xmm0,[eax] - movdqa xmm5,[ecx] - movdqu xmm2,[edx] -db 102,15,56,0,197 - sub ebx,16 - jz NEAR L$013odd_tail - movdqu xmm3,[esi] - movdqu xmm6,[16+esi] -db 102,15,56,0,221 -db 102,15,56,0,245 - movdqu xmm5,[32+edx] - pxor xmm0,xmm3 - pshufd xmm3,xmm6,78 - movdqa xmm7,xmm6 - pxor xmm3,xmm6 - lea esi,[32+esi] -db 102,15,58,68,242,0 -db 102,15,58,68,250,17 -db 102,15,58,68,221,0 - movups xmm2,[16+edx] - nop - sub ebx,32 - jbe NEAR L$014even_tail - jmp NEAR L$015mod_loop -align 32 -L$015mod_loop: - pshufd xmm4,xmm0,78 - movdqa xmm1,xmm0 - pxor xmm4,xmm0 - nop -db 102,15,58,68,194,0 -db 102,15,58,68,202,17 -db 102,15,58,68,229,16 - movups xmm2,[edx] - xorps xmm0,xmm6 - movdqa xmm5,[ecx] - xorps xmm1,xmm7 - movdqu xmm7,[esi] - pxor xmm3,xmm0 - movdqu xmm6,[16+esi] - pxor xmm3,xmm1 -db 102,15,56,0,253 - pxor xmm4,xmm3 - movdqa xmm3,xmm4 - psrldq xmm4,8 - pslldq xmm3,8 - pxor xmm1,xmm4 - pxor xmm0,xmm3 -db 102,15,56,0,245 - pxor xmm1,xmm7 - movdqa xmm7,xmm6 - movdqa xmm4,xmm0 - movdqa xmm3,xmm0 - psllq xmm0,5 - pxor xmm3,xmm0 - psllq xmm0,1 - pxor xmm0,xmm3 -db 102,15,58,68,242,0 - movups xmm5,[32+edx] - psllq xmm0,57 - movdqa xmm3,xmm0 - pslldq xmm0,8 - psrldq xmm3,8 - pxor xmm0,xmm4 - pxor xmm1,xmm3 - pshufd xmm3,xmm7,78 - movdqa xmm4,xmm0 - psrlq xmm0,1 - pxor xmm3,xmm7 - pxor xmm1,xmm4 -db 102,15,58,68,250,17 - movups xmm2,[16+edx] - pxor xmm4,xmm0 - psrlq xmm0,5 - pxor xmm0,xmm4 - psrlq xmm0,1 - pxor xmm0,xmm1 -db 102,15,58,68,221,0 - lea esi,[32+esi] - sub ebx,32 - ja NEAR L$015mod_loop -L$014even_tail: - pshufd xmm4,xmm0,78 - movdqa xmm1,xmm0 - pxor xmm4,xmm0 -db 102,15,58,68,194,0 -db 102,15,58,68,202,17 -db 102,15,58,68,229,16 - movdqa xmm5,[ecx] - xorps xmm0,xmm6 - xorps xmm1,xmm7 - pxor xmm3,xmm0 - pxor xmm3,xmm1 - pxor xmm4,xmm3 - movdqa xmm3,xmm4 - psrldq xmm4,8 - pslldq xmm3,8 - pxor xmm1,xmm4 - pxor xmm0,xmm3 - movdqa xmm4,xmm0 - movdqa xmm3,xmm0 - psllq xmm0,5 - pxor xmm3,xmm0 - psllq xmm0,1 - pxor xmm0,xmm3 - psllq xmm0,57 - movdqa xmm3,xmm0 - pslldq xmm0,8 - psrldq xmm3,8 - pxor xmm0,xmm4 - pxor xmm1,xmm3 - movdqa xmm4,xmm0 - psrlq xmm0,1 - pxor xmm1,xmm4 - pxor xmm4,xmm0 - psrlq xmm0,5 - pxor xmm0,xmm4 - psrlq xmm0,1 - pxor xmm0,xmm1 - test ebx,ebx - jnz NEAR L$016done - movups xmm2,[edx] -L$013odd_tail: - movdqu xmm3,[esi] -db 102,15,56,0,221 - pxor xmm0,xmm3 - movdqa xmm1,xmm0 - pshufd xmm3,xmm0,78 - pshufd xmm4,xmm2,78 - pxor xmm3,xmm0 - pxor xmm4,xmm2 -db 102,15,58,68,194,0 -db 102,15,58,68,202,17 -db 102,15,58,68,220,0 - xorps xmm3,xmm0 - xorps xmm3,xmm1 - movdqa xmm4,xmm3 - psrldq xmm3,8 - pslldq xmm4,8 - pxor xmm1,xmm3 - pxor xmm0,xmm4 - movdqa xmm4,xmm0 - movdqa xmm3,xmm0 - psllq xmm0,5 - pxor xmm3,xmm0 - psllq xmm0,1 - pxor xmm0,xmm3 - psllq xmm0,57 - movdqa xmm3,xmm0 - pslldq xmm0,8 - psrldq xmm3,8 - pxor xmm0,xmm4 - pxor xmm1,xmm3 - movdqa xmm4,xmm0 - psrlq xmm0,1 - pxor xmm1,xmm4 - pxor xmm4,xmm0 - psrlq xmm0,5 - pxor xmm0,xmm4 - psrlq xmm0,1 - pxor xmm0,xmm1 -L$016done: -db 102,15,56,0,197 - movdqu [eax],xmm0 - pop edi - pop esi - pop ebx - pop ebp - ret -align 64 -L$bswap: -db 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -db 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,194 -align 64 -L$rem_8bit: -dw 0,450,900,582,1800,1738,1164,1358 -dw 3600,4050,3476,3158,2328,2266,2716,2910 -dw 7200,7650,8100,7782,6952,6890,6316,6510 -dw 4656,5106,4532,4214,5432,5370,5820,6014 -dw 14400,14722,15300,14854,16200,16010,15564,15630 -dw 13904,14226,13780,13334,12632,12442,13020,13086 -dw 9312,9634,10212,9766,9064,8874,8428,8494 -dw 10864,11186,10740,10294,11640,11450,12028,12094 -dw 28800,28994,29444,29382,30600,30282,29708,30158 -dw 32400,32594,32020,31958,31128,30810,31260,31710 -dw 27808,28002,28452,28390,27560,27242,26668,27118 -dw 25264,25458,24884,24822,26040,25722,26172,26622 -dw 18624,18690,19268,19078,20424,19978,19532,19854 -dw 18128,18194,17748,17558,16856,16410,16988,17310 -dw 21728,21794,22372,22182,21480,21034,20588,20910 -dw 23280,23346,22900,22710,24056,23610,24188,24510 -dw 57600,57538,57988,58182,58888,59338,58764,58446 -dw 61200,61138,60564,60758,59416,59866,60316,59998 -dw 64800,64738,65188,65382,64040,64490,63916,63598 -dw 62256,62194,61620,61814,62520,62970,63420,63102 -dw 55616,55426,56004,56070,56904,57226,56780,56334 -dw 55120,54930,54484,54550,53336,53658,54236,53790 -dw 50528,50338,50916,50982,49768,50090,49644,49198 -dw 52080,51890,51444,51510,52344,52666,53244,52798 -dw 37248,36930,37380,37830,38536,38730,38156,38094 -dw 40848,40530,39956,40406,39064,39258,39708,39646 -dw 36256,35938,36388,36838,35496,35690,35116,35054 -dw 33712,33394,32820,33270,33976,34170,34620,34558 -dw 43456,43010,43588,43910,44744,44810,44364,44174 -dw 42960,42514,42068,42390,41176,41242,41820,41630 -dw 46560,46114,46692,47014,45800,45866,45420,45230 -dw 48112,47666,47220,47542,48376,48442,49020,48830 -align 64 -L$rem_4bit: -dd 0,0,0,471859200,0,943718400,0,610271232 -dd 0,1887436800,0,1822425088,0,1220542464,0,1423966208 -dd 0,3774873600,0,4246732800,0,3644850176,0,3311403008 -dd 0,2441084928,0,2376073216,0,2847932416,0,3051356160 -db 71,72,65,83,72,32,102,111,114,32,120,56,54,44,32,67 -db 82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112 -db 112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62 -db 0 diff --git a/third_party/boringssl/win-x86/crypto/rc4/rc4-586.asm b/third_party/boringssl/win-x86/crypto/rc4/rc4-586.asm deleted file mode 100644 index 08cd9f6d70a75..0000000000000 --- a/third_party/boringssl/win-x86/crypto/rc4/rc4-586.asm +++ /dev/null @@ -1,382 +0,0 @@ -%ifidn __OUTPUT_FORMAT__,obj -section code use32 class=code align=64 -%elifidn __OUTPUT_FORMAT__,win32 -%ifdef __YASM_VERSION_ID__ -%if __YASM_VERSION_ID__ < 01010000h -%error yasm version 1.1.0 or later needed. -%endif -; Yasm automatically includes .00 and complains about redefining it. -; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html -%else -$@feat.00 equ 1 -%endif -section .text code align=64 -%else -section .text code -%endif -;extern _OPENSSL_ia32cap_P -global _asm_RC4 -align 16 -_asm_RC4: -L$_asm_RC4_begin: - push ebp - push ebx - push esi - push edi - mov edi,DWORD [20+esp] - mov edx,DWORD [24+esp] - mov esi,DWORD [28+esp] - mov ebp,DWORD [32+esp] - xor eax,eax - xor ebx,ebx - cmp edx,0 - je NEAR L$000abort - mov al,BYTE [edi] - mov bl,BYTE [4+edi] - add edi,8 - lea ecx,[edx*1+esi] - sub ebp,esi - mov DWORD [24+esp],ecx - inc al - cmp DWORD [256+edi],-1 - je NEAR L$001RC4_CHAR - mov ecx,DWORD [eax*4+edi] - and edx,-4 - jz NEAR L$002loop1 - mov DWORD [32+esp],ebp - test edx,-8 - jz NEAR L$003go4loop4 - lea ebp,[_OPENSSL_ia32cap_P] - bt DWORD [ebp],26 - jnc NEAR L$003go4loop4 - mov ebp,DWORD [32+esp] - and edx,-8 - lea edx,[edx*1+esi-8] - mov DWORD [edi-4],edx - add bl,cl - mov edx,DWORD [ebx*4+edi] - mov DWORD [ebx*4+edi],ecx - mov DWORD [eax*4+edi],edx - inc eax - add edx,ecx - movzx eax,al - movzx edx,dl - movq mm0,[esi] - mov ecx,DWORD [eax*4+edi] - movd mm2,DWORD [edx*4+edi] - jmp NEAR L$004loop_mmx_enter -align 16 -L$005loop_mmx: - add bl,cl - psllq mm1,56 - mov edx,DWORD [ebx*4+edi] - mov DWORD [ebx*4+edi],ecx - mov DWORD [eax*4+edi],edx - inc eax - add edx,ecx - movzx eax,al - movzx edx,dl - pxor mm2,mm1 - movq mm0,[esi] - movq [esi*1+ebp-8],mm2 - mov ecx,DWORD [eax*4+edi] - movd mm2,DWORD [edx*4+edi] -L$004loop_mmx_enter: - add bl,cl - mov edx,DWORD [ebx*4+edi] - mov DWORD [ebx*4+edi],ecx - mov DWORD [eax*4+edi],edx - inc eax - add edx,ecx - movzx eax,al - movzx edx,dl - pxor mm2,mm0 - mov ecx,DWORD [eax*4+edi] - movd mm1,DWORD [edx*4+edi] - add bl,cl - psllq mm1,8 - mov edx,DWORD [ebx*4+edi] - mov DWORD [ebx*4+edi],ecx - mov DWORD [eax*4+edi],edx - inc eax - add edx,ecx - movzx eax,al - movzx edx,dl - pxor mm2,mm1 - mov ecx,DWORD [eax*4+edi] - movd mm1,DWORD [edx*4+edi] - add bl,cl - psllq mm1,16 - mov edx,DWORD [ebx*4+edi] - mov DWORD [ebx*4+edi],ecx - mov DWORD [eax*4+edi],edx - inc eax - add edx,ecx - movzx eax,al - movzx edx,dl - pxor mm2,mm1 - mov ecx,DWORD [eax*4+edi] - movd mm1,DWORD [edx*4+edi] - add bl,cl - psllq mm1,24 - mov edx,DWORD [ebx*4+edi] - mov DWORD [ebx*4+edi],ecx - mov DWORD [eax*4+edi],edx - inc eax - add edx,ecx - movzx eax,al - movzx edx,dl - pxor mm2,mm1 - mov ecx,DWORD [eax*4+edi] - movd mm1,DWORD [edx*4+edi] - add bl,cl - psllq mm1,32 - mov edx,DWORD [ebx*4+edi] - mov DWORD [ebx*4+edi],ecx - mov DWORD [eax*4+edi],edx - inc eax - add edx,ecx - movzx eax,al - movzx edx,dl - pxor mm2,mm1 - mov ecx,DWORD [eax*4+edi] - movd mm1,DWORD [edx*4+edi] - add bl,cl - psllq mm1,40 - mov edx,DWORD [ebx*4+edi] - mov DWORD [ebx*4+edi],ecx - mov DWORD [eax*4+edi],edx - inc eax - add edx,ecx - movzx eax,al - movzx edx,dl - pxor mm2,mm1 - mov ecx,DWORD [eax*4+edi] - movd mm1,DWORD [edx*4+edi] - add bl,cl - psllq mm1,48 - mov edx,DWORD [ebx*4+edi] - mov DWORD [ebx*4+edi],ecx - mov DWORD [eax*4+edi],edx - inc eax - add edx,ecx - movzx eax,al - movzx edx,dl - pxor mm2,mm1 - mov ecx,DWORD [eax*4+edi] - movd mm1,DWORD [edx*4+edi] - mov edx,ebx - xor ebx,ebx - mov bl,dl - cmp esi,DWORD [edi-4] - lea esi,[8+esi] - jb NEAR L$005loop_mmx - psllq mm1,56 - pxor mm2,mm1 - movq [esi*1+ebp-8],mm2 - emms - cmp esi,DWORD [24+esp] - je NEAR L$006done - jmp NEAR L$002loop1 -align 16 -L$003go4loop4: - lea edx,[edx*1+esi-4] - mov DWORD [28+esp],edx -L$007loop4: - add bl,cl - mov edx,DWORD [ebx*4+edi] - mov DWORD [ebx*4+edi],ecx - mov DWORD [eax*4+edi],edx - add edx,ecx - inc al - and edx,255 - mov ecx,DWORD [eax*4+edi] - mov ebp,DWORD [edx*4+edi] - add bl,cl - mov edx,DWORD [ebx*4+edi] - mov DWORD [ebx*4+edi],ecx - mov DWORD [eax*4+edi],edx - add edx,ecx - inc al - and edx,255 - ror ebp,8 - mov ecx,DWORD [eax*4+edi] - or ebp,DWORD [edx*4+edi] - add bl,cl - mov edx,DWORD [ebx*4+edi] - mov DWORD [ebx*4+edi],ecx - mov DWORD [eax*4+edi],edx - add edx,ecx - inc al - and edx,255 - ror ebp,8 - mov ecx,DWORD [eax*4+edi] - or ebp,DWORD [edx*4+edi] - add bl,cl - mov edx,DWORD [ebx*4+edi] - mov DWORD [ebx*4+edi],ecx - mov DWORD [eax*4+edi],edx - add edx,ecx - inc al - and edx,255 - ror ebp,8 - mov ecx,DWORD [32+esp] - or ebp,DWORD [edx*4+edi] - ror ebp,8 - xor ebp,DWORD [esi] - cmp esi,DWORD [28+esp] - mov DWORD [esi*1+ecx],ebp - lea esi,[4+esi] - mov ecx,DWORD [eax*4+edi] - jb NEAR L$007loop4 - cmp esi,DWORD [24+esp] - je NEAR L$006done - mov ebp,DWORD [32+esp] -align 16 -L$002loop1: - add bl,cl - mov edx,DWORD [ebx*4+edi] - mov DWORD [ebx*4+edi],ecx - mov DWORD [eax*4+edi],edx - add edx,ecx - inc al - and edx,255 - mov edx,DWORD [edx*4+edi] - xor dl,BYTE [esi] - lea esi,[1+esi] - mov ecx,DWORD [eax*4+edi] - cmp esi,DWORD [24+esp] - mov BYTE [esi*1+ebp-1],dl - jb NEAR L$002loop1 - jmp NEAR L$006done -align 16 -L$001RC4_CHAR: - movzx ecx,BYTE [eax*1+edi] -L$008cloop1: - add bl,cl - movzx edx,BYTE [ebx*1+edi] - mov BYTE [ebx*1+edi],cl - mov BYTE [eax*1+edi],dl - add dl,cl - movzx edx,BYTE [edx*1+edi] - add al,1 - xor dl,BYTE [esi] - lea esi,[1+esi] - movzx ecx,BYTE [eax*1+edi] - cmp esi,DWORD [24+esp] - mov BYTE [esi*1+ebp-1],dl - jb NEAR L$008cloop1 -L$006done: - dec al - mov DWORD [edi-4],ebx - mov BYTE [edi-8],al -L$000abort: - pop edi - pop esi - pop ebx - pop ebp - ret -global _asm_RC4_set_key -align 16 -_asm_RC4_set_key: -L$_asm_RC4_set_key_begin: - push ebp - push ebx - push esi - push edi - mov edi,DWORD [20+esp] - mov ebp,DWORD [24+esp] - mov esi,DWORD [28+esp] - lea edx,[_OPENSSL_ia32cap_P] - lea edi,[8+edi] - lea esi,[ebp*1+esi] - neg ebp - xor eax,eax - mov DWORD [edi-4],ebp - bt DWORD [edx],20 - jc NEAR L$009c1stloop -align 16 -L$010w1stloop: - mov DWORD [eax*4+edi],eax - add al,1 - jnc NEAR L$010w1stloop - xor ecx,ecx - xor edx,edx -align 16 -L$011w2ndloop: - mov eax,DWORD [ecx*4+edi] - add dl,BYTE [ebp*1+esi] - add dl,al - add ebp,1 - mov ebx,DWORD [edx*4+edi] - jnz NEAR L$012wnowrap - mov ebp,DWORD [edi-4] -L$012wnowrap: - mov DWORD [edx*4+edi],eax - mov DWORD [ecx*4+edi],ebx - add cl,1 - jnc NEAR L$011w2ndloop - jmp NEAR L$013exit -align 16 -L$009c1stloop: - mov BYTE [eax*1+edi],al - add al,1 - jnc NEAR L$009c1stloop - xor ecx,ecx - xor edx,edx - xor ebx,ebx -align 16 -L$014c2ndloop: - mov al,BYTE [ecx*1+edi] - add dl,BYTE [ebp*1+esi] - add dl,al - add ebp,1 - mov bl,BYTE [edx*1+edi] - jnz NEAR L$015cnowrap - mov ebp,DWORD [edi-4] -L$015cnowrap: - mov BYTE [edx*1+edi],al - mov BYTE [ecx*1+edi],bl - add cl,1 - jnc NEAR L$014c2ndloop - mov DWORD [256+edi],-1 -L$013exit: - xor eax,eax - mov DWORD [edi-8],eax - mov DWORD [edi-4],eax - pop edi - pop esi - pop ebx - pop ebp - ret -global _RC4_options -align 16 -_RC4_options: -L$_RC4_options_begin: - call L$016pic_point -L$016pic_point: - pop eax - lea eax,[(L$017opts-L$016pic_point)+eax] - lea edx,[_OPENSSL_ia32cap_P] - mov edx,DWORD [edx] - bt edx,20 - jc NEAR L$0181xchar - bt edx,26 - jnc NEAR L$019ret - add eax,25 - ret -L$0181xchar: - add eax,12 -L$019ret: - ret -align 64 -L$017opts: -db 114,99,52,40,52,120,44,105,110,116,41,0 -db 114,99,52,40,49,120,44,99,104,97,114,41,0 -db 114,99,52,40,56,120,44,109,109,120,41,0 -db 82,67,52,32,102,111,114,32,120,56,54,44,32,67,82,89 -db 80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114 -db 111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -align 64 -segment .bss -common _OPENSSL_ia32cap_P 16 diff --git a/third_party/boringssl/win-x86/crypto/sha/sha1-586.asm b/third_party/boringssl/win-x86/crypto/sha/sha1-586.asm deleted file mode 100644 index e24449d200687..0000000000000 --- a/third_party/boringssl/win-x86/crypto/sha/sha1-586.asm +++ /dev/null @@ -1,2805 +0,0 @@ -%ifidn __OUTPUT_FORMAT__,obj -section code use32 class=code align=64 -%elifidn __OUTPUT_FORMAT__,win32 -%ifdef __YASM_VERSION_ID__ -%if __YASM_VERSION_ID__ < 01010000h -%error yasm version 1.1.0 or later needed. -%endif -; Yasm automatically includes .00 and complains about redefining it. -; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html -%else -$@feat.00 equ 1 -%endif -section .text code align=64 -%else -section .text code -%endif -;extern _OPENSSL_ia32cap_P -global _sha1_block_data_order -align 16 -_sha1_block_data_order: -L$_sha1_block_data_order_begin: - push ebp - push ebx - push esi - push edi - call L$000pic_point -L$000pic_point: - pop ebp - lea esi,[_OPENSSL_ia32cap_P] - lea ebp,[(L$K_XX_XX-L$000pic_point)+ebp] - mov eax,DWORD [esi] - mov edx,DWORD [4+esi] - test edx,512 - jz NEAR L$001x86 - mov ecx,DWORD [8+esi] - test eax,16777216 - jz NEAR L$001x86 - test ecx,536870912 - jnz NEAR L$shaext_shortcut - jmp NEAR L$ssse3_shortcut -align 16 -L$001x86: - mov ebp,DWORD [20+esp] - mov esi,DWORD [24+esp] - mov eax,DWORD [28+esp] - sub esp,76 - shl eax,6 - add eax,esi - mov DWORD [104+esp],eax - mov edi,DWORD [16+ebp] - jmp NEAR L$002loop -align 16 -L$002loop: - mov eax,DWORD [esi] - mov ebx,DWORD [4+esi] - mov ecx,DWORD [8+esi] - mov edx,DWORD [12+esi] - bswap eax - bswap ebx - bswap ecx - bswap edx - mov DWORD [esp],eax - mov DWORD [4+esp],ebx - mov DWORD [8+esp],ecx - mov DWORD [12+esp],edx - mov eax,DWORD [16+esi] - mov ebx,DWORD [20+esi] - mov ecx,DWORD [24+esi] - mov edx,DWORD [28+esi] - bswap eax - bswap ebx - bswap ecx - bswap edx - mov DWORD [16+esp],eax - mov DWORD [20+esp],ebx - mov DWORD [24+esp],ecx - mov DWORD [28+esp],edx - mov eax,DWORD [32+esi] - mov ebx,DWORD [36+esi] - mov ecx,DWORD [40+esi] - mov edx,DWORD [44+esi] - bswap eax - bswap ebx - bswap ecx - bswap edx - mov DWORD [32+esp],eax - mov DWORD [36+esp],ebx - mov DWORD [40+esp],ecx - mov DWORD [44+esp],edx - mov eax,DWORD [48+esi] - mov ebx,DWORD [52+esi] - mov ecx,DWORD [56+esi] - mov edx,DWORD [60+esi] - bswap eax - bswap ebx - bswap ecx - bswap edx - mov DWORD [48+esp],eax - mov DWORD [52+esp],ebx - mov DWORD [56+esp],ecx - mov DWORD [60+esp],edx - mov DWORD [100+esp],esi - mov eax,DWORD [ebp] - mov ebx,DWORD [4+ebp] - mov ecx,DWORD [8+ebp] - mov edx,DWORD [12+ebp] - ; 00_15 0 - mov esi,ecx - mov ebp,eax - rol ebp,5 - xor esi,edx - add ebp,edi - mov edi,DWORD [esp] - and esi,ebx - ror ebx,2 - xor esi,edx - lea ebp,[1518500249+edi*1+ebp] - add ebp,esi - ; 00_15 1 - mov edi,ebx - mov esi,ebp - rol ebp,5 - xor edi,ecx - add ebp,edx - mov edx,DWORD [4+esp] - and edi,eax - ror eax,2 - xor edi,ecx - lea ebp,[1518500249+edx*1+ebp] - add ebp,edi - ; 00_15 2 - mov edx,eax - mov edi,ebp - rol ebp,5 - xor edx,ebx - add ebp,ecx - mov ecx,DWORD [8+esp] - and edx,esi - ror esi,2 - xor edx,ebx - lea ebp,[1518500249+ecx*1+ebp] - add ebp,edx - ; 00_15 3 - mov ecx,esi - mov edx,ebp - rol ebp,5 - xor ecx,eax - add ebp,ebx - mov ebx,DWORD [12+esp] - and ecx,edi - ror edi,2 - xor ecx,eax - lea ebp,[1518500249+ebx*1+ebp] - add ebp,ecx - ; 00_15 4 - mov ebx,edi - mov ecx,ebp - rol ebp,5 - xor ebx,esi - add ebp,eax - mov eax,DWORD [16+esp] - and ebx,edx - ror edx,2 - xor ebx,esi - lea ebp,[1518500249+eax*1+ebp] - add ebp,ebx - ; 00_15 5 - mov eax,edx - mov ebx,ebp - rol ebp,5 - xor eax,edi - add ebp,esi - mov esi,DWORD [20+esp] - and eax,ecx - ror ecx,2 - xor eax,edi - lea ebp,[1518500249+esi*1+ebp] - add ebp,eax - ; 00_15 6 - mov esi,ecx - mov eax,ebp - rol ebp,5 - xor esi,edx - add ebp,edi - mov edi,DWORD [24+esp] - and esi,ebx - ror ebx,2 - xor esi,edx - lea ebp,[1518500249+edi*1+ebp] - add ebp,esi - ; 00_15 7 - mov edi,ebx - mov esi,ebp - rol ebp,5 - xor edi,ecx - add ebp,edx - mov edx,DWORD [28+esp] - and edi,eax - ror eax,2 - xor edi,ecx - lea ebp,[1518500249+edx*1+ebp] - add ebp,edi - ; 00_15 8 - mov edx,eax - mov edi,ebp - rol ebp,5 - xor edx,ebx - add ebp,ecx - mov ecx,DWORD [32+esp] - and edx,esi - ror esi,2 - xor edx,ebx - lea ebp,[1518500249+ecx*1+ebp] - add ebp,edx - ; 00_15 9 - mov ecx,esi - mov edx,ebp - rol ebp,5 - xor ecx,eax - add ebp,ebx - mov ebx,DWORD [36+esp] - and ecx,edi - ror edi,2 - xor ecx,eax - lea ebp,[1518500249+ebx*1+ebp] - add ebp,ecx - ; 00_15 10 - mov ebx,edi - mov ecx,ebp - rol ebp,5 - xor ebx,esi - add ebp,eax - mov eax,DWORD [40+esp] - and ebx,edx - ror edx,2 - xor ebx,esi - lea ebp,[1518500249+eax*1+ebp] - add ebp,ebx - ; 00_15 11 - mov eax,edx - mov ebx,ebp - rol ebp,5 - xor eax,edi - add ebp,esi - mov esi,DWORD [44+esp] - and eax,ecx - ror ecx,2 - xor eax,edi - lea ebp,[1518500249+esi*1+ebp] - add ebp,eax - ; 00_15 12 - mov esi,ecx - mov eax,ebp - rol ebp,5 - xor esi,edx - add ebp,edi - mov edi,DWORD [48+esp] - and esi,ebx - ror ebx,2 - xor esi,edx - lea ebp,[1518500249+edi*1+ebp] - add ebp,esi - ; 00_15 13 - mov edi,ebx - mov esi,ebp - rol ebp,5 - xor edi,ecx - add ebp,edx - mov edx,DWORD [52+esp] - and edi,eax - ror eax,2 - xor edi,ecx - lea ebp,[1518500249+edx*1+ebp] - add ebp,edi - ; 00_15 14 - mov edx,eax - mov edi,ebp - rol ebp,5 - xor edx,ebx - add ebp,ecx - mov ecx,DWORD [56+esp] - and edx,esi - ror esi,2 - xor edx,ebx - lea ebp,[1518500249+ecx*1+ebp] - add ebp,edx - ; 00_15 15 - mov ecx,esi - mov edx,ebp - rol ebp,5 - xor ecx,eax - add ebp,ebx - mov ebx,DWORD [60+esp] - and ecx,edi - ror edi,2 - xor ecx,eax - lea ebp,[1518500249+ebx*1+ebp] - mov ebx,DWORD [esp] - add ecx,ebp - ; 16_19 16 - mov ebp,edi - xor ebx,DWORD [8+esp] - xor ebp,esi - xor ebx,DWORD [32+esp] - and ebp,edx - xor ebx,DWORD [52+esp] - rol ebx,1 - xor ebp,esi - add eax,ebp - mov ebp,ecx - ror edx,2 - mov DWORD [esp],ebx - rol ebp,5 - lea ebx,[1518500249+eax*1+ebx] - mov eax,DWORD [4+esp] - add ebx,ebp - ; 16_19 17 - mov ebp,edx - xor eax,DWORD [12+esp] - xor ebp,edi - xor eax,DWORD [36+esp] - and ebp,ecx - xor eax,DWORD [56+esp] - rol eax,1 - xor ebp,edi - add esi,ebp - mov ebp,ebx - ror ecx,2 - mov DWORD [4+esp],eax - rol ebp,5 - lea eax,[1518500249+esi*1+eax] - mov esi,DWORD [8+esp] - add eax,ebp - ; 16_19 18 - mov ebp,ecx - xor esi,DWORD [16+esp] - xor ebp,edx - xor esi,DWORD [40+esp] - and ebp,ebx - xor esi,DWORD [60+esp] - rol esi,1 - xor ebp,edx - add edi,ebp - mov ebp,eax - ror ebx,2 - mov DWORD [8+esp],esi - rol ebp,5 - lea esi,[1518500249+edi*1+esi] - mov edi,DWORD [12+esp] - add esi,ebp - ; 16_19 19 - mov ebp,ebx - xor edi,DWORD [20+esp] - xor ebp,ecx - xor edi,DWORD [44+esp] - and ebp,eax - xor edi,DWORD [esp] - rol edi,1 - xor ebp,ecx - add edx,ebp - mov ebp,esi - ror eax,2 - mov DWORD [12+esp],edi - rol ebp,5 - lea edi,[1518500249+edx*1+edi] - mov edx,DWORD [16+esp] - add edi,ebp - ; 20_39 20 - mov ebp,esi - xor edx,DWORD [24+esp] - xor ebp,eax - xor edx,DWORD [48+esp] - xor ebp,ebx - xor edx,DWORD [4+esp] - rol edx,1 - add ecx,ebp - ror esi,2 - mov ebp,edi - rol ebp,5 - mov DWORD [16+esp],edx - lea edx,[1859775393+ecx*1+edx] - mov ecx,DWORD [20+esp] - add edx,ebp - ; 20_39 21 - mov ebp,edi - xor ecx,DWORD [28+esp] - xor ebp,esi - xor ecx,DWORD [52+esp] - xor ebp,eax - xor ecx,DWORD [8+esp] - rol ecx,1 - add ebx,ebp - ror edi,2 - mov ebp,edx - rol ebp,5 - mov DWORD [20+esp],ecx - lea ecx,[1859775393+ebx*1+ecx] - mov ebx,DWORD [24+esp] - add ecx,ebp - ; 20_39 22 - mov ebp,edx - xor ebx,DWORD [32+esp] - xor ebp,edi - xor ebx,DWORD [56+esp] - xor ebp,esi - xor ebx,DWORD [12+esp] - rol ebx,1 - add eax,ebp - ror edx,2 - mov ebp,ecx - rol ebp,5 - mov DWORD [24+esp],ebx - lea ebx,[1859775393+eax*1+ebx] - mov eax,DWORD [28+esp] - add ebx,ebp - ; 20_39 23 - mov ebp,ecx - xor eax,DWORD [36+esp] - xor ebp,edx - xor eax,DWORD [60+esp] - xor ebp,edi - xor eax,DWORD [16+esp] - rol eax,1 - add esi,ebp - ror ecx,2 - mov ebp,ebx - rol ebp,5 - mov DWORD [28+esp],eax - lea eax,[1859775393+esi*1+eax] - mov esi,DWORD [32+esp] - add eax,ebp - ; 20_39 24 - mov ebp,ebx - xor esi,DWORD [40+esp] - xor ebp,ecx - xor esi,DWORD [esp] - xor ebp,edx - xor esi,DWORD [20+esp] - rol esi,1 - add edi,ebp - ror ebx,2 - mov ebp,eax - rol ebp,5 - mov DWORD [32+esp],esi - lea esi,[1859775393+edi*1+esi] - mov edi,DWORD [36+esp] - add esi,ebp - ; 20_39 25 - mov ebp,eax - xor edi,DWORD [44+esp] - xor ebp,ebx - xor edi,DWORD [4+esp] - xor ebp,ecx - xor edi,DWORD [24+esp] - rol edi,1 - add edx,ebp - ror eax,2 - mov ebp,esi - rol ebp,5 - mov DWORD [36+esp],edi - lea edi,[1859775393+edx*1+edi] - mov edx,DWORD [40+esp] - add edi,ebp - ; 20_39 26 - mov ebp,esi - xor edx,DWORD [48+esp] - xor ebp,eax - xor edx,DWORD [8+esp] - xor ebp,ebx - xor edx,DWORD [28+esp] - rol edx,1 - add ecx,ebp - ror esi,2 - mov ebp,edi - rol ebp,5 - mov DWORD [40+esp],edx - lea edx,[1859775393+ecx*1+edx] - mov ecx,DWORD [44+esp] - add edx,ebp - ; 20_39 27 - mov ebp,edi - xor ecx,DWORD [52+esp] - xor ebp,esi - xor ecx,DWORD [12+esp] - xor ebp,eax - xor ecx,DWORD [32+esp] - rol ecx,1 - add ebx,ebp - ror edi,2 - mov ebp,edx - rol ebp,5 - mov DWORD [44+esp],ecx - lea ecx,[1859775393+ebx*1+ecx] - mov ebx,DWORD [48+esp] - add ecx,ebp - ; 20_39 28 - mov ebp,edx - xor ebx,DWORD [56+esp] - xor ebp,edi - xor ebx,DWORD [16+esp] - xor ebp,esi - xor ebx,DWORD [36+esp] - rol ebx,1 - add eax,ebp - ror edx,2 - mov ebp,ecx - rol ebp,5 - mov DWORD [48+esp],ebx - lea ebx,[1859775393+eax*1+ebx] - mov eax,DWORD [52+esp] - add ebx,ebp - ; 20_39 29 - mov ebp,ecx - xor eax,DWORD [60+esp] - xor ebp,edx - xor eax,DWORD [20+esp] - xor ebp,edi - xor eax,DWORD [40+esp] - rol eax,1 - add esi,ebp - ror ecx,2 - mov ebp,ebx - rol ebp,5 - mov DWORD [52+esp],eax - lea eax,[1859775393+esi*1+eax] - mov esi,DWORD [56+esp] - add eax,ebp - ; 20_39 30 - mov ebp,ebx - xor esi,DWORD [esp] - xor ebp,ecx - xor esi,DWORD [24+esp] - xor ebp,edx - xor esi,DWORD [44+esp] - rol esi,1 - add edi,ebp - ror ebx,2 - mov ebp,eax - rol ebp,5 - mov DWORD [56+esp],esi - lea esi,[1859775393+edi*1+esi] - mov edi,DWORD [60+esp] - add esi,ebp - ; 20_39 31 - mov ebp,eax - xor edi,DWORD [4+esp] - xor ebp,ebx - xor edi,DWORD [28+esp] - xor ebp,ecx - xor edi,DWORD [48+esp] - rol edi,1 - add edx,ebp - ror eax,2 - mov ebp,esi - rol ebp,5 - mov DWORD [60+esp],edi - lea edi,[1859775393+edx*1+edi] - mov edx,DWORD [esp] - add edi,ebp - ; 20_39 32 - mov ebp,esi - xor edx,DWORD [8+esp] - xor ebp,eax - xor edx,DWORD [32+esp] - xor ebp,ebx - xor edx,DWORD [52+esp] - rol edx,1 - add ecx,ebp - ror esi,2 - mov ebp,edi - rol ebp,5 - mov DWORD [esp],edx - lea edx,[1859775393+ecx*1+edx] - mov ecx,DWORD [4+esp] - add edx,ebp - ; 20_39 33 - mov ebp,edi - xor ecx,DWORD [12+esp] - xor ebp,esi - xor ecx,DWORD [36+esp] - xor ebp,eax - xor ecx,DWORD [56+esp] - rol ecx,1 - add ebx,ebp - ror edi,2 - mov ebp,edx - rol ebp,5 - mov DWORD [4+esp],ecx - lea ecx,[1859775393+ebx*1+ecx] - mov ebx,DWORD [8+esp] - add ecx,ebp - ; 20_39 34 - mov ebp,edx - xor ebx,DWORD [16+esp] - xor ebp,edi - xor ebx,DWORD [40+esp] - xor ebp,esi - xor ebx,DWORD [60+esp] - rol ebx,1 - add eax,ebp - ror edx,2 - mov ebp,ecx - rol ebp,5 - mov DWORD [8+esp],ebx - lea ebx,[1859775393+eax*1+ebx] - mov eax,DWORD [12+esp] - add ebx,ebp - ; 20_39 35 - mov ebp,ecx - xor eax,DWORD [20+esp] - xor ebp,edx - xor eax,DWORD [44+esp] - xor ebp,edi - xor eax,DWORD [esp] - rol eax,1 - add esi,ebp - ror ecx,2 - mov ebp,ebx - rol ebp,5 - mov DWORD [12+esp],eax - lea eax,[1859775393+esi*1+eax] - mov esi,DWORD [16+esp] - add eax,ebp - ; 20_39 36 - mov ebp,ebx - xor esi,DWORD [24+esp] - xor ebp,ecx - xor esi,DWORD [48+esp] - xor ebp,edx - xor esi,DWORD [4+esp] - rol esi,1 - add edi,ebp - ror ebx,2 - mov ebp,eax - rol ebp,5 - mov DWORD [16+esp],esi - lea esi,[1859775393+edi*1+esi] - mov edi,DWORD [20+esp] - add esi,ebp - ; 20_39 37 - mov ebp,eax - xor edi,DWORD [28+esp] - xor ebp,ebx - xor edi,DWORD [52+esp] - xor ebp,ecx - xor edi,DWORD [8+esp] - rol edi,1 - add edx,ebp - ror eax,2 - mov ebp,esi - rol ebp,5 - mov DWORD [20+esp],edi - lea edi,[1859775393+edx*1+edi] - mov edx,DWORD [24+esp] - add edi,ebp - ; 20_39 38 - mov ebp,esi - xor edx,DWORD [32+esp] - xor ebp,eax - xor edx,DWORD [56+esp] - xor ebp,ebx - xor edx,DWORD [12+esp] - rol edx,1 - add ecx,ebp - ror esi,2 - mov ebp,edi - rol ebp,5 - mov DWORD [24+esp],edx - lea edx,[1859775393+ecx*1+edx] - mov ecx,DWORD [28+esp] - add edx,ebp - ; 20_39 39 - mov ebp,edi - xor ecx,DWORD [36+esp] - xor ebp,esi - xor ecx,DWORD [60+esp] - xor ebp,eax - xor ecx,DWORD [16+esp] - rol ecx,1 - add ebx,ebp - ror edi,2 - mov ebp,edx - rol ebp,5 - mov DWORD [28+esp],ecx - lea ecx,[1859775393+ebx*1+ecx] - mov ebx,DWORD [32+esp] - add ecx,ebp - ; 40_59 40 - mov ebp,edi - xor ebx,DWORD [40+esp] - xor ebp,esi - xor ebx,DWORD [esp] - and ebp,edx - xor ebx,DWORD [20+esp] - rol ebx,1 - add ebp,eax - ror edx,2 - mov eax,ecx - rol eax,5 - mov DWORD [32+esp],ebx - lea ebx,[2400959708+ebp*1+ebx] - mov ebp,edi - add ebx,eax - and ebp,esi - mov eax,DWORD [36+esp] - add ebx,ebp - ; 40_59 41 - mov ebp,edx - xor eax,DWORD [44+esp] - xor ebp,edi - xor eax,DWORD [4+esp] - and ebp,ecx - xor eax,DWORD [24+esp] - rol eax,1 - add ebp,esi - ror ecx,2 - mov esi,ebx - rol esi,5 - mov DWORD [36+esp],eax - lea eax,[2400959708+ebp*1+eax] - mov ebp,edx - add eax,esi - and ebp,edi - mov esi,DWORD [40+esp] - add eax,ebp - ; 40_59 42 - mov ebp,ecx - xor esi,DWORD [48+esp] - xor ebp,edx - xor esi,DWORD [8+esp] - and ebp,ebx - xor esi,DWORD [28+esp] - rol esi,1 - add ebp,edi - ror ebx,2 - mov edi,eax - rol edi,5 - mov DWORD [40+esp],esi - lea esi,[2400959708+ebp*1+esi] - mov ebp,ecx - add esi,edi - and ebp,edx - mov edi,DWORD [44+esp] - add esi,ebp - ; 40_59 43 - mov ebp,ebx - xor edi,DWORD [52+esp] - xor ebp,ecx - xor edi,DWORD [12+esp] - and ebp,eax - xor edi,DWORD [32+esp] - rol edi,1 - add ebp,edx - ror eax,2 - mov edx,esi - rol edx,5 - mov DWORD [44+esp],edi - lea edi,[2400959708+ebp*1+edi] - mov ebp,ebx - add edi,edx - and ebp,ecx - mov edx,DWORD [48+esp] - add edi,ebp - ; 40_59 44 - mov ebp,eax - xor edx,DWORD [56+esp] - xor ebp,ebx - xor edx,DWORD [16+esp] - and ebp,esi - xor edx,DWORD [36+esp] - rol edx,1 - add ebp,ecx - ror esi,2 - mov ecx,edi - rol ecx,5 - mov DWORD [48+esp],edx - lea edx,[2400959708+ebp*1+edx] - mov ebp,eax - add edx,ecx - and ebp,ebx - mov ecx,DWORD [52+esp] - add edx,ebp - ; 40_59 45 - mov ebp,esi - xor ecx,DWORD [60+esp] - xor ebp,eax - xor ecx,DWORD [20+esp] - and ebp,edi - xor ecx,DWORD [40+esp] - rol ecx,1 - add ebp,ebx - ror edi,2 - mov ebx,edx - rol ebx,5 - mov DWORD [52+esp],ecx - lea ecx,[2400959708+ebp*1+ecx] - mov ebp,esi - add ecx,ebx - and ebp,eax - mov ebx,DWORD [56+esp] - add ecx,ebp - ; 40_59 46 - mov ebp,edi - xor ebx,DWORD [esp] - xor ebp,esi - xor ebx,DWORD [24+esp] - and ebp,edx - xor ebx,DWORD [44+esp] - rol ebx,1 - add ebp,eax - ror edx,2 - mov eax,ecx - rol eax,5 - mov DWORD [56+esp],ebx - lea ebx,[2400959708+ebp*1+ebx] - mov ebp,edi - add ebx,eax - and ebp,esi - mov eax,DWORD [60+esp] - add ebx,ebp - ; 40_59 47 - mov ebp,edx - xor eax,DWORD [4+esp] - xor ebp,edi - xor eax,DWORD [28+esp] - and ebp,ecx - xor eax,DWORD [48+esp] - rol eax,1 - add ebp,esi - ror ecx,2 - mov esi,ebx - rol esi,5 - mov DWORD [60+esp],eax - lea eax,[2400959708+ebp*1+eax] - mov ebp,edx - add eax,esi - and ebp,edi - mov esi,DWORD [esp] - add eax,ebp - ; 40_59 48 - mov ebp,ecx - xor esi,DWORD [8+esp] - xor ebp,edx - xor esi,DWORD [32+esp] - and ebp,ebx - xor esi,DWORD [52+esp] - rol esi,1 - add ebp,edi - ror ebx,2 - mov edi,eax - rol edi,5 - mov DWORD [esp],esi - lea esi,[2400959708+ebp*1+esi] - mov ebp,ecx - add esi,edi - and ebp,edx - mov edi,DWORD [4+esp] - add esi,ebp - ; 40_59 49 - mov ebp,ebx - xor edi,DWORD [12+esp] - xor ebp,ecx - xor edi,DWORD [36+esp] - and ebp,eax - xor edi,DWORD [56+esp] - rol edi,1 - add ebp,edx - ror eax,2 - mov edx,esi - rol edx,5 - mov DWORD [4+esp],edi - lea edi,[2400959708+ebp*1+edi] - mov ebp,ebx - add edi,edx - and ebp,ecx - mov edx,DWORD [8+esp] - add edi,ebp - ; 40_59 50 - mov ebp,eax - xor edx,DWORD [16+esp] - xor ebp,ebx - xor edx,DWORD [40+esp] - and ebp,esi - xor edx,DWORD [60+esp] - rol edx,1 - add ebp,ecx - ror esi,2 - mov ecx,edi - rol ecx,5 - mov DWORD [8+esp],edx - lea edx,[2400959708+ebp*1+edx] - mov ebp,eax - add edx,ecx - and ebp,ebx - mov ecx,DWORD [12+esp] - add edx,ebp - ; 40_59 51 - mov ebp,esi - xor ecx,DWORD [20+esp] - xor ebp,eax - xor ecx,DWORD [44+esp] - and ebp,edi - xor ecx,DWORD [esp] - rol ecx,1 - add ebp,ebx - ror edi,2 - mov ebx,edx - rol ebx,5 - mov DWORD [12+esp],ecx - lea ecx,[2400959708+ebp*1+ecx] - mov ebp,esi - add ecx,ebx - and ebp,eax - mov ebx,DWORD [16+esp] - add ecx,ebp - ; 40_59 52 - mov ebp,edi - xor ebx,DWORD [24+esp] - xor ebp,esi - xor ebx,DWORD [48+esp] - and ebp,edx - xor ebx,DWORD [4+esp] - rol ebx,1 - add ebp,eax - ror edx,2 - mov eax,ecx - rol eax,5 - mov DWORD [16+esp],ebx - lea ebx,[2400959708+ebp*1+ebx] - mov ebp,edi - add ebx,eax - and ebp,esi - mov eax,DWORD [20+esp] - add ebx,ebp - ; 40_59 53 - mov ebp,edx - xor eax,DWORD [28+esp] - xor ebp,edi - xor eax,DWORD [52+esp] - and ebp,ecx - xor eax,DWORD [8+esp] - rol eax,1 - add ebp,esi - ror ecx,2 - mov esi,ebx - rol esi,5 - mov DWORD [20+esp],eax - lea eax,[2400959708+ebp*1+eax] - mov ebp,edx - add eax,esi - and ebp,edi - mov esi,DWORD [24+esp] - add eax,ebp - ; 40_59 54 - mov ebp,ecx - xor esi,DWORD [32+esp] - xor ebp,edx - xor esi,DWORD [56+esp] - and ebp,ebx - xor esi,DWORD [12+esp] - rol esi,1 - add ebp,edi - ror ebx,2 - mov edi,eax - rol edi,5 - mov DWORD [24+esp],esi - lea esi,[2400959708+ebp*1+esi] - mov ebp,ecx - add esi,edi - and ebp,edx - mov edi,DWORD [28+esp] - add esi,ebp - ; 40_59 55 - mov ebp,ebx - xor edi,DWORD [36+esp] - xor ebp,ecx - xor edi,DWORD [60+esp] - and ebp,eax - xor edi,DWORD [16+esp] - rol edi,1 - add ebp,edx - ror eax,2 - mov edx,esi - rol edx,5 - mov DWORD [28+esp],edi - lea edi,[2400959708+ebp*1+edi] - mov ebp,ebx - add edi,edx - and ebp,ecx - mov edx,DWORD [32+esp] - add edi,ebp - ; 40_59 56 - mov ebp,eax - xor edx,DWORD [40+esp] - xor ebp,ebx - xor edx,DWORD [esp] - and ebp,esi - xor edx,DWORD [20+esp] - rol edx,1 - add ebp,ecx - ror esi,2 - mov ecx,edi - rol ecx,5 - mov DWORD [32+esp],edx - lea edx,[2400959708+ebp*1+edx] - mov ebp,eax - add edx,ecx - and ebp,ebx - mov ecx,DWORD [36+esp] - add edx,ebp - ; 40_59 57 - mov ebp,esi - xor ecx,DWORD [44+esp] - xor ebp,eax - xor ecx,DWORD [4+esp] - and ebp,edi - xor ecx,DWORD [24+esp] - rol ecx,1 - add ebp,ebx - ror edi,2 - mov ebx,edx - rol ebx,5 - mov DWORD [36+esp],ecx - lea ecx,[2400959708+ebp*1+ecx] - mov ebp,esi - add ecx,ebx - and ebp,eax - mov ebx,DWORD [40+esp] - add ecx,ebp - ; 40_59 58 - mov ebp,edi - xor ebx,DWORD [48+esp] - xor ebp,esi - xor ebx,DWORD [8+esp] - and ebp,edx - xor ebx,DWORD [28+esp] - rol ebx,1 - add ebp,eax - ror edx,2 - mov eax,ecx - rol eax,5 - mov DWORD [40+esp],ebx - lea ebx,[2400959708+ebp*1+ebx] - mov ebp,edi - add ebx,eax - and ebp,esi - mov eax,DWORD [44+esp] - add ebx,ebp - ; 40_59 59 - mov ebp,edx - xor eax,DWORD [52+esp] - xor ebp,edi - xor eax,DWORD [12+esp] - and ebp,ecx - xor eax,DWORD [32+esp] - rol eax,1 - add ebp,esi - ror ecx,2 - mov esi,ebx - rol esi,5 - mov DWORD [44+esp],eax - lea eax,[2400959708+ebp*1+eax] - mov ebp,edx - add eax,esi - and ebp,edi - mov esi,DWORD [48+esp] - add eax,ebp - ; 20_39 60 - mov ebp,ebx - xor esi,DWORD [56+esp] - xor ebp,ecx - xor esi,DWORD [16+esp] - xor ebp,edx - xor esi,DWORD [36+esp] - rol esi,1 - add edi,ebp - ror ebx,2 - mov ebp,eax - rol ebp,5 - mov DWORD [48+esp],esi - lea esi,[3395469782+edi*1+esi] - mov edi,DWORD [52+esp] - add esi,ebp - ; 20_39 61 - mov ebp,eax - xor edi,DWORD [60+esp] - xor ebp,ebx - xor edi,DWORD [20+esp] - xor ebp,ecx - xor edi,DWORD [40+esp] - rol edi,1 - add edx,ebp - ror eax,2 - mov ebp,esi - rol ebp,5 - mov DWORD [52+esp],edi - lea edi,[3395469782+edx*1+edi] - mov edx,DWORD [56+esp] - add edi,ebp - ; 20_39 62 - mov ebp,esi - xor edx,DWORD [esp] - xor ebp,eax - xor edx,DWORD [24+esp] - xor ebp,ebx - xor edx,DWORD [44+esp] - rol edx,1 - add ecx,ebp - ror esi,2 - mov ebp,edi - rol ebp,5 - mov DWORD [56+esp],edx - lea edx,[3395469782+ecx*1+edx] - mov ecx,DWORD [60+esp] - add edx,ebp - ; 20_39 63 - mov ebp,edi - xor ecx,DWORD [4+esp] - xor ebp,esi - xor ecx,DWORD [28+esp] - xor ebp,eax - xor ecx,DWORD [48+esp] - rol ecx,1 - add ebx,ebp - ror edi,2 - mov ebp,edx - rol ebp,5 - mov DWORD [60+esp],ecx - lea ecx,[3395469782+ebx*1+ecx] - mov ebx,DWORD [esp] - add ecx,ebp - ; 20_39 64 - mov ebp,edx - xor ebx,DWORD [8+esp] - xor ebp,edi - xor ebx,DWORD [32+esp] - xor ebp,esi - xor ebx,DWORD [52+esp] - rol ebx,1 - add eax,ebp - ror edx,2 - mov ebp,ecx - rol ebp,5 - mov DWORD [esp],ebx - lea ebx,[3395469782+eax*1+ebx] - mov eax,DWORD [4+esp] - add ebx,ebp - ; 20_39 65 - mov ebp,ecx - xor eax,DWORD [12+esp] - xor ebp,edx - xor eax,DWORD [36+esp] - xor ebp,edi - xor eax,DWORD [56+esp] - rol eax,1 - add esi,ebp - ror ecx,2 - mov ebp,ebx - rol ebp,5 - mov DWORD [4+esp],eax - lea eax,[3395469782+esi*1+eax] - mov esi,DWORD [8+esp] - add eax,ebp - ; 20_39 66 - mov ebp,ebx - xor esi,DWORD [16+esp] - xor ebp,ecx - xor esi,DWORD [40+esp] - xor ebp,edx - xor esi,DWORD [60+esp] - rol esi,1 - add edi,ebp - ror ebx,2 - mov ebp,eax - rol ebp,5 - mov DWORD [8+esp],esi - lea esi,[3395469782+edi*1+esi] - mov edi,DWORD [12+esp] - add esi,ebp - ; 20_39 67 - mov ebp,eax - xor edi,DWORD [20+esp] - xor ebp,ebx - xor edi,DWORD [44+esp] - xor ebp,ecx - xor edi,DWORD [esp] - rol edi,1 - add edx,ebp - ror eax,2 - mov ebp,esi - rol ebp,5 - mov DWORD [12+esp],edi - lea edi,[3395469782+edx*1+edi] - mov edx,DWORD [16+esp] - add edi,ebp - ; 20_39 68 - mov ebp,esi - xor edx,DWORD [24+esp] - xor ebp,eax - xor edx,DWORD [48+esp] - xor ebp,ebx - xor edx,DWORD [4+esp] - rol edx,1 - add ecx,ebp - ror esi,2 - mov ebp,edi - rol ebp,5 - mov DWORD [16+esp],edx - lea edx,[3395469782+ecx*1+edx] - mov ecx,DWORD [20+esp] - add edx,ebp - ; 20_39 69 - mov ebp,edi - xor ecx,DWORD [28+esp] - xor ebp,esi - xor ecx,DWORD [52+esp] - xor ebp,eax - xor ecx,DWORD [8+esp] - rol ecx,1 - add ebx,ebp - ror edi,2 - mov ebp,edx - rol ebp,5 - mov DWORD [20+esp],ecx - lea ecx,[3395469782+ebx*1+ecx] - mov ebx,DWORD [24+esp] - add ecx,ebp - ; 20_39 70 - mov ebp,edx - xor ebx,DWORD [32+esp] - xor ebp,edi - xor ebx,DWORD [56+esp] - xor ebp,esi - xor ebx,DWORD [12+esp] - rol ebx,1 - add eax,ebp - ror edx,2 - mov ebp,ecx - rol ebp,5 - mov DWORD [24+esp],ebx - lea ebx,[3395469782+eax*1+ebx] - mov eax,DWORD [28+esp] - add ebx,ebp - ; 20_39 71 - mov ebp,ecx - xor eax,DWORD [36+esp] - xor ebp,edx - xor eax,DWORD [60+esp] - xor ebp,edi - xor eax,DWORD [16+esp] - rol eax,1 - add esi,ebp - ror ecx,2 - mov ebp,ebx - rol ebp,5 - mov DWORD [28+esp],eax - lea eax,[3395469782+esi*1+eax] - mov esi,DWORD [32+esp] - add eax,ebp - ; 20_39 72 - mov ebp,ebx - xor esi,DWORD [40+esp] - xor ebp,ecx - xor esi,DWORD [esp] - xor ebp,edx - xor esi,DWORD [20+esp] - rol esi,1 - add edi,ebp - ror ebx,2 - mov ebp,eax - rol ebp,5 - mov DWORD [32+esp],esi - lea esi,[3395469782+edi*1+esi] - mov edi,DWORD [36+esp] - add esi,ebp - ; 20_39 73 - mov ebp,eax - xor edi,DWORD [44+esp] - xor ebp,ebx - xor edi,DWORD [4+esp] - xor ebp,ecx - xor edi,DWORD [24+esp] - rol edi,1 - add edx,ebp - ror eax,2 - mov ebp,esi - rol ebp,5 - mov DWORD [36+esp],edi - lea edi,[3395469782+edx*1+edi] - mov edx,DWORD [40+esp] - add edi,ebp - ; 20_39 74 - mov ebp,esi - xor edx,DWORD [48+esp] - xor ebp,eax - xor edx,DWORD [8+esp] - xor ebp,ebx - xor edx,DWORD [28+esp] - rol edx,1 - add ecx,ebp - ror esi,2 - mov ebp,edi - rol ebp,5 - mov DWORD [40+esp],edx - lea edx,[3395469782+ecx*1+edx] - mov ecx,DWORD [44+esp] - add edx,ebp - ; 20_39 75 - mov ebp,edi - xor ecx,DWORD [52+esp] - xor ebp,esi - xor ecx,DWORD [12+esp] - xor ebp,eax - xor ecx,DWORD [32+esp] - rol ecx,1 - add ebx,ebp - ror edi,2 - mov ebp,edx - rol ebp,5 - mov DWORD [44+esp],ecx - lea ecx,[3395469782+ebx*1+ecx] - mov ebx,DWORD [48+esp] - add ecx,ebp - ; 20_39 76 - mov ebp,edx - xor ebx,DWORD [56+esp] - xor ebp,edi - xor ebx,DWORD [16+esp] - xor ebp,esi - xor ebx,DWORD [36+esp] - rol ebx,1 - add eax,ebp - ror edx,2 - mov ebp,ecx - rol ebp,5 - mov DWORD [48+esp],ebx - lea ebx,[3395469782+eax*1+ebx] - mov eax,DWORD [52+esp] - add ebx,ebp - ; 20_39 77 - mov ebp,ecx - xor eax,DWORD [60+esp] - xor ebp,edx - xor eax,DWORD [20+esp] - xor ebp,edi - xor eax,DWORD [40+esp] - rol eax,1 - add esi,ebp - ror ecx,2 - mov ebp,ebx - rol ebp,5 - lea eax,[3395469782+esi*1+eax] - mov esi,DWORD [56+esp] - add eax,ebp - ; 20_39 78 - mov ebp,ebx - xor esi,DWORD [esp] - xor ebp,ecx - xor esi,DWORD [24+esp] - xor ebp,edx - xor esi,DWORD [44+esp] - rol esi,1 - add edi,ebp - ror ebx,2 - mov ebp,eax - rol ebp,5 - lea esi,[3395469782+edi*1+esi] - mov edi,DWORD [60+esp] - add esi,ebp - ; 20_39 79 - mov ebp,eax - xor edi,DWORD [4+esp] - xor ebp,ebx - xor edi,DWORD [28+esp] - xor ebp,ecx - xor edi,DWORD [48+esp] - rol edi,1 - add edx,ebp - ror eax,2 - mov ebp,esi - rol ebp,5 - lea edi,[3395469782+edx*1+edi] - add edi,ebp - mov ebp,DWORD [96+esp] - mov edx,DWORD [100+esp] - add edi,DWORD [ebp] - add esi,DWORD [4+ebp] - add eax,DWORD [8+ebp] - add ebx,DWORD [12+ebp] - add ecx,DWORD [16+ebp] - mov DWORD [ebp],edi - add edx,64 - mov DWORD [4+ebp],esi - cmp edx,DWORD [104+esp] - mov DWORD [8+ebp],eax - mov edi,ecx - mov DWORD [12+ebp],ebx - mov esi,edx - mov DWORD [16+ebp],ecx - jb NEAR L$002loop - add esp,76 - pop edi - pop esi - pop ebx - pop ebp - ret -align 16 -__sha1_block_data_order_shaext: - push ebp - push ebx - push esi - push edi - call L$003pic_point -L$003pic_point: - pop ebp - lea ebp,[(L$K_XX_XX-L$003pic_point)+ebp] -L$shaext_shortcut: - mov edi,DWORD [20+esp] - mov ebx,esp - mov esi,DWORD [24+esp] - mov ecx,DWORD [28+esp] - sub esp,32 - movdqu xmm0,[edi] - movd xmm1,DWORD [16+edi] - and esp,-32 - movdqa xmm3,[80+ebp] - movdqu xmm4,[esi] - pshufd xmm0,xmm0,27 - movdqu xmm5,[16+esi] - pshufd xmm1,xmm1,27 - movdqu xmm6,[32+esi] -db 102,15,56,0,227 - movdqu xmm7,[48+esi] -db 102,15,56,0,235 -db 102,15,56,0,243 -db 102,15,56,0,251 - jmp NEAR L$004loop_shaext -align 16 -L$004loop_shaext: - dec ecx - lea eax,[64+esi] - movdqa [esp],xmm1 - paddd xmm1,xmm4 - cmovne esi,eax - movdqa [16+esp],xmm0 -db 15,56,201,229 - movdqa xmm2,xmm0 -db 15,58,204,193,0 -db 15,56,200,213 - pxor xmm4,xmm6 -db 15,56,201,238 -db 15,56,202,231 - movdqa xmm1,xmm0 -db 15,58,204,194,0 -db 15,56,200,206 - pxor xmm5,xmm7 -db 15,56,202,236 -db 15,56,201,247 - movdqa xmm2,xmm0 -db 15,58,204,193,0 -db 15,56,200,215 - pxor xmm6,xmm4 -db 15,56,201,252 -db 15,56,202,245 - movdqa xmm1,xmm0 -db 15,58,204,194,0 -db 15,56,200,204 - pxor xmm7,xmm5 -db 15,56,202,254 -db 15,56,201,229 - movdqa xmm2,xmm0 -db 15,58,204,193,0 -db 15,56,200,213 - pxor xmm4,xmm6 -db 15,56,201,238 -db 15,56,202,231 - movdqa xmm1,xmm0 -db 15,58,204,194,1 -db 15,56,200,206 - pxor xmm5,xmm7 -db 15,56,202,236 -db 15,56,201,247 - movdqa xmm2,xmm0 -db 15,58,204,193,1 -db 15,56,200,215 - pxor xmm6,xmm4 -db 15,56,201,252 -db 15,56,202,245 - movdqa xmm1,xmm0 -db 15,58,204,194,1 -db 15,56,200,204 - pxor xmm7,xmm5 -db 15,56,202,254 -db 15,56,201,229 - movdqa xmm2,xmm0 -db 15,58,204,193,1 -db 15,56,200,213 - pxor xmm4,xmm6 -db 15,56,201,238 -db 15,56,202,231 - movdqa xmm1,xmm0 -db 15,58,204,194,1 -db 15,56,200,206 - pxor xmm5,xmm7 -db 15,56,202,236 -db 15,56,201,247 - movdqa xmm2,xmm0 -db 15,58,204,193,2 -db 15,56,200,215 - pxor xmm6,xmm4 -db 15,56,201,252 -db 15,56,202,245 - movdqa xmm1,xmm0 -db 15,58,204,194,2 -db 15,56,200,204 - pxor xmm7,xmm5 -db 15,56,202,254 -db 15,56,201,229 - movdqa xmm2,xmm0 -db 15,58,204,193,2 -db 15,56,200,213 - pxor xmm4,xmm6 -db 15,56,201,238 -db 15,56,202,231 - movdqa xmm1,xmm0 -db 15,58,204,194,2 -db 15,56,200,206 - pxor xmm5,xmm7 -db 15,56,202,236 -db 15,56,201,247 - movdqa xmm2,xmm0 -db 15,58,204,193,2 -db 15,56,200,215 - pxor xmm6,xmm4 -db 15,56,201,252 -db 15,56,202,245 - movdqa xmm1,xmm0 -db 15,58,204,194,3 -db 15,56,200,204 - pxor xmm7,xmm5 -db 15,56,202,254 - movdqu xmm4,[esi] - movdqa xmm2,xmm0 -db 15,58,204,193,3 -db 15,56,200,213 - movdqu xmm5,[16+esi] -db 102,15,56,0,227 - movdqa xmm1,xmm0 -db 15,58,204,194,3 -db 15,56,200,206 - movdqu xmm6,[32+esi] -db 102,15,56,0,235 - movdqa xmm2,xmm0 -db 15,58,204,193,3 -db 15,56,200,215 - movdqu xmm7,[48+esi] -db 102,15,56,0,243 - movdqa xmm1,xmm0 -db 15,58,204,194,3 - movdqa xmm2,[esp] -db 102,15,56,0,251 -db 15,56,200,202 - paddd xmm0,[16+esp] - jnz NEAR L$004loop_shaext - pshufd xmm0,xmm0,27 - pshufd xmm1,xmm1,27 - movdqu [edi],xmm0 - movd DWORD [16+edi],xmm1 - mov esp,ebx - pop edi - pop esi - pop ebx - pop ebp - ret -align 16 -__sha1_block_data_order_ssse3: - push ebp - push ebx - push esi - push edi - call L$005pic_point -L$005pic_point: - pop ebp - lea ebp,[(L$K_XX_XX-L$005pic_point)+ebp] -L$ssse3_shortcut: - movdqa xmm7,[ebp] - movdqa xmm0,[16+ebp] - movdqa xmm1,[32+ebp] - movdqa xmm2,[48+ebp] - movdqa xmm6,[64+ebp] - mov edi,DWORD [20+esp] - mov ebp,DWORD [24+esp] - mov edx,DWORD [28+esp] - mov esi,esp - sub esp,208 - and esp,-64 - movdqa [112+esp],xmm0 - movdqa [128+esp],xmm1 - movdqa [144+esp],xmm2 - shl edx,6 - movdqa [160+esp],xmm7 - add edx,ebp - movdqa [176+esp],xmm6 - add ebp,64 - mov DWORD [192+esp],edi - mov DWORD [196+esp],ebp - mov DWORD [200+esp],edx - mov DWORD [204+esp],esi - mov eax,DWORD [edi] - mov ebx,DWORD [4+edi] - mov ecx,DWORD [8+edi] - mov edx,DWORD [12+edi] - mov edi,DWORD [16+edi] - mov esi,ebx - movdqu xmm0,[ebp-64] - movdqu xmm1,[ebp-48] - movdqu xmm2,[ebp-32] - movdqu xmm3,[ebp-16] -db 102,15,56,0,198 -db 102,15,56,0,206 -db 102,15,56,0,214 - movdqa [96+esp],xmm7 -db 102,15,56,0,222 - paddd xmm0,xmm7 - paddd xmm1,xmm7 - paddd xmm2,xmm7 - movdqa [esp],xmm0 - psubd xmm0,xmm7 - movdqa [16+esp],xmm1 - psubd xmm1,xmm7 - movdqa [32+esp],xmm2 - mov ebp,ecx - psubd xmm2,xmm7 - xor ebp,edx - pshufd xmm4,xmm0,238 - and esi,ebp - jmp NEAR L$006loop -align 16 -L$006loop: - ror ebx,2 - xor esi,edx - mov ebp,eax - punpcklqdq xmm4,xmm1 - movdqa xmm6,xmm3 - add edi,DWORD [esp] - xor ebx,ecx - paddd xmm7,xmm3 - movdqa [64+esp],xmm0 - rol eax,5 - add edi,esi - psrldq xmm6,4 - and ebp,ebx - xor ebx,ecx - pxor xmm4,xmm0 - add edi,eax - ror eax,7 - pxor xmm6,xmm2 - xor ebp,ecx - mov esi,edi - add edx,DWORD [4+esp] - pxor xmm4,xmm6 - xor eax,ebx - rol edi,5 - movdqa [48+esp],xmm7 - add edx,ebp - and esi,eax - movdqa xmm0,xmm4 - xor eax,ebx - add edx,edi - ror edi,7 - movdqa xmm6,xmm4 - xor esi,ebx - pslldq xmm0,12 - paddd xmm4,xmm4 - mov ebp,edx - add ecx,DWORD [8+esp] - psrld xmm6,31 - xor edi,eax - rol edx,5 - movdqa xmm7,xmm0 - add ecx,esi - and ebp,edi - xor edi,eax - psrld xmm0,30 - add ecx,edx - ror edx,7 - por xmm4,xmm6 - xor ebp,eax - mov esi,ecx - add ebx,DWORD [12+esp] - pslld xmm7,2 - xor edx,edi - rol ecx,5 - pxor xmm4,xmm0 - movdqa xmm0,[96+esp] - add ebx,ebp - and esi,edx - pxor xmm4,xmm7 - pshufd xmm5,xmm1,238 - xor edx,edi - add ebx,ecx - ror ecx,7 - xor esi,edi - mov ebp,ebx - punpcklqdq xmm5,xmm2 - movdqa xmm7,xmm4 - add eax,DWORD [16+esp] - xor ecx,edx - paddd xmm0,xmm4 - movdqa [80+esp],xmm1 - rol ebx,5 - add eax,esi - psrldq xmm7,4 - and ebp,ecx - xor ecx,edx - pxor xmm5,xmm1 - add eax,ebx - ror ebx,7 - pxor xmm7,xmm3 - xor ebp,edx - mov esi,eax - add edi,DWORD [20+esp] - pxor xmm5,xmm7 - xor ebx,ecx - rol eax,5 - movdqa [esp],xmm0 - add edi,ebp - and esi,ebx - movdqa xmm1,xmm5 - xor ebx,ecx - add edi,eax - ror eax,7 - movdqa xmm7,xmm5 - xor esi,ecx - pslldq xmm1,12 - paddd xmm5,xmm5 - mov ebp,edi - add edx,DWORD [24+esp] - psrld xmm7,31 - xor eax,ebx - rol edi,5 - movdqa xmm0,xmm1 - add edx,esi - and ebp,eax - xor eax,ebx - psrld xmm1,30 - add edx,edi - ror edi,7 - por xmm5,xmm7 - xor ebp,ebx - mov esi,edx - add ecx,DWORD [28+esp] - pslld xmm0,2 - xor edi,eax - rol edx,5 - pxor xmm5,xmm1 - movdqa xmm1,[112+esp] - add ecx,ebp - and esi,edi - pxor xmm5,xmm0 - pshufd xmm6,xmm2,238 - xor edi,eax - add ecx,edx - ror edx,7 - xor esi,eax - mov ebp,ecx - punpcklqdq xmm6,xmm3 - movdqa xmm0,xmm5 - add ebx,DWORD [32+esp] - xor edx,edi - paddd xmm1,xmm5 - movdqa [96+esp],xmm2 - rol ecx,5 - add ebx,esi - psrldq xmm0,4 - and ebp,edx - xor edx,edi - pxor xmm6,xmm2 - add ebx,ecx - ror ecx,7 - pxor xmm0,xmm4 - xor ebp,edi - mov esi,ebx - add eax,DWORD [36+esp] - pxor xmm6,xmm0 - xor ecx,edx - rol ebx,5 - movdqa [16+esp],xmm1 - add eax,ebp - and esi,ecx - movdqa xmm2,xmm6 - xor ecx,edx - add eax,ebx - ror ebx,7 - movdqa xmm0,xmm6 - xor esi,edx - pslldq xmm2,12 - paddd xmm6,xmm6 - mov ebp,eax - add edi,DWORD [40+esp] - psrld xmm0,31 - xor ebx,ecx - rol eax,5 - movdqa xmm1,xmm2 - add edi,esi - and ebp,ebx - xor ebx,ecx - psrld xmm2,30 - add edi,eax - ror eax,7 - por xmm6,xmm0 - xor ebp,ecx - movdqa xmm0,[64+esp] - mov esi,edi - add edx,DWORD [44+esp] - pslld xmm1,2 - xor eax,ebx - rol edi,5 - pxor xmm6,xmm2 - movdqa xmm2,[112+esp] - add edx,ebp - and esi,eax - pxor xmm6,xmm1 - pshufd xmm7,xmm3,238 - xor eax,ebx - add edx,edi - ror edi,7 - xor esi,ebx - mov ebp,edx - punpcklqdq xmm7,xmm4 - movdqa xmm1,xmm6 - add ecx,DWORD [48+esp] - xor edi,eax - paddd xmm2,xmm6 - movdqa [64+esp],xmm3 - rol edx,5 - add ecx,esi - psrldq xmm1,4 - and ebp,edi - xor edi,eax - pxor xmm7,xmm3 - add ecx,edx - ror edx,7 - pxor xmm1,xmm5 - xor ebp,eax - mov esi,ecx - add ebx,DWORD [52+esp] - pxor xmm7,xmm1 - xor edx,edi - rol ecx,5 - movdqa [32+esp],xmm2 - add ebx,ebp - and esi,edx - movdqa xmm3,xmm7 - xor edx,edi - add ebx,ecx - ror ecx,7 - movdqa xmm1,xmm7 - xor esi,edi - pslldq xmm3,12 - paddd xmm7,xmm7 - mov ebp,ebx - add eax,DWORD [56+esp] - psrld xmm1,31 - xor ecx,edx - rol ebx,5 - movdqa xmm2,xmm3 - add eax,esi - and ebp,ecx - xor ecx,edx - psrld xmm3,30 - add eax,ebx - ror ebx,7 - por xmm7,xmm1 - xor ebp,edx - movdqa xmm1,[80+esp] - mov esi,eax - add edi,DWORD [60+esp] - pslld xmm2,2 - xor ebx,ecx - rol eax,5 - pxor xmm7,xmm3 - movdqa xmm3,[112+esp] - add edi,ebp - and esi,ebx - pxor xmm7,xmm2 - pshufd xmm2,xmm6,238 - xor ebx,ecx - add edi,eax - ror eax,7 - pxor xmm0,xmm4 - punpcklqdq xmm2,xmm7 - xor esi,ecx - mov ebp,edi - add edx,DWORD [esp] - pxor xmm0,xmm1 - movdqa [80+esp],xmm4 - xor eax,ebx - rol edi,5 - movdqa xmm4,xmm3 - add edx,esi - paddd xmm3,xmm7 - and ebp,eax - pxor xmm0,xmm2 - xor eax,ebx - add edx,edi - ror edi,7 - xor ebp,ebx - movdqa xmm2,xmm0 - movdqa [48+esp],xmm3 - mov esi,edx - add ecx,DWORD [4+esp] - xor edi,eax - rol edx,5 - pslld xmm0,2 - add ecx,ebp - and esi,edi - psrld xmm2,30 - xor edi,eax - add ecx,edx - ror edx,7 - xor esi,eax - mov ebp,ecx - add ebx,DWORD [8+esp] - xor edx,edi - rol ecx,5 - por xmm0,xmm2 - add ebx,esi - and ebp,edx - movdqa xmm2,[96+esp] - xor edx,edi - add ebx,ecx - add eax,DWORD [12+esp] - xor ebp,edi - mov esi,ebx - pshufd xmm3,xmm7,238 - rol ebx,5 - add eax,ebp - xor esi,edx - ror ecx,7 - add eax,ebx - add edi,DWORD [16+esp] - pxor xmm1,xmm5 - punpcklqdq xmm3,xmm0 - xor esi,ecx - mov ebp,eax - rol eax,5 - pxor xmm1,xmm2 - movdqa [96+esp],xmm5 - add edi,esi - xor ebp,ecx - movdqa xmm5,xmm4 - ror ebx,7 - paddd xmm4,xmm0 - add edi,eax - pxor xmm1,xmm3 - add edx,DWORD [20+esp] - xor ebp,ebx - mov esi,edi - rol edi,5 - movdqa xmm3,xmm1 - movdqa [esp],xmm4 - add edx,ebp - xor esi,ebx - ror eax,7 - add edx,edi - pslld xmm1,2 - add ecx,DWORD [24+esp] - xor esi,eax - psrld xmm3,30 - mov ebp,edx - rol edx,5 - add ecx,esi - xor ebp,eax - ror edi,7 - add ecx,edx - por xmm1,xmm3 - add ebx,DWORD [28+esp] - xor ebp,edi - movdqa xmm3,[64+esp] - mov esi,ecx - rol ecx,5 - add ebx,ebp - xor esi,edi - ror edx,7 - pshufd xmm4,xmm0,238 - add ebx,ecx - add eax,DWORD [32+esp] - pxor xmm2,xmm6 - punpcklqdq xmm4,xmm1 - xor esi,edx - mov ebp,ebx - rol ebx,5 - pxor xmm2,xmm3 - movdqa [64+esp],xmm6 - add eax,esi - xor ebp,edx - movdqa xmm6,[128+esp] - ror ecx,7 - paddd xmm5,xmm1 - add eax,ebx - pxor xmm2,xmm4 - add edi,DWORD [36+esp] - xor ebp,ecx - mov esi,eax - rol eax,5 - movdqa xmm4,xmm2 - movdqa [16+esp],xmm5 - add edi,ebp - xor esi,ecx - ror ebx,7 - add edi,eax - pslld xmm2,2 - add edx,DWORD [40+esp] - xor esi,ebx - psrld xmm4,30 - mov ebp,edi - rol edi,5 - add edx,esi - xor ebp,ebx - ror eax,7 - add edx,edi - por xmm2,xmm4 - add ecx,DWORD [44+esp] - xor ebp,eax - movdqa xmm4,[80+esp] - mov esi,edx - rol edx,5 - add ecx,ebp - xor esi,eax - ror edi,7 - pshufd xmm5,xmm1,238 - add ecx,edx - add ebx,DWORD [48+esp] - pxor xmm3,xmm7 - punpcklqdq xmm5,xmm2 - xor esi,edi - mov ebp,ecx - rol ecx,5 - pxor xmm3,xmm4 - movdqa [80+esp],xmm7 - add ebx,esi - xor ebp,edi - movdqa xmm7,xmm6 - ror edx,7 - paddd xmm6,xmm2 - add ebx,ecx - pxor xmm3,xmm5 - add eax,DWORD [52+esp] - xor ebp,edx - mov esi,ebx - rol ebx,5 - movdqa xmm5,xmm3 - movdqa [32+esp],xmm6 - add eax,ebp - xor esi,edx - ror ecx,7 - add eax,ebx - pslld xmm3,2 - add edi,DWORD [56+esp] - xor esi,ecx - psrld xmm5,30 - mov ebp,eax - rol eax,5 - add edi,esi - xor ebp,ecx - ror ebx,7 - add edi,eax - por xmm3,xmm5 - add edx,DWORD [60+esp] - xor ebp,ebx - movdqa xmm5,[96+esp] - mov esi,edi - rol edi,5 - add edx,ebp - xor esi,ebx - ror eax,7 - pshufd xmm6,xmm2,238 - add edx,edi - add ecx,DWORD [esp] - pxor xmm4,xmm0 - punpcklqdq xmm6,xmm3 - xor esi,eax - mov ebp,edx - rol edx,5 - pxor xmm4,xmm5 - movdqa [96+esp],xmm0 - add ecx,esi - xor ebp,eax - movdqa xmm0,xmm7 - ror edi,7 - paddd xmm7,xmm3 - add ecx,edx - pxor xmm4,xmm6 - add ebx,DWORD [4+esp] - xor ebp,edi - mov esi,ecx - rol ecx,5 - movdqa xmm6,xmm4 - movdqa [48+esp],xmm7 - add ebx,ebp - xor esi,edi - ror edx,7 - add ebx,ecx - pslld xmm4,2 - add eax,DWORD [8+esp] - xor esi,edx - psrld xmm6,30 - mov ebp,ebx - rol ebx,5 - add eax,esi - xor ebp,edx - ror ecx,7 - add eax,ebx - por xmm4,xmm6 - add edi,DWORD [12+esp] - xor ebp,ecx - movdqa xmm6,[64+esp] - mov esi,eax - rol eax,5 - add edi,ebp - xor esi,ecx - ror ebx,7 - pshufd xmm7,xmm3,238 - add edi,eax - add edx,DWORD [16+esp] - pxor xmm5,xmm1 - punpcklqdq xmm7,xmm4 - xor esi,ebx - mov ebp,edi - rol edi,5 - pxor xmm5,xmm6 - movdqa [64+esp],xmm1 - add edx,esi - xor ebp,ebx - movdqa xmm1,xmm0 - ror eax,7 - paddd xmm0,xmm4 - add edx,edi - pxor xmm5,xmm7 - add ecx,DWORD [20+esp] - xor ebp,eax - mov esi,edx - rol edx,5 - movdqa xmm7,xmm5 - movdqa [esp],xmm0 - add ecx,ebp - xor esi,eax - ror edi,7 - add ecx,edx - pslld xmm5,2 - add ebx,DWORD [24+esp] - xor esi,edi - psrld xmm7,30 - mov ebp,ecx - rol ecx,5 - add ebx,esi - xor ebp,edi - ror edx,7 - add ebx,ecx - por xmm5,xmm7 - add eax,DWORD [28+esp] - movdqa xmm7,[80+esp] - ror ecx,7 - mov esi,ebx - xor ebp,edx - rol ebx,5 - pshufd xmm0,xmm4,238 - add eax,ebp - xor esi,ecx - xor ecx,edx - add eax,ebx - add edi,DWORD [32+esp] - pxor xmm6,xmm2 - punpcklqdq xmm0,xmm5 - and esi,ecx - xor ecx,edx - ror ebx,7 - pxor xmm6,xmm7 - movdqa [80+esp],xmm2 - mov ebp,eax - xor esi,ecx - rol eax,5 - movdqa xmm2,xmm1 - add edi,esi - paddd xmm1,xmm5 - xor ebp,ebx - pxor xmm6,xmm0 - xor ebx,ecx - add edi,eax - add edx,DWORD [36+esp] - and ebp,ebx - movdqa xmm0,xmm6 - movdqa [16+esp],xmm1 - xor ebx,ecx - ror eax,7 - mov esi,edi - xor ebp,ebx - rol edi,5 - pslld xmm6,2 - add edx,ebp - xor esi,eax - psrld xmm0,30 - xor eax,ebx - add edx,edi - add ecx,DWORD [40+esp] - and esi,eax - xor eax,ebx - ror edi,7 - por xmm6,xmm0 - mov ebp,edx - xor esi,eax - movdqa xmm0,[96+esp] - rol edx,5 - add ecx,esi - xor ebp,edi - xor edi,eax - add ecx,edx - pshufd xmm1,xmm5,238 - add ebx,DWORD [44+esp] - and ebp,edi - xor edi,eax - ror edx,7 - mov esi,ecx - xor ebp,edi - rol ecx,5 - add ebx,ebp - xor esi,edx - xor edx,edi - add ebx,ecx - add eax,DWORD [48+esp] - pxor xmm7,xmm3 - punpcklqdq xmm1,xmm6 - and esi,edx - xor edx,edi - ror ecx,7 - pxor xmm7,xmm0 - movdqa [96+esp],xmm3 - mov ebp,ebx - xor esi,edx - rol ebx,5 - movdqa xmm3,[144+esp] - add eax,esi - paddd xmm2,xmm6 - xor ebp,ecx - pxor xmm7,xmm1 - xor ecx,edx - add eax,ebx - add edi,DWORD [52+esp] - and ebp,ecx - movdqa xmm1,xmm7 - movdqa [32+esp],xmm2 - xor ecx,edx - ror ebx,7 - mov esi,eax - xor ebp,ecx - rol eax,5 - pslld xmm7,2 - add edi,ebp - xor esi,ebx - psrld xmm1,30 - xor ebx,ecx - add edi,eax - add edx,DWORD [56+esp] - and esi,ebx - xor ebx,ecx - ror eax,7 - por xmm7,xmm1 - mov ebp,edi - xor esi,ebx - movdqa xmm1,[64+esp] - rol edi,5 - add edx,esi - xor ebp,eax - xor eax,ebx - add edx,edi - pshufd xmm2,xmm6,238 - add ecx,DWORD [60+esp] - and ebp,eax - xor eax,ebx - ror edi,7 - mov esi,edx - xor ebp,eax - rol edx,5 - add ecx,ebp - xor esi,edi - xor edi,eax - add ecx,edx - add ebx,DWORD [esp] - pxor xmm0,xmm4 - punpcklqdq xmm2,xmm7 - and esi,edi - xor edi,eax - ror edx,7 - pxor xmm0,xmm1 - movdqa [64+esp],xmm4 - mov ebp,ecx - xor esi,edi - rol ecx,5 - movdqa xmm4,xmm3 - add ebx,esi - paddd xmm3,xmm7 - xor ebp,edx - pxor xmm0,xmm2 - xor edx,edi - add ebx,ecx - add eax,DWORD [4+esp] - and ebp,edx - movdqa xmm2,xmm0 - movdqa [48+esp],xmm3 - xor edx,edi - ror ecx,7 - mov esi,ebx - xor ebp,edx - rol ebx,5 - pslld xmm0,2 - add eax,ebp - xor esi,ecx - psrld xmm2,30 - xor ecx,edx - add eax,ebx - add edi,DWORD [8+esp] - and esi,ecx - xor ecx,edx - ror ebx,7 - por xmm0,xmm2 - mov ebp,eax - xor esi,ecx - movdqa xmm2,[80+esp] - rol eax,5 - add edi,esi - xor ebp,ebx - xor ebx,ecx - add edi,eax - pshufd xmm3,xmm7,238 - add edx,DWORD [12+esp] - and ebp,ebx - xor ebx,ecx - ror eax,7 - mov esi,edi - xor ebp,ebx - rol edi,5 - add edx,ebp - xor esi,eax - xor eax,ebx - add edx,edi - add ecx,DWORD [16+esp] - pxor xmm1,xmm5 - punpcklqdq xmm3,xmm0 - and esi,eax - xor eax,ebx - ror edi,7 - pxor xmm1,xmm2 - movdqa [80+esp],xmm5 - mov ebp,edx - xor esi,eax - rol edx,5 - movdqa xmm5,xmm4 - add ecx,esi - paddd xmm4,xmm0 - xor ebp,edi - pxor xmm1,xmm3 - xor edi,eax - add ecx,edx - add ebx,DWORD [20+esp] - and ebp,edi - movdqa xmm3,xmm1 - movdqa [esp],xmm4 - xor edi,eax - ror edx,7 - mov esi,ecx - xor ebp,edi - rol ecx,5 - pslld xmm1,2 - add ebx,ebp - xor esi,edx - psrld xmm3,30 - xor edx,edi - add ebx,ecx - add eax,DWORD [24+esp] - and esi,edx - xor edx,edi - ror ecx,7 - por xmm1,xmm3 - mov ebp,ebx - xor esi,edx - movdqa xmm3,[96+esp] - rol ebx,5 - add eax,esi - xor ebp,ecx - xor ecx,edx - add eax,ebx - pshufd xmm4,xmm0,238 - add edi,DWORD [28+esp] - and ebp,ecx - xor ecx,edx - ror ebx,7 - mov esi,eax - xor ebp,ecx - rol eax,5 - add edi,ebp - xor esi,ebx - xor ebx,ecx - add edi,eax - add edx,DWORD [32+esp] - pxor xmm2,xmm6 - punpcklqdq xmm4,xmm1 - and esi,ebx - xor ebx,ecx - ror eax,7 - pxor xmm2,xmm3 - movdqa [96+esp],xmm6 - mov ebp,edi - xor esi,ebx - rol edi,5 - movdqa xmm6,xmm5 - add edx,esi - paddd xmm5,xmm1 - xor ebp,eax - pxor xmm2,xmm4 - xor eax,ebx - add edx,edi - add ecx,DWORD [36+esp] - and ebp,eax - movdqa xmm4,xmm2 - movdqa [16+esp],xmm5 - xor eax,ebx - ror edi,7 - mov esi,edx - xor ebp,eax - rol edx,5 - pslld xmm2,2 - add ecx,ebp - xor esi,edi - psrld xmm4,30 - xor edi,eax - add ecx,edx - add ebx,DWORD [40+esp] - and esi,edi - xor edi,eax - ror edx,7 - por xmm2,xmm4 - mov ebp,ecx - xor esi,edi - movdqa xmm4,[64+esp] - rol ecx,5 - add ebx,esi - xor ebp,edx - xor edx,edi - add ebx,ecx - pshufd xmm5,xmm1,238 - add eax,DWORD [44+esp] - and ebp,edx - xor edx,edi - ror ecx,7 - mov esi,ebx - xor ebp,edx - rol ebx,5 - add eax,ebp - xor esi,edx - add eax,ebx - add edi,DWORD [48+esp] - pxor xmm3,xmm7 - punpcklqdq xmm5,xmm2 - xor esi,ecx - mov ebp,eax - rol eax,5 - pxor xmm3,xmm4 - movdqa [64+esp],xmm7 - add edi,esi - xor ebp,ecx - movdqa xmm7,xmm6 - ror ebx,7 - paddd xmm6,xmm2 - add edi,eax - pxor xmm3,xmm5 - add edx,DWORD [52+esp] - xor ebp,ebx - mov esi,edi - rol edi,5 - movdqa xmm5,xmm3 - movdqa [32+esp],xmm6 - add edx,ebp - xor esi,ebx - ror eax,7 - add edx,edi - pslld xmm3,2 - add ecx,DWORD [56+esp] - xor esi,eax - psrld xmm5,30 - mov ebp,edx - rol edx,5 - add ecx,esi - xor ebp,eax - ror edi,7 - add ecx,edx - por xmm3,xmm5 - add ebx,DWORD [60+esp] - xor ebp,edi - mov esi,ecx - rol ecx,5 - add ebx,ebp - xor esi,edi - ror edx,7 - add ebx,ecx - add eax,DWORD [esp] - xor esi,edx - mov ebp,ebx - rol ebx,5 - add eax,esi - xor ebp,edx - ror ecx,7 - paddd xmm7,xmm3 - add eax,ebx - add edi,DWORD [4+esp] - xor ebp,ecx - mov esi,eax - movdqa [48+esp],xmm7 - rol eax,5 - add edi,ebp - xor esi,ecx - ror ebx,7 - add edi,eax - add edx,DWORD [8+esp] - xor esi,ebx - mov ebp,edi - rol edi,5 - add edx,esi - xor ebp,ebx - ror eax,7 - add edx,edi - add ecx,DWORD [12+esp] - xor ebp,eax - mov esi,edx - rol edx,5 - add ecx,ebp - xor esi,eax - ror edi,7 - add ecx,edx - mov ebp,DWORD [196+esp] - cmp ebp,DWORD [200+esp] - je NEAR L$007done - movdqa xmm7,[160+esp] - movdqa xmm6,[176+esp] - movdqu xmm0,[ebp] - movdqu xmm1,[16+ebp] - movdqu xmm2,[32+ebp] - movdqu xmm3,[48+ebp] - add ebp,64 -db 102,15,56,0,198 - mov DWORD [196+esp],ebp - movdqa [96+esp],xmm7 - add ebx,DWORD [16+esp] - xor esi,edi - mov ebp,ecx - rol ecx,5 - add ebx,esi - xor ebp,edi - ror edx,7 -db 102,15,56,0,206 - add ebx,ecx - add eax,DWORD [20+esp] - xor ebp,edx - mov esi,ebx - paddd xmm0,xmm7 - rol ebx,5 - add eax,ebp - xor esi,edx - ror ecx,7 - movdqa [esp],xmm0 - add eax,ebx - add edi,DWORD [24+esp] - xor esi,ecx - mov ebp,eax - psubd xmm0,xmm7 - rol eax,5 - add edi,esi - xor ebp,ecx - ror ebx,7 - add edi,eax - add edx,DWORD [28+esp] - xor ebp,ebx - mov esi,edi - rol edi,5 - add edx,ebp - xor esi,ebx - ror eax,7 - add edx,edi - add ecx,DWORD [32+esp] - xor esi,eax - mov ebp,edx - rol edx,5 - add ecx,esi - xor ebp,eax - ror edi,7 -db 102,15,56,0,214 - add ecx,edx - add ebx,DWORD [36+esp] - xor ebp,edi - mov esi,ecx - paddd xmm1,xmm7 - rol ecx,5 - add ebx,ebp - xor esi,edi - ror edx,7 - movdqa [16+esp],xmm1 - add ebx,ecx - add eax,DWORD [40+esp] - xor esi,edx - mov ebp,ebx - psubd xmm1,xmm7 - rol ebx,5 - add eax,esi - xor ebp,edx - ror ecx,7 - add eax,ebx - add edi,DWORD [44+esp] - xor ebp,ecx - mov esi,eax - rol eax,5 - add edi,ebp - xor esi,ecx - ror ebx,7 - add edi,eax - add edx,DWORD [48+esp] - xor esi,ebx - mov ebp,edi - rol edi,5 - add edx,esi - xor ebp,ebx - ror eax,7 -db 102,15,56,0,222 - add edx,edi - add ecx,DWORD [52+esp] - xor ebp,eax - mov esi,edx - paddd xmm2,xmm7 - rol edx,5 - add ecx,ebp - xor esi,eax - ror edi,7 - movdqa [32+esp],xmm2 - add ecx,edx - add ebx,DWORD [56+esp] - xor esi,edi - mov ebp,ecx - psubd xmm2,xmm7 - rol ecx,5 - add ebx,esi - xor ebp,edi - ror edx,7 - add ebx,ecx - add eax,DWORD [60+esp] - xor ebp,edx - mov esi,ebx - rol ebx,5 - add eax,ebp - ror ecx,7 - add eax,ebx - mov ebp,DWORD [192+esp] - add eax,DWORD [ebp] - add esi,DWORD [4+ebp] - add ecx,DWORD [8+ebp] - mov DWORD [ebp],eax - add edx,DWORD [12+ebp] - mov DWORD [4+ebp],esi - add edi,DWORD [16+ebp] - mov DWORD [8+ebp],ecx - mov ebx,ecx - mov DWORD [12+ebp],edx - xor ebx,edx - mov DWORD [16+ebp],edi - mov ebp,esi - pshufd xmm4,xmm0,238 - and esi,ebx - mov ebx,ebp - jmp NEAR L$006loop -align 16 -L$007done: - add ebx,DWORD [16+esp] - xor esi,edi - mov ebp,ecx - rol ecx,5 - add ebx,esi - xor ebp,edi - ror edx,7 - add ebx,ecx - add eax,DWORD [20+esp] - xor ebp,edx - mov esi,ebx - rol ebx,5 - add eax,ebp - xor esi,edx - ror ecx,7 - add eax,ebx - add edi,DWORD [24+esp] - xor esi,ecx - mov ebp,eax - rol eax,5 - add edi,esi - xor ebp,ecx - ror ebx,7 - add edi,eax - add edx,DWORD [28+esp] - xor ebp,ebx - mov esi,edi - rol edi,5 - add edx,ebp - xor esi,ebx - ror eax,7 - add edx,edi - add ecx,DWORD [32+esp] - xor esi,eax - mov ebp,edx - rol edx,5 - add ecx,esi - xor ebp,eax - ror edi,7 - add ecx,edx - add ebx,DWORD [36+esp] - xor ebp,edi - mov esi,ecx - rol ecx,5 - add ebx,ebp - xor esi,edi - ror edx,7 - add ebx,ecx - add eax,DWORD [40+esp] - xor esi,edx - mov ebp,ebx - rol ebx,5 - add eax,esi - xor ebp,edx - ror ecx,7 - add eax,ebx - add edi,DWORD [44+esp] - xor ebp,ecx - mov esi,eax - rol eax,5 - add edi,ebp - xor esi,ecx - ror ebx,7 - add edi,eax - add edx,DWORD [48+esp] - xor esi,ebx - mov ebp,edi - rol edi,5 - add edx,esi - xor ebp,ebx - ror eax,7 - add edx,edi - add ecx,DWORD [52+esp] - xor ebp,eax - mov esi,edx - rol edx,5 - add ecx,ebp - xor esi,eax - ror edi,7 - add ecx,edx - add ebx,DWORD [56+esp] - xor esi,edi - mov ebp,ecx - rol ecx,5 - add ebx,esi - xor ebp,edi - ror edx,7 - add ebx,ecx - add eax,DWORD [60+esp] - xor ebp,edx - mov esi,ebx - rol ebx,5 - add eax,ebp - ror ecx,7 - add eax,ebx - mov ebp,DWORD [192+esp] - add eax,DWORD [ebp] - mov esp,DWORD [204+esp] - add esi,DWORD [4+ebp] - add ecx,DWORD [8+ebp] - mov DWORD [ebp],eax - add edx,DWORD [12+ebp] - mov DWORD [4+ebp],esi - add edi,DWORD [16+ebp] - mov DWORD [8+ebp],ecx - mov DWORD [12+ebp],edx - mov DWORD [16+ebp],edi - pop edi - pop esi - pop ebx - pop ebp - ret -align 64 -L$K_XX_XX: -dd 1518500249,1518500249,1518500249,1518500249 -dd 1859775393,1859775393,1859775393,1859775393 -dd 2400959708,2400959708,2400959708,2400959708 -dd 3395469782,3395469782,3395469782,3395469782 -dd 66051,67438087,134810123,202182159 -db 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -db 83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115 -db 102,111,114,109,32,102,111,114,32,120,56,54,44,32,67,82 -db 89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112 -db 114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 -segment .bss -common _OPENSSL_ia32cap_P 16 diff --git a/third_party/boringssl/win-x86/crypto/sha/sha256-586.asm b/third_party/boringssl/win-x86/crypto/sha/sha256-586.asm deleted file mode 100644 index fe36bc5c9adc8..0000000000000 --- a/third_party/boringssl/win-x86/crypto/sha/sha256-586.asm +++ /dev/null @@ -1,4591 +0,0 @@ -%ifidn __OUTPUT_FORMAT__,obj -section code use32 class=code align=64 -%elifidn __OUTPUT_FORMAT__,win32 -%ifdef __YASM_VERSION_ID__ -%if __YASM_VERSION_ID__ < 01010000h -%error yasm version 1.1.0 or later needed. -%endif -; Yasm automatically includes .00 and complains about redefining it. -; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html -%else -$@feat.00 equ 1 -%endif -section .text code align=64 -%else -section .text code -%endif -;extern _OPENSSL_ia32cap_P -global _sha256_block_data_order -align 16 -_sha256_block_data_order: -L$_sha256_block_data_order_begin: - push ebp - push ebx - push esi - push edi - mov esi,DWORD [20+esp] - mov edi,DWORD [24+esp] - mov eax,DWORD [28+esp] - mov ebx,esp - call L$000pic_point -L$000pic_point: - pop ebp - lea ebp,[(L$001K256-L$000pic_point)+ebp] - sub esp,16 - and esp,-64 - shl eax,6 - add eax,edi - mov DWORD [esp],esi - mov DWORD [4+esp],edi - mov DWORD [8+esp],eax - mov DWORD [12+esp],ebx - lea edx,[_OPENSSL_ia32cap_P] - mov ecx,DWORD [edx] - mov ebx,DWORD [4+edx] - test ecx,1048576 - jnz NEAR L$002loop - mov edx,DWORD [8+edx] - test ecx,16777216 - jz NEAR L$003no_xmm - and ecx,1073741824 - and ebx,268435968 - test edx,536870912 - jnz NEAR L$004shaext - or ecx,ebx - and ecx,1342177280 - cmp ecx,1342177280 - test ebx,512 - jnz NEAR L$005SSSE3 -L$003no_xmm: - sub eax,edi - cmp eax,256 - jae NEAR L$006unrolled - jmp NEAR L$002loop -align 16 -L$002loop: - mov eax,DWORD [edi] - mov ebx,DWORD [4+edi] - mov ecx,DWORD [8+edi] - bswap eax - mov edx,DWORD [12+edi] - bswap ebx - push eax - bswap ecx - push ebx - bswap edx - push ecx - push edx - mov eax,DWORD [16+edi] - mov ebx,DWORD [20+edi] - mov ecx,DWORD [24+edi] - bswap eax - mov edx,DWORD [28+edi] - bswap ebx - push eax - bswap ecx - push ebx - bswap edx - push ecx - push edx - mov eax,DWORD [32+edi] - mov ebx,DWORD [36+edi] - mov ecx,DWORD [40+edi] - bswap eax - mov edx,DWORD [44+edi] - bswap ebx - push eax - bswap ecx - push ebx - bswap edx - push ecx - push edx - mov eax,DWORD [48+edi] - mov ebx,DWORD [52+edi] - mov ecx,DWORD [56+edi] - bswap eax - mov edx,DWORD [60+edi] - bswap ebx - push eax - bswap ecx - push ebx - bswap edx - push ecx - push edx - add edi,64 - lea esp,[esp-36] - mov DWORD [104+esp],edi - mov eax,DWORD [esi] - mov ebx,DWORD [4+esi] - mov ecx,DWORD [8+esi] - mov edi,DWORD [12+esi] - mov DWORD [8+esp],ebx - xor ebx,ecx - mov DWORD [12+esp],ecx - mov DWORD [16+esp],edi - mov DWORD [esp],ebx - mov edx,DWORD [16+esi] - mov ebx,DWORD [20+esi] - mov ecx,DWORD [24+esi] - mov edi,DWORD [28+esi] - mov DWORD [24+esp],ebx - mov DWORD [28+esp],ecx - mov DWORD [32+esp],edi -align 16 -L$00700_15: - mov ecx,edx - mov esi,DWORD [24+esp] - ror ecx,14 - mov edi,DWORD [28+esp] - xor ecx,edx - xor esi,edi - mov ebx,DWORD [96+esp] - ror ecx,5 - and esi,edx - mov DWORD [20+esp],edx - xor edx,ecx - add ebx,DWORD [32+esp] - xor esi,edi - ror edx,6 - mov ecx,eax - add ebx,esi - ror ecx,9 - add ebx,edx - mov edi,DWORD [8+esp] - xor ecx,eax - mov DWORD [4+esp],eax - lea esp,[esp-4] - ror ecx,11 - mov esi,DWORD [ebp] - xor ecx,eax - mov edx,DWORD [20+esp] - xor eax,edi - ror ecx,2 - add ebx,esi - mov DWORD [esp],eax - add edx,ebx - and eax,DWORD [4+esp] - add ebx,ecx - xor eax,edi - add ebp,4 - add eax,ebx - cmp esi,3248222580 - jne NEAR L$00700_15 - mov ecx,DWORD [156+esp] - jmp NEAR L$00816_63 -align 16 -L$00816_63: - mov ebx,ecx - mov esi,DWORD [104+esp] - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [160+esp] - shr edi,10 - add ebx,DWORD [124+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [24+esp] - ror ecx,14 - add ebx,edi - mov edi,DWORD [28+esp] - xor ecx,edx - xor esi,edi - mov DWORD [96+esp],ebx - ror ecx,5 - and esi,edx - mov DWORD [20+esp],edx - xor edx,ecx - add ebx,DWORD [32+esp] - xor esi,edi - ror edx,6 - mov ecx,eax - add ebx,esi - ror ecx,9 - add ebx,edx - mov edi,DWORD [8+esp] - xor ecx,eax - mov DWORD [4+esp],eax - lea esp,[esp-4] - ror ecx,11 - mov esi,DWORD [ebp] - xor ecx,eax - mov edx,DWORD [20+esp] - xor eax,edi - ror ecx,2 - add ebx,esi - mov DWORD [esp],eax - add edx,ebx - and eax,DWORD [4+esp] - add ebx,ecx - xor eax,edi - mov ecx,DWORD [156+esp] - add ebp,4 - add eax,ebx - cmp esi,3329325298 - jne NEAR L$00816_63 - mov esi,DWORD [356+esp] - mov ebx,DWORD [8+esp] - mov ecx,DWORD [16+esp] - add eax,DWORD [esi] - add ebx,DWORD [4+esi] - add edi,DWORD [8+esi] - add ecx,DWORD [12+esi] - mov DWORD [esi],eax - mov DWORD [4+esi],ebx - mov DWORD [8+esi],edi - mov DWORD [12+esi],ecx - mov eax,DWORD [24+esp] - mov ebx,DWORD [28+esp] - mov ecx,DWORD [32+esp] - mov edi,DWORD [360+esp] - add edx,DWORD [16+esi] - add eax,DWORD [20+esi] - add ebx,DWORD [24+esi] - add ecx,DWORD [28+esi] - mov DWORD [16+esi],edx - mov DWORD [20+esi],eax - mov DWORD [24+esi],ebx - mov DWORD [28+esi],ecx - lea esp,[356+esp] - sub ebp,256 - cmp edi,DWORD [8+esp] - jb NEAR L$002loop - mov esp,DWORD [12+esp] - pop edi - pop esi - pop ebx - pop ebp - ret -align 64 -L$001K256: -dd 1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298 -dd 66051,67438087,134810123,202182159 -db 83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97 -db 110,115,102,111,114,109,32,102,111,114,32,120,56,54,44,32 -db 67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97 -db 112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103 -db 62,0 -align 16 -L$006unrolled: - lea esp,[esp-96] - mov eax,DWORD [esi] - mov ebp,DWORD [4+esi] - mov ecx,DWORD [8+esi] - mov ebx,DWORD [12+esi] - mov DWORD [4+esp],ebp - xor ebp,ecx - mov DWORD [8+esp],ecx - mov DWORD [12+esp],ebx - mov edx,DWORD [16+esi] - mov ebx,DWORD [20+esi] - mov ecx,DWORD [24+esi] - mov esi,DWORD [28+esi] - mov DWORD [20+esp],ebx - mov DWORD [24+esp],ecx - mov DWORD [28+esp],esi - jmp NEAR L$009grand_loop -align 16 -L$009grand_loop: - mov ebx,DWORD [edi] - mov ecx,DWORD [4+edi] - bswap ebx - mov esi,DWORD [8+edi] - bswap ecx - mov DWORD [32+esp],ebx - bswap esi - mov DWORD [36+esp],ecx - mov DWORD [40+esp],esi - mov ebx,DWORD [12+edi] - mov ecx,DWORD [16+edi] - bswap ebx - mov esi,DWORD [20+edi] - bswap ecx - mov DWORD [44+esp],ebx - bswap esi - mov DWORD [48+esp],ecx - mov DWORD [52+esp],esi - mov ebx,DWORD [24+edi] - mov ecx,DWORD [28+edi] - bswap ebx - mov esi,DWORD [32+edi] - bswap ecx - mov DWORD [56+esp],ebx - bswap esi - mov DWORD [60+esp],ecx - mov DWORD [64+esp],esi - mov ebx,DWORD [36+edi] - mov ecx,DWORD [40+edi] - bswap ebx - mov esi,DWORD [44+edi] - bswap ecx - mov DWORD [68+esp],ebx - bswap esi - mov DWORD [72+esp],ecx - mov DWORD [76+esp],esi - mov ebx,DWORD [48+edi] - mov ecx,DWORD [52+edi] - bswap ebx - mov esi,DWORD [56+edi] - bswap ecx - mov DWORD [80+esp],ebx - bswap esi - mov DWORD [84+esp],ecx - mov DWORD [88+esp],esi - mov ebx,DWORD [60+edi] - add edi,64 - bswap ebx - mov DWORD [100+esp],edi - mov DWORD [92+esp],ebx - mov ecx,edx - mov esi,DWORD [20+esp] - ror edx,14 - mov edi,DWORD [24+esp] - xor edx,ecx - mov ebx,DWORD [32+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [16+esp],ecx - xor edx,ecx - add ebx,DWORD [28+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [4+esp] - xor ecx,eax - mov DWORD [esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[1116352408+edx*1+ebx] - xor ecx,esi - xor ebp,edi - ror ecx,2 - add ebp,edx - add edx,DWORD [12+esp] - add ebp,ecx - mov esi,edx - mov ecx,DWORD [16+esp] - ror edx,14 - mov edi,DWORD [20+esp] - xor edx,esi - mov ebx,DWORD [36+esp] - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [12+esp],esi - xor edx,esi - add ebx,DWORD [24+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [esp] - xor esi,ebp - mov DWORD [28+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[1899447441+edx*1+ebx] - xor esi,ecx - xor eax,edi - ror esi,2 - add eax,edx - add edx,DWORD [8+esp] - add eax,esi - mov ecx,edx - mov esi,DWORD [12+esp] - ror edx,14 - mov edi,DWORD [16+esp] - xor edx,ecx - mov ebx,DWORD [40+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [8+esp],ecx - xor edx,ecx - add ebx,DWORD [20+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [28+esp] - xor ecx,eax - mov DWORD [24+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[3049323471+edx*1+ebx] - xor ecx,esi - xor ebp,edi - ror ecx,2 - add ebp,edx - add edx,DWORD [4+esp] - add ebp,ecx - mov esi,edx - mov ecx,DWORD [8+esp] - ror edx,14 - mov edi,DWORD [12+esp] - xor edx,esi - mov ebx,DWORD [44+esp] - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [4+esp],esi - xor edx,esi - add ebx,DWORD [16+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [24+esp] - xor esi,ebp - mov DWORD [20+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[3921009573+edx*1+ebx] - xor esi,ecx - xor eax,edi - ror esi,2 - add eax,edx - add edx,DWORD [esp] - add eax,esi - mov ecx,edx - mov esi,DWORD [4+esp] - ror edx,14 - mov edi,DWORD [8+esp] - xor edx,ecx - mov ebx,DWORD [48+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [esp],ecx - xor edx,ecx - add ebx,DWORD [12+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [20+esp] - xor ecx,eax - mov DWORD [16+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[961987163+edx*1+ebx] - xor ecx,esi - xor ebp,edi - ror ecx,2 - add ebp,edx - add edx,DWORD [28+esp] - add ebp,ecx - mov esi,edx - mov ecx,DWORD [esp] - ror edx,14 - mov edi,DWORD [4+esp] - xor edx,esi - mov ebx,DWORD [52+esp] - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [28+esp],esi - xor edx,esi - add ebx,DWORD [8+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [16+esp] - xor esi,ebp - mov DWORD [12+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[1508970993+edx*1+ebx] - xor esi,ecx - xor eax,edi - ror esi,2 - add eax,edx - add edx,DWORD [24+esp] - add eax,esi - mov ecx,edx - mov esi,DWORD [28+esp] - ror edx,14 - mov edi,DWORD [esp] - xor edx,ecx - mov ebx,DWORD [56+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [24+esp],ecx - xor edx,ecx - add ebx,DWORD [4+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [12+esp] - xor ecx,eax - mov DWORD [8+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[2453635748+edx*1+ebx] - xor ecx,esi - xor ebp,edi - ror ecx,2 - add ebp,edx - add edx,DWORD [20+esp] - add ebp,ecx - mov esi,edx - mov ecx,DWORD [24+esp] - ror edx,14 - mov edi,DWORD [28+esp] - xor edx,esi - mov ebx,DWORD [60+esp] - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [20+esp],esi - xor edx,esi - add ebx,DWORD [esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [8+esp] - xor esi,ebp - mov DWORD [4+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[2870763221+edx*1+ebx] - xor esi,ecx - xor eax,edi - ror esi,2 - add eax,edx - add edx,DWORD [16+esp] - add eax,esi - mov ecx,edx - mov esi,DWORD [20+esp] - ror edx,14 - mov edi,DWORD [24+esp] - xor edx,ecx - mov ebx,DWORD [64+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [16+esp],ecx - xor edx,ecx - add ebx,DWORD [28+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [4+esp] - xor ecx,eax - mov DWORD [esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[3624381080+edx*1+ebx] - xor ecx,esi - xor ebp,edi - ror ecx,2 - add ebp,edx - add edx,DWORD [12+esp] - add ebp,ecx - mov esi,edx - mov ecx,DWORD [16+esp] - ror edx,14 - mov edi,DWORD [20+esp] - xor edx,esi - mov ebx,DWORD [68+esp] - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [12+esp],esi - xor edx,esi - add ebx,DWORD [24+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [esp] - xor esi,ebp - mov DWORD [28+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[310598401+edx*1+ebx] - xor esi,ecx - xor eax,edi - ror esi,2 - add eax,edx - add edx,DWORD [8+esp] - add eax,esi - mov ecx,edx - mov esi,DWORD [12+esp] - ror edx,14 - mov edi,DWORD [16+esp] - xor edx,ecx - mov ebx,DWORD [72+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [8+esp],ecx - xor edx,ecx - add ebx,DWORD [20+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [28+esp] - xor ecx,eax - mov DWORD [24+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[607225278+edx*1+ebx] - xor ecx,esi - xor ebp,edi - ror ecx,2 - add ebp,edx - add edx,DWORD [4+esp] - add ebp,ecx - mov esi,edx - mov ecx,DWORD [8+esp] - ror edx,14 - mov edi,DWORD [12+esp] - xor edx,esi - mov ebx,DWORD [76+esp] - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [4+esp],esi - xor edx,esi - add ebx,DWORD [16+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [24+esp] - xor esi,ebp - mov DWORD [20+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[1426881987+edx*1+ebx] - xor esi,ecx - xor eax,edi - ror esi,2 - add eax,edx - add edx,DWORD [esp] - add eax,esi - mov ecx,edx - mov esi,DWORD [4+esp] - ror edx,14 - mov edi,DWORD [8+esp] - xor edx,ecx - mov ebx,DWORD [80+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [esp],ecx - xor edx,ecx - add ebx,DWORD [12+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [20+esp] - xor ecx,eax - mov DWORD [16+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[1925078388+edx*1+ebx] - xor ecx,esi - xor ebp,edi - ror ecx,2 - add ebp,edx - add edx,DWORD [28+esp] - add ebp,ecx - mov esi,edx - mov ecx,DWORD [esp] - ror edx,14 - mov edi,DWORD [4+esp] - xor edx,esi - mov ebx,DWORD [84+esp] - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [28+esp],esi - xor edx,esi - add ebx,DWORD [8+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [16+esp] - xor esi,ebp - mov DWORD [12+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[2162078206+edx*1+ebx] - xor esi,ecx - xor eax,edi - ror esi,2 - add eax,edx - add edx,DWORD [24+esp] - add eax,esi - mov ecx,edx - mov esi,DWORD [28+esp] - ror edx,14 - mov edi,DWORD [esp] - xor edx,ecx - mov ebx,DWORD [88+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [24+esp],ecx - xor edx,ecx - add ebx,DWORD [4+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [12+esp] - xor ecx,eax - mov DWORD [8+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[2614888103+edx*1+ebx] - xor ecx,esi - xor ebp,edi - ror ecx,2 - add ebp,edx - add edx,DWORD [20+esp] - add ebp,ecx - mov esi,edx - mov ecx,DWORD [24+esp] - ror edx,14 - mov edi,DWORD [28+esp] - xor edx,esi - mov ebx,DWORD [92+esp] - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [20+esp],esi - xor edx,esi - add ebx,DWORD [esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [8+esp] - xor esi,ebp - mov DWORD [4+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[3248222580+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [36+esp] - ror esi,2 - add eax,edx - add edx,DWORD [16+esp] - add eax,esi - mov esi,DWORD [88+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [32+esp] - shr edi,10 - add ebx,DWORD [68+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [20+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [24+esp] - xor edx,ecx - mov DWORD [32+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [16+esp],ecx - xor edx,ecx - add ebx,DWORD [28+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [4+esp] - xor ecx,eax - mov DWORD [esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[3835390401+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [40+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [12+esp] - add ebp,ecx - mov ecx,DWORD [92+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [36+esp] - shr edi,10 - add ebx,DWORD [72+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [16+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [20+esp] - xor edx,esi - mov DWORD [36+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [12+esp],esi - xor edx,esi - add ebx,DWORD [24+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [esp] - xor esi,ebp - mov DWORD [28+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[4022224774+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [44+esp] - ror esi,2 - add eax,edx - add edx,DWORD [8+esp] - add eax,esi - mov esi,DWORD [32+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [40+esp] - shr edi,10 - add ebx,DWORD [76+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [12+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [16+esp] - xor edx,ecx - mov DWORD [40+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [8+esp],ecx - xor edx,ecx - add ebx,DWORD [20+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [28+esp] - xor ecx,eax - mov DWORD [24+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[264347078+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [48+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [4+esp] - add ebp,ecx - mov ecx,DWORD [36+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [44+esp] - shr edi,10 - add ebx,DWORD [80+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [8+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [12+esp] - xor edx,esi - mov DWORD [44+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [4+esp],esi - xor edx,esi - add ebx,DWORD [16+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [24+esp] - xor esi,ebp - mov DWORD [20+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[604807628+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [52+esp] - ror esi,2 - add eax,edx - add edx,DWORD [esp] - add eax,esi - mov esi,DWORD [40+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [48+esp] - shr edi,10 - add ebx,DWORD [84+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [4+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [8+esp] - xor edx,ecx - mov DWORD [48+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [esp],ecx - xor edx,ecx - add ebx,DWORD [12+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [20+esp] - xor ecx,eax - mov DWORD [16+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[770255983+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [56+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [28+esp] - add ebp,ecx - mov ecx,DWORD [44+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [52+esp] - shr edi,10 - add ebx,DWORD [88+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [4+esp] - xor edx,esi - mov DWORD [52+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [28+esp],esi - xor edx,esi - add ebx,DWORD [8+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [16+esp] - xor esi,ebp - mov DWORD [12+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[1249150122+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [60+esp] - ror esi,2 - add eax,edx - add edx,DWORD [24+esp] - add eax,esi - mov esi,DWORD [48+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [56+esp] - shr edi,10 - add ebx,DWORD [92+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [28+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [esp] - xor edx,ecx - mov DWORD [56+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [24+esp],ecx - xor edx,ecx - add ebx,DWORD [4+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [12+esp] - xor ecx,eax - mov DWORD [8+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[1555081692+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [64+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [20+esp] - add ebp,ecx - mov ecx,DWORD [52+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [60+esp] - shr edi,10 - add ebx,DWORD [32+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [24+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [28+esp] - xor edx,esi - mov DWORD [60+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [20+esp],esi - xor edx,esi - add ebx,DWORD [esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [8+esp] - xor esi,ebp - mov DWORD [4+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[1996064986+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [68+esp] - ror esi,2 - add eax,edx - add edx,DWORD [16+esp] - add eax,esi - mov esi,DWORD [56+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [64+esp] - shr edi,10 - add ebx,DWORD [36+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [20+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [24+esp] - xor edx,ecx - mov DWORD [64+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [16+esp],ecx - xor edx,ecx - add ebx,DWORD [28+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [4+esp] - xor ecx,eax - mov DWORD [esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[2554220882+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [72+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [12+esp] - add ebp,ecx - mov ecx,DWORD [60+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [68+esp] - shr edi,10 - add ebx,DWORD [40+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [16+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [20+esp] - xor edx,esi - mov DWORD [68+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [12+esp],esi - xor edx,esi - add ebx,DWORD [24+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [esp] - xor esi,ebp - mov DWORD [28+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[2821834349+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [76+esp] - ror esi,2 - add eax,edx - add edx,DWORD [8+esp] - add eax,esi - mov esi,DWORD [64+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [72+esp] - shr edi,10 - add ebx,DWORD [44+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [12+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [16+esp] - xor edx,ecx - mov DWORD [72+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [8+esp],ecx - xor edx,ecx - add ebx,DWORD [20+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [28+esp] - xor ecx,eax - mov DWORD [24+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[2952996808+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [80+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [4+esp] - add ebp,ecx - mov ecx,DWORD [68+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [76+esp] - shr edi,10 - add ebx,DWORD [48+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [8+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [12+esp] - xor edx,esi - mov DWORD [76+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [4+esp],esi - xor edx,esi - add ebx,DWORD [16+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [24+esp] - xor esi,ebp - mov DWORD [20+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[3210313671+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [84+esp] - ror esi,2 - add eax,edx - add edx,DWORD [esp] - add eax,esi - mov esi,DWORD [72+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [80+esp] - shr edi,10 - add ebx,DWORD [52+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [4+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [8+esp] - xor edx,ecx - mov DWORD [80+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [esp],ecx - xor edx,ecx - add ebx,DWORD [12+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [20+esp] - xor ecx,eax - mov DWORD [16+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[3336571891+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [88+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [28+esp] - add ebp,ecx - mov ecx,DWORD [76+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [84+esp] - shr edi,10 - add ebx,DWORD [56+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [4+esp] - xor edx,esi - mov DWORD [84+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [28+esp],esi - xor edx,esi - add ebx,DWORD [8+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [16+esp] - xor esi,ebp - mov DWORD [12+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[3584528711+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [92+esp] - ror esi,2 - add eax,edx - add edx,DWORD [24+esp] - add eax,esi - mov esi,DWORD [80+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [88+esp] - shr edi,10 - add ebx,DWORD [60+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [28+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [esp] - xor edx,ecx - mov DWORD [88+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [24+esp],ecx - xor edx,ecx - add ebx,DWORD [4+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [12+esp] - xor ecx,eax - mov DWORD [8+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[113926993+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [32+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [20+esp] - add ebp,ecx - mov ecx,DWORD [84+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [92+esp] - shr edi,10 - add ebx,DWORD [64+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [24+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [28+esp] - xor edx,esi - mov DWORD [92+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [20+esp],esi - xor edx,esi - add ebx,DWORD [esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [8+esp] - xor esi,ebp - mov DWORD [4+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[338241895+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [36+esp] - ror esi,2 - add eax,edx - add edx,DWORD [16+esp] - add eax,esi - mov esi,DWORD [88+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [32+esp] - shr edi,10 - add ebx,DWORD [68+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [20+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [24+esp] - xor edx,ecx - mov DWORD [32+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [16+esp],ecx - xor edx,ecx - add ebx,DWORD [28+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [4+esp] - xor ecx,eax - mov DWORD [esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[666307205+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [40+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [12+esp] - add ebp,ecx - mov ecx,DWORD [92+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [36+esp] - shr edi,10 - add ebx,DWORD [72+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [16+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [20+esp] - xor edx,esi - mov DWORD [36+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [12+esp],esi - xor edx,esi - add ebx,DWORD [24+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [esp] - xor esi,ebp - mov DWORD [28+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[773529912+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [44+esp] - ror esi,2 - add eax,edx - add edx,DWORD [8+esp] - add eax,esi - mov esi,DWORD [32+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [40+esp] - shr edi,10 - add ebx,DWORD [76+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [12+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [16+esp] - xor edx,ecx - mov DWORD [40+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [8+esp],ecx - xor edx,ecx - add ebx,DWORD [20+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [28+esp] - xor ecx,eax - mov DWORD [24+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[1294757372+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [48+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [4+esp] - add ebp,ecx - mov ecx,DWORD [36+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [44+esp] - shr edi,10 - add ebx,DWORD [80+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [8+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [12+esp] - xor edx,esi - mov DWORD [44+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [4+esp],esi - xor edx,esi - add ebx,DWORD [16+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [24+esp] - xor esi,ebp - mov DWORD [20+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[1396182291+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [52+esp] - ror esi,2 - add eax,edx - add edx,DWORD [esp] - add eax,esi - mov esi,DWORD [40+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [48+esp] - shr edi,10 - add ebx,DWORD [84+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [4+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [8+esp] - xor edx,ecx - mov DWORD [48+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [esp],ecx - xor edx,ecx - add ebx,DWORD [12+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [20+esp] - xor ecx,eax - mov DWORD [16+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[1695183700+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [56+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [28+esp] - add ebp,ecx - mov ecx,DWORD [44+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [52+esp] - shr edi,10 - add ebx,DWORD [88+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [4+esp] - xor edx,esi - mov DWORD [52+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [28+esp],esi - xor edx,esi - add ebx,DWORD [8+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [16+esp] - xor esi,ebp - mov DWORD [12+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[1986661051+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [60+esp] - ror esi,2 - add eax,edx - add edx,DWORD [24+esp] - add eax,esi - mov esi,DWORD [48+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [56+esp] - shr edi,10 - add ebx,DWORD [92+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [28+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [esp] - xor edx,ecx - mov DWORD [56+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [24+esp],ecx - xor edx,ecx - add ebx,DWORD [4+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [12+esp] - xor ecx,eax - mov DWORD [8+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[2177026350+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [64+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [20+esp] - add ebp,ecx - mov ecx,DWORD [52+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [60+esp] - shr edi,10 - add ebx,DWORD [32+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [24+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [28+esp] - xor edx,esi - mov DWORD [60+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [20+esp],esi - xor edx,esi - add ebx,DWORD [esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [8+esp] - xor esi,ebp - mov DWORD [4+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[2456956037+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [68+esp] - ror esi,2 - add eax,edx - add edx,DWORD [16+esp] - add eax,esi - mov esi,DWORD [56+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [64+esp] - shr edi,10 - add ebx,DWORD [36+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [20+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [24+esp] - xor edx,ecx - mov DWORD [64+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [16+esp],ecx - xor edx,ecx - add ebx,DWORD [28+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [4+esp] - xor ecx,eax - mov DWORD [esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[2730485921+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [72+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [12+esp] - add ebp,ecx - mov ecx,DWORD [60+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [68+esp] - shr edi,10 - add ebx,DWORD [40+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [16+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [20+esp] - xor edx,esi - mov DWORD [68+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [12+esp],esi - xor edx,esi - add ebx,DWORD [24+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [esp] - xor esi,ebp - mov DWORD [28+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[2820302411+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [76+esp] - ror esi,2 - add eax,edx - add edx,DWORD [8+esp] - add eax,esi - mov esi,DWORD [64+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [72+esp] - shr edi,10 - add ebx,DWORD [44+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [12+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [16+esp] - xor edx,ecx - mov DWORD [72+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [8+esp],ecx - xor edx,ecx - add ebx,DWORD [20+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [28+esp] - xor ecx,eax - mov DWORD [24+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[3259730800+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [80+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [4+esp] - add ebp,ecx - mov ecx,DWORD [68+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [76+esp] - shr edi,10 - add ebx,DWORD [48+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [8+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [12+esp] - xor edx,esi - mov DWORD [76+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [4+esp],esi - xor edx,esi - add ebx,DWORD [16+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [24+esp] - xor esi,ebp - mov DWORD [20+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[3345764771+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [84+esp] - ror esi,2 - add eax,edx - add edx,DWORD [esp] - add eax,esi - mov esi,DWORD [72+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [80+esp] - shr edi,10 - add ebx,DWORD [52+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [4+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [8+esp] - xor edx,ecx - mov DWORD [80+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [esp],ecx - xor edx,ecx - add ebx,DWORD [12+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [20+esp] - xor ecx,eax - mov DWORD [16+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[3516065817+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [88+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [28+esp] - add ebp,ecx - mov ecx,DWORD [76+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [84+esp] - shr edi,10 - add ebx,DWORD [56+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [4+esp] - xor edx,esi - mov DWORD [84+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [28+esp],esi - xor edx,esi - add ebx,DWORD [8+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [16+esp] - xor esi,ebp - mov DWORD [12+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[3600352804+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [92+esp] - ror esi,2 - add eax,edx - add edx,DWORD [24+esp] - add eax,esi - mov esi,DWORD [80+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [88+esp] - shr edi,10 - add ebx,DWORD [60+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [28+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [esp] - xor edx,ecx - mov DWORD [88+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [24+esp],ecx - xor edx,ecx - add ebx,DWORD [4+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [12+esp] - xor ecx,eax - mov DWORD [8+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[4094571909+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [32+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [20+esp] - add ebp,ecx - mov ecx,DWORD [84+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [92+esp] - shr edi,10 - add ebx,DWORD [64+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [24+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [28+esp] - xor edx,esi - mov DWORD [92+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [20+esp],esi - xor edx,esi - add ebx,DWORD [esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [8+esp] - xor esi,ebp - mov DWORD [4+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[275423344+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [36+esp] - ror esi,2 - add eax,edx - add edx,DWORD [16+esp] - add eax,esi - mov esi,DWORD [88+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [32+esp] - shr edi,10 - add ebx,DWORD [68+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [20+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [24+esp] - xor edx,ecx - mov DWORD [32+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [16+esp],ecx - xor edx,ecx - add ebx,DWORD [28+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [4+esp] - xor ecx,eax - mov DWORD [esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[430227734+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [40+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [12+esp] - add ebp,ecx - mov ecx,DWORD [92+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [36+esp] - shr edi,10 - add ebx,DWORD [72+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [16+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [20+esp] - xor edx,esi - mov DWORD [36+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [12+esp],esi - xor edx,esi - add ebx,DWORD [24+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [esp] - xor esi,ebp - mov DWORD [28+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[506948616+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [44+esp] - ror esi,2 - add eax,edx - add edx,DWORD [8+esp] - add eax,esi - mov esi,DWORD [32+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [40+esp] - shr edi,10 - add ebx,DWORD [76+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [12+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [16+esp] - xor edx,ecx - mov DWORD [40+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [8+esp],ecx - xor edx,ecx - add ebx,DWORD [20+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [28+esp] - xor ecx,eax - mov DWORD [24+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[659060556+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [48+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [4+esp] - add ebp,ecx - mov ecx,DWORD [36+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [44+esp] - shr edi,10 - add ebx,DWORD [80+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [8+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [12+esp] - xor edx,esi - mov DWORD [44+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [4+esp],esi - xor edx,esi - add ebx,DWORD [16+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [24+esp] - xor esi,ebp - mov DWORD [20+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[883997877+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [52+esp] - ror esi,2 - add eax,edx - add edx,DWORD [esp] - add eax,esi - mov esi,DWORD [40+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [48+esp] - shr edi,10 - add ebx,DWORD [84+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [4+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [8+esp] - xor edx,ecx - mov DWORD [48+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [esp],ecx - xor edx,ecx - add ebx,DWORD [12+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [20+esp] - xor ecx,eax - mov DWORD [16+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[958139571+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [56+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [28+esp] - add ebp,ecx - mov ecx,DWORD [44+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [52+esp] - shr edi,10 - add ebx,DWORD [88+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [4+esp] - xor edx,esi - mov DWORD [52+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [28+esp],esi - xor edx,esi - add ebx,DWORD [8+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [16+esp] - xor esi,ebp - mov DWORD [12+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[1322822218+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [60+esp] - ror esi,2 - add eax,edx - add edx,DWORD [24+esp] - add eax,esi - mov esi,DWORD [48+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [56+esp] - shr edi,10 - add ebx,DWORD [92+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [28+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [esp] - xor edx,ecx - mov DWORD [56+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [24+esp],ecx - xor edx,ecx - add ebx,DWORD [4+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [12+esp] - xor ecx,eax - mov DWORD [8+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[1537002063+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [64+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [20+esp] - add ebp,ecx - mov ecx,DWORD [52+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [60+esp] - shr edi,10 - add ebx,DWORD [32+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [24+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [28+esp] - xor edx,esi - mov DWORD [60+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [20+esp],esi - xor edx,esi - add ebx,DWORD [esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [8+esp] - xor esi,ebp - mov DWORD [4+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[1747873779+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [68+esp] - ror esi,2 - add eax,edx - add edx,DWORD [16+esp] - add eax,esi - mov esi,DWORD [56+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [64+esp] - shr edi,10 - add ebx,DWORD [36+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [20+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [24+esp] - xor edx,ecx - mov DWORD [64+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [16+esp],ecx - xor edx,ecx - add ebx,DWORD [28+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [4+esp] - xor ecx,eax - mov DWORD [esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[1955562222+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [72+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [12+esp] - add ebp,ecx - mov ecx,DWORD [60+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [68+esp] - shr edi,10 - add ebx,DWORD [40+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [16+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [20+esp] - xor edx,esi - mov DWORD [68+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [12+esp],esi - xor edx,esi - add ebx,DWORD [24+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [esp] - xor esi,ebp - mov DWORD [28+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[2024104815+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [76+esp] - ror esi,2 - add eax,edx - add edx,DWORD [8+esp] - add eax,esi - mov esi,DWORD [64+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [72+esp] - shr edi,10 - add ebx,DWORD [44+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [12+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [16+esp] - xor edx,ecx - mov DWORD [72+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [8+esp],ecx - xor edx,ecx - add ebx,DWORD [20+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [28+esp] - xor ecx,eax - mov DWORD [24+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[2227730452+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [80+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [4+esp] - add ebp,ecx - mov ecx,DWORD [68+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [76+esp] - shr edi,10 - add ebx,DWORD [48+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [8+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [12+esp] - xor edx,esi - mov DWORD [76+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [4+esp],esi - xor edx,esi - add ebx,DWORD [16+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [24+esp] - xor esi,ebp - mov DWORD [20+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[2361852424+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [84+esp] - ror esi,2 - add eax,edx - add edx,DWORD [esp] - add eax,esi - mov esi,DWORD [72+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [80+esp] - shr edi,10 - add ebx,DWORD [52+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [4+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [8+esp] - xor edx,ecx - mov DWORD [80+esp],ebx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [esp],ecx - xor edx,ecx - add ebx,DWORD [12+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [20+esp] - xor ecx,eax - mov DWORD [16+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[2428436474+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [88+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [28+esp] - add ebp,ecx - mov ecx,DWORD [76+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [84+esp] - shr edi,10 - add ebx,DWORD [56+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [4+esp] - xor edx,esi - mov DWORD [84+esp],ebx - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [28+esp],esi - xor edx,esi - add ebx,DWORD [8+esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [16+esp] - xor esi,ebp - mov DWORD [12+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[2756734187+edx*1+ebx] - xor esi,ecx - xor eax,edi - mov ecx,DWORD [92+esp] - ror esi,2 - add eax,edx - add edx,DWORD [24+esp] - add eax,esi - mov esi,DWORD [80+esp] - mov ebx,ecx - ror ecx,11 - mov edi,esi - ror esi,2 - xor ecx,ebx - shr ebx,3 - ror ecx,7 - xor esi,edi - xor ebx,ecx - ror esi,17 - add ebx,DWORD [88+esp] - shr edi,10 - add ebx,DWORD [60+esp] - mov ecx,edx - xor edi,esi - mov esi,DWORD [28+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [esp] - xor edx,ecx - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [24+esp],ecx - xor edx,ecx - add ebx,DWORD [4+esp] - xor edi,esi - ror edx,6 - mov ecx,eax - add ebx,edi - ror ecx,9 - mov esi,eax - mov edi,DWORD [12+esp] - xor ecx,eax - mov DWORD [8+esp],eax - xor eax,edi - ror ecx,11 - and ebp,eax - lea edx,[3204031479+edx*1+ebx] - xor ecx,esi - xor ebp,edi - mov esi,DWORD [32+esp] - ror ecx,2 - add ebp,edx - add edx,DWORD [20+esp] - add ebp,ecx - mov ecx,DWORD [84+esp] - mov ebx,esi - ror esi,11 - mov edi,ecx - ror ecx,2 - xor esi,ebx - shr ebx,3 - ror esi,7 - xor ecx,edi - xor ebx,esi - ror ecx,17 - add ebx,DWORD [92+esp] - shr edi,10 - add ebx,DWORD [64+esp] - mov esi,edx - xor edi,ecx - mov ecx,DWORD [24+esp] - ror edx,14 - add ebx,edi - mov edi,DWORD [28+esp] - xor edx,esi - xor ecx,edi - ror edx,5 - and ecx,esi - mov DWORD [20+esp],esi - xor edx,esi - add ebx,DWORD [esp] - xor edi,ecx - ror edx,6 - mov esi,ebp - add ebx,edi - ror esi,9 - mov ecx,ebp - mov edi,DWORD [8+esp] - xor esi,ebp - mov DWORD [4+esp],ebp - xor ebp,edi - ror esi,11 - and eax,ebp - lea edx,[3329325298+edx*1+ebx] - xor esi,ecx - xor eax,edi - ror esi,2 - add eax,edx - add edx,DWORD [16+esp] - add eax,esi - mov esi,DWORD [96+esp] - xor ebp,edi - mov ecx,DWORD [12+esp] - add eax,DWORD [esi] - add ebp,DWORD [4+esi] - add edi,DWORD [8+esi] - add ecx,DWORD [12+esi] - mov DWORD [esi],eax - mov DWORD [4+esi],ebp - mov DWORD [8+esi],edi - mov DWORD [12+esi],ecx - mov DWORD [4+esp],ebp - xor ebp,edi - mov DWORD [8+esp],edi - mov DWORD [12+esp],ecx - mov edi,DWORD [20+esp] - mov ebx,DWORD [24+esp] - mov ecx,DWORD [28+esp] - add edx,DWORD [16+esi] - add edi,DWORD [20+esi] - add ebx,DWORD [24+esi] - add ecx,DWORD [28+esi] - mov DWORD [16+esi],edx - mov DWORD [20+esi],edi - mov DWORD [24+esi],ebx - mov DWORD [28+esi],ecx - mov DWORD [20+esp],edi - mov edi,DWORD [100+esp] - mov DWORD [24+esp],ebx - mov DWORD [28+esp],ecx - cmp edi,DWORD [104+esp] - jb NEAR L$009grand_loop - mov esp,DWORD [108+esp] - pop edi - pop esi - pop ebx - pop ebp - ret -align 32 -L$004shaext: - sub esp,32 - movdqu xmm1,[esi] - lea ebp,[128+ebp] - movdqu xmm2,[16+esi] - movdqa xmm7,[128+ebp] - pshufd xmm0,xmm1,27 - pshufd xmm1,xmm1,177 - pshufd xmm2,xmm2,27 -db 102,15,58,15,202,8 - punpcklqdq xmm2,xmm0 - jmp NEAR L$010loop_shaext -align 16 -L$010loop_shaext: - movdqu xmm3,[edi] - movdqu xmm4,[16+edi] - movdqu xmm5,[32+edi] -db 102,15,56,0,223 - movdqu xmm6,[48+edi] - movdqa [16+esp],xmm2 - movdqa xmm0,[ebp-128] - paddd xmm0,xmm3 -db 102,15,56,0,231 -db 15,56,203,209 - pshufd xmm0,xmm0,14 - nop - movdqa [esp],xmm1 -db 15,56,203,202 - movdqa xmm0,[ebp-112] - paddd xmm0,xmm4 -db 102,15,56,0,239 -db 15,56,203,209 - pshufd xmm0,xmm0,14 - lea edi,[64+edi] -db 15,56,204,220 -db 15,56,203,202 - movdqa xmm0,[ebp-96] - paddd xmm0,xmm5 -db 102,15,56,0,247 -db 15,56,203,209 - pshufd xmm0,xmm0,14 - movdqa xmm7,xmm6 -db 102,15,58,15,253,4 - nop - paddd xmm3,xmm7 -db 15,56,204,229 -db 15,56,203,202 - movdqa xmm0,[ebp-80] - paddd xmm0,xmm6 -db 15,56,205,222 -db 15,56,203,209 - pshufd xmm0,xmm0,14 - movdqa xmm7,xmm3 -db 102,15,58,15,254,4 - nop - paddd xmm4,xmm7 -db 15,56,204,238 -db 15,56,203,202 - movdqa xmm0,[ebp-64] - paddd xmm0,xmm3 -db 15,56,205,227 -db 15,56,203,209 - pshufd xmm0,xmm0,14 - movdqa xmm7,xmm4 -db 102,15,58,15,251,4 - nop - paddd xmm5,xmm7 -db 15,56,204,243 -db 15,56,203,202 - movdqa xmm0,[ebp-48] - paddd xmm0,xmm4 -db 15,56,205,236 -db 15,56,203,209 - pshufd xmm0,xmm0,14 - movdqa xmm7,xmm5 -db 102,15,58,15,252,4 - nop - paddd xmm6,xmm7 -db 15,56,204,220 -db 15,56,203,202 - movdqa xmm0,[ebp-32] - paddd xmm0,xmm5 -db 15,56,205,245 -db 15,56,203,209 - pshufd xmm0,xmm0,14 - movdqa xmm7,xmm6 -db 102,15,58,15,253,4 - nop - paddd xmm3,xmm7 -db 15,56,204,229 -db 15,56,203,202 - movdqa xmm0,[ebp-16] - paddd xmm0,xmm6 -db 15,56,205,222 -db 15,56,203,209 - pshufd xmm0,xmm0,14 - movdqa xmm7,xmm3 -db 102,15,58,15,254,4 - nop - paddd xmm4,xmm7 -db 15,56,204,238 -db 15,56,203,202 - movdqa xmm0,[ebp] - paddd xmm0,xmm3 -db 15,56,205,227 -db 15,56,203,209 - pshufd xmm0,xmm0,14 - movdqa xmm7,xmm4 -db 102,15,58,15,251,4 - nop - paddd xmm5,xmm7 -db 15,56,204,243 -db 15,56,203,202 - movdqa xmm0,[16+ebp] - paddd xmm0,xmm4 -db 15,56,205,236 -db 15,56,203,209 - pshufd xmm0,xmm0,14 - movdqa xmm7,xmm5 -db 102,15,58,15,252,4 - nop - paddd xmm6,xmm7 -db 15,56,204,220 -db 15,56,203,202 - movdqa xmm0,[32+ebp] - paddd xmm0,xmm5 -db 15,56,205,245 -db 15,56,203,209 - pshufd xmm0,xmm0,14 - movdqa xmm7,xmm6 -db 102,15,58,15,253,4 - nop - paddd xmm3,xmm7 -db 15,56,204,229 -db 15,56,203,202 - movdqa xmm0,[48+ebp] - paddd xmm0,xmm6 -db 15,56,205,222 -db 15,56,203,209 - pshufd xmm0,xmm0,14 - movdqa xmm7,xmm3 -db 102,15,58,15,254,4 - nop - paddd xmm4,xmm7 -db 15,56,204,238 -db 15,56,203,202 - movdqa xmm0,[64+ebp] - paddd xmm0,xmm3 -db 15,56,205,227 -db 15,56,203,209 - pshufd xmm0,xmm0,14 - movdqa xmm7,xmm4 -db 102,15,58,15,251,4 - nop - paddd xmm5,xmm7 -db 15,56,204,243 -db 15,56,203,202 - movdqa xmm0,[80+ebp] - paddd xmm0,xmm4 -db 15,56,205,236 -db 15,56,203,209 - pshufd xmm0,xmm0,14 - movdqa xmm7,xmm5 -db 102,15,58,15,252,4 -db 15,56,203,202 - paddd xmm6,xmm7 - movdqa xmm0,[96+ebp] - paddd xmm0,xmm5 -db 15,56,203,209 - pshufd xmm0,xmm0,14 -db 15,56,205,245 - movdqa xmm7,[128+ebp] -db 15,56,203,202 - movdqa xmm0,[112+ebp] - paddd xmm0,xmm6 - nop -db 15,56,203,209 - pshufd xmm0,xmm0,14 - cmp eax,edi - nop -db 15,56,203,202 - paddd xmm2,[16+esp] - paddd xmm1,[esp] - jnz NEAR L$010loop_shaext - pshufd xmm2,xmm2,177 - pshufd xmm7,xmm1,27 - pshufd xmm1,xmm1,177 - punpckhqdq xmm1,xmm2 -db 102,15,58,15,215,8 - mov esp,DWORD [44+esp] - movdqu [esi],xmm1 - movdqu [16+esi],xmm2 - pop edi - pop esi - pop ebx - pop ebp - ret -align 32 -L$005SSSE3: - lea esp,[esp-96] - mov eax,DWORD [esi] - mov ebx,DWORD [4+esi] - mov ecx,DWORD [8+esi] - mov edi,DWORD [12+esi] - mov DWORD [4+esp],ebx - xor ebx,ecx - mov DWORD [8+esp],ecx - mov DWORD [12+esp],edi - mov edx,DWORD [16+esi] - mov edi,DWORD [20+esi] - mov ecx,DWORD [24+esi] - mov esi,DWORD [28+esi] - mov DWORD [20+esp],edi - mov edi,DWORD [100+esp] - mov DWORD [24+esp],ecx - mov DWORD [28+esp],esi - movdqa xmm7,[256+ebp] - jmp NEAR L$011grand_ssse3 -align 16 -L$011grand_ssse3: - movdqu xmm0,[edi] - movdqu xmm1,[16+edi] - movdqu xmm2,[32+edi] - movdqu xmm3,[48+edi] - add edi,64 -db 102,15,56,0,199 - mov DWORD [100+esp],edi -db 102,15,56,0,207 - movdqa xmm4,[ebp] -db 102,15,56,0,215 - movdqa xmm5,[16+ebp] - paddd xmm4,xmm0 -db 102,15,56,0,223 - movdqa xmm6,[32+ebp] - paddd xmm5,xmm1 - movdqa xmm7,[48+ebp] - movdqa [32+esp],xmm4 - paddd xmm6,xmm2 - movdqa [48+esp],xmm5 - paddd xmm7,xmm3 - movdqa [64+esp],xmm6 - movdqa [80+esp],xmm7 - jmp NEAR L$012ssse3_00_47 -align 16 -L$012ssse3_00_47: - add ebp,64 - mov ecx,edx - movdqa xmm4,xmm1 - ror edx,14 - mov esi,DWORD [20+esp] - movdqa xmm7,xmm3 - xor edx,ecx - mov edi,DWORD [24+esp] -db 102,15,58,15,224,4 - xor esi,edi - ror edx,5 - and esi,ecx -db 102,15,58,15,250,4 - mov DWORD [16+esp],ecx - xor edx,ecx - xor edi,esi - movdqa xmm5,xmm4 - ror edx,6 - mov ecx,eax - movdqa xmm6,xmm4 - add edx,edi - mov edi,DWORD [4+esp] - psrld xmm4,3 - mov esi,eax - ror ecx,9 - paddd xmm0,xmm7 - mov DWORD [esp],eax - xor ecx,eax - psrld xmm6,7 - xor eax,edi - add edx,DWORD [28+esp] - ror ecx,11 - and ebx,eax - pshufd xmm7,xmm3,250 - xor ecx,esi - add edx,DWORD [32+esp] - pslld xmm5,14 - xor ebx,edi - ror ecx,2 - pxor xmm4,xmm6 - add ebx,edx - add edx,DWORD [12+esp] - psrld xmm6,11 - add ebx,ecx - mov ecx,edx - ror edx,14 - pxor xmm4,xmm5 - mov esi,DWORD [16+esp] - xor edx,ecx - pslld xmm5,11 - mov edi,DWORD [20+esp] - xor esi,edi - ror edx,5 - pxor xmm4,xmm6 - and esi,ecx - mov DWORD [12+esp],ecx - movdqa xmm6,xmm7 - xor edx,ecx - xor edi,esi - ror edx,6 - pxor xmm4,xmm5 - mov ecx,ebx - add edx,edi - psrld xmm7,10 - mov edi,DWORD [esp] - mov esi,ebx - ror ecx,9 - paddd xmm0,xmm4 - mov DWORD [28+esp],ebx - xor ecx,ebx - psrlq xmm6,17 - xor ebx,edi - add edx,DWORD [24+esp] - ror ecx,11 - pxor xmm7,xmm6 - and eax,ebx - xor ecx,esi - psrlq xmm6,2 - add edx,DWORD [36+esp] - xor eax,edi - ror ecx,2 - pxor xmm7,xmm6 - add eax,edx - add edx,DWORD [8+esp] - pshufd xmm7,xmm7,128 - add eax,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [12+esp] - xor edx,ecx - mov edi,DWORD [16+esp] - xor esi,edi - ror edx,5 - and esi,ecx - psrldq xmm7,8 - mov DWORD [8+esp],ecx - xor edx,ecx - xor edi,esi - paddd xmm0,xmm7 - ror edx,6 - mov ecx,eax - add edx,edi - mov edi,DWORD [28+esp] - mov esi,eax - ror ecx,9 - mov DWORD [24+esp],eax - pshufd xmm7,xmm0,80 - xor ecx,eax - xor eax,edi - add edx,DWORD [20+esp] - movdqa xmm6,xmm7 - ror ecx,11 - psrld xmm7,10 - and ebx,eax - psrlq xmm6,17 - xor ecx,esi - add edx,DWORD [40+esp] - xor ebx,edi - ror ecx,2 - pxor xmm7,xmm6 - add ebx,edx - add edx,DWORD [4+esp] - psrlq xmm6,2 - add ebx,ecx - mov ecx,edx - ror edx,14 - pxor xmm7,xmm6 - mov esi,DWORD [8+esp] - xor edx,ecx - mov edi,DWORD [12+esp] - pshufd xmm7,xmm7,8 - xor esi,edi - ror edx,5 - movdqa xmm6,[ebp] - and esi,ecx - mov DWORD [4+esp],ecx - pslldq xmm7,8 - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,ebx - add edx,edi - mov edi,DWORD [24+esp] - mov esi,ebx - ror ecx,9 - paddd xmm0,xmm7 - mov DWORD [20+esp],ebx - xor ecx,ebx - xor ebx,edi - add edx,DWORD [16+esp] - paddd xmm6,xmm0 - ror ecx,11 - and eax,ebx - xor ecx,esi - add edx,DWORD [44+esp] - xor eax,edi - ror ecx,2 - add eax,edx - add edx,DWORD [esp] - add eax,ecx - movdqa [32+esp],xmm6 - mov ecx,edx - movdqa xmm4,xmm2 - ror edx,14 - mov esi,DWORD [4+esp] - movdqa xmm7,xmm0 - xor edx,ecx - mov edi,DWORD [8+esp] -db 102,15,58,15,225,4 - xor esi,edi - ror edx,5 - and esi,ecx -db 102,15,58,15,251,4 - mov DWORD [esp],ecx - xor edx,ecx - xor edi,esi - movdqa xmm5,xmm4 - ror edx,6 - mov ecx,eax - movdqa xmm6,xmm4 - add edx,edi - mov edi,DWORD [20+esp] - psrld xmm4,3 - mov esi,eax - ror ecx,9 - paddd xmm1,xmm7 - mov DWORD [16+esp],eax - xor ecx,eax - psrld xmm6,7 - xor eax,edi - add edx,DWORD [12+esp] - ror ecx,11 - and ebx,eax - pshufd xmm7,xmm0,250 - xor ecx,esi - add edx,DWORD [48+esp] - pslld xmm5,14 - xor ebx,edi - ror ecx,2 - pxor xmm4,xmm6 - add ebx,edx - add edx,DWORD [28+esp] - psrld xmm6,11 - add ebx,ecx - mov ecx,edx - ror edx,14 - pxor xmm4,xmm5 - mov esi,DWORD [esp] - xor edx,ecx - pslld xmm5,11 - mov edi,DWORD [4+esp] - xor esi,edi - ror edx,5 - pxor xmm4,xmm6 - and esi,ecx - mov DWORD [28+esp],ecx - movdqa xmm6,xmm7 - xor edx,ecx - xor edi,esi - ror edx,6 - pxor xmm4,xmm5 - mov ecx,ebx - add edx,edi - psrld xmm7,10 - mov edi,DWORD [16+esp] - mov esi,ebx - ror ecx,9 - paddd xmm1,xmm4 - mov DWORD [12+esp],ebx - xor ecx,ebx - psrlq xmm6,17 - xor ebx,edi - add edx,DWORD [8+esp] - ror ecx,11 - pxor xmm7,xmm6 - and eax,ebx - xor ecx,esi - psrlq xmm6,2 - add edx,DWORD [52+esp] - xor eax,edi - ror ecx,2 - pxor xmm7,xmm6 - add eax,edx - add edx,DWORD [24+esp] - pshufd xmm7,xmm7,128 - add eax,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [28+esp] - xor edx,ecx - mov edi,DWORD [esp] - xor esi,edi - ror edx,5 - and esi,ecx - psrldq xmm7,8 - mov DWORD [24+esp],ecx - xor edx,ecx - xor edi,esi - paddd xmm1,xmm7 - ror edx,6 - mov ecx,eax - add edx,edi - mov edi,DWORD [12+esp] - mov esi,eax - ror ecx,9 - mov DWORD [8+esp],eax - pshufd xmm7,xmm1,80 - xor ecx,eax - xor eax,edi - add edx,DWORD [4+esp] - movdqa xmm6,xmm7 - ror ecx,11 - psrld xmm7,10 - and ebx,eax - psrlq xmm6,17 - xor ecx,esi - add edx,DWORD [56+esp] - xor ebx,edi - ror ecx,2 - pxor xmm7,xmm6 - add ebx,edx - add edx,DWORD [20+esp] - psrlq xmm6,2 - add ebx,ecx - mov ecx,edx - ror edx,14 - pxor xmm7,xmm6 - mov esi,DWORD [24+esp] - xor edx,ecx - mov edi,DWORD [28+esp] - pshufd xmm7,xmm7,8 - xor esi,edi - ror edx,5 - movdqa xmm6,[16+ebp] - and esi,ecx - mov DWORD [20+esp],ecx - pslldq xmm7,8 - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,ebx - add edx,edi - mov edi,DWORD [8+esp] - mov esi,ebx - ror ecx,9 - paddd xmm1,xmm7 - mov DWORD [4+esp],ebx - xor ecx,ebx - xor ebx,edi - add edx,DWORD [esp] - paddd xmm6,xmm1 - ror ecx,11 - and eax,ebx - xor ecx,esi - add edx,DWORD [60+esp] - xor eax,edi - ror ecx,2 - add eax,edx - add edx,DWORD [16+esp] - add eax,ecx - movdqa [48+esp],xmm6 - mov ecx,edx - movdqa xmm4,xmm3 - ror edx,14 - mov esi,DWORD [20+esp] - movdqa xmm7,xmm1 - xor edx,ecx - mov edi,DWORD [24+esp] -db 102,15,58,15,226,4 - xor esi,edi - ror edx,5 - and esi,ecx -db 102,15,58,15,248,4 - mov DWORD [16+esp],ecx - xor edx,ecx - xor edi,esi - movdqa xmm5,xmm4 - ror edx,6 - mov ecx,eax - movdqa xmm6,xmm4 - add edx,edi - mov edi,DWORD [4+esp] - psrld xmm4,3 - mov esi,eax - ror ecx,9 - paddd xmm2,xmm7 - mov DWORD [esp],eax - xor ecx,eax - psrld xmm6,7 - xor eax,edi - add edx,DWORD [28+esp] - ror ecx,11 - and ebx,eax - pshufd xmm7,xmm1,250 - xor ecx,esi - add edx,DWORD [64+esp] - pslld xmm5,14 - xor ebx,edi - ror ecx,2 - pxor xmm4,xmm6 - add ebx,edx - add edx,DWORD [12+esp] - psrld xmm6,11 - add ebx,ecx - mov ecx,edx - ror edx,14 - pxor xmm4,xmm5 - mov esi,DWORD [16+esp] - xor edx,ecx - pslld xmm5,11 - mov edi,DWORD [20+esp] - xor esi,edi - ror edx,5 - pxor xmm4,xmm6 - and esi,ecx - mov DWORD [12+esp],ecx - movdqa xmm6,xmm7 - xor edx,ecx - xor edi,esi - ror edx,6 - pxor xmm4,xmm5 - mov ecx,ebx - add edx,edi - psrld xmm7,10 - mov edi,DWORD [esp] - mov esi,ebx - ror ecx,9 - paddd xmm2,xmm4 - mov DWORD [28+esp],ebx - xor ecx,ebx - psrlq xmm6,17 - xor ebx,edi - add edx,DWORD [24+esp] - ror ecx,11 - pxor xmm7,xmm6 - and eax,ebx - xor ecx,esi - psrlq xmm6,2 - add edx,DWORD [68+esp] - xor eax,edi - ror ecx,2 - pxor xmm7,xmm6 - add eax,edx - add edx,DWORD [8+esp] - pshufd xmm7,xmm7,128 - add eax,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [12+esp] - xor edx,ecx - mov edi,DWORD [16+esp] - xor esi,edi - ror edx,5 - and esi,ecx - psrldq xmm7,8 - mov DWORD [8+esp],ecx - xor edx,ecx - xor edi,esi - paddd xmm2,xmm7 - ror edx,6 - mov ecx,eax - add edx,edi - mov edi,DWORD [28+esp] - mov esi,eax - ror ecx,9 - mov DWORD [24+esp],eax - pshufd xmm7,xmm2,80 - xor ecx,eax - xor eax,edi - add edx,DWORD [20+esp] - movdqa xmm6,xmm7 - ror ecx,11 - psrld xmm7,10 - and ebx,eax - psrlq xmm6,17 - xor ecx,esi - add edx,DWORD [72+esp] - xor ebx,edi - ror ecx,2 - pxor xmm7,xmm6 - add ebx,edx - add edx,DWORD [4+esp] - psrlq xmm6,2 - add ebx,ecx - mov ecx,edx - ror edx,14 - pxor xmm7,xmm6 - mov esi,DWORD [8+esp] - xor edx,ecx - mov edi,DWORD [12+esp] - pshufd xmm7,xmm7,8 - xor esi,edi - ror edx,5 - movdqa xmm6,[32+ebp] - and esi,ecx - mov DWORD [4+esp],ecx - pslldq xmm7,8 - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,ebx - add edx,edi - mov edi,DWORD [24+esp] - mov esi,ebx - ror ecx,9 - paddd xmm2,xmm7 - mov DWORD [20+esp],ebx - xor ecx,ebx - xor ebx,edi - add edx,DWORD [16+esp] - paddd xmm6,xmm2 - ror ecx,11 - and eax,ebx - xor ecx,esi - add edx,DWORD [76+esp] - xor eax,edi - ror ecx,2 - add eax,edx - add edx,DWORD [esp] - add eax,ecx - movdqa [64+esp],xmm6 - mov ecx,edx - movdqa xmm4,xmm0 - ror edx,14 - mov esi,DWORD [4+esp] - movdqa xmm7,xmm2 - xor edx,ecx - mov edi,DWORD [8+esp] -db 102,15,58,15,227,4 - xor esi,edi - ror edx,5 - and esi,ecx -db 102,15,58,15,249,4 - mov DWORD [esp],ecx - xor edx,ecx - xor edi,esi - movdqa xmm5,xmm4 - ror edx,6 - mov ecx,eax - movdqa xmm6,xmm4 - add edx,edi - mov edi,DWORD [20+esp] - psrld xmm4,3 - mov esi,eax - ror ecx,9 - paddd xmm3,xmm7 - mov DWORD [16+esp],eax - xor ecx,eax - psrld xmm6,7 - xor eax,edi - add edx,DWORD [12+esp] - ror ecx,11 - and ebx,eax - pshufd xmm7,xmm2,250 - xor ecx,esi - add edx,DWORD [80+esp] - pslld xmm5,14 - xor ebx,edi - ror ecx,2 - pxor xmm4,xmm6 - add ebx,edx - add edx,DWORD [28+esp] - psrld xmm6,11 - add ebx,ecx - mov ecx,edx - ror edx,14 - pxor xmm4,xmm5 - mov esi,DWORD [esp] - xor edx,ecx - pslld xmm5,11 - mov edi,DWORD [4+esp] - xor esi,edi - ror edx,5 - pxor xmm4,xmm6 - and esi,ecx - mov DWORD [28+esp],ecx - movdqa xmm6,xmm7 - xor edx,ecx - xor edi,esi - ror edx,6 - pxor xmm4,xmm5 - mov ecx,ebx - add edx,edi - psrld xmm7,10 - mov edi,DWORD [16+esp] - mov esi,ebx - ror ecx,9 - paddd xmm3,xmm4 - mov DWORD [12+esp],ebx - xor ecx,ebx - psrlq xmm6,17 - xor ebx,edi - add edx,DWORD [8+esp] - ror ecx,11 - pxor xmm7,xmm6 - and eax,ebx - xor ecx,esi - psrlq xmm6,2 - add edx,DWORD [84+esp] - xor eax,edi - ror ecx,2 - pxor xmm7,xmm6 - add eax,edx - add edx,DWORD [24+esp] - pshufd xmm7,xmm7,128 - add eax,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [28+esp] - xor edx,ecx - mov edi,DWORD [esp] - xor esi,edi - ror edx,5 - and esi,ecx - psrldq xmm7,8 - mov DWORD [24+esp],ecx - xor edx,ecx - xor edi,esi - paddd xmm3,xmm7 - ror edx,6 - mov ecx,eax - add edx,edi - mov edi,DWORD [12+esp] - mov esi,eax - ror ecx,9 - mov DWORD [8+esp],eax - pshufd xmm7,xmm3,80 - xor ecx,eax - xor eax,edi - add edx,DWORD [4+esp] - movdqa xmm6,xmm7 - ror ecx,11 - psrld xmm7,10 - and ebx,eax - psrlq xmm6,17 - xor ecx,esi - add edx,DWORD [88+esp] - xor ebx,edi - ror ecx,2 - pxor xmm7,xmm6 - add ebx,edx - add edx,DWORD [20+esp] - psrlq xmm6,2 - add ebx,ecx - mov ecx,edx - ror edx,14 - pxor xmm7,xmm6 - mov esi,DWORD [24+esp] - xor edx,ecx - mov edi,DWORD [28+esp] - pshufd xmm7,xmm7,8 - xor esi,edi - ror edx,5 - movdqa xmm6,[48+ebp] - and esi,ecx - mov DWORD [20+esp],ecx - pslldq xmm7,8 - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,ebx - add edx,edi - mov edi,DWORD [8+esp] - mov esi,ebx - ror ecx,9 - paddd xmm3,xmm7 - mov DWORD [4+esp],ebx - xor ecx,ebx - xor ebx,edi - add edx,DWORD [esp] - paddd xmm6,xmm3 - ror ecx,11 - and eax,ebx - xor ecx,esi - add edx,DWORD [92+esp] - xor eax,edi - ror ecx,2 - add eax,edx - add edx,DWORD [16+esp] - add eax,ecx - movdqa [80+esp],xmm6 - cmp DWORD [64+ebp],66051 - jne NEAR L$012ssse3_00_47 - mov ecx,edx - ror edx,14 - mov esi,DWORD [20+esp] - xor edx,ecx - mov edi,DWORD [24+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [16+esp],ecx - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,eax - add edx,edi - mov edi,DWORD [4+esp] - mov esi,eax - ror ecx,9 - mov DWORD [esp],eax - xor ecx,eax - xor eax,edi - add edx,DWORD [28+esp] - ror ecx,11 - and ebx,eax - xor ecx,esi - add edx,DWORD [32+esp] - xor ebx,edi - ror ecx,2 - add ebx,edx - add edx,DWORD [12+esp] - add ebx,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [16+esp] - xor edx,ecx - mov edi,DWORD [20+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [12+esp],ecx - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,ebx - add edx,edi - mov edi,DWORD [esp] - mov esi,ebx - ror ecx,9 - mov DWORD [28+esp],ebx - xor ecx,ebx - xor ebx,edi - add edx,DWORD [24+esp] - ror ecx,11 - and eax,ebx - xor ecx,esi - add edx,DWORD [36+esp] - xor eax,edi - ror ecx,2 - add eax,edx - add edx,DWORD [8+esp] - add eax,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [12+esp] - xor edx,ecx - mov edi,DWORD [16+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [8+esp],ecx - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,eax - add edx,edi - mov edi,DWORD [28+esp] - mov esi,eax - ror ecx,9 - mov DWORD [24+esp],eax - xor ecx,eax - xor eax,edi - add edx,DWORD [20+esp] - ror ecx,11 - and ebx,eax - xor ecx,esi - add edx,DWORD [40+esp] - xor ebx,edi - ror ecx,2 - add ebx,edx - add edx,DWORD [4+esp] - add ebx,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [8+esp] - xor edx,ecx - mov edi,DWORD [12+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [4+esp],ecx - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,ebx - add edx,edi - mov edi,DWORD [24+esp] - mov esi,ebx - ror ecx,9 - mov DWORD [20+esp],ebx - xor ecx,ebx - xor ebx,edi - add edx,DWORD [16+esp] - ror ecx,11 - and eax,ebx - xor ecx,esi - add edx,DWORD [44+esp] - xor eax,edi - ror ecx,2 - add eax,edx - add edx,DWORD [esp] - add eax,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [4+esp] - xor edx,ecx - mov edi,DWORD [8+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [esp],ecx - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,eax - add edx,edi - mov edi,DWORD [20+esp] - mov esi,eax - ror ecx,9 - mov DWORD [16+esp],eax - xor ecx,eax - xor eax,edi - add edx,DWORD [12+esp] - ror ecx,11 - and ebx,eax - xor ecx,esi - add edx,DWORD [48+esp] - xor ebx,edi - ror ecx,2 - add ebx,edx - add edx,DWORD [28+esp] - add ebx,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [esp] - xor edx,ecx - mov edi,DWORD [4+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [28+esp],ecx - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,ebx - add edx,edi - mov edi,DWORD [16+esp] - mov esi,ebx - ror ecx,9 - mov DWORD [12+esp],ebx - xor ecx,ebx - xor ebx,edi - add edx,DWORD [8+esp] - ror ecx,11 - and eax,ebx - xor ecx,esi - add edx,DWORD [52+esp] - xor eax,edi - ror ecx,2 - add eax,edx - add edx,DWORD [24+esp] - add eax,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [28+esp] - xor edx,ecx - mov edi,DWORD [esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [24+esp],ecx - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,eax - add edx,edi - mov edi,DWORD [12+esp] - mov esi,eax - ror ecx,9 - mov DWORD [8+esp],eax - xor ecx,eax - xor eax,edi - add edx,DWORD [4+esp] - ror ecx,11 - and ebx,eax - xor ecx,esi - add edx,DWORD [56+esp] - xor ebx,edi - ror ecx,2 - add ebx,edx - add edx,DWORD [20+esp] - add ebx,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [24+esp] - xor edx,ecx - mov edi,DWORD [28+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [20+esp],ecx - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,ebx - add edx,edi - mov edi,DWORD [8+esp] - mov esi,ebx - ror ecx,9 - mov DWORD [4+esp],ebx - xor ecx,ebx - xor ebx,edi - add edx,DWORD [esp] - ror ecx,11 - and eax,ebx - xor ecx,esi - add edx,DWORD [60+esp] - xor eax,edi - ror ecx,2 - add eax,edx - add edx,DWORD [16+esp] - add eax,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [20+esp] - xor edx,ecx - mov edi,DWORD [24+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [16+esp],ecx - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,eax - add edx,edi - mov edi,DWORD [4+esp] - mov esi,eax - ror ecx,9 - mov DWORD [esp],eax - xor ecx,eax - xor eax,edi - add edx,DWORD [28+esp] - ror ecx,11 - and ebx,eax - xor ecx,esi - add edx,DWORD [64+esp] - xor ebx,edi - ror ecx,2 - add ebx,edx - add edx,DWORD [12+esp] - add ebx,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [16+esp] - xor edx,ecx - mov edi,DWORD [20+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [12+esp],ecx - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,ebx - add edx,edi - mov edi,DWORD [esp] - mov esi,ebx - ror ecx,9 - mov DWORD [28+esp],ebx - xor ecx,ebx - xor ebx,edi - add edx,DWORD [24+esp] - ror ecx,11 - and eax,ebx - xor ecx,esi - add edx,DWORD [68+esp] - xor eax,edi - ror ecx,2 - add eax,edx - add edx,DWORD [8+esp] - add eax,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [12+esp] - xor edx,ecx - mov edi,DWORD [16+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [8+esp],ecx - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,eax - add edx,edi - mov edi,DWORD [28+esp] - mov esi,eax - ror ecx,9 - mov DWORD [24+esp],eax - xor ecx,eax - xor eax,edi - add edx,DWORD [20+esp] - ror ecx,11 - and ebx,eax - xor ecx,esi - add edx,DWORD [72+esp] - xor ebx,edi - ror ecx,2 - add ebx,edx - add edx,DWORD [4+esp] - add ebx,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [8+esp] - xor edx,ecx - mov edi,DWORD [12+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [4+esp],ecx - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,ebx - add edx,edi - mov edi,DWORD [24+esp] - mov esi,ebx - ror ecx,9 - mov DWORD [20+esp],ebx - xor ecx,ebx - xor ebx,edi - add edx,DWORD [16+esp] - ror ecx,11 - and eax,ebx - xor ecx,esi - add edx,DWORD [76+esp] - xor eax,edi - ror ecx,2 - add eax,edx - add edx,DWORD [esp] - add eax,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [4+esp] - xor edx,ecx - mov edi,DWORD [8+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [esp],ecx - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,eax - add edx,edi - mov edi,DWORD [20+esp] - mov esi,eax - ror ecx,9 - mov DWORD [16+esp],eax - xor ecx,eax - xor eax,edi - add edx,DWORD [12+esp] - ror ecx,11 - and ebx,eax - xor ecx,esi - add edx,DWORD [80+esp] - xor ebx,edi - ror ecx,2 - add ebx,edx - add edx,DWORD [28+esp] - add ebx,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [esp] - xor edx,ecx - mov edi,DWORD [4+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [28+esp],ecx - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,ebx - add edx,edi - mov edi,DWORD [16+esp] - mov esi,ebx - ror ecx,9 - mov DWORD [12+esp],ebx - xor ecx,ebx - xor ebx,edi - add edx,DWORD [8+esp] - ror ecx,11 - and eax,ebx - xor ecx,esi - add edx,DWORD [84+esp] - xor eax,edi - ror ecx,2 - add eax,edx - add edx,DWORD [24+esp] - add eax,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [28+esp] - xor edx,ecx - mov edi,DWORD [esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [24+esp],ecx - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,eax - add edx,edi - mov edi,DWORD [12+esp] - mov esi,eax - ror ecx,9 - mov DWORD [8+esp],eax - xor ecx,eax - xor eax,edi - add edx,DWORD [4+esp] - ror ecx,11 - and ebx,eax - xor ecx,esi - add edx,DWORD [88+esp] - xor ebx,edi - ror ecx,2 - add ebx,edx - add edx,DWORD [20+esp] - add ebx,ecx - mov ecx,edx - ror edx,14 - mov esi,DWORD [24+esp] - xor edx,ecx - mov edi,DWORD [28+esp] - xor esi,edi - ror edx,5 - and esi,ecx - mov DWORD [20+esp],ecx - xor edx,ecx - xor edi,esi - ror edx,6 - mov ecx,ebx - add edx,edi - mov edi,DWORD [8+esp] - mov esi,ebx - ror ecx,9 - mov DWORD [4+esp],ebx - xor ecx,ebx - xor ebx,edi - add edx,DWORD [esp] - ror ecx,11 - and eax,ebx - xor ecx,esi - add edx,DWORD [92+esp] - xor eax,edi - ror ecx,2 - add eax,edx - add edx,DWORD [16+esp] - add eax,ecx - mov esi,DWORD [96+esp] - xor ebx,edi - mov ecx,DWORD [12+esp] - add eax,DWORD [esi] - add ebx,DWORD [4+esi] - add edi,DWORD [8+esi] - add ecx,DWORD [12+esi] - mov DWORD [esi],eax - mov DWORD [4+esi],ebx - mov DWORD [8+esi],edi - mov DWORD [12+esi],ecx - mov DWORD [4+esp],ebx - xor ebx,edi - mov DWORD [8+esp],edi - mov DWORD [12+esp],ecx - mov edi,DWORD [20+esp] - mov ecx,DWORD [24+esp] - add edx,DWORD [16+esi] - add edi,DWORD [20+esi] - add ecx,DWORD [24+esi] - mov DWORD [16+esi],edx - mov DWORD [20+esi],edi - mov DWORD [20+esp],edi - mov edi,DWORD [28+esp] - mov DWORD [24+esi],ecx - add edi,DWORD [28+esi] - mov DWORD [24+esp],ecx - mov DWORD [28+esi],edi - mov DWORD [28+esp],edi - mov edi,DWORD [100+esp] - movdqa xmm7,[64+ebp] - sub ebp,192 - cmp edi,DWORD [104+esp] - jb NEAR L$011grand_ssse3 - mov esp,DWORD [108+esp] - pop edi - pop esi - pop ebx - pop ebp - ret -segment .bss -common _OPENSSL_ia32cap_P 16 diff --git a/third_party/boringssl/win-x86/crypto/sha/sha512-586.asm b/third_party/boringssl/win-x86/crypto/sha/sha512-586.asm deleted file mode 100644 index 88ed0b380d088..0000000000000 --- a/third_party/boringssl/win-x86/crypto/sha/sha512-586.asm +++ /dev/null @@ -1,2843 +0,0 @@ -%ifidn __OUTPUT_FORMAT__,obj -section code use32 class=code align=64 -%elifidn __OUTPUT_FORMAT__,win32 -%ifdef __YASM_VERSION_ID__ -%if __YASM_VERSION_ID__ < 01010000h -%error yasm version 1.1.0 or later needed. -%endif -; Yasm automatically includes .00 and complains about redefining it. -; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html -%else -$@feat.00 equ 1 -%endif -section .text code align=64 -%else -section .text code -%endif -;extern _OPENSSL_ia32cap_P -global _sha512_block_data_order -align 16 -_sha512_block_data_order: -L$_sha512_block_data_order_begin: - push ebp - push ebx - push esi - push edi - mov esi,DWORD [20+esp] - mov edi,DWORD [24+esp] - mov eax,DWORD [28+esp] - mov ebx,esp - call L$000pic_point -L$000pic_point: - pop ebp - lea ebp,[(L$001K512-L$000pic_point)+ebp] - sub esp,16 - and esp,-64 - shl eax,7 - add eax,edi - mov DWORD [esp],esi - mov DWORD [4+esp],edi - mov DWORD [8+esp],eax - mov DWORD [12+esp],ebx - lea edx,[_OPENSSL_ia32cap_P] - mov ecx,DWORD [edx] - test ecx,67108864 - jz NEAR L$002loop_x86 - mov edx,DWORD [4+edx] - movq mm0,[esi] - and ecx,16777216 - movq mm1,[8+esi] - and edx,512 - movq mm2,[16+esi] - or ecx,edx - movq mm3,[24+esi] - movq mm4,[32+esi] - movq mm5,[40+esi] - movq mm6,[48+esi] - movq mm7,[56+esi] - cmp ecx,16777728 - je NEAR L$003SSSE3 - sub esp,80 - jmp NEAR L$004loop_sse2 -align 16 -L$004loop_sse2: - movq [8+esp],mm1 - movq [16+esp],mm2 - movq [24+esp],mm3 - movq [40+esp],mm5 - movq [48+esp],mm6 - pxor mm2,mm1 - movq [56+esp],mm7 - movq mm3,mm0 - mov eax,DWORD [edi] - mov ebx,DWORD [4+edi] - add edi,8 - mov edx,15 - bswap eax - bswap ebx - jmp NEAR L$00500_14_sse2 -align 16 -L$00500_14_sse2: - movd mm1,eax - mov eax,DWORD [edi] - movd mm7,ebx - mov ebx,DWORD [4+edi] - add edi,8 - bswap eax - bswap ebx - punpckldq mm7,mm1 - movq mm1,mm4 - pxor mm5,mm6 - psrlq mm1,14 - movq [32+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - movq mm0,mm3 - movq [72+esp],mm7 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[56+esp] - pxor mm3,mm1 - psllq mm4,4 - paddq mm7,[ebp] - pxor mm3,mm4 - movq mm4,[24+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[8+esp] - psrlq mm5,6 - pxor mm7,mm6 - sub esp,8 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm5,[40+esp] - paddq mm3,mm2 - movq mm2,mm0 - add ebp,8 - paddq mm3,mm6 - movq mm6,[48+esp] - dec edx - jnz NEAR L$00500_14_sse2 - movd mm1,eax - movd mm7,ebx - punpckldq mm7,mm1 - movq mm1,mm4 - pxor mm5,mm6 - psrlq mm1,14 - movq [32+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - movq mm0,mm3 - movq [72+esp],mm7 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[56+esp] - pxor mm3,mm1 - psllq mm4,4 - paddq mm7,[ebp] - pxor mm3,mm4 - movq mm4,[24+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[8+esp] - psrlq mm5,6 - pxor mm7,mm6 - sub esp,8 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm7,[192+esp] - paddq mm3,mm2 - movq mm2,mm0 - add ebp,8 - paddq mm3,mm6 - pxor mm0,mm0 - mov edx,32 - jmp NEAR L$00616_79_sse2 -align 16 -L$00616_79_sse2: - movq mm5,[88+esp] - movq mm1,mm7 - psrlq mm7,1 - movq mm6,mm5 - psrlq mm5,6 - psllq mm1,56 - paddq mm0,mm3 - movq mm3,mm7 - psrlq mm7,6 - pxor mm3,mm1 - psllq mm1,7 - pxor mm3,mm7 - psrlq mm7,1 - pxor mm3,mm1 - movq mm1,mm5 - psrlq mm5,13 - pxor mm7,mm3 - psllq mm6,3 - pxor mm1,mm5 - paddq mm7,[200+esp] - pxor mm1,mm6 - psrlq mm5,42 - paddq mm7,[128+esp] - pxor mm1,mm5 - psllq mm6,42 - movq mm5,[40+esp] - pxor mm1,mm6 - movq mm6,[48+esp] - paddq mm7,mm1 - movq mm1,mm4 - pxor mm5,mm6 - psrlq mm1,14 - movq [32+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - movq [72+esp],mm7 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[56+esp] - pxor mm3,mm1 - psllq mm4,4 - paddq mm7,[ebp] - pxor mm3,mm4 - movq mm4,[24+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[8+esp] - psrlq mm5,6 - pxor mm7,mm6 - sub esp,8 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm7,[192+esp] - paddq mm2,mm6 - add ebp,8 - movq mm5,[88+esp] - movq mm1,mm7 - psrlq mm7,1 - movq mm6,mm5 - psrlq mm5,6 - psllq mm1,56 - paddq mm2,mm3 - movq mm3,mm7 - psrlq mm7,6 - pxor mm3,mm1 - psllq mm1,7 - pxor mm3,mm7 - psrlq mm7,1 - pxor mm3,mm1 - movq mm1,mm5 - psrlq mm5,13 - pxor mm7,mm3 - psllq mm6,3 - pxor mm1,mm5 - paddq mm7,[200+esp] - pxor mm1,mm6 - psrlq mm5,42 - paddq mm7,[128+esp] - pxor mm1,mm5 - psllq mm6,42 - movq mm5,[40+esp] - pxor mm1,mm6 - movq mm6,[48+esp] - paddq mm7,mm1 - movq mm1,mm4 - pxor mm5,mm6 - psrlq mm1,14 - movq [32+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - movq [72+esp],mm7 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [esp],mm2 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[56+esp] - pxor mm3,mm1 - psllq mm4,4 - paddq mm7,[ebp] - pxor mm3,mm4 - movq mm4,[24+esp] - paddq mm3,mm7 - movq mm5,mm2 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm2 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[8+esp] - psrlq mm5,6 - pxor mm7,mm6 - sub esp,8 - psllq mm6,5 - pxor mm7,mm5 - pxor mm2,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm0,mm2 - psllq mm6,6 - pxor mm7,mm5 - pxor mm0,mm1 - pxor mm6,mm7 - movq mm7,[192+esp] - paddq mm0,mm6 - add ebp,8 - dec edx - jnz NEAR L$00616_79_sse2 - paddq mm0,mm3 - movq mm1,[8+esp] - movq mm3,[24+esp] - movq mm5,[40+esp] - movq mm6,[48+esp] - movq mm7,[56+esp] - pxor mm2,mm1 - paddq mm0,[esi] - paddq mm1,[8+esi] - paddq mm2,[16+esi] - paddq mm3,[24+esi] - paddq mm4,[32+esi] - paddq mm5,[40+esi] - paddq mm6,[48+esi] - paddq mm7,[56+esi] - mov eax,640 - movq [esi],mm0 - movq [8+esi],mm1 - movq [16+esi],mm2 - movq [24+esi],mm3 - movq [32+esi],mm4 - movq [40+esi],mm5 - movq [48+esi],mm6 - movq [56+esi],mm7 - lea esp,[eax*1+esp] - sub ebp,eax - cmp edi,DWORD [88+esp] - jb NEAR L$004loop_sse2 - mov esp,DWORD [92+esp] - emms - pop edi - pop esi - pop ebx - pop ebp - ret -align 32 -L$003SSSE3: - lea edx,[esp-64] - sub esp,256 - movdqa xmm1,[640+ebp] - movdqu xmm0,[edi] -db 102,15,56,0,193 - movdqa xmm3,[ebp] - movdqa xmm2,xmm1 - movdqu xmm1,[16+edi] - paddq xmm3,xmm0 -db 102,15,56,0,202 - movdqa [edx-128],xmm3 - movdqa xmm4,[16+ebp] - movdqa xmm3,xmm2 - movdqu xmm2,[32+edi] - paddq xmm4,xmm1 -db 102,15,56,0,211 - movdqa [edx-112],xmm4 - movdqa xmm5,[32+ebp] - movdqa xmm4,xmm3 - movdqu xmm3,[48+edi] - paddq xmm5,xmm2 -db 102,15,56,0,220 - movdqa [edx-96],xmm5 - movdqa xmm6,[48+ebp] - movdqa xmm5,xmm4 - movdqu xmm4,[64+edi] - paddq xmm6,xmm3 -db 102,15,56,0,229 - movdqa [edx-80],xmm6 - movdqa xmm7,[64+ebp] - movdqa xmm6,xmm5 - movdqu xmm5,[80+edi] - paddq xmm7,xmm4 -db 102,15,56,0,238 - movdqa [edx-64],xmm7 - movdqa [edx],xmm0 - movdqa xmm0,[80+ebp] - movdqa xmm7,xmm6 - movdqu xmm6,[96+edi] - paddq xmm0,xmm5 -db 102,15,56,0,247 - movdqa [edx-48],xmm0 - movdqa [16+edx],xmm1 - movdqa xmm1,[96+ebp] - movdqa xmm0,xmm7 - movdqu xmm7,[112+edi] - paddq xmm1,xmm6 -db 102,15,56,0,248 - movdqa [edx-32],xmm1 - movdqa [32+edx],xmm2 - movdqa xmm2,[112+ebp] - movdqa xmm0,[edx] - paddq xmm2,xmm7 - movdqa [edx-16],xmm2 - nop -align 32 -L$007loop_ssse3: - movdqa xmm2,[16+edx] - movdqa [48+edx],xmm3 - lea ebp,[128+ebp] - movq [8+esp],mm1 - mov ebx,edi - movq [16+esp],mm2 - lea edi,[128+edi] - movq [24+esp],mm3 - cmp edi,eax - movq [40+esp],mm5 - cmovb ebx,edi - movq [48+esp],mm6 - mov ecx,4 - pxor mm2,mm1 - movq [56+esp],mm7 - pxor mm3,mm3 - jmp NEAR L$00800_47_ssse3 -align 32 -L$00800_47_ssse3: - movdqa xmm3,xmm5 - movdqa xmm1,xmm2 -db 102,15,58,15,208,8 - movdqa [edx],xmm4 -db 102,15,58,15,220,8 - movdqa xmm4,xmm2 - psrlq xmm2,7 - paddq xmm0,xmm3 - movdqa xmm3,xmm4 - psrlq xmm4,1 - psllq xmm3,56 - pxor xmm2,xmm4 - psrlq xmm4,7 - pxor xmm2,xmm3 - psllq xmm3,7 - pxor xmm2,xmm4 - movdqa xmm4,xmm7 - pxor xmm2,xmm3 - movdqa xmm3,xmm7 - psrlq xmm4,6 - paddq xmm0,xmm2 - movdqa xmm2,xmm7 - psrlq xmm3,19 - psllq xmm2,3 - pxor xmm4,xmm3 - psrlq xmm3,42 - pxor xmm4,xmm2 - psllq xmm2,42 - pxor xmm4,xmm3 - movdqa xmm3,[32+edx] - pxor xmm4,xmm2 - movdqa xmm2,[ebp] - movq mm1,mm4 - paddq xmm0,xmm4 - movq mm7,[edx-128] - pxor mm5,mm6 - psrlq mm1,14 - movq [32+esp],mm4 - paddq xmm2,xmm0 - pand mm5,mm4 - psllq mm4,23 - paddq mm0,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[56+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[24+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[8+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm5,[32+esp] - paddq mm2,mm6 - movq mm6,[40+esp] - movq mm1,mm4 - movq mm7,[edx-120] - pxor mm5,mm6 - psrlq mm1,14 - movq [24+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm2,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [56+esp],mm2 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[48+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[16+esp] - paddq mm3,mm7 - movq mm5,mm2 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm2 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm2,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm0,mm2 - psllq mm6,6 - pxor mm7,mm5 - pxor mm0,mm1 - pxor mm6,mm7 - movq mm5,[24+esp] - paddq mm0,mm6 - movq mm6,[32+esp] - movdqa [edx-128],xmm2 - movdqa xmm4,xmm6 - movdqa xmm2,xmm3 -db 102,15,58,15,217,8 - movdqa [16+edx],xmm5 -db 102,15,58,15,229,8 - movdqa xmm5,xmm3 - psrlq xmm3,7 - paddq xmm1,xmm4 - movdqa xmm4,xmm5 - psrlq xmm5,1 - psllq xmm4,56 - pxor xmm3,xmm5 - psrlq xmm5,7 - pxor xmm3,xmm4 - psllq xmm4,7 - pxor xmm3,xmm5 - movdqa xmm5,xmm0 - pxor xmm3,xmm4 - movdqa xmm4,xmm0 - psrlq xmm5,6 - paddq xmm1,xmm3 - movdqa xmm3,xmm0 - psrlq xmm4,19 - psllq xmm3,3 - pxor xmm5,xmm4 - psrlq xmm4,42 - pxor xmm5,xmm3 - psllq xmm3,42 - pxor xmm5,xmm4 - movdqa xmm4,[48+edx] - pxor xmm5,xmm3 - movdqa xmm3,[16+ebp] - movq mm1,mm4 - paddq xmm1,xmm5 - movq mm7,[edx-112] - pxor mm5,mm6 - psrlq mm1,14 - movq [16+esp],mm4 - paddq xmm3,xmm1 - pand mm5,mm4 - psllq mm4,23 - paddq mm0,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [48+esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[40+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[8+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[56+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm5,[16+esp] - paddq mm2,mm6 - movq mm6,[24+esp] - movq mm1,mm4 - movq mm7,[edx-104] - pxor mm5,mm6 - psrlq mm1,14 - movq [8+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm2,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [40+esp],mm2 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[32+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[esp] - paddq mm3,mm7 - movq mm5,mm2 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm2 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[48+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm2,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm0,mm2 - psllq mm6,6 - pxor mm7,mm5 - pxor mm0,mm1 - pxor mm6,mm7 - movq mm5,[8+esp] - paddq mm0,mm6 - movq mm6,[16+esp] - movdqa [edx-112],xmm3 - movdqa xmm5,xmm7 - movdqa xmm3,xmm4 -db 102,15,58,15,226,8 - movdqa [32+edx],xmm6 -db 102,15,58,15,238,8 - movdqa xmm6,xmm4 - psrlq xmm4,7 - paddq xmm2,xmm5 - movdqa xmm5,xmm6 - psrlq xmm6,1 - psllq xmm5,56 - pxor xmm4,xmm6 - psrlq xmm6,7 - pxor xmm4,xmm5 - psllq xmm5,7 - pxor xmm4,xmm6 - movdqa xmm6,xmm1 - pxor xmm4,xmm5 - movdqa xmm5,xmm1 - psrlq xmm6,6 - paddq xmm2,xmm4 - movdqa xmm4,xmm1 - psrlq xmm5,19 - psllq xmm4,3 - pxor xmm6,xmm5 - psrlq xmm5,42 - pxor xmm6,xmm4 - psllq xmm4,42 - pxor xmm6,xmm5 - movdqa xmm5,[edx] - pxor xmm6,xmm4 - movdqa xmm4,[32+ebp] - movq mm1,mm4 - paddq xmm2,xmm6 - movq mm7,[edx-96] - pxor mm5,mm6 - psrlq mm1,14 - movq [esp],mm4 - paddq xmm4,xmm2 - pand mm5,mm4 - psllq mm4,23 - paddq mm0,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [32+esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[24+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[56+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[40+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm5,[esp] - paddq mm2,mm6 - movq mm6,[8+esp] - movq mm1,mm4 - movq mm7,[edx-88] - pxor mm5,mm6 - psrlq mm1,14 - movq [56+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm2,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [24+esp],mm2 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[16+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[48+esp] - paddq mm3,mm7 - movq mm5,mm2 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm2 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[32+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm2,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm0,mm2 - psllq mm6,6 - pxor mm7,mm5 - pxor mm0,mm1 - pxor mm6,mm7 - movq mm5,[56+esp] - paddq mm0,mm6 - movq mm6,[esp] - movdqa [edx-96],xmm4 - movdqa xmm6,xmm0 - movdqa xmm4,xmm5 -db 102,15,58,15,235,8 - movdqa [48+edx],xmm7 -db 102,15,58,15,247,8 - movdqa xmm7,xmm5 - psrlq xmm5,7 - paddq xmm3,xmm6 - movdqa xmm6,xmm7 - psrlq xmm7,1 - psllq xmm6,56 - pxor xmm5,xmm7 - psrlq xmm7,7 - pxor xmm5,xmm6 - psllq xmm6,7 - pxor xmm5,xmm7 - movdqa xmm7,xmm2 - pxor xmm5,xmm6 - movdqa xmm6,xmm2 - psrlq xmm7,6 - paddq xmm3,xmm5 - movdqa xmm5,xmm2 - psrlq xmm6,19 - psllq xmm5,3 - pxor xmm7,xmm6 - psrlq xmm6,42 - pxor xmm7,xmm5 - psllq xmm5,42 - pxor xmm7,xmm6 - movdqa xmm6,[16+edx] - pxor xmm7,xmm5 - movdqa xmm5,[48+ebp] - movq mm1,mm4 - paddq xmm3,xmm7 - movq mm7,[edx-80] - pxor mm5,mm6 - psrlq mm1,14 - movq [48+esp],mm4 - paddq xmm5,xmm3 - pand mm5,mm4 - psllq mm4,23 - paddq mm0,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [16+esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[8+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[40+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[24+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm5,[48+esp] - paddq mm2,mm6 - movq mm6,[56+esp] - movq mm1,mm4 - movq mm7,[edx-72] - pxor mm5,mm6 - psrlq mm1,14 - movq [40+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm2,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [8+esp],mm2 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[32+esp] - paddq mm3,mm7 - movq mm5,mm2 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm2 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[16+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm2,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm0,mm2 - psllq mm6,6 - pxor mm7,mm5 - pxor mm0,mm1 - pxor mm6,mm7 - movq mm5,[40+esp] - paddq mm0,mm6 - movq mm6,[48+esp] - movdqa [edx-80],xmm5 - movdqa xmm7,xmm1 - movdqa xmm5,xmm6 -db 102,15,58,15,244,8 - movdqa [edx],xmm0 -db 102,15,58,15,248,8 - movdqa xmm0,xmm6 - psrlq xmm6,7 - paddq xmm4,xmm7 - movdqa xmm7,xmm0 - psrlq xmm0,1 - psllq xmm7,56 - pxor xmm6,xmm0 - psrlq xmm0,7 - pxor xmm6,xmm7 - psllq xmm7,7 - pxor xmm6,xmm0 - movdqa xmm0,xmm3 - pxor xmm6,xmm7 - movdqa xmm7,xmm3 - psrlq xmm0,6 - paddq xmm4,xmm6 - movdqa xmm6,xmm3 - psrlq xmm7,19 - psllq xmm6,3 - pxor xmm0,xmm7 - psrlq xmm7,42 - pxor xmm0,xmm6 - psllq xmm6,42 - pxor xmm0,xmm7 - movdqa xmm7,[32+edx] - pxor xmm0,xmm6 - movdqa xmm6,[64+ebp] - movq mm1,mm4 - paddq xmm4,xmm0 - movq mm7,[edx-64] - pxor mm5,mm6 - psrlq mm1,14 - movq [32+esp],mm4 - paddq xmm6,xmm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm0,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[56+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[24+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[8+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm5,[32+esp] - paddq mm2,mm6 - movq mm6,[40+esp] - movq mm1,mm4 - movq mm7,[edx-56] - pxor mm5,mm6 - psrlq mm1,14 - movq [24+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm2,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [56+esp],mm2 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[48+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[16+esp] - paddq mm3,mm7 - movq mm5,mm2 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm2 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm2,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm0,mm2 - psllq mm6,6 - pxor mm7,mm5 - pxor mm0,mm1 - pxor mm6,mm7 - movq mm5,[24+esp] - paddq mm0,mm6 - movq mm6,[32+esp] - movdqa [edx-64],xmm6 - movdqa xmm0,xmm2 - movdqa xmm6,xmm7 -db 102,15,58,15,253,8 - movdqa [16+edx],xmm1 -db 102,15,58,15,193,8 - movdqa xmm1,xmm7 - psrlq xmm7,7 - paddq xmm5,xmm0 - movdqa xmm0,xmm1 - psrlq xmm1,1 - psllq xmm0,56 - pxor xmm7,xmm1 - psrlq xmm1,7 - pxor xmm7,xmm0 - psllq xmm0,7 - pxor xmm7,xmm1 - movdqa xmm1,xmm4 - pxor xmm7,xmm0 - movdqa xmm0,xmm4 - psrlq xmm1,6 - paddq xmm5,xmm7 - movdqa xmm7,xmm4 - psrlq xmm0,19 - psllq xmm7,3 - pxor xmm1,xmm0 - psrlq xmm0,42 - pxor xmm1,xmm7 - psllq xmm7,42 - pxor xmm1,xmm0 - movdqa xmm0,[48+edx] - pxor xmm1,xmm7 - movdqa xmm7,[80+ebp] - movq mm1,mm4 - paddq xmm5,xmm1 - movq mm7,[edx-48] - pxor mm5,mm6 - psrlq mm1,14 - movq [16+esp],mm4 - paddq xmm7,xmm5 - pand mm5,mm4 - psllq mm4,23 - paddq mm0,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [48+esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[40+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[8+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[56+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm5,[16+esp] - paddq mm2,mm6 - movq mm6,[24+esp] - movq mm1,mm4 - movq mm7,[edx-40] - pxor mm5,mm6 - psrlq mm1,14 - movq [8+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm2,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [40+esp],mm2 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[32+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[esp] - paddq mm3,mm7 - movq mm5,mm2 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm2 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[48+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm2,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm0,mm2 - psllq mm6,6 - pxor mm7,mm5 - pxor mm0,mm1 - pxor mm6,mm7 - movq mm5,[8+esp] - paddq mm0,mm6 - movq mm6,[16+esp] - movdqa [edx-48],xmm7 - movdqa xmm1,xmm3 - movdqa xmm7,xmm0 -db 102,15,58,15,198,8 - movdqa [32+edx],xmm2 -db 102,15,58,15,202,8 - movdqa xmm2,xmm0 - psrlq xmm0,7 - paddq xmm6,xmm1 - movdqa xmm1,xmm2 - psrlq xmm2,1 - psllq xmm1,56 - pxor xmm0,xmm2 - psrlq xmm2,7 - pxor xmm0,xmm1 - psllq xmm1,7 - pxor xmm0,xmm2 - movdqa xmm2,xmm5 - pxor xmm0,xmm1 - movdqa xmm1,xmm5 - psrlq xmm2,6 - paddq xmm6,xmm0 - movdqa xmm0,xmm5 - psrlq xmm1,19 - psllq xmm0,3 - pxor xmm2,xmm1 - psrlq xmm1,42 - pxor xmm2,xmm0 - psllq xmm0,42 - pxor xmm2,xmm1 - movdqa xmm1,[edx] - pxor xmm2,xmm0 - movdqa xmm0,[96+ebp] - movq mm1,mm4 - paddq xmm6,xmm2 - movq mm7,[edx-32] - pxor mm5,mm6 - psrlq mm1,14 - movq [esp],mm4 - paddq xmm0,xmm6 - pand mm5,mm4 - psllq mm4,23 - paddq mm0,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [32+esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[24+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[56+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[40+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm5,[esp] - paddq mm2,mm6 - movq mm6,[8+esp] - movq mm1,mm4 - movq mm7,[edx-24] - pxor mm5,mm6 - psrlq mm1,14 - movq [56+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm2,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [24+esp],mm2 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[16+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[48+esp] - paddq mm3,mm7 - movq mm5,mm2 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm2 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[32+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm2,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm0,mm2 - psllq mm6,6 - pxor mm7,mm5 - pxor mm0,mm1 - pxor mm6,mm7 - movq mm5,[56+esp] - paddq mm0,mm6 - movq mm6,[esp] - movdqa [edx-32],xmm0 - movdqa xmm2,xmm4 - movdqa xmm0,xmm1 -db 102,15,58,15,207,8 - movdqa [48+edx],xmm3 -db 102,15,58,15,211,8 - movdqa xmm3,xmm1 - psrlq xmm1,7 - paddq xmm7,xmm2 - movdqa xmm2,xmm3 - psrlq xmm3,1 - psllq xmm2,56 - pxor xmm1,xmm3 - psrlq xmm3,7 - pxor xmm1,xmm2 - psllq xmm2,7 - pxor xmm1,xmm3 - movdqa xmm3,xmm6 - pxor xmm1,xmm2 - movdqa xmm2,xmm6 - psrlq xmm3,6 - paddq xmm7,xmm1 - movdqa xmm1,xmm6 - psrlq xmm2,19 - psllq xmm1,3 - pxor xmm3,xmm2 - psrlq xmm2,42 - pxor xmm3,xmm1 - psllq xmm1,42 - pxor xmm3,xmm2 - movdqa xmm2,[16+edx] - pxor xmm3,xmm1 - movdqa xmm1,[112+ebp] - movq mm1,mm4 - paddq xmm7,xmm3 - movq mm7,[edx-16] - pxor mm5,mm6 - psrlq mm1,14 - movq [48+esp],mm4 - paddq xmm1,xmm7 - pand mm5,mm4 - psllq mm4,23 - paddq mm0,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [16+esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[8+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[40+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[24+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm5,[48+esp] - paddq mm2,mm6 - movq mm6,[56+esp] - movq mm1,mm4 - movq mm7,[edx-8] - pxor mm5,mm6 - psrlq mm1,14 - movq [40+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm2,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [8+esp],mm2 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[32+esp] - paddq mm3,mm7 - movq mm5,mm2 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm2 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[16+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm2,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm0,mm2 - psllq mm6,6 - pxor mm7,mm5 - pxor mm0,mm1 - pxor mm6,mm7 - movq mm5,[40+esp] - paddq mm0,mm6 - movq mm6,[48+esp] - movdqa [edx-16],xmm1 - lea ebp,[128+ebp] - dec ecx - jnz NEAR L$00800_47_ssse3 - movdqa xmm1,[ebp] - lea ebp,[ebp-640] - movdqu xmm0,[ebx] -db 102,15,56,0,193 - movdqa xmm3,[ebp] - movdqa xmm2,xmm1 - movdqu xmm1,[16+ebx] - paddq xmm3,xmm0 -db 102,15,56,0,202 - movq mm1,mm4 - movq mm7,[edx-128] - pxor mm5,mm6 - psrlq mm1,14 - movq [32+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm0,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[56+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[24+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[8+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm5,[32+esp] - paddq mm2,mm6 - movq mm6,[40+esp] - movq mm1,mm4 - movq mm7,[edx-120] - pxor mm5,mm6 - psrlq mm1,14 - movq [24+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm2,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [56+esp],mm2 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[48+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[16+esp] - paddq mm3,mm7 - movq mm5,mm2 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm2 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm2,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm0,mm2 - psllq mm6,6 - pxor mm7,mm5 - pxor mm0,mm1 - pxor mm6,mm7 - movq mm5,[24+esp] - paddq mm0,mm6 - movq mm6,[32+esp] - movdqa [edx-128],xmm3 - movdqa xmm4,[16+ebp] - movdqa xmm3,xmm2 - movdqu xmm2,[32+ebx] - paddq xmm4,xmm1 -db 102,15,56,0,211 - movq mm1,mm4 - movq mm7,[edx-112] - pxor mm5,mm6 - psrlq mm1,14 - movq [16+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm0,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [48+esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[40+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[8+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[56+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm5,[16+esp] - paddq mm2,mm6 - movq mm6,[24+esp] - movq mm1,mm4 - movq mm7,[edx-104] - pxor mm5,mm6 - psrlq mm1,14 - movq [8+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm2,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [40+esp],mm2 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[32+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[esp] - paddq mm3,mm7 - movq mm5,mm2 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm2 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[48+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm2,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm0,mm2 - psllq mm6,6 - pxor mm7,mm5 - pxor mm0,mm1 - pxor mm6,mm7 - movq mm5,[8+esp] - paddq mm0,mm6 - movq mm6,[16+esp] - movdqa [edx-112],xmm4 - movdqa xmm5,[32+ebp] - movdqa xmm4,xmm3 - movdqu xmm3,[48+ebx] - paddq xmm5,xmm2 -db 102,15,56,0,220 - movq mm1,mm4 - movq mm7,[edx-96] - pxor mm5,mm6 - psrlq mm1,14 - movq [esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm0,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [32+esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[24+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[56+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[40+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm5,[esp] - paddq mm2,mm6 - movq mm6,[8+esp] - movq mm1,mm4 - movq mm7,[edx-88] - pxor mm5,mm6 - psrlq mm1,14 - movq [56+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm2,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [24+esp],mm2 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[16+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[48+esp] - paddq mm3,mm7 - movq mm5,mm2 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm2 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[32+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm2,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm0,mm2 - psllq mm6,6 - pxor mm7,mm5 - pxor mm0,mm1 - pxor mm6,mm7 - movq mm5,[56+esp] - paddq mm0,mm6 - movq mm6,[esp] - movdqa [edx-96],xmm5 - movdqa xmm6,[48+ebp] - movdqa xmm5,xmm4 - movdqu xmm4,[64+ebx] - paddq xmm6,xmm3 -db 102,15,56,0,229 - movq mm1,mm4 - movq mm7,[edx-80] - pxor mm5,mm6 - psrlq mm1,14 - movq [48+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm0,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [16+esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[8+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[40+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[24+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm5,[48+esp] - paddq mm2,mm6 - movq mm6,[56+esp] - movq mm1,mm4 - movq mm7,[edx-72] - pxor mm5,mm6 - psrlq mm1,14 - movq [40+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm2,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [8+esp],mm2 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[32+esp] - paddq mm3,mm7 - movq mm5,mm2 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm2 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[16+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm2,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm0,mm2 - psllq mm6,6 - pxor mm7,mm5 - pxor mm0,mm1 - pxor mm6,mm7 - movq mm5,[40+esp] - paddq mm0,mm6 - movq mm6,[48+esp] - movdqa [edx-80],xmm6 - movdqa xmm7,[64+ebp] - movdqa xmm6,xmm5 - movdqu xmm5,[80+ebx] - paddq xmm7,xmm4 -db 102,15,56,0,238 - movq mm1,mm4 - movq mm7,[edx-64] - pxor mm5,mm6 - psrlq mm1,14 - movq [32+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm0,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[56+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[24+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[8+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm5,[32+esp] - paddq mm2,mm6 - movq mm6,[40+esp] - movq mm1,mm4 - movq mm7,[edx-56] - pxor mm5,mm6 - psrlq mm1,14 - movq [24+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm2,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [56+esp],mm2 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[48+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[16+esp] - paddq mm3,mm7 - movq mm5,mm2 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm2 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm2,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm0,mm2 - psllq mm6,6 - pxor mm7,mm5 - pxor mm0,mm1 - pxor mm6,mm7 - movq mm5,[24+esp] - paddq mm0,mm6 - movq mm6,[32+esp] - movdqa [edx-64],xmm7 - movdqa [edx],xmm0 - movdqa xmm0,[80+ebp] - movdqa xmm7,xmm6 - movdqu xmm6,[96+ebx] - paddq xmm0,xmm5 -db 102,15,56,0,247 - movq mm1,mm4 - movq mm7,[edx-48] - pxor mm5,mm6 - psrlq mm1,14 - movq [16+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm0,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [48+esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[40+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[8+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[56+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm5,[16+esp] - paddq mm2,mm6 - movq mm6,[24+esp] - movq mm1,mm4 - movq mm7,[edx-40] - pxor mm5,mm6 - psrlq mm1,14 - movq [8+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm2,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [40+esp],mm2 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[32+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[esp] - paddq mm3,mm7 - movq mm5,mm2 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm2 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[48+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm2,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm0,mm2 - psllq mm6,6 - pxor mm7,mm5 - pxor mm0,mm1 - pxor mm6,mm7 - movq mm5,[8+esp] - paddq mm0,mm6 - movq mm6,[16+esp] - movdqa [edx-48],xmm0 - movdqa [16+edx],xmm1 - movdqa xmm1,[96+ebp] - movdqa xmm0,xmm7 - movdqu xmm7,[112+ebx] - paddq xmm1,xmm6 -db 102,15,56,0,248 - movq mm1,mm4 - movq mm7,[edx-32] - pxor mm5,mm6 - psrlq mm1,14 - movq [esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm0,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [32+esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[24+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[56+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[40+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm5,[esp] - paddq mm2,mm6 - movq mm6,[8+esp] - movq mm1,mm4 - movq mm7,[edx-24] - pxor mm5,mm6 - psrlq mm1,14 - movq [56+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm2,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [24+esp],mm2 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[16+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[48+esp] - paddq mm3,mm7 - movq mm5,mm2 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm2 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[32+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm2,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm0,mm2 - psllq mm6,6 - pxor mm7,mm5 - pxor mm0,mm1 - pxor mm6,mm7 - movq mm5,[56+esp] - paddq mm0,mm6 - movq mm6,[esp] - movdqa [edx-32],xmm1 - movdqa [32+edx],xmm2 - movdqa xmm2,[112+ebp] - movdqa xmm0,[edx] - paddq xmm2,xmm7 - movq mm1,mm4 - movq mm7,[edx-16] - pxor mm5,mm6 - psrlq mm1,14 - movq [48+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm0,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [16+esp],mm0 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[8+esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[40+esp] - paddq mm3,mm7 - movq mm5,mm0 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm0 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[24+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm0,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm2,mm0 - psllq mm6,6 - pxor mm7,mm5 - pxor mm2,mm1 - pxor mm6,mm7 - movq mm5,[48+esp] - paddq mm2,mm6 - movq mm6,[56+esp] - movq mm1,mm4 - movq mm7,[edx-8] - pxor mm5,mm6 - psrlq mm1,14 - movq [40+esp],mm4 - pand mm5,mm4 - psllq mm4,23 - paddq mm2,mm3 - movq mm3,mm1 - psrlq mm1,4 - pxor mm5,mm6 - pxor mm3,mm4 - psllq mm4,23 - pxor mm3,mm1 - movq [8+esp],mm2 - paddq mm7,mm5 - pxor mm3,mm4 - psrlq mm1,23 - paddq mm7,[esp] - pxor mm3,mm1 - psllq mm4,4 - pxor mm3,mm4 - movq mm4,[32+esp] - paddq mm3,mm7 - movq mm5,mm2 - psrlq mm5,28 - paddq mm4,mm3 - movq mm6,mm2 - movq mm7,mm5 - psllq mm6,25 - movq mm1,[16+esp] - psrlq mm5,6 - pxor mm7,mm6 - psllq mm6,5 - pxor mm7,mm5 - pxor mm2,mm1 - psrlq mm5,5 - pxor mm7,mm6 - pand mm0,mm2 - psllq mm6,6 - pxor mm7,mm5 - pxor mm0,mm1 - pxor mm6,mm7 - movq mm5,[40+esp] - paddq mm0,mm6 - movq mm6,[48+esp] - movdqa [edx-16],xmm2 - movq mm1,[8+esp] - paddq mm0,mm3 - movq mm3,[24+esp] - movq mm7,[56+esp] - pxor mm2,mm1 - paddq mm0,[esi] - paddq mm1,[8+esi] - paddq mm2,[16+esi] - paddq mm3,[24+esi] - paddq mm4,[32+esi] - paddq mm5,[40+esi] - paddq mm6,[48+esi] - paddq mm7,[56+esi] - movq [esi],mm0 - movq [8+esi],mm1 - movq [16+esi],mm2 - movq [24+esi],mm3 - movq [32+esi],mm4 - movq [40+esi],mm5 - movq [48+esi],mm6 - movq [56+esi],mm7 - cmp edi,eax - jb NEAR L$007loop_ssse3 - mov esp,DWORD [76+edx] - emms - pop edi - pop esi - pop ebx - pop ebp - ret -align 16 -L$002loop_x86: - mov eax,DWORD [edi] - mov ebx,DWORD [4+edi] - mov ecx,DWORD [8+edi] - mov edx,DWORD [12+edi] - bswap eax - bswap ebx - bswap ecx - bswap edx - push eax - push ebx - push ecx - push edx - mov eax,DWORD [16+edi] - mov ebx,DWORD [20+edi] - mov ecx,DWORD [24+edi] - mov edx,DWORD [28+edi] - bswap eax - bswap ebx - bswap ecx - bswap edx - push eax - push ebx - push ecx - push edx - mov eax,DWORD [32+edi] - mov ebx,DWORD [36+edi] - mov ecx,DWORD [40+edi] - mov edx,DWORD [44+edi] - bswap eax - bswap ebx - bswap ecx - bswap edx - push eax - push ebx - push ecx - push edx - mov eax,DWORD [48+edi] - mov ebx,DWORD [52+edi] - mov ecx,DWORD [56+edi] - mov edx,DWORD [60+edi] - bswap eax - bswap ebx - bswap ecx - bswap edx - push eax - push ebx - push ecx - push edx - mov eax,DWORD [64+edi] - mov ebx,DWORD [68+edi] - mov ecx,DWORD [72+edi] - mov edx,DWORD [76+edi] - bswap eax - bswap ebx - bswap ecx - bswap edx - push eax - push ebx - push ecx - push edx - mov eax,DWORD [80+edi] - mov ebx,DWORD [84+edi] - mov ecx,DWORD [88+edi] - mov edx,DWORD [92+edi] - bswap eax - bswap ebx - bswap ecx - bswap edx - push eax - push ebx - push ecx - push edx - mov eax,DWORD [96+edi] - mov ebx,DWORD [100+edi] - mov ecx,DWORD [104+edi] - mov edx,DWORD [108+edi] - bswap eax - bswap ebx - bswap ecx - bswap edx - push eax - push ebx - push ecx - push edx - mov eax,DWORD [112+edi] - mov ebx,DWORD [116+edi] - mov ecx,DWORD [120+edi] - mov edx,DWORD [124+edi] - bswap eax - bswap ebx - bswap ecx - bswap edx - push eax - push ebx - push ecx - push edx - add edi,128 - sub esp,72 - mov DWORD [204+esp],edi - lea edi,[8+esp] - mov ecx,16 -dd 2784229001 -align 16 -L$00900_15_x86: - mov ecx,DWORD [40+esp] - mov edx,DWORD [44+esp] - mov esi,ecx - shr ecx,9 - mov edi,edx - shr edx,9 - mov ebx,ecx - shl esi,14 - mov eax,edx - shl edi,14 - xor ebx,esi - shr ecx,5 - xor eax,edi - shr edx,5 - xor eax,ecx - shl esi,4 - xor ebx,edx - shl edi,4 - xor ebx,esi - shr ecx,4 - xor eax,edi - shr edx,4 - xor eax,ecx - shl esi,5 - xor ebx,edx - shl edi,5 - xor eax,esi - xor ebx,edi - mov ecx,DWORD [48+esp] - mov edx,DWORD [52+esp] - mov esi,DWORD [56+esp] - mov edi,DWORD [60+esp] - add eax,DWORD [64+esp] - adc ebx,DWORD [68+esp] - xor ecx,esi - xor edx,edi - and ecx,DWORD [40+esp] - and edx,DWORD [44+esp] - add eax,DWORD [192+esp] - adc ebx,DWORD [196+esp] - xor ecx,esi - xor edx,edi - mov esi,DWORD [ebp] - mov edi,DWORD [4+ebp] - add eax,ecx - adc ebx,edx - mov ecx,DWORD [32+esp] - mov edx,DWORD [36+esp] - add eax,esi - adc ebx,edi - mov DWORD [esp],eax - mov DWORD [4+esp],ebx - add eax,ecx - adc ebx,edx - mov ecx,DWORD [8+esp] - mov edx,DWORD [12+esp] - mov DWORD [32+esp],eax - mov DWORD [36+esp],ebx - mov esi,ecx - shr ecx,2 - mov edi,edx - shr edx,2 - mov ebx,ecx - shl esi,4 - mov eax,edx - shl edi,4 - xor ebx,esi - shr ecx,5 - xor eax,edi - shr edx,5 - xor ebx,ecx - shl esi,21 - xor eax,edx - shl edi,21 - xor eax,esi - shr ecx,21 - xor ebx,edi - shr edx,21 - xor eax,ecx - shl esi,5 - xor ebx,edx - shl edi,5 - xor eax,esi - xor ebx,edi - mov ecx,DWORD [8+esp] - mov edx,DWORD [12+esp] - mov esi,DWORD [16+esp] - mov edi,DWORD [20+esp] - add eax,DWORD [esp] - adc ebx,DWORD [4+esp] - or ecx,esi - or edx,edi - and ecx,DWORD [24+esp] - and edx,DWORD [28+esp] - and esi,DWORD [8+esp] - and edi,DWORD [12+esp] - or ecx,esi - or edx,edi - add eax,ecx - adc ebx,edx - mov DWORD [esp],eax - mov DWORD [4+esp],ebx - mov dl,BYTE [ebp] - sub esp,8 - lea ebp,[8+ebp] - cmp dl,148 - jne NEAR L$00900_15_x86 -align 16 -L$01016_79_x86: - mov ecx,DWORD [312+esp] - mov edx,DWORD [316+esp] - mov esi,ecx - shr ecx,1 - mov edi,edx - shr edx,1 - mov eax,ecx - shl esi,24 - mov ebx,edx - shl edi,24 - xor ebx,esi - shr ecx,6 - xor eax,edi - shr edx,6 - xor eax,ecx - shl esi,7 - xor ebx,edx - shl edi,1 - xor ebx,esi - shr ecx,1 - xor eax,edi - shr edx,1 - xor eax,ecx - shl edi,6 - xor ebx,edx - xor eax,edi - mov DWORD [esp],eax - mov DWORD [4+esp],ebx - mov ecx,DWORD [208+esp] - mov edx,DWORD [212+esp] - mov esi,ecx - shr ecx,6 - mov edi,edx - shr edx,6 - mov eax,ecx - shl esi,3 - mov ebx,edx - shl edi,3 - xor eax,esi - shr ecx,13 - xor ebx,edi - shr edx,13 - xor eax,ecx - shl esi,10 - xor ebx,edx - shl edi,10 - xor ebx,esi - shr ecx,10 - xor eax,edi - shr edx,10 - xor ebx,ecx - shl edi,13 - xor eax,edx - xor eax,edi - mov ecx,DWORD [320+esp] - mov edx,DWORD [324+esp] - add eax,DWORD [esp] - adc ebx,DWORD [4+esp] - mov esi,DWORD [248+esp] - mov edi,DWORD [252+esp] - add eax,ecx - adc ebx,edx - add eax,esi - adc ebx,edi - mov DWORD [192+esp],eax - mov DWORD [196+esp],ebx - mov ecx,DWORD [40+esp] - mov edx,DWORD [44+esp] - mov esi,ecx - shr ecx,9 - mov edi,edx - shr edx,9 - mov ebx,ecx - shl esi,14 - mov eax,edx - shl edi,14 - xor ebx,esi - shr ecx,5 - xor eax,edi - shr edx,5 - xor eax,ecx - shl esi,4 - xor ebx,edx - shl edi,4 - xor ebx,esi - shr ecx,4 - xor eax,edi - shr edx,4 - xor eax,ecx - shl esi,5 - xor ebx,edx - shl edi,5 - xor eax,esi - xor ebx,edi - mov ecx,DWORD [48+esp] - mov edx,DWORD [52+esp] - mov esi,DWORD [56+esp] - mov edi,DWORD [60+esp] - add eax,DWORD [64+esp] - adc ebx,DWORD [68+esp] - xor ecx,esi - xor edx,edi - and ecx,DWORD [40+esp] - and edx,DWORD [44+esp] - add eax,DWORD [192+esp] - adc ebx,DWORD [196+esp] - xor ecx,esi - xor edx,edi - mov esi,DWORD [ebp] - mov edi,DWORD [4+ebp] - add eax,ecx - adc ebx,edx - mov ecx,DWORD [32+esp] - mov edx,DWORD [36+esp] - add eax,esi - adc ebx,edi - mov DWORD [esp],eax - mov DWORD [4+esp],ebx - add eax,ecx - adc ebx,edx - mov ecx,DWORD [8+esp] - mov edx,DWORD [12+esp] - mov DWORD [32+esp],eax - mov DWORD [36+esp],ebx - mov esi,ecx - shr ecx,2 - mov edi,edx - shr edx,2 - mov ebx,ecx - shl esi,4 - mov eax,edx - shl edi,4 - xor ebx,esi - shr ecx,5 - xor eax,edi - shr edx,5 - xor ebx,ecx - shl esi,21 - xor eax,edx - shl edi,21 - xor eax,esi - shr ecx,21 - xor ebx,edi - shr edx,21 - xor eax,ecx - shl esi,5 - xor ebx,edx - shl edi,5 - xor eax,esi - xor ebx,edi - mov ecx,DWORD [8+esp] - mov edx,DWORD [12+esp] - mov esi,DWORD [16+esp] - mov edi,DWORD [20+esp] - add eax,DWORD [esp] - adc ebx,DWORD [4+esp] - or ecx,esi - or edx,edi - and ecx,DWORD [24+esp] - and edx,DWORD [28+esp] - and esi,DWORD [8+esp] - and edi,DWORD [12+esp] - or ecx,esi - or edx,edi - add eax,ecx - adc ebx,edx - mov DWORD [esp],eax - mov DWORD [4+esp],ebx - mov dl,BYTE [ebp] - sub esp,8 - lea ebp,[8+ebp] - cmp dl,23 - jne NEAR L$01016_79_x86 - mov esi,DWORD [840+esp] - mov edi,DWORD [844+esp] - mov eax,DWORD [esi] - mov ebx,DWORD [4+esi] - mov ecx,DWORD [8+esi] - mov edx,DWORD [12+esi] - add eax,DWORD [8+esp] - adc ebx,DWORD [12+esp] - mov DWORD [esi],eax - mov DWORD [4+esi],ebx - add ecx,DWORD [16+esp] - adc edx,DWORD [20+esp] - mov DWORD [8+esi],ecx - mov DWORD [12+esi],edx - mov eax,DWORD [16+esi] - mov ebx,DWORD [20+esi] - mov ecx,DWORD [24+esi] - mov edx,DWORD [28+esi] - add eax,DWORD [24+esp] - adc ebx,DWORD [28+esp] - mov DWORD [16+esi],eax - mov DWORD [20+esi],ebx - add ecx,DWORD [32+esp] - adc edx,DWORD [36+esp] - mov DWORD [24+esi],ecx - mov DWORD [28+esi],edx - mov eax,DWORD [32+esi] - mov ebx,DWORD [36+esi] - mov ecx,DWORD [40+esi] - mov edx,DWORD [44+esi] - add eax,DWORD [40+esp] - adc ebx,DWORD [44+esp] - mov DWORD [32+esi],eax - mov DWORD [36+esi],ebx - add ecx,DWORD [48+esp] - adc edx,DWORD [52+esp] - mov DWORD [40+esi],ecx - mov DWORD [44+esi],edx - mov eax,DWORD [48+esi] - mov ebx,DWORD [52+esi] - mov ecx,DWORD [56+esi] - mov edx,DWORD [60+esi] - add eax,DWORD [56+esp] - adc ebx,DWORD [60+esp] - mov DWORD [48+esi],eax - mov DWORD [52+esi],ebx - add ecx,DWORD [64+esp] - adc edx,DWORD [68+esp] - mov DWORD [56+esi],ecx - mov DWORD [60+esi],edx - add esp,840 - sub ebp,640 - cmp edi,DWORD [8+esp] - jb NEAR L$002loop_x86 - mov esp,DWORD [12+esp] - pop edi - pop esi - pop ebx - pop ebp - ret -align 64 -L$001K512: -dd 3609767458,1116352408 -dd 602891725,1899447441 -dd 3964484399,3049323471 -dd 2173295548,3921009573 -dd 4081628472,961987163 -dd 3053834265,1508970993 -dd 2937671579,2453635748 -dd 3664609560,2870763221 -dd 2734883394,3624381080 -dd 1164996542,310598401 -dd 1323610764,607225278 -dd 3590304994,1426881987 -dd 4068182383,1925078388 -dd 991336113,2162078206 -dd 633803317,2614888103 -dd 3479774868,3248222580 -dd 2666613458,3835390401 -dd 944711139,4022224774 -dd 2341262773,264347078 -dd 2007800933,604807628 -dd 1495990901,770255983 -dd 1856431235,1249150122 -dd 3175218132,1555081692 -dd 2198950837,1996064986 -dd 3999719339,2554220882 -dd 766784016,2821834349 -dd 2566594879,2952996808 -dd 3203337956,3210313671 -dd 1034457026,3336571891 -dd 2466948901,3584528711 -dd 3758326383,113926993 -dd 168717936,338241895 -dd 1188179964,666307205 -dd 1546045734,773529912 -dd 1522805485,1294757372 -dd 2643833823,1396182291 -dd 2343527390,1695183700 -dd 1014477480,1986661051 -dd 1206759142,2177026350 -dd 344077627,2456956037 -dd 1290863460,2730485921 -dd 3158454273,2820302411 -dd 3505952657,3259730800 -dd 106217008,3345764771 -dd 3606008344,3516065817 -dd 1432725776,3600352804 -dd 1467031594,4094571909 -dd 851169720,275423344 -dd 3100823752,430227734 -dd 1363258195,506948616 -dd 3750685593,659060556 -dd 3785050280,883997877 -dd 3318307427,958139571 -dd 3812723403,1322822218 -dd 2003034995,1537002063 -dd 3602036899,1747873779 -dd 1575990012,1955562222 -dd 1125592928,2024104815 -dd 2716904306,2227730452 -dd 442776044,2361852424 -dd 593698344,2428436474 -dd 3733110249,2756734187 -dd 2999351573,3204031479 -dd 3815920427,3329325298 -dd 3928383900,3391569614 -dd 566280711,3515267271 -dd 3454069534,3940187606 -dd 4000239992,4118630271 -dd 1914138554,116418474 -dd 2731055270,174292421 -dd 3203993006,289380356 -dd 320620315,460393269 -dd 587496836,685471733 -dd 1086792851,852142971 -dd 365543100,1017036298 -dd 2618297676,1126000580 -dd 3409855158,1288033470 -dd 4234509866,1501505948 -dd 987167468,1607167915 -dd 1246189591,1816402316 -dd 67438087,66051 -dd 202182159,134810123 -db 83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97 -db 110,115,102,111,114,109,32,102,111,114,32,120,56,54,44,32 -db 67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97 -db 112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103 -db 62,0 -segment .bss -common _OPENSSL_ia32cap_P 16 diff --git a/third_party/boringssl/win-x86_64/crypto/aes/aes-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/aes/aes-x86_64.asm deleted file mode 100644 index 53394f0e22f88..0000000000000 --- a/third_party/boringssl/win-x86_64/crypto/aes/aes-x86_64.asm +++ /dev/null @@ -1,2858 +0,0 @@ -default rel -%define XMMWORD -%define YMMWORD -%define ZMMWORD -section .text code align=64 - - -ALIGN 16 -_x86_64_AES_encrypt: - xor eax,DWORD[r15] - xor ebx,DWORD[4+r15] - xor ecx,DWORD[8+r15] - xor edx,DWORD[12+r15] - - mov r13d,DWORD[240+r15] - sub r13d,1 - jmp NEAR $L$enc_loop -ALIGN 16 -$L$enc_loop: - - movzx esi,al - movzx edi,bl - movzx ebp,cl - mov r10d,DWORD[rsi*8+r14] - mov r11d,DWORD[rdi*8+r14] - mov r12d,DWORD[rbp*8+r14] - - movzx esi,bh - movzx edi,ch - movzx ebp,dl - xor r10d,DWORD[3+rsi*8+r14] - xor r11d,DWORD[3+rdi*8+r14] - mov r8d,DWORD[rbp*8+r14] - - movzx esi,dh - shr ecx,16 - movzx ebp,ah - xor r12d,DWORD[3+rsi*8+r14] - shr edx,16 - xor r8d,DWORD[3+rbp*8+r14] - - shr ebx,16 - lea r15,[16+r15] - shr eax,16 - - movzx esi,cl - movzx edi,dl - movzx ebp,al - xor r10d,DWORD[2+rsi*8+r14] - xor r11d,DWORD[2+rdi*8+r14] - xor r12d,DWORD[2+rbp*8+r14] - - movzx esi,dh - movzx edi,ah - movzx ebp,bl - xor r10d,DWORD[1+rsi*8+r14] - xor r11d,DWORD[1+rdi*8+r14] - xor r8d,DWORD[2+rbp*8+r14] - - mov edx,DWORD[12+r15] - movzx edi,bh - movzx ebp,ch - mov eax,DWORD[r15] - xor r12d,DWORD[1+rdi*8+r14] - xor r8d,DWORD[1+rbp*8+r14] - - mov ebx,DWORD[4+r15] - mov ecx,DWORD[8+r15] - xor eax,r10d - xor ebx,r11d - xor ecx,r12d - xor edx,r8d - sub r13d,1 - jnz NEAR $L$enc_loop - movzx esi,al - movzx edi,bl - movzx ebp,cl - movzx r10d,BYTE[2+rsi*8+r14] - movzx r11d,BYTE[2+rdi*8+r14] - movzx r12d,BYTE[2+rbp*8+r14] - - movzx esi,dl - movzx edi,bh - movzx ebp,ch - movzx r8d,BYTE[2+rsi*8+r14] - mov edi,DWORD[rdi*8+r14] - mov ebp,DWORD[rbp*8+r14] - - and edi,0x0000ff00 - and ebp,0x0000ff00 - - xor r10d,edi - xor r11d,ebp - shr ecx,16 - - movzx esi,dh - movzx edi,ah - shr edx,16 - mov esi,DWORD[rsi*8+r14] - mov edi,DWORD[rdi*8+r14] - - and esi,0x0000ff00 - and edi,0x0000ff00 - shr ebx,16 - xor r12d,esi - xor r8d,edi - shr eax,16 - - movzx esi,cl - movzx edi,dl - movzx ebp,al - mov esi,DWORD[rsi*8+r14] - mov edi,DWORD[rdi*8+r14] - mov ebp,DWORD[rbp*8+r14] - - and esi,0x00ff0000 - and edi,0x00ff0000 - and ebp,0x00ff0000 - - xor r10d,esi - xor r11d,edi - xor r12d,ebp - - movzx esi,bl - movzx edi,dh - movzx ebp,ah - mov esi,DWORD[rsi*8+r14] - mov edi,DWORD[2+rdi*8+r14] - mov ebp,DWORD[2+rbp*8+r14] - - and esi,0x00ff0000 - and edi,0xff000000 - and ebp,0xff000000 - - xor r8d,esi - xor r10d,edi - xor r11d,ebp - - movzx esi,bh - movzx edi,ch - mov edx,DWORD[((16+12))+r15] - mov esi,DWORD[2+rsi*8+r14] - mov edi,DWORD[2+rdi*8+r14] - mov eax,DWORD[((16+0))+r15] - - and esi,0xff000000 - and edi,0xff000000 - - xor r12d,esi - xor r8d,edi - - mov ebx,DWORD[((16+4))+r15] - mov ecx,DWORD[((16+8))+r15] - xor eax,r10d - xor ebx,r11d - xor ecx,r12d - xor edx,r8d -DB 0xf3,0xc3 - - -ALIGN 16 -_x86_64_AES_encrypt_compact: - lea r8,[128+r14] - mov edi,DWORD[((0-128))+r8] - mov ebp,DWORD[((32-128))+r8] - mov r10d,DWORD[((64-128))+r8] - mov r11d,DWORD[((96-128))+r8] - mov edi,DWORD[((128-128))+r8] - mov ebp,DWORD[((160-128))+r8] - mov r10d,DWORD[((192-128))+r8] - mov r11d,DWORD[((224-128))+r8] - jmp NEAR $L$enc_loop_compact -ALIGN 16 -$L$enc_loop_compact: - xor eax,DWORD[r15] - xor ebx,DWORD[4+r15] - xor ecx,DWORD[8+r15] - xor edx,DWORD[12+r15] - lea r15,[16+r15] - movzx r10d,al - movzx r11d,bl - movzx r12d,cl - movzx r8d,dl - movzx esi,bh - movzx edi,ch - shr ecx,16 - movzx ebp,dh - movzx r10d,BYTE[r10*1+r14] - movzx r11d,BYTE[r11*1+r14] - movzx r12d,BYTE[r12*1+r14] - movzx r8d,BYTE[r8*1+r14] - - movzx r9d,BYTE[rsi*1+r14] - movzx esi,ah - movzx r13d,BYTE[rdi*1+r14] - movzx edi,cl - movzx ebp,BYTE[rbp*1+r14] - movzx esi,BYTE[rsi*1+r14] - - shl r9d,8 - shr edx,16 - shl r13d,8 - xor r10d,r9d - shr eax,16 - movzx r9d,dl - shr ebx,16 - xor r11d,r13d - shl ebp,8 - movzx r13d,al - movzx edi,BYTE[rdi*1+r14] - xor r12d,ebp - - shl esi,8 - movzx ebp,bl - shl edi,16 - xor r8d,esi - movzx r9d,BYTE[r9*1+r14] - movzx esi,dh - movzx r13d,BYTE[r13*1+r14] - xor r10d,edi - - shr ecx,8 - movzx edi,ah - shl r9d,16 - shr ebx,8 - shl r13d,16 - xor r11d,r9d - movzx ebp,BYTE[rbp*1+r14] - movzx esi,BYTE[rsi*1+r14] - movzx edi,BYTE[rdi*1+r14] - movzx edx,BYTE[rcx*1+r14] - movzx ecx,BYTE[rbx*1+r14] - - shl ebp,16 - xor r12d,r13d - shl esi,24 - xor r8d,ebp - shl edi,24 - xor r10d,esi - shl edx,24 - xor r11d,edi - shl ecx,24 - mov eax,r10d - mov ebx,r11d - xor ecx,r12d - xor edx,r8d - cmp r15,QWORD[16+rsp] - je NEAR $L$enc_compact_done - mov r10d,0x80808080 - mov r11d,0x80808080 - and r10d,eax - and r11d,ebx - mov esi,r10d - mov edi,r11d - shr r10d,7 - lea r8d,[rax*1+rax] - shr r11d,7 - lea r9d,[rbx*1+rbx] - sub esi,r10d - sub edi,r11d - and r8d,0xfefefefe - and r9d,0xfefefefe - and esi,0x1b1b1b1b - and edi,0x1b1b1b1b - mov r10d,eax - mov r11d,ebx - xor r8d,esi - xor r9d,edi - - xor eax,r8d - xor ebx,r9d - mov r12d,0x80808080 - rol eax,24 - mov ebp,0x80808080 - rol ebx,24 - and r12d,ecx - and ebp,edx - xor eax,r8d - xor ebx,r9d - mov esi,r12d - ror r10d,16 - mov edi,ebp - ror r11d,16 - lea r8d,[rcx*1+rcx] - shr r12d,7 - xor eax,r10d - shr ebp,7 - xor ebx,r11d - ror r10d,8 - lea r9d,[rdx*1+rdx] - ror r11d,8 - sub esi,r12d - sub edi,ebp - xor eax,r10d - xor ebx,r11d - - and r8d,0xfefefefe - and r9d,0xfefefefe - and esi,0x1b1b1b1b - and edi,0x1b1b1b1b - mov r12d,ecx - mov ebp,edx - xor r8d,esi - xor r9d,edi - - ror r12d,16 - xor ecx,r8d - ror ebp,16 - xor edx,r9d - rol ecx,24 - mov esi,DWORD[r14] - rol edx,24 - xor ecx,r8d - mov edi,DWORD[64+r14] - xor edx,r9d - mov r8d,DWORD[128+r14] - xor ecx,r12d - ror r12d,8 - xor edx,ebp - ror ebp,8 - xor ecx,r12d - mov r9d,DWORD[192+r14] - xor edx,ebp - jmp NEAR $L$enc_loop_compact -ALIGN 16 -$L$enc_compact_done: - xor eax,DWORD[r15] - xor ebx,DWORD[4+r15] - xor ecx,DWORD[8+r15] - xor edx,DWORD[12+r15] -DB 0xf3,0xc3 - -ALIGN 16 -global asm_AES_encrypt - - -asm_AES_encrypt: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_asm_AES_encrypt: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - - - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - - - mov r10,rsp - lea rcx,[((-63))+rdx] - and rsp,-64 - sub rcx,rsp - neg rcx - and rcx,0x3c0 - sub rsp,rcx - sub rsp,32 - - mov QWORD[16+rsp],rsi - mov QWORD[24+rsp],r10 -$L$enc_prologue: - - mov r15,rdx - mov r13d,DWORD[240+r15] - - mov eax,DWORD[rdi] - mov ebx,DWORD[4+rdi] - mov ecx,DWORD[8+rdi] - mov edx,DWORD[12+rdi] - - shl r13d,4 - lea rbp,[r13*1+r15] - mov QWORD[rsp],r15 - mov QWORD[8+rsp],rbp - - - lea r14,[(($L$AES_Te+2048))] - lea rbp,[768+rsp] - sub rbp,r14 - and rbp,0x300 - lea r14,[rbp*1+r14] - - call _x86_64_AES_encrypt_compact - - mov r9,QWORD[16+rsp] - mov rsi,QWORD[24+rsp] - mov DWORD[r9],eax - mov DWORD[4+r9],ebx - mov DWORD[8+r9],ecx - mov DWORD[12+r9],edx - - mov r15,QWORD[rsi] - mov r14,QWORD[8+rsi] - mov r13,QWORD[16+rsi] - mov r12,QWORD[24+rsi] - mov rbp,QWORD[32+rsi] - mov rbx,QWORD[40+rsi] - lea rsp,[48+rsi] -$L$enc_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_asm_AES_encrypt: - -ALIGN 16 -_x86_64_AES_decrypt: - xor eax,DWORD[r15] - xor ebx,DWORD[4+r15] - xor ecx,DWORD[8+r15] - xor edx,DWORD[12+r15] - - mov r13d,DWORD[240+r15] - sub r13d,1 - jmp NEAR $L$dec_loop -ALIGN 16 -$L$dec_loop: - - movzx esi,al - movzx edi,bl - movzx ebp,cl - mov r10d,DWORD[rsi*8+r14] - mov r11d,DWORD[rdi*8+r14] - mov r12d,DWORD[rbp*8+r14] - - movzx esi,dh - movzx edi,ah - movzx ebp,dl - xor r10d,DWORD[3+rsi*8+r14] - xor r11d,DWORD[3+rdi*8+r14] - mov r8d,DWORD[rbp*8+r14] - - movzx esi,bh - shr eax,16 - movzx ebp,ch - xor r12d,DWORD[3+rsi*8+r14] - shr edx,16 - xor r8d,DWORD[3+rbp*8+r14] - - shr ebx,16 - lea r15,[16+r15] - shr ecx,16 - - movzx esi,cl - movzx edi,dl - movzx ebp,al - xor r10d,DWORD[2+rsi*8+r14] - xor r11d,DWORD[2+rdi*8+r14] - xor r12d,DWORD[2+rbp*8+r14] - - movzx esi,bh - movzx edi,ch - movzx ebp,bl - xor r10d,DWORD[1+rsi*8+r14] - xor r11d,DWORD[1+rdi*8+r14] - xor r8d,DWORD[2+rbp*8+r14] - - movzx esi,dh - mov edx,DWORD[12+r15] - movzx ebp,ah - xor r12d,DWORD[1+rsi*8+r14] - mov eax,DWORD[r15] - xor r8d,DWORD[1+rbp*8+r14] - - xor eax,r10d - mov ebx,DWORD[4+r15] - mov ecx,DWORD[8+r15] - xor ecx,r12d - xor ebx,r11d - xor edx,r8d - sub r13d,1 - jnz NEAR $L$dec_loop - lea r14,[2048+r14] - movzx esi,al - movzx edi,bl - movzx ebp,cl - movzx r10d,BYTE[rsi*1+r14] - movzx r11d,BYTE[rdi*1+r14] - movzx r12d,BYTE[rbp*1+r14] - - movzx esi,dl - movzx edi,dh - movzx ebp,ah - movzx r8d,BYTE[rsi*1+r14] - movzx edi,BYTE[rdi*1+r14] - movzx ebp,BYTE[rbp*1+r14] - - shl edi,8 - shl ebp,8 - - xor r10d,edi - xor r11d,ebp - shr edx,16 - - movzx esi,bh - movzx edi,ch - shr eax,16 - movzx esi,BYTE[rsi*1+r14] - movzx edi,BYTE[rdi*1+r14] - - shl esi,8 - shl edi,8 - shr ebx,16 - xor r12d,esi - xor r8d,edi - shr ecx,16 - - movzx esi,cl - movzx edi,dl - movzx ebp,al - movzx esi,BYTE[rsi*1+r14] - movzx edi,BYTE[rdi*1+r14] - movzx ebp,BYTE[rbp*1+r14] - - shl esi,16 - shl edi,16 - shl ebp,16 - - xor r10d,esi - xor r11d,edi - xor r12d,ebp - - movzx esi,bl - movzx edi,bh - movzx ebp,ch - movzx esi,BYTE[rsi*1+r14] - movzx edi,BYTE[rdi*1+r14] - movzx ebp,BYTE[rbp*1+r14] - - shl esi,16 - shl edi,24 - shl ebp,24 - - xor r8d,esi - xor r10d,edi - xor r11d,ebp - - movzx esi,dh - movzx edi,ah - mov edx,DWORD[((16+12))+r15] - movzx esi,BYTE[rsi*1+r14] - movzx edi,BYTE[rdi*1+r14] - mov eax,DWORD[((16+0))+r15] - - shl esi,24 - shl edi,24 - - xor r12d,esi - xor r8d,edi - - mov ebx,DWORD[((16+4))+r15] - mov ecx,DWORD[((16+8))+r15] - lea r14,[((-2048))+r14] - xor eax,r10d - xor ebx,r11d - xor ecx,r12d - xor edx,r8d -DB 0xf3,0xc3 - - -ALIGN 16 -_x86_64_AES_decrypt_compact: - lea r8,[128+r14] - mov edi,DWORD[((0-128))+r8] - mov ebp,DWORD[((32-128))+r8] - mov r10d,DWORD[((64-128))+r8] - mov r11d,DWORD[((96-128))+r8] - mov edi,DWORD[((128-128))+r8] - mov ebp,DWORD[((160-128))+r8] - mov r10d,DWORD[((192-128))+r8] - mov r11d,DWORD[((224-128))+r8] - jmp NEAR $L$dec_loop_compact - -ALIGN 16 -$L$dec_loop_compact: - xor eax,DWORD[r15] - xor ebx,DWORD[4+r15] - xor ecx,DWORD[8+r15] - xor edx,DWORD[12+r15] - lea r15,[16+r15] - movzx r10d,al - movzx r11d,bl - movzx r12d,cl - movzx r8d,dl - movzx esi,dh - movzx edi,ah - shr edx,16 - movzx ebp,bh - movzx r10d,BYTE[r10*1+r14] - movzx r11d,BYTE[r11*1+r14] - movzx r12d,BYTE[r12*1+r14] - movzx r8d,BYTE[r8*1+r14] - - movzx r9d,BYTE[rsi*1+r14] - movzx esi,ch - movzx r13d,BYTE[rdi*1+r14] - movzx ebp,BYTE[rbp*1+r14] - movzx esi,BYTE[rsi*1+r14] - - shr ecx,16 - shl r13d,8 - shl r9d,8 - movzx edi,cl - shr eax,16 - xor r10d,r9d - shr ebx,16 - movzx r9d,dl - - shl ebp,8 - xor r11d,r13d - shl esi,8 - movzx r13d,al - movzx edi,BYTE[rdi*1+r14] - xor r12d,ebp - movzx ebp,bl - - shl edi,16 - xor r8d,esi - movzx r9d,BYTE[r9*1+r14] - movzx esi,bh - movzx ebp,BYTE[rbp*1+r14] - xor r10d,edi - movzx r13d,BYTE[r13*1+r14] - movzx edi,ch - - shl ebp,16 - shl r9d,16 - shl r13d,16 - xor r8d,ebp - movzx ebp,dh - xor r11d,r9d - shr eax,8 - xor r12d,r13d - - movzx esi,BYTE[rsi*1+r14] - movzx ebx,BYTE[rdi*1+r14] - movzx ecx,BYTE[rbp*1+r14] - movzx edx,BYTE[rax*1+r14] - - mov eax,r10d - shl esi,24 - shl ebx,24 - shl ecx,24 - xor eax,esi - shl edx,24 - xor ebx,r11d - xor ecx,r12d - xor edx,r8d - cmp r15,QWORD[16+rsp] - je NEAR $L$dec_compact_done - - mov rsi,QWORD[((256+0))+r14] - shl rbx,32 - shl rdx,32 - mov rdi,QWORD[((256+8))+r14] - or rax,rbx - or rcx,rdx - mov rbp,QWORD[((256+16))+r14] - mov r9,rsi - mov r12,rsi - and r9,rax - and r12,rcx - mov rbx,r9 - mov rdx,r12 - shr r9,7 - lea r8,[rax*1+rax] - shr r12,7 - lea r11,[rcx*1+rcx] - sub rbx,r9 - sub rdx,r12 - and r8,rdi - and r11,rdi - and rbx,rbp - and rdx,rbp - xor r8,rbx - xor r11,rdx - mov r10,rsi - mov r13,rsi - - and r10,r8 - and r13,r11 - mov rbx,r10 - mov rdx,r13 - shr r10,7 - lea r9,[r8*1+r8] - shr r13,7 - lea r12,[r11*1+r11] - sub rbx,r10 - sub rdx,r13 - and r9,rdi - and r12,rdi - and rbx,rbp - and rdx,rbp - xor r9,rbx - xor r12,rdx - mov r10,rsi - mov r13,rsi - - and r10,r9 - and r13,r12 - mov rbx,r10 - mov rdx,r13 - shr r10,7 - xor r8,rax - shr r13,7 - xor r11,rcx - sub rbx,r10 - sub rdx,r13 - lea r10,[r9*1+r9] - lea r13,[r12*1+r12] - xor r9,rax - xor r12,rcx - and r10,rdi - and r13,rdi - and rbx,rbp - and rdx,rbp - xor r10,rbx - xor r13,rdx - - xor rax,r10 - xor rcx,r13 - xor r8,r10 - xor r11,r13 - mov rbx,rax - mov rdx,rcx - xor r9,r10 - shr rbx,32 - xor r12,r13 - shr rdx,32 - xor r10,r8 - rol eax,8 - xor r13,r11 - rol ecx,8 - xor r10,r9 - rol ebx,8 - xor r13,r12 - - rol edx,8 - xor eax,r10d - shr r10,32 - xor ecx,r13d - shr r13,32 - xor ebx,r10d - xor edx,r13d - - mov r10,r8 - rol r8d,24 - mov r13,r11 - rol r11d,24 - shr r10,32 - xor eax,r8d - shr r13,32 - xor ecx,r11d - rol r10d,24 - mov r8,r9 - rol r13d,24 - mov r11,r12 - shr r8,32 - xor ebx,r10d - shr r11,32 - xor edx,r13d - - mov rsi,QWORD[r14] - rol r9d,16 - mov rdi,QWORD[64+r14] - rol r12d,16 - mov rbp,QWORD[128+r14] - rol r8d,16 - mov r10,QWORD[192+r14] - xor eax,r9d - rol r11d,16 - xor ecx,r12d - mov r13,QWORD[256+r14] - xor ebx,r8d - xor edx,r11d - jmp NEAR $L$dec_loop_compact -ALIGN 16 -$L$dec_compact_done: - xor eax,DWORD[r15] - xor ebx,DWORD[4+r15] - xor ecx,DWORD[8+r15] - xor edx,DWORD[12+r15] -DB 0xf3,0xc3 - -ALIGN 16 -global asm_AES_decrypt - - -asm_AES_decrypt: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_asm_AES_decrypt: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - - - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - - - mov r10,rsp - lea rcx,[((-63))+rdx] - and rsp,-64 - sub rcx,rsp - neg rcx - and rcx,0x3c0 - sub rsp,rcx - sub rsp,32 - - mov QWORD[16+rsp],rsi - mov QWORD[24+rsp],r10 -$L$dec_prologue: - - mov r15,rdx - mov r13d,DWORD[240+r15] - - mov eax,DWORD[rdi] - mov ebx,DWORD[4+rdi] - mov ecx,DWORD[8+rdi] - mov edx,DWORD[12+rdi] - - shl r13d,4 - lea rbp,[r13*1+r15] - mov QWORD[rsp],r15 - mov QWORD[8+rsp],rbp - - - lea r14,[(($L$AES_Td+2048))] - lea rbp,[768+rsp] - sub rbp,r14 - and rbp,0x300 - lea r14,[rbp*1+r14] - shr rbp,3 - add r14,rbp - - call _x86_64_AES_decrypt_compact - - mov r9,QWORD[16+rsp] - mov rsi,QWORD[24+rsp] - mov DWORD[r9],eax - mov DWORD[4+r9],ebx - mov DWORD[8+r9],ecx - mov DWORD[12+r9],edx - - mov r15,QWORD[rsi] - mov r14,QWORD[8+rsi] - mov r13,QWORD[16+rsi] - mov r12,QWORD[24+rsi] - mov rbp,QWORD[32+rsi] - mov rbx,QWORD[40+rsi] - lea rsp,[48+rsi] -$L$dec_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_asm_AES_decrypt: -ALIGN 16 -global asm_AES_set_encrypt_key - -asm_AES_set_encrypt_key: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_asm_AES_set_encrypt_key: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - - - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - sub rsp,8 -$L$enc_key_prologue: - - call _x86_64_AES_set_encrypt_key - - mov rbp,QWORD[40+rsp] - mov rbx,QWORD[48+rsp] - add rsp,56 -$L$enc_key_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_asm_AES_set_encrypt_key: - - -ALIGN 16 -_x86_64_AES_set_encrypt_key: - mov ecx,esi - mov rsi,rdi - mov rdi,rdx - - test rsi,-1 - jz NEAR $L$badpointer - test rdi,-1 - jz NEAR $L$badpointer - - lea rbp,[$L$AES_Te] - lea rbp,[((2048+128))+rbp] - - - mov eax,DWORD[((0-128))+rbp] - mov ebx,DWORD[((32-128))+rbp] - mov r8d,DWORD[((64-128))+rbp] - mov edx,DWORD[((96-128))+rbp] - mov eax,DWORD[((128-128))+rbp] - mov ebx,DWORD[((160-128))+rbp] - mov r8d,DWORD[((192-128))+rbp] - mov edx,DWORD[((224-128))+rbp] - - cmp ecx,128 - je NEAR $L$10rounds - cmp ecx,192 - je NEAR $L$12rounds - cmp ecx,256 - je NEAR $L$14rounds - mov rax,-2 - jmp NEAR $L$exit - -$L$10rounds: - mov rax,QWORD[rsi] - mov rdx,QWORD[8+rsi] - mov QWORD[rdi],rax - mov QWORD[8+rdi],rdx - - shr rdx,32 - xor ecx,ecx - jmp NEAR $L$10shortcut -ALIGN 4 -$L$10loop: - mov eax,DWORD[rdi] - mov edx,DWORD[12+rdi] -$L$10shortcut: - movzx esi,dl - movzx ebx,BYTE[((-128))+rsi*1+rbp] - movzx esi,dh - shl ebx,24 - xor eax,ebx - - movzx ebx,BYTE[((-128))+rsi*1+rbp] - shr edx,16 - movzx esi,dl - xor eax,ebx - - movzx ebx,BYTE[((-128))+rsi*1+rbp] - movzx esi,dh - shl ebx,8 - xor eax,ebx - - movzx ebx,BYTE[((-128))+rsi*1+rbp] - shl ebx,16 - xor eax,ebx - - xor eax,DWORD[((1024-128))+rcx*4+rbp] - mov DWORD[16+rdi],eax - xor eax,DWORD[4+rdi] - mov DWORD[20+rdi],eax - xor eax,DWORD[8+rdi] - mov DWORD[24+rdi],eax - xor eax,DWORD[12+rdi] - mov DWORD[28+rdi],eax - add ecx,1 - lea rdi,[16+rdi] - cmp ecx,10 - jl NEAR $L$10loop - - mov DWORD[80+rdi],10 - xor rax,rax - jmp NEAR $L$exit - -$L$12rounds: - mov rax,QWORD[rsi] - mov rbx,QWORD[8+rsi] - mov rdx,QWORD[16+rsi] - mov QWORD[rdi],rax - mov QWORD[8+rdi],rbx - mov QWORD[16+rdi],rdx - - shr rdx,32 - xor ecx,ecx - jmp NEAR $L$12shortcut -ALIGN 4 -$L$12loop: - mov eax,DWORD[rdi] - mov edx,DWORD[20+rdi] -$L$12shortcut: - movzx esi,dl - movzx ebx,BYTE[((-128))+rsi*1+rbp] - movzx esi,dh - shl ebx,24 - xor eax,ebx - - movzx ebx,BYTE[((-128))+rsi*1+rbp] - shr edx,16 - movzx esi,dl - xor eax,ebx - - movzx ebx,BYTE[((-128))+rsi*1+rbp] - movzx esi,dh - shl ebx,8 - xor eax,ebx - - movzx ebx,BYTE[((-128))+rsi*1+rbp] - shl ebx,16 - xor eax,ebx - - xor eax,DWORD[((1024-128))+rcx*4+rbp] - mov DWORD[24+rdi],eax - xor eax,DWORD[4+rdi] - mov DWORD[28+rdi],eax - xor eax,DWORD[8+rdi] - mov DWORD[32+rdi],eax - xor eax,DWORD[12+rdi] - mov DWORD[36+rdi],eax - - cmp ecx,7 - je NEAR $L$12break - add ecx,1 - - xor eax,DWORD[16+rdi] - mov DWORD[40+rdi],eax - xor eax,DWORD[20+rdi] - mov DWORD[44+rdi],eax - - lea rdi,[24+rdi] - jmp NEAR $L$12loop -$L$12break: - mov DWORD[72+rdi],12 - xor rax,rax - jmp NEAR $L$exit - -$L$14rounds: - mov rax,QWORD[rsi] - mov rbx,QWORD[8+rsi] - mov rcx,QWORD[16+rsi] - mov rdx,QWORD[24+rsi] - mov QWORD[rdi],rax - mov QWORD[8+rdi],rbx - mov QWORD[16+rdi],rcx - mov QWORD[24+rdi],rdx - - shr rdx,32 - xor ecx,ecx - jmp NEAR $L$14shortcut -ALIGN 4 -$L$14loop: - mov eax,DWORD[rdi] - mov edx,DWORD[28+rdi] -$L$14shortcut: - movzx esi,dl - movzx ebx,BYTE[((-128))+rsi*1+rbp] - movzx esi,dh - shl ebx,24 - xor eax,ebx - - movzx ebx,BYTE[((-128))+rsi*1+rbp] - shr edx,16 - movzx esi,dl - xor eax,ebx - - movzx ebx,BYTE[((-128))+rsi*1+rbp] - movzx esi,dh - shl ebx,8 - xor eax,ebx - - movzx ebx,BYTE[((-128))+rsi*1+rbp] - shl ebx,16 - xor eax,ebx - - xor eax,DWORD[((1024-128))+rcx*4+rbp] - mov DWORD[32+rdi],eax - xor eax,DWORD[4+rdi] - mov DWORD[36+rdi],eax - xor eax,DWORD[8+rdi] - mov DWORD[40+rdi],eax - xor eax,DWORD[12+rdi] - mov DWORD[44+rdi],eax - - cmp ecx,6 - je NEAR $L$14break - add ecx,1 - - mov edx,eax - mov eax,DWORD[16+rdi] - movzx esi,dl - movzx ebx,BYTE[((-128))+rsi*1+rbp] - movzx esi,dh - xor eax,ebx - - movzx ebx,BYTE[((-128))+rsi*1+rbp] - shr edx,16 - shl ebx,8 - movzx esi,dl - xor eax,ebx - - movzx ebx,BYTE[((-128))+rsi*1+rbp] - movzx esi,dh - shl ebx,16 - xor eax,ebx - - movzx ebx,BYTE[((-128))+rsi*1+rbp] - shl ebx,24 - xor eax,ebx - - mov DWORD[48+rdi],eax - xor eax,DWORD[20+rdi] - mov DWORD[52+rdi],eax - xor eax,DWORD[24+rdi] - mov DWORD[56+rdi],eax - xor eax,DWORD[28+rdi] - mov DWORD[60+rdi],eax - - lea rdi,[32+rdi] - jmp NEAR $L$14loop -$L$14break: - mov DWORD[48+rdi],14 - xor rax,rax - jmp NEAR $L$exit - -$L$badpointer: - mov rax,-1 -$L$exit: -DB 0xf3,0xc3 - -ALIGN 16 -global asm_AES_set_decrypt_key - -asm_AES_set_decrypt_key: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_asm_AES_set_decrypt_key: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - - - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - push rdx -$L$dec_key_prologue: - - call _x86_64_AES_set_encrypt_key - mov r8,QWORD[rsp] - cmp eax,0 - jne NEAR $L$abort - - mov r14d,DWORD[240+r8] - xor rdi,rdi - lea rcx,[r14*4+rdi] - mov rsi,r8 - lea rdi,[rcx*4+r8] -ALIGN 4 -$L$invert: - mov rax,QWORD[rsi] - mov rbx,QWORD[8+rsi] - mov rcx,QWORD[rdi] - mov rdx,QWORD[8+rdi] - mov QWORD[rdi],rax - mov QWORD[8+rdi],rbx - mov QWORD[rsi],rcx - mov QWORD[8+rsi],rdx - lea rsi,[16+rsi] - lea rdi,[((-16))+rdi] - cmp rdi,rsi - jne NEAR $L$invert - - lea rax,[(($L$AES_Te+2048+1024))] - - mov rsi,QWORD[40+rax] - mov rdi,QWORD[48+rax] - mov rbp,QWORD[56+rax] - - mov r15,r8 - sub r14d,1 -ALIGN 4 -$L$permute: - lea r15,[16+r15] - mov rax,QWORD[r15] - mov rcx,QWORD[8+r15] - mov r9,rsi - mov r12,rsi - and r9,rax - and r12,rcx - mov rbx,r9 - mov rdx,r12 - shr r9,7 - lea r8,[rax*1+rax] - shr r12,7 - lea r11,[rcx*1+rcx] - sub rbx,r9 - sub rdx,r12 - and r8,rdi - and r11,rdi - and rbx,rbp - and rdx,rbp - xor r8,rbx - xor r11,rdx - mov r10,rsi - mov r13,rsi - - and r10,r8 - and r13,r11 - mov rbx,r10 - mov rdx,r13 - shr r10,7 - lea r9,[r8*1+r8] - shr r13,7 - lea r12,[r11*1+r11] - sub rbx,r10 - sub rdx,r13 - and r9,rdi - and r12,rdi - and rbx,rbp - and rdx,rbp - xor r9,rbx - xor r12,rdx - mov r10,rsi - mov r13,rsi - - and r10,r9 - and r13,r12 - mov rbx,r10 - mov rdx,r13 - shr r10,7 - xor r8,rax - shr r13,7 - xor r11,rcx - sub rbx,r10 - sub rdx,r13 - lea r10,[r9*1+r9] - lea r13,[r12*1+r12] - xor r9,rax - xor r12,rcx - and r10,rdi - and r13,rdi - and rbx,rbp - and rdx,rbp - xor r10,rbx - xor r13,rdx - - xor rax,r10 - xor rcx,r13 - xor r8,r10 - xor r11,r13 - mov rbx,rax - mov rdx,rcx - xor r9,r10 - shr rbx,32 - xor r12,r13 - shr rdx,32 - xor r10,r8 - rol eax,8 - xor r13,r11 - rol ecx,8 - xor r10,r9 - rol ebx,8 - xor r13,r12 - - rol edx,8 - xor eax,r10d - shr r10,32 - xor ecx,r13d - shr r13,32 - xor ebx,r10d - xor edx,r13d - - mov r10,r8 - rol r8d,24 - mov r13,r11 - rol r11d,24 - shr r10,32 - xor eax,r8d - shr r13,32 - xor ecx,r11d - rol r10d,24 - mov r8,r9 - rol r13d,24 - mov r11,r12 - shr r8,32 - xor ebx,r10d - shr r11,32 - xor edx,r13d - - - rol r9d,16 - - rol r12d,16 - - rol r8d,16 - - xor eax,r9d - rol r11d,16 - xor ecx,r12d - - xor ebx,r8d - xor edx,r11d - mov DWORD[r15],eax - mov DWORD[4+r15],ebx - mov DWORD[8+r15],ecx - mov DWORD[12+r15],edx - sub r14d,1 - jnz NEAR $L$permute - - xor rax,rax -$L$abort: - mov r15,QWORD[8+rsp] - mov r14,QWORD[16+rsp] - mov r13,QWORD[24+rsp] - mov r12,QWORD[32+rsp] - mov rbp,QWORD[40+rsp] - mov rbx,QWORD[48+rsp] - add rsp,56 -$L$dec_key_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_asm_AES_set_decrypt_key: -ALIGN 16 -global asm_AES_cbc_encrypt - -EXTERN OPENSSL_ia32cap_P - -asm_AES_cbc_encrypt: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_asm_AES_cbc_encrypt: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - mov r9,QWORD[48+rsp] - - - cmp rdx,0 - je NEAR $L$cbc_epilogue - pushfq - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 -$L$cbc_prologue: - - cld - mov r9d,r9d - - lea r14,[$L$AES_Te] - cmp r9,0 - jne NEAR $L$cbc_picked_te - lea r14,[$L$AES_Td] -$L$cbc_picked_te: - - mov r10d,DWORD[OPENSSL_ia32cap_P] - cmp rdx,512 - jb NEAR $L$cbc_slow_prologue - test rdx,15 - jnz NEAR $L$cbc_slow_prologue - bt r10d,28 - jc NEAR $L$cbc_slow_prologue - - - lea r15,[((-88-248))+rsp] - and r15,-64 - - - mov r10,r14 - lea r11,[2304+r14] - mov r12,r15 - and r10,0xFFF - and r11,0xFFF - and r12,0xFFF - - cmp r12,r11 - jb NEAR $L$cbc_te_break_out - sub r12,r11 - sub r15,r12 - jmp NEAR $L$cbc_te_ok -$L$cbc_te_break_out: - sub r12,r10 - and r12,0xFFF - add r12,320 - sub r15,r12 -ALIGN 4 -$L$cbc_te_ok: - - xchg r15,rsp - - mov QWORD[16+rsp],r15 -$L$cbc_fast_body: - mov QWORD[24+rsp],rdi - mov QWORD[32+rsp],rsi - mov QWORD[40+rsp],rdx - mov QWORD[48+rsp],rcx - mov QWORD[56+rsp],r8 - mov DWORD[((80+240))+rsp],0 - mov rbp,r8 - mov rbx,r9 - mov r9,rsi - mov r8,rdi - mov r15,rcx - - mov eax,DWORD[240+r15] - - mov r10,r15 - sub r10,r14 - and r10,0xfff - cmp r10,2304 - jb NEAR $L$cbc_do_ecopy - cmp r10,4096-248 - jb NEAR $L$cbc_skip_ecopy -ALIGN 4 -$L$cbc_do_ecopy: - mov rsi,r15 - lea rdi,[80+rsp] - lea r15,[80+rsp] - mov ecx,240/8 - DD 0x90A548F3 - mov DWORD[rdi],eax -$L$cbc_skip_ecopy: - mov QWORD[rsp],r15 - - mov ecx,18 -ALIGN 4 -$L$cbc_prefetch_te: - mov r10,QWORD[r14] - mov r11,QWORD[32+r14] - mov r12,QWORD[64+r14] - mov r13,QWORD[96+r14] - lea r14,[128+r14] - sub ecx,1 - jnz NEAR $L$cbc_prefetch_te - lea r14,[((-2304))+r14] - - cmp rbx,0 - je NEAR $L$FAST_DECRYPT - - - mov eax,DWORD[rbp] - mov ebx,DWORD[4+rbp] - mov ecx,DWORD[8+rbp] - mov edx,DWORD[12+rbp] - -ALIGN 4 -$L$cbc_fast_enc_loop: - xor eax,DWORD[r8] - xor ebx,DWORD[4+r8] - xor ecx,DWORD[8+r8] - xor edx,DWORD[12+r8] - mov r15,QWORD[rsp] - mov QWORD[24+rsp],r8 - - call _x86_64_AES_encrypt - - mov r8,QWORD[24+rsp] - mov r10,QWORD[40+rsp] - mov DWORD[r9],eax - mov DWORD[4+r9],ebx - mov DWORD[8+r9],ecx - mov DWORD[12+r9],edx - - lea r8,[16+r8] - lea r9,[16+r9] - sub r10,16 - test r10,-16 - mov QWORD[40+rsp],r10 - jnz NEAR $L$cbc_fast_enc_loop - mov rbp,QWORD[56+rsp] - mov DWORD[rbp],eax - mov DWORD[4+rbp],ebx - mov DWORD[8+rbp],ecx - mov DWORD[12+rbp],edx - - jmp NEAR $L$cbc_fast_cleanup - - -ALIGN 16 -$L$FAST_DECRYPT: - cmp r9,r8 - je NEAR $L$cbc_fast_dec_in_place - - mov QWORD[64+rsp],rbp -ALIGN 4 -$L$cbc_fast_dec_loop: - mov eax,DWORD[r8] - mov ebx,DWORD[4+r8] - mov ecx,DWORD[8+r8] - mov edx,DWORD[12+r8] - mov r15,QWORD[rsp] - mov QWORD[24+rsp],r8 - - call _x86_64_AES_decrypt - - mov rbp,QWORD[64+rsp] - mov r8,QWORD[24+rsp] - mov r10,QWORD[40+rsp] - xor eax,DWORD[rbp] - xor ebx,DWORD[4+rbp] - xor ecx,DWORD[8+rbp] - xor edx,DWORD[12+rbp] - mov rbp,r8 - - sub r10,16 - mov QWORD[40+rsp],r10 - mov QWORD[64+rsp],rbp - - mov DWORD[r9],eax - mov DWORD[4+r9],ebx - mov DWORD[8+r9],ecx - mov DWORD[12+r9],edx - - lea r8,[16+r8] - lea r9,[16+r9] - jnz NEAR $L$cbc_fast_dec_loop - mov r12,QWORD[56+rsp] - mov r10,QWORD[rbp] - mov r11,QWORD[8+rbp] - mov QWORD[r12],r10 - mov QWORD[8+r12],r11 - jmp NEAR $L$cbc_fast_cleanup - -ALIGN 16 -$L$cbc_fast_dec_in_place: - mov r10,QWORD[rbp] - mov r11,QWORD[8+rbp] - mov QWORD[((0+64))+rsp],r10 - mov QWORD[((8+64))+rsp],r11 -ALIGN 4 -$L$cbc_fast_dec_in_place_loop: - mov eax,DWORD[r8] - mov ebx,DWORD[4+r8] - mov ecx,DWORD[8+r8] - mov edx,DWORD[12+r8] - mov r15,QWORD[rsp] - mov QWORD[24+rsp],r8 - - call _x86_64_AES_decrypt - - mov r8,QWORD[24+rsp] - mov r10,QWORD[40+rsp] - xor eax,DWORD[((0+64))+rsp] - xor ebx,DWORD[((4+64))+rsp] - xor ecx,DWORD[((8+64))+rsp] - xor edx,DWORD[((12+64))+rsp] - - mov r11,QWORD[r8] - mov r12,QWORD[8+r8] - sub r10,16 - jz NEAR $L$cbc_fast_dec_in_place_done - - mov QWORD[((0+64))+rsp],r11 - mov QWORD[((8+64))+rsp],r12 - - mov DWORD[r9],eax - mov DWORD[4+r9],ebx - mov DWORD[8+r9],ecx - mov DWORD[12+r9],edx - - lea r8,[16+r8] - lea r9,[16+r9] - mov QWORD[40+rsp],r10 - jmp NEAR $L$cbc_fast_dec_in_place_loop -$L$cbc_fast_dec_in_place_done: - mov rdi,QWORD[56+rsp] - mov QWORD[rdi],r11 - mov QWORD[8+rdi],r12 - - mov DWORD[r9],eax - mov DWORD[4+r9],ebx - mov DWORD[8+r9],ecx - mov DWORD[12+r9],edx - -ALIGN 4 -$L$cbc_fast_cleanup: - cmp DWORD[((80+240))+rsp],0 - lea rdi,[80+rsp] - je NEAR $L$cbc_exit - mov ecx,240/8 - xor rax,rax - DD 0x90AB48F3 - - jmp NEAR $L$cbc_exit - - -ALIGN 16 -$L$cbc_slow_prologue: - - lea rbp,[((-88))+rsp] - and rbp,-64 - - lea r10,[((-88-63))+rcx] - sub r10,rbp - neg r10 - and r10,0x3c0 - sub rbp,r10 - - xchg rbp,rsp - - mov QWORD[16+rsp],rbp -$L$cbc_slow_body: - - - - - mov QWORD[56+rsp],r8 - mov rbp,r8 - mov rbx,r9 - mov r9,rsi - mov r8,rdi - mov r15,rcx - mov r10,rdx - - mov eax,DWORD[240+r15] - mov QWORD[rsp],r15 - shl eax,4 - lea rax,[rax*1+r15] - mov QWORD[8+rsp],rax - - - lea r14,[2048+r14] - lea rax,[((768-8))+rsp] - sub rax,r14 - and rax,0x300 - lea r14,[rax*1+r14] - - cmp rbx,0 - je NEAR $L$SLOW_DECRYPT - - - test r10,-16 - mov eax,DWORD[rbp] - mov ebx,DWORD[4+rbp] - mov ecx,DWORD[8+rbp] - mov edx,DWORD[12+rbp] - jz NEAR $L$cbc_slow_enc_tail - -ALIGN 4 -$L$cbc_slow_enc_loop: - xor eax,DWORD[r8] - xor ebx,DWORD[4+r8] - xor ecx,DWORD[8+r8] - xor edx,DWORD[12+r8] - mov r15,QWORD[rsp] - mov QWORD[24+rsp],r8 - mov QWORD[32+rsp],r9 - mov QWORD[40+rsp],r10 - - call _x86_64_AES_encrypt_compact - - mov r8,QWORD[24+rsp] - mov r9,QWORD[32+rsp] - mov r10,QWORD[40+rsp] - mov DWORD[r9],eax - mov DWORD[4+r9],ebx - mov DWORD[8+r9],ecx - mov DWORD[12+r9],edx - - lea r8,[16+r8] - lea r9,[16+r9] - sub r10,16 - test r10,-16 - jnz NEAR $L$cbc_slow_enc_loop - test r10,15 - jnz NEAR $L$cbc_slow_enc_tail - mov rbp,QWORD[56+rsp] - mov DWORD[rbp],eax - mov DWORD[4+rbp],ebx - mov DWORD[8+rbp],ecx - mov DWORD[12+rbp],edx - - jmp NEAR $L$cbc_exit - -ALIGN 4 -$L$cbc_slow_enc_tail: - mov r11,rax - mov r12,rcx - mov rcx,r10 - mov rsi,r8 - mov rdi,r9 - DD 0x9066A4F3 - mov rcx,16 - sub rcx,r10 - xor rax,rax - DD 0x9066AAF3 - mov r8,r9 - mov r10,16 - mov rax,r11 - mov rcx,r12 - jmp NEAR $L$cbc_slow_enc_loop - -ALIGN 16 -$L$SLOW_DECRYPT: - shr rax,3 - add r14,rax - - mov r11,QWORD[rbp] - mov r12,QWORD[8+rbp] - mov QWORD[((0+64))+rsp],r11 - mov QWORD[((8+64))+rsp],r12 - -ALIGN 4 -$L$cbc_slow_dec_loop: - mov eax,DWORD[r8] - mov ebx,DWORD[4+r8] - mov ecx,DWORD[8+r8] - mov edx,DWORD[12+r8] - mov r15,QWORD[rsp] - mov QWORD[24+rsp],r8 - mov QWORD[32+rsp],r9 - mov QWORD[40+rsp],r10 - - call _x86_64_AES_decrypt_compact - - mov r8,QWORD[24+rsp] - mov r9,QWORD[32+rsp] - mov r10,QWORD[40+rsp] - xor eax,DWORD[((0+64))+rsp] - xor ebx,DWORD[((4+64))+rsp] - xor ecx,DWORD[((8+64))+rsp] - xor edx,DWORD[((12+64))+rsp] - - mov r11,QWORD[r8] - mov r12,QWORD[8+r8] - sub r10,16 - jc NEAR $L$cbc_slow_dec_partial - jz NEAR $L$cbc_slow_dec_done - - mov QWORD[((0+64))+rsp],r11 - mov QWORD[((8+64))+rsp],r12 - - mov DWORD[r9],eax - mov DWORD[4+r9],ebx - mov DWORD[8+r9],ecx - mov DWORD[12+r9],edx - - lea r8,[16+r8] - lea r9,[16+r9] - jmp NEAR $L$cbc_slow_dec_loop -$L$cbc_slow_dec_done: - mov rdi,QWORD[56+rsp] - mov QWORD[rdi],r11 - mov QWORD[8+rdi],r12 - - mov DWORD[r9],eax - mov DWORD[4+r9],ebx - mov DWORD[8+r9],ecx - mov DWORD[12+r9],edx - - jmp NEAR $L$cbc_exit - -ALIGN 4 -$L$cbc_slow_dec_partial: - mov rdi,QWORD[56+rsp] - mov QWORD[rdi],r11 - mov QWORD[8+rdi],r12 - - mov DWORD[((0+64))+rsp],eax - mov DWORD[((4+64))+rsp],ebx - mov DWORD[((8+64))+rsp],ecx - mov DWORD[((12+64))+rsp],edx - - mov rdi,r9 - lea rsi,[64+rsp] - lea rcx,[16+r10] - DD 0x9066A4F3 - jmp NEAR $L$cbc_exit - -ALIGN 16 -$L$cbc_exit: - mov rsi,QWORD[16+rsp] - mov r15,QWORD[rsi] - mov r14,QWORD[8+rsi] - mov r13,QWORD[16+rsi] - mov r12,QWORD[24+rsi] - mov rbp,QWORD[32+rsi] - mov rbx,QWORD[40+rsi] - lea rsp,[48+rsi] -$L$cbc_popfq: - popfq -$L$cbc_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_asm_AES_cbc_encrypt: -ALIGN 64 -$L$AES_Te: - DD 0xa56363c6,0xa56363c6 - DD 0x847c7cf8,0x847c7cf8 - DD 0x997777ee,0x997777ee - DD 0x8d7b7bf6,0x8d7b7bf6 - DD 0x0df2f2ff,0x0df2f2ff - DD 0xbd6b6bd6,0xbd6b6bd6 - DD 0xb16f6fde,0xb16f6fde - DD 0x54c5c591,0x54c5c591 - DD 0x50303060,0x50303060 - DD 0x03010102,0x03010102 - DD 0xa96767ce,0xa96767ce - DD 0x7d2b2b56,0x7d2b2b56 - DD 0x19fefee7,0x19fefee7 - DD 0x62d7d7b5,0x62d7d7b5 - DD 0xe6abab4d,0xe6abab4d - DD 0x9a7676ec,0x9a7676ec - DD 0x45caca8f,0x45caca8f - DD 0x9d82821f,0x9d82821f - DD 0x40c9c989,0x40c9c989 - DD 0x877d7dfa,0x877d7dfa - DD 0x15fafaef,0x15fafaef - DD 0xeb5959b2,0xeb5959b2 - DD 0xc947478e,0xc947478e - DD 0x0bf0f0fb,0x0bf0f0fb - DD 0xecadad41,0xecadad41 - DD 0x67d4d4b3,0x67d4d4b3 - DD 0xfda2a25f,0xfda2a25f - DD 0xeaafaf45,0xeaafaf45 - DD 0xbf9c9c23,0xbf9c9c23 - DD 0xf7a4a453,0xf7a4a453 - DD 0x967272e4,0x967272e4 - DD 0x5bc0c09b,0x5bc0c09b - DD 0xc2b7b775,0xc2b7b775 - DD 0x1cfdfde1,0x1cfdfde1 - DD 0xae93933d,0xae93933d - DD 0x6a26264c,0x6a26264c - DD 0x5a36366c,0x5a36366c - DD 0x413f3f7e,0x413f3f7e - DD 0x02f7f7f5,0x02f7f7f5 - DD 0x4fcccc83,0x4fcccc83 - DD 0x5c343468,0x5c343468 - DD 0xf4a5a551,0xf4a5a551 - DD 0x34e5e5d1,0x34e5e5d1 - DD 0x08f1f1f9,0x08f1f1f9 - DD 0x937171e2,0x937171e2 - DD 0x73d8d8ab,0x73d8d8ab - DD 0x53313162,0x53313162 - DD 0x3f15152a,0x3f15152a - DD 0x0c040408,0x0c040408 - DD 0x52c7c795,0x52c7c795 - DD 0x65232346,0x65232346 - DD 0x5ec3c39d,0x5ec3c39d - DD 0x28181830,0x28181830 - DD 0xa1969637,0xa1969637 - DD 0x0f05050a,0x0f05050a - DD 0xb59a9a2f,0xb59a9a2f - DD 0x0907070e,0x0907070e - DD 0x36121224,0x36121224 - DD 0x9b80801b,0x9b80801b - DD 0x3de2e2df,0x3de2e2df - DD 0x26ebebcd,0x26ebebcd - DD 0x6927274e,0x6927274e - DD 0xcdb2b27f,0xcdb2b27f - DD 0x9f7575ea,0x9f7575ea - DD 0x1b090912,0x1b090912 - DD 0x9e83831d,0x9e83831d - DD 0x742c2c58,0x742c2c58 - DD 0x2e1a1a34,0x2e1a1a34 - DD 0x2d1b1b36,0x2d1b1b36 - DD 0xb26e6edc,0xb26e6edc - DD 0xee5a5ab4,0xee5a5ab4 - DD 0xfba0a05b,0xfba0a05b - DD 0xf65252a4,0xf65252a4 - DD 0x4d3b3b76,0x4d3b3b76 - DD 0x61d6d6b7,0x61d6d6b7 - DD 0xceb3b37d,0xceb3b37d - DD 0x7b292952,0x7b292952 - DD 0x3ee3e3dd,0x3ee3e3dd - DD 0x712f2f5e,0x712f2f5e - DD 0x97848413,0x97848413 - DD 0xf55353a6,0xf55353a6 - DD 0x68d1d1b9,0x68d1d1b9 - DD 0x00000000,0x00000000 - DD 0x2cededc1,0x2cededc1 - DD 0x60202040,0x60202040 - DD 0x1ffcfce3,0x1ffcfce3 - DD 0xc8b1b179,0xc8b1b179 - DD 0xed5b5bb6,0xed5b5bb6 - DD 0xbe6a6ad4,0xbe6a6ad4 - DD 0x46cbcb8d,0x46cbcb8d - DD 0xd9bebe67,0xd9bebe67 - DD 0x4b393972,0x4b393972 - DD 0xde4a4a94,0xde4a4a94 - DD 0xd44c4c98,0xd44c4c98 - DD 0xe85858b0,0xe85858b0 - DD 0x4acfcf85,0x4acfcf85 - DD 0x6bd0d0bb,0x6bd0d0bb - DD 0x2aefefc5,0x2aefefc5 - DD 0xe5aaaa4f,0xe5aaaa4f - DD 0x16fbfbed,0x16fbfbed - DD 0xc5434386,0xc5434386 - DD 0xd74d4d9a,0xd74d4d9a - DD 0x55333366,0x55333366 - DD 0x94858511,0x94858511 - DD 0xcf45458a,0xcf45458a - DD 0x10f9f9e9,0x10f9f9e9 - DD 0x06020204,0x06020204 - DD 0x817f7ffe,0x817f7ffe - DD 0xf05050a0,0xf05050a0 - DD 0x443c3c78,0x443c3c78 - DD 0xba9f9f25,0xba9f9f25 - DD 0xe3a8a84b,0xe3a8a84b - DD 0xf35151a2,0xf35151a2 - DD 0xfea3a35d,0xfea3a35d - DD 0xc0404080,0xc0404080 - DD 0x8a8f8f05,0x8a8f8f05 - DD 0xad92923f,0xad92923f - DD 0xbc9d9d21,0xbc9d9d21 - DD 0x48383870,0x48383870 - DD 0x04f5f5f1,0x04f5f5f1 - DD 0xdfbcbc63,0xdfbcbc63 - DD 0xc1b6b677,0xc1b6b677 - DD 0x75dadaaf,0x75dadaaf - DD 0x63212142,0x63212142 - DD 0x30101020,0x30101020 - DD 0x1affffe5,0x1affffe5 - DD 0x0ef3f3fd,0x0ef3f3fd - DD 0x6dd2d2bf,0x6dd2d2bf - DD 0x4ccdcd81,0x4ccdcd81 - DD 0x140c0c18,0x140c0c18 - DD 0x35131326,0x35131326 - DD 0x2fececc3,0x2fececc3 - DD 0xe15f5fbe,0xe15f5fbe - DD 0xa2979735,0xa2979735 - DD 0xcc444488,0xcc444488 - DD 0x3917172e,0x3917172e - DD 0x57c4c493,0x57c4c493 - DD 0xf2a7a755,0xf2a7a755 - DD 0x827e7efc,0x827e7efc - DD 0x473d3d7a,0x473d3d7a - DD 0xac6464c8,0xac6464c8 - DD 0xe75d5dba,0xe75d5dba - DD 0x2b191932,0x2b191932 - DD 0x957373e6,0x957373e6 - DD 0xa06060c0,0xa06060c0 - DD 0x98818119,0x98818119 - DD 0xd14f4f9e,0xd14f4f9e - DD 0x7fdcdca3,0x7fdcdca3 - DD 0x66222244,0x66222244 - DD 0x7e2a2a54,0x7e2a2a54 - DD 0xab90903b,0xab90903b - DD 0x8388880b,0x8388880b - DD 0xca46468c,0xca46468c - DD 0x29eeeec7,0x29eeeec7 - DD 0xd3b8b86b,0xd3b8b86b - DD 0x3c141428,0x3c141428 - DD 0x79dedea7,0x79dedea7 - DD 0xe25e5ebc,0xe25e5ebc - DD 0x1d0b0b16,0x1d0b0b16 - DD 0x76dbdbad,0x76dbdbad - DD 0x3be0e0db,0x3be0e0db - DD 0x56323264,0x56323264 - DD 0x4e3a3a74,0x4e3a3a74 - DD 0x1e0a0a14,0x1e0a0a14 - DD 0xdb494992,0xdb494992 - DD 0x0a06060c,0x0a06060c - DD 0x6c242448,0x6c242448 - DD 0xe45c5cb8,0xe45c5cb8 - DD 0x5dc2c29f,0x5dc2c29f - DD 0x6ed3d3bd,0x6ed3d3bd - DD 0xefacac43,0xefacac43 - DD 0xa66262c4,0xa66262c4 - DD 0xa8919139,0xa8919139 - DD 0xa4959531,0xa4959531 - DD 0x37e4e4d3,0x37e4e4d3 - DD 0x8b7979f2,0x8b7979f2 - DD 0x32e7e7d5,0x32e7e7d5 - DD 0x43c8c88b,0x43c8c88b - DD 0x5937376e,0x5937376e - DD 0xb76d6dda,0xb76d6dda - DD 0x8c8d8d01,0x8c8d8d01 - DD 0x64d5d5b1,0x64d5d5b1 - DD 0xd24e4e9c,0xd24e4e9c - DD 0xe0a9a949,0xe0a9a949 - DD 0xb46c6cd8,0xb46c6cd8 - DD 0xfa5656ac,0xfa5656ac - DD 0x07f4f4f3,0x07f4f4f3 - DD 0x25eaeacf,0x25eaeacf - DD 0xaf6565ca,0xaf6565ca - DD 0x8e7a7af4,0x8e7a7af4 - DD 0xe9aeae47,0xe9aeae47 - DD 0x18080810,0x18080810 - DD 0xd5baba6f,0xd5baba6f - DD 0x887878f0,0x887878f0 - DD 0x6f25254a,0x6f25254a - DD 0x722e2e5c,0x722e2e5c - DD 0x241c1c38,0x241c1c38 - DD 0xf1a6a657,0xf1a6a657 - DD 0xc7b4b473,0xc7b4b473 - DD 0x51c6c697,0x51c6c697 - DD 0x23e8e8cb,0x23e8e8cb - DD 0x7cdddda1,0x7cdddda1 - DD 0x9c7474e8,0x9c7474e8 - DD 0x211f1f3e,0x211f1f3e - DD 0xdd4b4b96,0xdd4b4b96 - DD 0xdcbdbd61,0xdcbdbd61 - DD 0x868b8b0d,0x868b8b0d - DD 0x858a8a0f,0x858a8a0f - DD 0x907070e0,0x907070e0 - DD 0x423e3e7c,0x423e3e7c - DD 0xc4b5b571,0xc4b5b571 - DD 0xaa6666cc,0xaa6666cc - DD 0xd8484890,0xd8484890 - DD 0x05030306,0x05030306 - DD 0x01f6f6f7,0x01f6f6f7 - DD 0x120e0e1c,0x120e0e1c - DD 0xa36161c2,0xa36161c2 - DD 0x5f35356a,0x5f35356a - DD 0xf95757ae,0xf95757ae - DD 0xd0b9b969,0xd0b9b969 - DD 0x91868617,0x91868617 - DD 0x58c1c199,0x58c1c199 - DD 0x271d1d3a,0x271d1d3a - DD 0xb99e9e27,0xb99e9e27 - DD 0x38e1e1d9,0x38e1e1d9 - DD 0x13f8f8eb,0x13f8f8eb - DD 0xb398982b,0xb398982b - DD 0x33111122,0x33111122 - DD 0xbb6969d2,0xbb6969d2 - DD 0x70d9d9a9,0x70d9d9a9 - DD 0x898e8e07,0x898e8e07 - DD 0xa7949433,0xa7949433 - DD 0xb69b9b2d,0xb69b9b2d - DD 0x221e1e3c,0x221e1e3c - DD 0x92878715,0x92878715 - DD 0x20e9e9c9,0x20e9e9c9 - DD 0x49cece87,0x49cece87 - DD 0xff5555aa,0xff5555aa - DD 0x78282850,0x78282850 - DD 0x7adfdfa5,0x7adfdfa5 - DD 0x8f8c8c03,0x8f8c8c03 - DD 0xf8a1a159,0xf8a1a159 - DD 0x80898909,0x80898909 - DD 0x170d0d1a,0x170d0d1a - DD 0xdabfbf65,0xdabfbf65 - DD 0x31e6e6d7,0x31e6e6d7 - DD 0xc6424284,0xc6424284 - DD 0xb86868d0,0xb86868d0 - DD 0xc3414182,0xc3414182 - DD 0xb0999929,0xb0999929 - DD 0x772d2d5a,0x772d2d5a - DD 0x110f0f1e,0x110f0f1e - DD 0xcbb0b07b,0xcbb0b07b - DD 0xfc5454a8,0xfc5454a8 - DD 0xd6bbbb6d,0xd6bbbb6d - DD 0x3a16162c,0x3a16162c -DB 0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5 -DB 0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76 -DB 0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0 -DB 0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0 -DB 0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc -DB 0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15 -DB 0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a -DB 0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75 -DB 0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0 -DB 0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84 -DB 0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b -DB 0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf -DB 0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85 -DB 0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8 -DB 0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5 -DB 0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2 -DB 0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17 -DB 0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73 -DB 0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88 -DB 0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb -DB 0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c -DB 0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79 -DB 0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9 -DB 0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08 -DB 0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6 -DB 0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a -DB 0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e -DB 0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e -DB 0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94 -DB 0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf -DB 0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68 -DB 0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16 -DB 0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5 -DB 0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76 -DB 0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0 -DB 0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0 -DB 0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc -DB 0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15 -DB 0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a -DB 0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75 -DB 0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0 -DB 0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84 -DB 0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b -DB 0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf -DB 0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85 -DB 0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8 -DB 0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5 -DB 0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2 -DB 0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17 -DB 0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73 -DB 0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88 -DB 0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb -DB 0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c -DB 0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79 -DB 0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9 -DB 0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08 -DB 0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6 -DB 0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a -DB 0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e -DB 0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e -DB 0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94 -DB 0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf -DB 0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68 -DB 0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16 -DB 0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5 -DB 0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76 -DB 0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0 -DB 0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0 -DB 0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc -DB 0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15 -DB 0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a -DB 0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75 -DB 0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0 -DB 0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84 -DB 0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b -DB 0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf -DB 0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85 -DB 0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8 -DB 0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5 -DB 0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2 -DB 0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17 -DB 0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73 -DB 0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88 -DB 0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb -DB 0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c -DB 0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79 -DB 0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9 -DB 0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08 -DB 0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6 -DB 0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a -DB 0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e -DB 0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e -DB 0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94 -DB 0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf -DB 0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68 -DB 0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16 -DB 0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5 -DB 0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76 -DB 0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0 -DB 0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0 -DB 0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc -DB 0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15 -DB 0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a -DB 0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75 -DB 0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0 -DB 0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84 -DB 0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b -DB 0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf -DB 0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85 -DB 0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8 -DB 0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5 -DB 0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2 -DB 0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17 -DB 0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73 -DB 0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88 -DB 0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb -DB 0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c -DB 0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79 -DB 0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9 -DB 0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08 -DB 0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6 -DB 0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a -DB 0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e -DB 0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e -DB 0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94 -DB 0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf -DB 0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68 -DB 0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16 - DD 0x00000001,0x00000002,0x00000004,0x00000008 - DD 0x00000010,0x00000020,0x00000040,0x00000080 - DD 0x0000001b,0x00000036,0x80808080,0x80808080 - DD 0xfefefefe,0xfefefefe,0x1b1b1b1b,0x1b1b1b1b -ALIGN 64 -$L$AES_Td: - DD 0x50a7f451,0x50a7f451 - DD 0x5365417e,0x5365417e - DD 0xc3a4171a,0xc3a4171a - DD 0x965e273a,0x965e273a - DD 0xcb6bab3b,0xcb6bab3b - DD 0xf1459d1f,0xf1459d1f - DD 0xab58faac,0xab58faac - DD 0x9303e34b,0x9303e34b - DD 0x55fa3020,0x55fa3020 - DD 0xf66d76ad,0xf66d76ad - DD 0x9176cc88,0x9176cc88 - DD 0x254c02f5,0x254c02f5 - DD 0xfcd7e54f,0xfcd7e54f - DD 0xd7cb2ac5,0xd7cb2ac5 - DD 0x80443526,0x80443526 - DD 0x8fa362b5,0x8fa362b5 - DD 0x495ab1de,0x495ab1de - DD 0x671bba25,0x671bba25 - DD 0x980eea45,0x980eea45 - DD 0xe1c0fe5d,0xe1c0fe5d - DD 0x02752fc3,0x02752fc3 - DD 0x12f04c81,0x12f04c81 - DD 0xa397468d,0xa397468d - DD 0xc6f9d36b,0xc6f9d36b - DD 0xe75f8f03,0xe75f8f03 - DD 0x959c9215,0x959c9215 - DD 0xeb7a6dbf,0xeb7a6dbf - DD 0xda595295,0xda595295 - DD 0x2d83bed4,0x2d83bed4 - DD 0xd3217458,0xd3217458 - DD 0x2969e049,0x2969e049 - DD 0x44c8c98e,0x44c8c98e - DD 0x6a89c275,0x6a89c275 - DD 0x78798ef4,0x78798ef4 - DD 0x6b3e5899,0x6b3e5899 - DD 0xdd71b927,0xdd71b927 - DD 0xb64fe1be,0xb64fe1be - DD 0x17ad88f0,0x17ad88f0 - DD 0x66ac20c9,0x66ac20c9 - DD 0xb43ace7d,0xb43ace7d - DD 0x184adf63,0x184adf63 - DD 0x82311ae5,0x82311ae5 - DD 0x60335197,0x60335197 - DD 0x457f5362,0x457f5362 - DD 0xe07764b1,0xe07764b1 - DD 0x84ae6bbb,0x84ae6bbb - DD 0x1ca081fe,0x1ca081fe - DD 0x942b08f9,0x942b08f9 - DD 0x58684870,0x58684870 - DD 0x19fd458f,0x19fd458f - DD 0x876cde94,0x876cde94 - DD 0xb7f87b52,0xb7f87b52 - DD 0x23d373ab,0x23d373ab - DD 0xe2024b72,0xe2024b72 - DD 0x578f1fe3,0x578f1fe3 - DD 0x2aab5566,0x2aab5566 - DD 0x0728ebb2,0x0728ebb2 - DD 0x03c2b52f,0x03c2b52f - DD 0x9a7bc586,0x9a7bc586 - DD 0xa50837d3,0xa50837d3 - DD 0xf2872830,0xf2872830 - DD 0xb2a5bf23,0xb2a5bf23 - DD 0xba6a0302,0xba6a0302 - DD 0x5c8216ed,0x5c8216ed - DD 0x2b1ccf8a,0x2b1ccf8a - DD 0x92b479a7,0x92b479a7 - DD 0xf0f207f3,0xf0f207f3 - DD 0xa1e2694e,0xa1e2694e - DD 0xcdf4da65,0xcdf4da65 - DD 0xd5be0506,0xd5be0506 - DD 0x1f6234d1,0x1f6234d1 - DD 0x8afea6c4,0x8afea6c4 - DD 0x9d532e34,0x9d532e34 - DD 0xa055f3a2,0xa055f3a2 - DD 0x32e18a05,0x32e18a05 - DD 0x75ebf6a4,0x75ebf6a4 - DD 0x39ec830b,0x39ec830b - DD 0xaaef6040,0xaaef6040 - DD 0x069f715e,0x069f715e - DD 0x51106ebd,0x51106ebd - DD 0xf98a213e,0xf98a213e - DD 0x3d06dd96,0x3d06dd96 - DD 0xae053edd,0xae053edd - DD 0x46bde64d,0x46bde64d - DD 0xb58d5491,0xb58d5491 - DD 0x055dc471,0x055dc471 - DD 0x6fd40604,0x6fd40604 - DD 0xff155060,0xff155060 - DD 0x24fb9819,0x24fb9819 - DD 0x97e9bdd6,0x97e9bdd6 - DD 0xcc434089,0xcc434089 - DD 0x779ed967,0x779ed967 - DD 0xbd42e8b0,0xbd42e8b0 - DD 0x888b8907,0x888b8907 - DD 0x385b19e7,0x385b19e7 - DD 0xdbeec879,0xdbeec879 - DD 0x470a7ca1,0x470a7ca1 - DD 0xe90f427c,0xe90f427c - DD 0xc91e84f8,0xc91e84f8 - DD 0x00000000,0x00000000 - DD 0x83868009,0x83868009 - DD 0x48ed2b32,0x48ed2b32 - DD 0xac70111e,0xac70111e - DD 0x4e725a6c,0x4e725a6c - DD 0xfbff0efd,0xfbff0efd - DD 0x5638850f,0x5638850f - DD 0x1ed5ae3d,0x1ed5ae3d - DD 0x27392d36,0x27392d36 - DD 0x64d90f0a,0x64d90f0a - DD 0x21a65c68,0x21a65c68 - DD 0xd1545b9b,0xd1545b9b - DD 0x3a2e3624,0x3a2e3624 - DD 0xb1670a0c,0xb1670a0c - DD 0x0fe75793,0x0fe75793 - DD 0xd296eeb4,0xd296eeb4 - DD 0x9e919b1b,0x9e919b1b - DD 0x4fc5c080,0x4fc5c080 - DD 0xa220dc61,0xa220dc61 - DD 0x694b775a,0x694b775a - DD 0x161a121c,0x161a121c - DD 0x0aba93e2,0x0aba93e2 - DD 0xe52aa0c0,0xe52aa0c0 - DD 0x43e0223c,0x43e0223c - DD 0x1d171b12,0x1d171b12 - DD 0x0b0d090e,0x0b0d090e - DD 0xadc78bf2,0xadc78bf2 - DD 0xb9a8b62d,0xb9a8b62d - DD 0xc8a91e14,0xc8a91e14 - DD 0x8519f157,0x8519f157 - DD 0x4c0775af,0x4c0775af - DD 0xbbdd99ee,0xbbdd99ee - DD 0xfd607fa3,0xfd607fa3 - DD 0x9f2601f7,0x9f2601f7 - DD 0xbcf5725c,0xbcf5725c - DD 0xc53b6644,0xc53b6644 - DD 0x347efb5b,0x347efb5b - DD 0x7629438b,0x7629438b - DD 0xdcc623cb,0xdcc623cb - DD 0x68fcedb6,0x68fcedb6 - DD 0x63f1e4b8,0x63f1e4b8 - DD 0xcadc31d7,0xcadc31d7 - DD 0x10856342,0x10856342 - DD 0x40229713,0x40229713 - DD 0x2011c684,0x2011c684 - DD 0x7d244a85,0x7d244a85 - DD 0xf83dbbd2,0xf83dbbd2 - DD 0x1132f9ae,0x1132f9ae - DD 0x6da129c7,0x6da129c7 - DD 0x4b2f9e1d,0x4b2f9e1d - DD 0xf330b2dc,0xf330b2dc - DD 0xec52860d,0xec52860d - DD 0xd0e3c177,0xd0e3c177 - DD 0x6c16b32b,0x6c16b32b - DD 0x99b970a9,0x99b970a9 - DD 0xfa489411,0xfa489411 - DD 0x2264e947,0x2264e947 - DD 0xc48cfca8,0xc48cfca8 - DD 0x1a3ff0a0,0x1a3ff0a0 - DD 0xd82c7d56,0xd82c7d56 - DD 0xef903322,0xef903322 - DD 0xc74e4987,0xc74e4987 - DD 0xc1d138d9,0xc1d138d9 - DD 0xfea2ca8c,0xfea2ca8c - DD 0x360bd498,0x360bd498 - DD 0xcf81f5a6,0xcf81f5a6 - DD 0x28de7aa5,0x28de7aa5 - DD 0x268eb7da,0x268eb7da - DD 0xa4bfad3f,0xa4bfad3f - DD 0xe49d3a2c,0xe49d3a2c - DD 0x0d927850,0x0d927850 - DD 0x9bcc5f6a,0x9bcc5f6a - DD 0x62467e54,0x62467e54 - DD 0xc2138df6,0xc2138df6 - DD 0xe8b8d890,0xe8b8d890 - DD 0x5ef7392e,0x5ef7392e - DD 0xf5afc382,0xf5afc382 - DD 0xbe805d9f,0xbe805d9f - DD 0x7c93d069,0x7c93d069 - DD 0xa92dd56f,0xa92dd56f - DD 0xb31225cf,0xb31225cf - DD 0x3b99acc8,0x3b99acc8 - DD 0xa77d1810,0xa77d1810 - DD 0x6e639ce8,0x6e639ce8 - DD 0x7bbb3bdb,0x7bbb3bdb - DD 0x097826cd,0x097826cd - DD 0xf418596e,0xf418596e - DD 0x01b79aec,0x01b79aec - DD 0xa89a4f83,0xa89a4f83 - DD 0x656e95e6,0x656e95e6 - DD 0x7ee6ffaa,0x7ee6ffaa - DD 0x08cfbc21,0x08cfbc21 - DD 0xe6e815ef,0xe6e815ef - DD 0xd99be7ba,0xd99be7ba - DD 0xce366f4a,0xce366f4a - DD 0xd4099fea,0xd4099fea - DD 0xd67cb029,0xd67cb029 - DD 0xafb2a431,0xafb2a431 - DD 0x31233f2a,0x31233f2a - DD 0x3094a5c6,0x3094a5c6 - DD 0xc066a235,0xc066a235 - DD 0x37bc4e74,0x37bc4e74 - DD 0xa6ca82fc,0xa6ca82fc - DD 0xb0d090e0,0xb0d090e0 - DD 0x15d8a733,0x15d8a733 - DD 0x4a9804f1,0x4a9804f1 - DD 0xf7daec41,0xf7daec41 - DD 0x0e50cd7f,0x0e50cd7f - DD 0x2ff69117,0x2ff69117 - DD 0x8dd64d76,0x8dd64d76 - DD 0x4db0ef43,0x4db0ef43 - DD 0x544daacc,0x544daacc - DD 0xdf0496e4,0xdf0496e4 - DD 0xe3b5d19e,0xe3b5d19e - DD 0x1b886a4c,0x1b886a4c - DD 0xb81f2cc1,0xb81f2cc1 - DD 0x7f516546,0x7f516546 - DD 0x04ea5e9d,0x04ea5e9d - DD 0x5d358c01,0x5d358c01 - DD 0x737487fa,0x737487fa - DD 0x2e410bfb,0x2e410bfb - DD 0x5a1d67b3,0x5a1d67b3 - DD 0x52d2db92,0x52d2db92 - DD 0x335610e9,0x335610e9 - DD 0x1347d66d,0x1347d66d - DD 0x8c61d79a,0x8c61d79a - DD 0x7a0ca137,0x7a0ca137 - DD 0x8e14f859,0x8e14f859 - DD 0x893c13eb,0x893c13eb - DD 0xee27a9ce,0xee27a9ce - DD 0x35c961b7,0x35c961b7 - DD 0xede51ce1,0xede51ce1 - DD 0x3cb1477a,0x3cb1477a - DD 0x59dfd29c,0x59dfd29c - DD 0x3f73f255,0x3f73f255 - DD 0x79ce1418,0x79ce1418 - DD 0xbf37c773,0xbf37c773 - DD 0xeacdf753,0xeacdf753 - DD 0x5baafd5f,0x5baafd5f - DD 0x146f3ddf,0x146f3ddf - DD 0x86db4478,0x86db4478 - DD 0x81f3afca,0x81f3afca - DD 0x3ec468b9,0x3ec468b9 - DD 0x2c342438,0x2c342438 - DD 0x5f40a3c2,0x5f40a3c2 - DD 0x72c31d16,0x72c31d16 - DD 0x0c25e2bc,0x0c25e2bc - DD 0x8b493c28,0x8b493c28 - DD 0x41950dff,0x41950dff - DD 0x7101a839,0x7101a839 - DD 0xdeb30c08,0xdeb30c08 - DD 0x9ce4b4d8,0x9ce4b4d8 - DD 0x90c15664,0x90c15664 - DD 0x6184cb7b,0x6184cb7b - DD 0x70b632d5,0x70b632d5 - DD 0x745c6c48,0x745c6c48 - DD 0x4257b8d0,0x4257b8d0 -DB 0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38 -DB 0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb -DB 0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87 -DB 0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb -DB 0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d -DB 0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e -DB 0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2 -DB 0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25 -DB 0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16 -DB 0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92 -DB 0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda -DB 0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84 -DB 0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a -DB 0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06 -DB 0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02 -DB 0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b -DB 0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea -DB 0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73 -DB 0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85 -DB 0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e -DB 0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89 -DB 0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b -DB 0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20 -DB 0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4 -DB 0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31 -DB 0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f -DB 0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d -DB 0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef -DB 0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0 -DB 0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61 -DB 0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26 -DB 0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d - DD 0x80808080,0x80808080,0xfefefefe,0xfefefefe - DD 0x1b1b1b1b,0x1b1b1b1b,0,0 -DB 0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38 -DB 0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb -DB 0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87 -DB 0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb -DB 0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d -DB 0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e -DB 0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2 -DB 0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25 -DB 0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16 -DB 0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92 -DB 0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda -DB 0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84 -DB 0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a -DB 0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06 -DB 0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02 -DB 0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b -DB 0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea -DB 0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73 -DB 0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85 -DB 0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e -DB 0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89 -DB 0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b -DB 0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20 -DB 0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4 -DB 0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31 -DB 0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f -DB 0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d -DB 0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef -DB 0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0 -DB 0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61 -DB 0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26 -DB 0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d - DD 0x80808080,0x80808080,0xfefefefe,0xfefefefe - DD 0x1b1b1b1b,0x1b1b1b1b,0,0 -DB 0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38 -DB 0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb -DB 0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87 -DB 0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb -DB 0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d -DB 0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e -DB 0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2 -DB 0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25 -DB 0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16 -DB 0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92 -DB 0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda -DB 0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84 -DB 0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a -DB 0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06 -DB 0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02 -DB 0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b -DB 0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea -DB 0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73 -DB 0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85 -DB 0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e -DB 0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89 -DB 0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b -DB 0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20 -DB 0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4 -DB 0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31 -DB 0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f -DB 0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d -DB 0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef -DB 0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0 -DB 0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61 -DB 0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26 -DB 0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d - DD 0x80808080,0x80808080,0xfefefefe,0xfefefefe - DD 0x1b1b1b1b,0x1b1b1b1b,0,0 -DB 0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38 -DB 0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb -DB 0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87 -DB 0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb -DB 0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d -DB 0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e -DB 0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2 -DB 0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25 -DB 0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16 -DB 0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92 -DB 0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda -DB 0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84 -DB 0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a -DB 0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06 -DB 0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02 -DB 0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b -DB 0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea -DB 0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73 -DB 0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85 -DB 0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e -DB 0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89 -DB 0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b -DB 0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20 -DB 0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4 -DB 0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31 -DB 0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f -DB 0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d -DB 0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef -DB 0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0 -DB 0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61 -DB 0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26 -DB 0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d - DD 0x80808080,0x80808080,0xfefefefe,0xfefefefe - DD 0x1b1b1b1b,0x1b1b1b1b,0,0 -DB 65,69,83,32,102,111,114,32,120,56,54,95,54,52,44,32 -DB 67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97 -DB 112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103 -DB 62,0 -ALIGN 64 -EXTERN __imp_RtlVirtualUnwind - -ALIGN 16 -block_se_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - mov rsi,QWORD[8+r9] - mov r11,QWORD[56+r9] - - mov r10d,DWORD[r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jb NEAR $L$in_block_prologue - - mov rax,QWORD[152+r8] - - mov r10d,DWORD[4+r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jae NEAR $L$in_block_prologue - - mov rax,QWORD[24+rax] - lea rax,[48+rax] - - mov rbx,QWORD[((-8))+rax] - mov rbp,QWORD[((-16))+rax] - mov r12,QWORD[((-24))+rax] - mov r13,QWORD[((-32))+rax] - mov r14,QWORD[((-40))+rax] - mov r15,QWORD[((-48))+rax] - mov QWORD[144+r8],rbx - mov QWORD[160+r8],rbp - mov QWORD[216+r8],r12 - mov QWORD[224+r8],r13 - mov QWORD[232+r8],r14 - mov QWORD[240+r8],r15 - -$L$in_block_prologue: - mov rdi,QWORD[8+rax] - mov rsi,QWORD[16+rax] - mov QWORD[152+r8],rax - mov QWORD[168+r8],rsi - mov QWORD[176+r8],rdi - - jmp NEAR $L$common_seh_exit - - - -ALIGN 16 -key_se_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - mov rsi,QWORD[8+r9] - mov r11,QWORD[56+r9] - - mov r10d,DWORD[r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jb NEAR $L$in_key_prologue - - mov rax,QWORD[152+r8] - - mov r10d,DWORD[4+r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jae NEAR $L$in_key_prologue - - lea rax,[56+rax] - - mov rbx,QWORD[((-8))+rax] - mov rbp,QWORD[((-16))+rax] - mov r12,QWORD[((-24))+rax] - mov r13,QWORD[((-32))+rax] - mov r14,QWORD[((-40))+rax] - mov r15,QWORD[((-48))+rax] - mov QWORD[144+r8],rbx - mov QWORD[160+r8],rbp - mov QWORD[216+r8],r12 - mov QWORD[224+r8],r13 - mov QWORD[232+r8],r14 - mov QWORD[240+r8],r15 - -$L$in_key_prologue: - mov rdi,QWORD[8+rax] - mov rsi,QWORD[16+rax] - mov QWORD[152+r8],rax - mov QWORD[168+r8],rsi - mov QWORD[176+r8],rdi - - jmp NEAR $L$common_seh_exit - - - -ALIGN 16 -cbc_se_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - lea r10,[$L$cbc_prologue] - cmp rbx,r10 - jb NEAR $L$in_cbc_prologue - - lea r10,[$L$cbc_fast_body] - cmp rbx,r10 - jb NEAR $L$in_cbc_frame_setup - - lea r10,[$L$cbc_slow_prologue] - cmp rbx,r10 - jb NEAR $L$in_cbc_body - - lea r10,[$L$cbc_slow_body] - cmp rbx,r10 - jb NEAR $L$in_cbc_frame_setup - -$L$in_cbc_body: - mov rax,QWORD[152+r8] - - lea r10,[$L$cbc_epilogue] - cmp rbx,r10 - jae NEAR $L$in_cbc_prologue - - lea rax,[8+rax] - - lea r10,[$L$cbc_popfq] - cmp rbx,r10 - jae NEAR $L$in_cbc_prologue - - mov rax,QWORD[8+rax] - lea rax,[56+rax] - -$L$in_cbc_frame_setup: - mov rbx,QWORD[((-16))+rax] - mov rbp,QWORD[((-24))+rax] - mov r12,QWORD[((-32))+rax] - mov r13,QWORD[((-40))+rax] - mov r14,QWORD[((-48))+rax] - mov r15,QWORD[((-56))+rax] - mov QWORD[144+r8],rbx - mov QWORD[160+r8],rbp - mov QWORD[216+r8],r12 - mov QWORD[224+r8],r13 - mov QWORD[232+r8],r14 - mov QWORD[240+r8],r15 - -$L$in_cbc_prologue: - mov rdi,QWORD[8+rax] - mov rsi,QWORD[16+rax] - mov QWORD[152+r8],rax - mov QWORD[168+r8],rsi - mov QWORD[176+r8],rdi - -$L$common_seh_exit: - - mov rdi,QWORD[40+r9] - mov rsi,r8 - mov ecx,154 - DD 0xa548f3fc - - mov rsi,r9 - xor rcx,rcx - mov rdx,QWORD[8+rsi] - mov r8,QWORD[rsi] - mov r9,QWORD[16+rsi] - mov r10,QWORD[40+rsi] - lea r11,[56+rsi] - lea r12,[24+rsi] - mov QWORD[32+rsp],r10 - mov QWORD[40+rsp],r11 - mov QWORD[48+rsp],r12 - mov QWORD[56+rsp],rcx - call QWORD[__imp_RtlVirtualUnwind] - - mov eax,1 - add rsp,64 - popfq - pop r15 - pop r14 - pop r13 - pop r12 - pop rbp - pop rbx - pop rdi - pop rsi - DB 0F3h,0C3h ;repret - - -section .pdata rdata align=4 -ALIGN 4 - DD $L$SEH_begin_asm_AES_encrypt wrt ..imagebase - DD $L$SEH_end_asm_AES_encrypt wrt ..imagebase - DD $L$SEH_info_asm_AES_encrypt wrt ..imagebase - - DD $L$SEH_begin_asm_AES_decrypt wrt ..imagebase - DD $L$SEH_end_asm_AES_decrypt wrt ..imagebase - DD $L$SEH_info_asm_AES_decrypt wrt ..imagebase - - DD $L$SEH_begin_asm_AES_set_encrypt_key wrt ..imagebase - DD $L$SEH_end_asm_AES_set_encrypt_key wrt ..imagebase - DD $L$SEH_info_asm_AES_set_encrypt_key wrt ..imagebase - - DD $L$SEH_begin_asm_AES_set_decrypt_key wrt ..imagebase - DD $L$SEH_end_asm_AES_set_decrypt_key wrt ..imagebase - DD $L$SEH_info_asm_AES_set_decrypt_key wrt ..imagebase - - DD $L$SEH_begin_asm_AES_cbc_encrypt wrt ..imagebase - DD $L$SEH_end_asm_AES_cbc_encrypt wrt ..imagebase - DD $L$SEH_info_asm_AES_cbc_encrypt wrt ..imagebase - -section .xdata rdata align=8 -ALIGN 8 -$L$SEH_info_asm_AES_encrypt: -DB 9,0,0,0 - DD block_se_handler wrt ..imagebase - DD $L$enc_prologue wrt ..imagebase,$L$enc_epilogue wrt ..imagebase -$L$SEH_info_asm_AES_decrypt: -DB 9,0,0,0 - DD block_se_handler wrt ..imagebase - DD $L$dec_prologue wrt ..imagebase,$L$dec_epilogue wrt ..imagebase -$L$SEH_info_asm_AES_set_encrypt_key: -DB 9,0,0,0 - DD key_se_handler wrt ..imagebase - DD $L$enc_key_prologue wrt ..imagebase,$L$enc_key_epilogue wrt ..imagebase -$L$SEH_info_asm_AES_set_decrypt_key: -DB 9,0,0,0 - DD key_se_handler wrt ..imagebase - DD $L$dec_key_prologue wrt ..imagebase,$L$dec_key_epilogue wrt ..imagebase -$L$SEH_info_asm_AES_cbc_encrypt: -DB 9,0,0,0 - DD cbc_se_handler wrt ..imagebase diff --git a/third_party/boringssl/win-x86_64/crypto/aes/aesni-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/aes/aesni-x86_64.asm deleted file mode 100644 index cf313d1ae9a63..0000000000000 --- a/third_party/boringssl/win-x86_64/crypto/aes/aesni-x86_64.asm +++ /dev/null @@ -1,4027 +0,0 @@ -default rel -%define XMMWORD -%define YMMWORD -%define ZMMWORD -section .text code align=64 - -EXTERN OPENSSL_ia32cap_P -global aesni_encrypt - -ALIGN 16 -aesni_encrypt: - movups xmm2,XMMWORD[rcx] - mov eax,DWORD[240+r8] - movups xmm0,XMMWORD[r8] - movups xmm1,XMMWORD[16+r8] - lea r8,[32+r8] - xorps xmm2,xmm0 -$L$oop_enc1_1: -DB 102,15,56,220,209 - dec eax - movups xmm1,XMMWORD[r8] - lea r8,[16+r8] - jnz NEAR $L$oop_enc1_1 -DB 102,15,56,221,209 - pxor xmm0,xmm0 - pxor xmm1,xmm1 - movups XMMWORD[rdx],xmm2 - pxor xmm2,xmm2 - DB 0F3h,0C3h ;repret - - -global aesni_decrypt - -ALIGN 16 -aesni_decrypt: - movups xmm2,XMMWORD[rcx] - mov eax,DWORD[240+r8] - movups xmm0,XMMWORD[r8] - movups xmm1,XMMWORD[16+r8] - lea r8,[32+r8] - xorps xmm2,xmm0 -$L$oop_dec1_2: -DB 102,15,56,222,209 - dec eax - movups xmm1,XMMWORD[r8] - lea r8,[16+r8] - jnz NEAR $L$oop_dec1_2 -DB 102,15,56,223,209 - pxor xmm0,xmm0 - pxor xmm1,xmm1 - movups XMMWORD[rdx],xmm2 - pxor xmm2,xmm2 - DB 0F3h,0C3h ;repret - - -ALIGN 16 -_aesni_encrypt2: - movups xmm0,XMMWORD[rcx] - shl eax,4 - movups xmm1,XMMWORD[16+rcx] - xorps xmm2,xmm0 - xorps xmm3,xmm0 - movups xmm0,XMMWORD[32+rcx] - lea rcx,[32+rax*1+rcx] - neg rax - add rax,16 - -$L$enc_loop2: -DB 102,15,56,220,209 -DB 102,15,56,220,217 - movups xmm1,XMMWORD[rax*1+rcx] - add rax,32 -DB 102,15,56,220,208 -DB 102,15,56,220,216 - movups xmm0,XMMWORD[((-16))+rax*1+rcx] - jnz NEAR $L$enc_loop2 - -DB 102,15,56,220,209 -DB 102,15,56,220,217 -DB 102,15,56,221,208 -DB 102,15,56,221,216 - DB 0F3h,0C3h ;repret - - -ALIGN 16 -_aesni_decrypt2: - movups xmm0,XMMWORD[rcx] - shl eax,4 - movups xmm1,XMMWORD[16+rcx] - xorps xmm2,xmm0 - xorps xmm3,xmm0 - movups xmm0,XMMWORD[32+rcx] - lea rcx,[32+rax*1+rcx] - neg rax - add rax,16 - -$L$dec_loop2: -DB 102,15,56,222,209 -DB 102,15,56,222,217 - movups xmm1,XMMWORD[rax*1+rcx] - add rax,32 -DB 102,15,56,222,208 -DB 102,15,56,222,216 - movups xmm0,XMMWORD[((-16))+rax*1+rcx] - jnz NEAR $L$dec_loop2 - -DB 102,15,56,222,209 -DB 102,15,56,222,217 -DB 102,15,56,223,208 -DB 102,15,56,223,216 - DB 0F3h,0C3h ;repret - - -ALIGN 16 -_aesni_encrypt3: - movups xmm0,XMMWORD[rcx] - shl eax,4 - movups xmm1,XMMWORD[16+rcx] - xorps xmm2,xmm0 - xorps xmm3,xmm0 - xorps xmm4,xmm0 - movups xmm0,XMMWORD[32+rcx] - lea rcx,[32+rax*1+rcx] - neg rax - add rax,16 - -$L$enc_loop3: -DB 102,15,56,220,209 -DB 102,15,56,220,217 -DB 102,15,56,220,225 - movups xmm1,XMMWORD[rax*1+rcx] - add rax,32 -DB 102,15,56,220,208 -DB 102,15,56,220,216 -DB 102,15,56,220,224 - movups xmm0,XMMWORD[((-16))+rax*1+rcx] - jnz NEAR $L$enc_loop3 - -DB 102,15,56,220,209 -DB 102,15,56,220,217 -DB 102,15,56,220,225 -DB 102,15,56,221,208 -DB 102,15,56,221,216 -DB 102,15,56,221,224 - DB 0F3h,0C3h ;repret - - -ALIGN 16 -_aesni_decrypt3: - movups xmm0,XMMWORD[rcx] - shl eax,4 - movups xmm1,XMMWORD[16+rcx] - xorps xmm2,xmm0 - xorps xmm3,xmm0 - xorps xmm4,xmm0 - movups xmm0,XMMWORD[32+rcx] - lea rcx,[32+rax*1+rcx] - neg rax - add rax,16 - -$L$dec_loop3: -DB 102,15,56,222,209 -DB 102,15,56,222,217 -DB 102,15,56,222,225 - movups xmm1,XMMWORD[rax*1+rcx] - add rax,32 -DB 102,15,56,222,208 -DB 102,15,56,222,216 -DB 102,15,56,222,224 - movups xmm0,XMMWORD[((-16))+rax*1+rcx] - jnz NEAR $L$dec_loop3 - -DB 102,15,56,222,209 -DB 102,15,56,222,217 -DB 102,15,56,222,225 -DB 102,15,56,223,208 -DB 102,15,56,223,216 -DB 102,15,56,223,224 - DB 0F3h,0C3h ;repret - - -ALIGN 16 -_aesni_encrypt4: - movups xmm0,XMMWORD[rcx] - shl eax,4 - movups xmm1,XMMWORD[16+rcx] - xorps xmm2,xmm0 - xorps xmm3,xmm0 - xorps xmm4,xmm0 - xorps xmm5,xmm0 - movups xmm0,XMMWORD[32+rcx] - lea rcx,[32+rax*1+rcx] - neg rax -DB 0x0f,0x1f,0x00 - add rax,16 - -$L$enc_loop4: -DB 102,15,56,220,209 -DB 102,15,56,220,217 -DB 102,15,56,220,225 -DB 102,15,56,220,233 - movups xmm1,XMMWORD[rax*1+rcx] - add rax,32 -DB 102,15,56,220,208 -DB 102,15,56,220,216 -DB 102,15,56,220,224 -DB 102,15,56,220,232 - movups xmm0,XMMWORD[((-16))+rax*1+rcx] - jnz NEAR $L$enc_loop4 - -DB 102,15,56,220,209 -DB 102,15,56,220,217 -DB 102,15,56,220,225 -DB 102,15,56,220,233 -DB 102,15,56,221,208 -DB 102,15,56,221,216 -DB 102,15,56,221,224 -DB 102,15,56,221,232 - DB 0F3h,0C3h ;repret - - -ALIGN 16 -_aesni_decrypt4: - movups xmm0,XMMWORD[rcx] - shl eax,4 - movups xmm1,XMMWORD[16+rcx] - xorps xmm2,xmm0 - xorps xmm3,xmm0 - xorps xmm4,xmm0 - xorps xmm5,xmm0 - movups xmm0,XMMWORD[32+rcx] - lea rcx,[32+rax*1+rcx] - neg rax -DB 0x0f,0x1f,0x00 - add rax,16 - -$L$dec_loop4: -DB 102,15,56,222,209 -DB 102,15,56,222,217 -DB 102,15,56,222,225 -DB 102,15,56,222,233 - movups xmm1,XMMWORD[rax*1+rcx] - add rax,32 -DB 102,15,56,222,208 -DB 102,15,56,222,216 -DB 102,15,56,222,224 -DB 102,15,56,222,232 - movups xmm0,XMMWORD[((-16))+rax*1+rcx] - jnz NEAR $L$dec_loop4 - -DB 102,15,56,222,209 -DB 102,15,56,222,217 -DB 102,15,56,222,225 -DB 102,15,56,222,233 -DB 102,15,56,223,208 -DB 102,15,56,223,216 -DB 102,15,56,223,224 -DB 102,15,56,223,232 - DB 0F3h,0C3h ;repret - - -ALIGN 16 -_aesni_encrypt6: - movups xmm0,XMMWORD[rcx] - shl eax,4 - movups xmm1,XMMWORD[16+rcx] - xorps xmm2,xmm0 - pxor xmm3,xmm0 - pxor xmm4,xmm0 -DB 102,15,56,220,209 - lea rcx,[32+rax*1+rcx] - neg rax -DB 102,15,56,220,217 - pxor xmm5,xmm0 - pxor xmm6,xmm0 -DB 102,15,56,220,225 - pxor xmm7,xmm0 - movups xmm0,XMMWORD[rax*1+rcx] - add rax,16 - jmp NEAR $L$enc_loop6_enter -ALIGN 16 -$L$enc_loop6: -DB 102,15,56,220,209 -DB 102,15,56,220,217 -DB 102,15,56,220,225 -$L$enc_loop6_enter: -DB 102,15,56,220,233 -DB 102,15,56,220,241 -DB 102,15,56,220,249 - movups xmm1,XMMWORD[rax*1+rcx] - add rax,32 -DB 102,15,56,220,208 -DB 102,15,56,220,216 -DB 102,15,56,220,224 -DB 102,15,56,220,232 -DB 102,15,56,220,240 -DB 102,15,56,220,248 - movups xmm0,XMMWORD[((-16))+rax*1+rcx] - jnz NEAR $L$enc_loop6 - -DB 102,15,56,220,209 -DB 102,15,56,220,217 -DB 102,15,56,220,225 -DB 102,15,56,220,233 -DB 102,15,56,220,241 -DB 102,15,56,220,249 -DB 102,15,56,221,208 -DB 102,15,56,221,216 -DB 102,15,56,221,224 -DB 102,15,56,221,232 -DB 102,15,56,221,240 -DB 102,15,56,221,248 - DB 0F3h,0C3h ;repret - - -ALIGN 16 -_aesni_decrypt6: - movups xmm0,XMMWORD[rcx] - shl eax,4 - movups xmm1,XMMWORD[16+rcx] - xorps xmm2,xmm0 - pxor xmm3,xmm0 - pxor xmm4,xmm0 -DB 102,15,56,222,209 - lea rcx,[32+rax*1+rcx] - neg rax -DB 102,15,56,222,217 - pxor xmm5,xmm0 - pxor xmm6,xmm0 -DB 102,15,56,222,225 - pxor xmm7,xmm0 - movups xmm0,XMMWORD[rax*1+rcx] - add rax,16 - jmp NEAR $L$dec_loop6_enter -ALIGN 16 -$L$dec_loop6: -DB 102,15,56,222,209 -DB 102,15,56,222,217 -DB 102,15,56,222,225 -$L$dec_loop6_enter: -DB 102,15,56,222,233 -DB 102,15,56,222,241 -DB 102,15,56,222,249 - movups xmm1,XMMWORD[rax*1+rcx] - add rax,32 -DB 102,15,56,222,208 -DB 102,15,56,222,216 -DB 102,15,56,222,224 -DB 102,15,56,222,232 -DB 102,15,56,222,240 -DB 102,15,56,222,248 - movups xmm0,XMMWORD[((-16))+rax*1+rcx] - jnz NEAR $L$dec_loop6 - -DB 102,15,56,222,209 -DB 102,15,56,222,217 -DB 102,15,56,222,225 -DB 102,15,56,222,233 -DB 102,15,56,222,241 -DB 102,15,56,222,249 -DB 102,15,56,223,208 -DB 102,15,56,223,216 -DB 102,15,56,223,224 -DB 102,15,56,223,232 -DB 102,15,56,223,240 -DB 102,15,56,223,248 - DB 0F3h,0C3h ;repret - - -ALIGN 16 -_aesni_encrypt8: - movups xmm0,XMMWORD[rcx] - shl eax,4 - movups xmm1,XMMWORD[16+rcx] - xorps xmm2,xmm0 - xorps xmm3,xmm0 - pxor xmm4,xmm0 - pxor xmm5,xmm0 - pxor xmm6,xmm0 - lea rcx,[32+rax*1+rcx] - neg rax -DB 102,15,56,220,209 - pxor xmm7,xmm0 - pxor xmm8,xmm0 -DB 102,15,56,220,217 - pxor xmm9,xmm0 - movups xmm0,XMMWORD[rax*1+rcx] - add rax,16 - jmp NEAR $L$enc_loop8_inner -ALIGN 16 -$L$enc_loop8: -DB 102,15,56,220,209 -DB 102,15,56,220,217 -$L$enc_loop8_inner: -DB 102,15,56,220,225 -DB 102,15,56,220,233 -DB 102,15,56,220,241 -DB 102,15,56,220,249 -DB 102,68,15,56,220,193 -DB 102,68,15,56,220,201 -$L$enc_loop8_enter: - movups xmm1,XMMWORD[rax*1+rcx] - add rax,32 -DB 102,15,56,220,208 -DB 102,15,56,220,216 -DB 102,15,56,220,224 -DB 102,15,56,220,232 -DB 102,15,56,220,240 -DB 102,15,56,220,248 -DB 102,68,15,56,220,192 -DB 102,68,15,56,220,200 - movups xmm0,XMMWORD[((-16))+rax*1+rcx] - jnz NEAR $L$enc_loop8 - -DB 102,15,56,220,209 -DB 102,15,56,220,217 -DB 102,15,56,220,225 -DB 102,15,56,220,233 -DB 102,15,56,220,241 -DB 102,15,56,220,249 -DB 102,68,15,56,220,193 -DB 102,68,15,56,220,201 -DB 102,15,56,221,208 -DB 102,15,56,221,216 -DB 102,15,56,221,224 -DB 102,15,56,221,232 -DB 102,15,56,221,240 -DB 102,15,56,221,248 -DB 102,68,15,56,221,192 -DB 102,68,15,56,221,200 - DB 0F3h,0C3h ;repret - - -ALIGN 16 -_aesni_decrypt8: - movups xmm0,XMMWORD[rcx] - shl eax,4 - movups xmm1,XMMWORD[16+rcx] - xorps xmm2,xmm0 - xorps xmm3,xmm0 - pxor xmm4,xmm0 - pxor xmm5,xmm0 - pxor xmm6,xmm0 - lea rcx,[32+rax*1+rcx] - neg rax -DB 102,15,56,222,209 - pxor xmm7,xmm0 - pxor xmm8,xmm0 -DB 102,15,56,222,217 - pxor xmm9,xmm0 - movups xmm0,XMMWORD[rax*1+rcx] - add rax,16 - jmp NEAR $L$dec_loop8_inner -ALIGN 16 -$L$dec_loop8: -DB 102,15,56,222,209 -DB 102,15,56,222,217 -$L$dec_loop8_inner: -DB 102,15,56,222,225 -DB 102,15,56,222,233 -DB 102,15,56,222,241 -DB 102,15,56,222,249 -DB 102,68,15,56,222,193 -DB 102,68,15,56,222,201 -$L$dec_loop8_enter: - movups xmm1,XMMWORD[rax*1+rcx] - add rax,32 -DB 102,15,56,222,208 -DB 102,15,56,222,216 -DB 102,15,56,222,224 -DB 102,15,56,222,232 -DB 102,15,56,222,240 -DB 102,15,56,222,248 -DB 102,68,15,56,222,192 -DB 102,68,15,56,222,200 - movups xmm0,XMMWORD[((-16))+rax*1+rcx] - jnz NEAR $L$dec_loop8 - -DB 102,15,56,222,209 -DB 102,15,56,222,217 -DB 102,15,56,222,225 -DB 102,15,56,222,233 -DB 102,15,56,222,241 -DB 102,15,56,222,249 -DB 102,68,15,56,222,193 -DB 102,68,15,56,222,201 -DB 102,15,56,223,208 -DB 102,15,56,223,216 -DB 102,15,56,223,224 -DB 102,15,56,223,232 -DB 102,15,56,223,240 -DB 102,15,56,223,248 -DB 102,68,15,56,223,192 -DB 102,68,15,56,223,200 - DB 0F3h,0C3h ;repret - -global aesni_ecb_encrypt - -ALIGN 16 -aesni_ecb_encrypt: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_aesni_ecb_encrypt: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - - - lea rsp,[((-88))+rsp] - movaps XMMWORD[rsp],xmm6 - movaps XMMWORD[16+rsp],xmm7 - movaps XMMWORD[32+rsp],xmm8 - movaps XMMWORD[48+rsp],xmm9 -$L$ecb_enc_body: - and rdx,-16 - jz NEAR $L$ecb_ret - - mov eax,DWORD[240+rcx] - movups xmm0,XMMWORD[rcx] - mov r11,rcx - mov r10d,eax - test r8d,r8d - jz NEAR $L$ecb_decrypt - - cmp rdx,0x80 - jb NEAR $L$ecb_enc_tail - - movdqu xmm2,XMMWORD[rdi] - movdqu xmm3,XMMWORD[16+rdi] - movdqu xmm4,XMMWORD[32+rdi] - movdqu xmm5,XMMWORD[48+rdi] - movdqu xmm6,XMMWORD[64+rdi] - movdqu xmm7,XMMWORD[80+rdi] - movdqu xmm8,XMMWORD[96+rdi] - movdqu xmm9,XMMWORD[112+rdi] - lea rdi,[128+rdi] - sub rdx,0x80 - jmp NEAR $L$ecb_enc_loop8_enter -ALIGN 16 -$L$ecb_enc_loop8: - movups XMMWORD[rsi],xmm2 - mov rcx,r11 - movdqu xmm2,XMMWORD[rdi] - mov eax,r10d - movups XMMWORD[16+rsi],xmm3 - movdqu xmm3,XMMWORD[16+rdi] - movups XMMWORD[32+rsi],xmm4 - movdqu xmm4,XMMWORD[32+rdi] - movups XMMWORD[48+rsi],xmm5 - movdqu xmm5,XMMWORD[48+rdi] - movups XMMWORD[64+rsi],xmm6 - movdqu xmm6,XMMWORD[64+rdi] - movups XMMWORD[80+rsi],xmm7 - movdqu xmm7,XMMWORD[80+rdi] - movups XMMWORD[96+rsi],xmm8 - movdqu xmm8,XMMWORD[96+rdi] - movups XMMWORD[112+rsi],xmm9 - lea rsi,[128+rsi] - movdqu xmm9,XMMWORD[112+rdi] - lea rdi,[128+rdi] -$L$ecb_enc_loop8_enter: - - call _aesni_encrypt8 - - sub rdx,0x80 - jnc NEAR $L$ecb_enc_loop8 - - movups XMMWORD[rsi],xmm2 - mov rcx,r11 - movups XMMWORD[16+rsi],xmm3 - mov eax,r10d - movups XMMWORD[32+rsi],xmm4 - movups XMMWORD[48+rsi],xmm5 - movups XMMWORD[64+rsi],xmm6 - movups XMMWORD[80+rsi],xmm7 - movups XMMWORD[96+rsi],xmm8 - movups XMMWORD[112+rsi],xmm9 - lea rsi,[128+rsi] - add rdx,0x80 - jz NEAR $L$ecb_ret - -$L$ecb_enc_tail: - movups xmm2,XMMWORD[rdi] - cmp rdx,0x20 - jb NEAR $L$ecb_enc_one - movups xmm3,XMMWORD[16+rdi] - je NEAR $L$ecb_enc_two - movups xmm4,XMMWORD[32+rdi] - cmp rdx,0x40 - jb NEAR $L$ecb_enc_three - movups xmm5,XMMWORD[48+rdi] - je NEAR $L$ecb_enc_four - movups xmm6,XMMWORD[64+rdi] - cmp rdx,0x60 - jb NEAR $L$ecb_enc_five - movups xmm7,XMMWORD[80+rdi] - je NEAR $L$ecb_enc_six - movdqu xmm8,XMMWORD[96+rdi] - xorps xmm9,xmm9 - call _aesni_encrypt8 - movups XMMWORD[rsi],xmm2 - movups XMMWORD[16+rsi],xmm3 - movups XMMWORD[32+rsi],xmm4 - movups XMMWORD[48+rsi],xmm5 - movups XMMWORD[64+rsi],xmm6 - movups XMMWORD[80+rsi],xmm7 - movups XMMWORD[96+rsi],xmm8 - jmp NEAR $L$ecb_ret -ALIGN 16 -$L$ecb_enc_one: - movups xmm0,XMMWORD[rcx] - movups xmm1,XMMWORD[16+rcx] - lea rcx,[32+rcx] - xorps xmm2,xmm0 -$L$oop_enc1_3: -DB 102,15,56,220,209 - dec eax - movups xmm1,XMMWORD[rcx] - lea rcx,[16+rcx] - jnz NEAR $L$oop_enc1_3 -DB 102,15,56,221,209 - movups XMMWORD[rsi],xmm2 - jmp NEAR $L$ecb_ret -ALIGN 16 -$L$ecb_enc_two: - call _aesni_encrypt2 - movups XMMWORD[rsi],xmm2 - movups XMMWORD[16+rsi],xmm3 - jmp NEAR $L$ecb_ret -ALIGN 16 -$L$ecb_enc_three: - call _aesni_encrypt3 - movups XMMWORD[rsi],xmm2 - movups XMMWORD[16+rsi],xmm3 - movups XMMWORD[32+rsi],xmm4 - jmp NEAR $L$ecb_ret -ALIGN 16 -$L$ecb_enc_four: - call _aesni_encrypt4 - movups XMMWORD[rsi],xmm2 - movups XMMWORD[16+rsi],xmm3 - movups XMMWORD[32+rsi],xmm4 - movups XMMWORD[48+rsi],xmm5 - jmp NEAR $L$ecb_ret -ALIGN 16 -$L$ecb_enc_five: - xorps xmm7,xmm7 - call _aesni_encrypt6 - movups XMMWORD[rsi],xmm2 - movups XMMWORD[16+rsi],xmm3 - movups XMMWORD[32+rsi],xmm4 - movups XMMWORD[48+rsi],xmm5 - movups XMMWORD[64+rsi],xmm6 - jmp NEAR $L$ecb_ret -ALIGN 16 -$L$ecb_enc_six: - call _aesni_encrypt6 - movups XMMWORD[rsi],xmm2 - movups XMMWORD[16+rsi],xmm3 - movups XMMWORD[32+rsi],xmm4 - movups XMMWORD[48+rsi],xmm5 - movups XMMWORD[64+rsi],xmm6 - movups XMMWORD[80+rsi],xmm7 - jmp NEAR $L$ecb_ret - -ALIGN 16 -$L$ecb_decrypt: - cmp rdx,0x80 - jb NEAR $L$ecb_dec_tail - - movdqu xmm2,XMMWORD[rdi] - movdqu xmm3,XMMWORD[16+rdi] - movdqu xmm4,XMMWORD[32+rdi] - movdqu xmm5,XMMWORD[48+rdi] - movdqu xmm6,XMMWORD[64+rdi] - movdqu xmm7,XMMWORD[80+rdi] - movdqu xmm8,XMMWORD[96+rdi] - movdqu xmm9,XMMWORD[112+rdi] - lea rdi,[128+rdi] - sub rdx,0x80 - jmp NEAR $L$ecb_dec_loop8_enter -ALIGN 16 -$L$ecb_dec_loop8: - movups XMMWORD[rsi],xmm2 - mov rcx,r11 - movdqu xmm2,XMMWORD[rdi] - mov eax,r10d - movups XMMWORD[16+rsi],xmm3 - movdqu xmm3,XMMWORD[16+rdi] - movups XMMWORD[32+rsi],xmm4 - movdqu xmm4,XMMWORD[32+rdi] - movups XMMWORD[48+rsi],xmm5 - movdqu xmm5,XMMWORD[48+rdi] - movups XMMWORD[64+rsi],xmm6 - movdqu xmm6,XMMWORD[64+rdi] - movups XMMWORD[80+rsi],xmm7 - movdqu xmm7,XMMWORD[80+rdi] - movups XMMWORD[96+rsi],xmm8 - movdqu xmm8,XMMWORD[96+rdi] - movups XMMWORD[112+rsi],xmm9 - lea rsi,[128+rsi] - movdqu xmm9,XMMWORD[112+rdi] - lea rdi,[128+rdi] -$L$ecb_dec_loop8_enter: - - call _aesni_decrypt8 - - movups xmm0,XMMWORD[r11] - sub rdx,0x80 - jnc NEAR $L$ecb_dec_loop8 - - movups XMMWORD[rsi],xmm2 - pxor xmm2,xmm2 - mov rcx,r11 - movups XMMWORD[16+rsi],xmm3 - pxor xmm3,xmm3 - mov eax,r10d - movups XMMWORD[32+rsi],xmm4 - pxor xmm4,xmm4 - movups XMMWORD[48+rsi],xmm5 - pxor xmm5,xmm5 - movups XMMWORD[64+rsi],xmm6 - pxor xmm6,xmm6 - movups XMMWORD[80+rsi],xmm7 - pxor xmm7,xmm7 - movups XMMWORD[96+rsi],xmm8 - pxor xmm8,xmm8 - movups XMMWORD[112+rsi],xmm9 - pxor xmm9,xmm9 - lea rsi,[128+rsi] - add rdx,0x80 - jz NEAR $L$ecb_ret - -$L$ecb_dec_tail: - movups xmm2,XMMWORD[rdi] - cmp rdx,0x20 - jb NEAR $L$ecb_dec_one - movups xmm3,XMMWORD[16+rdi] - je NEAR $L$ecb_dec_two - movups xmm4,XMMWORD[32+rdi] - cmp rdx,0x40 - jb NEAR $L$ecb_dec_three - movups xmm5,XMMWORD[48+rdi] - je NEAR $L$ecb_dec_four - movups xmm6,XMMWORD[64+rdi] - cmp rdx,0x60 - jb NEAR $L$ecb_dec_five - movups xmm7,XMMWORD[80+rdi] - je NEAR $L$ecb_dec_six - movups xmm8,XMMWORD[96+rdi] - movups xmm0,XMMWORD[rcx] - xorps xmm9,xmm9 - call _aesni_decrypt8 - movups XMMWORD[rsi],xmm2 - pxor xmm2,xmm2 - movups XMMWORD[16+rsi],xmm3 - pxor xmm3,xmm3 - movups XMMWORD[32+rsi],xmm4 - pxor xmm4,xmm4 - movups XMMWORD[48+rsi],xmm5 - pxor xmm5,xmm5 - movups XMMWORD[64+rsi],xmm6 - pxor xmm6,xmm6 - movups XMMWORD[80+rsi],xmm7 - pxor xmm7,xmm7 - movups XMMWORD[96+rsi],xmm8 - pxor xmm8,xmm8 - pxor xmm9,xmm9 - jmp NEAR $L$ecb_ret -ALIGN 16 -$L$ecb_dec_one: - movups xmm0,XMMWORD[rcx] - movups xmm1,XMMWORD[16+rcx] - lea rcx,[32+rcx] - xorps xmm2,xmm0 -$L$oop_dec1_4: -DB 102,15,56,222,209 - dec eax - movups xmm1,XMMWORD[rcx] - lea rcx,[16+rcx] - jnz NEAR $L$oop_dec1_4 -DB 102,15,56,223,209 - movups XMMWORD[rsi],xmm2 - pxor xmm2,xmm2 - jmp NEAR $L$ecb_ret -ALIGN 16 -$L$ecb_dec_two: - call _aesni_decrypt2 - movups XMMWORD[rsi],xmm2 - pxor xmm2,xmm2 - movups XMMWORD[16+rsi],xmm3 - pxor xmm3,xmm3 - jmp NEAR $L$ecb_ret -ALIGN 16 -$L$ecb_dec_three: - call _aesni_decrypt3 - movups XMMWORD[rsi],xmm2 - pxor xmm2,xmm2 - movups XMMWORD[16+rsi],xmm3 - pxor xmm3,xmm3 - movups XMMWORD[32+rsi],xmm4 - pxor xmm4,xmm4 - jmp NEAR $L$ecb_ret -ALIGN 16 -$L$ecb_dec_four: - call _aesni_decrypt4 - movups XMMWORD[rsi],xmm2 - pxor xmm2,xmm2 - movups XMMWORD[16+rsi],xmm3 - pxor xmm3,xmm3 - movups XMMWORD[32+rsi],xmm4 - pxor xmm4,xmm4 - movups XMMWORD[48+rsi],xmm5 - pxor xmm5,xmm5 - jmp NEAR $L$ecb_ret -ALIGN 16 -$L$ecb_dec_five: - xorps xmm7,xmm7 - call _aesni_decrypt6 - movups XMMWORD[rsi],xmm2 - pxor xmm2,xmm2 - movups XMMWORD[16+rsi],xmm3 - pxor xmm3,xmm3 - movups XMMWORD[32+rsi],xmm4 - pxor xmm4,xmm4 - movups XMMWORD[48+rsi],xmm5 - pxor xmm5,xmm5 - movups XMMWORD[64+rsi],xmm6 - pxor xmm6,xmm6 - pxor xmm7,xmm7 - jmp NEAR $L$ecb_ret -ALIGN 16 -$L$ecb_dec_six: - call _aesni_decrypt6 - movups XMMWORD[rsi],xmm2 - pxor xmm2,xmm2 - movups XMMWORD[16+rsi],xmm3 - pxor xmm3,xmm3 - movups XMMWORD[32+rsi],xmm4 - pxor xmm4,xmm4 - movups XMMWORD[48+rsi],xmm5 - pxor xmm5,xmm5 - movups XMMWORD[64+rsi],xmm6 - pxor xmm6,xmm6 - movups XMMWORD[80+rsi],xmm7 - pxor xmm7,xmm7 - -$L$ecb_ret: - xorps xmm0,xmm0 - pxor xmm1,xmm1 - movaps xmm6,XMMWORD[rsp] - movaps XMMWORD[rsp],xmm0 - movaps xmm7,XMMWORD[16+rsp] - movaps XMMWORD[16+rsp],xmm0 - movaps xmm8,XMMWORD[32+rsp] - movaps XMMWORD[32+rsp],xmm0 - movaps xmm9,XMMWORD[48+rsp] - movaps XMMWORD[48+rsp],xmm0 - lea rsp,[88+rsp] -$L$ecb_enc_ret: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_aesni_ecb_encrypt: -global aesni_ccm64_encrypt_blocks - -ALIGN 16 -aesni_ccm64_encrypt_blocks: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_aesni_ccm64_encrypt_blocks: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - mov r9,QWORD[48+rsp] - - - lea rsp,[((-88))+rsp] - movaps XMMWORD[rsp],xmm6 - movaps XMMWORD[16+rsp],xmm7 - movaps XMMWORD[32+rsp],xmm8 - movaps XMMWORD[48+rsp],xmm9 -$L$ccm64_enc_body: - mov eax,DWORD[240+rcx] - movdqu xmm6,XMMWORD[r8] - movdqa xmm9,XMMWORD[$L$increment64] - movdqa xmm7,XMMWORD[$L$bswap_mask] - - shl eax,4 - mov r10d,16 - lea r11,[rcx] - movdqu xmm3,XMMWORD[r9] - movdqa xmm2,xmm6 - lea rcx,[32+rax*1+rcx] -DB 102,15,56,0,247 - sub r10,rax - jmp NEAR $L$ccm64_enc_outer -ALIGN 16 -$L$ccm64_enc_outer: - movups xmm0,XMMWORD[r11] - mov rax,r10 - movups xmm8,XMMWORD[rdi] - - xorps xmm2,xmm0 - movups xmm1,XMMWORD[16+r11] - xorps xmm0,xmm8 - xorps xmm3,xmm0 - movups xmm0,XMMWORD[32+r11] - -$L$ccm64_enc2_loop: -DB 102,15,56,220,209 -DB 102,15,56,220,217 - movups xmm1,XMMWORD[rax*1+rcx] - add rax,32 -DB 102,15,56,220,208 -DB 102,15,56,220,216 - movups xmm0,XMMWORD[((-16))+rax*1+rcx] - jnz NEAR $L$ccm64_enc2_loop -DB 102,15,56,220,209 -DB 102,15,56,220,217 - paddq xmm6,xmm9 - dec rdx -DB 102,15,56,221,208 -DB 102,15,56,221,216 - - lea rdi,[16+rdi] - xorps xmm8,xmm2 - movdqa xmm2,xmm6 - movups XMMWORD[rsi],xmm8 -DB 102,15,56,0,215 - lea rsi,[16+rsi] - jnz NEAR $L$ccm64_enc_outer - - pxor xmm0,xmm0 - pxor xmm1,xmm1 - pxor xmm2,xmm2 - movups XMMWORD[r9],xmm3 - pxor xmm3,xmm3 - pxor xmm8,xmm8 - pxor xmm6,xmm6 - movaps xmm6,XMMWORD[rsp] - movaps XMMWORD[rsp],xmm0 - movaps xmm7,XMMWORD[16+rsp] - movaps XMMWORD[16+rsp],xmm0 - movaps xmm8,XMMWORD[32+rsp] - movaps XMMWORD[32+rsp],xmm0 - movaps xmm9,XMMWORD[48+rsp] - movaps XMMWORD[48+rsp],xmm0 - lea rsp,[88+rsp] -$L$ccm64_enc_ret: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_aesni_ccm64_encrypt_blocks: -global aesni_ccm64_decrypt_blocks - -ALIGN 16 -aesni_ccm64_decrypt_blocks: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_aesni_ccm64_decrypt_blocks: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - mov r9,QWORD[48+rsp] - - - lea rsp,[((-88))+rsp] - movaps XMMWORD[rsp],xmm6 - movaps XMMWORD[16+rsp],xmm7 - movaps XMMWORD[32+rsp],xmm8 - movaps XMMWORD[48+rsp],xmm9 -$L$ccm64_dec_body: - mov eax,DWORD[240+rcx] - movups xmm6,XMMWORD[r8] - movdqu xmm3,XMMWORD[r9] - movdqa xmm9,XMMWORD[$L$increment64] - movdqa xmm7,XMMWORD[$L$bswap_mask] - - movaps xmm2,xmm6 - mov r10d,eax - mov r11,rcx -DB 102,15,56,0,247 - movups xmm0,XMMWORD[rcx] - movups xmm1,XMMWORD[16+rcx] - lea rcx,[32+rcx] - xorps xmm2,xmm0 -$L$oop_enc1_5: -DB 102,15,56,220,209 - dec eax - movups xmm1,XMMWORD[rcx] - lea rcx,[16+rcx] - jnz NEAR $L$oop_enc1_5 -DB 102,15,56,221,209 - shl r10d,4 - mov eax,16 - movups xmm8,XMMWORD[rdi] - paddq xmm6,xmm9 - lea rdi,[16+rdi] - sub rax,r10 - lea rcx,[32+r10*1+r11] - mov r10,rax - jmp NEAR $L$ccm64_dec_outer -ALIGN 16 -$L$ccm64_dec_outer: - xorps xmm8,xmm2 - movdqa xmm2,xmm6 - movups XMMWORD[rsi],xmm8 - lea rsi,[16+rsi] -DB 102,15,56,0,215 - - sub rdx,1 - jz NEAR $L$ccm64_dec_break - - movups xmm0,XMMWORD[r11] - mov rax,r10 - movups xmm1,XMMWORD[16+r11] - xorps xmm8,xmm0 - xorps xmm2,xmm0 - xorps xmm3,xmm8 - movups xmm0,XMMWORD[32+r11] - jmp NEAR $L$ccm64_dec2_loop -ALIGN 16 -$L$ccm64_dec2_loop: -DB 102,15,56,220,209 -DB 102,15,56,220,217 - movups xmm1,XMMWORD[rax*1+rcx] - add rax,32 -DB 102,15,56,220,208 -DB 102,15,56,220,216 - movups xmm0,XMMWORD[((-16))+rax*1+rcx] - jnz NEAR $L$ccm64_dec2_loop - movups xmm8,XMMWORD[rdi] - paddq xmm6,xmm9 -DB 102,15,56,220,209 -DB 102,15,56,220,217 -DB 102,15,56,221,208 -DB 102,15,56,221,216 - lea rdi,[16+rdi] - jmp NEAR $L$ccm64_dec_outer - -ALIGN 16 -$L$ccm64_dec_break: - - mov eax,DWORD[240+r11] - movups xmm0,XMMWORD[r11] - movups xmm1,XMMWORD[16+r11] - xorps xmm8,xmm0 - lea r11,[32+r11] - xorps xmm3,xmm8 -$L$oop_enc1_6: -DB 102,15,56,220,217 - dec eax - movups xmm1,XMMWORD[r11] - lea r11,[16+r11] - jnz NEAR $L$oop_enc1_6 -DB 102,15,56,221,217 - pxor xmm0,xmm0 - pxor xmm1,xmm1 - pxor xmm2,xmm2 - movups XMMWORD[r9],xmm3 - pxor xmm3,xmm3 - pxor xmm8,xmm8 - pxor xmm6,xmm6 - movaps xmm6,XMMWORD[rsp] - movaps XMMWORD[rsp],xmm0 - movaps xmm7,XMMWORD[16+rsp] - movaps XMMWORD[16+rsp],xmm0 - movaps xmm8,XMMWORD[32+rsp] - movaps XMMWORD[32+rsp],xmm0 - movaps xmm9,XMMWORD[48+rsp] - movaps XMMWORD[48+rsp],xmm0 - lea rsp,[88+rsp] -$L$ccm64_dec_ret: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_aesni_ccm64_decrypt_blocks: -global aesni_ctr32_encrypt_blocks - -ALIGN 16 -aesni_ctr32_encrypt_blocks: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_aesni_ctr32_encrypt_blocks: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - - - cmp rdx,1 - jne NEAR $L$ctr32_bulk - - - - movups xmm2,XMMWORD[r8] - movups xmm3,XMMWORD[rdi] - mov edx,DWORD[240+rcx] - movups xmm0,XMMWORD[rcx] - movups xmm1,XMMWORD[16+rcx] - lea rcx,[32+rcx] - xorps xmm2,xmm0 -$L$oop_enc1_7: -DB 102,15,56,220,209 - dec edx - movups xmm1,XMMWORD[rcx] - lea rcx,[16+rcx] - jnz NEAR $L$oop_enc1_7 -DB 102,15,56,221,209 - pxor xmm0,xmm0 - pxor xmm1,xmm1 - xorps xmm2,xmm3 - pxor xmm3,xmm3 - movups XMMWORD[rsi],xmm2 - xorps xmm2,xmm2 - jmp NEAR $L$ctr32_epilogue - -ALIGN 16 -$L$ctr32_bulk: - lea rax,[rsp] - push rbp - sub rsp,288 - and rsp,-16 - movaps XMMWORD[(-168)+rax],xmm6 - movaps XMMWORD[(-152)+rax],xmm7 - movaps XMMWORD[(-136)+rax],xmm8 - movaps XMMWORD[(-120)+rax],xmm9 - movaps XMMWORD[(-104)+rax],xmm10 - movaps XMMWORD[(-88)+rax],xmm11 - movaps XMMWORD[(-72)+rax],xmm12 - movaps XMMWORD[(-56)+rax],xmm13 - movaps XMMWORD[(-40)+rax],xmm14 - movaps XMMWORD[(-24)+rax],xmm15 -$L$ctr32_body: - lea rbp,[((-8))+rax] - - - - - movdqu xmm2,XMMWORD[r8] - movdqu xmm0,XMMWORD[rcx] - mov r8d,DWORD[12+r8] - pxor xmm2,xmm0 - mov r11d,DWORD[12+rcx] - movdqa XMMWORD[rsp],xmm2 - bswap r8d - movdqa xmm3,xmm2 - movdqa xmm4,xmm2 - movdqa xmm5,xmm2 - movdqa XMMWORD[64+rsp],xmm2 - movdqa XMMWORD[80+rsp],xmm2 - movdqa XMMWORD[96+rsp],xmm2 - mov r10,rdx - movdqa XMMWORD[112+rsp],xmm2 - - lea rax,[1+r8] - lea rdx,[2+r8] - bswap eax - bswap edx - xor eax,r11d - xor edx,r11d -DB 102,15,58,34,216,3 - lea rax,[3+r8] - movdqa XMMWORD[16+rsp],xmm3 -DB 102,15,58,34,226,3 - bswap eax - mov rdx,r10 - lea r10,[4+r8] - movdqa XMMWORD[32+rsp],xmm4 - xor eax,r11d - bswap r10d -DB 102,15,58,34,232,3 - xor r10d,r11d - movdqa XMMWORD[48+rsp],xmm5 - lea r9,[5+r8] - mov DWORD[((64+12))+rsp],r10d - bswap r9d - lea r10,[6+r8] - mov eax,DWORD[240+rcx] - xor r9d,r11d - bswap r10d - mov DWORD[((80+12))+rsp],r9d - xor r10d,r11d - lea r9,[7+r8] - mov DWORD[((96+12))+rsp],r10d - bswap r9d - mov r10d,DWORD[((OPENSSL_ia32cap_P+4))] - xor r9d,r11d - and r10d,71303168 - mov DWORD[((112+12))+rsp],r9d - - movups xmm1,XMMWORD[16+rcx] - - movdqa xmm6,XMMWORD[64+rsp] - movdqa xmm7,XMMWORD[80+rsp] - - cmp rdx,8 - jb NEAR $L$ctr32_tail - - sub rdx,6 - cmp r10d,4194304 - je NEAR $L$ctr32_6x - - lea rcx,[128+rcx] - sub rdx,2 - jmp NEAR $L$ctr32_loop8 - -ALIGN 16 -$L$ctr32_6x: - shl eax,4 - mov r10d,48 - bswap r11d - lea rcx,[32+rax*1+rcx] - sub r10,rax - jmp NEAR $L$ctr32_loop6 - -ALIGN 16 -$L$ctr32_loop6: - add r8d,6 - movups xmm0,XMMWORD[((-48))+r10*1+rcx] -DB 102,15,56,220,209 - mov eax,r8d - xor eax,r11d -DB 102,15,56,220,217 -DB 0x0f,0x38,0xf1,0x44,0x24,12 - lea eax,[1+r8] -DB 102,15,56,220,225 - xor eax,r11d -DB 0x0f,0x38,0xf1,0x44,0x24,28 -DB 102,15,56,220,233 - lea eax,[2+r8] - xor eax,r11d -DB 102,15,56,220,241 -DB 0x0f,0x38,0xf1,0x44,0x24,44 - lea eax,[3+r8] -DB 102,15,56,220,249 - movups xmm1,XMMWORD[((-32))+r10*1+rcx] - xor eax,r11d - -DB 102,15,56,220,208 -DB 0x0f,0x38,0xf1,0x44,0x24,60 - lea eax,[4+r8] -DB 102,15,56,220,216 - xor eax,r11d -DB 0x0f,0x38,0xf1,0x44,0x24,76 -DB 102,15,56,220,224 - lea eax,[5+r8] - xor eax,r11d -DB 102,15,56,220,232 -DB 0x0f,0x38,0xf1,0x44,0x24,92 - mov rax,r10 -DB 102,15,56,220,240 -DB 102,15,56,220,248 - movups xmm0,XMMWORD[((-16))+r10*1+rcx] - - call $L$enc_loop6 - - movdqu xmm8,XMMWORD[rdi] - movdqu xmm9,XMMWORD[16+rdi] - movdqu xmm10,XMMWORD[32+rdi] - movdqu xmm11,XMMWORD[48+rdi] - movdqu xmm12,XMMWORD[64+rdi] - movdqu xmm13,XMMWORD[80+rdi] - lea rdi,[96+rdi] - movups xmm1,XMMWORD[((-64))+r10*1+rcx] - pxor xmm8,xmm2 - movaps xmm2,XMMWORD[rsp] - pxor xmm9,xmm3 - movaps xmm3,XMMWORD[16+rsp] - pxor xmm10,xmm4 - movaps xmm4,XMMWORD[32+rsp] - pxor xmm11,xmm5 - movaps xmm5,XMMWORD[48+rsp] - pxor xmm12,xmm6 - movaps xmm6,XMMWORD[64+rsp] - pxor xmm13,xmm7 - movaps xmm7,XMMWORD[80+rsp] - movdqu XMMWORD[rsi],xmm8 - movdqu XMMWORD[16+rsi],xmm9 - movdqu XMMWORD[32+rsi],xmm10 - movdqu XMMWORD[48+rsi],xmm11 - movdqu XMMWORD[64+rsi],xmm12 - movdqu XMMWORD[80+rsi],xmm13 - lea rsi,[96+rsi] - - sub rdx,6 - jnc NEAR $L$ctr32_loop6 - - add rdx,6 - jz NEAR $L$ctr32_done - - lea eax,[((-48))+r10] - lea rcx,[((-80))+r10*1+rcx] - neg eax - shr eax,4 - jmp NEAR $L$ctr32_tail - -ALIGN 32 -$L$ctr32_loop8: - add r8d,8 - movdqa xmm8,XMMWORD[96+rsp] -DB 102,15,56,220,209 - mov r9d,r8d - movdqa xmm9,XMMWORD[112+rsp] -DB 102,15,56,220,217 - bswap r9d - movups xmm0,XMMWORD[((32-128))+rcx] -DB 102,15,56,220,225 - xor r9d,r11d - nop -DB 102,15,56,220,233 - mov DWORD[((0+12))+rsp],r9d - lea r9,[1+r8] -DB 102,15,56,220,241 -DB 102,15,56,220,249 -DB 102,68,15,56,220,193 -DB 102,68,15,56,220,201 - movups xmm1,XMMWORD[((48-128))+rcx] - bswap r9d -DB 102,15,56,220,208 -DB 102,15,56,220,216 - xor r9d,r11d -DB 0x66,0x90 -DB 102,15,56,220,224 -DB 102,15,56,220,232 - mov DWORD[((16+12))+rsp],r9d - lea r9,[2+r8] -DB 102,15,56,220,240 -DB 102,15,56,220,248 -DB 102,68,15,56,220,192 -DB 102,68,15,56,220,200 - movups xmm0,XMMWORD[((64-128))+rcx] - bswap r9d -DB 102,15,56,220,209 -DB 102,15,56,220,217 - xor r9d,r11d -DB 0x66,0x90 -DB 102,15,56,220,225 -DB 102,15,56,220,233 - mov DWORD[((32+12))+rsp],r9d - lea r9,[3+r8] -DB 102,15,56,220,241 -DB 102,15,56,220,249 -DB 102,68,15,56,220,193 -DB 102,68,15,56,220,201 - movups xmm1,XMMWORD[((80-128))+rcx] - bswap r9d -DB 102,15,56,220,208 -DB 102,15,56,220,216 - xor r9d,r11d -DB 0x66,0x90 -DB 102,15,56,220,224 -DB 102,15,56,220,232 - mov DWORD[((48+12))+rsp],r9d - lea r9,[4+r8] -DB 102,15,56,220,240 -DB 102,15,56,220,248 -DB 102,68,15,56,220,192 -DB 102,68,15,56,220,200 - movups xmm0,XMMWORD[((96-128))+rcx] - bswap r9d -DB 102,15,56,220,209 -DB 102,15,56,220,217 - xor r9d,r11d -DB 0x66,0x90 -DB 102,15,56,220,225 -DB 102,15,56,220,233 - mov DWORD[((64+12))+rsp],r9d - lea r9,[5+r8] -DB 102,15,56,220,241 -DB 102,15,56,220,249 -DB 102,68,15,56,220,193 -DB 102,68,15,56,220,201 - movups xmm1,XMMWORD[((112-128))+rcx] - bswap r9d -DB 102,15,56,220,208 -DB 102,15,56,220,216 - xor r9d,r11d -DB 0x66,0x90 -DB 102,15,56,220,224 -DB 102,15,56,220,232 - mov DWORD[((80+12))+rsp],r9d - lea r9,[6+r8] -DB 102,15,56,220,240 -DB 102,15,56,220,248 -DB 102,68,15,56,220,192 -DB 102,68,15,56,220,200 - movups xmm0,XMMWORD[((128-128))+rcx] - bswap r9d -DB 102,15,56,220,209 -DB 102,15,56,220,217 - xor r9d,r11d -DB 0x66,0x90 -DB 102,15,56,220,225 -DB 102,15,56,220,233 - mov DWORD[((96+12))+rsp],r9d - lea r9,[7+r8] -DB 102,15,56,220,241 -DB 102,15,56,220,249 -DB 102,68,15,56,220,193 -DB 102,68,15,56,220,201 - movups xmm1,XMMWORD[((144-128))+rcx] - bswap r9d -DB 102,15,56,220,208 -DB 102,15,56,220,216 -DB 102,15,56,220,224 - xor r9d,r11d - movdqu xmm10,XMMWORD[rdi] -DB 102,15,56,220,232 - mov DWORD[((112+12))+rsp],r9d - cmp eax,11 -DB 102,15,56,220,240 -DB 102,15,56,220,248 -DB 102,68,15,56,220,192 -DB 102,68,15,56,220,200 - movups xmm0,XMMWORD[((160-128))+rcx] - - jb NEAR $L$ctr32_enc_done - -DB 102,15,56,220,209 -DB 102,15,56,220,217 -DB 102,15,56,220,225 -DB 102,15,56,220,233 -DB 102,15,56,220,241 -DB 102,15,56,220,249 -DB 102,68,15,56,220,193 -DB 102,68,15,56,220,201 - movups xmm1,XMMWORD[((176-128))+rcx] - -DB 102,15,56,220,208 -DB 102,15,56,220,216 -DB 102,15,56,220,224 -DB 102,15,56,220,232 -DB 102,15,56,220,240 -DB 102,15,56,220,248 -DB 102,68,15,56,220,192 -DB 102,68,15,56,220,200 - movups xmm0,XMMWORD[((192-128))+rcx] - je NEAR $L$ctr32_enc_done - -DB 102,15,56,220,209 -DB 102,15,56,220,217 -DB 102,15,56,220,225 -DB 102,15,56,220,233 -DB 102,15,56,220,241 -DB 102,15,56,220,249 -DB 102,68,15,56,220,193 -DB 102,68,15,56,220,201 - movups xmm1,XMMWORD[((208-128))+rcx] - -DB 102,15,56,220,208 -DB 102,15,56,220,216 -DB 102,15,56,220,224 -DB 102,15,56,220,232 -DB 102,15,56,220,240 -DB 102,15,56,220,248 -DB 102,68,15,56,220,192 -DB 102,68,15,56,220,200 - movups xmm0,XMMWORD[((224-128))+rcx] - jmp NEAR $L$ctr32_enc_done - -ALIGN 16 -$L$ctr32_enc_done: - movdqu xmm11,XMMWORD[16+rdi] - pxor xmm10,xmm0 - movdqu xmm12,XMMWORD[32+rdi] - pxor xmm11,xmm0 - movdqu xmm13,XMMWORD[48+rdi] - pxor xmm12,xmm0 - movdqu xmm14,XMMWORD[64+rdi] - pxor xmm13,xmm0 - movdqu xmm15,XMMWORD[80+rdi] - pxor xmm14,xmm0 - pxor xmm15,xmm0 -DB 102,15,56,220,209 -DB 102,15,56,220,217 -DB 102,15,56,220,225 -DB 102,15,56,220,233 -DB 102,15,56,220,241 -DB 102,15,56,220,249 -DB 102,68,15,56,220,193 -DB 102,68,15,56,220,201 - movdqu xmm1,XMMWORD[96+rdi] - lea rdi,[128+rdi] - -DB 102,65,15,56,221,210 - pxor xmm1,xmm0 - movdqu xmm10,XMMWORD[((112-128))+rdi] -DB 102,65,15,56,221,219 - pxor xmm10,xmm0 - movdqa xmm11,XMMWORD[rsp] -DB 102,65,15,56,221,228 -DB 102,65,15,56,221,237 - movdqa xmm12,XMMWORD[16+rsp] - movdqa xmm13,XMMWORD[32+rsp] -DB 102,65,15,56,221,246 -DB 102,65,15,56,221,255 - movdqa xmm14,XMMWORD[48+rsp] - movdqa xmm15,XMMWORD[64+rsp] -DB 102,68,15,56,221,193 - movdqa xmm0,XMMWORD[80+rsp] - movups xmm1,XMMWORD[((16-128))+rcx] -DB 102,69,15,56,221,202 - - movups XMMWORD[rsi],xmm2 - movdqa xmm2,xmm11 - movups XMMWORD[16+rsi],xmm3 - movdqa xmm3,xmm12 - movups XMMWORD[32+rsi],xmm4 - movdqa xmm4,xmm13 - movups XMMWORD[48+rsi],xmm5 - movdqa xmm5,xmm14 - movups XMMWORD[64+rsi],xmm6 - movdqa xmm6,xmm15 - movups XMMWORD[80+rsi],xmm7 - movdqa xmm7,xmm0 - movups XMMWORD[96+rsi],xmm8 - movups XMMWORD[112+rsi],xmm9 - lea rsi,[128+rsi] - - sub rdx,8 - jnc NEAR $L$ctr32_loop8 - - add rdx,8 - jz NEAR $L$ctr32_done - lea rcx,[((-128))+rcx] - -$L$ctr32_tail: - - - lea rcx,[16+rcx] - cmp rdx,4 - jb NEAR $L$ctr32_loop3 - je NEAR $L$ctr32_loop4 - - - shl eax,4 - movdqa xmm8,XMMWORD[96+rsp] - pxor xmm9,xmm9 - - movups xmm0,XMMWORD[16+rcx] -DB 102,15,56,220,209 -DB 102,15,56,220,217 - lea rcx,[((32-16))+rax*1+rcx] - neg rax -DB 102,15,56,220,225 - add rax,16 - movups xmm10,XMMWORD[rdi] -DB 102,15,56,220,233 -DB 102,15,56,220,241 - movups xmm11,XMMWORD[16+rdi] - movups xmm12,XMMWORD[32+rdi] -DB 102,15,56,220,249 -DB 102,68,15,56,220,193 - - call $L$enc_loop8_enter - - movdqu xmm13,XMMWORD[48+rdi] - pxor xmm2,xmm10 - movdqu xmm10,XMMWORD[64+rdi] - pxor xmm3,xmm11 - movdqu XMMWORD[rsi],xmm2 - pxor xmm4,xmm12 - movdqu XMMWORD[16+rsi],xmm3 - pxor xmm5,xmm13 - movdqu XMMWORD[32+rsi],xmm4 - pxor xmm6,xmm10 - movdqu XMMWORD[48+rsi],xmm5 - movdqu XMMWORD[64+rsi],xmm6 - cmp rdx,6 - jb NEAR $L$ctr32_done - - movups xmm11,XMMWORD[80+rdi] - xorps xmm7,xmm11 - movups XMMWORD[80+rsi],xmm7 - je NEAR $L$ctr32_done - - movups xmm12,XMMWORD[96+rdi] - xorps xmm8,xmm12 - movups XMMWORD[96+rsi],xmm8 - jmp NEAR $L$ctr32_done - -ALIGN 32 -$L$ctr32_loop4: -DB 102,15,56,220,209 - lea rcx,[16+rcx] - dec eax -DB 102,15,56,220,217 -DB 102,15,56,220,225 -DB 102,15,56,220,233 - movups xmm1,XMMWORD[rcx] - jnz NEAR $L$ctr32_loop4 -DB 102,15,56,221,209 -DB 102,15,56,221,217 - movups xmm10,XMMWORD[rdi] - movups xmm11,XMMWORD[16+rdi] -DB 102,15,56,221,225 -DB 102,15,56,221,233 - movups xmm12,XMMWORD[32+rdi] - movups xmm13,XMMWORD[48+rdi] - - xorps xmm2,xmm10 - movups XMMWORD[rsi],xmm2 - xorps xmm3,xmm11 - movups XMMWORD[16+rsi],xmm3 - pxor xmm4,xmm12 - movdqu XMMWORD[32+rsi],xmm4 - pxor xmm5,xmm13 - movdqu XMMWORD[48+rsi],xmm5 - jmp NEAR $L$ctr32_done - -ALIGN 32 -$L$ctr32_loop3: -DB 102,15,56,220,209 - lea rcx,[16+rcx] - dec eax -DB 102,15,56,220,217 -DB 102,15,56,220,225 - movups xmm1,XMMWORD[rcx] - jnz NEAR $L$ctr32_loop3 -DB 102,15,56,221,209 -DB 102,15,56,221,217 -DB 102,15,56,221,225 - - movups xmm10,XMMWORD[rdi] - xorps xmm2,xmm10 - movups XMMWORD[rsi],xmm2 - cmp rdx,2 - jb NEAR $L$ctr32_done - - movups xmm11,XMMWORD[16+rdi] - xorps xmm3,xmm11 - movups XMMWORD[16+rsi],xmm3 - je NEAR $L$ctr32_done - - movups xmm12,XMMWORD[32+rdi] - xorps xmm4,xmm12 - movups XMMWORD[32+rsi],xmm4 - -$L$ctr32_done: - xorps xmm0,xmm0 - xor r11d,r11d - pxor xmm1,xmm1 - pxor xmm2,xmm2 - pxor xmm3,xmm3 - pxor xmm4,xmm4 - pxor xmm5,xmm5 - movaps xmm6,XMMWORD[((-160))+rbp] - movaps XMMWORD[(-160)+rbp],xmm0 - movaps xmm7,XMMWORD[((-144))+rbp] - movaps XMMWORD[(-144)+rbp],xmm0 - movaps xmm8,XMMWORD[((-128))+rbp] - movaps XMMWORD[(-128)+rbp],xmm0 - movaps xmm9,XMMWORD[((-112))+rbp] - movaps XMMWORD[(-112)+rbp],xmm0 - movaps xmm10,XMMWORD[((-96))+rbp] - movaps XMMWORD[(-96)+rbp],xmm0 - movaps xmm11,XMMWORD[((-80))+rbp] - movaps XMMWORD[(-80)+rbp],xmm0 - movaps xmm12,XMMWORD[((-64))+rbp] - movaps XMMWORD[(-64)+rbp],xmm0 - movaps xmm13,XMMWORD[((-48))+rbp] - movaps XMMWORD[(-48)+rbp],xmm0 - movaps xmm14,XMMWORD[((-32))+rbp] - movaps XMMWORD[(-32)+rbp],xmm0 - movaps xmm15,XMMWORD[((-16))+rbp] - movaps XMMWORD[(-16)+rbp],xmm0 - movaps XMMWORD[rsp],xmm0 - movaps XMMWORD[16+rsp],xmm0 - movaps XMMWORD[32+rsp],xmm0 - movaps XMMWORD[48+rsp],xmm0 - movaps XMMWORD[64+rsp],xmm0 - movaps XMMWORD[80+rsp],xmm0 - movaps XMMWORD[96+rsp],xmm0 - movaps XMMWORD[112+rsp],xmm0 - lea rsp,[rbp] - pop rbp -$L$ctr32_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_aesni_ctr32_encrypt_blocks: -global aesni_xts_encrypt - -ALIGN 16 -aesni_xts_encrypt: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_aesni_xts_encrypt: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - mov r9,QWORD[48+rsp] - - - lea rax,[rsp] - push rbp - sub rsp,272 - and rsp,-16 - movaps XMMWORD[(-168)+rax],xmm6 - movaps XMMWORD[(-152)+rax],xmm7 - movaps XMMWORD[(-136)+rax],xmm8 - movaps XMMWORD[(-120)+rax],xmm9 - movaps XMMWORD[(-104)+rax],xmm10 - movaps XMMWORD[(-88)+rax],xmm11 - movaps XMMWORD[(-72)+rax],xmm12 - movaps XMMWORD[(-56)+rax],xmm13 - movaps XMMWORD[(-40)+rax],xmm14 - movaps XMMWORD[(-24)+rax],xmm15 -$L$xts_enc_body: - lea rbp,[((-8))+rax] - movups xmm2,XMMWORD[r9] - mov eax,DWORD[240+r8] - mov r10d,DWORD[240+rcx] - movups xmm0,XMMWORD[r8] - movups xmm1,XMMWORD[16+r8] - lea r8,[32+r8] - xorps xmm2,xmm0 -$L$oop_enc1_8: -DB 102,15,56,220,209 - dec eax - movups xmm1,XMMWORD[r8] - lea r8,[16+r8] - jnz NEAR $L$oop_enc1_8 -DB 102,15,56,221,209 - movups xmm0,XMMWORD[rcx] - mov r11,rcx - mov eax,r10d - shl r10d,4 - mov r9,rdx - and rdx,-16 - - movups xmm1,XMMWORD[16+r10*1+rcx] - - movdqa xmm8,XMMWORD[$L$xts_magic] - movdqa xmm15,xmm2 - pshufd xmm9,xmm2,0x5f - pxor xmm1,xmm0 - movdqa xmm14,xmm9 - paddd xmm9,xmm9 - movdqa xmm10,xmm15 - psrad xmm14,31 - paddq xmm15,xmm15 - pand xmm14,xmm8 - pxor xmm10,xmm0 - pxor xmm15,xmm14 - movdqa xmm14,xmm9 - paddd xmm9,xmm9 - movdqa xmm11,xmm15 - psrad xmm14,31 - paddq xmm15,xmm15 - pand xmm14,xmm8 - pxor xmm11,xmm0 - pxor xmm15,xmm14 - movdqa xmm14,xmm9 - paddd xmm9,xmm9 - movdqa xmm12,xmm15 - psrad xmm14,31 - paddq xmm15,xmm15 - pand xmm14,xmm8 - pxor xmm12,xmm0 - pxor xmm15,xmm14 - movdqa xmm14,xmm9 - paddd xmm9,xmm9 - movdqa xmm13,xmm15 - psrad xmm14,31 - paddq xmm15,xmm15 - pand xmm14,xmm8 - pxor xmm13,xmm0 - pxor xmm15,xmm14 - movdqa xmm14,xmm15 - psrad xmm9,31 - paddq xmm15,xmm15 - pand xmm9,xmm8 - pxor xmm14,xmm0 - pxor xmm15,xmm9 - movaps XMMWORD[96+rsp],xmm1 - - sub rdx,16*6 - jc NEAR $L$xts_enc_short - - mov eax,16+96 - lea rcx,[32+r10*1+r11] - sub rax,r10 - movups xmm1,XMMWORD[16+r11] - mov r10,rax - lea r8,[$L$xts_magic] - jmp NEAR $L$xts_enc_grandloop - -ALIGN 32 -$L$xts_enc_grandloop: - movdqu xmm2,XMMWORD[rdi] - movdqa xmm8,xmm0 - movdqu xmm3,XMMWORD[16+rdi] - pxor xmm2,xmm10 - movdqu xmm4,XMMWORD[32+rdi] - pxor xmm3,xmm11 -DB 102,15,56,220,209 - movdqu xmm5,XMMWORD[48+rdi] - pxor xmm4,xmm12 -DB 102,15,56,220,217 - movdqu xmm6,XMMWORD[64+rdi] - pxor xmm5,xmm13 -DB 102,15,56,220,225 - movdqu xmm7,XMMWORD[80+rdi] - pxor xmm8,xmm15 - movdqa xmm9,XMMWORD[96+rsp] - pxor xmm6,xmm14 -DB 102,15,56,220,233 - movups xmm0,XMMWORD[32+r11] - lea rdi,[96+rdi] - pxor xmm7,xmm8 - - pxor xmm10,xmm9 -DB 102,15,56,220,241 - pxor xmm11,xmm9 - movdqa XMMWORD[rsp],xmm10 -DB 102,15,56,220,249 - movups xmm1,XMMWORD[48+r11] - pxor xmm12,xmm9 - -DB 102,15,56,220,208 - pxor xmm13,xmm9 - movdqa XMMWORD[16+rsp],xmm11 -DB 102,15,56,220,216 - pxor xmm14,xmm9 - movdqa XMMWORD[32+rsp],xmm12 -DB 102,15,56,220,224 -DB 102,15,56,220,232 - pxor xmm8,xmm9 - movdqa XMMWORD[64+rsp],xmm14 -DB 102,15,56,220,240 -DB 102,15,56,220,248 - movups xmm0,XMMWORD[64+r11] - movdqa XMMWORD[80+rsp],xmm8 - pshufd xmm9,xmm15,0x5f - jmp NEAR $L$xts_enc_loop6 -ALIGN 32 -$L$xts_enc_loop6: -DB 102,15,56,220,209 -DB 102,15,56,220,217 -DB 102,15,56,220,225 -DB 102,15,56,220,233 -DB 102,15,56,220,241 -DB 102,15,56,220,249 - movups xmm1,XMMWORD[((-64))+rax*1+rcx] - add rax,32 - -DB 102,15,56,220,208 -DB 102,15,56,220,216 -DB 102,15,56,220,224 -DB 102,15,56,220,232 -DB 102,15,56,220,240 -DB 102,15,56,220,248 - movups xmm0,XMMWORD[((-80))+rax*1+rcx] - jnz NEAR $L$xts_enc_loop6 - - movdqa xmm8,XMMWORD[r8] - movdqa xmm14,xmm9 - paddd xmm9,xmm9 -DB 102,15,56,220,209 - paddq xmm15,xmm15 - psrad xmm14,31 -DB 102,15,56,220,217 - pand xmm14,xmm8 - movups xmm10,XMMWORD[r11] -DB 102,15,56,220,225 -DB 102,15,56,220,233 -DB 102,15,56,220,241 - pxor xmm15,xmm14 - movaps xmm11,xmm10 -DB 102,15,56,220,249 - movups xmm1,XMMWORD[((-64))+rcx] - - movdqa xmm14,xmm9 -DB 102,15,56,220,208 - paddd xmm9,xmm9 - pxor xmm10,xmm15 -DB 102,15,56,220,216 - psrad xmm14,31 - paddq xmm15,xmm15 -DB 102,15,56,220,224 -DB 102,15,56,220,232 - pand xmm14,xmm8 - movaps xmm12,xmm11 -DB 102,15,56,220,240 - pxor xmm15,xmm14 - movdqa xmm14,xmm9 -DB 102,15,56,220,248 - movups xmm0,XMMWORD[((-48))+rcx] - - paddd xmm9,xmm9 -DB 102,15,56,220,209 - pxor xmm11,xmm15 - psrad xmm14,31 -DB 102,15,56,220,217 - paddq xmm15,xmm15 - pand xmm14,xmm8 -DB 102,15,56,220,225 -DB 102,15,56,220,233 - movdqa XMMWORD[48+rsp],xmm13 - pxor xmm15,xmm14 -DB 102,15,56,220,241 - movaps xmm13,xmm12 - movdqa xmm14,xmm9 -DB 102,15,56,220,249 - movups xmm1,XMMWORD[((-32))+rcx] - - paddd xmm9,xmm9 -DB 102,15,56,220,208 - pxor xmm12,xmm15 - psrad xmm14,31 -DB 102,15,56,220,216 - paddq xmm15,xmm15 - pand xmm14,xmm8 -DB 102,15,56,220,224 -DB 102,15,56,220,232 -DB 102,15,56,220,240 - pxor xmm15,xmm14 - movaps xmm14,xmm13 -DB 102,15,56,220,248 - - movdqa xmm0,xmm9 - paddd xmm9,xmm9 -DB 102,15,56,220,209 - pxor xmm13,xmm15 - psrad xmm0,31 -DB 102,15,56,220,217 - paddq xmm15,xmm15 - pand xmm0,xmm8 -DB 102,15,56,220,225 -DB 102,15,56,220,233 - pxor xmm15,xmm0 - movups xmm0,XMMWORD[r11] -DB 102,15,56,220,241 -DB 102,15,56,220,249 - movups xmm1,XMMWORD[16+r11] - - pxor xmm14,xmm15 -DB 102,15,56,221,84,36,0 - psrad xmm9,31 - paddq xmm15,xmm15 -DB 102,15,56,221,92,36,16 -DB 102,15,56,221,100,36,32 - pand xmm9,xmm8 - mov rax,r10 -DB 102,15,56,221,108,36,48 -DB 102,15,56,221,116,36,64 -DB 102,15,56,221,124,36,80 - pxor xmm15,xmm9 - - lea rsi,[96+rsi] - movups XMMWORD[(-96)+rsi],xmm2 - movups XMMWORD[(-80)+rsi],xmm3 - movups XMMWORD[(-64)+rsi],xmm4 - movups XMMWORD[(-48)+rsi],xmm5 - movups XMMWORD[(-32)+rsi],xmm6 - movups XMMWORD[(-16)+rsi],xmm7 - sub rdx,16*6 - jnc NEAR $L$xts_enc_grandloop - - mov eax,16+96 - sub eax,r10d - mov rcx,r11 - shr eax,4 - -$L$xts_enc_short: - - mov r10d,eax - pxor xmm10,xmm0 - add rdx,16*6 - jz NEAR $L$xts_enc_done - - pxor xmm11,xmm0 - cmp rdx,0x20 - jb NEAR $L$xts_enc_one - pxor xmm12,xmm0 - je NEAR $L$xts_enc_two - - pxor xmm13,xmm0 - cmp rdx,0x40 - jb NEAR $L$xts_enc_three - pxor xmm14,xmm0 - je NEAR $L$xts_enc_four - - movdqu xmm2,XMMWORD[rdi] - movdqu xmm3,XMMWORD[16+rdi] - movdqu xmm4,XMMWORD[32+rdi] - pxor xmm2,xmm10 - movdqu xmm5,XMMWORD[48+rdi] - pxor xmm3,xmm11 - movdqu xmm6,XMMWORD[64+rdi] - lea rdi,[80+rdi] - pxor xmm4,xmm12 - pxor xmm5,xmm13 - pxor xmm6,xmm14 - pxor xmm7,xmm7 - - call _aesni_encrypt6 - - xorps xmm2,xmm10 - movdqa xmm10,xmm15 - xorps xmm3,xmm11 - xorps xmm4,xmm12 - movdqu XMMWORD[rsi],xmm2 - xorps xmm5,xmm13 - movdqu XMMWORD[16+rsi],xmm3 - xorps xmm6,xmm14 - movdqu XMMWORD[32+rsi],xmm4 - movdqu XMMWORD[48+rsi],xmm5 - movdqu XMMWORD[64+rsi],xmm6 - lea rsi,[80+rsi] - jmp NEAR $L$xts_enc_done - -ALIGN 16 -$L$xts_enc_one: - movups xmm2,XMMWORD[rdi] - lea rdi,[16+rdi] - xorps xmm2,xmm10 - movups xmm0,XMMWORD[rcx] - movups xmm1,XMMWORD[16+rcx] - lea rcx,[32+rcx] - xorps xmm2,xmm0 -$L$oop_enc1_9: -DB 102,15,56,220,209 - dec eax - movups xmm1,XMMWORD[rcx] - lea rcx,[16+rcx] - jnz NEAR $L$oop_enc1_9 -DB 102,15,56,221,209 - xorps xmm2,xmm10 - movdqa xmm10,xmm11 - movups XMMWORD[rsi],xmm2 - lea rsi,[16+rsi] - jmp NEAR $L$xts_enc_done - -ALIGN 16 -$L$xts_enc_two: - movups xmm2,XMMWORD[rdi] - movups xmm3,XMMWORD[16+rdi] - lea rdi,[32+rdi] - xorps xmm2,xmm10 - xorps xmm3,xmm11 - - call _aesni_encrypt2 - - xorps xmm2,xmm10 - movdqa xmm10,xmm12 - xorps xmm3,xmm11 - movups XMMWORD[rsi],xmm2 - movups XMMWORD[16+rsi],xmm3 - lea rsi,[32+rsi] - jmp NEAR $L$xts_enc_done - -ALIGN 16 -$L$xts_enc_three: - movups xmm2,XMMWORD[rdi] - movups xmm3,XMMWORD[16+rdi] - movups xmm4,XMMWORD[32+rdi] - lea rdi,[48+rdi] - xorps xmm2,xmm10 - xorps xmm3,xmm11 - xorps xmm4,xmm12 - - call _aesni_encrypt3 - - xorps xmm2,xmm10 - movdqa xmm10,xmm13 - xorps xmm3,xmm11 - xorps xmm4,xmm12 - movups XMMWORD[rsi],xmm2 - movups XMMWORD[16+rsi],xmm3 - movups XMMWORD[32+rsi],xmm4 - lea rsi,[48+rsi] - jmp NEAR $L$xts_enc_done - -ALIGN 16 -$L$xts_enc_four: - movups xmm2,XMMWORD[rdi] - movups xmm3,XMMWORD[16+rdi] - movups xmm4,XMMWORD[32+rdi] - xorps xmm2,xmm10 - movups xmm5,XMMWORD[48+rdi] - lea rdi,[64+rdi] - xorps xmm3,xmm11 - xorps xmm4,xmm12 - xorps xmm5,xmm13 - - call _aesni_encrypt4 - - pxor xmm2,xmm10 - movdqa xmm10,xmm14 - pxor xmm3,xmm11 - pxor xmm4,xmm12 - movdqu XMMWORD[rsi],xmm2 - pxor xmm5,xmm13 - movdqu XMMWORD[16+rsi],xmm3 - movdqu XMMWORD[32+rsi],xmm4 - movdqu XMMWORD[48+rsi],xmm5 - lea rsi,[64+rsi] - jmp NEAR $L$xts_enc_done - -ALIGN 16 -$L$xts_enc_done: - and r9,15 - jz NEAR $L$xts_enc_ret - mov rdx,r9 - -$L$xts_enc_steal: - movzx eax,BYTE[rdi] - movzx ecx,BYTE[((-16))+rsi] - lea rdi,[1+rdi] - mov BYTE[((-16))+rsi],al - mov BYTE[rsi],cl - lea rsi,[1+rsi] - sub rdx,1 - jnz NEAR $L$xts_enc_steal - - sub rsi,r9 - mov rcx,r11 - mov eax,r10d - - movups xmm2,XMMWORD[((-16))+rsi] - xorps xmm2,xmm10 - movups xmm0,XMMWORD[rcx] - movups xmm1,XMMWORD[16+rcx] - lea rcx,[32+rcx] - xorps xmm2,xmm0 -$L$oop_enc1_10: -DB 102,15,56,220,209 - dec eax - movups xmm1,XMMWORD[rcx] - lea rcx,[16+rcx] - jnz NEAR $L$oop_enc1_10 -DB 102,15,56,221,209 - xorps xmm2,xmm10 - movups XMMWORD[(-16)+rsi],xmm2 - -$L$xts_enc_ret: - xorps xmm0,xmm0 - pxor xmm1,xmm1 - pxor xmm2,xmm2 - pxor xmm3,xmm3 - pxor xmm4,xmm4 - pxor xmm5,xmm5 - movaps xmm6,XMMWORD[((-160))+rbp] - movaps XMMWORD[(-160)+rbp],xmm0 - movaps xmm7,XMMWORD[((-144))+rbp] - movaps XMMWORD[(-144)+rbp],xmm0 - movaps xmm8,XMMWORD[((-128))+rbp] - movaps XMMWORD[(-128)+rbp],xmm0 - movaps xmm9,XMMWORD[((-112))+rbp] - movaps XMMWORD[(-112)+rbp],xmm0 - movaps xmm10,XMMWORD[((-96))+rbp] - movaps XMMWORD[(-96)+rbp],xmm0 - movaps xmm11,XMMWORD[((-80))+rbp] - movaps XMMWORD[(-80)+rbp],xmm0 - movaps xmm12,XMMWORD[((-64))+rbp] - movaps XMMWORD[(-64)+rbp],xmm0 - movaps xmm13,XMMWORD[((-48))+rbp] - movaps XMMWORD[(-48)+rbp],xmm0 - movaps xmm14,XMMWORD[((-32))+rbp] - movaps XMMWORD[(-32)+rbp],xmm0 - movaps xmm15,XMMWORD[((-16))+rbp] - movaps XMMWORD[(-16)+rbp],xmm0 - movaps XMMWORD[rsp],xmm0 - movaps XMMWORD[16+rsp],xmm0 - movaps XMMWORD[32+rsp],xmm0 - movaps XMMWORD[48+rsp],xmm0 - movaps XMMWORD[64+rsp],xmm0 - movaps XMMWORD[80+rsp],xmm0 - movaps XMMWORD[96+rsp],xmm0 - lea rsp,[rbp] - pop rbp -$L$xts_enc_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_aesni_xts_encrypt: -global aesni_xts_decrypt - -ALIGN 16 -aesni_xts_decrypt: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_aesni_xts_decrypt: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - mov r9,QWORD[48+rsp] - - - lea rax,[rsp] - push rbp - sub rsp,272 - and rsp,-16 - movaps XMMWORD[(-168)+rax],xmm6 - movaps XMMWORD[(-152)+rax],xmm7 - movaps XMMWORD[(-136)+rax],xmm8 - movaps XMMWORD[(-120)+rax],xmm9 - movaps XMMWORD[(-104)+rax],xmm10 - movaps XMMWORD[(-88)+rax],xmm11 - movaps XMMWORD[(-72)+rax],xmm12 - movaps XMMWORD[(-56)+rax],xmm13 - movaps XMMWORD[(-40)+rax],xmm14 - movaps XMMWORD[(-24)+rax],xmm15 -$L$xts_dec_body: - lea rbp,[((-8))+rax] - movups xmm2,XMMWORD[r9] - mov eax,DWORD[240+r8] - mov r10d,DWORD[240+rcx] - movups xmm0,XMMWORD[r8] - movups xmm1,XMMWORD[16+r8] - lea r8,[32+r8] - xorps xmm2,xmm0 -$L$oop_enc1_11: -DB 102,15,56,220,209 - dec eax - movups xmm1,XMMWORD[r8] - lea r8,[16+r8] - jnz NEAR $L$oop_enc1_11 -DB 102,15,56,221,209 - xor eax,eax - test rdx,15 - setnz al - shl rax,4 - sub rdx,rax - - movups xmm0,XMMWORD[rcx] - mov r11,rcx - mov eax,r10d - shl r10d,4 - mov r9,rdx - and rdx,-16 - - movups xmm1,XMMWORD[16+r10*1+rcx] - - movdqa xmm8,XMMWORD[$L$xts_magic] - movdqa xmm15,xmm2 - pshufd xmm9,xmm2,0x5f - pxor xmm1,xmm0 - movdqa xmm14,xmm9 - paddd xmm9,xmm9 - movdqa xmm10,xmm15 - psrad xmm14,31 - paddq xmm15,xmm15 - pand xmm14,xmm8 - pxor xmm10,xmm0 - pxor xmm15,xmm14 - movdqa xmm14,xmm9 - paddd xmm9,xmm9 - movdqa xmm11,xmm15 - psrad xmm14,31 - paddq xmm15,xmm15 - pand xmm14,xmm8 - pxor xmm11,xmm0 - pxor xmm15,xmm14 - movdqa xmm14,xmm9 - paddd xmm9,xmm9 - movdqa xmm12,xmm15 - psrad xmm14,31 - paddq xmm15,xmm15 - pand xmm14,xmm8 - pxor xmm12,xmm0 - pxor xmm15,xmm14 - movdqa xmm14,xmm9 - paddd xmm9,xmm9 - movdqa xmm13,xmm15 - psrad xmm14,31 - paddq xmm15,xmm15 - pand xmm14,xmm8 - pxor xmm13,xmm0 - pxor xmm15,xmm14 - movdqa xmm14,xmm15 - psrad xmm9,31 - paddq xmm15,xmm15 - pand xmm9,xmm8 - pxor xmm14,xmm0 - pxor xmm15,xmm9 - movaps XMMWORD[96+rsp],xmm1 - - sub rdx,16*6 - jc NEAR $L$xts_dec_short - - mov eax,16+96 - lea rcx,[32+r10*1+r11] - sub rax,r10 - movups xmm1,XMMWORD[16+r11] - mov r10,rax - lea r8,[$L$xts_magic] - jmp NEAR $L$xts_dec_grandloop - -ALIGN 32 -$L$xts_dec_grandloop: - movdqu xmm2,XMMWORD[rdi] - movdqa xmm8,xmm0 - movdqu xmm3,XMMWORD[16+rdi] - pxor xmm2,xmm10 - movdqu xmm4,XMMWORD[32+rdi] - pxor xmm3,xmm11 -DB 102,15,56,222,209 - movdqu xmm5,XMMWORD[48+rdi] - pxor xmm4,xmm12 -DB 102,15,56,222,217 - movdqu xmm6,XMMWORD[64+rdi] - pxor xmm5,xmm13 -DB 102,15,56,222,225 - movdqu xmm7,XMMWORD[80+rdi] - pxor xmm8,xmm15 - movdqa xmm9,XMMWORD[96+rsp] - pxor xmm6,xmm14 -DB 102,15,56,222,233 - movups xmm0,XMMWORD[32+r11] - lea rdi,[96+rdi] - pxor xmm7,xmm8 - - pxor xmm10,xmm9 -DB 102,15,56,222,241 - pxor xmm11,xmm9 - movdqa XMMWORD[rsp],xmm10 -DB 102,15,56,222,249 - movups xmm1,XMMWORD[48+r11] - pxor xmm12,xmm9 - -DB 102,15,56,222,208 - pxor xmm13,xmm9 - movdqa XMMWORD[16+rsp],xmm11 -DB 102,15,56,222,216 - pxor xmm14,xmm9 - movdqa XMMWORD[32+rsp],xmm12 -DB 102,15,56,222,224 -DB 102,15,56,222,232 - pxor xmm8,xmm9 - movdqa XMMWORD[64+rsp],xmm14 -DB 102,15,56,222,240 -DB 102,15,56,222,248 - movups xmm0,XMMWORD[64+r11] - movdqa XMMWORD[80+rsp],xmm8 - pshufd xmm9,xmm15,0x5f - jmp NEAR $L$xts_dec_loop6 -ALIGN 32 -$L$xts_dec_loop6: -DB 102,15,56,222,209 -DB 102,15,56,222,217 -DB 102,15,56,222,225 -DB 102,15,56,222,233 -DB 102,15,56,222,241 -DB 102,15,56,222,249 - movups xmm1,XMMWORD[((-64))+rax*1+rcx] - add rax,32 - -DB 102,15,56,222,208 -DB 102,15,56,222,216 -DB 102,15,56,222,224 -DB 102,15,56,222,232 -DB 102,15,56,222,240 -DB 102,15,56,222,248 - movups xmm0,XMMWORD[((-80))+rax*1+rcx] - jnz NEAR $L$xts_dec_loop6 - - movdqa xmm8,XMMWORD[r8] - movdqa xmm14,xmm9 - paddd xmm9,xmm9 -DB 102,15,56,222,209 - paddq xmm15,xmm15 - psrad xmm14,31 -DB 102,15,56,222,217 - pand xmm14,xmm8 - movups xmm10,XMMWORD[r11] -DB 102,15,56,222,225 -DB 102,15,56,222,233 -DB 102,15,56,222,241 - pxor xmm15,xmm14 - movaps xmm11,xmm10 -DB 102,15,56,222,249 - movups xmm1,XMMWORD[((-64))+rcx] - - movdqa xmm14,xmm9 -DB 102,15,56,222,208 - paddd xmm9,xmm9 - pxor xmm10,xmm15 -DB 102,15,56,222,216 - psrad xmm14,31 - paddq xmm15,xmm15 -DB 102,15,56,222,224 -DB 102,15,56,222,232 - pand xmm14,xmm8 - movaps xmm12,xmm11 -DB 102,15,56,222,240 - pxor xmm15,xmm14 - movdqa xmm14,xmm9 -DB 102,15,56,222,248 - movups xmm0,XMMWORD[((-48))+rcx] - - paddd xmm9,xmm9 -DB 102,15,56,222,209 - pxor xmm11,xmm15 - psrad xmm14,31 -DB 102,15,56,222,217 - paddq xmm15,xmm15 - pand xmm14,xmm8 -DB 102,15,56,222,225 -DB 102,15,56,222,233 - movdqa XMMWORD[48+rsp],xmm13 - pxor xmm15,xmm14 -DB 102,15,56,222,241 - movaps xmm13,xmm12 - movdqa xmm14,xmm9 -DB 102,15,56,222,249 - movups xmm1,XMMWORD[((-32))+rcx] - - paddd xmm9,xmm9 -DB 102,15,56,222,208 - pxor xmm12,xmm15 - psrad xmm14,31 -DB 102,15,56,222,216 - paddq xmm15,xmm15 - pand xmm14,xmm8 -DB 102,15,56,222,224 -DB 102,15,56,222,232 -DB 102,15,56,222,240 - pxor xmm15,xmm14 - movaps xmm14,xmm13 -DB 102,15,56,222,248 - - movdqa xmm0,xmm9 - paddd xmm9,xmm9 -DB 102,15,56,222,209 - pxor xmm13,xmm15 - psrad xmm0,31 -DB 102,15,56,222,217 - paddq xmm15,xmm15 - pand xmm0,xmm8 -DB 102,15,56,222,225 -DB 102,15,56,222,233 - pxor xmm15,xmm0 - movups xmm0,XMMWORD[r11] -DB 102,15,56,222,241 -DB 102,15,56,222,249 - movups xmm1,XMMWORD[16+r11] - - pxor xmm14,xmm15 -DB 102,15,56,223,84,36,0 - psrad xmm9,31 - paddq xmm15,xmm15 -DB 102,15,56,223,92,36,16 -DB 102,15,56,223,100,36,32 - pand xmm9,xmm8 - mov rax,r10 -DB 102,15,56,223,108,36,48 -DB 102,15,56,223,116,36,64 -DB 102,15,56,223,124,36,80 - pxor xmm15,xmm9 - - lea rsi,[96+rsi] - movups XMMWORD[(-96)+rsi],xmm2 - movups XMMWORD[(-80)+rsi],xmm3 - movups XMMWORD[(-64)+rsi],xmm4 - movups XMMWORD[(-48)+rsi],xmm5 - movups XMMWORD[(-32)+rsi],xmm6 - movups XMMWORD[(-16)+rsi],xmm7 - sub rdx,16*6 - jnc NEAR $L$xts_dec_grandloop - - mov eax,16+96 - sub eax,r10d - mov rcx,r11 - shr eax,4 - -$L$xts_dec_short: - - mov r10d,eax - pxor xmm10,xmm0 - pxor xmm11,xmm0 - add rdx,16*6 - jz NEAR $L$xts_dec_done - - pxor xmm12,xmm0 - cmp rdx,0x20 - jb NEAR $L$xts_dec_one - pxor xmm13,xmm0 - je NEAR $L$xts_dec_two - - pxor xmm14,xmm0 - cmp rdx,0x40 - jb NEAR $L$xts_dec_three - je NEAR $L$xts_dec_four - - movdqu xmm2,XMMWORD[rdi] - movdqu xmm3,XMMWORD[16+rdi] - movdqu xmm4,XMMWORD[32+rdi] - pxor xmm2,xmm10 - movdqu xmm5,XMMWORD[48+rdi] - pxor xmm3,xmm11 - movdqu xmm6,XMMWORD[64+rdi] - lea rdi,[80+rdi] - pxor xmm4,xmm12 - pxor xmm5,xmm13 - pxor xmm6,xmm14 - - call _aesni_decrypt6 - - xorps xmm2,xmm10 - xorps xmm3,xmm11 - xorps xmm4,xmm12 - movdqu XMMWORD[rsi],xmm2 - xorps xmm5,xmm13 - movdqu XMMWORD[16+rsi],xmm3 - xorps xmm6,xmm14 - movdqu XMMWORD[32+rsi],xmm4 - pxor xmm14,xmm14 - movdqu XMMWORD[48+rsi],xmm5 - pcmpgtd xmm14,xmm15 - movdqu XMMWORD[64+rsi],xmm6 - lea rsi,[80+rsi] - pshufd xmm11,xmm14,0x13 - and r9,15 - jz NEAR $L$xts_dec_ret - - movdqa xmm10,xmm15 - paddq xmm15,xmm15 - pand xmm11,xmm8 - pxor xmm11,xmm15 - jmp NEAR $L$xts_dec_done2 - -ALIGN 16 -$L$xts_dec_one: - movups xmm2,XMMWORD[rdi] - lea rdi,[16+rdi] - xorps xmm2,xmm10 - movups xmm0,XMMWORD[rcx] - movups xmm1,XMMWORD[16+rcx] - lea rcx,[32+rcx] - xorps xmm2,xmm0 -$L$oop_dec1_12: -DB 102,15,56,222,209 - dec eax - movups xmm1,XMMWORD[rcx] - lea rcx,[16+rcx] - jnz NEAR $L$oop_dec1_12 -DB 102,15,56,223,209 - xorps xmm2,xmm10 - movdqa xmm10,xmm11 - movups XMMWORD[rsi],xmm2 - movdqa xmm11,xmm12 - lea rsi,[16+rsi] - jmp NEAR $L$xts_dec_done - -ALIGN 16 -$L$xts_dec_two: - movups xmm2,XMMWORD[rdi] - movups xmm3,XMMWORD[16+rdi] - lea rdi,[32+rdi] - xorps xmm2,xmm10 - xorps xmm3,xmm11 - - call _aesni_decrypt2 - - xorps xmm2,xmm10 - movdqa xmm10,xmm12 - xorps xmm3,xmm11 - movdqa xmm11,xmm13 - movups XMMWORD[rsi],xmm2 - movups XMMWORD[16+rsi],xmm3 - lea rsi,[32+rsi] - jmp NEAR $L$xts_dec_done - -ALIGN 16 -$L$xts_dec_three: - movups xmm2,XMMWORD[rdi] - movups xmm3,XMMWORD[16+rdi] - movups xmm4,XMMWORD[32+rdi] - lea rdi,[48+rdi] - xorps xmm2,xmm10 - xorps xmm3,xmm11 - xorps xmm4,xmm12 - - call _aesni_decrypt3 - - xorps xmm2,xmm10 - movdqa xmm10,xmm13 - xorps xmm3,xmm11 - movdqa xmm11,xmm14 - xorps xmm4,xmm12 - movups XMMWORD[rsi],xmm2 - movups XMMWORD[16+rsi],xmm3 - movups XMMWORD[32+rsi],xmm4 - lea rsi,[48+rsi] - jmp NEAR $L$xts_dec_done - -ALIGN 16 -$L$xts_dec_four: - movups xmm2,XMMWORD[rdi] - movups xmm3,XMMWORD[16+rdi] - movups xmm4,XMMWORD[32+rdi] - xorps xmm2,xmm10 - movups xmm5,XMMWORD[48+rdi] - lea rdi,[64+rdi] - xorps xmm3,xmm11 - xorps xmm4,xmm12 - xorps xmm5,xmm13 - - call _aesni_decrypt4 - - pxor xmm2,xmm10 - movdqa xmm10,xmm14 - pxor xmm3,xmm11 - movdqa xmm11,xmm15 - pxor xmm4,xmm12 - movdqu XMMWORD[rsi],xmm2 - pxor xmm5,xmm13 - movdqu XMMWORD[16+rsi],xmm3 - movdqu XMMWORD[32+rsi],xmm4 - movdqu XMMWORD[48+rsi],xmm5 - lea rsi,[64+rsi] - jmp NEAR $L$xts_dec_done - -ALIGN 16 -$L$xts_dec_done: - and r9,15 - jz NEAR $L$xts_dec_ret -$L$xts_dec_done2: - mov rdx,r9 - mov rcx,r11 - mov eax,r10d - - movups xmm2,XMMWORD[rdi] - xorps xmm2,xmm11 - movups xmm0,XMMWORD[rcx] - movups xmm1,XMMWORD[16+rcx] - lea rcx,[32+rcx] - xorps xmm2,xmm0 -$L$oop_dec1_13: -DB 102,15,56,222,209 - dec eax - movups xmm1,XMMWORD[rcx] - lea rcx,[16+rcx] - jnz NEAR $L$oop_dec1_13 -DB 102,15,56,223,209 - xorps xmm2,xmm11 - movups XMMWORD[rsi],xmm2 - -$L$xts_dec_steal: - movzx eax,BYTE[16+rdi] - movzx ecx,BYTE[rsi] - lea rdi,[1+rdi] - mov BYTE[rsi],al - mov BYTE[16+rsi],cl - lea rsi,[1+rsi] - sub rdx,1 - jnz NEAR $L$xts_dec_steal - - sub rsi,r9 - mov rcx,r11 - mov eax,r10d - - movups xmm2,XMMWORD[rsi] - xorps xmm2,xmm10 - movups xmm0,XMMWORD[rcx] - movups xmm1,XMMWORD[16+rcx] - lea rcx,[32+rcx] - xorps xmm2,xmm0 -$L$oop_dec1_14: -DB 102,15,56,222,209 - dec eax - movups xmm1,XMMWORD[rcx] - lea rcx,[16+rcx] - jnz NEAR $L$oop_dec1_14 -DB 102,15,56,223,209 - xorps xmm2,xmm10 - movups XMMWORD[rsi],xmm2 - -$L$xts_dec_ret: - xorps xmm0,xmm0 - pxor xmm1,xmm1 - pxor xmm2,xmm2 - pxor xmm3,xmm3 - pxor xmm4,xmm4 - pxor xmm5,xmm5 - movaps xmm6,XMMWORD[((-160))+rbp] - movaps XMMWORD[(-160)+rbp],xmm0 - movaps xmm7,XMMWORD[((-144))+rbp] - movaps XMMWORD[(-144)+rbp],xmm0 - movaps xmm8,XMMWORD[((-128))+rbp] - movaps XMMWORD[(-128)+rbp],xmm0 - movaps xmm9,XMMWORD[((-112))+rbp] - movaps XMMWORD[(-112)+rbp],xmm0 - movaps xmm10,XMMWORD[((-96))+rbp] - movaps XMMWORD[(-96)+rbp],xmm0 - movaps xmm11,XMMWORD[((-80))+rbp] - movaps XMMWORD[(-80)+rbp],xmm0 - movaps xmm12,XMMWORD[((-64))+rbp] - movaps XMMWORD[(-64)+rbp],xmm0 - movaps xmm13,XMMWORD[((-48))+rbp] - movaps XMMWORD[(-48)+rbp],xmm0 - movaps xmm14,XMMWORD[((-32))+rbp] - movaps XMMWORD[(-32)+rbp],xmm0 - movaps xmm15,XMMWORD[((-16))+rbp] - movaps XMMWORD[(-16)+rbp],xmm0 - movaps XMMWORD[rsp],xmm0 - movaps XMMWORD[16+rsp],xmm0 - movaps XMMWORD[32+rsp],xmm0 - movaps XMMWORD[48+rsp],xmm0 - movaps XMMWORD[64+rsp],xmm0 - movaps XMMWORD[80+rsp],xmm0 - movaps XMMWORD[96+rsp],xmm0 - lea rsp,[rbp] - pop rbp -$L$xts_dec_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_aesni_xts_decrypt: -global aesni_cbc_encrypt - -ALIGN 16 -aesni_cbc_encrypt: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_aesni_cbc_encrypt: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - mov r9,QWORD[48+rsp] - - - test rdx,rdx - jz NEAR $L$cbc_ret - - mov r10d,DWORD[240+rcx] - mov r11,rcx - test r9d,r9d - jz NEAR $L$cbc_decrypt - - movups xmm2,XMMWORD[r8] - mov eax,r10d - cmp rdx,16 - jb NEAR $L$cbc_enc_tail - sub rdx,16 - jmp NEAR $L$cbc_enc_loop -ALIGN 16 -$L$cbc_enc_loop: - movups xmm3,XMMWORD[rdi] - lea rdi,[16+rdi] - - movups xmm0,XMMWORD[rcx] - movups xmm1,XMMWORD[16+rcx] - xorps xmm3,xmm0 - lea rcx,[32+rcx] - xorps xmm2,xmm3 -$L$oop_enc1_15: -DB 102,15,56,220,209 - dec eax - movups xmm1,XMMWORD[rcx] - lea rcx,[16+rcx] - jnz NEAR $L$oop_enc1_15 -DB 102,15,56,221,209 - mov eax,r10d - mov rcx,r11 - movups XMMWORD[rsi],xmm2 - lea rsi,[16+rsi] - sub rdx,16 - jnc NEAR $L$cbc_enc_loop - add rdx,16 - jnz NEAR $L$cbc_enc_tail - pxor xmm0,xmm0 - pxor xmm1,xmm1 - movups XMMWORD[r8],xmm2 - pxor xmm2,xmm2 - pxor xmm3,xmm3 - jmp NEAR $L$cbc_ret - -$L$cbc_enc_tail: - mov rcx,rdx - xchg rsi,rdi - DD 0x9066A4F3 - mov ecx,16 - sub rcx,rdx - xor eax,eax - DD 0x9066AAF3 - lea rdi,[((-16))+rdi] - mov eax,r10d - mov rsi,rdi - mov rcx,r11 - xor rdx,rdx - jmp NEAR $L$cbc_enc_loop - -ALIGN 16 -$L$cbc_decrypt: - cmp rdx,16 - jne NEAR $L$cbc_decrypt_bulk - - - - movdqu xmm2,XMMWORD[rdi] - movdqu xmm3,XMMWORD[r8] - movdqa xmm4,xmm2 - movups xmm0,XMMWORD[rcx] - movups xmm1,XMMWORD[16+rcx] - lea rcx,[32+rcx] - xorps xmm2,xmm0 -$L$oop_dec1_16: -DB 102,15,56,222,209 - dec r10d - movups xmm1,XMMWORD[rcx] - lea rcx,[16+rcx] - jnz NEAR $L$oop_dec1_16 -DB 102,15,56,223,209 - pxor xmm0,xmm0 - pxor xmm1,xmm1 - movdqu XMMWORD[r8],xmm4 - xorps xmm2,xmm3 - pxor xmm3,xmm3 - movups XMMWORD[rsi],xmm2 - pxor xmm2,xmm2 - jmp NEAR $L$cbc_ret -ALIGN 16 -$L$cbc_decrypt_bulk: - lea rax,[rsp] - push rbp - sub rsp,176 - and rsp,-16 - movaps XMMWORD[16+rsp],xmm6 - movaps XMMWORD[32+rsp],xmm7 - movaps XMMWORD[48+rsp],xmm8 - movaps XMMWORD[64+rsp],xmm9 - movaps XMMWORD[80+rsp],xmm10 - movaps XMMWORD[96+rsp],xmm11 - movaps XMMWORD[112+rsp],xmm12 - movaps XMMWORD[128+rsp],xmm13 - movaps XMMWORD[144+rsp],xmm14 - movaps XMMWORD[160+rsp],xmm15 -$L$cbc_decrypt_body: - lea rbp,[((-8))+rax] - movups xmm10,XMMWORD[r8] - mov eax,r10d - cmp rdx,0x50 - jbe NEAR $L$cbc_dec_tail - - movups xmm0,XMMWORD[rcx] - movdqu xmm2,XMMWORD[rdi] - movdqu xmm3,XMMWORD[16+rdi] - movdqa xmm11,xmm2 - movdqu xmm4,XMMWORD[32+rdi] - movdqa xmm12,xmm3 - movdqu xmm5,XMMWORD[48+rdi] - movdqa xmm13,xmm4 - movdqu xmm6,XMMWORD[64+rdi] - movdqa xmm14,xmm5 - movdqu xmm7,XMMWORD[80+rdi] - movdqa xmm15,xmm6 - mov r9d,DWORD[((OPENSSL_ia32cap_P+4))] - cmp rdx,0x70 - jbe NEAR $L$cbc_dec_six_or_seven - - and r9d,71303168 - sub rdx,0x50 - cmp r9d,4194304 - je NEAR $L$cbc_dec_loop6_enter - sub rdx,0x20 - lea rcx,[112+rcx] - jmp NEAR $L$cbc_dec_loop8_enter -ALIGN 16 -$L$cbc_dec_loop8: - movups XMMWORD[rsi],xmm9 - lea rsi,[16+rsi] -$L$cbc_dec_loop8_enter: - movdqu xmm8,XMMWORD[96+rdi] - pxor xmm2,xmm0 - movdqu xmm9,XMMWORD[112+rdi] - pxor xmm3,xmm0 - movups xmm1,XMMWORD[((16-112))+rcx] - pxor xmm4,xmm0 - xor r11,r11 - cmp rdx,0x70 - pxor xmm5,xmm0 - pxor xmm6,xmm0 - pxor xmm7,xmm0 - pxor xmm8,xmm0 - -DB 102,15,56,222,209 - pxor xmm9,xmm0 - movups xmm0,XMMWORD[((32-112))+rcx] -DB 102,15,56,222,217 -DB 102,15,56,222,225 -DB 102,15,56,222,233 -DB 102,15,56,222,241 -DB 102,15,56,222,249 -DB 102,68,15,56,222,193 - setnc r11b - shl r11,7 -DB 102,68,15,56,222,201 - add r11,rdi - movups xmm1,XMMWORD[((48-112))+rcx] -DB 102,15,56,222,208 -DB 102,15,56,222,216 -DB 102,15,56,222,224 -DB 102,15,56,222,232 -DB 102,15,56,222,240 -DB 102,15,56,222,248 -DB 102,68,15,56,222,192 -DB 102,68,15,56,222,200 - movups xmm0,XMMWORD[((64-112))+rcx] - nop -DB 102,15,56,222,209 -DB 102,15,56,222,217 -DB 102,15,56,222,225 -DB 102,15,56,222,233 -DB 102,15,56,222,241 -DB 102,15,56,222,249 -DB 102,68,15,56,222,193 -DB 102,68,15,56,222,201 - movups xmm1,XMMWORD[((80-112))+rcx] - nop -DB 102,15,56,222,208 -DB 102,15,56,222,216 -DB 102,15,56,222,224 -DB 102,15,56,222,232 -DB 102,15,56,222,240 -DB 102,15,56,222,248 -DB 102,68,15,56,222,192 -DB 102,68,15,56,222,200 - movups xmm0,XMMWORD[((96-112))+rcx] - nop -DB 102,15,56,222,209 -DB 102,15,56,222,217 -DB 102,15,56,222,225 -DB 102,15,56,222,233 -DB 102,15,56,222,241 -DB 102,15,56,222,249 -DB 102,68,15,56,222,193 -DB 102,68,15,56,222,201 - movups xmm1,XMMWORD[((112-112))+rcx] - nop -DB 102,15,56,222,208 -DB 102,15,56,222,216 -DB 102,15,56,222,224 -DB 102,15,56,222,232 -DB 102,15,56,222,240 -DB 102,15,56,222,248 -DB 102,68,15,56,222,192 -DB 102,68,15,56,222,200 - movups xmm0,XMMWORD[((128-112))+rcx] - nop -DB 102,15,56,222,209 -DB 102,15,56,222,217 -DB 102,15,56,222,225 -DB 102,15,56,222,233 -DB 102,15,56,222,241 -DB 102,15,56,222,249 -DB 102,68,15,56,222,193 -DB 102,68,15,56,222,201 - movups xmm1,XMMWORD[((144-112))+rcx] - cmp eax,11 -DB 102,15,56,222,208 -DB 102,15,56,222,216 -DB 102,15,56,222,224 -DB 102,15,56,222,232 -DB 102,15,56,222,240 -DB 102,15,56,222,248 -DB 102,68,15,56,222,192 -DB 102,68,15,56,222,200 - movups xmm0,XMMWORD[((160-112))+rcx] - jb NEAR $L$cbc_dec_done -DB 102,15,56,222,209 -DB 102,15,56,222,217 -DB 102,15,56,222,225 -DB 102,15,56,222,233 -DB 102,15,56,222,241 -DB 102,15,56,222,249 -DB 102,68,15,56,222,193 -DB 102,68,15,56,222,201 - movups xmm1,XMMWORD[((176-112))+rcx] - nop -DB 102,15,56,222,208 -DB 102,15,56,222,216 -DB 102,15,56,222,224 -DB 102,15,56,222,232 -DB 102,15,56,222,240 -DB 102,15,56,222,248 -DB 102,68,15,56,222,192 -DB 102,68,15,56,222,200 - movups xmm0,XMMWORD[((192-112))+rcx] - je NEAR $L$cbc_dec_done -DB 102,15,56,222,209 -DB 102,15,56,222,217 -DB 102,15,56,222,225 -DB 102,15,56,222,233 -DB 102,15,56,222,241 -DB 102,15,56,222,249 -DB 102,68,15,56,222,193 -DB 102,68,15,56,222,201 - movups xmm1,XMMWORD[((208-112))+rcx] - nop -DB 102,15,56,222,208 -DB 102,15,56,222,216 -DB 102,15,56,222,224 -DB 102,15,56,222,232 -DB 102,15,56,222,240 -DB 102,15,56,222,248 -DB 102,68,15,56,222,192 -DB 102,68,15,56,222,200 - movups xmm0,XMMWORD[((224-112))+rcx] - jmp NEAR $L$cbc_dec_done -ALIGN 16 -$L$cbc_dec_done: -DB 102,15,56,222,209 -DB 102,15,56,222,217 - pxor xmm10,xmm0 - pxor xmm11,xmm0 -DB 102,15,56,222,225 -DB 102,15,56,222,233 - pxor xmm12,xmm0 - pxor xmm13,xmm0 -DB 102,15,56,222,241 -DB 102,15,56,222,249 - pxor xmm14,xmm0 - pxor xmm15,xmm0 -DB 102,68,15,56,222,193 -DB 102,68,15,56,222,201 - movdqu xmm1,XMMWORD[80+rdi] - -DB 102,65,15,56,223,210 - movdqu xmm10,XMMWORD[96+rdi] - pxor xmm1,xmm0 -DB 102,65,15,56,223,219 - pxor xmm10,xmm0 - movdqu xmm0,XMMWORD[112+rdi] -DB 102,65,15,56,223,228 - lea rdi,[128+rdi] - movdqu xmm11,XMMWORD[r11] -DB 102,65,15,56,223,237 -DB 102,65,15,56,223,246 - movdqu xmm12,XMMWORD[16+r11] - movdqu xmm13,XMMWORD[32+r11] -DB 102,65,15,56,223,255 -DB 102,68,15,56,223,193 - movdqu xmm14,XMMWORD[48+r11] - movdqu xmm15,XMMWORD[64+r11] -DB 102,69,15,56,223,202 - movdqa xmm10,xmm0 - movdqu xmm1,XMMWORD[80+r11] - movups xmm0,XMMWORD[((-112))+rcx] - - movups XMMWORD[rsi],xmm2 - movdqa xmm2,xmm11 - movups XMMWORD[16+rsi],xmm3 - movdqa xmm3,xmm12 - movups XMMWORD[32+rsi],xmm4 - movdqa xmm4,xmm13 - movups XMMWORD[48+rsi],xmm5 - movdqa xmm5,xmm14 - movups XMMWORD[64+rsi],xmm6 - movdqa xmm6,xmm15 - movups XMMWORD[80+rsi],xmm7 - movdqa xmm7,xmm1 - movups XMMWORD[96+rsi],xmm8 - lea rsi,[112+rsi] - - sub rdx,0x80 - ja NEAR $L$cbc_dec_loop8 - - movaps xmm2,xmm9 - lea rcx,[((-112))+rcx] - add rdx,0x70 - jle NEAR $L$cbc_dec_clear_tail_collected - movups XMMWORD[rsi],xmm9 - lea rsi,[16+rsi] - cmp rdx,0x50 - jbe NEAR $L$cbc_dec_tail - - movaps xmm2,xmm11 -$L$cbc_dec_six_or_seven: - cmp rdx,0x60 - ja NEAR $L$cbc_dec_seven - - movaps xmm8,xmm7 - call _aesni_decrypt6 - pxor xmm2,xmm10 - movaps xmm10,xmm8 - pxor xmm3,xmm11 - movdqu XMMWORD[rsi],xmm2 - pxor xmm4,xmm12 - movdqu XMMWORD[16+rsi],xmm3 - pxor xmm3,xmm3 - pxor xmm5,xmm13 - movdqu XMMWORD[32+rsi],xmm4 - pxor xmm4,xmm4 - pxor xmm6,xmm14 - movdqu XMMWORD[48+rsi],xmm5 - pxor xmm5,xmm5 - pxor xmm7,xmm15 - movdqu XMMWORD[64+rsi],xmm6 - pxor xmm6,xmm6 - lea rsi,[80+rsi] - movdqa xmm2,xmm7 - pxor xmm7,xmm7 - jmp NEAR $L$cbc_dec_tail_collected - -ALIGN 16 -$L$cbc_dec_seven: - movups xmm8,XMMWORD[96+rdi] - xorps xmm9,xmm9 - call _aesni_decrypt8 - movups xmm9,XMMWORD[80+rdi] - pxor xmm2,xmm10 - movups xmm10,XMMWORD[96+rdi] - pxor xmm3,xmm11 - movdqu XMMWORD[rsi],xmm2 - pxor xmm4,xmm12 - movdqu XMMWORD[16+rsi],xmm3 - pxor xmm3,xmm3 - pxor xmm5,xmm13 - movdqu XMMWORD[32+rsi],xmm4 - pxor xmm4,xmm4 - pxor xmm6,xmm14 - movdqu XMMWORD[48+rsi],xmm5 - pxor xmm5,xmm5 - pxor xmm7,xmm15 - movdqu XMMWORD[64+rsi],xmm6 - pxor xmm6,xmm6 - pxor xmm8,xmm9 - movdqu XMMWORD[80+rsi],xmm7 - pxor xmm7,xmm7 - lea rsi,[96+rsi] - movdqa xmm2,xmm8 - pxor xmm8,xmm8 - pxor xmm9,xmm9 - jmp NEAR $L$cbc_dec_tail_collected - -ALIGN 16 -$L$cbc_dec_loop6: - movups XMMWORD[rsi],xmm7 - lea rsi,[16+rsi] - movdqu xmm2,XMMWORD[rdi] - movdqu xmm3,XMMWORD[16+rdi] - movdqa xmm11,xmm2 - movdqu xmm4,XMMWORD[32+rdi] - movdqa xmm12,xmm3 - movdqu xmm5,XMMWORD[48+rdi] - movdqa xmm13,xmm4 - movdqu xmm6,XMMWORD[64+rdi] - movdqa xmm14,xmm5 - movdqu xmm7,XMMWORD[80+rdi] - movdqa xmm15,xmm6 -$L$cbc_dec_loop6_enter: - lea rdi,[96+rdi] - movdqa xmm8,xmm7 - - call _aesni_decrypt6 - - pxor xmm2,xmm10 - movdqa xmm10,xmm8 - pxor xmm3,xmm11 - movdqu XMMWORD[rsi],xmm2 - pxor xmm4,xmm12 - movdqu XMMWORD[16+rsi],xmm3 - pxor xmm5,xmm13 - movdqu XMMWORD[32+rsi],xmm4 - pxor xmm6,xmm14 - mov rcx,r11 - movdqu XMMWORD[48+rsi],xmm5 - pxor xmm7,xmm15 - mov eax,r10d - movdqu XMMWORD[64+rsi],xmm6 - lea rsi,[80+rsi] - sub rdx,0x60 - ja NEAR $L$cbc_dec_loop6 - - movdqa xmm2,xmm7 - add rdx,0x50 - jle NEAR $L$cbc_dec_clear_tail_collected - movups XMMWORD[rsi],xmm7 - lea rsi,[16+rsi] - -$L$cbc_dec_tail: - movups xmm2,XMMWORD[rdi] - sub rdx,0x10 - jbe NEAR $L$cbc_dec_one - - movups xmm3,XMMWORD[16+rdi] - movaps xmm11,xmm2 - sub rdx,0x10 - jbe NEAR $L$cbc_dec_two - - movups xmm4,XMMWORD[32+rdi] - movaps xmm12,xmm3 - sub rdx,0x10 - jbe NEAR $L$cbc_dec_three - - movups xmm5,XMMWORD[48+rdi] - movaps xmm13,xmm4 - sub rdx,0x10 - jbe NEAR $L$cbc_dec_four - - movups xmm6,XMMWORD[64+rdi] - movaps xmm14,xmm5 - movaps xmm15,xmm6 - xorps xmm7,xmm7 - call _aesni_decrypt6 - pxor xmm2,xmm10 - movaps xmm10,xmm15 - pxor xmm3,xmm11 - movdqu XMMWORD[rsi],xmm2 - pxor xmm4,xmm12 - movdqu XMMWORD[16+rsi],xmm3 - pxor xmm3,xmm3 - pxor xmm5,xmm13 - movdqu XMMWORD[32+rsi],xmm4 - pxor xmm4,xmm4 - pxor xmm6,xmm14 - movdqu XMMWORD[48+rsi],xmm5 - pxor xmm5,xmm5 - lea rsi,[64+rsi] - movdqa xmm2,xmm6 - pxor xmm6,xmm6 - pxor xmm7,xmm7 - sub rdx,0x10 - jmp NEAR $L$cbc_dec_tail_collected - -ALIGN 16 -$L$cbc_dec_one: - movaps xmm11,xmm2 - movups xmm0,XMMWORD[rcx] - movups xmm1,XMMWORD[16+rcx] - lea rcx,[32+rcx] - xorps xmm2,xmm0 -$L$oop_dec1_17: -DB 102,15,56,222,209 - dec eax - movups xmm1,XMMWORD[rcx] - lea rcx,[16+rcx] - jnz NEAR $L$oop_dec1_17 -DB 102,15,56,223,209 - xorps xmm2,xmm10 - movaps xmm10,xmm11 - jmp NEAR $L$cbc_dec_tail_collected -ALIGN 16 -$L$cbc_dec_two: - movaps xmm12,xmm3 - call _aesni_decrypt2 - pxor xmm2,xmm10 - movaps xmm10,xmm12 - pxor xmm3,xmm11 - movdqu XMMWORD[rsi],xmm2 - movdqa xmm2,xmm3 - pxor xmm3,xmm3 - lea rsi,[16+rsi] - jmp NEAR $L$cbc_dec_tail_collected -ALIGN 16 -$L$cbc_dec_three: - movaps xmm13,xmm4 - call _aesni_decrypt3 - pxor xmm2,xmm10 - movaps xmm10,xmm13 - pxor xmm3,xmm11 - movdqu XMMWORD[rsi],xmm2 - pxor xmm4,xmm12 - movdqu XMMWORD[16+rsi],xmm3 - pxor xmm3,xmm3 - movdqa xmm2,xmm4 - pxor xmm4,xmm4 - lea rsi,[32+rsi] - jmp NEAR $L$cbc_dec_tail_collected -ALIGN 16 -$L$cbc_dec_four: - movaps xmm14,xmm5 - call _aesni_decrypt4 - pxor xmm2,xmm10 - movaps xmm10,xmm14 - pxor xmm3,xmm11 - movdqu XMMWORD[rsi],xmm2 - pxor xmm4,xmm12 - movdqu XMMWORD[16+rsi],xmm3 - pxor xmm3,xmm3 - pxor xmm5,xmm13 - movdqu XMMWORD[32+rsi],xmm4 - pxor xmm4,xmm4 - movdqa xmm2,xmm5 - pxor xmm5,xmm5 - lea rsi,[48+rsi] - jmp NEAR $L$cbc_dec_tail_collected - -ALIGN 16 -$L$cbc_dec_clear_tail_collected: - pxor xmm3,xmm3 - pxor xmm4,xmm4 - pxor xmm5,xmm5 -$L$cbc_dec_tail_collected: - movups XMMWORD[r8],xmm10 - and rdx,15 - jnz NEAR $L$cbc_dec_tail_partial - movups XMMWORD[rsi],xmm2 - pxor xmm2,xmm2 - jmp NEAR $L$cbc_dec_ret -ALIGN 16 -$L$cbc_dec_tail_partial: - movaps XMMWORD[rsp],xmm2 - pxor xmm2,xmm2 - mov rcx,16 - mov rdi,rsi - sub rcx,rdx - lea rsi,[rsp] - DD 0x9066A4F3 - movdqa XMMWORD[rsp],xmm2 - -$L$cbc_dec_ret: - xorps xmm0,xmm0 - pxor xmm1,xmm1 - movaps xmm6,XMMWORD[16+rsp] - movaps XMMWORD[16+rsp],xmm0 - movaps xmm7,XMMWORD[32+rsp] - movaps XMMWORD[32+rsp],xmm0 - movaps xmm8,XMMWORD[48+rsp] - movaps XMMWORD[48+rsp],xmm0 - movaps xmm9,XMMWORD[64+rsp] - movaps XMMWORD[64+rsp],xmm0 - movaps xmm10,XMMWORD[80+rsp] - movaps XMMWORD[80+rsp],xmm0 - movaps xmm11,XMMWORD[96+rsp] - movaps XMMWORD[96+rsp],xmm0 - movaps xmm12,XMMWORD[112+rsp] - movaps XMMWORD[112+rsp],xmm0 - movaps xmm13,XMMWORD[128+rsp] - movaps XMMWORD[128+rsp],xmm0 - movaps xmm14,XMMWORD[144+rsp] - movaps XMMWORD[144+rsp],xmm0 - movaps xmm15,XMMWORD[160+rsp] - movaps XMMWORD[160+rsp],xmm0 - lea rsp,[rbp] - pop rbp -$L$cbc_ret: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_aesni_cbc_encrypt: -global aesni_set_decrypt_key - -ALIGN 16 -aesni_set_decrypt_key: -DB 0x48,0x83,0xEC,0x08 - call __aesni_set_encrypt_key - shl edx,4 - test eax,eax - jnz NEAR $L$dec_key_ret - lea rcx,[16+rdx*1+r8] - - movups xmm0,XMMWORD[r8] - movups xmm1,XMMWORD[rcx] - movups XMMWORD[rcx],xmm0 - movups XMMWORD[r8],xmm1 - lea r8,[16+r8] - lea rcx,[((-16))+rcx] - -$L$dec_key_inverse: - movups xmm0,XMMWORD[r8] - movups xmm1,XMMWORD[rcx] -DB 102,15,56,219,192 -DB 102,15,56,219,201 - lea r8,[16+r8] - lea rcx,[((-16))+rcx] - movups XMMWORD[16+rcx],xmm0 - movups XMMWORD[(-16)+r8],xmm1 - cmp rcx,r8 - ja NEAR $L$dec_key_inverse - - movups xmm0,XMMWORD[r8] -DB 102,15,56,219,192 - pxor xmm1,xmm1 - movups XMMWORD[rcx],xmm0 - pxor xmm0,xmm0 -$L$dec_key_ret: - add rsp,8 - DB 0F3h,0C3h ;repret -$L$SEH_end_set_decrypt_key: - -global aesni_set_encrypt_key - -ALIGN 16 -aesni_set_encrypt_key: -__aesni_set_encrypt_key: -DB 0x48,0x83,0xEC,0x08 - mov rax,-1 - test rcx,rcx - jz NEAR $L$enc_key_ret - test r8,r8 - jz NEAR $L$enc_key_ret - - mov r10d,268437504 - movups xmm0,XMMWORD[rcx] - xorps xmm4,xmm4 - and r10d,DWORD[((OPENSSL_ia32cap_P+4))] - lea rax,[16+r8] - cmp edx,256 - je NEAR $L$14rounds - cmp edx,192 - je NEAR $L$12rounds - cmp edx,128 - jne NEAR $L$bad_keybits - -$L$10rounds: - mov edx,9 - cmp r10d,268435456 - je NEAR $L$10rounds_alt - - movups XMMWORD[r8],xmm0 -DB 102,15,58,223,200,1 - call $L$key_expansion_128_cold -DB 102,15,58,223,200,2 - call $L$key_expansion_128 -DB 102,15,58,223,200,4 - call $L$key_expansion_128 -DB 102,15,58,223,200,8 - call $L$key_expansion_128 -DB 102,15,58,223,200,16 - call $L$key_expansion_128 -DB 102,15,58,223,200,32 - call $L$key_expansion_128 -DB 102,15,58,223,200,64 - call $L$key_expansion_128 -DB 102,15,58,223,200,128 - call $L$key_expansion_128 -DB 102,15,58,223,200,27 - call $L$key_expansion_128 -DB 102,15,58,223,200,54 - call $L$key_expansion_128 - movups XMMWORD[rax],xmm0 - mov DWORD[80+rax],edx - xor eax,eax - jmp NEAR $L$enc_key_ret - -ALIGN 16 -$L$10rounds_alt: - movdqa xmm5,XMMWORD[$L$key_rotate] - mov r10d,8 - movdqa xmm4,XMMWORD[$L$key_rcon1] - movdqa xmm2,xmm0 - movdqu XMMWORD[r8],xmm0 - jmp NEAR $L$oop_key128 - -ALIGN 16 -$L$oop_key128: -DB 102,15,56,0,197 -DB 102,15,56,221,196 - pslld xmm4,1 - lea rax,[16+rax] - - movdqa xmm3,xmm2 - pslldq xmm2,4 - pxor xmm3,xmm2 - pslldq xmm2,4 - pxor xmm3,xmm2 - pslldq xmm2,4 - pxor xmm2,xmm3 - - pxor xmm0,xmm2 - movdqu XMMWORD[(-16)+rax],xmm0 - movdqa xmm2,xmm0 - - dec r10d - jnz NEAR $L$oop_key128 - - movdqa xmm4,XMMWORD[$L$key_rcon1b] - -DB 102,15,56,0,197 -DB 102,15,56,221,196 - pslld xmm4,1 - - movdqa xmm3,xmm2 - pslldq xmm2,4 - pxor xmm3,xmm2 - pslldq xmm2,4 - pxor xmm3,xmm2 - pslldq xmm2,4 - pxor xmm2,xmm3 - - pxor xmm0,xmm2 - movdqu XMMWORD[rax],xmm0 - - movdqa xmm2,xmm0 -DB 102,15,56,0,197 -DB 102,15,56,221,196 - - movdqa xmm3,xmm2 - pslldq xmm2,4 - pxor xmm3,xmm2 - pslldq xmm2,4 - pxor xmm3,xmm2 - pslldq xmm2,4 - pxor xmm2,xmm3 - - pxor xmm0,xmm2 - movdqu XMMWORD[16+rax],xmm0 - - mov DWORD[96+rax],edx - xor eax,eax - jmp NEAR $L$enc_key_ret - -ALIGN 16 -$L$12rounds: - movq xmm2,QWORD[16+rcx] - mov edx,11 - cmp r10d,268435456 - je NEAR $L$12rounds_alt - - movups XMMWORD[r8],xmm0 -DB 102,15,58,223,202,1 - call $L$key_expansion_192a_cold -DB 102,15,58,223,202,2 - call $L$key_expansion_192b -DB 102,15,58,223,202,4 - call $L$key_expansion_192a -DB 102,15,58,223,202,8 - call $L$key_expansion_192b -DB 102,15,58,223,202,16 - call $L$key_expansion_192a -DB 102,15,58,223,202,32 - call $L$key_expansion_192b -DB 102,15,58,223,202,64 - call $L$key_expansion_192a -DB 102,15,58,223,202,128 - call $L$key_expansion_192b - movups XMMWORD[rax],xmm0 - mov DWORD[48+rax],edx - xor rax,rax - jmp NEAR $L$enc_key_ret - -ALIGN 16 -$L$12rounds_alt: - movdqa xmm5,XMMWORD[$L$key_rotate192] - movdqa xmm4,XMMWORD[$L$key_rcon1] - mov r10d,8 - movdqu XMMWORD[r8],xmm0 - jmp NEAR $L$oop_key192 - -ALIGN 16 -$L$oop_key192: - movq QWORD[rax],xmm2 - movdqa xmm1,xmm2 -DB 102,15,56,0,213 -DB 102,15,56,221,212 - pslld xmm4,1 - lea rax,[24+rax] - - movdqa xmm3,xmm0 - pslldq xmm0,4 - pxor xmm3,xmm0 - pslldq xmm0,4 - pxor xmm3,xmm0 - pslldq xmm0,4 - pxor xmm0,xmm3 - - pshufd xmm3,xmm0,0xff - pxor xmm3,xmm1 - pslldq xmm1,4 - pxor xmm3,xmm1 - - pxor xmm0,xmm2 - pxor xmm2,xmm3 - movdqu XMMWORD[(-16)+rax],xmm0 - - dec r10d - jnz NEAR $L$oop_key192 - - mov DWORD[32+rax],edx - xor eax,eax - jmp NEAR $L$enc_key_ret - -ALIGN 16 -$L$14rounds: - movups xmm2,XMMWORD[16+rcx] - mov edx,13 - lea rax,[16+rax] - cmp r10d,268435456 - je NEAR $L$14rounds_alt - - movups XMMWORD[r8],xmm0 - movups XMMWORD[16+r8],xmm2 -DB 102,15,58,223,202,1 - call $L$key_expansion_256a_cold -DB 102,15,58,223,200,1 - call $L$key_expansion_256b -DB 102,15,58,223,202,2 - call $L$key_expansion_256a -DB 102,15,58,223,200,2 - call $L$key_expansion_256b -DB 102,15,58,223,202,4 - call $L$key_expansion_256a -DB 102,15,58,223,200,4 - call $L$key_expansion_256b -DB 102,15,58,223,202,8 - call $L$key_expansion_256a -DB 102,15,58,223,200,8 - call $L$key_expansion_256b -DB 102,15,58,223,202,16 - call $L$key_expansion_256a -DB 102,15,58,223,200,16 - call $L$key_expansion_256b -DB 102,15,58,223,202,32 - call $L$key_expansion_256a -DB 102,15,58,223,200,32 - call $L$key_expansion_256b -DB 102,15,58,223,202,64 - call $L$key_expansion_256a - movups XMMWORD[rax],xmm0 - mov DWORD[16+rax],edx - xor rax,rax - jmp NEAR $L$enc_key_ret - -ALIGN 16 -$L$14rounds_alt: - movdqa xmm5,XMMWORD[$L$key_rotate] - movdqa xmm4,XMMWORD[$L$key_rcon1] - mov r10d,7 - movdqu XMMWORD[r8],xmm0 - movdqa xmm1,xmm2 - movdqu XMMWORD[16+r8],xmm2 - jmp NEAR $L$oop_key256 - -ALIGN 16 -$L$oop_key256: -DB 102,15,56,0,213 -DB 102,15,56,221,212 - - movdqa xmm3,xmm0 - pslldq xmm0,4 - pxor xmm3,xmm0 - pslldq xmm0,4 - pxor xmm3,xmm0 - pslldq xmm0,4 - pxor xmm0,xmm3 - pslld xmm4,1 - - pxor xmm0,xmm2 - movdqu XMMWORD[rax],xmm0 - - dec r10d - jz NEAR $L$done_key256 - - pshufd xmm2,xmm0,0xff - pxor xmm3,xmm3 -DB 102,15,56,221,211 - - movdqa xmm3,xmm1 - pslldq xmm1,4 - pxor xmm3,xmm1 - pslldq xmm1,4 - pxor xmm3,xmm1 - pslldq xmm1,4 - pxor xmm1,xmm3 - - pxor xmm2,xmm1 - movdqu XMMWORD[16+rax],xmm2 - lea rax,[32+rax] - movdqa xmm1,xmm2 - - jmp NEAR $L$oop_key256 - -$L$done_key256: - mov DWORD[16+rax],edx - xor eax,eax - jmp NEAR $L$enc_key_ret - -ALIGN 16 -$L$bad_keybits: - mov rax,-2 -$L$enc_key_ret: - pxor xmm0,xmm0 - pxor xmm1,xmm1 - pxor xmm2,xmm2 - pxor xmm3,xmm3 - pxor xmm4,xmm4 - pxor xmm5,xmm5 - add rsp,8 - DB 0F3h,0C3h ;repret -$L$SEH_end_set_encrypt_key: - -ALIGN 16 -$L$key_expansion_128: - movups XMMWORD[rax],xmm0 - lea rax,[16+rax] -$L$key_expansion_128_cold: - shufps xmm4,xmm0,16 - xorps xmm0,xmm4 - shufps xmm4,xmm0,140 - xorps xmm0,xmm4 - shufps xmm1,xmm1,255 - xorps xmm0,xmm1 - DB 0F3h,0C3h ;repret - -ALIGN 16 -$L$key_expansion_192a: - movups XMMWORD[rax],xmm0 - lea rax,[16+rax] -$L$key_expansion_192a_cold: - movaps xmm5,xmm2 -$L$key_expansion_192b_warm: - shufps xmm4,xmm0,16 - movdqa xmm3,xmm2 - xorps xmm0,xmm4 - shufps xmm4,xmm0,140 - pslldq xmm3,4 - xorps xmm0,xmm4 - pshufd xmm1,xmm1,85 - pxor xmm2,xmm3 - pxor xmm0,xmm1 - pshufd xmm3,xmm0,255 - pxor xmm2,xmm3 - DB 0F3h,0C3h ;repret - -ALIGN 16 -$L$key_expansion_192b: - movaps xmm3,xmm0 - shufps xmm5,xmm0,68 - movups XMMWORD[rax],xmm5 - shufps xmm3,xmm2,78 - movups XMMWORD[16+rax],xmm3 - lea rax,[32+rax] - jmp NEAR $L$key_expansion_192b_warm - -ALIGN 16 -$L$key_expansion_256a: - movups XMMWORD[rax],xmm2 - lea rax,[16+rax] -$L$key_expansion_256a_cold: - shufps xmm4,xmm0,16 - xorps xmm0,xmm4 - shufps xmm4,xmm0,140 - xorps xmm0,xmm4 - shufps xmm1,xmm1,255 - xorps xmm0,xmm1 - DB 0F3h,0C3h ;repret - -ALIGN 16 -$L$key_expansion_256b: - movups XMMWORD[rax],xmm0 - lea rax,[16+rax] - - shufps xmm4,xmm2,16 - xorps xmm2,xmm4 - shufps xmm4,xmm2,140 - xorps xmm2,xmm4 - shufps xmm1,xmm1,170 - xorps xmm2,xmm1 - DB 0F3h,0C3h ;repret - - -ALIGN 64 -$L$bswap_mask: -DB 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -$L$increment32: - DD 6,6,6,0 -$L$increment64: - DD 1,0,0,0 -$L$xts_magic: - DD 0x87,0,1,0 -$L$increment1: -DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 -$L$key_rotate: - DD 0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d -$L$key_rotate192: - DD 0x04070605,0x04070605,0x04070605,0x04070605 -$L$key_rcon1: - DD 1,1,1,1 -$L$key_rcon1b: - DD 0x1b,0x1b,0x1b,0x1b - -DB 65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69 -DB 83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83 -DB 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115 -DB 115,108,46,111,114,103,62,0 -ALIGN 64 -EXTERN __imp_RtlVirtualUnwind - -ALIGN 16 -ecb_ccm64_se_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - mov rsi,QWORD[8+r9] - mov r11,QWORD[56+r9] - - mov r10d,DWORD[r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jb NEAR $L$common_seh_tail - - mov rax,QWORD[152+r8] - - mov r10d,DWORD[4+r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jae NEAR $L$common_seh_tail - - lea rsi,[rax] - lea rdi,[512+r8] - mov ecx,8 - DD 0xa548f3fc - lea rax,[88+rax] - - jmp NEAR $L$common_seh_tail - - - -ALIGN 16 -ctr_xts_se_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - mov rsi,QWORD[8+r9] - mov r11,QWORD[56+r9] - - mov r10d,DWORD[r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jb NEAR $L$common_seh_tail - - mov rax,QWORD[152+r8] - - mov r10d,DWORD[4+r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jae NEAR $L$common_seh_tail - - mov rax,QWORD[160+r8] - lea rsi,[((-160))+rax] - lea rdi,[512+r8] - mov ecx,20 - DD 0xa548f3fc - - jmp NEAR $L$common_rbp_tail - - -ALIGN 16 -cbc_se_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[152+r8] - mov rbx,QWORD[248+r8] - - lea r10,[$L$cbc_decrypt_bulk] - cmp rbx,r10 - jb NEAR $L$common_seh_tail - - lea r10,[$L$cbc_decrypt_body] - cmp rbx,r10 - jb NEAR $L$restore_cbc_rax - - lea r10,[$L$cbc_ret] - cmp rbx,r10 - jae NEAR $L$common_seh_tail - - lea rsi,[16+rax] - lea rdi,[512+r8] - mov ecx,20 - DD 0xa548f3fc - -$L$common_rbp_tail: - mov rax,QWORD[160+r8] - mov rbp,QWORD[rax] - lea rax,[8+rax] - mov QWORD[160+r8],rbp - jmp NEAR $L$common_seh_tail - -$L$restore_cbc_rax: - mov rax,QWORD[120+r8] - -$L$common_seh_tail: - mov rdi,QWORD[8+rax] - mov rsi,QWORD[16+rax] - mov QWORD[152+r8],rax - mov QWORD[168+r8],rsi - mov QWORD[176+r8],rdi - - mov rdi,QWORD[40+r9] - mov rsi,r8 - mov ecx,154 - DD 0xa548f3fc - - mov rsi,r9 - xor rcx,rcx - mov rdx,QWORD[8+rsi] - mov r8,QWORD[rsi] - mov r9,QWORD[16+rsi] - mov r10,QWORD[40+rsi] - lea r11,[56+rsi] - lea r12,[24+rsi] - mov QWORD[32+rsp],r10 - mov QWORD[40+rsp],r11 - mov QWORD[48+rsp],r12 - mov QWORD[56+rsp],rcx - call QWORD[__imp_RtlVirtualUnwind] - - mov eax,1 - add rsp,64 - popfq - pop r15 - pop r14 - pop r13 - pop r12 - pop rbp - pop rbx - pop rdi - pop rsi - DB 0F3h,0C3h ;repret - - -section .pdata rdata align=4 -ALIGN 4 - DD $L$SEH_begin_aesni_ecb_encrypt wrt ..imagebase - DD $L$SEH_end_aesni_ecb_encrypt wrt ..imagebase - DD $L$SEH_info_ecb wrt ..imagebase - - DD $L$SEH_begin_aesni_ccm64_encrypt_blocks wrt ..imagebase - DD $L$SEH_end_aesni_ccm64_encrypt_blocks wrt ..imagebase - DD $L$SEH_info_ccm64_enc wrt ..imagebase - - DD $L$SEH_begin_aesni_ccm64_decrypt_blocks wrt ..imagebase - DD $L$SEH_end_aesni_ccm64_decrypt_blocks wrt ..imagebase - DD $L$SEH_info_ccm64_dec wrt ..imagebase - - DD $L$SEH_begin_aesni_ctr32_encrypt_blocks wrt ..imagebase - DD $L$SEH_end_aesni_ctr32_encrypt_blocks wrt ..imagebase - DD $L$SEH_info_ctr32 wrt ..imagebase - - DD $L$SEH_begin_aesni_xts_encrypt wrt ..imagebase - DD $L$SEH_end_aesni_xts_encrypt wrt ..imagebase - DD $L$SEH_info_xts_enc wrt ..imagebase - - DD $L$SEH_begin_aesni_xts_decrypt wrt ..imagebase - DD $L$SEH_end_aesni_xts_decrypt wrt ..imagebase - DD $L$SEH_info_xts_dec wrt ..imagebase - DD $L$SEH_begin_aesni_cbc_encrypt wrt ..imagebase - DD $L$SEH_end_aesni_cbc_encrypt wrt ..imagebase - DD $L$SEH_info_cbc wrt ..imagebase - - DD aesni_set_decrypt_key wrt ..imagebase - DD $L$SEH_end_set_decrypt_key wrt ..imagebase - DD $L$SEH_info_key wrt ..imagebase - - DD aesni_set_encrypt_key wrt ..imagebase - DD $L$SEH_end_set_encrypt_key wrt ..imagebase - DD $L$SEH_info_key wrt ..imagebase -section .xdata rdata align=8 -ALIGN 8 -$L$SEH_info_ecb: -DB 9,0,0,0 - DD ecb_ccm64_se_handler wrt ..imagebase - DD $L$ecb_enc_body wrt ..imagebase,$L$ecb_enc_ret wrt ..imagebase -$L$SEH_info_ccm64_enc: -DB 9,0,0,0 - DD ecb_ccm64_se_handler wrt ..imagebase - DD $L$ccm64_enc_body wrt ..imagebase,$L$ccm64_enc_ret wrt ..imagebase -$L$SEH_info_ccm64_dec: -DB 9,0,0,0 - DD ecb_ccm64_se_handler wrt ..imagebase - DD $L$ccm64_dec_body wrt ..imagebase,$L$ccm64_dec_ret wrt ..imagebase -$L$SEH_info_ctr32: -DB 9,0,0,0 - DD ctr_xts_se_handler wrt ..imagebase - DD $L$ctr32_body wrt ..imagebase,$L$ctr32_epilogue wrt ..imagebase -$L$SEH_info_xts_enc: -DB 9,0,0,0 - DD ctr_xts_se_handler wrt ..imagebase - DD $L$xts_enc_body wrt ..imagebase,$L$xts_enc_epilogue wrt ..imagebase -$L$SEH_info_xts_dec: -DB 9,0,0,0 - DD ctr_xts_se_handler wrt ..imagebase - DD $L$xts_dec_body wrt ..imagebase,$L$xts_dec_epilogue wrt ..imagebase -$L$SEH_info_cbc: -DB 9,0,0,0 - DD cbc_se_handler wrt ..imagebase -$L$SEH_info_key: -DB 0x01,0x04,0x01,0x00 -DB 0x04,0x02,0x00,0x00 diff --git a/third_party/boringssl/win-x86_64/crypto/aes/bsaes-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/aes/bsaes-x86_64.asm deleted file mode 100644 index 6d75248d1f24b..0000000000000 --- a/third_party/boringssl/win-x86_64/crypto/aes/bsaes-x86_64.asm +++ /dev/null @@ -1,2733 +0,0 @@ -default rel -%define XMMWORD -%define YMMWORD -%define ZMMWORD -section .text code align=64 - - -EXTERN asm_AES_encrypt -EXTERN asm_AES_decrypt - - -ALIGN 64 -_bsaes_encrypt8: - lea r11,[$L$BS0] - - movdqa xmm8,XMMWORD[rax] - lea rax,[16+rax] - movdqa xmm7,XMMWORD[80+r11] - pxor xmm15,xmm8 - pxor xmm0,xmm8 - pxor xmm1,xmm8 - pxor xmm2,xmm8 -DB 102,68,15,56,0,255 -DB 102,15,56,0,199 - pxor xmm3,xmm8 - pxor xmm4,xmm8 -DB 102,15,56,0,207 -DB 102,15,56,0,215 - pxor xmm5,xmm8 - pxor xmm6,xmm8 -DB 102,15,56,0,223 -DB 102,15,56,0,231 -DB 102,15,56,0,239 -DB 102,15,56,0,247 -_bsaes_encrypt8_bitslice: - movdqa xmm7,XMMWORD[r11] - movdqa xmm8,XMMWORD[16+r11] - movdqa xmm9,xmm5 - psrlq xmm5,1 - movdqa xmm10,xmm3 - psrlq xmm3,1 - pxor xmm5,xmm6 - pxor xmm3,xmm4 - pand xmm5,xmm7 - pand xmm3,xmm7 - pxor xmm6,xmm5 - psllq xmm5,1 - pxor xmm4,xmm3 - psllq xmm3,1 - pxor xmm5,xmm9 - pxor xmm3,xmm10 - movdqa xmm9,xmm1 - psrlq xmm1,1 - movdqa xmm10,xmm15 - psrlq xmm15,1 - pxor xmm1,xmm2 - pxor xmm15,xmm0 - pand xmm1,xmm7 - pand xmm15,xmm7 - pxor xmm2,xmm1 - psllq xmm1,1 - pxor xmm0,xmm15 - psllq xmm15,1 - pxor xmm1,xmm9 - pxor xmm15,xmm10 - movdqa xmm7,XMMWORD[32+r11] - movdqa xmm9,xmm4 - psrlq xmm4,2 - movdqa xmm10,xmm3 - psrlq xmm3,2 - pxor xmm4,xmm6 - pxor xmm3,xmm5 - pand xmm4,xmm8 - pand xmm3,xmm8 - pxor xmm6,xmm4 - psllq xmm4,2 - pxor xmm5,xmm3 - psllq xmm3,2 - pxor xmm4,xmm9 - pxor xmm3,xmm10 - movdqa xmm9,xmm0 - psrlq xmm0,2 - movdqa xmm10,xmm15 - psrlq xmm15,2 - pxor xmm0,xmm2 - pxor xmm15,xmm1 - pand xmm0,xmm8 - pand xmm15,xmm8 - pxor xmm2,xmm0 - psllq xmm0,2 - pxor xmm1,xmm15 - psllq xmm15,2 - pxor xmm0,xmm9 - pxor xmm15,xmm10 - movdqa xmm9,xmm2 - psrlq xmm2,4 - movdqa xmm10,xmm1 - psrlq xmm1,4 - pxor xmm2,xmm6 - pxor xmm1,xmm5 - pand xmm2,xmm7 - pand xmm1,xmm7 - pxor xmm6,xmm2 - psllq xmm2,4 - pxor xmm5,xmm1 - psllq xmm1,4 - pxor xmm2,xmm9 - pxor xmm1,xmm10 - movdqa xmm9,xmm0 - psrlq xmm0,4 - movdqa xmm10,xmm15 - psrlq xmm15,4 - pxor xmm0,xmm4 - pxor xmm15,xmm3 - pand xmm0,xmm7 - pand xmm15,xmm7 - pxor xmm4,xmm0 - psllq xmm0,4 - pxor xmm3,xmm15 - psllq xmm15,4 - pxor xmm0,xmm9 - pxor xmm15,xmm10 - dec r10d - jmp NEAR $L$enc_sbox -ALIGN 16 -$L$enc_loop: - pxor xmm15,XMMWORD[rax] - pxor xmm0,XMMWORD[16+rax] - pxor xmm1,XMMWORD[32+rax] - pxor xmm2,XMMWORD[48+rax] -DB 102,68,15,56,0,255 -DB 102,15,56,0,199 - pxor xmm3,XMMWORD[64+rax] - pxor xmm4,XMMWORD[80+rax] -DB 102,15,56,0,207 -DB 102,15,56,0,215 - pxor xmm5,XMMWORD[96+rax] - pxor xmm6,XMMWORD[112+rax] -DB 102,15,56,0,223 -DB 102,15,56,0,231 -DB 102,15,56,0,239 -DB 102,15,56,0,247 - lea rax,[128+rax] -$L$enc_sbox: - pxor xmm4,xmm5 - pxor xmm1,xmm0 - pxor xmm2,xmm15 - pxor xmm5,xmm1 - pxor xmm4,xmm15 - - pxor xmm5,xmm2 - pxor xmm2,xmm6 - pxor xmm6,xmm4 - pxor xmm2,xmm3 - pxor xmm3,xmm4 - pxor xmm2,xmm0 - - pxor xmm1,xmm6 - pxor xmm0,xmm4 - movdqa xmm10,xmm6 - movdqa xmm9,xmm0 - movdqa xmm8,xmm4 - movdqa xmm12,xmm1 - movdqa xmm11,xmm5 - - pxor xmm10,xmm3 - pxor xmm9,xmm1 - pxor xmm8,xmm2 - movdqa xmm13,xmm10 - pxor xmm12,xmm3 - movdqa xmm7,xmm9 - pxor xmm11,xmm15 - movdqa xmm14,xmm10 - - por xmm9,xmm8 - por xmm10,xmm11 - pxor xmm14,xmm7 - pand xmm13,xmm11 - pxor xmm11,xmm8 - pand xmm7,xmm8 - pand xmm14,xmm11 - movdqa xmm11,xmm2 - pxor xmm11,xmm15 - pand xmm12,xmm11 - pxor xmm10,xmm12 - pxor xmm9,xmm12 - movdqa xmm12,xmm6 - movdqa xmm11,xmm4 - pxor xmm12,xmm0 - pxor xmm11,xmm5 - movdqa xmm8,xmm12 - pand xmm12,xmm11 - por xmm8,xmm11 - pxor xmm7,xmm12 - pxor xmm10,xmm14 - pxor xmm9,xmm13 - pxor xmm8,xmm14 - movdqa xmm11,xmm1 - pxor xmm7,xmm13 - movdqa xmm12,xmm3 - pxor xmm8,xmm13 - movdqa xmm13,xmm0 - pand xmm11,xmm2 - movdqa xmm14,xmm6 - pand xmm12,xmm15 - pand xmm13,xmm4 - por xmm14,xmm5 - pxor xmm10,xmm11 - pxor xmm9,xmm12 - pxor xmm8,xmm13 - pxor xmm7,xmm14 - - - - - - movdqa xmm11,xmm10 - pand xmm10,xmm8 - pxor xmm11,xmm9 - - movdqa xmm13,xmm7 - movdqa xmm14,xmm11 - pxor xmm13,xmm10 - pand xmm14,xmm13 - - movdqa xmm12,xmm8 - pxor xmm14,xmm9 - pxor xmm12,xmm7 - - pxor xmm10,xmm9 - - pand xmm12,xmm10 - - movdqa xmm9,xmm13 - pxor xmm12,xmm7 - - pxor xmm9,xmm12 - pxor xmm8,xmm12 - - pand xmm9,xmm7 - - pxor xmm13,xmm9 - pxor xmm8,xmm9 - - pand xmm13,xmm14 - - pxor xmm13,xmm11 - movdqa xmm11,xmm5 - movdqa xmm7,xmm4 - movdqa xmm9,xmm14 - pxor xmm9,xmm13 - pand xmm9,xmm5 - pxor xmm5,xmm4 - pand xmm4,xmm14 - pand xmm5,xmm13 - pxor xmm5,xmm4 - pxor xmm4,xmm9 - pxor xmm11,xmm15 - pxor xmm7,xmm2 - pxor xmm14,xmm12 - pxor xmm13,xmm8 - movdqa xmm10,xmm14 - movdqa xmm9,xmm12 - pxor xmm10,xmm13 - pxor xmm9,xmm8 - pand xmm10,xmm11 - pand xmm9,xmm15 - pxor xmm11,xmm7 - pxor xmm15,xmm2 - pand xmm7,xmm14 - pand xmm2,xmm12 - pand xmm11,xmm13 - pand xmm15,xmm8 - pxor xmm7,xmm11 - pxor xmm15,xmm2 - pxor xmm11,xmm10 - pxor xmm2,xmm9 - pxor xmm5,xmm11 - pxor xmm15,xmm11 - pxor xmm4,xmm7 - pxor xmm2,xmm7 - - movdqa xmm11,xmm6 - movdqa xmm7,xmm0 - pxor xmm11,xmm3 - pxor xmm7,xmm1 - movdqa xmm10,xmm14 - movdqa xmm9,xmm12 - pxor xmm10,xmm13 - pxor xmm9,xmm8 - pand xmm10,xmm11 - pand xmm9,xmm3 - pxor xmm11,xmm7 - pxor xmm3,xmm1 - pand xmm7,xmm14 - pand xmm1,xmm12 - pand xmm11,xmm13 - pand xmm3,xmm8 - pxor xmm7,xmm11 - pxor xmm3,xmm1 - pxor xmm11,xmm10 - pxor xmm1,xmm9 - pxor xmm14,xmm12 - pxor xmm13,xmm8 - movdqa xmm10,xmm14 - pxor xmm10,xmm13 - pand xmm10,xmm6 - pxor xmm6,xmm0 - pand xmm0,xmm14 - pand xmm6,xmm13 - pxor xmm6,xmm0 - pxor xmm0,xmm10 - pxor xmm6,xmm11 - pxor xmm3,xmm11 - pxor xmm0,xmm7 - pxor xmm1,xmm7 - pxor xmm6,xmm15 - pxor xmm0,xmm5 - pxor xmm3,xmm6 - pxor xmm5,xmm15 - pxor xmm15,xmm0 - - pxor xmm0,xmm4 - pxor xmm4,xmm1 - pxor xmm1,xmm2 - pxor xmm2,xmm4 - pxor xmm3,xmm4 - - pxor xmm5,xmm2 - dec r10d - jl NEAR $L$enc_done - pshufd xmm7,xmm15,0x93 - pshufd xmm8,xmm0,0x93 - pxor xmm15,xmm7 - pshufd xmm9,xmm3,0x93 - pxor xmm0,xmm8 - pshufd xmm10,xmm5,0x93 - pxor xmm3,xmm9 - pshufd xmm11,xmm2,0x93 - pxor xmm5,xmm10 - pshufd xmm12,xmm6,0x93 - pxor xmm2,xmm11 - pshufd xmm13,xmm1,0x93 - pxor xmm6,xmm12 - pshufd xmm14,xmm4,0x93 - pxor xmm1,xmm13 - pxor xmm4,xmm14 - - pxor xmm8,xmm15 - pxor xmm7,xmm4 - pxor xmm8,xmm4 - pshufd xmm15,xmm15,0x4E - pxor xmm9,xmm0 - pshufd xmm0,xmm0,0x4E - pxor xmm12,xmm2 - pxor xmm15,xmm7 - pxor xmm13,xmm6 - pxor xmm0,xmm8 - pxor xmm11,xmm5 - pshufd xmm7,xmm2,0x4E - pxor xmm14,xmm1 - pshufd xmm8,xmm6,0x4E - pxor xmm10,xmm3 - pshufd xmm2,xmm5,0x4E - pxor xmm10,xmm4 - pshufd xmm6,xmm4,0x4E - pxor xmm11,xmm4 - pshufd xmm5,xmm1,0x4E - pxor xmm7,xmm11 - pshufd xmm1,xmm3,0x4E - pxor xmm8,xmm12 - pxor xmm2,xmm10 - pxor xmm6,xmm14 - pxor xmm5,xmm13 - movdqa xmm3,xmm7 - pxor xmm1,xmm9 - movdqa xmm4,xmm8 - movdqa xmm7,XMMWORD[48+r11] - jnz NEAR $L$enc_loop - movdqa xmm7,XMMWORD[64+r11] - jmp NEAR $L$enc_loop -ALIGN 16 -$L$enc_done: - movdqa xmm7,XMMWORD[r11] - movdqa xmm8,XMMWORD[16+r11] - movdqa xmm9,xmm1 - psrlq xmm1,1 - movdqa xmm10,xmm2 - psrlq xmm2,1 - pxor xmm1,xmm4 - pxor xmm2,xmm6 - pand xmm1,xmm7 - pand xmm2,xmm7 - pxor xmm4,xmm1 - psllq xmm1,1 - pxor xmm6,xmm2 - psllq xmm2,1 - pxor xmm1,xmm9 - pxor xmm2,xmm10 - movdqa xmm9,xmm3 - psrlq xmm3,1 - movdqa xmm10,xmm15 - psrlq xmm15,1 - pxor xmm3,xmm5 - pxor xmm15,xmm0 - pand xmm3,xmm7 - pand xmm15,xmm7 - pxor xmm5,xmm3 - psllq xmm3,1 - pxor xmm0,xmm15 - psllq xmm15,1 - pxor xmm3,xmm9 - pxor xmm15,xmm10 - movdqa xmm7,XMMWORD[32+r11] - movdqa xmm9,xmm6 - psrlq xmm6,2 - movdqa xmm10,xmm2 - psrlq xmm2,2 - pxor xmm6,xmm4 - pxor xmm2,xmm1 - pand xmm6,xmm8 - pand xmm2,xmm8 - pxor xmm4,xmm6 - psllq xmm6,2 - pxor xmm1,xmm2 - psllq xmm2,2 - pxor xmm6,xmm9 - pxor xmm2,xmm10 - movdqa xmm9,xmm0 - psrlq xmm0,2 - movdqa xmm10,xmm15 - psrlq xmm15,2 - pxor xmm0,xmm5 - pxor xmm15,xmm3 - pand xmm0,xmm8 - pand xmm15,xmm8 - pxor xmm5,xmm0 - psllq xmm0,2 - pxor xmm3,xmm15 - psllq xmm15,2 - pxor xmm0,xmm9 - pxor xmm15,xmm10 - movdqa xmm9,xmm5 - psrlq xmm5,4 - movdqa xmm10,xmm3 - psrlq xmm3,4 - pxor xmm5,xmm4 - pxor xmm3,xmm1 - pand xmm5,xmm7 - pand xmm3,xmm7 - pxor xmm4,xmm5 - psllq xmm5,4 - pxor xmm1,xmm3 - psllq xmm3,4 - pxor xmm5,xmm9 - pxor xmm3,xmm10 - movdqa xmm9,xmm0 - psrlq xmm0,4 - movdqa xmm10,xmm15 - psrlq xmm15,4 - pxor xmm0,xmm6 - pxor xmm15,xmm2 - pand xmm0,xmm7 - pand xmm15,xmm7 - pxor xmm6,xmm0 - psllq xmm0,4 - pxor xmm2,xmm15 - psllq xmm15,4 - pxor xmm0,xmm9 - pxor xmm15,xmm10 - movdqa xmm7,XMMWORD[rax] - pxor xmm3,xmm7 - pxor xmm5,xmm7 - pxor xmm2,xmm7 - pxor xmm6,xmm7 - pxor xmm1,xmm7 - pxor xmm4,xmm7 - pxor xmm15,xmm7 - pxor xmm0,xmm7 - DB 0F3h,0C3h ;repret - - - -ALIGN 64 -_bsaes_decrypt8: - lea r11,[$L$BS0] - - movdqa xmm8,XMMWORD[rax] - lea rax,[16+rax] - movdqa xmm7,XMMWORD[((-48))+r11] - pxor xmm15,xmm8 - pxor xmm0,xmm8 - pxor xmm1,xmm8 - pxor xmm2,xmm8 -DB 102,68,15,56,0,255 -DB 102,15,56,0,199 - pxor xmm3,xmm8 - pxor xmm4,xmm8 -DB 102,15,56,0,207 -DB 102,15,56,0,215 - pxor xmm5,xmm8 - pxor xmm6,xmm8 -DB 102,15,56,0,223 -DB 102,15,56,0,231 -DB 102,15,56,0,239 -DB 102,15,56,0,247 - movdqa xmm7,XMMWORD[r11] - movdqa xmm8,XMMWORD[16+r11] - movdqa xmm9,xmm5 - psrlq xmm5,1 - movdqa xmm10,xmm3 - psrlq xmm3,1 - pxor xmm5,xmm6 - pxor xmm3,xmm4 - pand xmm5,xmm7 - pand xmm3,xmm7 - pxor xmm6,xmm5 - psllq xmm5,1 - pxor xmm4,xmm3 - psllq xmm3,1 - pxor xmm5,xmm9 - pxor xmm3,xmm10 - movdqa xmm9,xmm1 - psrlq xmm1,1 - movdqa xmm10,xmm15 - psrlq xmm15,1 - pxor xmm1,xmm2 - pxor xmm15,xmm0 - pand xmm1,xmm7 - pand xmm15,xmm7 - pxor xmm2,xmm1 - psllq xmm1,1 - pxor xmm0,xmm15 - psllq xmm15,1 - pxor xmm1,xmm9 - pxor xmm15,xmm10 - movdqa xmm7,XMMWORD[32+r11] - movdqa xmm9,xmm4 - psrlq xmm4,2 - movdqa xmm10,xmm3 - psrlq xmm3,2 - pxor xmm4,xmm6 - pxor xmm3,xmm5 - pand xmm4,xmm8 - pand xmm3,xmm8 - pxor xmm6,xmm4 - psllq xmm4,2 - pxor xmm5,xmm3 - psllq xmm3,2 - pxor xmm4,xmm9 - pxor xmm3,xmm10 - movdqa xmm9,xmm0 - psrlq xmm0,2 - movdqa xmm10,xmm15 - psrlq xmm15,2 - pxor xmm0,xmm2 - pxor xmm15,xmm1 - pand xmm0,xmm8 - pand xmm15,xmm8 - pxor xmm2,xmm0 - psllq xmm0,2 - pxor xmm1,xmm15 - psllq xmm15,2 - pxor xmm0,xmm9 - pxor xmm15,xmm10 - movdqa xmm9,xmm2 - psrlq xmm2,4 - movdqa xmm10,xmm1 - psrlq xmm1,4 - pxor xmm2,xmm6 - pxor xmm1,xmm5 - pand xmm2,xmm7 - pand xmm1,xmm7 - pxor xmm6,xmm2 - psllq xmm2,4 - pxor xmm5,xmm1 - psllq xmm1,4 - pxor xmm2,xmm9 - pxor xmm1,xmm10 - movdqa xmm9,xmm0 - psrlq xmm0,4 - movdqa xmm10,xmm15 - psrlq xmm15,4 - pxor xmm0,xmm4 - pxor xmm15,xmm3 - pand xmm0,xmm7 - pand xmm15,xmm7 - pxor xmm4,xmm0 - psllq xmm0,4 - pxor xmm3,xmm15 - psllq xmm15,4 - pxor xmm0,xmm9 - pxor xmm15,xmm10 - dec r10d - jmp NEAR $L$dec_sbox -ALIGN 16 -$L$dec_loop: - pxor xmm15,XMMWORD[rax] - pxor xmm0,XMMWORD[16+rax] - pxor xmm1,XMMWORD[32+rax] - pxor xmm2,XMMWORD[48+rax] -DB 102,68,15,56,0,255 -DB 102,15,56,0,199 - pxor xmm3,XMMWORD[64+rax] - pxor xmm4,XMMWORD[80+rax] -DB 102,15,56,0,207 -DB 102,15,56,0,215 - pxor xmm5,XMMWORD[96+rax] - pxor xmm6,XMMWORD[112+rax] -DB 102,15,56,0,223 -DB 102,15,56,0,231 -DB 102,15,56,0,239 -DB 102,15,56,0,247 - lea rax,[128+rax] -$L$dec_sbox: - pxor xmm2,xmm3 - - pxor xmm3,xmm6 - pxor xmm1,xmm6 - pxor xmm5,xmm3 - pxor xmm6,xmm5 - pxor xmm0,xmm6 - - pxor xmm15,xmm0 - pxor xmm1,xmm4 - pxor xmm2,xmm15 - pxor xmm4,xmm15 - pxor xmm0,xmm2 - movdqa xmm10,xmm2 - movdqa xmm9,xmm6 - movdqa xmm8,xmm0 - movdqa xmm12,xmm3 - movdqa xmm11,xmm4 - - pxor xmm10,xmm15 - pxor xmm9,xmm3 - pxor xmm8,xmm5 - movdqa xmm13,xmm10 - pxor xmm12,xmm15 - movdqa xmm7,xmm9 - pxor xmm11,xmm1 - movdqa xmm14,xmm10 - - por xmm9,xmm8 - por xmm10,xmm11 - pxor xmm14,xmm7 - pand xmm13,xmm11 - pxor xmm11,xmm8 - pand xmm7,xmm8 - pand xmm14,xmm11 - movdqa xmm11,xmm5 - pxor xmm11,xmm1 - pand xmm12,xmm11 - pxor xmm10,xmm12 - pxor xmm9,xmm12 - movdqa xmm12,xmm2 - movdqa xmm11,xmm0 - pxor xmm12,xmm6 - pxor xmm11,xmm4 - movdqa xmm8,xmm12 - pand xmm12,xmm11 - por xmm8,xmm11 - pxor xmm7,xmm12 - pxor xmm10,xmm14 - pxor xmm9,xmm13 - pxor xmm8,xmm14 - movdqa xmm11,xmm3 - pxor xmm7,xmm13 - movdqa xmm12,xmm15 - pxor xmm8,xmm13 - movdqa xmm13,xmm6 - pand xmm11,xmm5 - movdqa xmm14,xmm2 - pand xmm12,xmm1 - pand xmm13,xmm0 - por xmm14,xmm4 - pxor xmm10,xmm11 - pxor xmm9,xmm12 - pxor xmm8,xmm13 - pxor xmm7,xmm14 - - - - - - movdqa xmm11,xmm10 - pand xmm10,xmm8 - pxor xmm11,xmm9 - - movdqa xmm13,xmm7 - movdqa xmm14,xmm11 - pxor xmm13,xmm10 - pand xmm14,xmm13 - - movdqa xmm12,xmm8 - pxor xmm14,xmm9 - pxor xmm12,xmm7 - - pxor xmm10,xmm9 - - pand xmm12,xmm10 - - movdqa xmm9,xmm13 - pxor xmm12,xmm7 - - pxor xmm9,xmm12 - pxor xmm8,xmm12 - - pand xmm9,xmm7 - - pxor xmm13,xmm9 - pxor xmm8,xmm9 - - pand xmm13,xmm14 - - pxor xmm13,xmm11 - movdqa xmm11,xmm4 - movdqa xmm7,xmm0 - movdqa xmm9,xmm14 - pxor xmm9,xmm13 - pand xmm9,xmm4 - pxor xmm4,xmm0 - pand xmm0,xmm14 - pand xmm4,xmm13 - pxor xmm4,xmm0 - pxor xmm0,xmm9 - pxor xmm11,xmm1 - pxor xmm7,xmm5 - pxor xmm14,xmm12 - pxor xmm13,xmm8 - movdqa xmm10,xmm14 - movdqa xmm9,xmm12 - pxor xmm10,xmm13 - pxor xmm9,xmm8 - pand xmm10,xmm11 - pand xmm9,xmm1 - pxor xmm11,xmm7 - pxor xmm1,xmm5 - pand xmm7,xmm14 - pand xmm5,xmm12 - pand xmm11,xmm13 - pand xmm1,xmm8 - pxor xmm7,xmm11 - pxor xmm1,xmm5 - pxor xmm11,xmm10 - pxor xmm5,xmm9 - pxor xmm4,xmm11 - pxor xmm1,xmm11 - pxor xmm0,xmm7 - pxor xmm5,xmm7 - - movdqa xmm11,xmm2 - movdqa xmm7,xmm6 - pxor xmm11,xmm15 - pxor xmm7,xmm3 - movdqa xmm10,xmm14 - movdqa xmm9,xmm12 - pxor xmm10,xmm13 - pxor xmm9,xmm8 - pand xmm10,xmm11 - pand xmm9,xmm15 - pxor xmm11,xmm7 - pxor xmm15,xmm3 - pand xmm7,xmm14 - pand xmm3,xmm12 - pand xmm11,xmm13 - pand xmm15,xmm8 - pxor xmm7,xmm11 - pxor xmm15,xmm3 - pxor xmm11,xmm10 - pxor xmm3,xmm9 - pxor xmm14,xmm12 - pxor xmm13,xmm8 - movdqa xmm10,xmm14 - pxor xmm10,xmm13 - pand xmm10,xmm2 - pxor xmm2,xmm6 - pand xmm6,xmm14 - pand xmm2,xmm13 - pxor xmm2,xmm6 - pxor xmm6,xmm10 - pxor xmm2,xmm11 - pxor xmm15,xmm11 - pxor xmm6,xmm7 - pxor xmm3,xmm7 - pxor xmm0,xmm6 - pxor xmm5,xmm4 - - pxor xmm3,xmm0 - pxor xmm1,xmm6 - pxor xmm4,xmm6 - pxor xmm3,xmm1 - pxor xmm6,xmm15 - pxor xmm3,xmm4 - pxor xmm2,xmm5 - pxor xmm5,xmm0 - pxor xmm2,xmm3 - - pxor xmm3,xmm15 - pxor xmm6,xmm2 - dec r10d - jl NEAR $L$dec_done - - pshufd xmm7,xmm15,0x4E - pshufd xmm13,xmm2,0x4E - pxor xmm7,xmm15 - pshufd xmm14,xmm4,0x4E - pxor xmm13,xmm2 - pshufd xmm8,xmm0,0x4E - pxor xmm14,xmm4 - pshufd xmm9,xmm5,0x4E - pxor xmm8,xmm0 - pshufd xmm10,xmm3,0x4E - pxor xmm9,xmm5 - pxor xmm15,xmm13 - pxor xmm0,xmm13 - pshufd xmm11,xmm1,0x4E - pxor xmm10,xmm3 - pxor xmm5,xmm7 - pxor xmm3,xmm8 - pshufd xmm12,xmm6,0x4E - pxor xmm11,xmm1 - pxor xmm0,xmm14 - pxor xmm1,xmm9 - pxor xmm12,xmm6 - - pxor xmm5,xmm14 - pxor xmm3,xmm13 - pxor xmm1,xmm13 - pxor xmm6,xmm10 - pxor xmm2,xmm11 - pxor xmm1,xmm14 - pxor xmm6,xmm14 - pxor xmm4,xmm12 - pshufd xmm7,xmm15,0x93 - pshufd xmm8,xmm0,0x93 - pxor xmm15,xmm7 - pshufd xmm9,xmm5,0x93 - pxor xmm0,xmm8 - pshufd xmm10,xmm3,0x93 - pxor xmm5,xmm9 - pshufd xmm11,xmm1,0x93 - pxor xmm3,xmm10 - pshufd xmm12,xmm6,0x93 - pxor xmm1,xmm11 - pshufd xmm13,xmm2,0x93 - pxor xmm6,xmm12 - pshufd xmm14,xmm4,0x93 - pxor xmm2,xmm13 - pxor xmm4,xmm14 - - pxor xmm8,xmm15 - pxor xmm7,xmm4 - pxor xmm8,xmm4 - pshufd xmm15,xmm15,0x4E - pxor xmm9,xmm0 - pshufd xmm0,xmm0,0x4E - pxor xmm12,xmm1 - pxor xmm15,xmm7 - pxor xmm13,xmm6 - pxor xmm0,xmm8 - pxor xmm11,xmm3 - pshufd xmm7,xmm1,0x4E - pxor xmm14,xmm2 - pshufd xmm8,xmm6,0x4E - pxor xmm10,xmm5 - pshufd xmm1,xmm3,0x4E - pxor xmm10,xmm4 - pshufd xmm6,xmm4,0x4E - pxor xmm11,xmm4 - pshufd xmm3,xmm2,0x4E - pxor xmm7,xmm11 - pshufd xmm2,xmm5,0x4E - pxor xmm8,xmm12 - pxor xmm10,xmm1 - pxor xmm6,xmm14 - pxor xmm13,xmm3 - movdqa xmm3,xmm7 - pxor xmm2,xmm9 - movdqa xmm5,xmm13 - movdqa xmm4,xmm8 - movdqa xmm1,xmm2 - movdqa xmm2,xmm10 - movdqa xmm7,XMMWORD[((-16))+r11] - jnz NEAR $L$dec_loop - movdqa xmm7,XMMWORD[((-32))+r11] - jmp NEAR $L$dec_loop -ALIGN 16 -$L$dec_done: - movdqa xmm7,XMMWORD[r11] - movdqa xmm8,XMMWORD[16+r11] - movdqa xmm9,xmm2 - psrlq xmm2,1 - movdqa xmm10,xmm1 - psrlq xmm1,1 - pxor xmm2,xmm4 - pxor xmm1,xmm6 - pand xmm2,xmm7 - pand xmm1,xmm7 - pxor xmm4,xmm2 - psllq xmm2,1 - pxor xmm6,xmm1 - psllq xmm1,1 - pxor xmm2,xmm9 - pxor xmm1,xmm10 - movdqa xmm9,xmm5 - psrlq xmm5,1 - movdqa xmm10,xmm15 - psrlq xmm15,1 - pxor xmm5,xmm3 - pxor xmm15,xmm0 - pand xmm5,xmm7 - pand xmm15,xmm7 - pxor xmm3,xmm5 - psllq xmm5,1 - pxor xmm0,xmm15 - psllq xmm15,1 - pxor xmm5,xmm9 - pxor xmm15,xmm10 - movdqa xmm7,XMMWORD[32+r11] - movdqa xmm9,xmm6 - psrlq xmm6,2 - movdqa xmm10,xmm1 - psrlq xmm1,2 - pxor xmm6,xmm4 - pxor xmm1,xmm2 - pand xmm6,xmm8 - pand xmm1,xmm8 - pxor xmm4,xmm6 - psllq xmm6,2 - pxor xmm2,xmm1 - psllq xmm1,2 - pxor xmm6,xmm9 - pxor xmm1,xmm10 - movdqa xmm9,xmm0 - psrlq xmm0,2 - movdqa xmm10,xmm15 - psrlq xmm15,2 - pxor xmm0,xmm3 - pxor xmm15,xmm5 - pand xmm0,xmm8 - pand xmm15,xmm8 - pxor xmm3,xmm0 - psllq xmm0,2 - pxor xmm5,xmm15 - psllq xmm15,2 - pxor xmm0,xmm9 - pxor xmm15,xmm10 - movdqa xmm9,xmm3 - psrlq xmm3,4 - movdqa xmm10,xmm5 - psrlq xmm5,4 - pxor xmm3,xmm4 - pxor xmm5,xmm2 - pand xmm3,xmm7 - pand xmm5,xmm7 - pxor xmm4,xmm3 - psllq xmm3,4 - pxor xmm2,xmm5 - psllq xmm5,4 - pxor xmm3,xmm9 - pxor xmm5,xmm10 - movdqa xmm9,xmm0 - psrlq xmm0,4 - movdqa xmm10,xmm15 - psrlq xmm15,4 - pxor xmm0,xmm6 - pxor xmm15,xmm1 - pand xmm0,xmm7 - pand xmm15,xmm7 - pxor xmm6,xmm0 - psllq xmm0,4 - pxor xmm1,xmm15 - psllq xmm15,4 - pxor xmm0,xmm9 - pxor xmm15,xmm10 - movdqa xmm7,XMMWORD[rax] - pxor xmm5,xmm7 - pxor xmm3,xmm7 - pxor xmm1,xmm7 - pxor xmm6,xmm7 - pxor xmm2,xmm7 - pxor xmm4,xmm7 - pxor xmm15,xmm7 - pxor xmm0,xmm7 - DB 0F3h,0C3h ;repret - - -ALIGN 16 -_bsaes_key_convert: - lea r11,[$L$masks] - movdqu xmm7,XMMWORD[rcx] - lea rcx,[16+rcx] - movdqa xmm0,XMMWORD[r11] - movdqa xmm1,XMMWORD[16+r11] - movdqa xmm2,XMMWORD[32+r11] - movdqa xmm3,XMMWORD[48+r11] - movdqa xmm4,XMMWORD[64+r11] - pcmpeqd xmm5,xmm5 - - movdqu xmm6,XMMWORD[rcx] - movdqa XMMWORD[rax],xmm7 - lea rax,[16+rax] - dec r10d - jmp NEAR $L$key_loop -ALIGN 16 -$L$key_loop: -DB 102,15,56,0,244 - - movdqa xmm8,xmm0 - movdqa xmm9,xmm1 - - pand xmm8,xmm6 - pand xmm9,xmm6 - movdqa xmm10,xmm2 - pcmpeqb xmm8,xmm0 - psllq xmm0,4 - movdqa xmm11,xmm3 - pcmpeqb xmm9,xmm1 - psllq xmm1,4 - - pand xmm10,xmm6 - pand xmm11,xmm6 - movdqa xmm12,xmm0 - pcmpeqb xmm10,xmm2 - psllq xmm2,4 - movdqa xmm13,xmm1 - pcmpeqb xmm11,xmm3 - psllq xmm3,4 - - movdqa xmm14,xmm2 - movdqa xmm15,xmm3 - pxor xmm8,xmm5 - pxor xmm9,xmm5 - - pand xmm12,xmm6 - pand xmm13,xmm6 - movdqa XMMWORD[rax],xmm8 - pcmpeqb xmm12,xmm0 - psrlq xmm0,4 - movdqa XMMWORD[16+rax],xmm9 - pcmpeqb xmm13,xmm1 - psrlq xmm1,4 - lea rcx,[16+rcx] - - pand xmm14,xmm6 - pand xmm15,xmm6 - movdqa XMMWORD[32+rax],xmm10 - pcmpeqb xmm14,xmm2 - psrlq xmm2,4 - movdqa XMMWORD[48+rax],xmm11 - pcmpeqb xmm15,xmm3 - psrlq xmm3,4 - movdqu xmm6,XMMWORD[rcx] - - pxor xmm13,xmm5 - pxor xmm14,xmm5 - movdqa XMMWORD[64+rax],xmm12 - movdqa XMMWORD[80+rax],xmm13 - movdqa XMMWORD[96+rax],xmm14 - movdqa XMMWORD[112+rax],xmm15 - lea rax,[128+rax] - dec r10d - jnz NEAR $L$key_loop - - movdqa xmm7,XMMWORD[80+r11] - - DB 0F3h,0C3h ;repret - -EXTERN asm_AES_cbc_encrypt -global bsaes_cbc_encrypt - -ALIGN 16 -bsaes_cbc_encrypt: - mov r11d,DWORD[48+rsp] - cmp r11d,0 - jne NEAR asm_AES_cbc_encrypt - cmp r8,128 - jb NEAR asm_AES_cbc_encrypt - - mov rax,rsp -$L$cbc_dec_prologue: - push rbp - push rbx - push r12 - push r13 - push r14 - push r15 - lea rsp,[((-72))+rsp] - mov r10,QWORD[160+rsp] - lea rsp,[((-160))+rsp] - movaps XMMWORD[64+rsp],xmm6 - movaps XMMWORD[80+rsp],xmm7 - movaps XMMWORD[96+rsp],xmm8 - movaps XMMWORD[112+rsp],xmm9 - movaps XMMWORD[128+rsp],xmm10 - movaps XMMWORD[144+rsp],xmm11 - movaps XMMWORD[160+rsp],xmm12 - movaps XMMWORD[176+rsp],xmm13 - movaps XMMWORD[192+rsp],xmm14 - movaps XMMWORD[208+rsp],xmm15 -$L$cbc_dec_body: - mov rbp,rsp - mov eax,DWORD[240+r9] - mov r12,rcx - mov r13,rdx - mov r14,r8 - mov r15,r9 - mov rbx,r10 - shr r14,4 - - mov edx,eax - shl rax,7 - sub rax,96 - sub rsp,rax - - mov rax,rsp - mov rcx,r15 - mov r10d,edx - call _bsaes_key_convert - pxor xmm7,XMMWORD[rsp] - movdqa XMMWORD[rax],xmm6 - movdqa XMMWORD[rsp],xmm7 - - movdqu xmm14,XMMWORD[rbx] - sub r14,8 -$L$cbc_dec_loop: - movdqu xmm15,XMMWORD[r12] - movdqu xmm0,XMMWORD[16+r12] - movdqu xmm1,XMMWORD[32+r12] - movdqu xmm2,XMMWORD[48+r12] - movdqu xmm3,XMMWORD[64+r12] - movdqu xmm4,XMMWORD[80+r12] - mov rax,rsp - movdqu xmm5,XMMWORD[96+r12] - mov r10d,edx - movdqu xmm6,XMMWORD[112+r12] - movdqa XMMWORD[32+rbp],xmm14 - - call _bsaes_decrypt8 - - pxor xmm15,XMMWORD[32+rbp] - movdqu xmm7,XMMWORD[r12] - movdqu xmm8,XMMWORD[16+r12] - pxor xmm0,xmm7 - movdqu xmm9,XMMWORD[32+r12] - pxor xmm5,xmm8 - movdqu xmm10,XMMWORD[48+r12] - pxor xmm3,xmm9 - movdqu xmm11,XMMWORD[64+r12] - pxor xmm1,xmm10 - movdqu xmm12,XMMWORD[80+r12] - pxor xmm6,xmm11 - movdqu xmm13,XMMWORD[96+r12] - pxor xmm2,xmm12 - movdqu xmm14,XMMWORD[112+r12] - pxor xmm4,xmm13 - movdqu XMMWORD[r13],xmm15 - lea r12,[128+r12] - movdqu XMMWORD[16+r13],xmm0 - movdqu XMMWORD[32+r13],xmm5 - movdqu XMMWORD[48+r13],xmm3 - movdqu XMMWORD[64+r13],xmm1 - movdqu XMMWORD[80+r13],xmm6 - movdqu XMMWORD[96+r13],xmm2 - movdqu XMMWORD[112+r13],xmm4 - lea r13,[128+r13] - sub r14,8 - jnc NEAR $L$cbc_dec_loop - - add r14,8 - jz NEAR $L$cbc_dec_done - - movdqu xmm15,XMMWORD[r12] - mov rax,rsp - mov r10d,edx - cmp r14,2 - jb NEAR $L$cbc_dec_one - movdqu xmm0,XMMWORD[16+r12] - je NEAR $L$cbc_dec_two - movdqu xmm1,XMMWORD[32+r12] - cmp r14,4 - jb NEAR $L$cbc_dec_three - movdqu xmm2,XMMWORD[48+r12] - je NEAR $L$cbc_dec_four - movdqu xmm3,XMMWORD[64+r12] - cmp r14,6 - jb NEAR $L$cbc_dec_five - movdqu xmm4,XMMWORD[80+r12] - je NEAR $L$cbc_dec_six - movdqu xmm5,XMMWORD[96+r12] - movdqa XMMWORD[32+rbp],xmm14 - call _bsaes_decrypt8 - pxor xmm15,XMMWORD[32+rbp] - movdqu xmm7,XMMWORD[r12] - movdqu xmm8,XMMWORD[16+r12] - pxor xmm0,xmm7 - movdqu xmm9,XMMWORD[32+r12] - pxor xmm5,xmm8 - movdqu xmm10,XMMWORD[48+r12] - pxor xmm3,xmm9 - movdqu xmm11,XMMWORD[64+r12] - pxor xmm1,xmm10 - movdqu xmm12,XMMWORD[80+r12] - pxor xmm6,xmm11 - movdqu xmm14,XMMWORD[96+r12] - pxor xmm2,xmm12 - movdqu XMMWORD[r13],xmm15 - movdqu XMMWORD[16+r13],xmm0 - movdqu XMMWORD[32+r13],xmm5 - movdqu XMMWORD[48+r13],xmm3 - movdqu XMMWORD[64+r13],xmm1 - movdqu XMMWORD[80+r13],xmm6 - movdqu XMMWORD[96+r13],xmm2 - jmp NEAR $L$cbc_dec_done -ALIGN 16 -$L$cbc_dec_six: - movdqa XMMWORD[32+rbp],xmm14 - call _bsaes_decrypt8 - pxor xmm15,XMMWORD[32+rbp] - movdqu xmm7,XMMWORD[r12] - movdqu xmm8,XMMWORD[16+r12] - pxor xmm0,xmm7 - movdqu xmm9,XMMWORD[32+r12] - pxor xmm5,xmm8 - movdqu xmm10,XMMWORD[48+r12] - pxor xmm3,xmm9 - movdqu xmm11,XMMWORD[64+r12] - pxor xmm1,xmm10 - movdqu xmm14,XMMWORD[80+r12] - pxor xmm6,xmm11 - movdqu XMMWORD[r13],xmm15 - movdqu XMMWORD[16+r13],xmm0 - movdqu XMMWORD[32+r13],xmm5 - movdqu XMMWORD[48+r13],xmm3 - movdqu XMMWORD[64+r13],xmm1 - movdqu XMMWORD[80+r13],xmm6 - jmp NEAR $L$cbc_dec_done -ALIGN 16 -$L$cbc_dec_five: - movdqa XMMWORD[32+rbp],xmm14 - call _bsaes_decrypt8 - pxor xmm15,XMMWORD[32+rbp] - movdqu xmm7,XMMWORD[r12] - movdqu xmm8,XMMWORD[16+r12] - pxor xmm0,xmm7 - movdqu xmm9,XMMWORD[32+r12] - pxor xmm5,xmm8 - movdqu xmm10,XMMWORD[48+r12] - pxor xmm3,xmm9 - movdqu xmm14,XMMWORD[64+r12] - pxor xmm1,xmm10 - movdqu XMMWORD[r13],xmm15 - movdqu XMMWORD[16+r13],xmm0 - movdqu XMMWORD[32+r13],xmm5 - movdqu XMMWORD[48+r13],xmm3 - movdqu XMMWORD[64+r13],xmm1 - jmp NEAR $L$cbc_dec_done -ALIGN 16 -$L$cbc_dec_four: - movdqa XMMWORD[32+rbp],xmm14 - call _bsaes_decrypt8 - pxor xmm15,XMMWORD[32+rbp] - movdqu xmm7,XMMWORD[r12] - movdqu xmm8,XMMWORD[16+r12] - pxor xmm0,xmm7 - movdqu xmm9,XMMWORD[32+r12] - pxor xmm5,xmm8 - movdqu xmm14,XMMWORD[48+r12] - pxor xmm3,xmm9 - movdqu XMMWORD[r13],xmm15 - movdqu XMMWORD[16+r13],xmm0 - movdqu XMMWORD[32+r13],xmm5 - movdqu XMMWORD[48+r13],xmm3 - jmp NEAR $L$cbc_dec_done -ALIGN 16 -$L$cbc_dec_three: - movdqa XMMWORD[32+rbp],xmm14 - call _bsaes_decrypt8 - pxor xmm15,XMMWORD[32+rbp] - movdqu xmm7,XMMWORD[r12] - movdqu xmm8,XMMWORD[16+r12] - pxor xmm0,xmm7 - movdqu xmm14,XMMWORD[32+r12] - pxor xmm5,xmm8 - movdqu XMMWORD[r13],xmm15 - movdqu XMMWORD[16+r13],xmm0 - movdqu XMMWORD[32+r13],xmm5 - jmp NEAR $L$cbc_dec_done -ALIGN 16 -$L$cbc_dec_two: - movdqa XMMWORD[32+rbp],xmm14 - call _bsaes_decrypt8 - pxor xmm15,XMMWORD[32+rbp] - movdqu xmm7,XMMWORD[r12] - movdqu xmm14,XMMWORD[16+r12] - pxor xmm0,xmm7 - movdqu XMMWORD[r13],xmm15 - movdqu XMMWORD[16+r13],xmm0 - jmp NEAR $L$cbc_dec_done -ALIGN 16 -$L$cbc_dec_one: - lea rcx,[r12] - lea rdx,[32+rbp] - lea r8,[r15] - call asm_AES_decrypt - pxor xmm14,XMMWORD[32+rbp] - movdqu XMMWORD[r13],xmm14 - movdqa xmm14,xmm15 - -$L$cbc_dec_done: - movdqu XMMWORD[rbx],xmm14 - lea rax,[rsp] - pxor xmm0,xmm0 -$L$cbc_dec_bzero: - movdqa XMMWORD[rax],xmm0 - movdqa XMMWORD[16+rax],xmm0 - lea rax,[32+rax] - cmp rbp,rax - ja NEAR $L$cbc_dec_bzero - - lea rsp,[rbp] - movaps xmm6,XMMWORD[64+rbp] - movaps xmm7,XMMWORD[80+rbp] - movaps xmm8,XMMWORD[96+rbp] - movaps xmm9,XMMWORD[112+rbp] - movaps xmm10,XMMWORD[128+rbp] - movaps xmm11,XMMWORD[144+rbp] - movaps xmm12,XMMWORD[160+rbp] - movaps xmm13,XMMWORD[176+rbp] - movaps xmm14,XMMWORD[192+rbp] - movaps xmm15,XMMWORD[208+rbp] - lea rsp,[160+rbp] - mov r15,QWORD[72+rsp] - mov r14,QWORD[80+rsp] - mov r13,QWORD[88+rsp] - mov r12,QWORD[96+rsp] - mov rbx,QWORD[104+rsp] - mov rax,QWORD[112+rsp] - lea rsp,[120+rsp] - mov rbp,rax -$L$cbc_dec_epilogue: - DB 0F3h,0C3h ;repret - - -global bsaes_ctr32_encrypt_blocks - -ALIGN 16 -bsaes_ctr32_encrypt_blocks: - mov rax,rsp -$L$ctr_enc_prologue: - push rbp - push rbx - push r12 - push r13 - push r14 - push r15 - lea rsp,[((-72))+rsp] - mov r10,QWORD[160+rsp] - lea rsp,[((-160))+rsp] - movaps XMMWORD[64+rsp],xmm6 - movaps XMMWORD[80+rsp],xmm7 - movaps XMMWORD[96+rsp],xmm8 - movaps XMMWORD[112+rsp],xmm9 - movaps XMMWORD[128+rsp],xmm10 - movaps XMMWORD[144+rsp],xmm11 - movaps XMMWORD[160+rsp],xmm12 - movaps XMMWORD[176+rsp],xmm13 - movaps XMMWORD[192+rsp],xmm14 - movaps XMMWORD[208+rsp],xmm15 -$L$ctr_enc_body: - mov rbp,rsp - movdqu xmm0,XMMWORD[r10] - mov eax,DWORD[240+r9] - mov r12,rcx - mov r13,rdx - mov r14,r8 - mov r15,r9 - movdqa XMMWORD[32+rbp],xmm0 - cmp r8,8 - jb NEAR $L$ctr_enc_short - - mov ebx,eax - shl rax,7 - sub rax,96 - sub rsp,rax - - mov rax,rsp - mov rcx,r15 - mov r10d,ebx - call _bsaes_key_convert - pxor xmm7,xmm6 - movdqa XMMWORD[rax],xmm7 - - movdqa xmm8,XMMWORD[rsp] - lea r11,[$L$ADD1] - movdqa xmm15,XMMWORD[32+rbp] - movdqa xmm7,XMMWORD[((-32))+r11] -DB 102,68,15,56,0,199 -DB 102,68,15,56,0,255 - movdqa XMMWORD[rsp],xmm8 - jmp NEAR $L$ctr_enc_loop -ALIGN 16 -$L$ctr_enc_loop: - movdqa XMMWORD[32+rbp],xmm15 - movdqa xmm0,xmm15 - movdqa xmm1,xmm15 - paddd xmm0,XMMWORD[r11] - movdqa xmm2,xmm15 - paddd xmm1,XMMWORD[16+r11] - movdqa xmm3,xmm15 - paddd xmm2,XMMWORD[32+r11] - movdqa xmm4,xmm15 - paddd xmm3,XMMWORD[48+r11] - movdqa xmm5,xmm15 - paddd xmm4,XMMWORD[64+r11] - movdqa xmm6,xmm15 - paddd xmm5,XMMWORD[80+r11] - paddd xmm6,XMMWORD[96+r11] - - - - movdqa xmm8,XMMWORD[rsp] - lea rax,[16+rsp] - movdqa xmm7,XMMWORD[((-16))+r11] - pxor xmm15,xmm8 - pxor xmm0,xmm8 - pxor xmm1,xmm8 - pxor xmm2,xmm8 -DB 102,68,15,56,0,255 -DB 102,15,56,0,199 - pxor xmm3,xmm8 - pxor xmm4,xmm8 -DB 102,15,56,0,207 -DB 102,15,56,0,215 - pxor xmm5,xmm8 - pxor xmm6,xmm8 -DB 102,15,56,0,223 -DB 102,15,56,0,231 -DB 102,15,56,0,239 -DB 102,15,56,0,247 - lea r11,[$L$BS0] - mov r10d,ebx - - call _bsaes_encrypt8_bitslice - - sub r14,8 - jc NEAR $L$ctr_enc_loop_done - - movdqu xmm7,XMMWORD[r12] - movdqu xmm8,XMMWORD[16+r12] - movdqu xmm9,XMMWORD[32+r12] - movdqu xmm10,XMMWORD[48+r12] - movdqu xmm11,XMMWORD[64+r12] - movdqu xmm12,XMMWORD[80+r12] - movdqu xmm13,XMMWORD[96+r12] - movdqu xmm14,XMMWORD[112+r12] - lea r12,[128+r12] - pxor xmm7,xmm15 - movdqa xmm15,XMMWORD[32+rbp] - pxor xmm0,xmm8 - movdqu XMMWORD[r13],xmm7 - pxor xmm3,xmm9 - movdqu XMMWORD[16+r13],xmm0 - pxor xmm5,xmm10 - movdqu XMMWORD[32+r13],xmm3 - pxor xmm2,xmm11 - movdqu XMMWORD[48+r13],xmm5 - pxor xmm6,xmm12 - movdqu XMMWORD[64+r13],xmm2 - pxor xmm1,xmm13 - movdqu XMMWORD[80+r13],xmm6 - pxor xmm4,xmm14 - movdqu XMMWORD[96+r13],xmm1 - lea r11,[$L$ADD1] - movdqu XMMWORD[112+r13],xmm4 - lea r13,[128+r13] - paddd xmm15,XMMWORD[112+r11] - jnz NEAR $L$ctr_enc_loop - - jmp NEAR $L$ctr_enc_done -ALIGN 16 -$L$ctr_enc_loop_done: - add r14,8 - movdqu xmm7,XMMWORD[r12] - pxor xmm15,xmm7 - movdqu XMMWORD[r13],xmm15 - cmp r14,2 - jb NEAR $L$ctr_enc_done - movdqu xmm8,XMMWORD[16+r12] - pxor xmm0,xmm8 - movdqu XMMWORD[16+r13],xmm0 - je NEAR $L$ctr_enc_done - movdqu xmm9,XMMWORD[32+r12] - pxor xmm3,xmm9 - movdqu XMMWORD[32+r13],xmm3 - cmp r14,4 - jb NEAR $L$ctr_enc_done - movdqu xmm10,XMMWORD[48+r12] - pxor xmm5,xmm10 - movdqu XMMWORD[48+r13],xmm5 - je NEAR $L$ctr_enc_done - movdqu xmm11,XMMWORD[64+r12] - pxor xmm2,xmm11 - movdqu XMMWORD[64+r13],xmm2 - cmp r14,6 - jb NEAR $L$ctr_enc_done - movdqu xmm12,XMMWORD[80+r12] - pxor xmm6,xmm12 - movdqu XMMWORD[80+r13],xmm6 - je NEAR $L$ctr_enc_done - movdqu xmm13,XMMWORD[96+r12] - pxor xmm1,xmm13 - movdqu XMMWORD[96+r13],xmm1 - jmp NEAR $L$ctr_enc_done - -ALIGN 16 -$L$ctr_enc_short: - lea rcx,[32+rbp] - lea rdx,[48+rbp] - lea r8,[r15] - call asm_AES_encrypt - movdqu xmm0,XMMWORD[r12] - lea r12,[16+r12] - mov eax,DWORD[44+rbp] - bswap eax - pxor xmm0,XMMWORD[48+rbp] - inc eax - movdqu XMMWORD[r13],xmm0 - bswap eax - lea r13,[16+r13] - mov DWORD[44+rsp],eax - dec r14 - jnz NEAR $L$ctr_enc_short - -$L$ctr_enc_done: - lea rax,[rsp] - pxor xmm0,xmm0 -$L$ctr_enc_bzero: - movdqa XMMWORD[rax],xmm0 - movdqa XMMWORD[16+rax],xmm0 - lea rax,[32+rax] - cmp rbp,rax - ja NEAR $L$ctr_enc_bzero - - lea rsp,[rbp] - movaps xmm6,XMMWORD[64+rbp] - movaps xmm7,XMMWORD[80+rbp] - movaps xmm8,XMMWORD[96+rbp] - movaps xmm9,XMMWORD[112+rbp] - movaps xmm10,XMMWORD[128+rbp] - movaps xmm11,XMMWORD[144+rbp] - movaps xmm12,XMMWORD[160+rbp] - movaps xmm13,XMMWORD[176+rbp] - movaps xmm14,XMMWORD[192+rbp] - movaps xmm15,XMMWORD[208+rbp] - lea rsp,[160+rbp] - mov r15,QWORD[72+rsp] - mov r14,QWORD[80+rsp] - mov r13,QWORD[88+rsp] - mov r12,QWORD[96+rsp] - mov rbx,QWORD[104+rsp] - mov rax,QWORD[112+rsp] - lea rsp,[120+rsp] - mov rbp,rax -$L$ctr_enc_epilogue: - DB 0F3h,0C3h ;repret - -global bsaes_xts_encrypt - -ALIGN 16 -bsaes_xts_encrypt: - mov rax,rsp -$L$xts_enc_prologue: - push rbp - push rbx - push r12 - push r13 - push r14 - push r15 - lea rsp,[((-72))+rsp] - mov r10,QWORD[160+rsp] - mov r11,QWORD[168+rsp] - lea rsp,[((-160))+rsp] - movaps XMMWORD[64+rsp],xmm6 - movaps XMMWORD[80+rsp],xmm7 - movaps XMMWORD[96+rsp],xmm8 - movaps XMMWORD[112+rsp],xmm9 - movaps XMMWORD[128+rsp],xmm10 - movaps XMMWORD[144+rsp],xmm11 - movaps XMMWORD[160+rsp],xmm12 - movaps XMMWORD[176+rsp],xmm13 - movaps XMMWORD[192+rsp],xmm14 - movaps XMMWORD[208+rsp],xmm15 -$L$xts_enc_body: - mov rbp,rsp - mov r12,rcx - mov r13,rdx - mov r14,r8 - mov r15,r9 - - lea rcx,[r11] - lea rdx,[32+rbp] - lea r8,[r10] - call asm_AES_encrypt - - mov eax,DWORD[240+r15] - mov rbx,r14 - - mov edx,eax - shl rax,7 - sub rax,96 - sub rsp,rax - - mov rax,rsp - mov rcx,r15 - mov r10d,edx - call _bsaes_key_convert - pxor xmm7,xmm6 - movdqa XMMWORD[rax],xmm7 - - and r14,-16 - sub rsp,0x80 - movdqa xmm6,XMMWORD[32+rbp] - - pxor xmm14,xmm14 - movdqa xmm12,XMMWORD[$L$xts_magic] - pcmpgtd xmm14,xmm6 - - sub r14,0x80 - jc NEAR $L$xts_enc_short - jmp NEAR $L$xts_enc_loop - -ALIGN 16 -$L$xts_enc_loop: - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm15,xmm6 - movdqa XMMWORD[rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm0,xmm6 - movdqa XMMWORD[16+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm7,XMMWORD[r12] - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm1,xmm6 - movdqa XMMWORD[32+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm8,XMMWORD[16+r12] - pxor xmm15,xmm7 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm2,xmm6 - movdqa XMMWORD[48+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm9,XMMWORD[32+r12] - pxor xmm0,xmm8 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm3,xmm6 - movdqa XMMWORD[64+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm10,XMMWORD[48+r12] - pxor xmm1,xmm9 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm4,xmm6 - movdqa XMMWORD[80+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm11,XMMWORD[64+r12] - pxor xmm2,xmm10 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm5,xmm6 - movdqa XMMWORD[96+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm12,XMMWORD[80+r12] - pxor xmm3,xmm11 - movdqu xmm13,XMMWORD[96+r12] - pxor xmm4,xmm12 - movdqu xmm14,XMMWORD[112+r12] - lea r12,[128+r12] - movdqa XMMWORD[112+rsp],xmm6 - pxor xmm5,xmm13 - lea rax,[128+rsp] - pxor xmm6,xmm14 - mov r10d,edx - - call _bsaes_encrypt8 - - pxor xmm15,XMMWORD[rsp] - pxor xmm0,XMMWORD[16+rsp] - movdqu XMMWORD[r13],xmm15 - pxor xmm3,XMMWORD[32+rsp] - movdqu XMMWORD[16+r13],xmm0 - pxor xmm5,XMMWORD[48+rsp] - movdqu XMMWORD[32+r13],xmm3 - pxor xmm2,XMMWORD[64+rsp] - movdqu XMMWORD[48+r13],xmm5 - pxor xmm6,XMMWORD[80+rsp] - movdqu XMMWORD[64+r13],xmm2 - pxor xmm1,XMMWORD[96+rsp] - movdqu XMMWORD[80+r13],xmm6 - pxor xmm4,XMMWORD[112+rsp] - movdqu XMMWORD[96+r13],xmm1 - movdqu XMMWORD[112+r13],xmm4 - lea r13,[128+r13] - - movdqa xmm6,XMMWORD[112+rsp] - pxor xmm14,xmm14 - movdqa xmm12,XMMWORD[$L$xts_magic] - pcmpgtd xmm14,xmm6 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - - sub r14,0x80 - jnc NEAR $L$xts_enc_loop - -$L$xts_enc_short: - add r14,0x80 - jz NEAR $L$xts_enc_done - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm15,xmm6 - movdqa XMMWORD[rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm0,xmm6 - movdqa XMMWORD[16+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm7,XMMWORD[r12] - cmp r14,16 - je NEAR $L$xts_enc_1 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm1,xmm6 - movdqa XMMWORD[32+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm8,XMMWORD[16+r12] - cmp r14,32 - je NEAR $L$xts_enc_2 - pxor xmm15,xmm7 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm2,xmm6 - movdqa XMMWORD[48+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm9,XMMWORD[32+r12] - cmp r14,48 - je NEAR $L$xts_enc_3 - pxor xmm0,xmm8 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm3,xmm6 - movdqa XMMWORD[64+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm10,XMMWORD[48+r12] - cmp r14,64 - je NEAR $L$xts_enc_4 - pxor xmm1,xmm9 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm4,xmm6 - movdqa XMMWORD[80+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm11,XMMWORD[64+r12] - cmp r14,80 - je NEAR $L$xts_enc_5 - pxor xmm2,xmm10 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm5,xmm6 - movdqa XMMWORD[96+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm12,XMMWORD[80+r12] - cmp r14,96 - je NEAR $L$xts_enc_6 - pxor xmm3,xmm11 - movdqu xmm13,XMMWORD[96+r12] - pxor xmm4,xmm12 - movdqa XMMWORD[112+rsp],xmm6 - lea r12,[112+r12] - pxor xmm5,xmm13 - lea rax,[128+rsp] - mov r10d,edx - - call _bsaes_encrypt8 - - pxor xmm15,XMMWORD[rsp] - pxor xmm0,XMMWORD[16+rsp] - movdqu XMMWORD[r13],xmm15 - pxor xmm3,XMMWORD[32+rsp] - movdqu XMMWORD[16+r13],xmm0 - pxor xmm5,XMMWORD[48+rsp] - movdqu XMMWORD[32+r13],xmm3 - pxor xmm2,XMMWORD[64+rsp] - movdqu XMMWORD[48+r13],xmm5 - pxor xmm6,XMMWORD[80+rsp] - movdqu XMMWORD[64+r13],xmm2 - pxor xmm1,XMMWORD[96+rsp] - movdqu XMMWORD[80+r13],xmm6 - movdqu XMMWORD[96+r13],xmm1 - lea r13,[112+r13] - - movdqa xmm6,XMMWORD[112+rsp] - jmp NEAR $L$xts_enc_done -ALIGN 16 -$L$xts_enc_6: - pxor xmm3,xmm11 - lea r12,[96+r12] - pxor xmm4,xmm12 - lea rax,[128+rsp] - mov r10d,edx - - call _bsaes_encrypt8 - - pxor xmm15,XMMWORD[rsp] - pxor xmm0,XMMWORD[16+rsp] - movdqu XMMWORD[r13],xmm15 - pxor xmm3,XMMWORD[32+rsp] - movdqu XMMWORD[16+r13],xmm0 - pxor xmm5,XMMWORD[48+rsp] - movdqu XMMWORD[32+r13],xmm3 - pxor xmm2,XMMWORD[64+rsp] - movdqu XMMWORD[48+r13],xmm5 - pxor xmm6,XMMWORD[80+rsp] - movdqu XMMWORD[64+r13],xmm2 - movdqu XMMWORD[80+r13],xmm6 - lea r13,[96+r13] - - movdqa xmm6,XMMWORD[96+rsp] - jmp NEAR $L$xts_enc_done -ALIGN 16 -$L$xts_enc_5: - pxor xmm2,xmm10 - lea r12,[80+r12] - pxor xmm3,xmm11 - lea rax,[128+rsp] - mov r10d,edx - - call _bsaes_encrypt8 - - pxor xmm15,XMMWORD[rsp] - pxor xmm0,XMMWORD[16+rsp] - movdqu XMMWORD[r13],xmm15 - pxor xmm3,XMMWORD[32+rsp] - movdqu XMMWORD[16+r13],xmm0 - pxor xmm5,XMMWORD[48+rsp] - movdqu XMMWORD[32+r13],xmm3 - pxor xmm2,XMMWORD[64+rsp] - movdqu XMMWORD[48+r13],xmm5 - movdqu XMMWORD[64+r13],xmm2 - lea r13,[80+r13] - - movdqa xmm6,XMMWORD[80+rsp] - jmp NEAR $L$xts_enc_done -ALIGN 16 -$L$xts_enc_4: - pxor xmm1,xmm9 - lea r12,[64+r12] - pxor xmm2,xmm10 - lea rax,[128+rsp] - mov r10d,edx - - call _bsaes_encrypt8 - - pxor xmm15,XMMWORD[rsp] - pxor xmm0,XMMWORD[16+rsp] - movdqu XMMWORD[r13],xmm15 - pxor xmm3,XMMWORD[32+rsp] - movdqu XMMWORD[16+r13],xmm0 - pxor xmm5,XMMWORD[48+rsp] - movdqu XMMWORD[32+r13],xmm3 - movdqu XMMWORD[48+r13],xmm5 - lea r13,[64+r13] - - movdqa xmm6,XMMWORD[64+rsp] - jmp NEAR $L$xts_enc_done -ALIGN 16 -$L$xts_enc_3: - pxor xmm0,xmm8 - lea r12,[48+r12] - pxor xmm1,xmm9 - lea rax,[128+rsp] - mov r10d,edx - - call _bsaes_encrypt8 - - pxor xmm15,XMMWORD[rsp] - pxor xmm0,XMMWORD[16+rsp] - movdqu XMMWORD[r13],xmm15 - pxor xmm3,XMMWORD[32+rsp] - movdqu XMMWORD[16+r13],xmm0 - movdqu XMMWORD[32+r13],xmm3 - lea r13,[48+r13] - - movdqa xmm6,XMMWORD[48+rsp] - jmp NEAR $L$xts_enc_done -ALIGN 16 -$L$xts_enc_2: - pxor xmm15,xmm7 - lea r12,[32+r12] - pxor xmm0,xmm8 - lea rax,[128+rsp] - mov r10d,edx - - call _bsaes_encrypt8 - - pxor xmm15,XMMWORD[rsp] - pxor xmm0,XMMWORD[16+rsp] - movdqu XMMWORD[r13],xmm15 - movdqu XMMWORD[16+r13],xmm0 - lea r13,[32+r13] - - movdqa xmm6,XMMWORD[32+rsp] - jmp NEAR $L$xts_enc_done -ALIGN 16 -$L$xts_enc_1: - pxor xmm7,xmm15 - lea r12,[16+r12] - movdqa XMMWORD[32+rbp],xmm7 - lea rcx,[32+rbp] - lea rdx,[32+rbp] - lea r8,[r15] - call asm_AES_encrypt - pxor xmm15,XMMWORD[32+rbp] - - - - - - movdqu XMMWORD[r13],xmm15 - lea r13,[16+r13] - - movdqa xmm6,XMMWORD[16+rsp] - -$L$xts_enc_done: - and ebx,15 - jz NEAR $L$xts_enc_ret - mov rdx,r13 - -$L$xts_enc_steal: - movzx eax,BYTE[r12] - movzx ecx,BYTE[((-16))+rdx] - lea r12,[1+r12] - mov BYTE[((-16))+rdx],al - mov BYTE[rdx],cl - lea rdx,[1+rdx] - sub ebx,1 - jnz NEAR $L$xts_enc_steal - - movdqu xmm15,XMMWORD[((-16))+r13] - lea rcx,[32+rbp] - pxor xmm15,xmm6 - lea rdx,[32+rbp] - movdqa XMMWORD[32+rbp],xmm15 - lea r8,[r15] - call asm_AES_encrypt - pxor xmm6,XMMWORD[32+rbp] - movdqu XMMWORD[(-16)+r13],xmm6 - -$L$xts_enc_ret: - lea rax,[rsp] - pxor xmm0,xmm0 -$L$xts_enc_bzero: - movdqa XMMWORD[rax],xmm0 - movdqa XMMWORD[16+rax],xmm0 - lea rax,[32+rax] - cmp rbp,rax - ja NEAR $L$xts_enc_bzero - - lea rsp,[rbp] - movaps xmm6,XMMWORD[64+rbp] - movaps xmm7,XMMWORD[80+rbp] - movaps xmm8,XMMWORD[96+rbp] - movaps xmm9,XMMWORD[112+rbp] - movaps xmm10,XMMWORD[128+rbp] - movaps xmm11,XMMWORD[144+rbp] - movaps xmm12,XMMWORD[160+rbp] - movaps xmm13,XMMWORD[176+rbp] - movaps xmm14,XMMWORD[192+rbp] - movaps xmm15,XMMWORD[208+rbp] - lea rsp,[160+rbp] - mov r15,QWORD[72+rsp] - mov r14,QWORD[80+rsp] - mov r13,QWORD[88+rsp] - mov r12,QWORD[96+rsp] - mov rbx,QWORD[104+rsp] - mov rax,QWORD[112+rsp] - lea rsp,[120+rsp] - mov rbp,rax -$L$xts_enc_epilogue: - DB 0F3h,0C3h ;repret - - -global bsaes_xts_decrypt - -ALIGN 16 -bsaes_xts_decrypt: - mov rax,rsp -$L$xts_dec_prologue: - push rbp - push rbx - push r12 - push r13 - push r14 - push r15 - lea rsp,[((-72))+rsp] - mov r10,QWORD[160+rsp] - mov r11,QWORD[168+rsp] - lea rsp,[((-160))+rsp] - movaps XMMWORD[64+rsp],xmm6 - movaps XMMWORD[80+rsp],xmm7 - movaps XMMWORD[96+rsp],xmm8 - movaps XMMWORD[112+rsp],xmm9 - movaps XMMWORD[128+rsp],xmm10 - movaps XMMWORD[144+rsp],xmm11 - movaps XMMWORD[160+rsp],xmm12 - movaps XMMWORD[176+rsp],xmm13 - movaps XMMWORD[192+rsp],xmm14 - movaps XMMWORD[208+rsp],xmm15 -$L$xts_dec_body: - mov rbp,rsp - mov r12,rcx - mov r13,rdx - mov r14,r8 - mov r15,r9 - - lea rcx,[r11] - lea rdx,[32+rbp] - lea r8,[r10] - call asm_AES_encrypt - - mov eax,DWORD[240+r15] - mov rbx,r14 - - mov edx,eax - shl rax,7 - sub rax,96 - sub rsp,rax - - mov rax,rsp - mov rcx,r15 - mov r10d,edx - call _bsaes_key_convert - pxor xmm7,XMMWORD[rsp] - movdqa XMMWORD[rax],xmm6 - movdqa XMMWORD[rsp],xmm7 - - xor eax,eax - and r14,-16 - test ebx,15 - setnz al - shl rax,4 - sub r14,rax - - sub rsp,0x80 - movdqa xmm6,XMMWORD[32+rbp] - - pxor xmm14,xmm14 - movdqa xmm12,XMMWORD[$L$xts_magic] - pcmpgtd xmm14,xmm6 - - sub r14,0x80 - jc NEAR $L$xts_dec_short - jmp NEAR $L$xts_dec_loop - -ALIGN 16 -$L$xts_dec_loop: - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm15,xmm6 - movdqa XMMWORD[rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm0,xmm6 - movdqa XMMWORD[16+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm7,XMMWORD[r12] - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm1,xmm6 - movdqa XMMWORD[32+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm8,XMMWORD[16+r12] - pxor xmm15,xmm7 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm2,xmm6 - movdqa XMMWORD[48+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm9,XMMWORD[32+r12] - pxor xmm0,xmm8 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm3,xmm6 - movdqa XMMWORD[64+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm10,XMMWORD[48+r12] - pxor xmm1,xmm9 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm4,xmm6 - movdqa XMMWORD[80+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm11,XMMWORD[64+r12] - pxor xmm2,xmm10 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm5,xmm6 - movdqa XMMWORD[96+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm12,XMMWORD[80+r12] - pxor xmm3,xmm11 - movdqu xmm13,XMMWORD[96+r12] - pxor xmm4,xmm12 - movdqu xmm14,XMMWORD[112+r12] - lea r12,[128+r12] - movdqa XMMWORD[112+rsp],xmm6 - pxor xmm5,xmm13 - lea rax,[128+rsp] - pxor xmm6,xmm14 - mov r10d,edx - - call _bsaes_decrypt8 - - pxor xmm15,XMMWORD[rsp] - pxor xmm0,XMMWORD[16+rsp] - movdqu XMMWORD[r13],xmm15 - pxor xmm5,XMMWORD[32+rsp] - movdqu XMMWORD[16+r13],xmm0 - pxor xmm3,XMMWORD[48+rsp] - movdqu XMMWORD[32+r13],xmm5 - pxor xmm1,XMMWORD[64+rsp] - movdqu XMMWORD[48+r13],xmm3 - pxor xmm6,XMMWORD[80+rsp] - movdqu XMMWORD[64+r13],xmm1 - pxor xmm2,XMMWORD[96+rsp] - movdqu XMMWORD[80+r13],xmm6 - pxor xmm4,XMMWORD[112+rsp] - movdqu XMMWORD[96+r13],xmm2 - movdqu XMMWORD[112+r13],xmm4 - lea r13,[128+r13] - - movdqa xmm6,XMMWORD[112+rsp] - pxor xmm14,xmm14 - movdqa xmm12,XMMWORD[$L$xts_magic] - pcmpgtd xmm14,xmm6 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - - sub r14,0x80 - jnc NEAR $L$xts_dec_loop - -$L$xts_dec_short: - add r14,0x80 - jz NEAR $L$xts_dec_done - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm15,xmm6 - movdqa XMMWORD[rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm0,xmm6 - movdqa XMMWORD[16+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm7,XMMWORD[r12] - cmp r14,16 - je NEAR $L$xts_dec_1 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm1,xmm6 - movdqa XMMWORD[32+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm8,XMMWORD[16+r12] - cmp r14,32 - je NEAR $L$xts_dec_2 - pxor xmm15,xmm7 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm2,xmm6 - movdqa XMMWORD[48+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm9,XMMWORD[32+r12] - cmp r14,48 - je NEAR $L$xts_dec_3 - pxor xmm0,xmm8 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm3,xmm6 - movdqa XMMWORD[64+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm10,XMMWORD[48+r12] - cmp r14,64 - je NEAR $L$xts_dec_4 - pxor xmm1,xmm9 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm4,xmm6 - movdqa XMMWORD[80+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm11,XMMWORD[64+r12] - cmp r14,80 - je NEAR $L$xts_dec_5 - pxor xmm2,xmm10 - pshufd xmm13,xmm14,0x13 - pxor xmm14,xmm14 - movdqa xmm5,xmm6 - movdqa XMMWORD[96+rsp],xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - pcmpgtd xmm14,xmm6 - pxor xmm6,xmm13 - movdqu xmm12,XMMWORD[80+r12] - cmp r14,96 - je NEAR $L$xts_dec_6 - pxor xmm3,xmm11 - movdqu xmm13,XMMWORD[96+r12] - pxor xmm4,xmm12 - movdqa XMMWORD[112+rsp],xmm6 - lea r12,[112+r12] - pxor xmm5,xmm13 - lea rax,[128+rsp] - mov r10d,edx - - call _bsaes_decrypt8 - - pxor xmm15,XMMWORD[rsp] - pxor xmm0,XMMWORD[16+rsp] - movdqu XMMWORD[r13],xmm15 - pxor xmm5,XMMWORD[32+rsp] - movdqu XMMWORD[16+r13],xmm0 - pxor xmm3,XMMWORD[48+rsp] - movdqu XMMWORD[32+r13],xmm5 - pxor xmm1,XMMWORD[64+rsp] - movdqu XMMWORD[48+r13],xmm3 - pxor xmm6,XMMWORD[80+rsp] - movdqu XMMWORD[64+r13],xmm1 - pxor xmm2,XMMWORD[96+rsp] - movdqu XMMWORD[80+r13],xmm6 - movdqu XMMWORD[96+r13],xmm2 - lea r13,[112+r13] - - movdqa xmm6,XMMWORD[112+rsp] - jmp NEAR $L$xts_dec_done -ALIGN 16 -$L$xts_dec_6: - pxor xmm3,xmm11 - lea r12,[96+r12] - pxor xmm4,xmm12 - lea rax,[128+rsp] - mov r10d,edx - - call _bsaes_decrypt8 - - pxor xmm15,XMMWORD[rsp] - pxor xmm0,XMMWORD[16+rsp] - movdqu XMMWORD[r13],xmm15 - pxor xmm5,XMMWORD[32+rsp] - movdqu XMMWORD[16+r13],xmm0 - pxor xmm3,XMMWORD[48+rsp] - movdqu XMMWORD[32+r13],xmm5 - pxor xmm1,XMMWORD[64+rsp] - movdqu XMMWORD[48+r13],xmm3 - pxor xmm6,XMMWORD[80+rsp] - movdqu XMMWORD[64+r13],xmm1 - movdqu XMMWORD[80+r13],xmm6 - lea r13,[96+r13] - - movdqa xmm6,XMMWORD[96+rsp] - jmp NEAR $L$xts_dec_done -ALIGN 16 -$L$xts_dec_5: - pxor xmm2,xmm10 - lea r12,[80+r12] - pxor xmm3,xmm11 - lea rax,[128+rsp] - mov r10d,edx - - call _bsaes_decrypt8 - - pxor xmm15,XMMWORD[rsp] - pxor xmm0,XMMWORD[16+rsp] - movdqu XMMWORD[r13],xmm15 - pxor xmm5,XMMWORD[32+rsp] - movdqu XMMWORD[16+r13],xmm0 - pxor xmm3,XMMWORD[48+rsp] - movdqu XMMWORD[32+r13],xmm5 - pxor xmm1,XMMWORD[64+rsp] - movdqu XMMWORD[48+r13],xmm3 - movdqu XMMWORD[64+r13],xmm1 - lea r13,[80+r13] - - movdqa xmm6,XMMWORD[80+rsp] - jmp NEAR $L$xts_dec_done -ALIGN 16 -$L$xts_dec_4: - pxor xmm1,xmm9 - lea r12,[64+r12] - pxor xmm2,xmm10 - lea rax,[128+rsp] - mov r10d,edx - - call _bsaes_decrypt8 - - pxor xmm15,XMMWORD[rsp] - pxor xmm0,XMMWORD[16+rsp] - movdqu XMMWORD[r13],xmm15 - pxor xmm5,XMMWORD[32+rsp] - movdqu XMMWORD[16+r13],xmm0 - pxor xmm3,XMMWORD[48+rsp] - movdqu XMMWORD[32+r13],xmm5 - movdqu XMMWORD[48+r13],xmm3 - lea r13,[64+r13] - - movdqa xmm6,XMMWORD[64+rsp] - jmp NEAR $L$xts_dec_done -ALIGN 16 -$L$xts_dec_3: - pxor xmm0,xmm8 - lea r12,[48+r12] - pxor xmm1,xmm9 - lea rax,[128+rsp] - mov r10d,edx - - call _bsaes_decrypt8 - - pxor xmm15,XMMWORD[rsp] - pxor xmm0,XMMWORD[16+rsp] - movdqu XMMWORD[r13],xmm15 - pxor xmm5,XMMWORD[32+rsp] - movdqu XMMWORD[16+r13],xmm0 - movdqu XMMWORD[32+r13],xmm5 - lea r13,[48+r13] - - movdqa xmm6,XMMWORD[48+rsp] - jmp NEAR $L$xts_dec_done -ALIGN 16 -$L$xts_dec_2: - pxor xmm15,xmm7 - lea r12,[32+r12] - pxor xmm0,xmm8 - lea rax,[128+rsp] - mov r10d,edx - - call _bsaes_decrypt8 - - pxor xmm15,XMMWORD[rsp] - pxor xmm0,XMMWORD[16+rsp] - movdqu XMMWORD[r13],xmm15 - movdqu XMMWORD[16+r13],xmm0 - lea r13,[32+r13] - - movdqa xmm6,XMMWORD[32+rsp] - jmp NEAR $L$xts_dec_done -ALIGN 16 -$L$xts_dec_1: - pxor xmm7,xmm15 - lea r12,[16+r12] - movdqa XMMWORD[32+rbp],xmm7 - lea rcx,[32+rbp] - lea rdx,[32+rbp] - lea r8,[r15] - call asm_AES_decrypt - pxor xmm15,XMMWORD[32+rbp] - - - - - - movdqu XMMWORD[r13],xmm15 - lea r13,[16+r13] - - movdqa xmm6,XMMWORD[16+rsp] - -$L$xts_dec_done: - and ebx,15 - jz NEAR $L$xts_dec_ret - - pxor xmm14,xmm14 - movdqa xmm12,XMMWORD[$L$xts_magic] - pcmpgtd xmm14,xmm6 - pshufd xmm13,xmm14,0x13 - movdqa xmm5,xmm6 - paddq xmm6,xmm6 - pand xmm13,xmm12 - movdqu xmm15,XMMWORD[r12] - pxor xmm6,xmm13 - - lea rcx,[32+rbp] - pxor xmm15,xmm6 - lea rdx,[32+rbp] - movdqa XMMWORD[32+rbp],xmm15 - lea r8,[r15] - call asm_AES_decrypt - pxor xmm6,XMMWORD[32+rbp] - mov rdx,r13 - movdqu XMMWORD[r13],xmm6 - -$L$xts_dec_steal: - movzx eax,BYTE[16+r12] - movzx ecx,BYTE[rdx] - lea r12,[1+r12] - mov BYTE[rdx],al - mov BYTE[16+rdx],cl - lea rdx,[1+rdx] - sub ebx,1 - jnz NEAR $L$xts_dec_steal - - movdqu xmm15,XMMWORD[r13] - lea rcx,[32+rbp] - pxor xmm15,xmm5 - lea rdx,[32+rbp] - movdqa XMMWORD[32+rbp],xmm15 - lea r8,[r15] - call asm_AES_decrypt - pxor xmm5,XMMWORD[32+rbp] - movdqu XMMWORD[r13],xmm5 - -$L$xts_dec_ret: - lea rax,[rsp] - pxor xmm0,xmm0 -$L$xts_dec_bzero: - movdqa XMMWORD[rax],xmm0 - movdqa XMMWORD[16+rax],xmm0 - lea rax,[32+rax] - cmp rbp,rax - ja NEAR $L$xts_dec_bzero - - lea rsp,[rbp] - movaps xmm6,XMMWORD[64+rbp] - movaps xmm7,XMMWORD[80+rbp] - movaps xmm8,XMMWORD[96+rbp] - movaps xmm9,XMMWORD[112+rbp] - movaps xmm10,XMMWORD[128+rbp] - movaps xmm11,XMMWORD[144+rbp] - movaps xmm12,XMMWORD[160+rbp] - movaps xmm13,XMMWORD[176+rbp] - movaps xmm14,XMMWORD[192+rbp] - movaps xmm15,XMMWORD[208+rbp] - lea rsp,[160+rbp] - mov r15,QWORD[72+rsp] - mov r14,QWORD[80+rsp] - mov r13,QWORD[88+rsp] - mov r12,QWORD[96+rsp] - mov rbx,QWORD[104+rsp] - mov rax,QWORD[112+rsp] - lea rsp,[120+rsp] - mov rbp,rax -$L$xts_dec_epilogue: - DB 0F3h,0C3h ;repret - - -ALIGN 64 -_bsaes_const: -$L$M0ISR: - DQ 0x0a0e0206070b0f03,0x0004080c0d010509 -$L$ISRM0: - DQ 0x01040b0e0205080f,0x0306090c00070a0d -$L$ISR: - DQ 0x0504070602010003,0x0f0e0d0c080b0a09 -$L$BS0: - DQ 0x5555555555555555,0x5555555555555555 -$L$BS1: - DQ 0x3333333333333333,0x3333333333333333 -$L$BS2: - DQ 0x0f0f0f0f0f0f0f0f,0x0f0f0f0f0f0f0f0f -$L$SR: - DQ 0x0504070600030201,0x0f0e0d0c0a09080b -$L$SRM0: - DQ 0x0304090e00050a0f,0x01060b0c0207080d -$L$M0SR: - DQ 0x0a0e02060f03070b,0x0004080c05090d01 -$L$SWPUP: - DQ 0x0706050403020100,0x0c0d0e0f0b0a0908 -$L$SWPUPM0SR: - DQ 0x0a0d02060c03070b,0x0004080f05090e01 -$L$ADD1: - DQ 0x0000000000000000,0x0000000100000000 -$L$ADD2: - DQ 0x0000000000000000,0x0000000200000000 -$L$ADD3: - DQ 0x0000000000000000,0x0000000300000000 -$L$ADD4: - DQ 0x0000000000000000,0x0000000400000000 -$L$ADD5: - DQ 0x0000000000000000,0x0000000500000000 -$L$ADD6: - DQ 0x0000000000000000,0x0000000600000000 -$L$ADD7: - DQ 0x0000000000000000,0x0000000700000000 -$L$ADD8: - DQ 0x0000000000000000,0x0000000800000000 -$L$xts_magic: - DD 0x87,0,1,0 -$L$masks: - DQ 0x0101010101010101,0x0101010101010101 - DQ 0x0202020202020202,0x0202020202020202 - DQ 0x0404040404040404,0x0404040404040404 - DQ 0x0808080808080808,0x0808080808080808 -$L$M0: - DQ 0x02060a0e03070b0f,0x0004080c0105090d -$L$63: - DQ 0x6363636363636363,0x6363636363636363 -DB 66,105,116,45,115,108,105,99,101,100,32,65,69,83,32,102 -DB 111,114,32,120,56,54,95,54,52,47,83,83,83,69,51,44 -DB 32,69,109,105,108,105,97,32,75,195,164,115,112,101,114,44 -DB 32,80,101,116,101,114,32,83,99,104,119,97,98,101,44,32 -DB 65,110,100,121,32,80,111,108,121,97,107,111,118,0 -ALIGN 64 - -EXTERN __imp_RtlVirtualUnwind - -ALIGN 16 -se_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - mov rsi,QWORD[8+r9] - mov r11,QWORD[56+r9] - - mov r10d,DWORD[r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jb NEAR $L$in_prologue - - mov rax,QWORD[152+r8] - - mov r10d,DWORD[4+r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jae NEAR $L$in_prologue - - mov rax,QWORD[160+r8] - - lea rsi,[64+rax] - lea rdi,[512+r8] - mov ecx,20 - DD 0xa548f3fc - lea rax,[160+rax] - - mov rbp,QWORD[112+rax] - mov rbx,QWORD[104+rax] - mov r12,QWORD[96+rax] - mov r13,QWORD[88+rax] - mov r14,QWORD[80+rax] - mov r15,QWORD[72+rax] - lea rax,[120+rax] - mov QWORD[144+r8],rbx - mov QWORD[160+r8],rbp - mov QWORD[216+r8],r12 - mov QWORD[224+r8],r13 - mov QWORD[232+r8],r14 - mov QWORD[240+r8],r15 - -$L$in_prologue: - mov QWORD[152+r8],rax - - mov rdi,QWORD[40+r9] - mov rsi,r8 - mov ecx,154 - DD 0xa548f3fc - - mov rsi,r9 - xor rcx,rcx - mov rdx,QWORD[8+rsi] - mov r8,QWORD[rsi] - mov r9,QWORD[16+rsi] - mov r10,QWORD[40+rsi] - lea r11,[56+rsi] - lea r12,[24+rsi] - mov QWORD[32+rsp],r10 - mov QWORD[40+rsp],r11 - mov QWORD[48+rsp],r12 - mov QWORD[56+rsp],rcx - call QWORD[__imp_RtlVirtualUnwind] - - mov eax,1 - add rsp,64 - popfq - pop r15 - pop r14 - pop r13 - pop r12 - pop rbp - pop rbx - pop rdi - pop rsi - DB 0F3h,0C3h ;repret - - -section .pdata rdata align=4 -ALIGN 4 - DD $L$cbc_dec_prologue wrt ..imagebase - DD $L$cbc_dec_epilogue wrt ..imagebase - DD $L$cbc_dec_info wrt ..imagebase - - DD $L$ctr_enc_prologue wrt ..imagebase - DD $L$ctr_enc_epilogue wrt ..imagebase - DD $L$ctr_enc_info wrt ..imagebase - - DD $L$xts_enc_prologue wrt ..imagebase - DD $L$xts_enc_epilogue wrt ..imagebase - DD $L$xts_enc_info wrt ..imagebase - - DD $L$xts_dec_prologue wrt ..imagebase - DD $L$xts_dec_epilogue wrt ..imagebase - DD $L$xts_dec_info wrt ..imagebase - -section .xdata rdata align=8 -ALIGN 8 -$L$cbc_dec_info: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$cbc_dec_body wrt ..imagebase,$L$cbc_dec_epilogue wrt ..imagebase -$L$ctr_enc_info: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$ctr_enc_body wrt ..imagebase,$L$ctr_enc_epilogue wrt ..imagebase -$L$xts_enc_info: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$xts_enc_body wrt ..imagebase,$L$xts_enc_epilogue wrt ..imagebase -$L$xts_dec_info: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$xts_dec_body wrt ..imagebase,$L$xts_dec_epilogue wrt ..imagebase diff --git a/third_party/boringssl/win-x86_64/crypto/aes/vpaes-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/aes/vpaes-x86_64.asm deleted file mode 100644 index 3edde9fdbc392..0000000000000 --- a/third_party/boringssl/win-x86_64/crypto/aes/vpaes-x86_64.asm +++ /dev/null @@ -1,1137 +0,0 @@ -default rel -%define XMMWORD -%define YMMWORD -%define ZMMWORD -section .text code align=64 - - - - - - - - - - - - - - - - - - -ALIGN 16 -_vpaes_encrypt_core: - mov r9,rdx - mov r11,16 - mov eax,DWORD[240+rdx] - movdqa xmm1,xmm9 - movdqa xmm2,XMMWORD[$L$k_ipt] - pandn xmm1,xmm0 - movdqu xmm5,XMMWORD[r9] - psrld xmm1,4 - pand xmm0,xmm9 -DB 102,15,56,0,208 - movdqa xmm0,XMMWORD[(($L$k_ipt+16))] -DB 102,15,56,0,193 - pxor xmm2,xmm5 - add r9,16 - pxor xmm0,xmm2 - lea r10,[$L$k_mc_backward] - jmp NEAR $L$enc_entry - -ALIGN 16 -$L$enc_loop: - - movdqa xmm4,xmm13 - movdqa xmm0,xmm12 -DB 102,15,56,0,226 -DB 102,15,56,0,195 - pxor xmm4,xmm5 - movdqa xmm5,xmm15 - pxor xmm0,xmm4 - movdqa xmm1,XMMWORD[((-64))+r10*1+r11] -DB 102,15,56,0,234 - movdqa xmm4,XMMWORD[r10*1+r11] - movdqa xmm2,xmm14 -DB 102,15,56,0,211 - movdqa xmm3,xmm0 - pxor xmm2,xmm5 -DB 102,15,56,0,193 - add r9,16 - pxor xmm0,xmm2 -DB 102,15,56,0,220 - add r11,16 - pxor xmm3,xmm0 -DB 102,15,56,0,193 - and r11,0x30 - sub rax,1 - pxor xmm0,xmm3 - -$L$enc_entry: - - movdqa xmm1,xmm9 - movdqa xmm5,xmm11 - pandn xmm1,xmm0 - psrld xmm1,4 - pand xmm0,xmm9 -DB 102,15,56,0,232 - movdqa xmm3,xmm10 - pxor xmm0,xmm1 -DB 102,15,56,0,217 - movdqa xmm4,xmm10 - pxor xmm3,xmm5 -DB 102,15,56,0,224 - movdqa xmm2,xmm10 - pxor xmm4,xmm5 -DB 102,15,56,0,211 - movdqa xmm3,xmm10 - pxor xmm2,xmm0 -DB 102,15,56,0,220 - movdqu xmm5,XMMWORD[r9] - pxor xmm3,xmm1 - jnz NEAR $L$enc_loop - - - movdqa xmm4,XMMWORD[((-96))+r10] - movdqa xmm0,XMMWORD[((-80))+r10] -DB 102,15,56,0,226 - pxor xmm4,xmm5 -DB 102,15,56,0,195 - movdqa xmm1,XMMWORD[64+r10*1+r11] - pxor xmm0,xmm4 -DB 102,15,56,0,193 - DB 0F3h,0C3h ;repret - - - - - - - - -ALIGN 16 -_vpaes_decrypt_core: - mov r9,rdx - mov eax,DWORD[240+rdx] - movdqa xmm1,xmm9 - movdqa xmm2,XMMWORD[$L$k_dipt] - pandn xmm1,xmm0 - mov r11,rax - psrld xmm1,4 - movdqu xmm5,XMMWORD[r9] - shl r11,4 - pand xmm0,xmm9 -DB 102,15,56,0,208 - movdqa xmm0,XMMWORD[(($L$k_dipt+16))] - xor r11,0x30 - lea r10,[$L$k_dsbd] -DB 102,15,56,0,193 - and r11,0x30 - pxor xmm2,xmm5 - movdqa xmm5,XMMWORD[(($L$k_mc_forward+48))] - pxor xmm0,xmm2 - add r9,16 - add r11,r10 - jmp NEAR $L$dec_entry - -ALIGN 16 -$L$dec_loop: - - - - movdqa xmm4,XMMWORD[((-32))+r10] - movdqa xmm1,XMMWORD[((-16))+r10] -DB 102,15,56,0,226 -DB 102,15,56,0,203 - pxor xmm0,xmm4 - movdqa xmm4,XMMWORD[r10] - pxor xmm0,xmm1 - movdqa xmm1,XMMWORD[16+r10] - -DB 102,15,56,0,226 -DB 102,15,56,0,197 -DB 102,15,56,0,203 - pxor xmm0,xmm4 - movdqa xmm4,XMMWORD[32+r10] - pxor xmm0,xmm1 - movdqa xmm1,XMMWORD[48+r10] - -DB 102,15,56,0,226 -DB 102,15,56,0,197 -DB 102,15,56,0,203 - pxor xmm0,xmm4 - movdqa xmm4,XMMWORD[64+r10] - pxor xmm0,xmm1 - movdqa xmm1,XMMWORD[80+r10] - -DB 102,15,56,0,226 -DB 102,15,56,0,197 -DB 102,15,56,0,203 - pxor xmm0,xmm4 - add r9,16 -DB 102,15,58,15,237,12 - pxor xmm0,xmm1 - sub rax,1 - -$L$dec_entry: - - movdqa xmm1,xmm9 - pandn xmm1,xmm0 - movdqa xmm2,xmm11 - psrld xmm1,4 - pand xmm0,xmm9 -DB 102,15,56,0,208 - movdqa xmm3,xmm10 - pxor xmm0,xmm1 -DB 102,15,56,0,217 - movdqa xmm4,xmm10 - pxor xmm3,xmm2 -DB 102,15,56,0,224 - pxor xmm4,xmm2 - movdqa xmm2,xmm10 -DB 102,15,56,0,211 - movdqa xmm3,xmm10 - pxor xmm2,xmm0 -DB 102,15,56,0,220 - movdqu xmm0,XMMWORD[r9] - pxor xmm3,xmm1 - jnz NEAR $L$dec_loop - - - movdqa xmm4,XMMWORD[96+r10] -DB 102,15,56,0,226 - pxor xmm4,xmm0 - movdqa xmm0,XMMWORD[112+r10] - movdqa xmm2,XMMWORD[((-352))+r11] -DB 102,15,56,0,195 - pxor xmm0,xmm4 -DB 102,15,56,0,194 - DB 0F3h,0C3h ;repret - - - - - - - - -ALIGN 16 -_vpaes_schedule_core: - - - - - - call _vpaes_preheat - movdqa xmm8,XMMWORD[$L$k_rcon] - movdqu xmm0,XMMWORD[rdi] - - - movdqa xmm3,xmm0 - lea r11,[$L$k_ipt] - call _vpaes_schedule_transform - movdqa xmm7,xmm0 - - lea r10,[$L$k_sr] - test rcx,rcx - jnz NEAR $L$schedule_am_decrypting - - - movdqu XMMWORD[rdx],xmm0 - jmp NEAR $L$schedule_go - -$L$schedule_am_decrypting: - - movdqa xmm1,XMMWORD[r10*1+r8] -DB 102,15,56,0,217 - movdqu XMMWORD[rdx],xmm3 - xor r8,0x30 - -$L$schedule_go: - cmp esi,192 - ja NEAR $L$schedule_256 - je NEAR $L$schedule_192 - - - - - - - - - - -$L$schedule_128: - mov esi,10 - -$L$oop_schedule_128: - call _vpaes_schedule_round - dec rsi - jz NEAR $L$schedule_mangle_last - call _vpaes_schedule_mangle - jmp NEAR $L$oop_schedule_128 - - - - - - - - - - - - - - - - -ALIGN 16 -$L$schedule_192: - movdqu xmm0,XMMWORD[8+rdi] - call _vpaes_schedule_transform - movdqa xmm6,xmm0 - pxor xmm4,xmm4 - movhlps xmm6,xmm4 - mov esi,4 - -$L$oop_schedule_192: - call _vpaes_schedule_round -DB 102,15,58,15,198,8 - call _vpaes_schedule_mangle - call _vpaes_schedule_192_smear - call _vpaes_schedule_mangle - call _vpaes_schedule_round - dec rsi - jz NEAR $L$schedule_mangle_last - call _vpaes_schedule_mangle - call _vpaes_schedule_192_smear - jmp NEAR $L$oop_schedule_192 - - - - - - - - - - - -ALIGN 16 -$L$schedule_256: - movdqu xmm0,XMMWORD[16+rdi] - call _vpaes_schedule_transform - mov esi,7 - -$L$oop_schedule_256: - call _vpaes_schedule_mangle - movdqa xmm6,xmm0 - - - call _vpaes_schedule_round - dec rsi - jz NEAR $L$schedule_mangle_last - call _vpaes_schedule_mangle - - - pshufd xmm0,xmm0,0xFF - movdqa xmm5,xmm7 - movdqa xmm7,xmm6 - call _vpaes_schedule_low_round - movdqa xmm7,xmm5 - - jmp NEAR $L$oop_schedule_256 - - - - - - - - - - - - -ALIGN 16 -$L$schedule_mangle_last: - - lea r11,[$L$k_deskew] - test rcx,rcx - jnz NEAR $L$schedule_mangle_last_dec - - - movdqa xmm1,XMMWORD[r10*1+r8] -DB 102,15,56,0,193 - lea r11,[$L$k_opt] - add rdx,32 - -$L$schedule_mangle_last_dec: - add rdx,-16 - pxor xmm0,XMMWORD[$L$k_s63] - call _vpaes_schedule_transform - movdqu XMMWORD[rdx],xmm0 - - - pxor xmm0,xmm0 - pxor xmm1,xmm1 - pxor xmm2,xmm2 - pxor xmm3,xmm3 - pxor xmm4,xmm4 - pxor xmm5,xmm5 - pxor xmm6,xmm6 - pxor xmm7,xmm7 - DB 0F3h,0C3h ;repret - - - - - - - - - - - - - - - - - -ALIGN 16 -_vpaes_schedule_192_smear: - pshufd xmm1,xmm6,0x80 - pshufd xmm0,xmm7,0xFE - pxor xmm6,xmm1 - pxor xmm1,xmm1 - pxor xmm6,xmm0 - movdqa xmm0,xmm6 - movhlps xmm6,xmm1 - DB 0F3h,0C3h ;repret - - - - - - - - - - - - - - - - - - - - - -ALIGN 16 -_vpaes_schedule_round: - - pxor xmm1,xmm1 -DB 102,65,15,58,15,200,15 -DB 102,69,15,58,15,192,15 - pxor xmm7,xmm1 - - - pshufd xmm0,xmm0,0xFF -DB 102,15,58,15,192,1 - - - - -_vpaes_schedule_low_round: - - movdqa xmm1,xmm7 - pslldq xmm7,4 - pxor xmm7,xmm1 - movdqa xmm1,xmm7 - pslldq xmm7,8 - pxor xmm7,xmm1 - pxor xmm7,XMMWORD[$L$k_s63] - - - movdqa xmm1,xmm9 - pandn xmm1,xmm0 - psrld xmm1,4 - pand xmm0,xmm9 - movdqa xmm2,xmm11 -DB 102,15,56,0,208 - pxor xmm0,xmm1 - movdqa xmm3,xmm10 -DB 102,15,56,0,217 - pxor xmm3,xmm2 - movdqa xmm4,xmm10 -DB 102,15,56,0,224 - pxor xmm4,xmm2 - movdqa xmm2,xmm10 -DB 102,15,56,0,211 - pxor xmm2,xmm0 - movdqa xmm3,xmm10 -DB 102,15,56,0,220 - pxor xmm3,xmm1 - movdqa xmm4,xmm13 -DB 102,15,56,0,226 - movdqa xmm0,xmm12 -DB 102,15,56,0,195 - pxor xmm0,xmm4 - - - pxor xmm0,xmm7 - movdqa xmm7,xmm0 - DB 0F3h,0C3h ;repret - - - - - - - - - - - - -ALIGN 16 -_vpaes_schedule_transform: - movdqa xmm1,xmm9 - pandn xmm1,xmm0 - psrld xmm1,4 - pand xmm0,xmm9 - movdqa xmm2,XMMWORD[r11] -DB 102,15,56,0,208 - movdqa xmm0,XMMWORD[16+r11] -DB 102,15,56,0,193 - pxor xmm0,xmm2 - DB 0F3h,0C3h ;repret - - - - - - - - - - - - - - - - - - - - - - - - - - -ALIGN 16 -_vpaes_schedule_mangle: - movdqa xmm4,xmm0 - movdqa xmm5,XMMWORD[$L$k_mc_forward] - test rcx,rcx - jnz NEAR $L$schedule_mangle_dec - - - add rdx,16 - pxor xmm4,XMMWORD[$L$k_s63] -DB 102,15,56,0,229 - movdqa xmm3,xmm4 -DB 102,15,56,0,229 - pxor xmm3,xmm4 -DB 102,15,56,0,229 - pxor xmm3,xmm4 - - jmp NEAR $L$schedule_mangle_both -ALIGN 16 -$L$schedule_mangle_dec: - - lea r11,[$L$k_dksd] - movdqa xmm1,xmm9 - pandn xmm1,xmm4 - psrld xmm1,4 - pand xmm4,xmm9 - - movdqa xmm2,XMMWORD[r11] -DB 102,15,56,0,212 - movdqa xmm3,XMMWORD[16+r11] -DB 102,15,56,0,217 - pxor xmm3,xmm2 -DB 102,15,56,0,221 - - movdqa xmm2,XMMWORD[32+r11] -DB 102,15,56,0,212 - pxor xmm2,xmm3 - movdqa xmm3,XMMWORD[48+r11] -DB 102,15,56,0,217 - pxor xmm3,xmm2 -DB 102,15,56,0,221 - - movdqa xmm2,XMMWORD[64+r11] -DB 102,15,56,0,212 - pxor xmm2,xmm3 - movdqa xmm3,XMMWORD[80+r11] -DB 102,15,56,0,217 - pxor xmm3,xmm2 -DB 102,15,56,0,221 - - movdqa xmm2,XMMWORD[96+r11] -DB 102,15,56,0,212 - pxor xmm2,xmm3 - movdqa xmm3,XMMWORD[112+r11] -DB 102,15,56,0,217 - pxor xmm3,xmm2 - - add rdx,-16 - -$L$schedule_mangle_both: - movdqa xmm1,XMMWORD[r10*1+r8] -DB 102,15,56,0,217 - add r8,-16 - and r8,0x30 - movdqu XMMWORD[rdx],xmm3 - DB 0F3h,0C3h ;repret - - - - - -global vpaes_set_encrypt_key - -ALIGN 16 -vpaes_set_encrypt_key: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_vpaes_set_encrypt_key: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - - - lea rsp,[((-184))+rsp] - movaps XMMWORD[16+rsp],xmm6 - movaps XMMWORD[32+rsp],xmm7 - movaps XMMWORD[48+rsp],xmm8 - movaps XMMWORD[64+rsp],xmm9 - movaps XMMWORD[80+rsp],xmm10 - movaps XMMWORD[96+rsp],xmm11 - movaps XMMWORD[112+rsp],xmm12 - movaps XMMWORD[128+rsp],xmm13 - movaps XMMWORD[144+rsp],xmm14 - movaps XMMWORD[160+rsp],xmm15 -$L$enc_key_body: - mov eax,esi - shr eax,5 - add eax,5 - mov DWORD[240+rdx],eax - - mov ecx,0 - mov r8d,0x30 - call _vpaes_schedule_core - movaps xmm6,XMMWORD[16+rsp] - movaps xmm7,XMMWORD[32+rsp] - movaps xmm8,XMMWORD[48+rsp] - movaps xmm9,XMMWORD[64+rsp] - movaps xmm10,XMMWORD[80+rsp] - movaps xmm11,XMMWORD[96+rsp] - movaps xmm12,XMMWORD[112+rsp] - movaps xmm13,XMMWORD[128+rsp] - movaps xmm14,XMMWORD[144+rsp] - movaps xmm15,XMMWORD[160+rsp] - lea rsp,[184+rsp] -$L$enc_key_epilogue: - xor eax,eax - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_vpaes_set_encrypt_key: - -global vpaes_set_decrypt_key - -ALIGN 16 -vpaes_set_decrypt_key: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_vpaes_set_decrypt_key: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - - - lea rsp,[((-184))+rsp] - movaps XMMWORD[16+rsp],xmm6 - movaps XMMWORD[32+rsp],xmm7 - movaps XMMWORD[48+rsp],xmm8 - movaps XMMWORD[64+rsp],xmm9 - movaps XMMWORD[80+rsp],xmm10 - movaps XMMWORD[96+rsp],xmm11 - movaps XMMWORD[112+rsp],xmm12 - movaps XMMWORD[128+rsp],xmm13 - movaps XMMWORD[144+rsp],xmm14 - movaps XMMWORD[160+rsp],xmm15 -$L$dec_key_body: - mov eax,esi - shr eax,5 - add eax,5 - mov DWORD[240+rdx],eax - shl eax,4 - lea rdx,[16+rax*1+rdx] - - mov ecx,1 - mov r8d,esi - shr r8d,1 - and r8d,32 - xor r8d,32 - call _vpaes_schedule_core - movaps xmm6,XMMWORD[16+rsp] - movaps xmm7,XMMWORD[32+rsp] - movaps xmm8,XMMWORD[48+rsp] - movaps xmm9,XMMWORD[64+rsp] - movaps xmm10,XMMWORD[80+rsp] - movaps xmm11,XMMWORD[96+rsp] - movaps xmm12,XMMWORD[112+rsp] - movaps xmm13,XMMWORD[128+rsp] - movaps xmm14,XMMWORD[144+rsp] - movaps xmm15,XMMWORD[160+rsp] - lea rsp,[184+rsp] -$L$dec_key_epilogue: - xor eax,eax - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_vpaes_set_decrypt_key: - -global vpaes_encrypt - -ALIGN 16 -vpaes_encrypt: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_vpaes_encrypt: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - - - lea rsp,[((-184))+rsp] - movaps XMMWORD[16+rsp],xmm6 - movaps XMMWORD[32+rsp],xmm7 - movaps XMMWORD[48+rsp],xmm8 - movaps XMMWORD[64+rsp],xmm9 - movaps XMMWORD[80+rsp],xmm10 - movaps XMMWORD[96+rsp],xmm11 - movaps XMMWORD[112+rsp],xmm12 - movaps XMMWORD[128+rsp],xmm13 - movaps XMMWORD[144+rsp],xmm14 - movaps XMMWORD[160+rsp],xmm15 -$L$enc_body: - movdqu xmm0,XMMWORD[rdi] - call _vpaes_preheat - call _vpaes_encrypt_core - movdqu XMMWORD[rsi],xmm0 - movaps xmm6,XMMWORD[16+rsp] - movaps xmm7,XMMWORD[32+rsp] - movaps xmm8,XMMWORD[48+rsp] - movaps xmm9,XMMWORD[64+rsp] - movaps xmm10,XMMWORD[80+rsp] - movaps xmm11,XMMWORD[96+rsp] - movaps xmm12,XMMWORD[112+rsp] - movaps xmm13,XMMWORD[128+rsp] - movaps xmm14,XMMWORD[144+rsp] - movaps xmm15,XMMWORD[160+rsp] - lea rsp,[184+rsp] -$L$enc_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_vpaes_encrypt: - -global vpaes_decrypt - -ALIGN 16 -vpaes_decrypt: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_vpaes_decrypt: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - - - lea rsp,[((-184))+rsp] - movaps XMMWORD[16+rsp],xmm6 - movaps XMMWORD[32+rsp],xmm7 - movaps XMMWORD[48+rsp],xmm8 - movaps XMMWORD[64+rsp],xmm9 - movaps XMMWORD[80+rsp],xmm10 - movaps XMMWORD[96+rsp],xmm11 - movaps XMMWORD[112+rsp],xmm12 - movaps XMMWORD[128+rsp],xmm13 - movaps XMMWORD[144+rsp],xmm14 - movaps XMMWORD[160+rsp],xmm15 -$L$dec_body: - movdqu xmm0,XMMWORD[rdi] - call _vpaes_preheat - call _vpaes_decrypt_core - movdqu XMMWORD[rsi],xmm0 - movaps xmm6,XMMWORD[16+rsp] - movaps xmm7,XMMWORD[32+rsp] - movaps xmm8,XMMWORD[48+rsp] - movaps xmm9,XMMWORD[64+rsp] - movaps xmm10,XMMWORD[80+rsp] - movaps xmm11,XMMWORD[96+rsp] - movaps xmm12,XMMWORD[112+rsp] - movaps xmm13,XMMWORD[128+rsp] - movaps xmm14,XMMWORD[144+rsp] - movaps xmm15,XMMWORD[160+rsp] - lea rsp,[184+rsp] -$L$dec_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_vpaes_decrypt: -global vpaes_cbc_encrypt - -ALIGN 16 -vpaes_cbc_encrypt: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_vpaes_cbc_encrypt: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - mov r9,QWORD[48+rsp] - - - xchg rdx,rcx - sub rcx,16 - jc NEAR $L$cbc_abort - lea rsp,[((-184))+rsp] - movaps XMMWORD[16+rsp],xmm6 - movaps XMMWORD[32+rsp],xmm7 - movaps XMMWORD[48+rsp],xmm8 - movaps XMMWORD[64+rsp],xmm9 - movaps XMMWORD[80+rsp],xmm10 - movaps XMMWORD[96+rsp],xmm11 - movaps XMMWORD[112+rsp],xmm12 - movaps XMMWORD[128+rsp],xmm13 - movaps XMMWORD[144+rsp],xmm14 - movaps XMMWORD[160+rsp],xmm15 -$L$cbc_body: - movdqu xmm6,XMMWORD[r8] - sub rsi,rdi - call _vpaes_preheat - cmp r9d,0 - je NEAR $L$cbc_dec_loop - jmp NEAR $L$cbc_enc_loop -ALIGN 16 -$L$cbc_enc_loop: - movdqu xmm0,XMMWORD[rdi] - pxor xmm0,xmm6 - call _vpaes_encrypt_core - movdqa xmm6,xmm0 - movdqu XMMWORD[rdi*1+rsi],xmm0 - lea rdi,[16+rdi] - sub rcx,16 - jnc NEAR $L$cbc_enc_loop - jmp NEAR $L$cbc_done -ALIGN 16 -$L$cbc_dec_loop: - movdqu xmm0,XMMWORD[rdi] - movdqa xmm7,xmm0 - call _vpaes_decrypt_core - pxor xmm0,xmm6 - movdqa xmm6,xmm7 - movdqu XMMWORD[rdi*1+rsi],xmm0 - lea rdi,[16+rdi] - sub rcx,16 - jnc NEAR $L$cbc_dec_loop -$L$cbc_done: - movdqu XMMWORD[r8],xmm6 - movaps xmm6,XMMWORD[16+rsp] - movaps xmm7,XMMWORD[32+rsp] - movaps xmm8,XMMWORD[48+rsp] - movaps xmm9,XMMWORD[64+rsp] - movaps xmm10,XMMWORD[80+rsp] - movaps xmm11,XMMWORD[96+rsp] - movaps xmm12,XMMWORD[112+rsp] - movaps xmm13,XMMWORD[128+rsp] - movaps xmm14,XMMWORD[144+rsp] - movaps xmm15,XMMWORD[160+rsp] - lea rsp,[184+rsp] -$L$cbc_epilogue: -$L$cbc_abort: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_vpaes_cbc_encrypt: - - - - - - - -ALIGN 16 -_vpaes_preheat: - lea r10,[$L$k_s0F] - movdqa xmm10,XMMWORD[((-32))+r10] - movdqa xmm11,XMMWORD[((-16))+r10] - movdqa xmm9,XMMWORD[r10] - movdqa xmm13,XMMWORD[48+r10] - movdqa xmm12,XMMWORD[64+r10] - movdqa xmm15,XMMWORD[80+r10] - movdqa xmm14,XMMWORD[96+r10] - DB 0F3h,0C3h ;repret - - - - - - - -ALIGN 64 -_vpaes_consts: -$L$k_inv: - DQ 0x0E05060F0D080180,0x040703090A0B0C02 - DQ 0x01040A060F0B0780,0x030D0E0C02050809 - -$L$k_s0F: - DQ 0x0F0F0F0F0F0F0F0F,0x0F0F0F0F0F0F0F0F - -$L$k_ipt: - DQ 0xC2B2E8985A2A7000,0xCABAE09052227808 - DQ 0x4C01307D317C4D00,0xCD80B1FCB0FDCC81 - -$L$k_sb1: - DQ 0xB19BE18FCB503E00,0xA5DF7A6E142AF544 - DQ 0x3618D415FAE22300,0x3BF7CCC10D2ED9EF -$L$k_sb2: - DQ 0xE27A93C60B712400,0x5EB7E955BC982FCD - DQ 0x69EB88400AE12900,0xC2A163C8AB82234A -$L$k_sbo: - DQ 0xD0D26D176FBDC700,0x15AABF7AC502A878 - DQ 0xCFE474A55FBB6A00,0x8E1E90D1412B35FA - -$L$k_mc_forward: - DQ 0x0407060500030201,0x0C0F0E0D080B0A09 - DQ 0x080B0A0904070605,0x000302010C0F0E0D - DQ 0x0C0F0E0D080B0A09,0x0407060500030201 - DQ 0x000302010C0F0E0D,0x080B0A0904070605 - -$L$k_mc_backward: - DQ 0x0605040702010003,0x0E0D0C0F0A09080B - DQ 0x020100030E0D0C0F,0x0A09080B06050407 - DQ 0x0E0D0C0F0A09080B,0x0605040702010003 - DQ 0x0A09080B06050407,0x020100030E0D0C0F - -$L$k_sr: - DQ 0x0706050403020100,0x0F0E0D0C0B0A0908 - DQ 0x030E09040F0A0500,0x0B06010C07020D08 - DQ 0x0F060D040B020900,0x070E050C030A0108 - DQ 0x0B0E0104070A0D00,0x0306090C0F020508 - -$L$k_rcon: - DQ 0x1F8391B9AF9DEEB6,0x702A98084D7C7D81 - -$L$k_s63: - DQ 0x5B5B5B5B5B5B5B5B,0x5B5B5B5B5B5B5B5B - -$L$k_opt: - DQ 0xFF9F4929D6B66000,0xF7974121DEBE6808 - DQ 0x01EDBD5150BCEC00,0xE10D5DB1B05C0CE0 - -$L$k_deskew: - DQ 0x07E4A34047A4E300,0x1DFEB95A5DBEF91A - DQ 0x5F36B5DC83EA6900,0x2841C2ABF49D1E77 - - - - - -$L$k_dksd: - DQ 0xFEB91A5DA3E44700,0x0740E3A45A1DBEF9 - DQ 0x41C277F4B5368300,0x5FDC69EAAB289D1E -$L$k_dksb: - DQ 0x9A4FCA1F8550D500,0x03D653861CC94C99 - DQ 0x115BEDA7B6FC4A00,0xD993256F7E3482C8 -$L$k_dkse: - DQ 0xD5031CCA1FC9D600,0x53859A4C994F5086 - DQ 0xA23196054FDC7BE8,0xCD5EF96A20B31487 -$L$k_dks9: - DQ 0xB6116FC87ED9A700,0x4AED933482255BFC - DQ 0x4576516227143300,0x8BB89FACE9DAFDCE - - - - - -$L$k_dipt: - DQ 0x0F505B040B545F00,0x154A411E114E451A - DQ 0x86E383E660056500,0x12771772F491F194 - -$L$k_dsb9: - DQ 0x851C03539A86D600,0xCAD51F504F994CC9 - DQ 0xC03B1789ECD74900,0x725E2C9EB2FBA565 -$L$k_dsbd: - DQ 0x7D57CCDFE6B1A200,0xF56E9B13882A4439 - DQ 0x3CE2FAF724C6CB00,0x2931180D15DEEFD3 -$L$k_dsbb: - DQ 0xD022649296B44200,0x602646F6B0F2D404 - DQ 0xC19498A6CD596700,0xF3FF0C3E3255AA6B -$L$k_dsbe: - DQ 0x46F2929626D4D000,0x2242600464B4F6B0 - DQ 0x0C55A6CDFFAAC100,0x9467F36B98593E32 -$L$k_dsbo: - DQ 0x1387EA537EF94000,0xC7AA6DB9D4943E2D - DQ 0x12D7560F93441D00,0xCA4B8159D8C58E9C -DB 86,101,99,116,111,114,32,80,101,114,109,117,116,97,116,105 -DB 111,110,32,65,69,83,32,102,111,114,32,120,56,54,95,54 -DB 52,47,83,83,83,69,51,44,32,77,105,107,101,32,72,97 -DB 109,98,117,114,103,32,40,83,116,97,110,102,111,114,100,32 -DB 85,110,105,118,101,114,115,105,116,121,41,0 -ALIGN 64 - -EXTERN __imp_RtlVirtualUnwind - -ALIGN 16 -se_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - mov rsi,QWORD[8+r9] - mov r11,QWORD[56+r9] - - mov r10d,DWORD[r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jb NEAR $L$in_prologue - - mov rax,QWORD[152+r8] - - mov r10d,DWORD[4+r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jae NEAR $L$in_prologue - - lea rsi,[16+rax] - lea rdi,[512+r8] - mov ecx,20 - DD 0xa548f3fc - lea rax,[184+rax] - -$L$in_prologue: - mov rdi,QWORD[8+rax] - mov rsi,QWORD[16+rax] - mov QWORD[152+r8],rax - mov QWORD[168+r8],rsi - mov QWORD[176+r8],rdi - - mov rdi,QWORD[40+r9] - mov rsi,r8 - mov ecx,154 - DD 0xa548f3fc - - mov rsi,r9 - xor rcx,rcx - mov rdx,QWORD[8+rsi] - mov r8,QWORD[rsi] - mov r9,QWORD[16+rsi] - mov r10,QWORD[40+rsi] - lea r11,[56+rsi] - lea r12,[24+rsi] - mov QWORD[32+rsp],r10 - mov QWORD[40+rsp],r11 - mov QWORD[48+rsp],r12 - mov QWORD[56+rsp],rcx - call QWORD[__imp_RtlVirtualUnwind] - - mov eax,1 - add rsp,64 - popfq - pop r15 - pop r14 - pop r13 - pop r12 - pop rbp - pop rbx - pop rdi - pop rsi - DB 0F3h,0C3h ;repret - - -section .pdata rdata align=4 -ALIGN 4 - DD $L$SEH_begin_vpaes_set_encrypt_key wrt ..imagebase - DD $L$SEH_end_vpaes_set_encrypt_key wrt ..imagebase - DD $L$SEH_info_vpaes_set_encrypt_key wrt ..imagebase - - DD $L$SEH_begin_vpaes_set_decrypt_key wrt ..imagebase - DD $L$SEH_end_vpaes_set_decrypt_key wrt ..imagebase - DD $L$SEH_info_vpaes_set_decrypt_key wrt ..imagebase - - DD $L$SEH_begin_vpaes_encrypt wrt ..imagebase - DD $L$SEH_end_vpaes_encrypt wrt ..imagebase - DD $L$SEH_info_vpaes_encrypt wrt ..imagebase - - DD $L$SEH_begin_vpaes_decrypt wrt ..imagebase - DD $L$SEH_end_vpaes_decrypt wrt ..imagebase - DD $L$SEH_info_vpaes_decrypt wrt ..imagebase - - DD $L$SEH_begin_vpaes_cbc_encrypt wrt ..imagebase - DD $L$SEH_end_vpaes_cbc_encrypt wrt ..imagebase - DD $L$SEH_info_vpaes_cbc_encrypt wrt ..imagebase - -section .xdata rdata align=8 -ALIGN 8 -$L$SEH_info_vpaes_set_encrypt_key: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$enc_key_body wrt ..imagebase,$L$enc_key_epilogue wrt ..imagebase -$L$SEH_info_vpaes_set_decrypt_key: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$dec_key_body wrt ..imagebase,$L$dec_key_epilogue wrt ..imagebase -$L$SEH_info_vpaes_encrypt: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$enc_body wrt ..imagebase,$L$enc_epilogue wrt ..imagebase -$L$SEH_info_vpaes_decrypt: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$dec_body wrt ..imagebase,$L$dec_epilogue wrt ..imagebase -$L$SEH_info_vpaes_cbc_encrypt: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$cbc_body wrt ..imagebase,$L$cbc_epilogue wrt ..imagebase diff --git a/third_party/boringssl/win-x86_64/crypto/bn/rsaz-avx2.asm b/third_party/boringssl/win-x86_64/crypto/bn/rsaz-avx2.asm deleted file mode 100644 index 45d0fd46320ef..0000000000000 --- a/third_party/boringssl/win-x86_64/crypto/bn/rsaz-avx2.asm +++ /dev/null @@ -1,30 +0,0 @@ -default rel -%define XMMWORD -%define YMMWORD -%define ZMMWORD -section .text code align=64 - - -global rsaz_avx2_eligible - -rsaz_avx2_eligible: - xor eax,eax - DB 0F3h,0C3h ;repret - - -global rsaz_1024_sqr_avx2 -global rsaz_1024_mul_avx2 -global rsaz_1024_norm2red_avx2 -global rsaz_1024_red2norm_avx2 -global rsaz_1024_scatter5_avx2 -global rsaz_1024_gather5_avx2 - -rsaz_1024_sqr_avx2: -rsaz_1024_mul_avx2: -rsaz_1024_norm2red_avx2: -rsaz_1024_red2norm_avx2: -rsaz_1024_scatter5_avx2: -rsaz_1024_gather5_avx2: -DB 0x0f,0x0b - DB 0F3h,0C3h ;repret - diff --git a/third_party/boringssl/win-x86_64/crypto/bn/rsaz-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/bn/rsaz-x86_64.asm deleted file mode 100644 index 04d5e3915afb4..0000000000000 --- a/third_party/boringssl/win-x86_64/crypto/bn/rsaz-x86_64.asm +++ /dev/null @@ -1,1320 +0,0 @@ -default rel -%define XMMWORD -%define YMMWORD -%define ZMMWORD -section .text code align=64 - - -EXTERN OPENSSL_ia32cap_P - -global rsaz_512_sqr - -ALIGN 32 -rsaz_512_sqr: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_rsaz_512_sqr: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - - - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - - sub rsp,128+24 -$L$sqr_body: - mov rbp,rdx - mov rdx,QWORD[rsi] - mov rax,QWORD[8+rsi] - mov QWORD[128+rsp],rcx - jmp NEAR $L$oop_sqr - -ALIGN 32 -$L$oop_sqr: - mov DWORD[((128+8))+rsp],r8d - - mov rbx,rdx - mul rdx - mov r8,rax - mov rax,QWORD[16+rsi] - mov r9,rdx - - mul rbx - add r9,rax - mov rax,QWORD[24+rsi] - mov r10,rdx - adc r10,0 - - mul rbx - add r10,rax - mov rax,QWORD[32+rsi] - mov r11,rdx - adc r11,0 - - mul rbx - add r11,rax - mov rax,QWORD[40+rsi] - mov r12,rdx - adc r12,0 - - mul rbx - add r12,rax - mov rax,QWORD[48+rsi] - mov r13,rdx - adc r13,0 - - mul rbx - add r13,rax - mov rax,QWORD[56+rsi] - mov r14,rdx - adc r14,0 - - mul rbx - add r14,rax - mov rax,rbx - mov r15,rdx - adc r15,0 - - add r8,r8 - mov rcx,r9 - adc r9,r9 - - mul rax - mov QWORD[rsp],rax - add r8,rdx - adc r9,0 - - mov QWORD[8+rsp],r8 - shr rcx,63 - - - mov r8,QWORD[8+rsi] - mov rax,QWORD[16+rsi] - mul r8 - add r10,rax - mov rax,QWORD[24+rsi] - mov rbx,rdx - adc rbx,0 - - mul r8 - add r11,rax - mov rax,QWORD[32+rsi] - adc rdx,0 - add r11,rbx - mov rbx,rdx - adc rbx,0 - - mul r8 - add r12,rax - mov rax,QWORD[40+rsi] - adc rdx,0 - add r12,rbx - mov rbx,rdx - adc rbx,0 - - mul r8 - add r13,rax - mov rax,QWORD[48+rsi] - adc rdx,0 - add r13,rbx - mov rbx,rdx - adc rbx,0 - - mul r8 - add r14,rax - mov rax,QWORD[56+rsi] - adc rdx,0 - add r14,rbx - mov rbx,rdx - adc rbx,0 - - mul r8 - add r15,rax - mov rax,r8 - adc rdx,0 - add r15,rbx - mov r8,rdx - mov rdx,r10 - adc r8,0 - - add rdx,rdx - lea r10,[r10*2+rcx] - mov rbx,r11 - adc r11,r11 - - mul rax - add r9,rax - adc r10,rdx - adc r11,0 - - mov QWORD[16+rsp],r9 - mov QWORD[24+rsp],r10 - shr rbx,63 - - - mov r9,QWORD[16+rsi] - mov rax,QWORD[24+rsi] - mul r9 - add r12,rax - mov rax,QWORD[32+rsi] - mov rcx,rdx - adc rcx,0 - - mul r9 - add r13,rax - mov rax,QWORD[40+rsi] - adc rdx,0 - add r13,rcx - mov rcx,rdx - adc rcx,0 - - mul r9 - add r14,rax - mov rax,QWORD[48+rsi] - adc rdx,0 - add r14,rcx - mov rcx,rdx - adc rcx,0 - - mul r9 - mov r10,r12 - lea r12,[r12*2+rbx] - add r15,rax - mov rax,QWORD[56+rsi] - adc rdx,0 - add r15,rcx - mov rcx,rdx - adc rcx,0 - - mul r9 - shr r10,63 - add r8,rax - mov rax,r9 - adc rdx,0 - add r8,rcx - mov r9,rdx - adc r9,0 - - mov rcx,r13 - lea r13,[r13*2+r10] - - mul rax - add r11,rax - adc r12,rdx - adc r13,0 - - mov QWORD[32+rsp],r11 - mov QWORD[40+rsp],r12 - shr rcx,63 - - - mov r10,QWORD[24+rsi] - mov rax,QWORD[32+rsi] - mul r10 - add r14,rax - mov rax,QWORD[40+rsi] - mov rbx,rdx - adc rbx,0 - - mul r10 - add r15,rax - mov rax,QWORD[48+rsi] - adc rdx,0 - add r15,rbx - mov rbx,rdx - adc rbx,0 - - mul r10 - mov r12,r14 - lea r14,[r14*2+rcx] - add r8,rax - mov rax,QWORD[56+rsi] - adc rdx,0 - add r8,rbx - mov rbx,rdx - adc rbx,0 - - mul r10 - shr r12,63 - add r9,rax - mov rax,r10 - adc rdx,0 - add r9,rbx - mov r10,rdx - adc r10,0 - - mov rbx,r15 - lea r15,[r15*2+r12] - - mul rax - add r13,rax - adc r14,rdx - adc r15,0 - - mov QWORD[48+rsp],r13 - mov QWORD[56+rsp],r14 - shr rbx,63 - - - mov r11,QWORD[32+rsi] - mov rax,QWORD[40+rsi] - mul r11 - add r8,rax - mov rax,QWORD[48+rsi] - mov rcx,rdx - adc rcx,0 - - mul r11 - add r9,rax - mov rax,QWORD[56+rsi] - adc rdx,0 - mov r12,r8 - lea r8,[r8*2+rbx] - add r9,rcx - mov rcx,rdx - adc rcx,0 - - mul r11 - shr r12,63 - add r10,rax - mov rax,r11 - adc rdx,0 - add r10,rcx - mov r11,rdx - adc r11,0 - - mov rcx,r9 - lea r9,[r9*2+r12] - - mul rax - add r15,rax - adc r8,rdx - adc r9,0 - - mov QWORD[64+rsp],r15 - mov QWORD[72+rsp],r8 - shr rcx,63 - - - mov r12,QWORD[40+rsi] - mov rax,QWORD[48+rsi] - mul r12 - add r10,rax - mov rax,QWORD[56+rsi] - mov rbx,rdx - adc rbx,0 - - mul r12 - add r11,rax - mov rax,r12 - mov r15,r10 - lea r10,[r10*2+rcx] - adc rdx,0 - shr r15,63 - add r11,rbx - mov r12,rdx - adc r12,0 - - mov rbx,r11 - lea r11,[r11*2+r15] - - mul rax - add r9,rax - adc r10,rdx - adc r11,0 - - mov QWORD[80+rsp],r9 - mov QWORD[88+rsp],r10 - - - mov r13,QWORD[48+rsi] - mov rax,QWORD[56+rsi] - mul r13 - add r12,rax - mov rax,r13 - mov r13,rdx - adc r13,0 - - xor r14,r14 - shl rbx,1 - adc r12,r12 - adc r13,r13 - adc r14,r14 - - mul rax - add r11,rax - adc r12,rdx - adc r13,0 - - mov QWORD[96+rsp],r11 - mov QWORD[104+rsp],r12 - - - mov rax,QWORD[56+rsi] - mul rax - add r13,rax - adc rdx,0 - - add r14,rdx - - mov QWORD[112+rsp],r13 - mov QWORD[120+rsp],r14 - - mov r8,QWORD[rsp] - mov r9,QWORD[8+rsp] - mov r10,QWORD[16+rsp] - mov r11,QWORD[24+rsp] - mov r12,QWORD[32+rsp] - mov r13,QWORD[40+rsp] - mov r14,QWORD[48+rsp] - mov r15,QWORD[56+rsp] - - call __rsaz_512_reduce - - add r8,QWORD[64+rsp] - adc r9,QWORD[72+rsp] - adc r10,QWORD[80+rsp] - adc r11,QWORD[88+rsp] - adc r12,QWORD[96+rsp] - adc r13,QWORD[104+rsp] - adc r14,QWORD[112+rsp] - adc r15,QWORD[120+rsp] - sbb rcx,rcx - - call __rsaz_512_subtract - - mov rdx,r8 - mov rax,r9 - mov r8d,DWORD[((128+8))+rsp] - mov rsi,rdi - - dec r8d - jnz NEAR $L$oop_sqr - - lea rax,[((128+24+48))+rsp] - mov r15,QWORD[((-48))+rax] - mov r14,QWORD[((-40))+rax] - mov r13,QWORD[((-32))+rax] - mov r12,QWORD[((-24))+rax] - mov rbp,QWORD[((-16))+rax] - mov rbx,QWORD[((-8))+rax] - lea rsp,[rax] -$L$sqr_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_rsaz_512_sqr: -global rsaz_512_mul - -ALIGN 32 -rsaz_512_mul: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_rsaz_512_mul: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - - - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - - sub rsp,128+24 -$L$mul_body: -DB 102,72,15,110,199 -DB 102,72,15,110,201 - mov QWORD[128+rsp],r8 - mov rbx,QWORD[rdx] - mov rbp,rdx - call __rsaz_512_mul - -DB 102,72,15,126,199 -DB 102,72,15,126,205 - - mov r8,QWORD[rsp] - mov r9,QWORD[8+rsp] - mov r10,QWORD[16+rsp] - mov r11,QWORD[24+rsp] - mov r12,QWORD[32+rsp] - mov r13,QWORD[40+rsp] - mov r14,QWORD[48+rsp] - mov r15,QWORD[56+rsp] - - call __rsaz_512_reduce - add r8,QWORD[64+rsp] - adc r9,QWORD[72+rsp] - adc r10,QWORD[80+rsp] - adc r11,QWORD[88+rsp] - adc r12,QWORD[96+rsp] - adc r13,QWORD[104+rsp] - adc r14,QWORD[112+rsp] - adc r15,QWORD[120+rsp] - sbb rcx,rcx - - call __rsaz_512_subtract - - lea rax,[((128+24+48))+rsp] - mov r15,QWORD[((-48))+rax] - mov r14,QWORD[((-40))+rax] - mov r13,QWORD[((-32))+rax] - mov r12,QWORD[((-24))+rax] - mov rbp,QWORD[((-16))+rax] - mov rbx,QWORD[((-8))+rax] - lea rsp,[rax] -$L$mul_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_rsaz_512_mul: -global rsaz_512_mul_gather4 - -ALIGN 32 -rsaz_512_mul_gather4: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_rsaz_512_mul_gather4: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - mov r9,QWORD[48+rsp] - - - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - - mov r9d,r9d - sub rsp,128+24 -$L$mul_gather4_body: - mov eax,DWORD[64+r9*4+rdx] -DB 102,72,15,110,199 - mov ebx,DWORD[r9*4+rdx] -DB 102,72,15,110,201 - mov QWORD[128+rsp],r8 - - shl rax,32 - or rbx,rax - mov rax,QWORD[rsi] - mov rcx,QWORD[8+rsi] - lea rbp,[128+r9*4+rdx] - mul rbx - mov QWORD[rsp],rax - mov rax,rcx - mov r8,rdx - - mul rbx - movd xmm4,DWORD[rbp] - add r8,rax - mov rax,QWORD[16+rsi] - mov r9,rdx - adc r9,0 - - mul rbx - movd xmm5,DWORD[64+rbp] - add r9,rax - mov rax,QWORD[24+rsi] - mov r10,rdx - adc r10,0 - - mul rbx - pslldq xmm5,4 - add r10,rax - mov rax,QWORD[32+rsi] - mov r11,rdx - adc r11,0 - - mul rbx - por xmm4,xmm5 - add r11,rax - mov rax,QWORD[40+rsi] - mov r12,rdx - adc r12,0 - - mul rbx - add r12,rax - mov rax,QWORD[48+rsi] - mov r13,rdx - adc r13,0 - - mul rbx - lea rbp,[128+rbp] - add r13,rax - mov rax,QWORD[56+rsi] - mov r14,rdx - adc r14,0 - - mul rbx -DB 102,72,15,126,227 - add r14,rax - mov rax,QWORD[rsi] - mov r15,rdx - adc r15,0 - - lea rdi,[8+rsp] - mov ecx,7 - jmp NEAR $L$oop_mul_gather - -ALIGN 32 -$L$oop_mul_gather: - mul rbx - add r8,rax - mov rax,QWORD[8+rsi] - mov QWORD[rdi],r8 - mov r8,rdx - adc r8,0 - - mul rbx - movd xmm4,DWORD[rbp] - add r9,rax - mov rax,QWORD[16+rsi] - adc rdx,0 - add r8,r9 - mov r9,rdx - adc r9,0 - - mul rbx - movd xmm5,DWORD[64+rbp] - add r10,rax - mov rax,QWORD[24+rsi] - adc rdx,0 - add r9,r10 - mov r10,rdx - adc r10,0 - - mul rbx - pslldq xmm5,4 - add r11,rax - mov rax,QWORD[32+rsi] - adc rdx,0 - add r10,r11 - mov r11,rdx - adc r11,0 - - mul rbx - por xmm4,xmm5 - add r12,rax - mov rax,QWORD[40+rsi] - adc rdx,0 - add r11,r12 - mov r12,rdx - adc r12,0 - - mul rbx - add r13,rax - mov rax,QWORD[48+rsi] - adc rdx,0 - add r12,r13 - mov r13,rdx - adc r13,0 - - mul rbx - add r14,rax - mov rax,QWORD[56+rsi] - adc rdx,0 - add r13,r14 - mov r14,rdx - adc r14,0 - - mul rbx -DB 102,72,15,126,227 - add r15,rax - mov rax,QWORD[rsi] - adc rdx,0 - add r14,r15 - mov r15,rdx - adc r15,0 - - lea rbp,[128+rbp] - lea rdi,[8+rdi] - - dec ecx - jnz NEAR $L$oop_mul_gather - - mov QWORD[rdi],r8 - mov QWORD[8+rdi],r9 - mov QWORD[16+rdi],r10 - mov QWORD[24+rdi],r11 - mov QWORD[32+rdi],r12 - mov QWORD[40+rdi],r13 - mov QWORD[48+rdi],r14 - mov QWORD[56+rdi],r15 - -DB 102,72,15,126,199 -DB 102,72,15,126,205 - - mov r8,QWORD[rsp] - mov r9,QWORD[8+rsp] - mov r10,QWORD[16+rsp] - mov r11,QWORD[24+rsp] - mov r12,QWORD[32+rsp] - mov r13,QWORD[40+rsp] - mov r14,QWORD[48+rsp] - mov r15,QWORD[56+rsp] - - call __rsaz_512_reduce - add r8,QWORD[64+rsp] - adc r9,QWORD[72+rsp] - adc r10,QWORD[80+rsp] - adc r11,QWORD[88+rsp] - adc r12,QWORD[96+rsp] - adc r13,QWORD[104+rsp] - adc r14,QWORD[112+rsp] - adc r15,QWORD[120+rsp] - sbb rcx,rcx - - call __rsaz_512_subtract - - lea rax,[((128+24+48))+rsp] - mov r15,QWORD[((-48))+rax] - mov r14,QWORD[((-40))+rax] - mov r13,QWORD[((-32))+rax] - mov r12,QWORD[((-24))+rax] - mov rbp,QWORD[((-16))+rax] - mov rbx,QWORD[((-8))+rax] - lea rsp,[rax] -$L$mul_gather4_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_rsaz_512_mul_gather4: -global rsaz_512_mul_scatter4 - -ALIGN 32 -rsaz_512_mul_scatter4: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_rsaz_512_mul_scatter4: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - mov r9,QWORD[48+rsp] - - - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - - mov r9d,r9d - sub rsp,128+24 -$L$mul_scatter4_body: - lea r8,[r9*4+r8] -DB 102,72,15,110,199 -DB 102,72,15,110,202 -DB 102,73,15,110,208 - mov QWORD[128+rsp],rcx - - mov rbp,rdi - mov rbx,QWORD[rdi] - call __rsaz_512_mul - -DB 102,72,15,126,199 -DB 102,72,15,126,205 - - mov r8,QWORD[rsp] - mov r9,QWORD[8+rsp] - mov r10,QWORD[16+rsp] - mov r11,QWORD[24+rsp] - mov r12,QWORD[32+rsp] - mov r13,QWORD[40+rsp] - mov r14,QWORD[48+rsp] - mov r15,QWORD[56+rsp] - - call __rsaz_512_reduce - add r8,QWORD[64+rsp] - adc r9,QWORD[72+rsp] - adc r10,QWORD[80+rsp] - adc r11,QWORD[88+rsp] - adc r12,QWORD[96+rsp] - adc r13,QWORD[104+rsp] - adc r14,QWORD[112+rsp] - adc r15,QWORD[120+rsp] -DB 102,72,15,126,214 - sbb rcx,rcx - - call __rsaz_512_subtract - - mov DWORD[rsi],r8d - shr r8,32 - mov DWORD[128+rsi],r9d - shr r9,32 - mov DWORD[256+rsi],r10d - shr r10,32 - mov DWORD[384+rsi],r11d - shr r11,32 - mov DWORD[512+rsi],r12d - shr r12,32 - mov DWORD[640+rsi],r13d - shr r13,32 - mov DWORD[768+rsi],r14d - shr r14,32 - mov DWORD[896+rsi],r15d - shr r15,32 - mov DWORD[64+rsi],r8d - mov DWORD[192+rsi],r9d - mov DWORD[320+rsi],r10d - mov DWORD[448+rsi],r11d - mov DWORD[576+rsi],r12d - mov DWORD[704+rsi],r13d - mov DWORD[832+rsi],r14d - mov DWORD[960+rsi],r15d - - lea rax,[((128+24+48))+rsp] - mov r15,QWORD[((-48))+rax] - mov r14,QWORD[((-40))+rax] - mov r13,QWORD[((-32))+rax] - mov r12,QWORD[((-24))+rax] - mov rbp,QWORD[((-16))+rax] - mov rbx,QWORD[((-8))+rax] - lea rsp,[rax] -$L$mul_scatter4_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_rsaz_512_mul_scatter4: -global rsaz_512_mul_by_one - -ALIGN 32 -rsaz_512_mul_by_one: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_rsaz_512_mul_by_one: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - - - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - - sub rsp,128+24 -$L$mul_by_one_body: - mov rbp,rdx - mov QWORD[128+rsp],rcx - - mov r8,QWORD[rsi] - pxor xmm0,xmm0 - mov r9,QWORD[8+rsi] - mov r10,QWORD[16+rsi] - mov r11,QWORD[24+rsi] - mov r12,QWORD[32+rsi] - mov r13,QWORD[40+rsi] - mov r14,QWORD[48+rsi] - mov r15,QWORD[56+rsi] - - movdqa XMMWORD[rsp],xmm0 - movdqa XMMWORD[16+rsp],xmm0 - movdqa XMMWORD[32+rsp],xmm0 - movdqa XMMWORD[48+rsp],xmm0 - movdqa XMMWORD[64+rsp],xmm0 - movdqa XMMWORD[80+rsp],xmm0 - movdqa XMMWORD[96+rsp],xmm0 - call __rsaz_512_reduce - mov QWORD[rdi],r8 - mov QWORD[8+rdi],r9 - mov QWORD[16+rdi],r10 - mov QWORD[24+rdi],r11 - mov QWORD[32+rdi],r12 - mov QWORD[40+rdi],r13 - mov QWORD[48+rdi],r14 - mov QWORD[56+rdi],r15 - - lea rax,[((128+24+48))+rsp] - mov r15,QWORD[((-48))+rax] - mov r14,QWORD[((-40))+rax] - mov r13,QWORD[((-32))+rax] - mov r12,QWORD[((-24))+rax] - mov rbp,QWORD[((-16))+rax] - mov rbx,QWORD[((-8))+rax] - lea rsp,[rax] -$L$mul_by_one_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_rsaz_512_mul_by_one: - -ALIGN 32 -__rsaz_512_reduce: - mov rbx,r8 - imul rbx,QWORD[((128+8))+rsp] - mov rax,QWORD[rbp] - mov ecx,8 - jmp NEAR $L$reduction_loop - -ALIGN 32 -$L$reduction_loop: - mul rbx - mov rax,QWORD[8+rbp] - neg r8 - mov r8,rdx - adc r8,0 - - mul rbx - add r9,rax - mov rax,QWORD[16+rbp] - adc rdx,0 - add r8,r9 - mov r9,rdx - adc r9,0 - - mul rbx - add r10,rax - mov rax,QWORD[24+rbp] - adc rdx,0 - add r9,r10 - mov r10,rdx - adc r10,0 - - mul rbx - add r11,rax - mov rax,QWORD[32+rbp] - adc rdx,0 - add r10,r11 - mov rsi,QWORD[((128+8))+rsp] - - - adc rdx,0 - mov r11,rdx - - mul rbx - add r12,rax - mov rax,QWORD[40+rbp] - adc rdx,0 - imul rsi,r8 - add r11,r12 - mov r12,rdx - adc r12,0 - - mul rbx - add r13,rax - mov rax,QWORD[48+rbp] - adc rdx,0 - add r12,r13 - mov r13,rdx - adc r13,0 - - mul rbx - add r14,rax - mov rax,QWORD[56+rbp] - adc rdx,0 - add r13,r14 - mov r14,rdx - adc r14,0 - - mul rbx - mov rbx,rsi - add r15,rax - mov rax,QWORD[rbp] - adc rdx,0 - add r14,r15 - mov r15,rdx - adc r15,0 - - dec ecx - jne NEAR $L$reduction_loop - - DB 0F3h,0C3h ;repret - - -ALIGN 32 -__rsaz_512_subtract: - mov QWORD[rdi],r8 - mov QWORD[8+rdi],r9 - mov QWORD[16+rdi],r10 - mov QWORD[24+rdi],r11 - mov QWORD[32+rdi],r12 - mov QWORD[40+rdi],r13 - mov QWORD[48+rdi],r14 - mov QWORD[56+rdi],r15 - - mov r8,QWORD[rbp] - mov r9,QWORD[8+rbp] - neg r8 - not r9 - and r8,rcx - mov r10,QWORD[16+rbp] - and r9,rcx - not r10 - mov r11,QWORD[24+rbp] - and r10,rcx - not r11 - mov r12,QWORD[32+rbp] - and r11,rcx - not r12 - mov r13,QWORD[40+rbp] - and r12,rcx - not r13 - mov r14,QWORD[48+rbp] - and r13,rcx - not r14 - mov r15,QWORD[56+rbp] - and r14,rcx - not r15 - and r15,rcx - - add r8,QWORD[rdi] - adc r9,QWORD[8+rdi] - adc r10,QWORD[16+rdi] - adc r11,QWORD[24+rdi] - adc r12,QWORD[32+rdi] - adc r13,QWORD[40+rdi] - adc r14,QWORD[48+rdi] - adc r15,QWORD[56+rdi] - - mov QWORD[rdi],r8 - mov QWORD[8+rdi],r9 - mov QWORD[16+rdi],r10 - mov QWORD[24+rdi],r11 - mov QWORD[32+rdi],r12 - mov QWORD[40+rdi],r13 - mov QWORD[48+rdi],r14 - mov QWORD[56+rdi],r15 - - DB 0F3h,0C3h ;repret - - -ALIGN 32 -__rsaz_512_mul: - lea rdi,[8+rsp] - - mov rax,QWORD[rsi] - mul rbx - mov QWORD[rdi],rax - mov rax,QWORD[8+rsi] - mov r8,rdx - - mul rbx - add r8,rax - mov rax,QWORD[16+rsi] - mov r9,rdx - adc r9,0 - - mul rbx - add r9,rax - mov rax,QWORD[24+rsi] - mov r10,rdx - adc r10,0 - - mul rbx - add r10,rax - mov rax,QWORD[32+rsi] - mov r11,rdx - adc r11,0 - - mul rbx - add r11,rax - mov rax,QWORD[40+rsi] - mov r12,rdx - adc r12,0 - - mul rbx - add r12,rax - mov rax,QWORD[48+rsi] - mov r13,rdx - adc r13,0 - - mul rbx - add r13,rax - mov rax,QWORD[56+rsi] - mov r14,rdx - adc r14,0 - - mul rbx - add r14,rax - mov rax,QWORD[rsi] - mov r15,rdx - adc r15,0 - - lea rbp,[8+rbp] - lea rdi,[8+rdi] - - mov ecx,7 - jmp NEAR $L$oop_mul - -ALIGN 32 -$L$oop_mul: - mov rbx,QWORD[rbp] - mul rbx - add r8,rax - mov rax,QWORD[8+rsi] - mov QWORD[rdi],r8 - mov r8,rdx - adc r8,0 - - mul rbx - add r9,rax - mov rax,QWORD[16+rsi] - adc rdx,0 - add r8,r9 - mov r9,rdx - adc r9,0 - - mul rbx - add r10,rax - mov rax,QWORD[24+rsi] - adc rdx,0 - add r9,r10 - mov r10,rdx - adc r10,0 - - mul rbx - add r11,rax - mov rax,QWORD[32+rsi] - adc rdx,0 - add r10,r11 - mov r11,rdx - adc r11,0 - - mul rbx - add r12,rax - mov rax,QWORD[40+rsi] - adc rdx,0 - add r11,r12 - mov r12,rdx - adc r12,0 - - mul rbx - add r13,rax - mov rax,QWORD[48+rsi] - adc rdx,0 - add r12,r13 - mov r13,rdx - adc r13,0 - - mul rbx - add r14,rax - mov rax,QWORD[56+rsi] - adc rdx,0 - add r13,r14 - mov r14,rdx - lea rbp,[8+rbp] - adc r14,0 - - mul rbx - add r15,rax - mov rax,QWORD[rsi] - adc rdx,0 - add r14,r15 - mov r15,rdx - adc r15,0 - - lea rdi,[8+rdi] - - dec ecx - jnz NEAR $L$oop_mul - - mov QWORD[rdi],r8 - mov QWORD[8+rdi],r9 - mov QWORD[16+rdi],r10 - mov QWORD[24+rdi],r11 - mov QWORD[32+rdi],r12 - mov QWORD[40+rdi],r13 - mov QWORD[48+rdi],r14 - mov QWORD[56+rdi],r15 - - DB 0F3h,0C3h ;repret - -global rsaz_512_scatter4 - -ALIGN 16 -rsaz_512_scatter4: - lea rcx,[r8*4+rcx] - mov r9d,8 - jmp NEAR $L$oop_scatter -ALIGN 16 -$L$oop_scatter: - mov rax,QWORD[rdx] - lea rdx,[8+rdx] - mov DWORD[rcx],eax - shr rax,32 - mov DWORD[64+rcx],eax - lea rcx,[128+rcx] - dec r9d - jnz NEAR $L$oop_scatter - DB 0F3h,0C3h ;repret - - -global rsaz_512_gather4 - -ALIGN 16 -rsaz_512_gather4: - lea rdx,[r8*4+rdx] - mov r9d,8 - jmp NEAR $L$oop_gather -ALIGN 16 -$L$oop_gather: - mov eax,DWORD[rdx] - mov r8d,DWORD[64+rdx] - lea rdx,[128+rdx] - shl r8,32 - or rax,r8 - mov QWORD[rcx],rax - lea rcx,[8+rcx] - dec r9d - jnz NEAR $L$oop_gather - DB 0F3h,0C3h ;repret - -EXTERN __imp_RtlVirtualUnwind - -ALIGN 16 -se_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - mov rsi,QWORD[8+r9] - mov r11,QWORD[56+r9] - - mov r10d,DWORD[r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jb NEAR $L$common_seh_tail - - mov rax,QWORD[152+r8] - - mov r10d,DWORD[4+r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jae NEAR $L$common_seh_tail - - lea rax,[((128+24+48))+rax] - - mov rbx,QWORD[((-8))+rax] - mov rbp,QWORD[((-16))+rax] - mov r12,QWORD[((-24))+rax] - mov r13,QWORD[((-32))+rax] - mov r14,QWORD[((-40))+rax] - mov r15,QWORD[((-48))+rax] - mov QWORD[144+r8],rbx - mov QWORD[160+r8],rbp - mov QWORD[216+r8],r12 - mov QWORD[224+r8],r13 - mov QWORD[232+r8],r14 - mov QWORD[240+r8],r15 - -$L$common_seh_tail: - mov rdi,QWORD[8+rax] - mov rsi,QWORD[16+rax] - mov QWORD[152+r8],rax - mov QWORD[168+r8],rsi - mov QWORD[176+r8],rdi - - mov rdi,QWORD[40+r9] - mov rsi,r8 - mov ecx,154 - DD 0xa548f3fc - - mov rsi,r9 - xor rcx,rcx - mov rdx,QWORD[8+rsi] - mov r8,QWORD[rsi] - mov r9,QWORD[16+rsi] - mov r10,QWORD[40+rsi] - lea r11,[56+rsi] - lea r12,[24+rsi] - mov QWORD[32+rsp],r10 - mov QWORD[40+rsp],r11 - mov QWORD[48+rsp],r12 - mov QWORD[56+rsp],rcx - call QWORD[__imp_RtlVirtualUnwind] - - mov eax,1 - add rsp,64 - popfq - pop r15 - pop r14 - pop r13 - pop r12 - pop rbp - pop rbx - pop rdi - pop rsi - DB 0F3h,0C3h ;repret - - -section .pdata rdata align=4 -ALIGN 4 - DD $L$SEH_begin_rsaz_512_sqr wrt ..imagebase - DD $L$SEH_end_rsaz_512_sqr wrt ..imagebase - DD $L$SEH_info_rsaz_512_sqr wrt ..imagebase - - DD $L$SEH_begin_rsaz_512_mul wrt ..imagebase - DD $L$SEH_end_rsaz_512_mul wrt ..imagebase - DD $L$SEH_info_rsaz_512_mul wrt ..imagebase - - DD $L$SEH_begin_rsaz_512_mul_gather4 wrt ..imagebase - DD $L$SEH_end_rsaz_512_mul_gather4 wrt ..imagebase - DD $L$SEH_info_rsaz_512_mul_gather4 wrt ..imagebase - - DD $L$SEH_begin_rsaz_512_mul_scatter4 wrt ..imagebase - DD $L$SEH_end_rsaz_512_mul_scatter4 wrt ..imagebase - DD $L$SEH_info_rsaz_512_mul_scatter4 wrt ..imagebase - - DD $L$SEH_begin_rsaz_512_mul_by_one wrt ..imagebase - DD $L$SEH_end_rsaz_512_mul_by_one wrt ..imagebase - DD $L$SEH_info_rsaz_512_mul_by_one wrt ..imagebase - -section .xdata rdata align=8 -ALIGN 8 -$L$SEH_info_rsaz_512_sqr: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$sqr_body wrt ..imagebase,$L$sqr_epilogue wrt ..imagebase -$L$SEH_info_rsaz_512_mul: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$mul_body wrt ..imagebase,$L$mul_epilogue wrt ..imagebase -$L$SEH_info_rsaz_512_mul_gather4: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$mul_gather4_body wrt ..imagebase,$L$mul_gather4_epilogue wrt ..imagebase -$L$SEH_info_rsaz_512_mul_scatter4: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$mul_scatter4_body wrt ..imagebase,$L$mul_scatter4_epilogue wrt ..imagebase -$L$SEH_info_rsaz_512_mul_by_one: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$mul_by_one_body wrt ..imagebase,$L$mul_by_one_epilogue wrt ..imagebase diff --git a/third_party/boringssl/win-x86_64/crypto/bn/x86_64-mont.asm b/third_party/boringssl/win-x86_64/crypto/bn/x86_64-mont.asm deleted file mode 100644 index db0d1b976fcef..0000000000000 --- a/third_party/boringssl/win-x86_64/crypto/bn/x86_64-mont.asm +++ /dev/null @@ -1,941 +0,0 @@ -default rel -%define XMMWORD -%define YMMWORD -%define ZMMWORD -section .text code align=64 - - -EXTERN OPENSSL_ia32cap_P - -global bn_mul_mont - -ALIGN 16 -bn_mul_mont: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_bn_mul_mont: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - mov r9,QWORD[48+rsp] - - - test r9d,3 - jnz NEAR $L$mul_enter - cmp r9d,8 - jb NEAR $L$mul_enter - cmp rdx,rsi - jne NEAR $L$mul4x_enter - test r9d,7 - jz NEAR $L$sqr8x_enter - jmp NEAR $L$mul4x_enter - -ALIGN 16 -$L$mul_enter: - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - - mov r9d,r9d - lea r10,[2+r9] - mov r11,rsp - neg r10 - lea rsp,[r10*8+rsp] - and rsp,-1024 - - mov QWORD[8+r9*8+rsp],r11 -$L$mul_body: - mov r12,rdx - mov r8,QWORD[r8] - mov rbx,QWORD[r12] - mov rax,QWORD[rsi] - - xor r14,r14 - xor r15,r15 - - mov rbp,r8 - mul rbx - mov r10,rax - mov rax,QWORD[rcx] - - imul rbp,r10 - mov r11,rdx - - mul rbp - add r10,rax - mov rax,QWORD[8+rsi] - adc rdx,0 - mov r13,rdx - - lea r15,[1+r15] - jmp NEAR $L$1st_enter - -ALIGN 16 -$L$1st: - add r13,rax - mov rax,QWORD[r15*8+rsi] - adc rdx,0 - add r13,r11 - mov r11,r10 - adc rdx,0 - mov QWORD[((-16))+r15*8+rsp],r13 - mov r13,rdx - -$L$1st_enter: - mul rbx - add r11,rax - mov rax,QWORD[r15*8+rcx] - adc rdx,0 - lea r15,[1+r15] - mov r10,rdx - - mul rbp - cmp r15,r9 - jne NEAR $L$1st - - add r13,rax - mov rax,QWORD[rsi] - adc rdx,0 - add r13,r11 - adc rdx,0 - mov QWORD[((-16))+r15*8+rsp],r13 - mov r13,rdx - mov r11,r10 - - xor rdx,rdx - add r13,r11 - adc rdx,0 - mov QWORD[((-8))+r9*8+rsp],r13 - mov QWORD[r9*8+rsp],rdx - - lea r14,[1+r14] - jmp NEAR $L$outer -ALIGN 16 -$L$outer: - mov rbx,QWORD[r14*8+r12] - xor r15,r15 - mov rbp,r8 - mov r10,QWORD[rsp] - mul rbx - add r10,rax - mov rax,QWORD[rcx] - adc rdx,0 - - imul rbp,r10 - mov r11,rdx - - mul rbp - add r10,rax - mov rax,QWORD[8+rsi] - adc rdx,0 - mov r10,QWORD[8+rsp] - mov r13,rdx - - lea r15,[1+r15] - jmp NEAR $L$inner_enter - -ALIGN 16 -$L$inner: - add r13,rax - mov rax,QWORD[r15*8+rsi] - adc rdx,0 - add r13,r10 - mov r10,QWORD[r15*8+rsp] - adc rdx,0 - mov QWORD[((-16))+r15*8+rsp],r13 - mov r13,rdx - -$L$inner_enter: - mul rbx - add r11,rax - mov rax,QWORD[r15*8+rcx] - adc rdx,0 - add r10,r11 - mov r11,rdx - adc r11,0 - lea r15,[1+r15] - - mul rbp - cmp r15,r9 - jne NEAR $L$inner - - add r13,rax - mov rax,QWORD[rsi] - adc rdx,0 - add r13,r10 - mov r10,QWORD[r15*8+rsp] - adc rdx,0 - mov QWORD[((-16))+r15*8+rsp],r13 - mov r13,rdx - - xor rdx,rdx - add r13,r11 - adc rdx,0 - add r13,r10 - adc rdx,0 - mov QWORD[((-8))+r9*8+rsp],r13 - mov QWORD[r9*8+rsp],rdx - - lea r14,[1+r14] - cmp r14,r9 - jb NEAR $L$outer - - xor r14,r14 - mov rax,QWORD[rsp] - lea rsi,[rsp] - mov r15,r9 - jmp NEAR $L$sub -ALIGN 16 -$L$sub: sbb rax,QWORD[r14*8+rcx] - mov QWORD[r14*8+rdi],rax - mov rax,QWORD[8+r14*8+rsi] - lea r14,[1+r14] - dec r15 - jnz NEAR $L$sub - - sbb rax,0 - xor r14,r14 - mov r15,r9 -ALIGN 16 -$L$copy: - mov rsi,QWORD[r14*8+rsp] - mov rcx,QWORD[r14*8+rdi] - xor rsi,rcx - and rsi,rax - xor rsi,rcx - mov QWORD[r14*8+rsp],r14 - mov QWORD[r14*8+rdi],rsi - lea r14,[1+r14] - sub r15,1 - jnz NEAR $L$copy - - mov rsi,QWORD[8+r9*8+rsp] - mov rax,1 - mov r15,QWORD[rsi] - mov r14,QWORD[8+rsi] - mov r13,QWORD[16+rsi] - mov r12,QWORD[24+rsi] - mov rbp,QWORD[32+rsi] - mov rbx,QWORD[40+rsi] - lea rsp,[48+rsi] -$L$mul_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_bn_mul_mont: - -ALIGN 16 -bn_mul4x_mont: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_bn_mul4x_mont: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - mov r9,QWORD[48+rsp] - - -$L$mul4x_enter: - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - - mov r9d,r9d - lea r10,[4+r9] - mov r11,rsp - neg r10 - lea rsp,[r10*8+rsp] - and rsp,-1024 - - mov QWORD[8+r9*8+rsp],r11 -$L$mul4x_body: - mov QWORD[16+r9*8+rsp],rdi - mov r12,rdx - mov r8,QWORD[r8] - mov rbx,QWORD[r12] - mov rax,QWORD[rsi] - - xor r14,r14 - xor r15,r15 - - mov rbp,r8 - mul rbx - mov r10,rax - mov rax,QWORD[rcx] - - imul rbp,r10 - mov r11,rdx - - mul rbp - add r10,rax - mov rax,QWORD[8+rsi] - adc rdx,0 - mov rdi,rdx - - mul rbx - add r11,rax - mov rax,QWORD[8+rcx] - adc rdx,0 - mov r10,rdx - - mul rbp - add rdi,rax - mov rax,QWORD[16+rsi] - adc rdx,0 - add rdi,r11 - lea r15,[4+r15] - adc rdx,0 - mov QWORD[rsp],rdi - mov r13,rdx - jmp NEAR $L$1st4x -ALIGN 16 -$L$1st4x: - mul rbx - add r10,rax - mov rax,QWORD[((-16))+r15*8+rcx] - adc rdx,0 - mov r11,rdx - - mul rbp - add r13,rax - mov rax,QWORD[((-8))+r15*8+rsi] - adc rdx,0 - add r13,r10 - adc rdx,0 - mov QWORD[((-24))+r15*8+rsp],r13 - mov rdi,rdx - - mul rbx - add r11,rax - mov rax,QWORD[((-8))+r15*8+rcx] - adc rdx,0 - mov r10,rdx - - mul rbp - add rdi,rax - mov rax,QWORD[r15*8+rsi] - adc rdx,0 - add rdi,r11 - adc rdx,0 - mov QWORD[((-16))+r15*8+rsp],rdi - mov r13,rdx - - mul rbx - add r10,rax - mov rax,QWORD[r15*8+rcx] - adc rdx,0 - mov r11,rdx - - mul rbp - add r13,rax - mov rax,QWORD[8+r15*8+rsi] - adc rdx,0 - add r13,r10 - adc rdx,0 - mov QWORD[((-8))+r15*8+rsp],r13 - mov rdi,rdx - - mul rbx - add r11,rax - mov rax,QWORD[8+r15*8+rcx] - adc rdx,0 - lea r15,[4+r15] - mov r10,rdx - - mul rbp - add rdi,rax - mov rax,QWORD[((-16))+r15*8+rsi] - adc rdx,0 - add rdi,r11 - adc rdx,0 - mov QWORD[((-32))+r15*8+rsp],rdi - mov r13,rdx - cmp r15,r9 - jb NEAR $L$1st4x - - mul rbx - add r10,rax - mov rax,QWORD[((-16))+r15*8+rcx] - adc rdx,0 - mov r11,rdx - - mul rbp - add r13,rax - mov rax,QWORD[((-8))+r15*8+rsi] - adc rdx,0 - add r13,r10 - adc rdx,0 - mov QWORD[((-24))+r15*8+rsp],r13 - mov rdi,rdx - - mul rbx - add r11,rax - mov rax,QWORD[((-8))+r15*8+rcx] - adc rdx,0 - mov r10,rdx - - mul rbp - add rdi,rax - mov rax,QWORD[rsi] - adc rdx,0 - add rdi,r11 - adc rdx,0 - mov QWORD[((-16))+r15*8+rsp],rdi - mov r13,rdx - - xor rdi,rdi - add r13,r10 - adc rdi,0 - mov QWORD[((-8))+r15*8+rsp],r13 - mov QWORD[r15*8+rsp],rdi - - lea r14,[1+r14] -ALIGN 4 -$L$outer4x: - mov rbx,QWORD[r14*8+r12] - xor r15,r15 - mov r10,QWORD[rsp] - mov rbp,r8 - mul rbx - add r10,rax - mov rax,QWORD[rcx] - adc rdx,0 - - imul rbp,r10 - mov r11,rdx - - mul rbp - add r10,rax - mov rax,QWORD[8+rsi] - adc rdx,0 - mov rdi,rdx - - mul rbx - add r11,rax - mov rax,QWORD[8+rcx] - adc rdx,0 - add r11,QWORD[8+rsp] - adc rdx,0 - mov r10,rdx - - mul rbp - add rdi,rax - mov rax,QWORD[16+rsi] - adc rdx,0 - add rdi,r11 - lea r15,[4+r15] - adc rdx,0 - mov QWORD[rsp],rdi - mov r13,rdx - jmp NEAR $L$inner4x -ALIGN 16 -$L$inner4x: - mul rbx - add r10,rax - mov rax,QWORD[((-16))+r15*8+rcx] - adc rdx,0 - add r10,QWORD[((-16))+r15*8+rsp] - adc rdx,0 - mov r11,rdx - - mul rbp - add r13,rax - mov rax,QWORD[((-8))+r15*8+rsi] - adc rdx,0 - add r13,r10 - adc rdx,0 - mov QWORD[((-24))+r15*8+rsp],r13 - mov rdi,rdx - - mul rbx - add r11,rax - mov rax,QWORD[((-8))+r15*8+rcx] - adc rdx,0 - add r11,QWORD[((-8))+r15*8+rsp] - adc rdx,0 - mov r10,rdx - - mul rbp - add rdi,rax - mov rax,QWORD[r15*8+rsi] - adc rdx,0 - add rdi,r11 - adc rdx,0 - mov QWORD[((-16))+r15*8+rsp],rdi - mov r13,rdx - - mul rbx - add r10,rax - mov rax,QWORD[r15*8+rcx] - adc rdx,0 - add r10,QWORD[r15*8+rsp] - adc rdx,0 - mov r11,rdx - - mul rbp - add r13,rax - mov rax,QWORD[8+r15*8+rsi] - adc rdx,0 - add r13,r10 - adc rdx,0 - mov QWORD[((-8))+r15*8+rsp],r13 - mov rdi,rdx - - mul rbx - add r11,rax - mov rax,QWORD[8+r15*8+rcx] - adc rdx,0 - add r11,QWORD[8+r15*8+rsp] - adc rdx,0 - lea r15,[4+r15] - mov r10,rdx - - mul rbp - add rdi,rax - mov rax,QWORD[((-16))+r15*8+rsi] - adc rdx,0 - add rdi,r11 - adc rdx,0 - mov QWORD[((-32))+r15*8+rsp],rdi - mov r13,rdx - cmp r15,r9 - jb NEAR $L$inner4x - - mul rbx - add r10,rax - mov rax,QWORD[((-16))+r15*8+rcx] - adc rdx,0 - add r10,QWORD[((-16))+r15*8+rsp] - adc rdx,0 - mov r11,rdx - - mul rbp - add r13,rax - mov rax,QWORD[((-8))+r15*8+rsi] - adc rdx,0 - add r13,r10 - adc rdx,0 - mov QWORD[((-24))+r15*8+rsp],r13 - mov rdi,rdx - - mul rbx - add r11,rax - mov rax,QWORD[((-8))+r15*8+rcx] - adc rdx,0 - add r11,QWORD[((-8))+r15*8+rsp] - adc rdx,0 - lea r14,[1+r14] - mov r10,rdx - - mul rbp - add rdi,rax - mov rax,QWORD[rsi] - adc rdx,0 - add rdi,r11 - adc rdx,0 - mov QWORD[((-16))+r15*8+rsp],rdi - mov r13,rdx - - xor rdi,rdi - add r13,r10 - adc rdi,0 - add r13,QWORD[r9*8+rsp] - adc rdi,0 - mov QWORD[((-8))+r15*8+rsp],r13 - mov QWORD[r15*8+rsp],rdi - - cmp r14,r9 - jb NEAR $L$outer4x - mov rdi,QWORD[16+r9*8+rsp] - mov rax,QWORD[rsp] - mov rdx,QWORD[8+rsp] - shr r9,2 - lea rsi,[rsp] - xor r14,r14 - - sub rax,QWORD[rcx] - mov rbx,QWORD[16+rsi] - mov rbp,QWORD[24+rsi] - sbb rdx,QWORD[8+rcx] - lea r15,[((-1))+r9] - jmp NEAR $L$sub4x -ALIGN 16 -$L$sub4x: - mov QWORD[r14*8+rdi],rax - mov QWORD[8+r14*8+rdi],rdx - sbb rbx,QWORD[16+r14*8+rcx] - mov rax,QWORD[32+r14*8+rsi] - mov rdx,QWORD[40+r14*8+rsi] - sbb rbp,QWORD[24+r14*8+rcx] - mov QWORD[16+r14*8+rdi],rbx - mov QWORD[24+r14*8+rdi],rbp - sbb rax,QWORD[32+r14*8+rcx] - mov rbx,QWORD[48+r14*8+rsi] - mov rbp,QWORD[56+r14*8+rsi] - sbb rdx,QWORD[40+r14*8+rcx] - lea r14,[4+r14] - dec r15 - jnz NEAR $L$sub4x - - mov QWORD[r14*8+rdi],rax - mov rax,QWORD[32+r14*8+rsi] - sbb rbx,QWORD[16+r14*8+rcx] - mov QWORD[8+r14*8+rdi],rdx - sbb rbp,QWORD[24+r14*8+rcx] - mov QWORD[16+r14*8+rdi],rbx - - sbb rax,0 -DB 66h, 48h, 0fh, 6eh, 0c0h - punpcklqdq xmm0,xmm0 - mov QWORD[24+r14*8+rdi],rbp - xor r14,r14 - - mov r15,r9 - pxor xmm5,xmm5 - jmp NEAR $L$copy4x -ALIGN 16 -$L$copy4x: - movdqu xmm2,XMMWORD[r14*1+rsp] - movdqu xmm4,XMMWORD[16+r14*1+rsp] - movdqu xmm1,XMMWORD[r14*1+rdi] - movdqu xmm3,XMMWORD[16+r14*1+rdi] - pxor xmm2,xmm1 - pxor xmm4,xmm3 - pand xmm2,xmm0 - pand xmm4,xmm0 - pxor xmm2,xmm1 - pxor xmm4,xmm3 - movdqu XMMWORD[r14*1+rdi],xmm2 - movdqu XMMWORD[16+r14*1+rdi],xmm4 - movdqa XMMWORD[r14*1+rsp],xmm5 - movdqa XMMWORD[16+r14*1+rsp],xmm5 - - lea r14,[32+r14] - dec r15 - jnz NEAR $L$copy4x - - shl r9,2 - mov rsi,QWORD[8+r9*8+rsp] - mov rax,1 - mov r15,QWORD[rsi] - mov r14,QWORD[8+rsi] - mov r13,QWORD[16+rsi] - mov r12,QWORD[24+rsi] - mov rbp,QWORD[32+rsi] - mov rbx,QWORD[40+rsi] - lea rsp,[48+rsi] -$L$mul4x_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_bn_mul4x_mont: -EXTERN bn_sqr8x_internal - - -ALIGN 32 -bn_sqr8x_mont: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_bn_sqr8x_mont: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - mov r9,QWORD[48+rsp] - - -$L$sqr8x_enter: - mov rax,rsp - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - - mov r10d,r9d - shl r9d,3 - shl r10,3+2 - neg r9 - - - - - - - lea r11,[((-64))+r9*4+rsp] - mov r8,QWORD[r8] - sub r11,rsi - and r11,4095 - cmp r10,r11 - jb NEAR $L$sqr8x_sp_alt - sub rsp,r11 - lea rsp,[((-64))+r9*4+rsp] - jmp NEAR $L$sqr8x_sp_done - -ALIGN 32 -$L$sqr8x_sp_alt: - lea r10,[((4096-64))+r9*4] - lea rsp,[((-64))+r9*4+rsp] - sub r11,r10 - mov r10,0 - cmovc r11,r10 - sub rsp,r11 -$L$sqr8x_sp_done: - and rsp,-64 - mov r10,r9 - neg r9 - - lea r11,[64+r9*2+rsp] - mov QWORD[32+rsp],r8 - mov QWORD[40+rsp],rax -$L$sqr8x_body: - - mov rbp,r9 -DB 102,73,15,110,211 - shr rbp,3+2 - mov eax,DWORD[((OPENSSL_ia32cap_P+8))] - jmp NEAR $L$sqr8x_copy_n - -ALIGN 32 -$L$sqr8x_copy_n: - movq xmm0,QWORD[rcx] - movq xmm1,QWORD[8+rcx] - movq xmm3,QWORD[16+rcx] - movq xmm4,QWORD[24+rcx] - lea rcx,[32+rcx] - movdqa XMMWORD[r11],xmm0 - movdqa XMMWORD[16+r11],xmm1 - movdqa XMMWORD[32+r11],xmm3 - movdqa XMMWORD[48+r11],xmm4 - lea r11,[64+r11] - dec rbp - jnz NEAR $L$sqr8x_copy_n - - pxor xmm0,xmm0 -DB 102,72,15,110,207 -DB 102,73,15,110,218 - call bn_sqr8x_internal - - pxor xmm0,xmm0 - lea rax,[48+rsp] - lea rdx,[64+r9*2+rsp] - shr r9,3+2 - mov rsi,QWORD[40+rsp] - jmp NEAR $L$sqr8x_zero - -ALIGN 32 -$L$sqr8x_zero: - movdqa XMMWORD[rax],xmm0 - movdqa XMMWORD[16+rax],xmm0 - movdqa XMMWORD[32+rax],xmm0 - movdqa XMMWORD[48+rax],xmm0 - lea rax,[64+rax] - movdqa XMMWORD[rdx],xmm0 - movdqa XMMWORD[16+rdx],xmm0 - movdqa XMMWORD[32+rdx],xmm0 - movdqa XMMWORD[48+rdx],xmm0 - lea rdx,[64+rdx] - dec r9 - jnz NEAR $L$sqr8x_zero - - mov rax,1 - mov r15,QWORD[((-48))+rsi] - mov r14,QWORD[((-40))+rsi] - mov r13,QWORD[((-32))+rsi] - mov r12,QWORD[((-24))+rsi] - mov rbp,QWORD[((-16))+rsi] - mov rbx,QWORD[((-8))+rsi] - lea rsp,[rsi] -$L$sqr8x_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_bn_sqr8x_mont: -DB 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105 -DB 112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56 -DB 54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83 -DB 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115 -DB 115,108,46,111,114,103,62,0 -ALIGN 16 -EXTERN __imp_RtlVirtualUnwind - -ALIGN 16 -mul_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - mov rsi,QWORD[8+r9] - mov r11,QWORD[56+r9] - - mov r10d,DWORD[r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jb NEAR $L$common_seh_tail - - mov rax,QWORD[152+r8] - - mov r10d,DWORD[4+r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jae NEAR $L$common_seh_tail - - mov r10,QWORD[192+r8] - mov rax,QWORD[8+r10*8+rax] - lea rax,[48+rax] - - mov rbx,QWORD[((-8))+rax] - mov rbp,QWORD[((-16))+rax] - mov r12,QWORD[((-24))+rax] - mov r13,QWORD[((-32))+rax] - mov r14,QWORD[((-40))+rax] - mov r15,QWORD[((-48))+rax] - mov QWORD[144+r8],rbx - mov QWORD[160+r8],rbp - mov QWORD[216+r8],r12 - mov QWORD[224+r8],r13 - mov QWORD[232+r8],r14 - mov QWORD[240+r8],r15 - - jmp NEAR $L$common_seh_tail - - - -ALIGN 16 -sqr_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - mov rsi,QWORD[8+r9] - mov r11,QWORD[56+r9] - - mov r10d,DWORD[r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jb NEAR $L$common_seh_tail - - mov rax,QWORD[152+r8] - - mov r10d,DWORD[4+r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jae NEAR $L$common_seh_tail - - mov rax,QWORD[40+rax] - - mov rbx,QWORD[((-8))+rax] - mov rbp,QWORD[((-16))+rax] - mov r12,QWORD[((-24))+rax] - mov r13,QWORD[((-32))+rax] - mov r14,QWORD[((-40))+rax] - mov r15,QWORD[((-48))+rax] - mov QWORD[144+r8],rbx - mov QWORD[160+r8],rbp - mov QWORD[216+r8],r12 - mov QWORD[224+r8],r13 - mov QWORD[232+r8],r14 - mov QWORD[240+r8],r15 - -$L$common_seh_tail: - mov rdi,QWORD[8+rax] - mov rsi,QWORD[16+rax] - mov QWORD[152+r8],rax - mov QWORD[168+r8],rsi - mov QWORD[176+r8],rdi - - mov rdi,QWORD[40+r9] - mov rsi,r8 - mov ecx,154 - DD 0xa548f3fc - - mov rsi,r9 - xor rcx,rcx - mov rdx,QWORD[8+rsi] - mov r8,QWORD[rsi] - mov r9,QWORD[16+rsi] - mov r10,QWORD[40+rsi] - lea r11,[56+rsi] - lea r12,[24+rsi] - mov QWORD[32+rsp],r10 - mov QWORD[40+rsp],r11 - mov QWORD[48+rsp],r12 - mov QWORD[56+rsp],rcx - call QWORD[__imp_RtlVirtualUnwind] - - mov eax,1 - add rsp,64 - popfq - pop r15 - pop r14 - pop r13 - pop r12 - pop rbp - pop rbx - pop rdi - pop rsi - DB 0F3h,0C3h ;repret - - -section .pdata rdata align=4 -ALIGN 4 - DD $L$SEH_begin_bn_mul_mont wrt ..imagebase - DD $L$SEH_end_bn_mul_mont wrt ..imagebase - DD $L$SEH_info_bn_mul_mont wrt ..imagebase - - DD $L$SEH_begin_bn_mul4x_mont wrt ..imagebase - DD $L$SEH_end_bn_mul4x_mont wrt ..imagebase - DD $L$SEH_info_bn_mul4x_mont wrt ..imagebase - - DD $L$SEH_begin_bn_sqr8x_mont wrt ..imagebase - DD $L$SEH_end_bn_sqr8x_mont wrt ..imagebase - DD $L$SEH_info_bn_sqr8x_mont wrt ..imagebase -section .xdata rdata align=8 -ALIGN 8 -$L$SEH_info_bn_mul_mont: -DB 9,0,0,0 - DD mul_handler wrt ..imagebase - DD $L$mul_body wrt ..imagebase,$L$mul_epilogue wrt ..imagebase -$L$SEH_info_bn_mul4x_mont: -DB 9,0,0,0 - DD mul_handler wrt ..imagebase - DD $L$mul4x_body wrt ..imagebase,$L$mul4x_epilogue wrt ..imagebase -$L$SEH_info_bn_sqr8x_mont: -DB 9,0,0,0 - DD sqr_handler wrt ..imagebase - DD $L$sqr8x_body wrt ..imagebase,$L$sqr8x_epilogue wrt ..imagebase diff --git a/third_party/boringssl/win-x86_64/crypto/bn/x86_64-mont5.asm b/third_party/boringssl/win-x86_64/crypto/bn/x86_64-mont5.asm deleted file mode 100644 index 284318aae32ce..0000000000000 --- a/third_party/boringssl/win-x86_64/crypto/bn/x86_64-mont5.asm +++ /dev/null @@ -1,2056 +0,0 @@ -default rel -%define XMMWORD -%define YMMWORD -%define ZMMWORD -section .text code align=64 - - -EXTERN OPENSSL_ia32cap_P - -global bn_mul_mont_gather5 - -ALIGN 64 -bn_mul_mont_gather5: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_bn_mul_mont_gather5: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - mov r9,QWORD[48+rsp] - - - test r9d,7 - jnz NEAR $L$mul_enter - jmp NEAR $L$mul4x_enter - -ALIGN 16 -$L$mul_enter: - mov r9d,r9d - mov rax,rsp - mov r10d,DWORD[56+rsp] - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - lea rsp,[((-40))+rsp] - movaps XMMWORD[rsp],xmm6 - movaps XMMWORD[16+rsp],xmm7 - lea r11,[2+r9] - neg r11 - lea rsp,[r11*8+rsp] - and rsp,-1024 - - mov QWORD[8+r9*8+rsp],rax -$L$mul_body: - mov r12,rdx - mov r11,r10 - shr r10,3 - and r11,7 - not r10 - lea rax,[$L$magic_masks] - and r10,3 - lea r12,[96+r11*8+r12] - movq xmm4,QWORD[r10*8+rax] - movq xmm5,QWORD[8+r10*8+rax] - movq xmm6,QWORD[16+r10*8+rax] - movq xmm7,QWORD[24+r10*8+rax] - - movq xmm0,QWORD[(((-96)))+r12] - movq xmm1,QWORD[((-32))+r12] - pand xmm0,xmm4 - movq xmm2,QWORD[32+r12] - pand xmm1,xmm5 - movq xmm3,QWORD[96+r12] - pand xmm2,xmm6 - por xmm0,xmm1 - pand xmm3,xmm7 - por xmm0,xmm2 - lea r12,[256+r12] - por xmm0,xmm3 - -DB 102,72,15,126,195 - - mov r8,QWORD[r8] - mov rax,QWORD[rsi] - - xor r14,r14 - xor r15,r15 - - movq xmm0,QWORD[(((-96)))+r12] - movq xmm1,QWORD[((-32))+r12] - pand xmm0,xmm4 - movq xmm2,QWORD[32+r12] - pand xmm1,xmm5 - - mov rbp,r8 - mul rbx - mov r10,rax - mov rax,QWORD[rcx] - - movq xmm3,QWORD[96+r12] - pand xmm2,xmm6 - por xmm0,xmm1 - pand xmm3,xmm7 - - imul rbp,r10 - mov r11,rdx - - por xmm0,xmm2 - lea r12,[256+r12] - por xmm0,xmm3 - - mul rbp - add r10,rax - mov rax,QWORD[8+rsi] - adc rdx,0 - mov r13,rdx - - lea r15,[1+r15] - jmp NEAR $L$1st_enter - -ALIGN 16 -$L$1st: - add r13,rax - mov rax,QWORD[r15*8+rsi] - adc rdx,0 - add r13,r11 - mov r11,r10 - adc rdx,0 - mov QWORD[((-16))+r15*8+rsp],r13 - mov r13,rdx - -$L$1st_enter: - mul rbx - add r11,rax - mov rax,QWORD[r15*8+rcx] - adc rdx,0 - lea r15,[1+r15] - mov r10,rdx - - mul rbp - cmp r15,r9 - jne NEAR $L$1st - -DB 102,72,15,126,195 - - add r13,rax - mov rax,QWORD[rsi] - adc rdx,0 - add r13,r11 - adc rdx,0 - mov QWORD[((-16))+r15*8+rsp],r13 - mov r13,rdx - mov r11,r10 - - xor rdx,rdx - add r13,r11 - adc rdx,0 - mov QWORD[((-8))+r9*8+rsp],r13 - mov QWORD[r9*8+rsp],rdx - - lea r14,[1+r14] - jmp NEAR $L$outer -ALIGN 16 -$L$outer: - xor r15,r15 - mov rbp,r8 - mov r10,QWORD[rsp] - - movq xmm0,QWORD[(((-96)))+r12] - movq xmm1,QWORD[((-32))+r12] - pand xmm0,xmm4 - movq xmm2,QWORD[32+r12] - pand xmm1,xmm5 - - mul rbx - add r10,rax - mov rax,QWORD[rcx] - adc rdx,0 - - movq xmm3,QWORD[96+r12] - pand xmm2,xmm6 - por xmm0,xmm1 - pand xmm3,xmm7 - - imul rbp,r10 - mov r11,rdx - - por xmm0,xmm2 - lea r12,[256+r12] - por xmm0,xmm3 - - mul rbp - add r10,rax - mov rax,QWORD[8+rsi] - adc rdx,0 - mov r10,QWORD[8+rsp] - mov r13,rdx - - lea r15,[1+r15] - jmp NEAR $L$inner_enter - -ALIGN 16 -$L$inner: - add r13,rax - mov rax,QWORD[r15*8+rsi] - adc rdx,0 - add r13,r10 - mov r10,QWORD[r15*8+rsp] - adc rdx,0 - mov QWORD[((-16))+r15*8+rsp],r13 - mov r13,rdx - -$L$inner_enter: - mul rbx - add r11,rax - mov rax,QWORD[r15*8+rcx] - adc rdx,0 - add r10,r11 - mov r11,rdx - adc r11,0 - lea r15,[1+r15] - - mul rbp - cmp r15,r9 - jne NEAR $L$inner - -DB 102,72,15,126,195 - - add r13,rax - mov rax,QWORD[rsi] - adc rdx,0 - add r13,r10 - mov r10,QWORD[r15*8+rsp] - adc rdx,0 - mov QWORD[((-16))+r15*8+rsp],r13 - mov r13,rdx - - xor rdx,rdx - add r13,r11 - adc rdx,0 - add r13,r10 - adc rdx,0 - mov QWORD[((-8))+r9*8+rsp],r13 - mov QWORD[r9*8+rsp],rdx - - lea r14,[1+r14] - cmp r14,r9 - jb NEAR $L$outer - - xor r14,r14 - mov rax,QWORD[rsp] - lea rsi,[rsp] - mov r15,r9 - jmp NEAR $L$sub -ALIGN 16 -$L$sub: sbb rax,QWORD[r14*8+rcx] - mov QWORD[r14*8+rdi],rax - mov rax,QWORD[8+r14*8+rsi] - lea r14,[1+r14] - dec r15 - jnz NEAR $L$sub - - sbb rax,0 - xor r14,r14 - mov r15,r9 -ALIGN 16 -$L$copy: - mov rsi,QWORD[r14*8+rsp] - mov rcx,QWORD[r14*8+rdi] - xor rsi,rcx - and rsi,rax - xor rsi,rcx - mov QWORD[r14*8+rsp],r14 - mov QWORD[r14*8+rdi],rsi - lea r14,[1+r14] - sub r15,1 - jnz NEAR $L$copy - - mov rsi,QWORD[8+r9*8+rsp] - mov rax,1 - movaps xmm6,XMMWORD[((-88))+rsi] - movaps xmm7,XMMWORD[((-72))+rsi] - mov r15,QWORD[((-48))+rsi] - mov r14,QWORD[((-40))+rsi] - mov r13,QWORD[((-32))+rsi] - mov r12,QWORD[((-24))+rsi] - mov rbp,QWORD[((-16))+rsi] - mov rbx,QWORD[((-8))+rsi] - lea rsp,[rsi] -$L$mul_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_bn_mul_mont_gather5: - -ALIGN 32 -bn_mul4x_mont_gather5: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_bn_mul4x_mont_gather5: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - mov r9,QWORD[48+rsp] - - -$L$mul4x_enter: -DB 0x67 - mov rax,rsp - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - lea rsp,[((-40))+rsp] - movaps XMMWORD[rsp],xmm6 - movaps XMMWORD[16+rsp],xmm7 -DB 0x67 - mov r10d,r9d - shl r9d,3 - shl r10d,3+2 - neg r9 - - - - - - - - - lea r11,[((-64))+r9*2+rsp] - sub r11,rsi - and r11,4095 - cmp r10,r11 - jb NEAR $L$mul4xsp_alt - sub rsp,r11 - lea rsp,[((-64))+r9*2+rsp] - jmp NEAR $L$mul4xsp_done - -ALIGN 32 -$L$mul4xsp_alt: - lea r10,[((4096-64))+r9*2] - lea rsp,[((-64))+r9*2+rsp] - sub r11,r10 - mov r10,0 - cmovc r11,r10 - sub rsp,r11 -$L$mul4xsp_done: - and rsp,-64 - neg r9 - - mov QWORD[40+rsp],rax -$L$mul4x_body: - - call mul4x_internal - - mov rsi,QWORD[40+rsp] - mov rax,1 - movaps xmm6,XMMWORD[((-88))+rsi] - movaps xmm7,XMMWORD[((-72))+rsi] - mov r15,QWORD[((-48))+rsi] - mov r14,QWORD[((-40))+rsi] - mov r13,QWORD[((-32))+rsi] - mov r12,QWORD[((-24))+rsi] - mov rbp,QWORD[((-16))+rsi] - mov rbx,QWORD[((-8))+rsi] - lea rsp,[rsi] -$L$mul4x_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_bn_mul4x_mont_gather5: - - -ALIGN 32 -mul4x_internal: - shl r9,5 - mov r10d,DWORD[56+rax] - lea r13,[256+r9*1+rdx] - shr r9,5 - mov r11,r10 - shr r10,3 - and r11,7 - not r10 - lea rax,[$L$magic_masks] - and r10,3 - lea r12,[96+r11*8+rdx] - movq xmm4,QWORD[r10*8+rax] - movq xmm5,QWORD[8+r10*8+rax] - add r11,7 - movq xmm6,QWORD[16+r10*8+rax] - movq xmm7,QWORD[24+r10*8+rax] - and r11,7 - - movq xmm0,QWORD[(((-96)))+r12] - lea r14,[256+r12] - movq xmm1,QWORD[((-32))+r12] - pand xmm0,xmm4 - movq xmm2,QWORD[32+r12] - pand xmm1,xmm5 - movq xmm3,QWORD[96+r12] - pand xmm2,xmm6 -DB 0x67 - por xmm0,xmm1 - movq xmm1,QWORD[((-96))+r14] -DB 0x67 - pand xmm3,xmm7 -DB 0x67 - por xmm0,xmm2 - movq xmm2,QWORD[((-32))+r14] -DB 0x67 - pand xmm1,xmm4 -DB 0x67 - por xmm0,xmm3 - movq xmm3,QWORD[32+r14] - -DB 102,72,15,126,195 - movq xmm0,QWORD[96+r14] - mov QWORD[((16+8))+rsp],r13 - mov QWORD[((56+8))+rsp],rdi - - mov r8,QWORD[r8] - mov rax,QWORD[rsi] - lea rsi,[r9*1+rsi] - neg r9 - - mov rbp,r8 - mul rbx - mov r10,rax - mov rax,QWORD[rcx] - - pand xmm2,xmm5 - pand xmm3,xmm6 - por xmm1,xmm2 - - imul rbp,r10 - - - - - - - - lea r14,[((64+8))+r11*8+rsp] - mov r11,rdx - - pand xmm0,xmm7 - por xmm1,xmm3 - lea r12,[512+r12] - por xmm0,xmm1 - - mul rbp - add r10,rax - mov rax,QWORD[8+r9*1+rsi] - adc rdx,0 - mov rdi,rdx - - mul rbx - add r11,rax - mov rax,QWORD[16+rcx] - adc rdx,0 - mov r10,rdx - - mul rbp - add rdi,rax - mov rax,QWORD[16+r9*1+rsi] - adc rdx,0 - add rdi,r11 - lea r15,[32+r9] - lea rcx,[64+rcx] - adc rdx,0 - mov QWORD[r14],rdi - mov r13,rdx - jmp NEAR $L$1st4x - -ALIGN 32 -$L$1st4x: - mul rbx - add r10,rax - mov rax,QWORD[((-32))+rcx] - lea r14,[32+r14] - adc rdx,0 - mov r11,rdx - - mul rbp - add r13,rax - mov rax,QWORD[((-8))+r15*1+rsi] - adc rdx,0 - add r13,r10 - adc rdx,0 - mov QWORD[((-24))+r14],r13 - mov rdi,rdx - - mul rbx - add r11,rax - mov rax,QWORD[((-16))+rcx] - adc rdx,0 - mov r10,rdx - - mul rbp - add rdi,rax - mov rax,QWORD[r15*1+rsi] - adc rdx,0 - add rdi,r11 - adc rdx,0 - mov QWORD[((-16))+r14],rdi - mov r13,rdx - - mul rbx - add r10,rax - mov rax,QWORD[rcx] - adc rdx,0 - mov r11,rdx - - mul rbp - add r13,rax - mov rax,QWORD[8+r15*1+rsi] - adc rdx,0 - add r13,r10 - adc rdx,0 - mov QWORD[((-8))+r14],r13 - mov rdi,rdx - - mul rbx - add r11,rax - mov rax,QWORD[16+rcx] - adc rdx,0 - mov r10,rdx - - mul rbp - add rdi,rax - mov rax,QWORD[16+r15*1+rsi] - adc rdx,0 - add rdi,r11 - lea rcx,[64+rcx] - adc rdx,0 - mov QWORD[r14],rdi - mov r13,rdx - - add r15,32 - jnz NEAR $L$1st4x - - mul rbx - add r10,rax - mov rax,QWORD[((-32))+rcx] - lea r14,[32+r14] - adc rdx,0 - mov r11,rdx - - mul rbp - add r13,rax - mov rax,QWORD[((-8))+rsi] - adc rdx,0 - add r13,r10 - adc rdx,0 - mov QWORD[((-24))+r14],r13 - mov rdi,rdx - - mul rbx - add r11,rax - mov rax,QWORD[((-16))+rcx] - adc rdx,0 - mov r10,rdx - - mul rbp - add rdi,rax - mov rax,QWORD[r9*1+rsi] - adc rdx,0 - add rdi,r11 - adc rdx,0 - mov QWORD[((-16))+r14],rdi - mov r13,rdx - -DB 102,72,15,126,195 - lea rcx,[r9*2+rcx] - - xor rdi,rdi - add r13,r10 - adc rdi,0 - mov QWORD[((-8))+r14],r13 - - jmp NEAR $L$outer4x - -ALIGN 32 -$L$outer4x: - mov r10,QWORD[r9*1+r14] - mov rbp,r8 - mul rbx - add r10,rax - mov rax,QWORD[rcx] - adc rdx,0 - - movq xmm0,QWORD[(((-96)))+r12] - movq xmm1,QWORD[((-32))+r12] - pand xmm0,xmm4 - movq xmm2,QWORD[32+r12] - pand xmm1,xmm5 - movq xmm3,QWORD[96+r12] - - imul rbp,r10 -DB 0x67 - mov r11,rdx - mov QWORD[r14],rdi - - pand xmm2,xmm6 - por xmm0,xmm1 - pand xmm3,xmm7 - por xmm0,xmm2 - lea r14,[r9*1+r14] - lea r12,[256+r12] - por xmm0,xmm3 - - mul rbp - add r10,rax - mov rax,QWORD[8+r9*1+rsi] - adc rdx,0 - mov rdi,rdx - - mul rbx - add r11,rax - mov rax,QWORD[16+rcx] - adc rdx,0 - add r11,QWORD[8+r14] - adc rdx,0 - mov r10,rdx - - mul rbp - add rdi,rax - mov rax,QWORD[16+r9*1+rsi] - adc rdx,0 - add rdi,r11 - lea r15,[32+r9] - lea rcx,[64+rcx] - adc rdx,0 - mov r13,rdx - jmp NEAR $L$inner4x - -ALIGN 32 -$L$inner4x: - mul rbx - add r10,rax - mov rax,QWORD[((-32))+rcx] - adc rdx,0 - add r10,QWORD[16+r14] - lea r14,[32+r14] - adc rdx,0 - mov r11,rdx - - mul rbp - add r13,rax - mov rax,QWORD[((-8))+r15*1+rsi] - adc rdx,0 - add r13,r10 - adc rdx,0 - mov QWORD[((-32))+r14],rdi - mov rdi,rdx - - mul rbx - add r11,rax - mov rax,QWORD[((-16))+rcx] - adc rdx,0 - add r11,QWORD[((-8))+r14] - adc rdx,0 - mov r10,rdx - - mul rbp - add rdi,rax - mov rax,QWORD[r15*1+rsi] - adc rdx,0 - add rdi,r11 - adc rdx,0 - mov QWORD[((-24))+r14],r13 - mov r13,rdx - - mul rbx - add r10,rax - mov rax,QWORD[rcx] - adc rdx,0 - add r10,QWORD[r14] - adc rdx,0 - mov r11,rdx - - mul rbp - add r13,rax - mov rax,QWORD[8+r15*1+rsi] - adc rdx,0 - add r13,r10 - adc rdx,0 - mov QWORD[((-16))+r14],rdi - mov rdi,rdx - - mul rbx - add r11,rax - mov rax,QWORD[16+rcx] - adc rdx,0 - add r11,QWORD[8+r14] - adc rdx,0 - mov r10,rdx - - mul rbp - add rdi,rax - mov rax,QWORD[16+r15*1+rsi] - adc rdx,0 - add rdi,r11 - lea rcx,[64+rcx] - adc rdx,0 - mov QWORD[((-8))+r14],r13 - mov r13,rdx - - add r15,32 - jnz NEAR $L$inner4x - - mul rbx - add r10,rax - mov rax,QWORD[((-32))+rcx] - adc rdx,0 - add r10,QWORD[16+r14] - lea r14,[32+r14] - adc rdx,0 - mov r11,rdx - - mul rbp - add r13,rax - mov rax,QWORD[((-8))+rsi] - adc rdx,0 - add r13,r10 - adc rdx,0 - mov QWORD[((-32))+r14],rdi - mov rdi,rdx - - mul rbx - add r11,rax - mov rax,rbp - mov rbp,QWORD[((-16))+rcx] - adc rdx,0 - add r11,QWORD[((-8))+r14] - adc rdx,0 - mov r10,rdx - - mul rbp - add rdi,rax - mov rax,QWORD[r9*1+rsi] - adc rdx,0 - add rdi,r11 - adc rdx,0 - mov QWORD[((-24))+r14],r13 - mov r13,rdx - -DB 102,72,15,126,195 - mov QWORD[((-16))+r14],rdi - lea rcx,[r9*2+rcx] - - xor rdi,rdi - add r13,r10 - adc rdi,0 - add r13,QWORD[r14] - adc rdi,0 - mov QWORD[((-8))+r14],r13 - - cmp r12,QWORD[((16+8))+rsp] - jb NEAR $L$outer4x - sub rbp,r13 - adc r15,r15 - or rdi,r15 - xor rdi,1 - lea rbx,[r9*1+r14] - lea rbp,[rdi*8+rcx] - mov rcx,r9 - sar rcx,3+2 - mov rdi,QWORD[((56+8))+rsp] - jmp NEAR $L$sqr4x_sub - -global bn_power5 - -ALIGN 32 -bn_power5: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_bn_power5: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - mov r9,QWORD[48+rsp] - - - mov rax,rsp - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - lea rsp,[((-40))+rsp] - movaps XMMWORD[rsp],xmm6 - movaps XMMWORD[16+rsp],xmm7 - mov r10d,r9d - shl r9d,3 - shl r10d,3+2 - neg r9 - mov r8,QWORD[r8] - - - - - - - - lea r11,[((-64))+r9*2+rsp] - sub r11,rsi - and r11,4095 - cmp r10,r11 - jb NEAR $L$pwr_sp_alt - sub rsp,r11 - lea rsp,[((-64))+r9*2+rsp] - jmp NEAR $L$pwr_sp_done - -ALIGN 32 -$L$pwr_sp_alt: - lea r10,[((4096-64))+r9*2] - lea rsp,[((-64))+r9*2+rsp] - sub r11,r10 - mov r10,0 - cmovc r11,r10 - sub rsp,r11 -$L$pwr_sp_done: - and rsp,-64 - mov r10,r9 - neg r9 - - - - - - - - - - - mov QWORD[32+rsp],r8 - mov QWORD[40+rsp],rax -$L$power5_body: -DB 102,72,15,110,207 -DB 102,72,15,110,209 -DB 102,73,15,110,218 -DB 102,72,15,110,226 - - call __bn_sqr8x_internal - call __bn_sqr8x_internal - call __bn_sqr8x_internal - call __bn_sqr8x_internal - call __bn_sqr8x_internal - -DB 102,72,15,126,209 -DB 102,72,15,126,226 - mov rdi,rsi - mov rax,QWORD[40+rsp] - lea r8,[32+rsp] - - call mul4x_internal - - mov rsi,QWORD[40+rsp] - mov rax,1 - mov r15,QWORD[((-48))+rsi] - mov r14,QWORD[((-40))+rsi] - mov r13,QWORD[((-32))+rsi] - mov r12,QWORD[((-24))+rsi] - mov rbp,QWORD[((-16))+rsi] - mov rbx,QWORD[((-8))+rsi] - lea rsp,[rsi] -$L$power5_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_bn_power5: - -global bn_sqr8x_internal - - -ALIGN 32 -bn_sqr8x_internal: -__bn_sqr8x_internal: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lea rbp,[32+r10] - lea rsi,[r9*1+rsi] - - mov rcx,r9 - - - mov r14,QWORD[((-32))+rbp*1+rsi] - lea rdi,[((48+8))+r9*2+rsp] - mov rax,QWORD[((-24))+rbp*1+rsi] - lea rdi,[((-32))+rbp*1+rdi] - mov rbx,QWORD[((-16))+rbp*1+rsi] - mov r15,rax - - mul r14 - mov r10,rax - mov rax,rbx - mov r11,rdx - mov QWORD[((-24))+rbp*1+rdi],r10 - - mul r14 - add r11,rax - mov rax,rbx - adc rdx,0 - mov QWORD[((-16))+rbp*1+rdi],r11 - mov r10,rdx - - - mov rbx,QWORD[((-8))+rbp*1+rsi] - mul r15 - mov r12,rax - mov rax,rbx - mov r13,rdx - - lea rcx,[rbp] - mul r14 - add r10,rax - mov rax,rbx - mov r11,rdx - adc r11,0 - add r10,r12 - adc r11,0 - mov QWORD[((-8))+rcx*1+rdi],r10 - jmp NEAR $L$sqr4x_1st - -ALIGN 32 -$L$sqr4x_1st: - mov rbx,QWORD[rcx*1+rsi] - mul r15 - add r13,rax - mov rax,rbx - mov r12,rdx - adc r12,0 - - mul r14 - add r11,rax - mov rax,rbx - mov rbx,QWORD[8+rcx*1+rsi] - mov r10,rdx - adc r10,0 - add r11,r13 - adc r10,0 - - - mul r15 - add r12,rax - mov rax,rbx - mov QWORD[rcx*1+rdi],r11 - mov r13,rdx - adc r13,0 - - mul r14 - add r10,rax - mov rax,rbx - mov rbx,QWORD[16+rcx*1+rsi] - mov r11,rdx - adc r11,0 - add r10,r12 - adc r11,0 - - mul r15 - add r13,rax - mov rax,rbx - mov QWORD[8+rcx*1+rdi],r10 - mov r12,rdx - adc r12,0 - - mul r14 - add r11,rax - mov rax,rbx - mov rbx,QWORD[24+rcx*1+rsi] - mov r10,rdx - adc r10,0 - add r11,r13 - adc r10,0 - - - mul r15 - add r12,rax - mov rax,rbx - mov QWORD[16+rcx*1+rdi],r11 - mov r13,rdx - adc r13,0 - lea rcx,[32+rcx] - - mul r14 - add r10,rax - mov rax,rbx - mov r11,rdx - adc r11,0 - add r10,r12 - adc r11,0 - mov QWORD[((-8))+rcx*1+rdi],r10 - - cmp rcx,0 - jne NEAR $L$sqr4x_1st - - mul r15 - add r13,rax - lea rbp,[16+rbp] - adc rdx,0 - add r13,r11 - adc rdx,0 - - mov QWORD[rdi],r13 - mov r12,rdx - mov QWORD[8+rdi],rdx - jmp NEAR $L$sqr4x_outer - -ALIGN 32 -$L$sqr4x_outer: - mov r14,QWORD[((-32))+rbp*1+rsi] - lea rdi,[((48+8))+r9*2+rsp] - mov rax,QWORD[((-24))+rbp*1+rsi] - lea rdi,[((-32))+rbp*1+rdi] - mov rbx,QWORD[((-16))+rbp*1+rsi] - mov r15,rax - - mul r14 - mov r10,QWORD[((-24))+rbp*1+rdi] - add r10,rax - mov rax,rbx - adc rdx,0 - mov QWORD[((-24))+rbp*1+rdi],r10 - mov r11,rdx - - mul r14 - add r11,rax - mov rax,rbx - adc rdx,0 - add r11,QWORD[((-16))+rbp*1+rdi] - mov r10,rdx - adc r10,0 - mov QWORD[((-16))+rbp*1+rdi],r11 - - xor r12,r12 - - mov rbx,QWORD[((-8))+rbp*1+rsi] - mul r15 - add r12,rax - mov rax,rbx - adc rdx,0 - add r12,QWORD[((-8))+rbp*1+rdi] - mov r13,rdx - adc r13,0 - - mul r14 - add r10,rax - mov rax,rbx - adc rdx,0 - add r10,r12 - mov r11,rdx - adc r11,0 - mov QWORD[((-8))+rbp*1+rdi],r10 - - lea rcx,[rbp] - jmp NEAR $L$sqr4x_inner - -ALIGN 32 -$L$sqr4x_inner: - mov rbx,QWORD[rcx*1+rsi] - mul r15 - add r13,rax - mov rax,rbx - mov r12,rdx - adc r12,0 - add r13,QWORD[rcx*1+rdi] - adc r12,0 - -DB 0x67 - mul r14 - add r11,rax - mov rax,rbx - mov rbx,QWORD[8+rcx*1+rsi] - mov r10,rdx - adc r10,0 - add r11,r13 - adc r10,0 - - mul r15 - add r12,rax - mov QWORD[rcx*1+rdi],r11 - mov rax,rbx - mov r13,rdx - adc r13,0 - add r12,QWORD[8+rcx*1+rdi] - lea rcx,[16+rcx] - adc r13,0 - - mul r14 - add r10,rax - mov rax,rbx - adc rdx,0 - add r10,r12 - mov r11,rdx - adc r11,0 - mov QWORD[((-8))+rcx*1+rdi],r10 - - cmp rcx,0 - jne NEAR $L$sqr4x_inner - -DB 0x67 - mul r15 - add r13,rax - adc rdx,0 - add r13,r11 - adc rdx,0 - - mov QWORD[rdi],r13 - mov r12,rdx - mov QWORD[8+rdi],rdx - - add rbp,16 - jnz NEAR $L$sqr4x_outer - - - mov r14,QWORD[((-32))+rsi] - lea rdi,[((48+8))+r9*2+rsp] - mov rax,QWORD[((-24))+rsi] - lea rdi,[((-32))+rbp*1+rdi] - mov rbx,QWORD[((-16))+rsi] - mov r15,rax - - mul r14 - add r10,rax - mov rax,rbx - mov r11,rdx - adc r11,0 - - mul r14 - add r11,rax - mov rax,rbx - mov QWORD[((-24))+rdi],r10 - mov r10,rdx - adc r10,0 - add r11,r13 - mov rbx,QWORD[((-8))+rsi] - adc r10,0 - - mul r15 - add r12,rax - mov rax,rbx - mov QWORD[((-16))+rdi],r11 - mov r13,rdx - adc r13,0 - - mul r14 - add r10,rax - mov rax,rbx - mov r11,rdx - adc r11,0 - add r10,r12 - adc r11,0 - mov QWORD[((-8))+rdi],r10 - - mul r15 - add r13,rax - mov rax,QWORD[((-16))+rsi] - adc rdx,0 - add r13,r11 - adc rdx,0 - - mov QWORD[rdi],r13 - mov r12,rdx - mov QWORD[8+rdi],rdx - - mul rbx - add rbp,16 - xor r14,r14 - sub rbp,r9 - xor r15,r15 - - add rax,r12 - adc rdx,0 - mov QWORD[8+rdi],rax - mov QWORD[16+rdi],rdx - mov QWORD[24+rdi],r15 - - mov rax,QWORD[((-16))+rbp*1+rsi] - lea rdi,[((48+8))+rsp] - xor r10,r10 - mov r11,QWORD[8+rdi] - - lea r12,[r10*2+r14] - shr r10,63 - lea r13,[r11*2+rcx] - shr r11,63 - or r13,r10 - mov r10,QWORD[16+rdi] - mov r14,r11 - mul rax - neg r15 - mov r11,QWORD[24+rdi] - adc r12,rax - mov rax,QWORD[((-8))+rbp*1+rsi] - mov QWORD[rdi],r12 - adc r13,rdx - - lea rbx,[r10*2+r14] - mov QWORD[8+rdi],r13 - sbb r15,r15 - shr r10,63 - lea r8,[r11*2+rcx] - shr r11,63 - or r8,r10 - mov r10,QWORD[32+rdi] - mov r14,r11 - mul rax - neg r15 - mov r11,QWORD[40+rdi] - adc rbx,rax - mov rax,QWORD[rbp*1+rsi] - mov QWORD[16+rdi],rbx - adc r8,rdx - lea rbp,[16+rbp] - mov QWORD[24+rdi],r8 - sbb r15,r15 - lea rdi,[64+rdi] - jmp NEAR $L$sqr4x_shift_n_add - -ALIGN 32 -$L$sqr4x_shift_n_add: - lea r12,[r10*2+r14] - shr r10,63 - lea r13,[r11*2+rcx] - shr r11,63 - or r13,r10 - mov r10,QWORD[((-16))+rdi] - mov r14,r11 - mul rax - neg r15 - mov r11,QWORD[((-8))+rdi] - adc r12,rax - mov rax,QWORD[((-8))+rbp*1+rsi] - mov QWORD[((-32))+rdi],r12 - adc r13,rdx - - lea rbx,[r10*2+r14] - mov QWORD[((-24))+rdi],r13 - sbb r15,r15 - shr r10,63 - lea r8,[r11*2+rcx] - shr r11,63 - or r8,r10 - mov r10,QWORD[rdi] - mov r14,r11 - mul rax - neg r15 - mov r11,QWORD[8+rdi] - adc rbx,rax - mov rax,QWORD[rbp*1+rsi] - mov QWORD[((-16))+rdi],rbx - adc r8,rdx - - lea r12,[r10*2+r14] - mov QWORD[((-8))+rdi],r8 - sbb r15,r15 - shr r10,63 - lea r13,[r11*2+rcx] - shr r11,63 - or r13,r10 - mov r10,QWORD[16+rdi] - mov r14,r11 - mul rax - neg r15 - mov r11,QWORD[24+rdi] - adc r12,rax - mov rax,QWORD[8+rbp*1+rsi] - mov QWORD[rdi],r12 - adc r13,rdx - - lea rbx,[r10*2+r14] - mov QWORD[8+rdi],r13 - sbb r15,r15 - shr r10,63 - lea r8,[r11*2+rcx] - shr r11,63 - or r8,r10 - mov r10,QWORD[32+rdi] - mov r14,r11 - mul rax - neg r15 - mov r11,QWORD[40+rdi] - adc rbx,rax - mov rax,QWORD[16+rbp*1+rsi] - mov QWORD[16+rdi],rbx - adc r8,rdx - mov QWORD[24+rdi],r8 - sbb r15,r15 - lea rdi,[64+rdi] - add rbp,32 - jnz NEAR $L$sqr4x_shift_n_add - - lea r12,[r10*2+r14] -DB 0x67 - shr r10,63 - lea r13,[r11*2+rcx] - shr r11,63 - or r13,r10 - mov r10,QWORD[((-16))+rdi] - mov r14,r11 - mul rax - neg r15 - mov r11,QWORD[((-8))+rdi] - adc r12,rax - mov rax,QWORD[((-8))+rsi] - mov QWORD[((-32))+rdi],r12 - adc r13,rdx - - lea rbx,[r10*2+r14] - mov QWORD[((-24))+rdi],r13 - sbb r15,r15 - shr r10,63 - lea r8,[r11*2+rcx] - shr r11,63 - or r8,r10 - mul rax - neg r15 - adc rbx,rax - adc r8,rdx - mov QWORD[((-16))+rdi],rbx - mov QWORD[((-8))+rdi],r8 -DB 102,72,15,126,213 -sqr8x_reduction: - xor rax,rax - lea rcx,[r9*2+rbp] - lea rdx,[((48+8))+r9*2+rsp] - mov QWORD[((0+8))+rsp],rcx - lea rdi,[((48+8))+r9*1+rsp] - mov QWORD[((8+8))+rsp],rdx - neg r9 - jmp NEAR $L$8x_reduction_loop - -ALIGN 32 -$L$8x_reduction_loop: - lea rdi,[r9*1+rdi] -DB 0x66 - mov rbx,QWORD[rdi] - mov r9,QWORD[8+rdi] - mov r10,QWORD[16+rdi] - mov r11,QWORD[24+rdi] - mov r12,QWORD[32+rdi] - mov r13,QWORD[40+rdi] - mov r14,QWORD[48+rdi] - mov r15,QWORD[56+rdi] - mov QWORD[rdx],rax - lea rdi,[64+rdi] - -DB 0x67 - mov r8,rbx - imul rbx,QWORD[((32+8))+rsp] - mov rax,QWORD[rbp] - mov ecx,8 - jmp NEAR $L$8x_reduce - -ALIGN 32 -$L$8x_reduce: - mul rbx - mov rax,QWORD[16+rbp] - neg r8 - mov r8,rdx - adc r8,0 - - mul rbx - add r9,rax - mov rax,QWORD[32+rbp] - adc rdx,0 - add r8,r9 - mov QWORD[((48-8+8))+rcx*8+rsp],rbx - mov r9,rdx - adc r9,0 - - mul rbx - add r10,rax - mov rax,QWORD[48+rbp] - adc rdx,0 - add r9,r10 - mov rsi,QWORD[((32+8))+rsp] - mov r10,rdx - adc r10,0 - - mul rbx - add r11,rax - mov rax,QWORD[64+rbp] - adc rdx,0 - imul rsi,r8 - add r10,r11 - mov r11,rdx - adc r11,0 - - mul rbx - add r12,rax - mov rax,QWORD[80+rbp] - adc rdx,0 - add r11,r12 - mov r12,rdx - adc r12,0 - - mul rbx - add r13,rax - mov rax,QWORD[96+rbp] - adc rdx,0 - add r12,r13 - mov r13,rdx - adc r13,0 - - mul rbx - add r14,rax - mov rax,QWORD[112+rbp] - adc rdx,0 - add r13,r14 - mov r14,rdx - adc r14,0 - - mul rbx - mov rbx,rsi - add r15,rax - mov rax,QWORD[rbp] - adc rdx,0 - add r14,r15 - mov r15,rdx - adc r15,0 - - dec ecx - jnz NEAR $L$8x_reduce - - lea rbp,[128+rbp] - xor rax,rax - mov rdx,QWORD[((8+8))+rsp] - cmp rbp,QWORD[((0+8))+rsp] - jae NEAR $L$8x_no_tail - -DB 0x66 - add r8,QWORD[rdi] - adc r9,QWORD[8+rdi] - adc r10,QWORD[16+rdi] - adc r11,QWORD[24+rdi] - adc r12,QWORD[32+rdi] - adc r13,QWORD[40+rdi] - adc r14,QWORD[48+rdi] - adc r15,QWORD[56+rdi] - sbb rsi,rsi - - mov rbx,QWORD[((48+56+8))+rsp] - mov ecx,8 - mov rax,QWORD[rbp] - jmp NEAR $L$8x_tail - -ALIGN 32 -$L$8x_tail: - mul rbx - add r8,rax - mov rax,QWORD[16+rbp] - mov QWORD[rdi],r8 - mov r8,rdx - adc r8,0 - - mul rbx - add r9,rax - mov rax,QWORD[32+rbp] - adc rdx,0 - add r8,r9 - lea rdi,[8+rdi] - mov r9,rdx - adc r9,0 - - mul rbx - add r10,rax - mov rax,QWORD[48+rbp] - adc rdx,0 - add r9,r10 - mov r10,rdx - adc r10,0 - - mul rbx - add r11,rax - mov rax,QWORD[64+rbp] - adc rdx,0 - add r10,r11 - mov r11,rdx - adc r11,0 - - mul rbx - add r12,rax - mov rax,QWORD[80+rbp] - adc rdx,0 - add r11,r12 - mov r12,rdx - adc r12,0 - - mul rbx - add r13,rax - mov rax,QWORD[96+rbp] - adc rdx,0 - add r12,r13 - mov r13,rdx - adc r13,0 - - mul rbx - add r14,rax - mov rax,QWORD[112+rbp] - adc rdx,0 - add r13,r14 - mov r14,rdx - adc r14,0 - - mul rbx - mov rbx,QWORD[((48-16+8))+rcx*8+rsp] - add r15,rax - adc rdx,0 - add r14,r15 - mov rax,QWORD[rbp] - mov r15,rdx - adc r15,0 - - dec ecx - jnz NEAR $L$8x_tail - - lea rbp,[128+rbp] - mov rdx,QWORD[((8+8))+rsp] - cmp rbp,QWORD[((0+8))+rsp] - jae NEAR $L$8x_tail_done - - mov rbx,QWORD[((48+56+8))+rsp] - neg rsi - mov rax,QWORD[rbp] - adc r8,QWORD[rdi] - adc r9,QWORD[8+rdi] - adc r10,QWORD[16+rdi] - adc r11,QWORD[24+rdi] - adc r12,QWORD[32+rdi] - adc r13,QWORD[40+rdi] - adc r14,QWORD[48+rdi] - adc r15,QWORD[56+rdi] - sbb rsi,rsi - - mov ecx,8 - jmp NEAR $L$8x_tail - -ALIGN 32 -$L$8x_tail_done: - add r8,QWORD[rdx] - xor rax,rax - - neg rsi -$L$8x_no_tail: - adc r8,QWORD[rdi] - adc r9,QWORD[8+rdi] - adc r10,QWORD[16+rdi] - adc r11,QWORD[24+rdi] - adc r12,QWORD[32+rdi] - adc r13,QWORD[40+rdi] - adc r14,QWORD[48+rdi] - adc r15,QWORD[56+rdi] - adc rax,0 - mov rcx,QWORD[((-16))+rbp] - xor rsi,rsi - -DB 102,72,15,126,213 - - mov QWORD[rdi],r8 - mov QWORD[8+rdi],r9 -DB 102,73,15,126,217 - mov QWORD[16+rdi],r10 - mov QWORD[24+rdi],r11 - mov QWORD[32+rdi],r12 - mov QWORD[40+rdi],r13 - mov QWORD[48+rdi],r14 - mov QWORD[56+rdi],r15 - lea rdi,[64+rdi] - - cmp rdi,rdx - jb NEAR $L$8x_reduction_loop - - sub rcx,r15 - lea rbx,[r9*1+rdi] - adc rsi,rsi - mov rcx,r9 - or rax,rsi -DB 102,72,15,126,207 - xor rax,1 -DB 102,72,15,126,206 - lea rbp,[rax*8+rbp] - sar rcx,3+2 - jmp NEAR $L$sqr4x_sub - -ALIGN 32 -$L$sqr4x_sub: -DB 0x66 - mov r12,QWORD[rbx] - mov r13,QWORD[8+rbx] - sbb r12,QWORD[rbp] - mov r14,QWORD[16+rbx] - sbb r13,QWORD[16+rbp] - mov r15,QWORD[24+rbx] - lea rbx,[32+rbx] - sbb r14,QWORD[32+rbp] - mov QWORD[rdi],r12 - sbb r15,QWORD[48+rbp] - lea rbp,[64+rbp] - mov QWORD[8+rdi],r13 - mov QWORD[16+rdi],r14 - mov QWORD[24+rdi],r15 - lea rdi,[32+rdi] - - inc rcx - jnz NEAR $L$sqr4x_sub - mov r10,r9 - neg r9 - DB 0F3h,0C3h ;repret - -global bn_from_montgomery - -ALIGN 32 -bn_from_montgomery: - test DWORD[48+rsp],7 - jz NEAR bn_from_mont8x - xor eax,eax - DB 0F3h,0C3h ;repret - - - -ALIGN 32 -bn_from_mont8x: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_bn_from_mont8x: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - mov r9,QWORD[48+rsp] - - -DB 0x67 - mov rax,rsp - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - lea rsp,[((-40))+rsp] - movaps XMMWORD[rsp],xmm6 - movaps XMMWORD[16+rsp],xmm7 -DB 0x67 - mov r10d,r9d - shl r9d,3 - shl r10d,3+2 - neg r9 - mov r8,QWORD[r8] - - - - - - - - lea r11,[((-64))+r9*2+rsp] - sub r11,rsi - and r11,4095 - cmp r10,r11 - jb NEAR $L$from_sp_alt - sub rsp,r11 - lea rsp,[((-64))+r9*2+rsp] - jmp NEAR $L$from_sp_done - -ALIGN 32 -$L$from_sp_alt: - lea r10,[((4096-64))+r9*2] - lea rsp,[((-64))+r9*2+rsp] - sub r11,r10 - mov r10,0 - cmovc r11,r10 - sub rsp,r11 -$L$from_sp_done: - and rsp,-64 - mov r10,r9 - neg r9 - - - - - - - - - - - mov QWORD[32+rsp],r8 - mov QWORD[40+rsp],rax -$L$from_body: - mov r11,r9 - lea rax,[48+rsp] - pxor xmm0,xmm0 - jmp NEAR $L$mul_by_1 - -ALIGN 32 -$L$mul_by_1: - movdqu xmm1,XMMWORD[rsi] - movdqu xmm2,XMMWORD[16+rsi] - movdqu xmm3,XMMWORD[32+rsi] - movdqa XMMWORD[r9*1+rax],xmm0 - movdqu xmm4,XMMWORD[48+rsi] - movdqa XMMWORD[16+r9*1+rax],xmm0 -DB 0x48,0x8d,0xb6,0x40,0x00,0x00,0x00 - movdqa XMMWORD[rax],xmm1 - movdqa XMMWORD[32+r9*1+rax],xmm0 - movdqa XMMWORD[16+rax],xmm2 - movdqa XMMWORD[48+r9*1+rax],xmm0 - movdqa XMMWORD[32+rax],xmm3 - movdqa XMMWORD[48+rax],xmm4 - lea rax,[64+rax] - sub r11,64 - jnz NEAR $L$mul_by_1 - -DB 102,72,15,110,207 -DB 102,72,15,110,209 -DB 0x67 - mov rbp,rcx -DB 102,73,15,110,218 - call sqr8x_reduction - - pxor xmm0,xmm0 - lea rax,[48+rsp] - mov rsi,QWORD[40+rsp] - jmp NEAR $L$from_mont_zero - -ALIGN 32 -$L$from_mont_zero: - movdqa XMMWORD[rax],xmm0 - movdqa XMMWORD[16+rax],xmm0 - movdqa XMMWORD[32+rax],xmm0 - movdqa XMMWORD[48+rax],xmm0 - lea rax,[64+rax] - sub r9,32 - jnz NEAR $L$from_mont_zero - - mov rax,1 - mov r15,QWORD[((-48))+rsi] - mov r14,QWORD[((-40))+rsi] - mov r13,QWORD[((-32))+rsi] - mov r12,QWORD[((-24))+rsi] - mov rbp,QWORD[((-16))+rsi] - mov rbx,QWORD[((-8))+rsi] - lea rsp,[rsi] -$L$from_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_bn_from_mont8x: -global bn_scatter5 - -ALIGN 16 -bn_scatter5: - cmp edx,0 - jz NEAR $L$scatter_epilogue - lea r8,[r9*8+r8] -$L$scatter: - mov rax,QWORD[rcx] - lea rcx,[8+rcx] - mov QWORD[r8],rax - lea r8,[256+r8] - sub edx,1 - jnz NEAR $L$scatter -$L$scatter_epilogue: - DB 0F3h,0C3h ;repret - - -global bn_gather5 - -ALIGN 16 -bn_gather5: -$L$SEH_begin_bn_gather5: - -DB 0x48,0x83,0xec,0x28 -DB 0x0f,0x29,0x34,0x24 -DB 0x0f,0x29,0x7c,0x24,0x10 - mov r11d,r9d - shr r9d,3 - and r11,7 - not r9d - lea rax,[$L$magic_masks] - and r9d,3 - lea r8,[128+r11*8+r8] - movq xmm4,QWORD[r9*8+rax] - movq xmm5,QWORD[8+r9*8+rax] - movq xmm6,QWORD[16+r9*8+rax] - movq xmm7,QWORD[24+r9*8+rax] - jmp NEAR $L$gather -ALIGN 16 -$L$gather: - movq xmm0,QWORD[(((-128)))+r8] - movq xmm1,QWORD[((-64))+r8] - pand xmm0,xmm4 - movq xmm2,QWORD[r8] - pand xmm1,xmm5 - movq xmm3,QWORD[64+r8] - pand xmm2,xmm6 - por xmm0,xmm1 - pand xmm3,xmm7 -DB 0x67,0x67 - por xmm0,xmm2 - lea r8,[256+r8] - por xmm0,xmm3 - - movq QWORD[rcx],xmm0 - lea rcx,[8+rcx] - sub edx,1 - jnz NEAR $L$gather - movaps xmm6,XMMWORD[rsp] - movaps xmm7,XMMWORD[16+rsp] - lea rsp,[40+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_bn_gather5: - -ALIGN 64 -$L$magic_masks: - DD 0,0,0,0,0,0,-1,-1 - DD 0,0,0,0,0,0,0,0 -DB 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105 -DB 112,108,105,99,97,116,105,111,110,32,119,105,116,104,32,115 -DB 99,97,116,116,101,114,47,103,97,116,104,101,114,32,102,111 -DB 114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79 -DB 71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111 -DB 112,101,110,115,115,108,46,111,114,103,62,0 -EXTERN __imp_RtlVirtualUnwind - -ALIGN 16 -mul_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - mov rsi,QWORD[8+r9] - mov r11,QWORD[56+r9] - - mov r10d,DWORD[r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jb NEAR $L$common_seh_tail - - mov rax,QWORD[152+r8] - - mov r10d,DWORD[4+r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jae NEAR $L$common_seh_tail - - lea r10,[$L$mul_epilogue] - cmp rbx,r10 - jb NEAR $L$body_40 - - mov r10,QWORD[192+r8] - mov rax,QWORD[8+r10*8+rax] - jmp NEAR $L$body_proceed - -$L$body_40: - mov rax,QWORD[40+rax] -$L$body_proceed: - - movaps xmm0,XMMWORD[((-88))+rax] - movaps xmm1,XMMWORD[((-72))+rax] - - mov rbx,QWORD[((-8))+rax] - mov rbp,QWORD[((-16))+rax] - mov r12,QWORD[((-24))+rax] - mov r13,QWORD[((-32))+rax] - mov r14,QWORD[((-40))+rax] - mov r15,QWORD[((-48))+rax] - mov QWORD[144+r8],rbx - mov QWORD[160+r8],rbp - mov QWORD[216+r8],r12 - mov QWORD[224+r8],r13 - mov QWORD[232+r8],r14 - mov QWORD[240+r8],r15 - movups XMMWORD[512+r8],xmm0 - movups XMMWORD[528+r8],xmm1 - -$L$common_seh_tail: - mov rdi,QWORD[8+rax] - mov rsi,QWORD[16+rax] - mov QWORD[152+r8],rax - mov QWORD[168+r8],rsi - mov QWORD[176+r8],rdi - - mov rdi,QWORD[40+r9] - mov rsi,r8 - mov ecx,154 - DD 0xa548f3fc - - mov rsi,r9 - xor rcx,rcx - mov rdx,QWORD[8+rsi] - mov r8,QWORD[rsi] - mov r9,QWORD[16+rsi] - mov r10,QWORD[40+rsi] - lea r11,[56+rsi] - lea r12,[24+rsi] - mov QWORD[32+rsp],r10 - mov QWORD[40+rsp],r11 - mov QWORD[48+rsp],r12 - mov QWORD[56+rsp],rcx - call QWORD[__imp_RtlVirtualUnwind] - - mov eax,1 - add rsp,64 - popfq - pop r15 - pop r14 - pop r13 - pop r12 - pop rbp - pop rbx - pop rdi - pop rsi - DB 0F3h,0C3h ;repret - - -section .pdata rdata align=4 -ALIGN 4 - DD $L$SEH_begin_bn_mul_mont_gather5 wrt ..imagebase - DD $L$SEH_end_bn_mul_mont_gather5 wrt ..imagebase - DD $L$SEH_info_bn_mul_mont_gather5 wrt ..imagebase - - DD $L$SEH_begin_bn_mul4x_mont_gather5 wrt ..imagebase - DD $L$SEH_end_bn_mul4x_mont_gather5 wrt ..imagebase - DD $L$SEH_info_bn_mul4x_mont_gather5 wrt ..imagebase - - DD $L$SEH_begin_bn_power5 wrt ..imagebase - DD $L$SEH_end_bn_power5 wrt ..imagebase - DD $L$SEH_info_bn_power5 wrt ..imagebase - - DD $L$SEH_begin_bn_from_mont8x wrt ..imagebase - DD $L$SEH_end_bn_from_mont8x wrt ..imagebase - DD $L$SEH_info_bn_from_mont8x wrt ..imagebase - DD $L$SEH_begin_bn_gather5 wrt ..imagebase - DD $L$SEH_end_bn_gather5 wrt ..imagebase - DD $L$SEH_info_bn_gather5 wrt ..imagebase - -section .xdata rdata align=8 -ALIGN 8 -$L$SEH_info_bn_mul_mont_gather5: -DB 9,0,0,0 - DD mul_handler wrt ..imagebase - DD $L$mul_body wrt ..imagebase,$L$mul_epilogue wrt ..imagebase -ALIGN 8 -$L$SEH_info_bn_mul4x_mont_gather5: -DB 9,0,0,0 - DD mul_handler wrt ..imagebase - DD $L$mul4x_body wrt ..imagebase,$L$mul4x_epilogue wrt ..imagebase -ALIGN 8 -$L$SEH_info_bn_power5: -DB 9,0,0,0 - DD mul_handler wrt ..imagebase - DD $L$power5_body wrt ..imagebase,$L$power5_epilogue wrt ..imagebase -ALIGN 8 -$L$SEH_info_bn_from_mont8x: -DB 9,0,0,0 - DD mul_handler wrt ..imagebase - DD $L$from_body wrt ..imagebase,$L$from_epilogue wrt ..imagebase -ALIGN 8 -$L$SEH_info_bn_gather5: -DB 0x01,0x0d,0x05,0x00 -DB 0x0d,0x78,0x01,0x00 -DB 0x08,0x68,0x00,0x00 -DB 0x04,0x42,0x00,0x00 -ALIGN 8 diff --git a/third_party/boringssl/win-x86_64/crypto/cpu-x86_64-asm.asm b/third_party/boringssl/win-x86_64/crypto/cpu-x86_64-asm.asm deleted file mode 100644 index c92d7bbc1f778..0000000000000 --- a/third_party/boringssl/win-x86_64/crypto/cpu-x86_64-asm.asm +++ /dev/null @@ -1,154 +0,0 @@ -default rel -%define XMMWORD -%define YMMWORD -%define ZMMWORD -section .text code align=64 - - -global OPENSSL_ia32_cpuid - -ALIGN 16 -OPENSSL_ia32_cpuid: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_OPENSSL_ia32_cpuid: - mov rdi,rcx - - - - - mov rdi,rcx - mov r8,rbx - - xor eax,eax - mov DWORD[8+rdi],eax - cpuid - mov r11d,eax - - xor eax,eax - cmp ebx,0x756e6547 - setne al - mov r9d,eax - cmp edx,0x49656e69 - setne al - or r9d,eax - cmp ecx,0x6c65746e - setne al - or r9d,eax - jz NEAR $L$intel - - cmp ebx,0x68747541 - setne al - mov r10d,eax - cmp edx,0x69746E65 - setne al - or r10d,eax - cmp ecx,0x444D4163 - setne al - or r10d,eax - jnz NEAR $L$intel - - - - - mov eax,0x80000000 - cpuid - - - cmp eax,0x80000001 - jb NEAR $L$intel - mov r10d,eax - mov eax,0x80000001 - cpuid - - - or r9d,ecx - and r9d,0x00000801 - - cmp r10d,0x80000008 - jb NEAR $L$intel - - mov eax,0x80000008 - cpuid - - movzx r10,cl - inc r10 - - mov eax,1 - cpuid - - bt edx,28 - jnc NEAR $L$generic - shr ebx,16 - cmp bl,r10b - ja NEAR $L$generic - and edx,0xefffffff - jmp NEAR $L$generic - -$L$intel: - cmp r11d,4 - mov r10d,-1 - jb NEAR $L$nocacheinfo - - mov eax,4 - mov ecx,0 - cpuid - mov r10d,eax - shr r10d,14 - and r10d,0xfff - - cmp r11d,7 - jb NEAR $L$nocacheinfo - - mov eax,7 - xor ecx,ecx - cpuid - mov DWORD[8+rdi],ebx - -$L$nocacheinfo: - mov eax,1 - cpuid - - and edx,0xbfefffff - cmp r9d,0 - jne NEAR $L$notintel - or edx,0x40000000 -$L$notintel: - bt edx,28 - jnc NEAR $L$generic - and edx,0xefffffff - cmp r10d,0 - je NEAR $L$generic - - or edx,0x10000000 - shr ebx,16 - cmp bl,1 - ja NEAR $L$generic - and edx,0xefffffff -$L$generic: - and r9d,0x00000800 - and ecx,0xfffff7ff - or r9d,ecx - - mov r10d,edx - bt r9d,27 - jnc NEAR $L$clear_avx - xor ecx,ecx -DB 0x0f,0x01,0xd0 - and eax,6 - cmp eax,6 - je NEAR $L$done -$L$clear_avx: - mov eax,0xefffe7ff - and r9d,eax - and DWORD[8+rdi],0xffffffdf -$L$done: - mov DWORD[4+rdi],r9d - mov DWORD[rdi],r10d - mov rbx,r8 - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_OPENSSL_ia32_cpuid: - diff --git a/third_party/boringssl/win-x86_64/crypto/md5/md5-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/md5/md5-x86_64.asm deleted file mode 100644 index 0e9d2c604eb13..0000000000000 --- a/third_party/boringssl/win-x86_64/crypto/md5/md5-x86_64.asm +++ /dev/null @@ -1,776 +0,0 @@ -default rel -%define XMMWORD -%define YMMWORD -%define ZMMWORD -section .text code align=64 - -ALIGN 16 - -global md5_block_asm_data_order - -md5_block_asm_data_order: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_md5_block_asm_data_order: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - - - push rbp - push rbx - push r12 - push r14 - push r15 -$L$prologue: - - - - - mov rbp,rdi - shl rdx,6 - lea rdi,[rdx*1+rsi] - mov eax,DWORD[rbp] - mov ebx,DWORD[4+rbp] - mov ecx,DWORD[8+rbp] - mov edx,DWORD[12+rbp] - - - - - - - - cmp rsi,rdi - je NEAR $L$end - - -$L$loop: - mov r8d,eax - mov r9d,ebx - mov r14d,ecx - mov r15d,edx - mov r10d,DWORD[rsi] - mov r11d,edx - xor r11d,ecx - lea eax,[((-680876936))+r10*1+rax] - and r11d,ebx - xor r11d,edx - mov r10d,DWORD[4+rsi] - add eax,r11d - rol eax,7 - mov r11d,ecx - add eax,ebx - xor r11d,ebx - lea edx,[((-389564586))+r10*1+rdx] - and r11d,eax - xor r11d,ecx - mov r10d,DWORD[8+rsi] - add edx,r11d - rol edx,12 - mov r11d,ebx - add edx,eax - xor r11d,eax - lea ecx,[606105819+r10*1+rcx] - and r11d,edx - xor r11d,ebx - mov r10d,DWORD[12+rsi] - add ecx,r11d - rol ecx,17 - mov r11d,eax - add ecx,edx - xor r11d,edx - lea ebx,[((-1044525330))+r10*1+rbx] - and r11d,ecx - xor r11d,eax - mov r10d,DWORD[16+rsi] - add ebx,r11d - rol ebx,22 - mov r11d,edx - add ebx,ecx - xor r11d,ecx - lea eax,[((-176418897))+r10*1+rax] - and r11d,ebx - xor r11d,edx - mov r10d,DWORD[20+rsi] - add eax,r11d - rol eax,7 - mov r11d,ecx - add eax,ebx - xor r11d,ebx - lea edx,[1200080426+r10*1+rdx] - and r11d,eax - xor r11d,ecx - mov r10d,DWORD[24+rsi] - add edx,r11d - rol edx,12 - mov r11d,ebx - add edx,eax - xor r11d,eax - lea ecx,[((-1473231341))+r10*1+rcx] - and r11d,edx - xor r11d,ebx - mov r10d,DWORD[28+rsi] - add ecx,r11d - rol ecx,17 - mov r11d,eax - add ecx,edx - xor r11d,edx - lea ebx,[((-45705983))+r10*1+rbx] - and r11d,ecx - xor r11d,eax - mov r10d,DWORD[32+rsi] - add ebx,r11d - rol ebx,22 - mov r11d,edx - add ebx,ecx - xor r11d,ecx - lea eax,[1770035416+r10*1+rax] - and r11d,ebx - xor r11d,edx - mov r10d,DWORD[36+rsi] - add eax,r11d - rol eax,7 - mov r11d,ecx - add eax,ebx - xor r11d,ebx - lea edx,[((-1958414417))+r10*1+rdx] - and r11d,eax - xor r11d,ecx - mov r10d,DWORD[40+rsi] - add edx,r11d - rol edx,12 - mov r11d,ebx - add edx,eax - xor r11d,eax - lea ecx,[((-42063))+r10*1+rcx] - and r11d,edx - xor r11d,ebx - mov r10d,DWORD[44+rsi] - add ecx,r11d - rol ecx,17 - mov r11d,eax - add ecx,edx - xor r11d,edx - lea ebx,[((-1990404162))+r10*1+rbx] - and r11d,ecx - xor r11d,eax - mov r10d,DWORD[48+rsi] - add ebx,r11d - rol ebx,22 - mov r11d,edx - add ebx,ecx - xor r11d,ecx - lea eax,[1804603682+r10*1+rax] - and r11d,ebx - xor r11d,edx - mov r10d,DWORD[52+rsi] - add eax,r11d - rol eax,7 - mov r11d,ecx - add eax,ebx - xor r11d,ebx - lea edx,[((-40341101))+r10*1+rdx] - and r11d,eax - xor r11d,ecx - mov r10d,DWORD[56+rsi] - add edx,r11d - rol edx,12 - mov r11d,ebx - add edx,eax - xor r11d,eax - lea ecx,[((-1502002290))+r10*1+rcx] - and r11d,edx - xor r11d,ebx - mov r10d,DWORD[60+rsi] - add ecx,r11d - rol ecx,17 - mov r11d,eax - add ecx,edx - xor r11d,edx - lea ebx,[1236535329+r10*1+rbx] - and r11d,ecx - xor r11d,eax - mov r10d,DWORD[rsi] - add ebx,r11d - rol ebx,22 - mov r11d,edx - add ebx,ecx - mov r10d,DWORD[4+rsi] - mov r11d,edx - mov r12d,edx - not r11d - lea eax,[((-165796510))+r10*1+rax] - and r12d,ebx - and r11d,ecx - mov r10d,DWORD[24+rsi] - or r12d,r11d - mov r11d,ecx - add eax,r12d - mov r12d,ecx - rol eax,5 - add eax,ebx - not r11d - lea edx,[((-1069501632))+r10*1+rdx] - and r12d,eax - and r11d,ebx - mov r10d,DWORD[44+rsi] - or r12d,r11d - mov r11d,ebx - add edx,r12d - mov r12d,ebx - rol edx,9 - add edx,eax - not r11d - lea ecx,[643717713+r10*1+rcx] - and r12d,edx - and r11d,eax - mov r10d,DWORD[rsi] - or r12d,r11d - mov r11d,eax - add ecx,r12d - mov r12d,eax - rol ecx,14 - add ecx,edx - not r11d - lea ebx,[((-373897302))+r10*1+rbx] - and r12d,ecx - and r11d,edx - mov r10d,DWORD[20+rsi] - or r12d,r11d - mov r11d,edx - add ebx,r12d - mov r12d,edx - rol ebx,20 - add ebx,ecx - not r11d - lea eax,[((-701558691))+r10*1+rax] - and r12d,ebx - and r11d,ecx - mov r10d,DWORD[40+rsi] - or r12d,r11d - mov r11d,ecx - add eax,r12d - mov r12d,ecx - rol eax,5 - add eax,ebx - not r11d - lea edx,[38016083+r10*1+rdx] - and r12d,eax - and r11d,ebx - mov r10d,DWORD[60+rsi] - or r12d,r11d - mov r11d,ebx - add edx,r12d - mov r12d,ebx - rol edx,9 - add edx,eax - not r11d - lea ecx,[((-660478335))+r10*1+rcx] - and r12d,edx - and r11d,eax - mov r10d,DWORD[16+rsi] - or r12d,r11d - mov r11d,eax - add ecx,r12d - mov r12d,eax - rol ecx,14 - add ecx,edx - not r11d - lea ebx,[((-405537848))+r10*1+rbx] - and r12d,ecx - and r11d,edx - mov r10d,DWORD[36+rsi] - or r12d,r11d - mov r11d,edx - add ebx,r12d - mov r12d,edx - rol ebx,20 - add ebx,ecx - not r11d - lea eax,[568446438+r10*1+rax] - and r12d,ebx - and r11d,ecx - mov r10d,DWORD[56+rsi] - or r12d,r11d - mov r11d,ecx - add eax,r12d - mov r12d,ecx - rol eax,5 - add eax,ebx - not r11d - lea edx,[((-1019803690))+r10*1+rdx] - and r12d,eax - and r11d,ebx - mov r10d,DWORD[12+rsi] - or r12d,r11d - mov r11d,ebx - add edx,r12d - mov r12d,ebx - rol edx,9 - add edx,eax - not r11d - lea ecx,[((-187363961))+r10*1+rcx] - and r12d,edx - and r11d,eax - mov r10d,DWORD[32+rsi] - or r12d,r11d - mov r11d,eax - add ecx,r12d - mov r12d,eax - rol ecx,14 - add ecx,edx - not r11d - lea ebx,[1163531501+r10*1+rbx] - and r12d,ecx - and r11d,edx - mov r10d,DWORD[52+rsi] - or r12d,r11d - mov r11d,edx - add ebx,r12d - mov r12d,edx - rol ebx,20 - add ebx,ecx - not r11d - lea eax,[((-1444681467))+r10*1+rax] - and r12d,ebx - and r11d,ecx - mov r10d,DWORD[8+rsi] - or r12d,r11d - mov r11d,ecx - add eax,r12d - mov r12d,ecx - rol eax,5 - add eax,ebx - not r11d - lea edx,[((-51403784))+r10*1+rdx] - and r12d,eax - and r11d,ebx - mov r10d,DWORD[28+rsi] - or r12d,r11d - mov r11d,ebx - add edx,r12d - mov r12d,ebx - rol edx,9 - add edx,eax - not r11d - lea ecx,[1735328473+r10*1+rcx] - and r12d,edx - and r11d,eax - mov r10d,DWORD[48+rsi] - or r12d,r11d - mov r11d,eax - add ecx,r12d - mov r12d,eax - rol ecx,14 - add ecx,edx - not r11d - lea ebx,[((-1926607734))+r10*1+rbx] - and r12d,ecx - and r11d,edx - mov r10d,DWORD[rsi] - or r12d,r11d - mov r11d,edx - add ebx,r12d - mov r12d,edx - rol ebx,20 - add ebx,ecx - mov r10d,DWORD[20+rsi] - mov r11d,ecx - lea eax,[((-378558))+r10*1+rax] - mov r10d,DWORD[32+rsi] - xor r11d,edx - xor r11d,ebx - add eax,r11d - rol eax,4 - mov r11d,ebx - add eax,ebx - lea edx,[((-2022574463))+r10*1+rdx] - mov r10d,DWORD[44+rsi] - xor r11d,ecx - xor r11d,eax - add edx,r11d - rol edx,11 - mov r11d,eax - add edx,eax - lea ecx,[1839030562+r10*1+rcx] - mov r10d,DWORD[56+rsi] - xor r11d,ebx - xor r11d,edx - add ecx,r11d - rol ecx,16 - mov r11d,edx - add ecx,edx - lea ebx,[((-35309556))+r10*1+rbx] - mov r10d,DWORD[4+rsi] - xor r11d,eax - xor r11d,ecx - add ebx,r11d - rol ebx,23 - mov r11d,ecx - add ebx,ecx - lea eax,[((-1530992060))+r10*1+rax] - mov r10d,DWORD[16+rsi] - xor r11d,edx - xor r11d,ebx - add eax,r11d - rol eax,4 - mov r11d,ebx - add eax,ebx - lea edx,[1272893353+r10*1+rdx] - mov r10d,DWORD[28+rsi] - xor r11d,ecx - xor r11d,eax - add edx,r11d - rol edx,11 - mov r11d,eax - add edx,eax - lea ecx,[((-155497632))+r10*1+rcx] - mov r10d,DWORD[40+rsi] - xor r11d,ebx - xor r11d,edx - add ecx,r11d - rol ecx,16 - mov r11d,edx - add ecx,edx - lea ebx,[((-1094730640))+r10*1+rbx] - mov r10d,DWORD[52+rsi] - xor r11d,eax - xor r11d,ecx - add ebx,r11d - rol ebx,23 - mov r11d,ecx - add ebx,ecx - lea eax,[681279174+r10*1+rax] - mov r10d,DWORD[rsi] - xor r11d,edx - xor r11d,ebx - add eax,r11d - rol eax,4 - mov r11d,ebx - add eax,ebx - lea edx,[((-358537222))+r10*1+rdx] - mov r10d,DWORD[12+rsi] - xor r11d,ecx - xor r11d,eax - add edx,r11d - rol edx,11 - mov r11d,eax - add edx,eax - lea ecx,[((-722521979))+r10*1+rcx] - mov r10d,DWORD[24+rsi] - xor r11d,ebx - xor r11d,edx - add ecx,r11d - rol ecx,16 - mov r11d,edx - add ecx,edx - lea ebx,[76029189+r10*1+rbx] - mov r10d,DWORD[36+rsi] - xor r11d,eax - xor r11d,ecx - add ebx,r11d - rol ebx,23 - mov r11d,ecx - add ebx,ecx - lea eax,[((-640364487))+r10*1+rax] - mov r10d,DWORD[48+rsi] - xor r11d,edx - xor r11d,ebx - add eax,r11d - rol eax,4 - mov r11d,ebx - add eax,ebx - lea edx,[((-421815835))+r10*1+rdx] - mov r10d,DWORD[60+rsi] - xor r11d,ecx - xor r11d,eax - add edx,r11d - rol edx,11 - mov r11d,eax - add edx,eax - lea ecx,[530742520+r10*1+rcx] - mov r10d,DWORD[8+rsi] - xor r11d,ebx - xor r11d,edx - add ecx,r11d - rol ecx,16 - mov r11d,edx - add ecx,edx - lea ebx,[((-995338651))+r10*1+rbx] - mov r10d,DWORD[rsi] - xor r11d,eax - xor r11d,ecx - add ebx,r11d - rol ebx,23 - mov r11d,ecx - add ebx,ecx - mov r10d,DWORD[rsi] - mov r11d,0xffffffff - xor r11d,edx - lea eax,[((-198630844))+r10*1+rax] - or r11d,ebx - xor r11d,ecx - add eax,r11d - mov r10d,DWORD[28+rsi] - mov r11d,0xffffffff - rol eax,6 - xor r11d,ecx - add eax,ebx - lea edx,[1126891415+r10*1+rdx] - or r11d,eax - xor r11d,ebx - add edx,r11d - mov r10d,DWORD[56+rsi] - mov r11d,0xffffffff - rol edx,10 - xor r11d,ebx - add edx,eax - lea ecx,[((-1416354905))+r10*1+rcx] - or r11d,edx - xor r11d,eax - add ecx,r11d - mov r10d,DWORD[20+rsi] - mov r11d,0xffffffff - rol ecx,15 - xor r11d,eax - add ecx,edx - lea ebx,[((-57434055))+r10*1+rbx] - or r11d,ecx - xor r11d,edx - add ebx,r11d - mov r10d,DWORD[48+rsi] - mov r11d,0xffffffff - rol ebx,21 - xor r11d,edx - add ebx,ecx - lea eax,[1700485571+r10*1+rax] - or r11d,ebx - xor r11d,ecx - add eax,r11d - mov r10d,DWORD[12+rsi] - mov r11d,0xffffffff - rol eax,6 - xor r11d,ecx - add eax,ebx - lea edx,[((-1894986606))+r10*1+rdx] - or r11d,eax - xor r11d,ebx - add edx,r11d - mov r10d,DWORD[40+rsi] - mov r11d,0xffffffff - rol edx,10 - xor r11d,ebx - add edx,eax - lea ecx,[((-1051523))+r10*1+rcx] - or r11d,edx - xor r11d,eax - add ecx,r11d - mov r10d,DWORD[4+rsi] - mov r11d,0xffffffff - rol ecx,15 - xor r11d,eax - add ecx,edx - lea ebx,[((-2054922799))+r10*1+rbx] - or r11d,ecx - xor r11d,edx - add ebx,r11d - mov r10d,DWORD[32+rsi] - mov r11d,0xffffffff - rol ebx,21 - xor r11d,edx - add ebx,ecx - lea eax,[1873313359+r10*1+rax] - or r11d,ebx - xor r11d,ecx - add eax,r11d - mov r10d,DWORD[60+rsi] - mov r11d,0xffffffff - rol eax,6 - xor r11d,ecx - add eax,ebx - lea edx,[((-30611744))+r10*1+rdx] - or r11d,eax - xor r11d,ebx - add edx,r11d - mov r10d,DWORD[24+rsi] - mov r11d,0xffffffff - rol edx,10 - xor r11d,ebx - add edx,eax - lea ecx,[((-1560198380))+r10*1+rcx] - or r11d,edx - xor r11d,eax - add ecx,r11d - mov r10d,DWORD[52+rsi] - mov r11d,0xffffffff - rol ecx,15 - xor r11d,eax - add ecx,edx - lea ebx,[1309151649+r10*1+rbx] - or r11d,ecx - xor r11d,edx - add ebx,r11d - mov r10d,DWORD[16+rsi] - mov r11d,0xffffffff - rol ebx,21 - xor r11d,edx - add ebx,ecx - lea eax,[((-145523070))+r10*1+rax] - or r11d,ebx - xor r11d,ecx - add eax,r11d - mov r10d,DWORD[44+rsi] - mov r11d,0xffffffff - rol eax,6 - xor r11d,ecx - add eax,ebx - lea edx,[((-1120210379))+r10*1+rdx] - or r11d,eax - xor r11d,ebx - add edx,r11d - mov r10d,DWORD[8+rsi] - mov r11d,0xffffffff - rol edx,10 - xor r11d,ebx - add edx,eax - lea ecx,[718787259+r10*1+rcx] - or r11d,edx - xor r11d,eax - add ecx,r11d - mov r10d,DWORD[36+rsi] - mov r11d,0xffffffff - rol ecx,15 - xor r11d,eax - add ecx,edx - lea ebx,[((-343485551))+r10*1+rbx] - or r11d,ecx - xor r11d,edx - add ebx,r11d - mov r10d,DWORD[rsi] - mov r11d,0xffffffff - rol ebx,21 - xor r11d,edx - add ebx,ecx - - add eax,r8d - add ebx,r9d - add ecx,r14d - add edx,r15d - - - add rsi,64 - cmp rsi,rdi - jb NEAR $L$loop - - -$L$end: - mov DWORD[rbp],eax - mov DWORD[4+rbp],ebx - mov DWORD[8+rbp],ecx - mov DWORD[12+rbp],edx - - mov r15,QWORD[rsp] - mov r14,QWORD[8+rsp] - mov r12,QWORD[16+rsp] - mov rbx,QWORD[24+rsp] - mov rbp,QWORD[32+rsp] - add rsp,40 -$L$epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_md5_block_asm_data_order: -EXTERN __imp_RtlVirtualUnwind - -ALIGN 16 -se_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - lea r10,[$L$prologue] - cmp rbx,r10 - jb NEAR $L$in_prologue - - mov rax,QWORD[152+r8] - - lea r10,[$L$epilogue] - cmp rbx,r10 - jae NEAR $L$in_prologue - - lea rax,[40+rax] - - mov rbp,QWORD[((-8))+rax] - mov rbx,QWORD[((-16))+rax] - mov r12,QWORD[((-24))+rax] - mov r14,QWORD[((-32))+rax] - mov r15,QWORD[((-40))+rax] - mov QWORD[144+r8],rbx - mov QWORD[160+r8],rbp - mov QWORD[216+r8],r12 - mov QWORD[232+r8],r14 - mov QWORD[240+r8],r15 - -$L$in_prologue: - mov rdi,QWORD[8+rax] - mov rsi,QWORD[16+rax] - mov QWORD[152+r8],rax - mov QWORD[168+r8],rsi - mov QWORD[176+r8],rdi - - mov rdi,QWORD[40+r9] - mov rsi,r8 - mov ecx,154 - DD 0xa548f3fc - - mov rsi,r9 - xor rcx,rcx - mov rdx,QWORD[8+rsi] - mov r8,QWORD[rsi] - mov r9,QWORD[16+rsi] - mov r10,QWORD[40+rsi] - lea r11,[56+rsi] - lea r12,[24+rsi] - mov QWORD[32+rsp],r10 - mov QWORD[40+rsp],r11 - mov QWORD[48+rsp],r12 - mov QWORD[56+rsp],rcx - call QWORD[__imp_RtlVirtualUnwind] - - mov eax,1 - add rsp,64 - popfq - pop r15 - pop r14 - pop r13 - pop r12 - pop rbp - pop rbx - pop rdi - pop rsi - DB 0F3h,0C3h ;repret - - -section .pdata rdata align=4 -ALIGN 4 - DD $L$SEH_begin_md5_block_asm_data_order wrt ..imagebase - DD $L$SEH_end_md5_block_asm_data_order wrt ..imagebase - DD $L$SEH_info_md5_block_asm_data_order wrt ..imagebase - -section .xdata rdata align=8 -ALIGN 8 -$L$SEH_info_md5_block_asm_data_order: -DB 9,0,0,0 - DD se_handler wrt ..imagebase diff --git a/third_party/boringssl/win-x86_64/crypto/modes/aesni-gcm-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/modes/aesni-gcm-x86_64.asm deleted file mode 100644 index d7fff6a974673..0000000000000 --- a/third_party/boringssl/win-x86_64/crypto/modes/aesni-gcm-x86_64.asm +++ /dev/null @@ -1,20 +0,0 @@ -default rel -%define XMMWORD -%define YMMWORD -%define ZMMWORD -section .text code align=64 - - -global aesni_gcm_encrypt - -aesni_gcm_encrypt: - xor eax,eax - DB 0F3h,0C3h ;repret - - -global aesni_gcm_decrypt - -aesni_gcm_decrypt: - xor eax,eax - DB 0F3h,0C3h ;repret - diff --git a/third_party/boringssl/win-x86_64/crypto/modes/ghash-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/modes/ghash-x86_64.asm deleted file mode 100644 index 5d8fadc0332be..0000000000000 --- a/third_party/boringssl/win-x86_64/crypto/modes/ghash-x86_64.asm +++ /dev/null @@ -1,1507 +0,0 @@ -default rel -%define XMMWORD -%define YMMWORD -%define ZMMWORD -section .text code align=64 - -EXTERN OPENSSL_ia32cap_P - -global gcm_gmult_4bit - -ALIGN 16 -gcm_gmult_4bit: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_gcm_gmult_4bit: - mov rdi,rcx - mov rsi,rdx - - - push rbx - push rbp - push r12 -$L$gmult_prologue: - - movzx r8,BYTE[15+rdi] - lea r11,[$L$rem_4bit] - xor rax,rax - xor rbx,rbx - mov al,r8b - mov bl,r8b - shl al,4 - mov rcx,14 - mov r8,QWORD[8+rax*1+rsi] - mov r9,QWORD[rax*1+rsi] - and bl,0xf0 - mov rdx,r8 - jmp NEAR $L$oop1 - -ALIGN 16 -$L$oop1: - shr r8,4 - and rdx,0xf - mov r10,r9 - mov al,BYTE[rcx*1+rdi] - shr r9,4 - xor r8,QWORD[8+rbx*1+rsi] - shl r10,60 - xor r9,QWORD[rbx*1+rsi] - mov bl,al - xor r9,QWORD[rdx*8+r11] - mov rdx,r8 - shl al,4 - xor r8,r10 - dec rcx - js NEAR $L$break1 - - shr r8,4 - and rdx,0xf - mov r10,r9 - shr r9,4 - xor r8,QWORD[8+rax*1+rsi] - shl r10,60 - xor r9,QWORD[rax*1+rsi] - and bl,0xf0 - xor r9,QWORD[rdx*8+r11] - mov rdx,r8 - xor r8,r10 - jmp NEAR $L$oop1 - -ALIGN 16 -$L$break1: - shr r8,4 - and rdx,0xf - mov r10,r9 - shr r9,4 - xor r8,QWORD[8+rax*1+rsi] - shl r10,60 - xor r9,QWORD[rax*1+rsi] - and bl,0xf0 - xor r9,QWORD[rdx*8+r11] - mov rdx,r8 - xor r8,r10 - - shr r8,4 - and rdx,0xf - mov r10,r9 - shr r9,4 - xor r8,QWORD[8+rbx*1+rsi] - shl r10,60 - xor r9,QWORD[rbx*1+rsi] - xor r8,r10 - xor r9,QWORD[rdx*8+r11] - - bswap r8 - bswap r9 - mov QWORD[8+rdi],r8 - mov QWORD[rdi],r9 - - mov rbx,QWORD[16+rsp] - lea rsp,[24+rsp] -$L$gmult_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_gcm_gmult_4bit: -global gcm_ghash_4bit - -ALIGN 16 -gcm_ghash_4bit: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_gcm_ghash_4bit: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - - - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - sub rsp,280 -$L$ghash_prologue: - mov r14,rdx - mov r15,rcx - sub rsi,-128 - lea rbp,[((16+128))+rsp] - xor edx,edx - mov r8,QWORD[((0+0-128))+rsi] - mov rax,QWORD[((0+8-128))+rsi] - mov dl,al - shr rax,4 - mov r10,r8 - shr r8,4 - mov r9,QWORD[((16+0-128))+rsi] - shl dl,4 - mov rbx,QWORD[((16+8-128))+rsi] - shl r10,60 - mov BYTE[rsp],dl - or rax,r10 - mov dl,bl - shr rbx,4 - mov r10,r9 - shr r9,4 - mov QWORD[rbp],r8 - mov r8,QWORD[((32+0-128))+rsi] - shl dl,4 - mov QWORD[((0-128))+rbp],rax - mov rax,QWORD[((32+8-128))+rsi] - shl r10,60 - mov BYTE[1+rsp],dl - or rbx,r10 - mov dl,al - shr rax,4 - mov r10,r8 - shr r8,4 - mov QWORD[8+rbp],r9 - mov r9,QWORD[((48+0-128))+rsi] - shl dl,4 - mov QWORD[((8-128))+rbp],rbx - mov rbx,QWORD[((48+8-128))+rsi] - shl r10,60 - mov BYTE[2+rsp],dl - or rax,r10 - mov dl,bl - shr rbx,4 - mov r10,r9 - shr r9,4 - mov QWORD[16+rbp],r8 - mov r8,QWORD[((64+0-128))+rsi] - shl dl,4 - mov QWORD[((16-128))+rbp],rax - mov rax,QWORD[((64+8-128))+rsi] - shl r10,60 - mov BYTE[3+rsp],dl - or rbx,r10 - mov dl,al - shr rax,4 - mov r10,r8 - shr r8,4 - mov QWORD[24+rbp],r9 - mov r9,QWORD[((80+0-128))+rsi] - shl dl,4 - mov QWORD[((24-128))+rbp],rbx - mov rbx,QWORD[((80+8-128))+rsi] - shl r10,60 - mov BYTE[4+rsp],dl - or rax,r10 - mov dl,bl - shr rbx,4 - mov r10,r9 - shr r9,4 - mov QWORD[32+rbp],r8 - mov r8,QWORD[((96+0-128))+rsi] - shl dl,4 - mov QWORD[((32-128))+rbp],rax - mov rax,QWORD[((96+8-128))+rsi] - shl r10,60 - mov BYTE[5+rsp],dl - or rbx,r10 - mov dl,al - shr rax,4 - mov r10,r8 - shr r8,4 - mov QWORD[40+rbp],r9 - mov r9,QWORD[((112+0-128))+rsi] - shl dl,4 - mov QWORD[((40-128))+rbp],rbx - mov rbx,QWORD[((112+8-128))+rsi] - shl r10,60 - mov BYTE[6+rsp],dl - or rax,r10 - mov dl,bl - shr rbx,4 - mov r10,r9 - shr r9,4 - mov QWORD[48+rbp],r8 - mov r8,QWORD[((128+0-128))+rsi] - shl dl,4 - mov QWORD[((48-128))+rbp],rax - mov rax,QWORD[((128+8-128))+rsi] - shl r10,60 - mov BYTE[7+rsp],dl - or rbx,r10 - mov dl,al - shr rax,4 - mov r10,r8 - shr r8,4 - mov QWORD[56+rbp],r9 - mov r9,QWORD[((144+0-128))+rsi] - shl dl,4 - mov QWORD[((56-128))+rbp],rbx - mov rbx,QWORD[((144+8-128))+rsi] - shl r10,60 - mov BYTE[8+rsp],dl - or rax,r10 - mov dl,bl - shr rbx,4 - mov r10,r9 - shr r9,4 - mov QWORD[64+rbp],r8 - mov r8,QWORD[((160+0-128))+rsi] - shl dl,4 - mov QWORD[((64-128))+rbp],rax - mov rax,QWORD[((160+8-128))+rsi] - shl r10,60 - mov BYTE[9+rsp],dl - or rbx,r10 - mov dl,al - shr rax,4 - mov r10,r8 - shr r8,4 - mov QWORD[72+rbp],r9 - mov r9,QWORD[((176+0-128))+rsi] - shl dl,4 - mov QWORD[((72-128))+rbp],rbx - mov rbx,QWORD[((176+8-128))+rsi] - shl r10,60 - mov BYTE[10+rsp],dl - or rax,r10 - mov dl,bl - shr rbx,4 - mov r10,r9 - shr r9,4 - mov QWORD[80+rbp],r8 - mov r8,QWORD[((192+0-128))+rsi] - shl dl,4 - mov QWORD[((80-128))+rbp],rax - mov rax,QWORD[((192+8-128))+rsi] - shl r10,60 - mov BYTE[11+rsp],dl - or rbx,r10 - mov dl,al - shr rax,4 - mov r10,r8 - shr r8,4 - mov QWORD[88+rbp],r9 - mov r9,QWORD[((208+0-128))+rsi] - shl dl,4 - mov QWORD[((88-128))+rbp],rbx - mov rbx,QWORD[((208+8-128))+rsi] - shl r10,60 - mov BYTE[12+rsp],dl - or rax,r10 - mov dl,bl - shr rbx,4 - mov r10,r9 - shr r9,4 - mov QWORD[96+rbp],r8 - mov r8,QWORD[((224+0-128))+rsi] - shl dl,4 - mov QWORD[((96-128))+rbp],rax - mov rax,QWORD[((224+8-128))+rsi] - shl r10,60 - mov BYTE[13+rsp],dl - or rbx,r10 - mov dl,al - shr rax,4 - mov r10,r8 - shr r8,4 - mov QWORD[104+rbp],r9 - mov r9,QWORD[((240+0-128))+rsi] - shl dl,4 - mov QWORD[((104-128))+rbp],rbx - mov rbx,QWORD[((240+8-128))+rsi] - shl r10,60 - mov BYTE[14+rsp],dl - or rax,r10 - mov dl,bl - shr rbx,4 - mov r10,r9 - shr r9,4 - mov QWORD[112+rbp],r8 - shl dl,4 - mov QWORD[((112-128))+rbp],rax - shl r10,60 - mov BYTE[15+rsp],dl - or rbx,r10 - mov QWORD[120+rbp],r9 - mov QWORD[((120-128))+rbp],rbx - add rsi,-128 - mov r8,QWORD[8+rdi] - mov r9,QWORD[rdi] - add r15,r14 - lea r11,[$L$rem_8bit] - jmp NEAR $L$outer_loop -ALIGN 16 -$L$outer_loop: - xor r9,QWORD[r14] - mov rdx,QWORD[8+r14] - lea r14,[16+r14] - xor rdx,r8 - mov QWORD[rdi],r9 - mov QWORD[8+rdi],rdx - shr rdx,32 - xor rax,rax - rol edx,8 - mov al,dl - movzx ebx,dl - shl al,4 - shr ebx,4 - rol edx,8 - mov r8,QWORD[8+rax*1+rsi] - mov r9,QWORD[rax*1+rsi] - mov al,dl - movzx ecx,dl - shl al,4 - movzx r12,BYTE[rbx*1+rsp] - shr ecx,4 - xor r12,r8 - mov r10,r9 - shr r8,8 - movzx r12,r12b - shr r9,8 - xor r8,QWORD[((-128))+rbx*8+rbp] - shl r10,56 - xor r9,QWORD[rbx*8+rbp] - rol edx,8 - xor r8,QWORD[8+rax*1+rsi] - xor r9,QWORD[rax*1+rsi] - mov al,dl - xor r8,r10 - movzx r12,WORD[r12*2+r11] - movzx ebx,dl - shl al,4 - movzx r13,BYTE[rcx*1+rsp] - shr ebx,4 - shl r12,48 - xor r13,r8 - mov r10,r9 - xor r9,r12 - shr r8,8 - movzx r13,r13b - shr r9,8 - xor r8,QWORD[((-128))+rcx*8+rbp] - shl r10,56 - xor r9,QWORD[rcx*8+rbp] - rol edx,8 - xor r8,QWORD[8+rax*1+rsi] - xor r9,QWORD[rax*1+rsi] - mov al,dl - xor r8,r10 - movzx r13,WORD[r13*2+r11] - movzx ecx,dl - shl al,4 - movzx r12,BYTE[rbx*1+rsp] - shr ecx,4 - shl r13,48 - xor r12,r8 - mov r10,r9 - xor r9,r13 - shr r8,8 - movzx r12,r12b - mov edx,DWORD[8+rdi] - shr r9,8 - xor r8,QWORD[((-128))+rbx*8+rbp] - shl r10,56 - xor r9,QWORD[rbx*8+rbp] - rol edx,8 - xor r8,QWORD[8+rax*1+rsi] - xor r9,QWORD[rax*1+rsi] - mov al,dl - xor r8,r10 - movzx r12,WORD[r12*2+r11] - movzx ebx,dl - shl al,4 - movzx r13,BYTE[rcx*1+rsp] - shr ebx,4 - shl r12,48 - xor r13,r8 - mov r10,r9 - xor r9,r12 - shr r8,8 - movzx r13,r13b - shr r9,8 - xor r8,QWORD[((-128))+rcx*8+rbp] - shl r10,56 - xor r9,QWORD[rcx*8+rbp] - rol edx,8 - xor r8,QWORD[8+rax*1+rsi] - xor r9,QWORD[rax*1+rsi] - mov al,dl - xor r8,r10 - movzx r13,WORD[r13*2+r11] - movzx ecx,dl - shl al,4 - movzx r12,BYTE[rbx*1+rsp] - shr ecx,4 - shl r13,48 - xor r12,r8 - mov r10,r9 - xor r9,r13 - shr r8,8 - movzx r12,r12b - shr r9,8 - xor r8,QWORD[((-128))+rbx*8+rbp] - shl r10,56 - xor r9,QWORD[rbx*8+rbp] - rol edx,8 - xor r8,QWORD[8+rax*1+rsi] - xor r9,QWORD[rax*1+rsi] - mov al,dl - xor r8,r10 - movzx r12,WORD[r12*2+r11] - movzx ebx,dl - shl al,4 - movzx r13,BYTE[rcx*1+rsp] - shr ebx,4 - shl r12,48 - xor r13,r8 - mov r10,r9 - xor r9,r12 - shr r8,8 - movzx r13,r13b - shr r9,8 - xor r8,QWORD[((-128))+rcx*8+rbp] - shl r10,56 - xor r9,QWORD[rcx*8+rbp] - rol edx,8 - xor r8,QWORD[8+rax*1+rsi] - xor r9,QWORD[rax*1+rsi] - mov al,dl - xor r8,r10 - movzx r13,WORD[r13*2+r11] - movzx ecx,dl - shl al,4 - movzx r12,BYTE[rbx*1+rsp] - shr ecx,4 - shl r13,48 - xor r12,r8 - mov r10,r9 - xor r9,r13 - shr r8,8 - movzx r12,r12b - mov edx,DWORD[4+rdi] - shr r9,8 - xor r8,QWORD[((-128))+rbx*8+rbp] - shl r10,56 - xor r9,QWORD[rbx*8+rbp] - rol edx,8 - xor r8,QWORD[8+rax*1+rsi] - xor r9,QWORD[rax*1+rsi] - mov al,dl - xor r8,r10 - movzx r12,WORD[r12*2+r11] - movzx ebx,dl - shl al,4 - movzx r13,BYTE[rcx*1+rsp] - shr ebx,4 - shl r12,48 - xor r13,r8 - mov r10,r9 - xor r9,r12 - shr r8,8 - movzx r13,r13b - shr r9,8 - xor r8,QWORD[((-128))+rcx*8+rbp] - shl r10,56 - xor r9,QWORD[rcx*8+rbp] - rol edx,8 - xor r8,QWORD[8+rax*1+rsi] - xor r9,QWORD[rax*1+rsi] - mov al,dl - xor r8,r10 - movzx r13,WORD[r13*2+r11] - movzx ecx,dl - shl al,4 - movzx r12,BYTE[rbx*1+rsp] - shr ecx,4 - shl r13,48 - xor r12,r8 - mov r10,r9 - xor r9,r13 - shr r8,8 - movzx r12,r12b - shr r9,8 - xor r8,QWORD[((-128))+rbx*8+rbp] - shl r10,56 - xor r9,QWORD[rbx*8+rbp] - rol edx,8 - xor r8,QWORD[8+rax*1+rsi] - xor r9,QWORD[rax*1+rsi] - mov al,dl - xor r8,r10 - movzx r12,WORD[r12*2+r11] - movzx ebx,dl - shl al,4 - movzx r13,BYTE[rcx*1+rsp] - shr ebx,4 - shl r12,48 - xor r13,r8 - mov r10,r9 - xor r9,r12 - shr r8,8 - movzx r13,r13b - shr r9,8 - xor r8,QWORD[((-128))+rcx*8+rbp] - shl r10,56 - xor r9,QWORD[rcx*8+rbp] - rol edx,8 - xor r8,QWORD[8+rax*1+rsi] - xor r9,QWORD[rax*1+rsi] - mov al,dl - xor r8,r10 - movzx r13,WORD[r13*2+r11] - movzx ecx,dl - shl al,4 - movzx r12,BYTE[rbx*1+rsp] - shr ecx,4 - shl r13,48 - xor r12,r8 - mov r10,r9 - xor r9,r13 - shr r8,8 - movzx r12,r12b - mov edx,DWORD[rdi] - shr r9,8 - xor r8,QWORD[((-128))+rbx*8+rbp] - shl r10,56 - xor r9,QWORD[rbx*8+rbp] - rol edx,8 - xor r8,QWORD[8+rax*1+rsi] - xor r9,QWORD[rax*1+rsi] - mov al,dl - xor r8,r10 - movzx r12,WORD[r12*2+r11] - movzx ebx,dl - shl al,4 - movzx r13,BYTE[rcx*1+rsp] - shr ebx,4 - shl r12,48 - xor r13,r8 - mov r10,r9 - xor r9,r12 - shr r8,8 - movzx r13,r13b - shr r9,8 - xor r8,QWORD[((-128))+rcx*8+rbp] - shl r10,56 - xor r9,QWORD[rcx*8+rbp] - rol edx,8 - xor r8,QWORD[8+rax*1+rsi] - xor r9,QWORD[rax*1+rsi] - mov al,dl - xor r8,r10 - movzx r13,WORD[r13*2+r11] - movzx ecx,dl - shl al,4 - movzx r12,BYTE[rbx*1+rsp] - shr ecx,4 - shl r13,48 - xor r12,r8 - mov r10,r9 - xor r9,r13 - shr r8,8 - movzx r12,r12b - shr r9,8 - xor r8,QWORD[((-128))+rbx*8+rbp] - shl r10,56 - xor r9,QWORD[rbx*8+rbp] - rol edx,8 - xor r8,QWORD[8+rax*1+rsi] - xor r9,QWORD[rax*1+rsi] - mov al,dl - xor r8,r10 - movzx r12,WORD[r12*2+r11] - movzx ebx,dl - shl al,4 - movzx r13,BYTE[rcx*1+rsp] - shr ebx,4 - shl r12,48 - xor r13,r8 - mov r10,r9 - xor r9,r12 - shr r8,8 - movzx r13,r13b - shr r9,8 - xor r8,QWORD[((-128))+rcx*8+rbp] - shl r10,56 - xor r9,QWORD[rcx*8+rbp] - rol edx,8 - xor r8,QWORD[8+rax*1+rsi] - xor r9,QWORD[rax*1+rsi] - mov al,dl - xor r8,r10 - movzx r13,WORD[r13*2+r11] - movzx ecx,dl - shl al,4 - movzx r12,BYTE[rbx*1+rsp] - and ecx,240 - shl r13,48 - xor r12,r8 - mov r10,r9 - xor r9,r13 - shr r8,8 - movzx r12,r12b - mov edx,DWORD[((-4))+rdi] - shr r9,8 - xor r8,QWORD[((-128))+rbx*8+rbp] - shl r10,56 - xor r9,QWORD[rbx*8+rbp] - movzx r12,WORD[r12*2+r11] - xor r8,QWORD[8+rax*1+rsi] - xor r9,QWORD[rax*1+rsi] - shl r12,48 - xor r8,r10 - xor r9,r12 - movzx r13,r8b - shr r8,4 - mov r10,r9 - shl r13b,4 - shr r9,4 - xor r8,QWORD[8+rcx*1+rsi] - movzx r13,WORD[r13*2+r11] - shl r10,60 - xor r9,QWORD[rcx*1+rsi] - xor r8,r10 - shl r13,48 - bswap r8 - xor r9,r13 - bswap r9 - cmp r14,r15 - jb NEAR $L$outer_loop - mov QWORD[8+rdi],r8 - mov QWORD[rdi],r9 - - lea rsi,[280+rsp] - mov r15,QWORD[rsi] - mov r14,QWORD[8+rsi] - mov r13,QWORD[16+rsi] - mov r12,QWORD[24+rsi] - mov rbp,QWORD[32+rsi] - mov rbx,QWORD[40+rsi] - lea rsp,[48+rsi] -$L$ghash_epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_gcm_ghash_4bit: -global gcm_init_clmul - -ALIGN 16 -gcm_init_clmul: -$L$_init_clmul: -$L$SEH_begin_gcm_init_clmul: - -DB 0x48,0x83,0xec,0x18 -DB 0x0f,0x29,0x34,0x24 - movdqu xmm2,XMMWORD[rdx] - pshufd xmm2,xmm2,78 - - - pshufd xmm4,xmm2,255 - movdqa xmm3,xmm2 - psllq xmm2,1 - pxor xmm5,xmm5 - psrlq xmm3,63 - pcmpgtd xmm5,xmm4 - pslldq xmm3,8 - por xmm2,xmm3 - - - pand xmm5,XMMWORD[$L$0x1c2_polynomial] - pxor xmm2,xmm5 - - - pshufd xmm6,xmm2,78 - movdqa xmm0,xmm2 - pxor xmm6,xmm2 - movdqa xmm1,xmm0 - pshufd xmm3,xmm0,78 - pxor xmm3,xmm0 -DB 102,15,58,68,194,0 -DB 102,15,58,68,202,17 -DB 102,15,58,68,222,0 - pxor xmm3,xmm0 - pxor xmm3,xmm1 - - movdqa xmm4,xmm3 - psrldq xmm3,8 - pslldq xmm4,8 - pxor xmm1,xmm3 - pxor xmm0,xmm4 - - movdqa xmm4,xmm0 - movdqa xmm3,xmm0 - psllq xmm0,5 - pxor xmm3,xmm0 - psllq xmm0,1 - pxor xmm0,xmm3 - psllq xmm0,57 - movdqa xmm3,xmm0 - pslldq xmm0,8 - psrldq xmm3,8 - pxor xmm0,xmm4 - pxor xmm1,xmm3 - - - movdqa xmm4,xmm0 - psrlq xmm0,1 - pxor xmm1,xmm4 - pxor xmm4,xmm0 - psrlq xmm0,5 - pxor xmm0,xmm4 - psrlq xmm0,1 - pxor xmm0,xmm1 - pshufd xmm3,xmm2,78 - pshufd xmm4,xmm0,78 - pxor xmm3,xmm2 - movdqu XMMWORD[rcx],xmm2 - pxor xmm4,xmm0 - movdqu XMMWORD[16+rcx],xmm0 -DB 102,15,58,15,227,8 - movdqu XMMWORD[32+rcx],xmm4 - movdqa xmm1,xmm0 - pshufd xmm3,xmm0,78 - pxor xmm3,xmm0 -DB 102,15,58,68,194,0 -DB 102,15,58,68,202,17 -DB 102,15,58,68,222,0 - pxor xmm3,xmm0 - pxor xmm3,xmm1 - - movdqa xmm4,xmm3 - psrldq xmm3,8 - pslldq xmm4,8 - pxor xmm1,xmm3 - pxor xmm0,xmm4 - - movdqa xmm4,xmm0 - movdqa xmm3,xmm0 - psllq xmm0,5 - pxor xmm3,xmm0 - psllq xmm0,1 - pxor xmm0,xmm3 - psllq xmm0,57 - movdqa xmm3,xmm0 - pslldq xmm0,8 - psrldq xmm3,8 - pxor xmm0,xmm4 - pxor xmm1,xmm3 - - - movdqa xmm4,xmm0 - psrlq xmm0,1 - pxor xmm1,xmm4 - pxor xmm4,xmm0 - psrlq xmm0,5 - pxor xmm0,xmm4 - psrlq xmm0,1 - pxor xmm0,xmm1 - movdqa xmm5,xmm0 - movdqa xmm1,xmm0 - pshufd xmm3,xmm0,78 - pxor xmm3,xmm0 -DB 102,15,58,68,194,0 -DB 102,15,58,68,202,17 -DB 102,15,58,68,222,0 - pxor xmm3,xmm0 - pxor xmm3,xmm1 - - movdqa xmm4,xmm3 - psrldq xmm3,8 - pslldq xmm4,8 - pxor xmm1,xmm3 - pxor xmm0,xmm4 - - movdqa xmm4,xmm0 - movdqa xmm3,xmm0 - psllq xmm0,5 - pxor xmm3,xmm0 - psllq xmm0,1 - pxor xmm0,xmm3 - psllq xmm0,57 - movdqa xmm3,xmm0 - pslldq xmm0,8 - psrldq xmm3,8 - pxor xmm0,xmm4 - pxor xmm1,xmm3 - - - movdqa xmm4,xmm0 - psrlq xmm0,1 - pxor xmm1,xmm4 - pxor xmm4,xmm0 - psrlq xmm0,5 - pxor xmm0,xmm4 - psrlq xmm0,1 - pxor xmm0,xmm1 - pshufd xmm3,xmm5,78 - pshufd xmm4,xmm0,78 - pxor xmm3,xmm5 - movdqu XMMWORD[48+rcx],xmm5 - pxor xmm4,xmm0 - movdqu XMMWORD[64+rcx],xmm0 -DB 102,15,58,15,227,8 - movdqu XMMWORD[80+rcx],xmm4 - movaps xmm6,XMMWORD[rsp] - lea rsp,[24+rsp] -$L$SEH_end_gcm_init_clmul: - DB 0F3h,0C3h ;repret - -global gcm_gmult_clmul - -ALIGN 16 -gcm_gmult_clmul: -$L$_gmult_clmul: - movdqu xmm0,XMMWORD[rcx] - movdqa xmm5,XMMWORD[$L$bswap_mask] - movdqu xmm2,XMMWORD[rdx] - movdqu xmm4,XMMWORD[32+rdx] -DB 102,15,56,0,197 - movdqa xmm1,xmm0 - pshufd xmm3,xmm0,78 - pxor xmm3,xmm0 -DB 102,15,58,68,194,0 -DB 102,15,58,68,202,17 -DB 102,15,58,68,220,0 - pxor xmm3,xmm0 - pxor xmm3,xmm1 - - movdqa xmm4,xmm3 - psrldq xmm3,8 - pslldq xmm4,8 - pxor xmm1,xmm3 - pxor xmm0,xmm4 - - movdqa xmm4,xmm0 - movdqa xmm3,xmm0 - psllq xmm0,5 - pxor xmm3,xmm0 - psllq xmm0,1 - pxor xmm0,xmm3 - psllq xmm0,57 - movdqa xmm3,xmm0 - pslldq xmm0,8 - psrldq xmm3,8 - pxor xmm0,xmm4 - pxor xmm1,xmm3 - - - movdqa xmm4,xmm0 - psrlq xmm0,1 - pxor xmm1,xmm4 - pxor xmm4,xmm0 - psrlq xmm0,5 - pxor xmm0,xmm4 - psrlq xmm0,1 - pxor xmm0,xmm1 -DB 102,15,56,0,197 - movdqu XMMWORD[rcx],xmm0 - DB 0F3h,0C3h ;repret - -global gcm_ghash_clmul - -ALIGN 32 -gcm_ghash_clmul: -$L$_ghash_clmul: - lea rax,[((-136))+rsp] -$L$SEH_begin_gcm_ghash_clmul: - -DB 0x48,0x8d,0x60,0xe0 -DB 0x0f,0x29,0x70,0xe0 -DB 0x0f,0x29,0x78,0xf0 -DB 0x44,0x0f,0x29,0x00 -DB 0x44,0x0f,0x29,0x48,0x10 -DB 0x44,0x0f,0x29,0x50,0x20 -DB 0x44,0x0f,0x29,0x58,0x30 -DB 0x44,0x0f,0x29,0x60,0x40 -DB 0x44,0x0f,0x29,0x68,0x50 -DB 0x44,0x0f,0x29,0x70,0x60 -DB 0x44,0x0f,0x29,0x78,0x70 - movdqa xmm10,XMMWORD[$L$bswap_mask] - - movdqu xmm0,XMMWORD[rcx] - movdqu xmm2,XMMWORD[rdx] - movdqu xmm7,XMMWORD[32+rdx] -DB 102,65,15,56,0,194 - - sub r9,0x10 - jz NEAR $L$odd_tail - - movdqu xmm6,XMMWORD[16+rdx] - mov eax,DWORD[((OPENSSL_ia32cap_P+4))] - cmp r9,0x30 - jb NEAR $L$skip4x - - and eax,71303168 - cmp eax,4194304 - je NEAR $L$skip4x - - sub r9,0x30 - mov rax,0xA040608020C0E000 - movdqu xmm14,XMMWORD[48+rdx] - movdqu xmm15,XMMWORD[64+rdx] - - - - - movdqu xmm3,XMMWORD[48+r8] - movdqu xmm11,XMMWORD[32+r8] -DB 102,65,15,56,0,218 -DB 102,69,15,56,0,218 - movdqa xmm5,xmm3 - pshufd xmm4,xmm3,78 - pxor xmm4,xmm3 -DB 102,15,58,68,218,0 -DB 102,15,58,68,234,17 -DB 102,15,58,68,231,0 - - movdqa xmm13,xmm11 - pshufd xmm12,xmm11,78 - pxor xmm12,xmm11 -DB 102,68,15,58,68,222,0 -DB 102,68,15,58,68,238,17 -DB 102,68,15,58,68,231,16 - xorps xmm3,xmm11 - xorps xmm5,xmm13 - movups xmm7,XMMWORD[80+rdx] - xorps xmm4,xmm12 - - movdqu xmm11,XMMWORD[16+r8] - movdqu xmm8,XMMWORD[r8] -DB 102,69,15,56,0,218 -DB 102,69,15,56,0,194 - movdqa xmm13,xmm11 - pshufd xmm12,xmm11,78 - pxor xmm0,xmm8 - pxor xmm12,xmm11 -DB 102,69,15,58,68,222,0 - movdqa xmm1,xmm0 - pshufd xmm8,xmm0,78 - pxor xmm8,xmm0 -DB 102,69,15,58,68,238,17 -DB 102,68,15,58,68,231,0 - xorps xmm3,xmm11 - xorps xmm5,xmm13 - - lea r8,[64+r8] - sub r9,0x40 - jc NEAR $L$tail4x - - jmp NEAR $L$mod4_loop -ALIGN 32 -$L$mod4_loop: -DB 102,65,15,58,68,199,0 - xorps xmm4,xmm12 - movdqu xmm11,XMMWORD[48+r8] -DB 102,69,15,56,0,218 -DB 102,65,15,58,68,207,17 - xorps xmm0,xmm3 - movdqu xmm3,XMMWORD[32+r8] - movdqa xmm13,xmm11 -DB 102,68,15,58,68,199,16 - pshufd xmm12,xmm11,78 - xorps xmm1,xmm5 - pxor xmm12,xmm11 -DB 102,65,15,56,0,218 - movups xmm7,XMMWORD[32+rdx] - xorps xmm8,xmm4 -DB 102,68,15,58,68,218,0 - pshufd xmm4,xmm3,78 - - pxor xmm8,xmm0 - movdqa xmm5,xmm3 - pxor xmm8,xmm1 - pxor xmm4,xmm3 - movdqa xmm9,xmm8 -DB 102,68,15,58,68,234,17 - pslldq xmm8,8 - psrldq xmm9,8 - pxor xmm0,xmm8 - movdqa xmm8,XMMWORD[$L$7_mask] - pxor xmm1,xmm9 -DB 102,76,15,110,200 - - pand xmm8,xmm0 -DB 102,69,15,56,0,200 - pxor xmm9,xmm0 -DB 102,68,15,58,68,231,0 - psllq xmm9,57 - movdqa xmm8,xmm9 - pslldq xmm9,8 -DB 102,15,58,68,222,0 - psrldq xmm8,8 - pxor xmm0,xmm9 - pxor xmm1,xmm8 - movdqu xmm8,XMMWORD[r8] - - movdqa xmm9,xmm0 - psrlq xmm0,1 -DB 102,15,58,68,238,17 - xorps xmm3,xmm11 - movdqu xmm11,XMMWORD[16+r8] -DB 102,69,15,56,0,218 -DB 102,15,58,68,231,16 - xorps xmm5,xmm13 - movups xmm7,XMMWORD[80+rdx] -DB 102,69,15,56,0,194 - pxor xmm1,xmm9 - pxor xmm9,xmm0 - psrlq xmm0,5 - - movdqa xmm13,xmm11 - pxor xmm4,xmm12 - pshufd xmm12,xmm11,78 - pxor xmm0,xmm9 - pxor xmm1,xmm8 - pxor xmm12,xmm11 -DB 102,69,15,58,68,222,0 - psrlq xmm0,1 - pxor xmm0,xmm1 - movdqa xmm1,xmm0 -DB 102,69,15,58,68,238,17 - xorps xmm3,xmm11 - pshufd xmm8,xmm0,78 - pxor xmm8,xmm0 - -DB 102,68,15,58,68,231,0 - xorps xmm5,xmm13 - - lea r8,[64+r8] - sub r9,0x40 - jnc NEAR $L$mod4_loop - -$L$tail4x: -DB 102,65,15,58,68,199,0 -DB 102,65,15,58,68,207,17 -DB 102,68,15,58,68,199,16 - xorps xmm4,xmm12 - xorps xmm0,xmm3 - xorps xmm1,xmm5 - pxor xmm1,xmm0 - pxor xmm8,xmm4 - - pxor xmm8,xmm1 - pxor xmm1,xmm0 - - movdqa xmm9,xmm8 - psrldq xmm8,8 - pslldq xmm9,8 - pxor xmm1,xmm8 - pxor xmm0,xmm9 - - movdqa xmm4,xmm0 - movdqa xmm3,xmm0 - psllq xmm0,5 - pxor xmm3,xmm0 - psllq xmm0,1 - pxor xmm0,xmm3 - psllq xmm0,57 - movdqa xmm3,xmm0 - pslldq xmm0,8 - psrldq xmm3,8 - pxor xmm0,xmm4 - pxor xmm1,xmm3 - - - movdqa xmm4,xmm0 - psrlq xmm0,1 - pxor xmm1,xmm4 - pxor xmm4,xmm0 - psrlq xmm0,5 - pxor xmm0,xmm4 - psrlq xmm0,1 - pxor xmm0,xmm1 - add r9,0x40 - jz NEAR $L$done - movdqu xmm7,XMMWORD[32+rdx] - sub r9,0x10 - jz NEAR $L$odd_tail -$L$skip4x: - - - - - - movdqu xmm8,XMMWORD[r8] - movdqu xmm3,XMMWORD[16+r8] -DB 102,69,15,56,0,194 -DB 102,65,15,56,0,218 - pxor xmm0,xmm8 - - movdqa xmm5,xmm3 - pshufd xmm4,xmm3,78 - pxor xmm4,xmm3 -DB 102,15,58,68,218,0 -DB 102,15,58,68,234,17 -DB 102,15,58,68,231,0 - - lea r8,[32+r8] - nop - sub r9,0x20 - jbe NEAR $L$even_tail - nop - jmp NEAR $L$mod_loop - -ALIGN 32 -$L$mod_loop: - movdqa xmm1,xmm0 - movdqa xmm8,xmm4 - pshufd xmm4,xmm0,78 - pxor xmm4,xmm0 - -DB 102,15,58,68,198,0 -DB 102,15,58,68,206,17 -DB 102,15,58,68,231,16 - - pxor xmm0,xmm3 - pxor xmm1,xmm5 - movdqu xmm9,XMMWORD[r8] - pxor xmm8,xmm0 -DB 102,69,15,56,0,202 - movdqu xmm3,XMMWORD[16+r8] - - pxor xmm8,xmm1 - pxor xmm1,xmm9 - pxor xmm4,xmm8 -DB 102,65,15,56,0,218 - movdqa xmm8,xmm4 - psrldq xmm8,8 - pslldq xmm4,8 - pxor xmm1,xmm8 - pxor xmm0,xmm4 - - movdqa xmm5,xmm3 - - movdqa xmm9,xmm0 - movdqa xmm8,xmm0 - psllq xmm0,5 - pxor xmm8,xmm0 -DB 102,15,58,68,218,0 - psllq xmm0,1 - pxor xmm0,xmm8 - psllq xmm0,57 - movdqa xmm8,xmm0 - pslldq xmm0,8 - psrldq xmm8,8 - pxor xmm0,xmm9 - pshufd xmm4,xmm5,78 - pxor xmm1,xmm8 - pxor xmm4,xmm5 - - movdqa xmm9,xmm0 - psrlq xmm0,1 -DB 102,15,58,68,234,17 - pxor xmm1,xmm9 - pxor xmm9,xmm0 - psrlq xmm0,5 - pxor xmm0,xmm9 - lea r8,[32+r8] - psrlq xmm0,1 -DB 102,15,58,68,231,0 - pxor xmm0,xmm1 - - sub r9,0x20 - ja NEAR $L$mod_loop - -$L$even_tail: - movdqa xmm1,xmm0 - movdqa xmm8,xmm4 - pshufd xmm4,xmm0,78 - pxor xmm4,xmm0 - -DB 102,15,58,68,198,0 -DB 102,15,58,68,206,17 -DB 102,15,58,68,231,16 - - pxor xmm0,xmm3 - pxor xmm1,xmm5 - pxor xmm8,xmm0 - pxor xmm8,xmm1 - pxor xmm4,xmm8 - movdqa xmm8,xmm4 - psrldq xmm8,8 - pslldq xmm4,8 - pxor xmm1,xmm8 - pxor xmm0,xmm4 - - movdqa xmm4,xmm0 - movdqa xmm3,xmm0 - psllq xmm0,5 - pxor xmm3,xmm0 - psllq xmm0,1 - pxor xmm0,xmm3 - psllq xmm0,57 - movdqa xmm3,xmm0 - pslldq xmm0,8 - psrldq xmm3,8 - pxor xmm0,xmm4 - pxor xmm1,xmm3 - - - movdqa xmm4,xmm0 - psrlq xmm0,1 - pxor xmm1,xmm4 - pxor xmm4,xmm0 - psrlq xmm0,5 - pxor xmm0,xmm4 - psrlq xmm0,1 - pxor xmm0,xmm1 - test r9,r9 - jnz NEAR $L$done - -$L$odd_tail: - movdqu xmm8,XMMWORD[r8] -DB 102,69,15,56,0,194 - pxor xmm0,xmm8 - movdqa xmm1,xmm0 - pshufd xmm3,xmm0,78 - pxor xmm3,xmm0 -DB 102,15,58,68,194,0 -DB 102,15,58,68,202,17 -DB 102,15,58,68,223,0 - pxor xmm3,xmm0 - pxor xmm3,xmm1 - - movdqa xmm4,xmm3 - psrldq xmm3,8 - pslldq xmm4,8 - pxor xmm1,xmm3 - pxor xmm0,xmm4 - - movdqa xmm4,xmm0 - movdqa xmm3,xmm0 - psllq xmm0,5 - pxor xmm3,xmm0 - psllq xmm0,1 - pxor xmm0,xmm3 - psllq xmm0,57 - movdqa xmm3,xmm0 - pslldq xmm0,8 - psrldq xmm3,8 - pxor xmm0,xmm4 - pxor xmm1,xmm3 - - - movdqa xmm4,xmm0 - psrlq xmm0,1 - pxor xmm1,xmm4 - pxor xmm4,xmm0 - psrlq xmm0,5 - pxor xmm0,xmm4 - psrlq xmm0,1 - pxor xmm0,xmm1 -$L$done: -DB 102,65,15,56,0,194 - movdqu XMMWORD[rcx],xmm0 - movaps xmm6,XMMWORD[rsp] - movaps xmm7,XMMWORD[16+rsp] - movaps xmm8,XMMWORD[32+rsp] - movaps xmm9,XMMWORD[48+rsp] - movaps xmm10,XMMWORD[64+rsp] - movaps xmm11,XMMWORD[80+rsp] - movaps xmm12,XMMWORD[96+rsp] - movaps xmm13,XMMWORD[112+rsp] - movaps xmm14,XMMWORD[128+rsp] - movaps xmm15,XMMWORD[144+rsp] - lea rsp,[168+rsp] -$L$SEH_end_gcm_ghash_clmul: - DB 0F3h,0C3h ;repret - -global gcm_init_avx - -ALIGN 32 -gcm_init_avx: - jmp NEAR $L$_init_clmul - -global gcm_gmult_avx - -ALIGN 32 -gcm_gmult_avx: - jmp NEAR $L$_gmult_clmul - -global gcm_ghash_avx - -ALIGN 32 -gcm_ghash_avx: - jmp NEAR $L$_ghash_clmul - -ALIGN 64 -$L$bswap_mask: -DB 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -$L$0x1c2_polynomial: -DB 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc2 -$L$7_mask: - DD 7,0,7,0 -$L$7_mask_poly: - DD 7,0,450,0 -ALIGN 64 - -$L$rem_4bit: - DD 0,0,0,471859200,0,943718400,0,610271232 - DD 0,1887436800,0,1822425088,0,1220542464,0,1423966208 - DD 0,3774873600,0,4246732800,0,3644850176,0,3311403008 - DD 0,2441084928,0,2376073216,0,2847932416,0,3051356160 - -$L$rem_8bit: - DW 0x0000,0x01C2,0x0384,0x0246,0x0708,0x06CA,0x048C,0x054E - DW 0x0E10,0x0FD2,0x0D94,0x0C56,0x0918,0x08DA,0x0A9C,0x0B5E - DW 0x1C20,0x1DE2,0x1FA4,0x1E66,0x1B28,0x1AEA,0x18AC,0x196E - DW 0x1230,0x13F2,0x11B4,0x1076,0x1538,0x14FA,0x16BC,0x177E - DW 0x3840,0x3982,0x3BC4,0x3A06,0x3F48,0x3E8A,0x3CCC,0x3D0E - DW 0x3650,0x3792,0x35D4,0x3416,0x3158,0x309A,0x32DC,0x331E - DW 0x2460,0x25A2,0x27E4,0x2626,0x2368,0x22AA,0x20EC,0x212E - DW 0x2A70,0x2BB2,0x29F4,0x2836,0x2D78,0x2CBA,0x2EFC,0x2F3E - DW 0x7080,0x7142,0x7304,0x72C6,0x7788,0x764A,0x740C,0x75CE - DW 0x7E90,0x7F52,0x7D14,0x7CD6,0x7998,0x785A,0x7A1C,0x7BDE - DW 0x6CA0,0x6D62,0x6F24,0x6EE6,0x6BA8,0x6A6A,0x682C,0x69EE - DW 0x62B0,0x6372,0x6134,0x60F6,0x65B8,0x647A,0x663C,0x67FE - DW 0x48C0,0x4902,0x4B44,0x4A86,0x4FC8,0x4E0A,0x4C4C,0x4D8E - DW 0x46D0,0x4712,0x4554,0x4496,0x41D8,0x401A,0x425C,0x439E - DW 0x54E0,0x5522,0x5764,0x56A6,0x53E8,0x522A,0x506C,0x51AE - DW 0x5AF0,0x5B32,0x5974,0x58B6,0x5DF8,0x5C3A,0x5E7C,0x5FBE - DW 0xE100,0xE0C2,0xE284,0xE346,0xE608,0xE7CA,0xE58C,0xE44E - DW 0xEF10,0xEED2,0xEC94,0xED56,0xE818,0xE9DA,0xEB9C,0xEA5E - DW 0xFD20,0xFCE2,0xFEA4,0xFF66,0xFA28,0xFBEA,0xF9AC,0xF86E - DW 0xF330,0xF2F2,0xF0B4,0xF176,0xF438,0xF5FA,0xF7BC,0xF67E - DW 0xD940,0xD882,0xDAC4,0xDB06,0xDE48,0xDF8A,0xDDCC,0xDC0E - DW 0xD750,0xD692,0xD4D4,0xD516,0xD058,0xD19A,0xD3DC,0xD21E - DW 0xC560,0xC4A2,0xC6E4,0xC726,0xC268,0xC3AA,0xC1EC,0xC02E - DW 0xCB70,0xCAB2,0xC8F4,0xC936,0xCC78,0xCDBA,0xCFFC,0xCE3E - DW 0x9180,0x9042,0x9204,0x93C6,0x9688,0x974A,0x950C,0x94CE - DW 0x9F90,0x9E52,0x9C14,0x9DD6,0x9898,0x995A,0x9B1C,0x9ADE - DW 0x8DA0,0x8C62,0x8E24,0x8FE6,0x8AA8,0x8B6A,0x892C,0x88EE - DW 0x83B0,0x8272,0x8034,0x81F6,0x84B8,0x857A,0x873C,0x86FE - DW 0xA9C0,0xA802,0xAA44,0xAB86,0xAEC8,0xAF0A,0xAD4C,0xAC8E - DW 0xA7D0,0xA612,0xA454,0xA596,0xA0D8,0xA11A,0xA35C,0xA29E - DW 0xB5E0,0xB422,0xB664,0xB7A6,0xB2E8,0xB32A,0xB16C,0xB0AE - DW 0xBBF0,0xBA32,0xB874,0xB9B6,0xBCF8,0xBD3A,0xBF7C,0xBEBE - -DB 71,72,65,83,72,32,102,111,114,32,120,56,54,95,54,52 -DB 44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32 -DB 60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111 -DB 114,103,62,0 -ALIGN 64 -EXTERN __imp_RtlVirtualUnwind - -ALIGN 16 -se_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - mov rsi,QWORD[8+r9] - mov r11,QWORD[56+r9] - - mov r10d,DWORD[r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jb NEAR $L$in_prologue - - mov rax,QWORD[152+r8] - - mov r10d,DWORD[4+r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jae NEAR $L$in_prologue - - lea rax,[24+rax] - - mov rbx,QWORD[((-8))+rax] - mov rbp,QWORD[((-16))+rax] - mov r12,QWORD[((-24))+rax] - mov QWORD[144+r8],rbx - mov QWORD[160+r8],rbp - mov QWORD[216+r8],r12 - -$L$in_prologue: - mov rdi,QWORD[8+rax] - mov rsi,QWORD[16+rax] - mov QWORD[152+r8],rax - mov QWORD[168+r8],rsi - mov QWORD[176+r8],rdi - - mov rdi,QWORD[40+r9] - mov rsi,r8 - mov ecx,154 - DD 0xa548f3fc - - mov rsi,r9 - xor rcx,rcx - mov rdx,QWORD[8+rsi] - mov r8,QWORD[rsi] - mov r9,QWORD[16+rsi] - mov r10,QWORD[40+rsi] - lea r11,[56+rsi] - lea r12,[24+rsi] - mov QWORD[32+rsp],r10 - mov QWORD[40+rsp],r11 - mov QWORD[48+rsp],r12 - mov QWORD[56+rsp],rcx - call QWORD[__imp_RtlVirtualUnwind] - - mov eax,1 - add rsp,64 - popfq - pop r15 - pop r14 - pop r13 - pop r12 - pop rbp - pop rbx - pop rdi - pop rsi - DB 0F3h,0C3h ;repret - - -section .pdata rdata align=4 -ALIGN 4 - DD $L$SEH_begin_gcm_gmult_4bit wrt ..imagebase - DD $L$SEH_end_gcm_gmult_4bit wrt ..imagebase - DD $L$SEH_info_gcm_gmult_4bit wrt ..imagebase - - DD $L$SEH_begin_gcm_ghash_4bit wrt ..imagebase - DD $L$SEH_end_gcm_ghash_4bit wrt ..imagebase - DD $L$SEH_info_gcm_ghash_4bit wrt ..imagebase - - DD $L$SEH_begin_gcm_init_clmul wrt ..imagebase - DD $L$SEH_end_gcm_init_clmul wrt ..imagebase - DD $L$SEH_info_gcm_init_clmul wrt ..imagebase - - DD $L$SEH_begin_gcm_ghash_clmul wrt ..imagebase - DD $L$SEH_end_gcm_ghash_clmul wrt ..imagebase - DD $L$SEH_info_gcm_ghash_clmul wrt ..imagebase -section .xdata rdata align=8 -ALIGN 8 -$L$SEH_info_gcm_gmult_4bit: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$gmult_prologue wrt ..imagebase,$L$gmult_epilogue wrt ..imagebase -$L$SEH_info_gcm_ghash_4bit: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$ghash_prologue wrt ..imagebase,$L$ghash_epilogue wrt ..imagebase -$L$SEH_info_gcm_init_clmul: -DB 0x01,0x08,0x03,0x00 -DB 0x08,0x68,0x00,0x00 -DB 0x04,0x22,0x00,0x00 -$L$SEH_info_gcm_ghash_clmul: -DB 0x01,0x33,0x16,0x00 -DB 0x33,0xf8,0x09,0x00 -DB 0x2e,0xe8,0x08,0x00 -DB 0x29,0xd8,0x07,0x00 -DB 0x24,0xc8,0x06,0x00 -DB 0x1f,0xb8,0x05,0x00 -DB 0x1a,0xa8,0x04,0x00 -DB 0x15,0x98,0x03,0x00 -DB 0x10,0x88,0x02,0x00 -DB 0x0c,0x78,0x01,0x00 -DB 0x08,0x68,0x00,0x00 -DB 0x04,0x01,0x15,0x00 diff --git a/third_party/boringssl/win-x86_64/crypto/rand/rdrand-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/rand/rdrand-x86_64.asm deleted file mode 100644 index 4c03791b48efe..0000000000000 --- a/third_party/boringssl/win-x86_64/crypto/rand/rdrand-x86_64.asm +++ /dev/null @@ -1,70 +0,0 @@ -default rel -%define XMMWORD -%define YMMWORD -%define ZMMWORD -section .text code align=64 - - - - - -global CRYPTO_rdrand - -ALIGN 16 -CRYPTO_rdrand: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_CRYPTO_rdrand: - mov rdi,rcx - - - xor rax,rax - - -DB 0x48,0x0f,0xc7,0xf1 - - adc rax,rax - mov QWORD[rdi],rcx - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret - - - - - -global CRYPTO_rdrand_multiple8_buf - -ALIGN 16 -CRYPTO_rdrand_multiple8_buf: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_CRYPTO_rdrand_multiple8_buf: - mov rdi,rcx - mov rsi,rdx - - - test rsi,rsi - jz NEAR $L$out - mov rdx,8 -$L$loop: - - -DB 0x48,0x0f,0xc7,0xf1 - jnc NEAR $L$err - mov QWORD[rdi],rcx - add rdi,rdx - sub rsi,rdx - jnz NEAR $L$loop -$L$out: - mov rax,1 - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$err: - xor rax,rax - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret diff --git a/third_party/boringssl/win-x86_64/crypto/rc4/rc4-md5-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/rc4/rc4-md5-x86_64.asm deleted file mode 100644 index f1ea9652d9286..0000000000000 --- a/third_party/boringssl/win-x86_64/crypto/rc4/rc4-md5-x86_64.asm +++ /dev/null @@ -1,1372 +0,0 @@ -default rel -%define XMMWORD -%define YMMWORD -%define ZMMWORD -section .text code align=64 - -ALIGN 16 - -global rc4_md5_enc - -rc4_md5_enc: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_rc4_md5_enc: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - mov r8,QWORD[40+rsp] - mov r9,QWORD[48+rsp] - - - cmp r9,0 - je NEAR $L$abort - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - sub rsp,40 -$L$body: - mov r11,rcx - mov r12,r9 - mov r13,rsi - mov r14,rdx - mov r15,r8 - xor rbp,rbp - xor rcx,rcx - - lea rdi,[8+rdi] - mov bpl,BYTE[((-8))+rdi] - mov cl,BYTE[((-4))+rdi] - - inc bpl - sub r14,r13 - mov eax,DWORD[rbp*4+rdi] - add cl,al - lea rsi,[rbp*4+rdi] - shl r12,6 - add r12,r15 - mov QWORD[16+rsp],r12 - - mov QWORD[24+rsp],r11 - mov r8d,DWORD[r11] - mov r9d,DWORD[4+r11] - mov r10d,DWORD[8+r11] - mov r11d,DWORD[12+r11] - jmp NEAR $L$oop - -ALIGN 16 -$L$oop: - mov DWORD[rsp],r8d - mov DWORD[4+rsp],r9d - mov DWORD[8+rsp],r10d - mov r12d,r11d - mov DWORD[12+rsp],r11d - pxor xmm0,xmm0 - mov edx,DWORD[rcx*4+rdi] - xor r12d,r10d - mov DWORD[rcx*4+rdi],eax - and r12d,r9d - add r8d,DWORD[r15] - add al,dl - mov ebx,DWORD[4+rsi] - add r8d,3614090360 - xor r12d,r11d - movzx eax,al - mov DWORD[rsi],edx - add r8d,r12d - add cl,bl - rol r8d,7 - mov r12d,r10d - movd xmm0,DWORD[rax*4+rdi] - - add r8d,r9d - pxor xmm1,xmm1 - mov edx,DWORD[rcx*4+rdi] - xor r12d,r9d - mov DWORD[rcx*4+rdi],ebx - and r12d,r8d - add r11d,DWORD[4+r15] - add bl,dl - mov eax,DWORD[8+rsi] - add r11d,3905402710 - xor r12d,r10d - movzx ebx,bl - mov DWORD[4+rsi],edx - add r11d,r12d - add cl,al - rol r11d,12 - mov r12d,r9d - movd xmm1,DWORD[rbx*4+rdi] - - add r11d,r8d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r8d - mov DWORD[rcx*4+rdi],eax - and r12d,r11d - add r10d,DWORD[8+r15] - add al,dl - mov ebx,DWORD[12+rsi] - add r10d,606105819 - xor r12d,r9d - movzx eax,al - mov DWORD[8+rsi],edx - add r10d,r12d - add cl,bl - rol r10d,17 - mov r12d,r8d - pinsrw xmm0,WORD[rax*4+rdi],1 - - add r10d,r11d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r11d - mov DWORD[rcx*4+rdi],ebx - and r12d,r10d - add r9d,DWORD[12+r15] - add bl,dl - mov eax,DWORD[16+rsi] - add r9d,3250441966 - xor r12d,r8d - movzx ebx,bl - mov DWORD[12+rsi],edx - add r9d,r12d - add cl,al - rol r9d,22 - mov r12d,r11d - pinsrw xmm1,WORD[rbx*4+rdi],1 - - add r9d,r10d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r10d - mov DWORD[rcx*4+rdi],eax - and r12d,r9d - add r8d,DWORD[16+r15] - add al,dl - mov ebx,DWORD[20+rsi] - add r8d,4118548399 - xor r12d,r11d - movzx eax,al - mov DWORD[16+rsi],edx - add r8d,r12d - add cl,bl - rol r8d,7 - mov r12d,r10d - pinsrw xmm0,WORD[rax*4+rdi],2 - - add r8d,r9d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r9d - mov DWORD[rcx*4+rdi],ebx - and r12d,r8d - add r11d,DWORD[20+r15] - add bl,dl - mov eax,DWORD[24+rsi] - add r11d,1200080426 - xor r12d,r10d - movzx ebx,bl - mov DWORD[20+rsi],edx - add r11d,r12d - add cl,al - rol r11d,12 - mov r12d,r9d - pinsrw xmm1,WORD[rbx*4+rdi],2 - - add r11d,r8d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r8d - mov DWORD[rcx*4+rdi],eax - and r12d,r11d - add r10d,DWORD[24+r15] - add al,dl - mov ebx,DWORD[28+rsi] - add r10d,2821735955 - xor r12d,r9d - movzx eax,al - mov DWORD[24+rsi],edx - add r10d,r12d - add cl,bl - rol r10d,17 - mov r12d,r8d - pinsrw xmm0,WORD[rax*4+rdi],3 - - add r10d,r11d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r11d - mov DWORD[rcx*4+rdi],ebx - and r12d,r10d - add r9d,DWORD[28+r15] - add bl,dl - mov eax,DWORD[32+rsi] - add r9d,4249261313 - xor r12d,r8d - movzx ebx,bl - mov DWORD[28+rsi],edx - add r9d,r12d - add cl,al - rol r9d,22 - mov r12d,r11d - pinsrw xmm1,WORD[rbx*4+rdi],3 - - add r9d,r10d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r10d - mov DWORD[rcx*4+rdi],eax - and r12d,r9d - add r8d,DWORD[32+r15] - add al,dl - mov ebx,DWORD[36+rsi] - add r8d,1770035416 - xor r12d,r11d - movzx eax,al - mov DWORD[32+rsi],edx - add r8d,r12d - add cl,bl - rol r8d,7 - mov r12d,r10d - pinsrw xmm0,WORD[rax*4+rdi],4 - - add r8d,r9d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r9d - mov DWORD[rcx*4+rdi],ebx - and r12d,r8d - add r11d,DWORD[36+r15] - add bl,dl - mov eax,DWORD[40+rsi] - add r11d,2336552879 - xor r12d,r10d - movzx ebx,bl - mov DWORD[36+rsi],edx - add r11d,r12d - add cl,al - rol r11d,12 - mov r12d,r9d - pinsrw xmm1,WORD[rbx*4+rdi],4 - - add r11d,r8d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r8d - mov DWORD[rcx*4+rdi],eax - and r12d,r11d - add r10d,DWORD[40+r15] - add al,dl - mov ebx,DWORD[44+rsi] - add r10d,4294925233 - xor r12d,r9d - movzx eax,al - mov DWORD[40+rsi],edx - add r10d,r12d - add cl,bl - rol r10d,17 - mov r12d,r8d - pinsrw xmm0,WORD[rax*4+rdi],5 - - add r10d,r11d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r11d - mov DWORD[rcx*4+rdi],ebx - and r12d,r10d - add r9d,DWORD[44+r15] - add bl,dl - mov eax,DWORD[48+rsi] - add r9d,2304563134 - xor r12d,r8d - movzx ebx,bl - mov DWORD[44+rsi],edx - add r9d,r12d - add cl,al - rol r9d,22 - mov r12d,r11d - pinsrw xmm1,WORD[rbx*4+rdi],5 - - add r9d,r10d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r10d - mov DWORD[rcx*4+rdi],eax - and r12d,r9d - add r8d,DWORD[48+r15] - add al,dl - mov ebx,DWORD[52+rsi] - add r8d,1804603682 - xor r12d,r11d - movzx eax,al - mov DWORD[48+rsi],edx - add r8d,r12d - add cl,bl - rol r8d,7 - mov r12d,r10d - pinsrw xmm0,WORD[rax*4+rdi],6 - - add r8d,r9d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r9d - mov DWORD[rcx*4+rdi],ebx - and r12d,r8d - add r11d,DWORD[52+r15] - add bl,dl - mov eax,DWORD[56+rsi] - add r11d,4254626195 - xor r12d,r10d - movzx ebx,bl - mov DWORD[52+rsi],edx - add r11d,r12d - add cl,al - rol r11d,12 - mov r12d,r9d - pinsrw xmm1,WORD[rbx*4+rdi],6 - - add r11d,r8d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r8d - mov DWORD[rcx*4+rdi],eax - and r12d,r11d - add r10d,DWORD[56+r15] - add al,dl - mov ebx,DWORD[60+rsi] - add r10d,2792965006 - xor r12d,r9d - movzx eax,al - mov DWORD[56+rsi],edx - add r10d,r12d - add cl,bl - rol r10d,17 - mov r12d,r8d - pinsrw xmm0,WORD[rax*4+rdi],7 - - add r10d,r11d - movdqu xmm2,XMMWORD[r13] - mov edx,DWORD[rcx*4+rdi] - xor r12d,r11d - mov DWORD[rcx*4+rdi],ebx - and r12d,r10d - add r9d,DWORD[60+r15] - add bl,dl - mov eax,DWORD[64+rsi] - add r9d,1236535329 - xor r12d,r8d - movzx ebx,bl - mov DWORD[60+rsi],edx - add r9d,r12d - add cl,al - rol r9d,22 - mov r12d,r10d - pinsrw xmm1,WORD[rbx*4+rdi],7 - - add r9d,r10d - psllq xmm1,8 - pxor xmm2,xmm0 - pxor xmm2,xmm1 - pxor xmm0,xmm0 - mov edx,DWORD[rcx*4+rdi] - xor r12d,r9d - mov DWORD[rcx*4+rdi],eax - and r12d,r11d - add r8d,DWORD[4+r15] - add al,dl - mov ebx,DWORD[68+rsi] - add r8d,4129170786 - xor r12d,r10d - movzx eax,al - mov DWORD[64+rsi],edx - add r8d,r12d - add cl,bl - rol r8d,5 - mov r12d,r9d - movd xmm0,DWORD[rax*4+rdi] - - add r8d,r9d - pxor xmm1,xmm1 - mov edx,DWORD[rcx*4+rdi] - xor r12d,r8d - mov DWORD[rcx*4+rdi],ebx - and r12d,r10d - add r11d,DWORD[24+r15] - add bl,dl - mov eax,DWORD[72+rsi] - add r11d,3225465664 - xor r12d,r9d - movzx ebx,bl - mov DWORD[68+rsi],edx - add r11d,r12d - add cl,al - rol r11d,9 - mov r12d,r8d - movd xmm1,DWORD[rbx*4+rdi] - - add r11d,r8d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r11d - mov DWORD[rcx*4+rdi],eax - and r12d,r9d - add r10d,DWORD[44+r15] - add al,dl - mov ebx,DWORD[76+rsi] - add r10d,643717713 - xor r12d,r8d - movzx eax,al - mov DWORD[72+rsi],edx - add r10d,r12d - add cl,bl - rol r10d,14 - mov r12d,r11d - pinsrw xmm0,WORD[rax*4+rdi],1 - - add r10d,r11d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r10d - mov DWORD[rcx*4+rdi],ebx - and r12d,r8d - add r9d,DWORD[r15] - add bl,dl - mov eax,DWORD[80+rsi] - add r9d,3921069994 - xor r12d,r11d - movzx ebx,bl - mov DWORD[76+rsi],edx - add r9d,r12d - add cl,al - rol r9d,20 - mov r12d,r10d - pinsrw xmm1,WORD[rbx*4+rdi],1 - - add r9d,r10d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r9d - mov DWORD[rcx*4+rdi],eax - and r12d,r11d - add r8d,DWORD[20+r15] - add al,dl - mov ebx,DWORD[84+rsi] - add r8d,3593408605 - xor r12d,r10d - movzx eax,al - mov DWORD[80+rsi],edx - add r8d,r12d - add cl,bl - rol r8d,5 - mov r12d,r9d - pinsrw xmm0,WORD[rax*4+rdi],2 - - add r8d,r9d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r8d - mov DWORD[rcx*4+rdi],ebx - and r12d,r10d - add r11d,DWORD[40+r15] - add bl,dl - mov eax,DWORD[88+rsi] - add r11d,38016083 - xor r12d,r9d - movzx ebx,bl - mov DWORD[84+rsi],edx - add r11d,r12d - add cl,al - rol r11d,9 - mov r12d,r8d - pinsrw xmm1,WORD[rbx*4+rdi],2 - - add r11d,r8d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r11d - mov DWORD[rcx*4+rdi],eax - and r12d,r9d - add r10d,DWORD[60+r15] - add al,dl - mov ebx,DWORD[92+rsi] - add r10d,3634488961 - xor r12d,r8d - movzx eax,al - mov DWORD[88+rsi],edx - add r10d,r12d - add cl,bl - rol r10d,14 - mov r12d,r11d - pinsrw xmm0,WORD[rax*4+rdi],3 - - add r10d,r11d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r10d - mov DWORD[rcx*4+rdi],ebx - and r12d,r8d - add r9d,DWORD[16+r15] - add bl,dl - mov eax,DWORD[96+rsi] - add r9d,3889429448 - xor r12d,r11d - movzx ebx,bl - mov DWORD[92+rsi],edx - add r9d,r12d - add cl,al - rol r9d,20 - mov r12d,r10d - pinsrw xmm1,WORD[rbx*4+rdi],3 - - add r9d,r10d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r9d - mov DWORD[rcx*4+rdi],eax - and r12d,r11d - add r8d,DWORD[36+r15] - add al,dl - mov ebx,DWORD[100+rsi] - add r8d,568446438 - xor r12d,r10d - movzx eax,al - mov DWORD[96+rsi],edx - add r8d,r12d - add cl,bl - rol r8d,5 - mov r12d,r9d - pinsrw xmm0,WORD[rax*4+rdi],4 - - add r8d,r9d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r8d - mov DWORD[rcx*4+rdi],ebx - and r12d,r10d - add r11d,DWORD[56+r15] - add bl,dl - mov eax,DWORD[104+rsi] - add r11d,3275163606 - xor r12d,r9d - movzx ebx,bl - mov DWORD[100+rsi],edx - add r11d,r12d - add cl,al - rol r11d,9 - mov r12d,r8d - pinsrw xmm1,WORD[rbx*4+rdi],4 - - add r11d,r8d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r11d - mov DWORD[rcx*4+rdi],eax - and r12d,r9d - add r10d,DWORD[12+r15] - add al,dl - mov ebx,DWORD[108+rsi] - add r10d,4107603335 - xor r12d,r8d - movzx eax,al - mov DWORD[104+rsi],edx - add r10d,r12d - add cl,bl - rol r10d,14 - mov r12d,r11d - pinsrw xmm0,WORD[rax*4+rdi],5 - - add r10d,r11d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r10d - mov DWORD[rcx*4+rdi],ebx - and r12d,r8d - add r9d,DWORD[32+r15] - add bl,dl - mov eax,DWORD[112+rsi] - add r9d,1163531501 - xor r12d,r11d - movzx ebx,bl - mov DWORD[108+rsi],edx - add r9d,r12d - add cl,al - rol r9d,20 - mov r12d,r10d - pinsrw xmm1,WORD[rbx*4+rdi],5 - - add r9d,r10d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r9d - mov DWORD[rcx*4+rdi],eax - and r12d,r11d - add r8d,DWORD[52+r15] - add al,dl - mov ebx,DWORD[116+rsi] - add r8d,2850285829 - xor r12d,r10d - movzx eax,al - mov DWORD[112+rsi],edx - add r8d,r12d - add cl,bl - rol r8d,5 - mov r12d,r9d - pinsrw xmm0,WORD[rax*4+rdi],6 - - add r8d,r9d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r8d - mov DWORD[rcx*4+rdi],ebx - and r12d,r10d - add r11d,DWORD[8+r15] - add bl,dl - mov eax,DWORD[120+rsi] - add r11d,4243563512 - xor r12d,r9d - movzx ebx,bl - mov DWORD[116+rsi],edx - add r11d,r12d - add cl,al - rol r11d,9 - mov r12d,r8d - pinsrw xmm1,WORD[rbx*4+rdi],6 - - add r11d,r8d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r11d - mov DWORD[rcx*4+rdi],eax - and r12d,r9d - add r10d,DWORD[28+r15] - add al,dl - mov ebx,DWORD[124+rsi] - add r10d,1735328473 - xor r12d,r8d - movzx eax,al - mov DWORD[120+rsi],edx - add r10d,r12d - add cl,bl - rol r10d,14 - mov r12d,r11d - pinsrw xmm0,WORD[rax*4+rdi],7 - - add r10d,r11d - movdqu xmm3,XMMWORD[16+r13] - add bpl,32 - mov edx,DWORD[rcx*4+rdi] - xor r12d,r10d - mov DWORD[rcx*4+rdi],ebx - and r12d,r8d - add r9d,DWORD[48+r15] - add bl,dl - mov eax,DWORD[rbp*4+rdi] - add r9d,2368359562 - xor r12d,r11d - movzx ebx,bl - mov DWORD[124+rsi],edx - add r9d,r12d - add cl,al - rol r9d,20 - mov r12d,r11d - pinsrw xmm1,WORD[rbx*4+rdi],7 - - add r9d,r10d - mov rsi,rcx - xor rcx,rcx - mov cl,sil - lea rsi,[rbp*4+rdi] - psllq xmm1,8 - pxor xmm3,xmm0 - pxor xmm3,xmm1 - pxor xmm0,xmm0 - mov edx,DWORD[rcx*4+rdi] - xor r12d,r10d - mov DWORD[rcx*4+rdi],eax - xor r12d,r9d - add r8d,DWORD[20+r15] - add al,dl - mov ebx,DWORD[4+rsi] - add r8d,4294588738 - movzx eax,al - add r8d,r12d - mov DWORD[rsi],edx - add cl,bl - rol r8d,4 - mov r12d,r10d - movd xmm0,DWORD[rax*4+rdi] - - add r8d,r9d - pxor xmm1,xmm1 - mov edx,DWORD[rcx*4+rdi] - xor r12d,r9d - mov DWORD[rcx*4+rdi],ebx - xor r12d,r8d - add r11d,DWORD[32+r15] - add bl,dl - mov eax,DWORD[8+rsi] - add r11d,2272392833 - movzx ebx,bl - add r11d,r12d - mov DWORD[4+rsi],edx - add cl,al - rol r11d,11 - mov r12d,r9d - movd xmm1,DWORD[rbx*4+rdi] - - add r11d,r8d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r8d - mov DWORD[rcx*4+rdi],eax - xor r12d,r11d - add r10d,DWORD[44+r15] - add al,dl - mov ebx,DWORD[12+rsi] - add r10d,1839030562 - movzx eax,al - add r10d,r12d - mov DWORD[8+rsi],edx - add cl,bl - rol r10d,16 - mov r12d,r8d - pinsrw xmm0,WORD[rax*4+rdi],1 - - add r10d,r11d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r11d - mov DWORD[rcx*4+rdi],ebx - xor r12d,r10d - add r9d,DWORD[56+r15] - add bl,dl - mov eax,DWORD[16+rsi] - add r9d,4259657740 - movzx ebx,bl - add r9d,r12d - mov DWORD[12+rsi],edx - add cl,al - rol r9d,23 - mov r12d,r11d - pinsrw xmm1,WORD[rbx*4+rdi],1 - - add r9d,r10d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r10d - mov DWORD[rcx*4+rdi],eax - xor r12d,r9d - add r8d,DWORD[4+r15] - add al,dl - mov ebx,DWORD[20+rsi] - add r8d,2763975236 - movzx eax,al - add r8d,r12d - mov DWORD[16+rsi],edx - add cl,bl - rol r8d,4 - mov r12d,r10d - pinsrw xmm0,WORD[rax*4+rdi],2 - - add r8d,r9d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r9d - mov DWORD[rcx*4+rdi],ebx - xor r12d,r8d - add r11d,DWORD[16+r15] - add bl,dl - mov eax,DWORD[24+rsi] - add r11d,1272893353 - movzx ebx,bl - add r11d,r12d - mov DWORD[20+rsi],edx - add cl,al - rol r11d,11 - mov r12d,r9d - pinsrw xmm1,WORD[rbx*4+rdi],2 - - add r11d,r8d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r8d - mov DWORD[rcx*4+rdi],eax - xor r12d,r11d - add r10d,DWORD[28+r15] - add al,dl - mov ebx,DWORD[28+rsi] - add r10d,4139469664 - movzx eax,al - add r10d,r12d - mov DWORD[24+rsi],edx - add cl,bl - rol r10d,16 - mov r12d,r8d - pinsrw xmm0,WORD[rax*4+rdi],3 - - add r10d,r11d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r11d - mov DWORD[rcx*4+rdi],ebx - xor r12d,r10d - add r9d,DWORD[40+r15] - add bl,dl - mov eax,DWORD[32+rsi] - add r9d,3200236656 - movzx ebx,bl - add r9d,r12d - mov DWORD[28+rsi],edx - add cl,al - rol r9d,23 - mov r12d,r11d - pinsrw xmm1,WORD[rbx*4+rdi],3 - - add r9d,r10d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r10d - mov DWORD[rcx*4+rdi],eax - xor r12d,r9d - add r8d,DWORD[52+r15] - add al,dl - mov ebx,DWORD[36+rsi] - add r8d,681279174 - movzx eax,al - add r8d,r12d - mov DWORD[32+rsi],edx - add cl,bl - rol r8d,4 - mov r12d,r10d - pinsrw xmm0,WORD[rax*4+rdi],4 - - add r8d,r9d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r9d - mov DWORD[rcx*4+rdi],ebx - xor r12d,r8d - add r11d,DWORD[r15] - add bl,dl - mov eax,DWORD[40+rsi] - add r11d,3936430074 - movzx ebx,bl - add r11d,r12d - mov DWORD[36+rsi],edx - add cl,al - rol r11d,11 - mov r12d,r9d - pinsrw xmm1,WORD[rbx*4+rdi],4 - - add r11d,r8d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r8d - mov DWORD[rcx*4+rdi],eax - xor r12d,r11d - add r10d,DWORD[12+r15] - add al,dl - mov ebx,DWORD[44+rsi] - add r10d,3572445317 - movzx eax,al - add r10d,r12d - mov DWORD[40+rsi],edx - add cl,bl - rol r10d,16 - mov r12d,r8d - pinsrw xmm0,WORD[rax*4+rdi],5 - - add r10d,r11d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r11d - mov DWORD[rcx*4+rdi],ebx - xor r12d,r10d - add r9d,DWORD[24+r15] - add bl,dl - mov eax,DWORD[48+rsi] - add r9d,76029189 - movzx ebx,bl - add r9d,r12d - mov DWORD[44+rsi],edx - add cl,al - rol r9d,23 - mov r12d,r11d - pinsrw xmm1,WORD[rbx*4+rdi],5 - - add r9d,r10d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r10d - mov DWORD[rcx*4+rdi],eax - xor r12d,r9d - add r8d,DWORD[36+r15] - add al,dl - mov ebx,DWORD[52+rsi] - add r8d,3654602809 - movzx eax,al - add r8d,r12d - mov DWORD[48+rsi],edx - add cl,bl - rol r8d,4 - mov r12d,r10d - pinsrw xmm0,WORD[rax*4+rdi],6 - - add r8d,r9d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r9d - mov DWORD[rcx*4+rdi],ebx - xor r12d,r8d - add r11d,DWORD[48+r15] - add bl,dl - mov eax,DWORD[56+rsi] - add r11d,3873151461 - movzx ebx,bl - add r11d,r12d - mov DWORD[52+rsi],edx - add cl,al - rol r11d,11 - mov r12d,r9d - pinsrw xmm1,WORD[rbx*4+rdi],6 - - add r11d,r8d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r8d - mov DWORD[rcx*4+rdi],eax - xor r12d,r11d - add r10d,DWORD[60+r15] - add al,dl - mov ebx,DWORD[60+rsi] - add r10d,530742520 - movzx eax,al - add r10d,r12d - mov DWORD[56+rsi],edx - add cl,bl - rol r10d,16 - mov r12d,r8d - pinsrw xmm0,WORD[rax*4+rdi],7 - - add r10d,r11d - movdqu xmm4,XMMWORD[32+r13] - mov edx,DWORD[rcx*4+rdi] - xor r12d,r11d - mov DWORD[rcx*4+rdi],ebx - xor r12d,r10d - add r9d,DWORD[8+r15] - add bl,dl - mov eax,DWORD[64+rsi] - add r9d,3299628645 - movzx ebx,bl - add r9d,r12d - mov DWORD[60+rsi],edx - add cl,al - rol r9d,23 - mov r12d,-1 - pinsrw xmm1,WORD[rbx*4+rdi],7 - - add r9d,r10d - psllq xmm1,8 - pxor xmm4,xmm0 - pxor xmm4,xmm1 - pxor xmm0,xmm0 - mov edx,DWORD[rcx*4+rdi] - xor r12d,r11d - mov DWORD[rcx*4+rdi],eax - or r12d,r9d - add r8d,DWORD[r15] - add al,dl - mov ebx,DWORD[68+rsi] - add r8d,4096336452 - movzx eax,al - xor r12d,r10d - mov DWORD[64+rsi],edx - add r8d,r12d - add cl,bl - rol r8d,6 - mov r12d,-1 - movd xmm0,DWORD[rax*4+rdi] - - add r8d,r9d - pxor xmm1,xmm1 - mov edx,DWORD[rcx*4+rdi] - xor r12d,r10d - mov DWORD[rcx*4+rdi],ebx - or r12d,r8d - add r11d,DWORD[28+r15] - add bl,dl - mov eax,DWORD[72+rsi] - add r11d,1126891415 - movzx ebx,bl - xor r12d,r9d - mov DWORD[68+rsi],edx - add r11d,r12d - add cl,al - rol r11d,10 - mov r12d,-1 - movd xmm1,DWORD[rbx*4+rdi] - - add r11d,r8d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r9d - mov DWORD[rcx*4+rdi],eax - or r12d,r11d - add r10d,DWORD[56+r15] - add al,dl - mov ebx,DWORD[76+rsi] - add r10d,2878612391 - movzx eax,al - xor r12d,r8d - mov DWORD[72+rsi],edx - add r10d,r12d - add cl,bl - rol r10d,15 - mov r12d,-1 - pinsrw xmm0,WORD[rax*4+rdi],1 - - add r10d,r11d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r8d - mov DWORD[rcx*4+rdi],ebx - or r12d,r10d - add r9d,DWORD[20+r15] - add bl,dl - mov eax,DWORD[80+rsi] - add r9d,4237533241 - movzx ebx,bl - xor r12d,r11d - mov DWORD[76+rsi],edx - add r9d,r12d - add cl,al - rol r9d,21 - mov r12d,-1 - pinsrw xmm1,WORD[rbx*4+rdi],1 - - add r9d,r10d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r11d - mov DWORD[rcx*4+rdi],eax - or r12d,r9d - add r8d,DWORD[48+r15] - add al,dl - mov ebx,DWORD[84+rsi] - add r8d,1700485571 - movzx eax,al - xor r12d,r10d - mov DWORD[80+rsi],edx - add r8d,r12d - add cl,bl - rol r8d,6 - mov r12d,-1 - pinsrw xmm0,WORD[rax*4+rdi],2 - - add r8d,r9d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r10d - mov DWORD[rcx*4+rdi],ebx - or r12d,r8d - add r11d,DWORD[12+r15] - add bl,dl - mov eax,DWORD[88+rsi] - add r11d,2399980690 - movzx ebx,bl - xor r12d,r9d - mov DWORD[84+rsi],edx - add r11d,r12d - add cl,al - rol r11d,10 - mov r12d,-1 - pinsrw xmm1,WORD[rbx*4+rdi],2 - - add r11d,r8d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r9d - mov DWORD[rcx*4+rdi],eax - or r12d,r11d - add r10d,DWORD[40+r15] - add al,dl - mov ebx,DWORD[92+rsi] - add r10d,4293915773 - movzx eax,al - xor r12d,r8d - mov DWORD[88+rsi],edx - add r10d,r12d - add cl,bl - rol r10d,15 - mov r12d,-1 - pinsrw xmm0,WORD[rax*4+rdi],3 - - add r10d,r11d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r8d - mov DWORD[rcx*4+rdi],ebx - or r12d,r10d - add r9d,DWORD[4+r15] - add bl,dl - mov eax,DWORD[96+rsi] - add r9d,2240044497 - movzx ebx,bl - xor r12d,r11d - mov DWORD[92+rsi],edx - add r9d,r12d - add cl,al - rol r9d,21 - mov r12d,-1 - pinsrw xmm1,WORD[rbx*4+rdi],3 - - add r9d,r10d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r11d - mov DWORD[rcx*4+rdi],eax - or r12d,r9d - add r8d,DWORD[32+r15] - add al,dl - mov ebx,DWORD[100+rsi] - add r8d,1873313359 - movzx eax,al - xor r12d,r10d - mov DWORD[96+rsi],edx - add r8d,r12d - add cl,bl - rol r8d,6 - mov r12d,-1 - pinsrw xmm0,WORD[rax*4+rdi],4 - - add r8d,r9d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r10d - mov DWORD[rcx*4+rdi],ebx - or r12d,r8d - add r11d,DWORD[60+r15] - add bl,dl - mov eax,DWORD[104+rsi] - add r11d,4264355552 - movzx ebx,bl - xor r12d,r9d - mov DWORD[100+rsi],edx - add r11d,r12d - add cl,al - rol r11d,10 - mov r12d,-1 - pinsrw xmm1,WORD[rbx*4+rdi],4 - - add r11d,r8d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r9d - mov DWORD[rcx*4+rdi],eax - or r12d,r11d - add r10d,DWORD[24+r15] - add al,dl - mov ebx,DWORD[108+rsi] - add r10d,2734768916 - movzx eax,al - xor r12d,r8d - mov DWORD[104+rsi],edx - add r10d,r12d - add cl,bl - rol r10d,15 - mov r12d,-1 - pinsrw xmm0,WORD[rax*4+rdi],5 - - add r10d,r11d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r8d - mov DWORD[rcx*4+rdi],ebx - or r12d,r10d - add r9d,DWORD[52+r15] - add bl,dl - mov eax,DWORD[112+rsi] - add r9d,1309151649 - movzx ebx,bl - xor r12d,r11d - mov DWORD[108+rsi],edx - add r9d,r12d - add cl,al - rol r9d,21 - mov r12d,-1 - pinsrw xmm1,WORD[rbx*4+rdi],5 - - add r9d,r10d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r11d - mov DWORD[rcx*4+rdi],eax - or r12d,r9d - add r8d,DWORD[16+r15] - add al,dl - mov ebx,DWORD[116+rsi] - add r8d,4149444226 - movzx eax,al - xor r12d,r10d - mov DWORD[112+rsi],edx - add r8d,r12d - add cl,bl - rol r8d,6 - mov r12d,-1 - pinsrw xmm0,WORD[rax*4+rdi],6 - - add r8d,r9d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r10d - mov DWORD[rcx*4+rdi],ebx - or r12d,r8d - add r11d,DWORD[44+r15] - add bl,dl - mov eax,DWORD[120+rsi] - add r11d,3174756917 - movzx ebx,bl - xor r12d,r9d - mov DWORD[116+rsi],edx - add r11d,r12d - add cl,al - rol r11d,10 - mov r12d,-1 - pinsrw xmm1,WORD[rbx*4+rdi],6 - - add r11d,r8d - mov edx,DWORD[rcx*4+rdi] - xor r12d,r9d - mov DWORD[rcx*4+rdi],eax - or r12d,r11d - add r10d,DWORD[8+r15] - add al,dl - mov ebx,DWORD[124+rsi] - add r10d,718787259 - movzx eax,al - xor r12d,r8d - mov DWORD[120+rsi],edx - add r10d,r12d - add cl,bl - rol r10d,15 - mov r12d,-1 - pinsrw xmm0,WORD[rax*4+rdi],7 - - add r10d,r11d - movdqu xmm5,XMMWORD[48+r13] - add bpl,32 - mov edx,DWORD[rcx*4+rdi] - xor r12d,r8d - mov DWORD[rcx*4+rdi],ebx - or r12d,r10d - add r9d,DWORD[36+r15] - add bl,dl - mov eax,DWORD[rbp*4+rdi] - add r9d,3951481745 - movzx ebx,bl - xor r12d,r11d - mov DWORD[124+rsi],edx - add r9d,r12d - add cl,al - rol r9d,21 - mov r12d,-1 - pinsrw xmm1,WORD[rbx*4+rdi],7 - - add r9d,r10d - mov rsi,rbp - xor rbp,rbp - mov bpl,sil - mov rsi,rcx - xor rcx,rcx - mov cl,sil - lea rsi,[rbp*4+rdi] - psllq xmm1,8 - pxor xmm5,xmm0 - pxor xmm5,xmm1 - add r8d,DWORD[rsp] - add r9d,DWORD[4+rsp] - add r10d,DWORD[8+rsp] - add r11d,DWORD[12+rsp] - - movdqu XMMWORD[r13*1+r14],xmm2 - movdqu XMMWORD[16+r13*1+r14],xmm3 - movdqu XMMWORD[32+r13*1+r14],xmm4 - movdqu XMMWORD[48+r13*1+r14],xmm5 - lea r15,[64+r15] - lea r13,[64+r13] - cmp r15,QWORD[16+rsp] - jb NEAR $L$oop - - mov r12,QWORD[24+rsp] - sub cl,al - mov DWORD[r12],r8d - mov DWORD[4+r12],r9d - mov DWORD[8+r12],r10d - mov DWORD[12+r12],r11d - sub bpl,1 - mov DWORD[((-8))+rdi],ebp - mov DWORD[((-4))+rdi],ecx - - mov r15,QWORD[40+rsp] - mov r14,QWORD[48+rsp] - mov r13,QWORD[56+rsp] - mov r12,QWORD[64+rsp] - mov rbp,QWORD[72+rsp] - mov rbx,QWORD[80+rsp] - lea rsp,[88+rsp] -$L$epilogue: -$L$abort: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_rc4_md5_enc: -EXTERN __imp_RtlVirtualUnwind - -ALIGN 16 -se_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - lea r10,[$L$body] - cmp rbx,r10 - jb NEAR $L$in_prologue - - mov rax,QWORD[152+r8] - - lea r10,[$L$epilogue] - cmp rbx,r10 - jae NEAR $L$in_prologue - - mov r15,QWORD[40+rax] - mov r14,QWORD[48+rax] - mov r13,QWORD[56+rax] - mov r12,QWORD[64+rax] - mov rbp,QWORD[72+rax] - mov rbx,QWORD[80+rax] - lea rax,[88+rax] - - mov QWORD[144+r8],rbx - mov QWORD[160+r8],rbp - mov QWORD[216+r8],r12 - mov QWORD[224+r8],r13 - mov QWORD[232+r8],r14 - mov QWORD[240+r8],r15 - -$L$in_prologue: - mov rdi,QWORD[8+rax] - mov rsi,QWORD[16+rax] - mov QWORD[152+r8],rax - mov QWORD[168+r8],rsi - mov QWORD[176+r8],rdi - - mov rdi,QWORD[40+r9] - mov rsi,r8 - mov ecx,154 - DD 0xa548f3fc - - mov rsi,r9 - xor rcx,rcx - mov rdx,QWORD[8+rsi] - mov r8,QWORD[rsi] - mov r9,QWORD[16+rsi] - mov r10,QWORD[40+rsi] - lea r11,[56+rsi] - lea r12,[24+rsi] - mov QWORD[32+rsp],r10 - mov QWORD[40+rsp],r11 - mov QWORD[48+rsp],r12 - mov QWORD[56+rsp],rcx - call QWORD[__imp_RtlVirtualUnwind] - - mov eax,1 - add rsp,64 - popfq - pop r15 - pop r14 - pop r13 - pop r12 - pop rbp - pop rbx - pop rdi - pop rsi - DB 0F3h,0C3h ;repret - - -section .pdata rdata align=4 -ALIGN 4 - DD $L$SEH_begin_rc4_md5_enc wrt ..imagebase - DD $L$SEH_end_rc4_md5_enc wrt ..imagebase - DD $L$SEH_info_rc4_md5_enc wrt ..imagebase - -section .xdata rdata align=8 -ALIGN 8 -$L$SEH_info_rc4_md5_enc: -DB 9,0,0,0 - DD se_handler wrt ..imagebase diff --git a/third_party/boringssl/win-x86_64/crypto/rc4/rc4-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/rc4/rc4-x86_64.asm deleted file mode 100644 index c7c3b7b6c0ffb..0000000000000 --- a/third_party/boringssl/win-x86_64/crypto/rc4/rc4-x86_64.asm +++ /dev/null @@ -1,741 +0,0 @@ -default rel -%define XMMWORD -%define YMMWORD -%define ZMMWORD -section .text code align=64 - -EXTERN OPENSSL_ia32cap_P - -global asm_RC4 - -ALIGN 16 -asm_RC4: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_asm_RC4: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - mov rcx,r9 - - - or rsi,rsi - jne NEAR $L$entry - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$entry: - push rbx - push r12 - push r13 -$L$prologue: - mov r11,rsi - mov r12,rdx - mov r13,rcx - xor r10,r10 - xor rcx,rcx - - lea rdi,[8+rdi] - mov r10b,BYTE[((-8))+rdi] - mov cl,BYTE[((-4))+rdi] - cmp DWORD[256+rdi],-1 - je NEAR $L$RC4_CHAR - mov r8d,DWORD[OPENSSL_ia32cap_P] - xor rbx,rbx - inc r10b - sub rbx,r10 - sub r13,r12 - mov eax,DWORD[r10*4+rdi] - test r11,-16 - jz NEAR $L$loop1 - bt r8d,30 - jc NEAR $L$intel - and rbx,7 - lea rsi,[1+r10] - jz NEAR $L$oop8 - sub r11,rbx -$L$oop8_warmup: - add cl,al - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],eax - mov DWORD[r10*4+rdi],edx - add al,dl - inc r10b - mov edx,DWORD[rax*4+rdi] - mov eax,DWORD[r10*4+rdi] - xor dl,BYTE[r12] - mov BYTE[r13*1+r12],dl - lea r12,[1+r12] - dec rbx - jnz NEAR $L$oop8_warmup - - lea rsi,[1+r10] - jmp NEAR $L$oop8 -ALIGN 16 -$L$oop8: - add cl,al - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],eax - mov ebx,DWORD[rsi*4+rdi] - ror r8,8 - mov DWORD[r10*4+rdi],edx - add dl,al - mov r8b,BYTE[rdx*4+rdi] - add cl,bl - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],ebx - mov eax,DWORD[4+rsi*4+rdi] - ror r8,8 - mov DWORD[4+r10*4+rdi],edx - add dl,bl - mov r8b,BYTE[rdx*4+rdi] - add cl,al - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],eax - mov ebx,DWORD[8+rsi*4+rdi] - ror r8,8 - mov DWORD[8+r10*4+rdi],edx - add dl,al - mov r8b,BYTE[rdx*4+rdi] - add cl,bl - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],ebx - mov eax,DWORD[12+rsi*4+rdi] - ror r8,8 - mov DWORD[12+r10*4+rdi],edx - add dl,bl - mov r8b,BYTE[rdx*4+rdi] - add cl,al - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],eax - mov ebx,DWORD[16+rsi*4+rdi] - ror r8,8 - mov DWORD[16+r10*4+rdi],edx - add dl,al - mov r8b,BYTE[rdx*4+rdi] - add cl,bl - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],ebx - mov eax,DWORD[20+rsi*4+rdi] - ror r8,8 - mov DWORD[20+r10*4+rdi],edx - add dl,bl - mov r8b,BYTE[rdx*4+rdi] - add cl,al - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],eax - mov ebx,DWORD[24+rsi*4+rdi] - ror r8,8 - mov DWORD[24+r10*4+rdi],edx - add dl,al - mov r8b,BYTE[rdx*4+rdi] - add sil,8 - add cl,bl - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],ebx - mov eax,DWORD[((-4))+rsi*4+rdi] - ror r8,8 - mov DWORD[28+r10*4+rdi],edx - add dl,bl - mov r8b,BYTE[rdx*4+rdi] - add r10b,8 - ror r8,8 - sub r11,8 - - xor r8,QWORD[r12] - mov QWORD[r13*1+r12],r8 - lea r12,[8+r12] - - test r11,-8 - jnz NEAR $L$oop8 - cmp r11,0 - jne NEAR $L$loop1 - jmp NEAR $L$exit - -ALIGN 16 -$L$intel: - test r11,-32 - jz NEAR $L$loop1 - and rbx,15 - jz NEAR $L$oop16_is_hot - sub r11,rbx -$L$oop16_warmup: - add cl,al - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],eax - mov DWORD[r10*4+rdi],edx - add al,dl - inc r10b - mov edx,DWORD[rax*4+rdi] - mov eax,DWORD[r10*4+rdi] - xor dl,BYTE[r12] - mov BYTE[r13*1+r12],dl - lea r12,[1+r12] - dec rbx - jnz NEAR $L$oop16_warmup - - mov rbx,rcx - xor rcx,rcx - mov cl,bl - -$L$oop16_is_hot: - lea rsi,[r10*4+rdi] - add cl,al - mov edx,DWORD[rcx*4+rdi] - pxor xmm0,xmm0 - mov DWORD[rcx*4+rdi],eax - add al,dl - mov ebx,DWORD[4+rsi] - movzx eax,al - mov DWORD[rsi],edx - add cl,bl - pinsrw xmm0,WORD[rax*4+rdi],0 - jmp NEAR $L$oop16_enter -ALIGN 16 -$L$oop16: - add cl,al - mov edx,DWORD[rcx*4+rdi] - pxor xmm2,xmm0 - psllq xmm1,8 - pxor xmm0,xmm0 - mov DWORD[rcx*4+rdi],eax - add al,dl - mov ebx,DWORD[4+rsi] - movzx eax,al - mov DWORD[rsi],edx - pxor xmm2,xmm1 - add cl,bl - pinsrw xmm0,WORD[rax*4+rdi],0 - movdqu XMMWORD[r13*1+r12],xmm2 - lea r12,[16+r12] -$L$oop16_enter: - mov edx,DWORD[rcx*4+rdi] - pxor xmm1,xmm1 - mov DWORD[rcx*4+rdi],ebx - add bl,dl - mov eax,DWORD[8+rsi] - movzx ebx,bl - mov DWORD[4+rsi],edx - add cl,al - pinsrw xmm1,WORD[rbx*4+rdi],0 - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],eax - add al,dl - mov ebx,DWORD[12+rsi] - movzx eax,al - mov DWORD[8+rsi],edx - add cl,bl - pinsrw xmm0,WORD[rax*4+rdi],1 - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],ebx - add bl,dl - mov eax,DWORD[16+rsi] - movzx ebx,bl - mov DWORD[12+rsi],edx - add cl,al - pinsrw xmm1,WORD[rbx*4+rdi],1 - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],eax - add al,dl - mov ebx,DWORD[20+rsi] - movzx eax,al - mov DWORD[16+rsi],edx - add cl,bl - pinsrw xmm0,WORD[rax*4+rdi],2 - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],ebx - add bl,dl - mov eax,DWORD[24+rsi] - movzx ebx,bl - mov DWORD[20+rsi],edx - add cl,al - pinsrw xmm1,WORD[rbx*4+rdi],2 - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],eax - add al,dl - mov ebx,DWORD[28+rsi] - movzx eax,al - mov DWORD[24+rsi],edx - add cl,bl - pinsrw xmm0,WORD[rax*4+rdi],3 - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],ebx - add bl,dl - mov eax,DWORD[32+rsi] - movzx ebx,bl - mov DWORD[28+rsi],edx - add cl,al - pinsrw xmm1,WORD[rbx*4+rdi],3 - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],eax - add al,dl - mov ebx,DWORD[36+rsi] - movzx eax,al - mov DWORD[32+rsi],edx - add cl,bl - pinsrw xmm0,WORD[rax*4+rdi],4 - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],ebx - add bl,dl - mov eax,DWORD[40+rsi] - movzx ebx,bl - mov DWORD[36+rsi],edx - add cl,al - pinsrw xmm1,WORD[rbx*4+rdi],4 - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],eax - add al,dl - mov ebx,DWORD[44+rsi] - movzx eax,al - mov DWORD[40+rsi],edx - add cl,bl - pinsrw xmm0,WORD[rax*4+rdi],5 - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],ebx - add bl,dl - mov eax,DWORD[48+rsi] - movzx ebx,bl - mov DWORD[44+rsi],edx - add cl,al - pinsrw xmm1,WORD[rbx*4+rdi],5 - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],eax - add al,dl - mov ebx,DWORD[52+rsi] - movzx eax,al - mov DWORD[48+rsi],edx - add cl,bl - pinsrw xmm0,WORD[rax*4+rdi],6 - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],ebx - add bl,dl - mov eax,DWORD[56+rsi] - movzx ebx,bl - mov DWORD[52+rsi],edx - add cl,al - pinsrw xmm1,WORD[rbx*4+rdi],6 - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],eax - add al,dl - mov ebx,DWORD[60+rsi] - movzx eax,al - mov DWORD[56+rsi],edx - add cl,bl - pinsrw xmm0,WORD[rax*4+rdi],7 - add r10b,16 - movdqu xmm2,XMMWORD[r12] - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],ebx - add bl,dl - movzx ebx,bl - mov DWORD[60+rsi],edx - lea rsi,[r10*4+rdi] - pinsrw xmm1,WORD[rbx*4+rdi],7 - mov eax,DWORD[rsi] - mov rbx,rcx - xor rcx,rcx - sub r11,16 - mov cl,bl - test r11,-16 - jnz NEAR $L$oop16 - - psllq xmm1,8 - pxor xmm2,xmm0 - pxor xmm2,xmm1 - movdqu XMMWORD[r13*1+r12],xmm2 - lea r12,[16+r12] - - cmp r11,0 - jne NEAR $L$loop1 - jmp NEAR $L$exit - -ALIGN 16 -$L$loop1: - add cl,al - mov edx,DWORD[rcx*4+rdi] - mov DWORD[rcx*4+rdi],eax - mov DWORD[r10*4+rdi],edx - add al,dl - inc r10b - mov edx,DWORD[rax*4+rdi] - mov eax,DWORD[r10*4+rdi] - xor dl,BYTE[r12] - mov BYTE[r13*1+r12],dl - lea r12,[1+r12] - dec r11 - jnz NEAR $L$loop1 - jmp NEAR $L$exit - -ALIGN 16 -$L$RC4_CHAR: - add r10b,1 - movzx eax,BYTE[r10*1+rdi] - test r11,-8 - jz NEAR $L$cloop1 - jmp NEAR $L$cloop8 -ALIGN 16 -$L$cloop8: - mov r8d,DWORD[r12] - mov r9d,DWORD[4+r12] - add cl,al - lea rsi,[1+r10] - movzx edx,BYTE[rcx*1+rdi] - movzx esi,sil - movzx ebx,BYTE[rsi*1+rdi] - mov BYTE[rcx*1+rdi],al - cmp rcx,rsi - mov BYTE[r10*1+rdi],dl - jne NEAR $L$cmov0 - mov rbx,rax -$L$cmov0: - add dl,al - xor r8b,BYTE[rdx*1+rdi] - ror r8d,8 - add cl,bl - lea r10,[1+rsi] - movzx edx,BYTE[rcx*1+rdi] - movzx r10d,r10b - movzx eax,BYTE[r10*1+rdi] - mov BYTE[rcx*1+rdi],bl - cmp rcx,r10 - mov BYTE[rsi*1+rdi],dl - jne NEAR $L$cmov1 - mov rax,rbx -$L$cmov1: - add dl,bl - xor r8b,BYTE[rdx*1+rdi] - ror r8d,8 - add cl,al - lea rsi,[1+r10] - movzx edx,BYTE[rcx*1+rdi] - movzx esi,sil - movzx ebx,BYTE[rsi*1+rdi] - mov BYTE[rcx*1+rdi],al - cmp rcx,rsi - mov BYTE[r10*1+rdi],dl - jne NEAR $L$cmov2 - mov rbx,rax -$L$cmov2: - add dl,al - xor r8b,BYTE[rdx*1+rdi] - ror r8d,8 - add cl,bl - lea r10,[1+rsi] - movzx edx,BYTE[rcx*1+rdi] - movzx r10d,r10b - movzx eax,BYTE[r10*1+rdi] - mov BYTE[rcx*1+rdi],bl - cmp rcx,r10 - mov BYTE[rsi*1+rdi],dl - jne NEAR $L$cmov3 - mov rax,rbx -$L$cmov3: - add dl,bl - xor r8b,BYTE[rdx*1+rdi] - ror r8d,8 - add cl,al - lea rsi,[1+r10] - movzx edx,BYTE[rcx*1+rdi] - movzx esi,sil - movzx ebx,BYTE[rsi*1+rdi] - mov BYTE[rcx*1+rdi],al - cmp rcx,rsi - mov BYTE[r10*1+rdi],dl - jne NEAR $L$cmov4 - mov rbx,rax -$L$cmov4: - add dl,al - xor r9b,BYTE[rdx*1+rdi] - ror r9d,8 - add cl,bl - lea r10,[1+rsi] - movzx edx,BYTE[rcx*1+rdi] - movzx r10d,r10b - movzx eax,BYTE[r10*1+rdi] - mov BYTE[rcx*1+rdi],bl - cmp rcx,r10 - mov BYTE[rsi*1+rdi],dl - jne NEAR $L$cmov5 - mov rax,rbx -$L$cmov5: - add dl,bl - xor r9b,BYTE[rdx*1+rdi] - ror r9d,8 - add cl,al - lea rsi,[1+r10] - movzx edx,BYTE[rcx*1+rdi] - movzx esi,sil - movzx ebx,BYTE[rsi*1+rdi] - mov BYTE[rcx*1+rdi],al - cmp rcx,rsi - mov BYTE[r10*1+rdi],dl - jne NEAR $L$cmov6 - mov rbx,rax -$L$cmov6: - add dl,al - xor r9b,BYTE[rdx*1+rdi] - ror r9d,8 - add cl,bl - lea r10,[1+rsi] - movzx edx,BYTE[rcx*1+rdi] - movzx r10d,r10b - movzx eax,BYTE[r10*1+rdi] - mov BYTE[rcx*1+rdi],bl - cmp rcx,r10 - mov BYTE[rsi*1+rdi],dl - jne NEAR $L$cmov7 - mov rax,rbx -$L$cmov7: - add dl,bl - xor r9b,BYTE[rdx*1+rdi] - ror r9d,8 - lea r11,[((-8))+r11] - mov DWORD[r13],r8d - lea r12,[8+r12] - mov DWORD[4+r13],r9d - lea r13,[8+r13] - - test r11,-8 - jnz NEAR $L$cloop8 - cmp r11,0 - jne NEAR $L$cloop1 - jmp NEAR $L$exit -ALIGN 16 -$L$cloop1: - add cl,al - movzx ecx,cl - movzx edx,BYTE[rcx*1+rdi] - mov BYTE[rcx*1+rdi],al - mov BYTE[r10*1+rdi],dl - add dl,al - add r10b,1 - movzx edx,dl - movzx r10d,r10b - movzx edx,BYTE[rdx*1+rdi] - movzx eax,BYTE[r10*1+rdi] - xor dl,BYTE[r12] - lea r12,[1+r12] - mov BYTE[r13],dl - lea r13,[1+r13] - sub r11,1 - jnz NEAR $L$cloop1 - jmp NEAR $L$exit - -ALIGN 16 -$L$exit: - sub r10b,1 - mov DWORD[((-8))+rdi],r10d - mov DWORD[((-4))+rdi],ecx - - mov r13,QWORD[rsp] - mov r12,QWORD[8+rsp] - mov rbx,QWORD[16+rsp] - add rsp,24 -$L$epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_asm_RC4: -global asm_RC4_set_key - -ALIGN 16 -asm_RC4_set_key: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_asm_RC4_set_key: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - - - lea rdi,[8+rdi] - lea rdx,[rsi*1+rdx] - neg rsi - mov rcx,rsi - xor eax,eax - xor r9,r9 - xor r10,r10 - xor r11,r11 - - mov r8d,DWORD[OPENSSL_ia32cap_P] - bt r8d,20 - jc NEAR $L$c1stloop - jmp NEAR $L$w1stloop - -ALIGN 16 -$L$w1stloop: - mov DWORD[rax*4+rdi],eax - add al,1 - jnc NEAR $L$w1stloop - - xor r9,r9 - xor r8,r8 -ALIGN 16 -$L$w2ndloop: - mov r10d,DWORD[r9*4+rdi] - add r8b,BYTE[rsi*1+rdx] - add r8b,r10b - add rsi,1 - mov r11d,DWORD[r8*4+rdi] - cmovz rsi,rcx - mov DWORD[r8*4+rdi],r10d - mov DWORD[r9*4+rdi],r11d - add r9b,1 - jnc NEAR $L$w2ndloop - jmp NEAR $L$exit_key - -ALIGN 16 -$L$c1stloop: - mov BYTE[rax*1+rdi],al - add al,1 - jnc NEAR $L$c1stloop - - xor r9,r9 - xor r8,r8 -ALIGN 16 -$L$c2ndloop: - mov r10b,BYTE[r9*1+rdi] - add r8b,BYTE[rsi*1+rdx] - add r8b,r10b - add rsi,1 - mov r11b,BYTE[r8*1+rdi] - jnz NEAR $L$cnowrap - mov rsi,rcx -$L$cnowrap: - mov BYTE[r8*1+rdi],r10b - mov BYTE[r9*1+rdi],r11b - add r9b,1 - jnc NEAR $L$c2ndloop - mov DWORD[256+rdi],-1 - -ALIGN 16 -$L$exit_key: - xor eax,eax - mov DWORD[((-8))+rdi],eax - mov DWORD[((-4))+rdi],eax - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_asm_RC4_set_key: -EXTERN __imp_RtlVirtualUnwind - -ALIGN 16 -stream_se_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - lea r10,[$L$prologue] - cmp rbx,r10 - jb NEAR $L$in_prologue - - mov rax,QWORD[152+r8] - - lea r10,[$L$epilogue] - cmp rbx,r10 - jae NEAR $L$in_prologue - - lea rax,[24+rax] - - mov rbx,QWORD[((-8))+rax] - mov r12,QWORD[((-16))+rax] - mov r13,QWORD[((-24))+rax] - mov QWORD[144+r8],rbx - mov QWORD[216+r8],r12 - mov QWORD[224+r8],r13 - -$L$in_prologue: - mov rdi,QWORD[8+rax] - mov rsi,QWORD[16+rax] - mov QWORD[152+r8],rax - mov QWORD[168+r8],rsi - mov QWORD[176+r8],rdi - - jmp NEAR $L$common_seh_exit - - - -ALIGN 16 -key_se_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[152+r8] - mov rdi,QWORD[8+rax] - mov rsi,QWORD[16+rax] - mov QWORD[168+r8],rsi - mov QWORD[176+r8],rdi - -$L$common_seh_exit: - - mov rdi,QWORD[40+r9] - mov rsi,r8 - mov ecx,154 - DD 0xa548f3fc - - mov rsi,r9 - xor rcx,rcx - mov rdx,QWORD[8+rsi] - mov r8,QWORD[rsi] - mov r9,QWORD[16+rsi] - mov r10,QWORD[40+rsi] - lea r11,[56+rsi] - lea r12,[24+rsi] - mov QWORD[32+rsp],r10 - mov QWORD[40+rsp],r11 - mov QWORD[48+rsp],r12 - mov QWORD[56+rsp],rcx - call QWORD[__imp_RtlVirtualUnwind] - - mov eax,1 - add rsp,64 - popfq - pop r15 - pop r14 - pop r13 - pop r12 - pop rbp - pop rbx - pop rdi - pop rsi - DB 0F3h,0C3h ;repret - - -section .pdata rdata align=4 -ALIGN 4 - DD $L$SEH_begin_asm_RC4 wrt ..imagebase - DD $L$SEH_end_asm_RC4 wrt ..imagebase - DD $L$SEH_info_asm_RC4 wrt ..imagebase - - DD $L$SEH_begin_asm_RC4_set_key wrt ..imagebase - DD $L$SEH_end_asm_RC4_set_key wrt ..imagebase - DD $L$SEH_info_asm_RC4_set_key wrt ..imagebase - -section .xdata rdata align=8 -ALIGN 8 -$L$SEH_info_asm_RC4: -DB 9,0,0,0 - DD stream_se_handler wrt ..imagebase -$L$SEH_info_asm_RC4_set_key: -DB 9,0,0,0 - DD key_se_handler wrt ..imagebase diff --git a/third_party/boringssl/win-x86_64/crypto/sha/sha1-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/sha/sha1-x86_64.asm deleted file mode 100644 index 0f5361a1b54d5..0000000000000 --- a/third_party/boringssl/win-x86_64/crypto/sha/sha1-x86_64.asm +++ /dev/null @@ -1,2616 +0,0 @@ -default rel -%define XMMWORD -%define YMMWORD -%define ZMMWORD -section .text code align=64 - -EXTERN OPENSSL_ia32cap_P - -global sha1_block_data_order - -ALIGN 16 -sha1_block_data_order: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_sha1_block_data_order: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - - - mov r9d,DWORD[((OPENSSL_ia32cap_P+0))] - mov r8d,DWORD[((OPENSSL_ia32cap_P+4))] - mov r10d,DWORD[((OPENSSL_ia32cap_P+8))] - test r8d,512 - jz NEAR $L$ialu - jmp NEAR _ssse3_shortcut - -ALIGN 16 -$L$ialu: - mov rax,rsp - push rbx - push rbp - push r12 - push r13 - push r14 - mov r8,rdi - sub rsp,72 - mov r9,rsi - and rsp,-64 - mov r10,rdx - mov QWORD[64+rsp],rax -$L$prologue: - - mov esi,DWORD[r8] - mov edi,DWORD[4+r8] - mov r11d,DWORD[8+r8] - mov r12d,DWORD[12+r8] - mov r13d,DWORD[16+r8] - jmp NEAR $L$loop - -ALIGN 16 -$L$loop: - mov edx,DWORD[r9] - bswap edx - mov ebp,DWORD[4+r9] - mov eax,r12d - mov DWORD[rsp],edx - mov ecx,esi - bswap ebp - xor eax,r11d - rol ecx,5 - and eax,edi - lea r13d,[1518500249+r13*1+rdx] - add r13d,ecx - xor eax,r12d - rol edi,30 - add r13d,eax - mov r14d,DWORD[8+r9] - mov eax,r11d - mov DWORD[4+rsp],ebp - mov ecx,r13d - bswap r14d - xor eax,edi - rol ecx,5 - and eax,esi - lea r12d,[1518500249+r12*1+rbp] - add r12d,ecx - xor eax,r11d - rol esi,30 - add r12d,eax - mov edx,DWORD[12+r9] - mov eax,edi - mov DWORD[8+rsp],r14d - mov ecx,r12d - bswap edx - xor eax,esi - rol ecx,5 - and eax,r13d - lea r11d,[1518500249+r11*1+r14] - add r11d,ecx - xor eax,edi - rol r13d,30 - add r11d,eax - mov ebp,DWORD[16+r9] - mov eax,esi - mov DWORD[12+rsp],edx - mov ecx,r11d - bswap ebp - xor eax,r13d - rol ecx,5 - and eax,r12d - lea edi,[1518500249+rdi*1+rdx] - add edi,ecx - xor eax,esi - rol r12d,30 - add edi,eax - mov r14d,DWORD[20+r9] - mov eax,r13d - mov DWORD[16+rsp],ebp - mov ecx,edi - bswap r14d - xor eax,r12d - rol ecx,5 - and eax,r11d - lea esi,[1518500249+rsi*1+rbp] - add esi,ecx - xor eax,r13d - rol r11d,30 - add esi,eax - mov edx,DWORD[24+r9] - mov eax,r12d - mov DWORD[20+rsp],r14d - mov ecx,esi - bswap edx - xor eax,r11d - rol ecx,5 - and eax,edi - lea r13d,[1518500249+r13*1+r14] - add r13d,ecx - xor eax,r12d - rol edi,30 - add r13d,eax - mov ebp,DWORD[28+r9] - mov eax,r11d - mov DWORD[24+rsp],edx - mov ecx,r13d - bswap ebp - xor eax,edi - rol ecx,5 - and eax,esi - lea r12d,[1518500249+r12*1+rdx] - add r12d,ecx - xor eax,r11d - rol esi,30 - add r12d,eax - mov r14d,DWORD[32+r9] - mov eax,edi - mov DWORD[28+rsp],ebp - mov ecx,r12d - bswap r14d - xor eax,esi - rol ecx,5 - and eax,r13d - lea r11d,[1518500249+r11*1+rbp] - add r11d,ecx - xor eax,edi - rol r13d,30 - add r11d,eax - mov edx,DWORD[36+r9] - mov eax,esi - mov DWORD[32+rsp],r14d - mov ecx,r11d - bswap edx - xor eax,r13d - rol ecx,5 - and eax,r12d - lea edi,[1518500249+rdi*1+r14] - add edi,ecx - xor eax,esi - rol r12d,30 - add edi,eax - mov ebp,DWORD[40+r9] - mov eax,r13d - mov DWORD[36+rsp],edx - mov ecx,edi - bswap ebp - xor eax,r12d - rol ecx,5 - and eax,r11d - lea esi,[1518500249+rsi*1+rdx] - add esi,ecx - xor eax,r13d - rol r11d,30 - add esi,eax - mov r14d,DWORD[44+r9] - mov eax,r12d - mov DWORD[40+rsp],ebp - mov ecx,esi - bswap r14d - xor eax,r11d - rol ecx,5 - and eax,edi - lea r13d,[1518500249+r13*1+rbp] - add r13d,ecx - xor eax,r12d - rol edi,30 - add r13d,eax - mov edx,DWORD[48+r9] - mov eax,r11d - mov DWORD[44+rsp],r14d - mov ecx,r13d - bswap edx - xor eax,edi - rol ecx,5 - and eax,esi - lea r12d,[1518500249+r12*1+r14] - add r12d,ecx - xor eax,r11d - rol esi,30 - add r12d,eax - mov ebp,DWORD[52+r9] - mov eax,edi - mov DWORD[48+rsp],edx - mov ecx,r12d - bswap ebp - xor eax,esi - rol ecx,5 - and eax,r13d - lea r11d,[1518500249+r11*1+rdx] - add r11d,ecx - xor eax,edi - rol r13d,30 - add r11d,eax - mov r14d,DWORD[56+r9] - mov eax,esi - mov DWORD[52+rsp],ebp - mov ecx,r11d - bswap r14d - xor eax,r13d - rol ecx,5 - and eax,r12d - lea edi,[1518500249+rdi*1+rbp] - add edi,ecx - xor eax,esi - rol r12d,30 - add edi,eax - mov edx,DWORD[60+r9] - mov eax,r13d - mov DWORD[56+rsp],r14d - mov ecx,edi - bswap edx - xor eax,r12d - rol ecx,5 - and eax,r11d - lea esi,[1518500249+rsi*1+r14] - add esi,ecx - xor eax,r13d - rol r11d,30 - add esi,eax - xor ebp,DWORD[rsp] - mov eax,r12d - mov DWORD[60+rsp],edx - mov ecx,esi - xor ebp,DWORD[8+rsp] - xor eax,r11d - rol ecx,5 - xor ebp,DWORD[32+rsp] - and eax,edi - lea r13d,[1518500249+r13*1+rdx] - rol edi,30 - xor eax,r12d - add r13d,ecx - rol ebp,1 - add r13d,eax - xor r14d,DWORD[4+rsp] - mov eax,r11d - mov DWORD[rsp],ebp - mov ecx,r13d - xor r14d,DWORD[12+rsp] - xor eax,edi - rol ecx,5 - xor r14d,DWORD[36+rsp] - and eax,esi - lea r12d,[1518500249+r12*1+rbp] - rol esi,30 - xor eax,r11d - add r12d,ecx - rol r14d,1 - add r12d,eax - xor edx,DWORD[8+rsp] - mov eax,edi - mov DWORD[4+rsp],r14d - mov ecx,r12d - xor edx,DWORD[16+rsp] - xor eax,esi - rol ecx,5 - xor edx,DWORD[40+rsp] - and eax,r13d - lea r11d,[1518500249+r11*1+r14] - rol r13d,30 - xor eax,edi - add r11d,ecx - rol edx,1 - add r11d,eax - xor ebp,DWORD[12+rsp] - mov eax,esi - mov DWORD[8+rsp],edx - mov ecx,r11d - xor ebp,DWORD[20+rsp] - xor eax,r13d - rol ecx,5 - xor ebp,DWORD[44+rsp] - and eax,r12d - lea edi,[1518500249+rdi*1+rdx] - rol r12d,30 - xor eax,esi - add edi,ecx - rol ebp,1 - add edi,eax - xor r14d,DWORD[16+rsp] - mov eax,r13d - mov DWORD[12+rsp],ebp - mov ecx,edi - xor r14d,DWORD[24+rsp] - xor eax,r12d - rol ecx,5 - xor r14d,DWORD[48+rsp] - and eax,r11d - lea esi,[1518500249+rsi*1+rbp] - rol r11d,30 - xor eax,r13d - add esi,ecx - rol r14d,1 - add esi,eax - xor edx,DWORD[20+rsp] - mov eax,edi - mov DWORD[16+rsp],r14d - mov ecx,esi - xor edx,DWORD[28+rsp] - xor eax,r12d - rol ecx,5 - xor edx,DWORD[52+rsp] - lea r13d,[1859775393+r13*1+r14] - xor eax,r11d - add r13d,ecx - rol edi,30 - add r13d,eax - rol edx,1 - xor ebp,DWORD[24+rsp] - mov eax,esi - mov DWORD[20+rsp],edx - mov ecx,r13d - xor ebp,DWORD[32+rsp] - xor eax,r11d - rol ecx,5 - xor ebp,DWORD[56+rsp] - lea r12d,[1859775393+r12*1+rdx] - xor eax,edi - add r12d,ecx - rol esi,30 - add r12d,eax - rol ebp,1 - xor r14d,DWORD[28+rsp] - mov eax,r13d - mov DWORD[24+rsp],ebp - mov ecx,r12d - xor r14d,DWORD[36+rsp] - xor eax,edi - rol ecx,5 - xor r14d,DWORD[60+rsp] - lea r11d,[1859775393+r11*1+rbp] - xor eax,esi - add r11d,ecx - rol r13d,30 - add r11d,eax - rol r14d,1 - xor edx,DWORD[32+rsp] - mov eax,r12d - mov DWORD[28+rsp],r14d - mov ecx,r11d - xor edx,DWORD[40+rsp] - xor eax,esi - rol ecx,5 - xor edx,DWORD[rsp] - lea edi,[1859775393+rdi*1+r14] - xor eax,r13d - add edi,ecx - rol r12d,30 - add edi,eax - rol edx,1 - xor ebp,DWORD[36+rsp] - mov eax,r11d - mov DWORD[32+rsp],edx - mov ecx,edi - xor ebp,DWORD[44+rsp] - xor eax,r13d - rol ecx,5 - xor ebp,DWORD[4+rsp] - lea esi,[1859775393+rsi*1+rdx] - xor eax,r12d - add esi,ecx - rol r11d,30 - add esi,eax - rol ebp,1 - xor r14d,DWORD[40+rsp] - mov eax,edi - mov DWORD[36+rsp],ebp - mov ecx,esi - xor r14d,DWORD[48+rsp] - xor eax,r12d - rol ecx,5 - xor r14d,DWORD[8+rsp] - lea r13d,[1859775393+r13*1+rbp] - xor eax,r11d - add r13d,ecx - rol edi,30 - add r13d,eax - rol r14d,1 - xor edx,DWORD[44+rsp] - mov eax,esi - mov DWORD[40+rsp],r14d - mov ecx,r13d - xor edx,DWORD[52+rsp] - xor eax,r11d - rol ecx,5 - xor edx,DWORD[12+rsp] - lea r12d,[1859775393+r12*1+r14] - xor eax,edi - add r12d,ecx - rol esi,30 - add r12d,eax - rol edx,1 - xor ebp,DWORD[48+rsp] - mov eax,r13d - mov DWORD[44+rsp],edx - mov ecx,r12d - xor ebp,DWORD[56+rsp] - xor eax,edi - rol ecx,5 - xor ebp,DWORD[16+rsp] - lea r11d,[1859775393+r11*1+rdx] - xor eax,esi - add r11d,ecx - rol r13d,30 - add r11d,eax - rol ebp,1 - xor r14d,DWORD[52+rsp] - mov eax,r12d - mov DWORD[48+rsp],ebp - mov ecx,r11d - xor r14d,DWORD[60+rsp] - xor eax,esi - rol ecx,5 - xor r14d,DWORD[20+rsp] - lea edi,[1859775393+rdi*1+rbp] - xor eax,r13d - add edi,ecx - rol r12d,30 - add edi,eax - rol r14d,1 - xor edx,DWORD[56+rsp] - mov eax,r11d - mov DWORD[52+rsp],r14d - mov ecx,edi - xor edx,DWORD[rsp] - xor eax,r13d - rol ecx,5 - xor edx,DWORD[24+rsp] - lea esi,[1859775393+rsi*1+r14] - xor eax,r12d - add esi,ecx - rol r11d,30 - add esi,eax - rol edx,1 - xor ebp,DWORD[60+rsp] - mov eax,edi - mov DWORD[56+rsp],edx - mov ecx,esi - xor ebp,DWORD[4+rsp] - xor eax,r12d - rol ecx,5 - xor ebp,DWORD[28+rsp] - lea r13d,[1859775393+r13*1+rdx] - xor eax,r11d - add r13d,ecx - rol edi,30 - add r13d,eax - rol ebp,1 - xor r14d,DWORD[rsp] - mov eax,esi - mov DWORD[60+rsp],ebp - mov ecx,r13d - xor r14d,DWORD[8+rsp] - xor eax,r11d - rol ecx,5 - xor r14d,DWORD[32+rsp] - lea r12d,[1859775393+r12*1+rbp] - xor eax,edi - add r12d,ecx - rol esi,30 - add r12d,eax - rol r14d,1 - xor edx,DWORD[4+rsp] - mov eax,r13d - mov DWORD[rsp],r14d - mov ecx,r12d - xor edx,DWORD[12+rsp] - xor eax,edi - rol ecx,5 - xor edx,DWORD[36+rsp] - lea r11d,[1859775393+r11*1+r14] - xor eax,esi - add r11d,ecx - rol r13d,30 - add r11d,eax - rol edx,1 - xor ebp,DWORD[8+rsp] - mov eax,r12d - mov DWORD[4+rsp],edx - mov ecx,r11d - xor ebp,DWORD[16+rsp] - xor eax,esi - rol ecx,5 - xor ebp,DWORD[40+rsp] - lea edi,[1859775393+rdi*1+rdx] - xor eax,r13d - add edi,ecx - rol r12d,30 - add edi,eax - rol ebp,1 - xor r14d,DWORD[12+rsp] - mov eax,r11d - mov DWORD[8+rsp],ebp - mov ecx,edi - xor r14d,DWORD[20+rsp] - xor eax,r13d - rol ecx,5 - xor r14d,DWORD[44+rsp] - lea esi,[1859775393+rsi*1+rbp] - xor eax,r12d - add esi,ecx - rol r11d,30 - add esi,eax - rol r14d,1 - xor edx,DWORD[16+rsp] - mov eax,edi - mov DWORD[12+rsp],r14d - mov ecx,esi - xor edx,DWORD[24+rsp] - xor eax,r12d - rol ecx,5 - xor edx,DWORD[48+rsp] - lea r13d,[1859775393+r13*1+r14] - xor eax,r11d - add r13d,ecx - rol edi,30 - add r13d,eax - rol edx,1 - xor ebp,DWORD[20+rsp] - mov eax,esi - mov DWORD[16+rsp],edx - mov ecx,r13d - xor ebp,DWORD[28+rsp] - xor eax,r11d - rol ecx,5 - xor ebp,DWORD[52+rsp] - lea r12d,[1859775393+r12*1+rdx] - xor eax,edi - add r12d,ecx - rol esi,30 - add r12d,eax - rol ebp,1 - xor r14d,DWORD[24+rsp] - mov eax,r13d - mov DWORD[20+rsp],ebp - mov ecx,r12d - xor r14d,DWORD[32+rsp] - xor eax,edi - rol ecx,5 - xor r14d,DWORD[56+rsp] - lea r11d,[1859775393+r11*1+rbp] - xor eax,esi - add r11d,ecx - rol r13d,30 - add r11d,eax - rol r14d,1 - xor edx,DWORD[28+rsp] - mov eax,r12d - mov DWORD[24+rsp],r14d - mov ecx,r11d - xor edx,DWORD[36+rsp] - xor eax,esi - rol ecx,5 - xor edx,DWORD[60+rsp] - lea edi,[1859775393+rdi*1+r14] - xor eax,r13d - add edi,ecx - rol r12d,30 - add edi,eax - rol edx,1 - xor ebp,DWORD[32+rsp] - mov eax,r11d - mov DWORD[28+rsp],edx - mov ecx,edi - xor ebp,DWORD[40+rsp] - xor eax,r13d - rol ecx,5 - xor ebp,DWORD[rsp] - lea esi,[1859775393+rsi*1+rdx] - xor eax,r12d - add esi,ecx - rol r11d,30 - add esi,eax - rol ebp,1 - xor r14d,DWORD[36+rsp] - mov eax,r12d - mov DWORD[32+rsp],ebp - mov ebx,r12d - xor r14d,DWORD[44+rsp] - and eax,r11d - mov ecx,esi - xor r14d,DWORD[4+rsp] - lea r13d,[((-1894007588))+r13*1+rbp] - xor ebx,r11d - rol ecx,5 - add r13d,eax - rol r14d,1 - and ebx,edi - add r13d,ecx - rol edi,30 - add r13d,ebx - xor edx,DWORD[40+rsp] - mov eax,r11d - mov DWORD[36+rsp],r14d - mov ebx,r11d - xor edx,DWORD[48+rsp] - and eax,edi - mov ecx,r13d - xor edx,DWORD[8+rsp] - lea r12d,[((-1894007588))+r12*1+r14] - xor ebx,edi - rol ecx,5 - add r12d,eax - rol edx,1 - and ebx,esi - add r12d,ecx - rol esi,30 - add r12d,ebx - xor ebp,DWORD[44+rsp] - mov eax,edi - mov DWORD[40+rsp],edx - mov ebx,edi - xor ebp,DWORD[52+rsp] - and eax,esi - mov ecx,r12d - xor ebp,DWORD[12+rsp] - lea r11d,[((-1894007588))+r11*1+rdx] - xor ebx,esi - rol ecx,5 - add r11d,eax - rol ebp,1 - and ebx,r13d - add r11d,ecx - rol r13d,30 - add r11d,ebx - xor r14d,DWORD[48+rsp] - mov eax,esi - mov DWORD[44+rsp],ebp - mov ebx,esi - xor r14d,DWORD[56+rsp] - and eax,r13d - mov ecx,r11d - xor r14d,DWORD[16+rsp] - lea edi,[((-1894007588))+rdi*1+rbp] - xor ebx,r13d - rol ecx,5 - add edi,eax - rol r14d,1 - and ebx,r12d - add edi,ecx - rol r12d,30 - add edi,ebx - xor edx,DWORD[52+rsp] - mov eax,r13d - mov DWORD[48+rsp],r14d - mov ebx,r13d - xor edx,DWORD[60+rsp] - and eax,r12d - mov ecx,edi - xor edx,DWORD[20+rsp] - lea esi,[((-1894007588))+rsi*1+r14] - xor ebx,r12d - rol ecx,5 - add esi,eax - rol edx,1 - and ebx,r11d - add esi,ecx - rol r11d,30 - add esi,ebx - xor ebp,DWORD[56+rsp] - mov eax,r12d - mov DWORD[52+rsp],edx - mov ebx,r12d - xor ebp,DWORD[rsp] - and eax,r11d - mov ecx,esi - xor ebp,DWORD[24+rsp] - lea r13d,[((-1894007588))+r13*1+rdx] - xor ebx,r11d - rol ecx,5 - add r13d,eax - rol ebp,1 - and ebx,edi - add r13d,ecx - rol edi,30 - add r13d,ebx - xor r14d,DWORD[60+rsp] - mov eax,r11d - mov DWORD[56+rsp],ebp - mov ebx,r11d - xor r14d,DWORD[4+rsp] - and eax,edi - mov ecx,r13d - xor r14d,DWORD[28+rsp] - lea r12d,[((-1894007588))+r12*1+rbp] - xor ebx,edi - rol ecx,5 - add r12d,eax - rol r14d,1 - and ebx,esi - add r12d,ecx - rol esi,30 - add r12d,ebx - xor edx,DWORD[rsp] - mov eax,edi - mov DWORD[60+rsp],r14d - mov ebx,edi - xor edx,DWORD[8+rsp] - and eax,esi - mov ecx,r12d - xor edx,DWORD[32+rsp] - lea r11d,[((-1894007588))+r11*1+r14] - xor ebx,esi - rol ecx,5 - add r11d,eax - rol edx,1 - and ebx,r13d - add r11d,ecx - rol r13d,30 - add r11d,ebx - xor ebp,DWORD[4+rsp] - mov eax,esi - mov DWORD[rsp],edx - mov ebx,esi - xor ebp,DWORD[12+rsp] - and eax,r13d - mov ecx,r11d - xor ebp,DWORD[36+rsp] - lea edi,[((-1894007588))+rdi*1+rdx] - xor ebx,r13d - rol ecx,5 - add edi,eax - rol ebp,1 - and ebx,r12d - add edi,ecx - rol r12d,30 - add edi,ebx - xor r14d,DWORD[8+rsp] - mov eax,r13d - mov DWORD[4+rsp],ebp - mov ebx,r13d - xor r14d,DWORD[16+rsp] - and eax,r12d - mov ecx,edi - xor r14d,DWORD[40+rsp] - lea esi,[((-1894007588))+rsi*1+rbp] - xor ebx,r12d - rol ecx,5 - add esi,eax - rol r14d,1 - and ebx,r11d - add esi,ecx - rol r11d,30 - add esi,ebx - xor edx,DWORD[12+rsp] - mov eax,r12d - mov DWORD[8+rsp],r14d - mov ebx,r12d - xor edx,DWORD[20+rsp] - and eax,r11d - mov ecx,esi - xor edx,DWORD[44+rsp] - lea r13d,[((-1894007588))+r13*1+r14] - xor ebx,r11d - rol ecx,5 - add r13d,eax - rol edx,1 - and ebx,edi - add r13d,ecx - rol edi,30 - add r13d,ebx - xor ebp,DWORD[16+rsp] - mov eax,r11d - mov DWORD[12+rsp],edx - mov ebx,r11d - xor ebp,DWORD[24+rsp] - and eax,edi - mov ecx,r13d - xor ebp,DWORD[48+rsp] - lea r12d,[((-1894007588))+r12*1+rdx] - xor ebx,edi - rol ecx,5 - add r12d,eax - rol ebp,1 - and ebx,esi - add r12d,ecx - rol esi,30 - add r12d,ebx - xor r14d,DWORD[20+rsp] - mov eax,edi - mov DWORD[16+rsp],ebp - mov ebx,edi - xor r14d,DWORD[28+rsp] - and eax,esi - mov ecx,r12d - xor r14d,DWORD[52+rsp] - lea r11d,[((-1894007588))+r11*1+rbp] - xor ebx,esi - rol ecx,5 - add r11d,eax - rol r14d,1 - and ebx,r13d - add r11d,ecx - rol r13d,30 - add r11d,ebx - xor edx,DWORD[24+rsp] - mov eax,esi - mov DWORD[20+rsp],r14d - mov ebx,esi - xor edx,DWORD[32+rsp] - and eax,r13d - mov ecx,r11d - xor edx,DWORD[56+rsp] - lea edi,[((-1894007588))+rdi*1+r14] - xor ebx,r13d - rol ecx,5 - add edi,eax - rol edx,1 - and ebx,r12d - add edi,ecx - rol r12d,30 - add edi,ebx - xor ebp,DWORD[28+rsp] - mov eax,r13d - mov DWORD[24+rsp],edx - mov ebx,r13d - xor ebp,DWORD[36+rsp] - and eax,r12d - mov ecx,edi - xor ebp,DWORD[60+rsp] - lea esi,[((-1894007588))+rsi*1+rdx] - xor ebx,r12d - rol ecx,5 - add esi,eax - rol ebp,1 - and ebx,r11d - add esi,ecx - rol r11d,30 - add esi,ebx - xor r14d,DWORD[32+rsp] - mov eax,r12d - mov DWORD[28+rsp],ebp - mov ebx,r12d - xor r14d,DWORD[40+rsp] - and eax,r11d - mov ecx,esi - xor r14d,DWORD[rsp] - lea r13d,[((-1894007588))+r13*1+rbp] - xor ebx,r11d - rol ecx,5 - add r13d,eax - rol r14d,1 - and ebx,edi - add r13d,ecx - rol edi,30 - add r13d,ebx - xor edx,DWORD[36+rsp] - mov eax,r11d - mov DWORD[32+rsp],r14d - mov ebx,r11d - xor edx,DWORD[44+rsp] - and eax,edi - mov ecx,r13d - xor edx,DWORD[4+rsp] - lea r12d,[((-1894007588))+r12*1+r14] - xor ebx,edi - rol ecx,5 - add r12d,eax - rol edx,1 - and ebx,esi - add r12d,ecx - rol esi,30 - add r12d,ebx - xor ebp,DWORD[40+rsp] - mov eax,edi - mov DWORD[36+rsp],edx - mov ebx,edi - xor ebp,DWORD[48+rsp] - and eax,esi - mov ecx,r12d - xor ebp,DWORD[8+rsp] - lea r11d,[((-1894007588))+r11*1+rdx] - xor ebx,esi - rol ecx,5 - add r11d,eax - rol ebp,1 - and ebx,r13d - add r11d,ecx - rol r13d,30 - add r11d,ebx - xor r14d,DWORD[44+rsp] - mov eax,esi - mov DWORD[40+rsp],ebp - mov ebx,esi - xor r14d,DWORD[52+rsp] - and eax,r13d - mov ecx,r11d - xor r14d,DWORD[12+rsp] - lea edi,[((-1894007588))+rdi*1+rbp] - xor ebx,r13d - rol ecx,5 - add edi,eax - rol r14d,1 - and ebx,r12d - add edi,ecx - rol r12d,30 - add edi,ebx - xor edx,DWORD[48+rsp] - mov eax,r13d - mov DWORD[44+rsp],r14d - mov ebx,r13d - xor edx,DWORD[56+rsp] - and eax,r12d - mov ecx,edi - xor edx,DWORD[16+rsp] - lea esi,[((-1894007588))+rsi*1+r14] - xor ebx,r12d - rol ecx,5 - add esi,eax - rol edx,1 - and ebx,r11d - add esi,ecx - rol r11d,30 - add esi,ebx - xor ebp,DWORD[52+rsp] - mov eax,edi - mov DWORD[48+rsp],edx - mov ecx,esi - xor ebp,DWORD[60+rsp] - xor eax,r12d - rol ecx,5 - xor ebp,DWORD[20+rsp] - lea r13d,[((-899497514))+r13*1+rdx] - xor eax,r11d - add r13d,ecx - rol edi,30 - add r13d,eax - rol ebp,1 - xor r14d,DWORD[56+rsp] - mov eax,esi - mov DWORD[52+rsp],ebp - mov ecx,r13d - xor r14d,DWORD[rsp] - xor eax,r11d - rol ecx,5 - xor r14d,DWORD[24+rsp] - lea r12d,[((-899497514))+r12*1+rbp] - xor eax,edi - add r12d,ecx - rol esi,30 - add r12d,eax - rol r14d,1 - xor edx,DWORD[60+rsp] - mov eax,r13d - mov DWORD[56+rsp],r14d - mov ecx,r12d - xor edx,DWORD[4+rsp] - xor eax,edi - rol ecx,5 - xor edx,DWORD[28+rsp] - lea r11d,[((-899497514))+r11*1+r14] - xor eax,esi - add r11d,ecx - rol r13d,30 - add r11d,eax - rol edx,1 - xor ebp,DWORD[rsp] - mov eax,r12d - mov DWORD[60+rsp],edx - mov ecx,r11d - xor ebp,DWORD[8+rsp] - xor eax,esi - rol ecx,5 - xor ebp,DWORD[32+rsp] - lea edi,[((-899497514))+rdi*1+rdx] - xor eax,r13d - add edi,ecx - rol r12d,30 - add edi,eax - rol ebp,1 - xor r14d,DWORD[4+rsp] - mov eax,r11d - mov DWORD[rsp],ebp - mov ecx,edi - xor r14d,DWORD[12+rsp] - xor eax,r13d - rol ecx,5 - xor r14d,DWORD[36+rsp] - lea esi,[((-899497514))+rsi*1+rbp] - xor eax,r12d - add esi,ecx - rol r11d,30 - add esi,eax - rol r14d,1 - xor edx,DWORD[8+rsp] - mov eax,edi - mov DWORD[4+rsp],r14d - mov ecx,esi - xor edx,DWORD[16+rsp] - xor eax,r12d - rol ecx,5 - xor edx,DWORD[40+rsp] - lea r13d,[((-899497514))+r13*1+r14] - xor eax,r11d - add r13d,ecx - rol edi,30 - add r13d,eax - rol edx,1 - xor ebp,DWORD[12+rsp] - mov eax,esi - mov DWORD[8+rsp],edx - mov ecx,r13d - xor ebp,DWORD[20+rsp] - xor eax,r11d - rol ecx,5 - xor ebp,DWORD[44+rsp] - lea r12d,[((-899497514))+r12*1+rdx] - xor eax,edi - add r12d,ecx - rol esi,30 - add r12d,eax - rol ebp,1 - xor r14d,DWORD[16+rsp] - mov eax,r13d - mov DWORD[12+rsp],ebp - mov ecx,r12d - xor r14d,DWORD[24+rsp] - xor eax,edi - rol ecx,5 - xor r14d,DWORD[48+rsp] - lea r11d,[((-899497514))+r11*1+rbp] - xor eax,esi - add r11d,ecx - rol r13d,30 - add r11d,eax - rol r14d,1 - xor edx,DWORD[20+rsp] - mov eax,r12d - mov DWORD[16+rsp],r14d - mov ecx,r11d - xor edx,DWORD[28+rsp] - xor eax,esi - rol ecx,5 - xor edx,DWORD[52+rsp] - lea edi,[((-899497514))+rdi*1+r14] - xor eax,r13d - add edi,ecx - rol r12d,30 - add edi,eax - rol edx,1 - xor ebp,DWORD[24+rsp] - mov eax,r11d - mov DWORD[20+rsp],edx - mov ecx,edi - xor ebp,DWORD[32+rsp] - xor eax,r13d - rol ecx,5 - xor ebp,DWORD[56+rsp] - lea esi,[((-899497514))+rsi*1+rdx] - xor eax,r12d - add esi,ecx - rol r11d,30 - add esi,eax - rol ebp,1 - xor r14d,DWORD[28+rsp] - mov eax,edi - mov DWORD[24+rsp],ebp - mov ecx,esi - xor r14d,DWORD[36+rsp] - xor eax,r12d - rol ecx,5 - xor r14d,DWORD[60+rsp] - lea r13d,[((-899497514))+r13*1+rbp] - xor eax,r11d - add r13d,ecx - rol edi,30 - add r13d,eax - rol r14d,1 - xor edx,DWORD[32+rsp] - mov eax,esi - mov DWORD[28+rsp],r14d - mov ecx,r13d - xor edx,DWORD[40+rsp] - xor eax,r11d - rol ecx,5 - xor edx,DWORD[rsp] - lea r12d,[((-899497514))+r12*1+r14] - xor eax,edi - add r12d,ecx - rol esi,30 - add r12d,eax - rol edx,1 - xor ebp,DWORD[36+rsp] - mov eax,r13d - - mov ecx,r12d - xor ebp,DWORD[44+rsp] - xor eax,edi - rol ecx,5 - xor ebp,DWORD[4+rsp] - lea r11d,[((-899497514))+r11*1+rdx] - xor eax,esi - add r11d,ecx - rol r13d,30 - add r11d,eax - rol ebp,1 - xor r14d,DWORD[40+rsp] - mov eax,r12d - - mov ecx,r11d - xor r14d,DWORD[48+rsp] - xor eax,esi - rol ecx,5 - xor r14d,DWORD[8+rsp] - lea edi,[((-899497514))+rdi*1+rbp] - xor eax,r13d - add edi,ecx - rol r12d,30 - add edi,eax - rol r14d,1 - xor edx,DWORD[44+rsp] - mov eax,r11d - - mov ecx,edi - xor edx,DWORD[52+rsp] - xor eax,r13d - rol ecx,5 - xor edx,DWORD[12+rsp] - lea esi,[((-899497514))+rsi*1+r14] - xor eax,r12d - add esi,ecx - rol r11d,30 - add esi,eax - rol edx,1 - xor ebp,DWORD[48+rsp] - mov eax,edi - - mov ecx,esi - xor ebp,DWORD[56+rsp] - xor eax,r12d - rol ecx,5 - xor ebp,DWORD[16+rsp] - lea r13d,[((-899497514))+r13*1+rdx] - xor eax,r11d - add r13d,ecx - rol edi,30 - add r13d,eax - rol ebp,1 - xor r14d,DWORD[52+rsp] - mov eax,esi - - mov ecx,r13d - xor r14d,DWORD[60+rsp] - xor eax,r11d - rol ecx,5 - xor r14d,DWORD[20+rsp] - lea r12d,[((-899497514))+r12*1+rbp] - xor eax,edi - add r12d,ecx - rol esi,30 - add r12d,eax - rol r14d,1 - xor edx,DWORD[56+rsp] - mov eax,r13d - - mov ecx,r12d - xor edx,DWORD[rsp] - xor eax,edi - rol ecx,5 - xor edx,DWORD[24+rsp] - lea r11d,[((-899497514))+r11*1+r14] - xor eax,esi - add r11d,ecx - rol r13d,30 - add r11d,eax - rol edx,1 - xor ebp,DWORD[60+rsp] - mov eax,r12d - - mov ecx,r11d - xor ebp,DWORD[4+rsp] - xor eax,esi - rol ecx,5 - xor ebp,DWORD[28+rsp] - lea edi,[((-899497514))+rdi*1+rdx] - xor eax,r13d - add edi,ecx - rol r12d,30 - add edi,eax - rol ebp,1 - mov eax,r11d - mov ecx,edi - xor eax,r13d - lea esi,[((-899497514))+rsi*1+rbp] - rol ecx,5 - xor eax,r12d - add esi,ecx - rol r11d,30 - add esi,eax - add esi,DWORD[r8] - add edi,DWORD[4+r8] - add r11d,DWORD[8+r8] - add r12d,DWORD[12+r8] - add r13d,DWORD[16+r8] - mov DWORD[r8],esi - mov DWORD[4+r8],edi - mov DWORD[8+r8],r11d - mov DWORD[12+r8],r12d - mov DWORD[16+r8],r13d - - sub r10,1 - lea r9,[64+r9] - jnz NEAR $L$loop - - mov rsi,QWORD[64+rsp] - mov r14,QWORD[((-40))+rsi] - mov r13,QWORD[((-32))+rsi] - mov r12,QWORD[((-24))+rsi] - mov rbp,QWORD[((-16))+rsi] - mov rbx,QWORD[((-8))+rsi] - lea rsp,[rsi] -$L$epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_sha1_block_data_order: - -ALIGN 16 -sha1_block_data_order_ssse3: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_sha1_block_data_order_ssse3: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - - -_ssse3_shortcut: - mov rax,rsp - push rbx - push rbp - push r12 - push r13 - push r14 - lea rsp,[((-160))+rsp] - movaps XMMWORD[(-40-96)+rax],xmm6 - movaps XMMWORD[(-40-80)+rax],xmm7 - movaps XMMWORD[(-40-64)+rax],xmm8 - movaps XMMWORD[(-40-48)+rax],xmm9 - movaps XMMWORD[(-40-32)+rax],xmm10 - movaps XMMWORD[(-40-16)+rax],xmm11 -$L$prologue_ssse3: - mov r14,rax - and rsp,-64 - mov r8,rdi - mov r9,rsi - mov r10,rdx - - shl r10,6 - add r10,r9 - lea r11,[((K_XX_XX+64))] - - mov eax,DWORD[r8] - mov ebx,DWORD[4+r8] - mov ecx,DWORD[8+r8] - mov edx,DWORD[12+r8] - mov esi,ebx - mov ebp,DWORD[16+r8] - mov edi,ecx - xor edi,edx - and esi,edi - - movdqa xmm6,XMMWORD[64+r11] - movdqa xmm9,XMMWORD[((-64))+r11] - movdqu xmm0,XMMWORD[r9] - movdqu xmm1,XMMWORD[16+r9] - movdqu xmm2,XMMWORD[32+r9] - movdqu xmm3,XMMWORD[48+r9] -DB 102,15,56,0,198 -DB 102,15,56,0,206 -DB 102,15,56,0,214 - add r9,64 - paddd xmm0,xmm9 -DB 102,15,56,0,222 - paddd xmm1,xmm9 - paddd xmm2,xmm9 - movdqa XMMWORD[rsp],xmm0 - psubd xmm0,xmm9 - movdqa XMMWORD[16+rsp],xmm1 - psubd xmm1,xmm9 - movdqa XMMWORD[32+rsp],xmm2 - psubd xmm2,xmm9 - jmp NEAR $L$oop_ssse3 -ALIGN 16 -$L$oop_ssse3: - ror ebx,2 - pshufd xmm4,xmm0,238 - xor esi,edx - movdqa xmm8,xmm3 - paddd xmm9,xmm3 - mov edi,eax - add ebp,DWORD[rsp] - punpcklqdq xmm4,xmm1 - xor ebx,ecx - rol eax,5 - add ebp,esi - psrldq xmm8,4 - and edi,ebx - xor ebx,ecx - pxor xmm4,xmm0 - add ebp,eax - ror eax,7 - pxor xmm8,xmm2 - xor edi,ecx - mov esi,ebp - add edx,DWORD[4+rsp] - pxor xmm4,xmm8 - xor eax,ebx - rol ebp,5 - movdqa XMMWORD[48+rsp],xmm9 - add edx,edi - and esi,eax - movdqa xmm10,xmm4 - xor eax,ebx - add edx,ebp - ror ebp,7 - movdqa xmm8,xmm4 - xor esi,ebx - pslldq xmm10,12 - paddd xmm4,xmm4 - mov edi,edx - add ecx,DWORD[8+rsp] - psrld xmm8,31 - xor ebp,eax - rol edx,5 - add ecx,esi - movdqa xmm9,xmm10 - and edi,ebp - xor ebp,eax - psrld xmm10,30 - add ecx,edx - ror edx,7 - por xmm4,xmm8 - xor edi,eax - mov esi,ecx - add ebx,DWORD[12+rsp] - pslld xmm9,2 - pxor xmm4,xmm10 - xor edx,ebp - movdqa xmm10,XMMWORD[((-64))+r11] - rol ecx,5 - add ebx,edi - and esi,edx - pxor xmm4,xmm9 - xor edx,ebp - add ebx,ecx - ror ecx,7 - pshufd xmm5,xmm1,238 - xor esi,ebp - movdqa xmm9,xmm4 - paddd xmm10,xmm4 - mov edi,ebx - add eax,DWORD[16+rsp] - punpcklqdq xmm5,xmm2 - xor ecx,edx - rol ebx,5 - add eax,esi - psrldq xmm9,4 - and edi,ecx - xor ecx,edx - pxor xmm5,xmm1 - add eax,ebx - ror ebx,7 - pxor xmm9,xmm3 - xor edi,edx - mov esi,eax - add ebp,DWORD[20+rsp] - pxor xmm5,xmm9 - xor ebx,ecx - rol eax,5 - movdqa XMMWORD[rsp],xmm10 - add ebp,edi - and esi,ebx - movdqa xmm8,xmm5 - xor ebx,ecx - add ebp,eax - ror eax,7 - movdqa xmm9,xmm5 - xor esi,ecx - pslldq xmm8,12 - paddd xmm5,xmm5 - mov edi,ebp - add edx,DWORD[24+rsp] - psrld xmm9,31 - xor eax,ebx - rol ebp,5 - add edx,esi - movdqa xmm10,xmm8 - and edi,eax - xor eax,ebx - psrld xmm8,30 - add edx,ebp - ror ebp,7 - por xmm5,xmm9 - xor edi,ebx - mov esi,edx - add ecx,DWORD[28+rsp] - pslld xmm10,2 - pxor xmm5,xmm8 - xor ebp,eax - movdqa xmm8,XMMWORD[((-32))+r11] - rol edx,5 - add ecx,edi - and esi,ebp - pxor xmm5,xmm10 - xor ebp,eax - add ecx,edx - ror edx,7 - pshufd xmm6,xmm2,238 - xor esi,eax - movdqa xmm10,xmm5 - paddd xmm8,xmm5 - mov edi,ecx - add ebx,DWORD[32+rsp] - punpcklqdq xmm6,xmm3 - xor edx,ebp - rol ecx,5 - add ebx,esi - psrldq xmm10,4 - and edi,edx - xor edx,ebp - pxor xmm6,xmm2 - add ebx,ecx - ror ecx,7 - pxor xmm10,xmm4 - xor edi,ebp - mov esi,ebx - add eax,DWORD[36+rsp] - pxor xmm6,xmm10 - xor ecx,edx - rol ebx,5 - movdqa XMMWORD[16+rsp],xmm8 - add eax,edi - and esi,ecx - movdqa xmm9,xmm6 - xor ecx,edx - add eax,ebx - ror ebx,7 - movdqa xmm10,xmm6 - xor esi,edx - pslldq xmm9,12 - paddd xmm6,xmm6 - mov edi,eax - add ebp,DWORD[40+rsp] - psrld xmm10,31 - xor ebx,ecx - rol eax,5 - add ebp,esi - movdqa xmm8,xmm9 - and edi,ebx - xor ebx,ecx - psrld xmm9,30 - add ebp,eax - ror eax,7 - por xmm6,xmm10 - xor edi,ecx - mov esi,ebp - add edx,DWORD[44+rsp] - pslld xmm8,2 - pxor xmm6,xmm9 - xor eax,ebx - movdqa xmm9,XMMWORD[((-32))+r11] - rol ebp,5 - add edx,edi - and esi,eax - pxor xmm6,xmm8 - xor eax,ebx - add edx,ebp - ror ebp,7 - pshufd xmm7,xmm3,238 - xor esi,ebx - movdqa xmm8,xmm6 - paddd xmm9,xmm6 - mov edi,edx - add ecx,DWORD[48+rsp] - punpcklqdq xmm7,xmm4 - xor ebp,eax - rol edx,5 - add ecx,esi - psrldq xmm8,4 - and edi,ebp - xor ebp,eax - pxor xmm7,xmm3 - add ecx,edx - ror edx,7 - pxor xmm8,xmm5 - xor edi,eax - mov esi,ecx - add ebx,DWORD[52+rsp] - pxor xmm7,xmm8 - xor edx,ebp - rol ecx,5 - movdqa XMMWORD[32+rsp],xmm9 - add ebx,edi - and esi,edx - movdqa xmm10,xmm7 - xor edx,ebp - add ebx,ecx - ror ecx,7 - movdqa xmm8,xmm7 - xor esi,ebp - pslldq xmm10,12 - paddd xmm7,xmm7 - mov edi,ebx - add eax,DWORD[56+rsp] - psrld xmm8,31 - xor ecx,edx - rol ebx,5 - add eax,esi - movdqa xmm9,xmm10 - and edi,ecx - xor ecx,edx - psrld xmm10,30 - add eax,ebx - ror ebx,7 - por xmm7,xmm8 - xor edi,edx - mov esi,eax - add ebp,DWORD[60+rsp] - pslld xmm9,2 - pxor xmm7,xmm10 - xor ebx,ecx - movdqa xmm10,XMMWORD[((-32))+r11] - rol eax,5 - add ebp,edi - and esi,ebx - pxor xmm7,xmm9 - pshufd xmm9,xmm6,238 - xor ebx,ecx - add ebp,eax - ror eax,7 - pxor xmm0,xmm4 - xor esi,ecx - mov edi,ebp - add edx,DWORD[rsp] - punpcklqdq xmm9,xmm7 - xor eax,ebx - rol ebp,5 - pxor xmm0,xmm1 - add edx,esi - and edi,eax - movdqa xmm8,xmm10 - xor eax,ebx - paddd xmm10,xmm7 - add edx,ebp - pxor xmm0,xmm9 - ror ebp,7 - xor edi,ebx - mov esi,edx - add ecx,DWORD[4+rsp] - movdqa xmm9,xmm0 - xor ebp,eax - rol edx,5 - movdqa XMMWORD[48+rsp],xmm10 - add ecx,edi - and esi,ebp - xor ebp,eax - pslld xmm0,2 - add ecx,edx - ror edx,7 - psrld xmm9,30 - xor esi,eax - mov edi,ecx - add ebx,DWORD[8+rsp] - por xmm0,xmm9 - xor edx,ebp - rol ecx,5 - pshufd xmm10,xmm7,238 - add ebx,esi - and edi,edx - xor edx,ebp - add ebx,ecx - add eax,DWORD[12+rsp] - xor edi,ebp - mov esi,ebx - rol ebx,5 - add eax,edi - xor esi,edx - ror ecx,7 - add eax,ebx - pxor xmm1,xmm5 - add ebp,DWORD[16+rsp] - xor esi,ecx - punpcklqdq xmm10,xmm0 - mov edi,eax - rol eax,5 - pxor xmm1,xmm2 - add ebp,esi - xor edi,ecx - movdqa xmm9,xmm8 - ror ebx,7 - paddd xmm8,xmm0 - add ebp,eax - pxor xmm1,xmm10 - add edx,DWORD[20+rsp] - xor edi,ebx - mov esi,ebp - rol ebp,5 - movdqa xmm10,xmm1 - add edx,edi - xor esi,ebx - movdqa XMMWORD[rsp],xmm8 - ror eax,7 - add edx,ebp - add ecx,DWORD[24+rsp] - pslld xmm1,2 - xor esi,eax - mov edi,edx - psrld xmm10,30 - rol edx,5 - add ecx,esi - xor edi,eax - ror ebp,7 - por xmm1,xmm10 - add ecx,edx - add ebx,DWORD[28+rsp] - pshufd xmm8,xmm0,238 - xor edi,ebp - mov esi,ecx - rol ecx,5 - add ebx,edi - xor esi,ebp - ror edx,7 - add ebx,ecx - pxor xmm2,xmm6 - add eax,DWORD[32+rsp] - xor esi,edx - punpcklqdq xmm8,xmm1 - mov edi,ebx - rol ebx,5 - pxor xmm2,xmm3 - add eax,esi - xor edi,edx - movdqa xmm10,XMMWORD[r11] - ror ecx,7 - paddd xmm9,xmm1 - add eax,ebx - pxor xmm2,xmm8 - add ebp,DWORD[36+rsp] - xor edi,ecx - mov esi,eax - rol eax,5 - movdqa xmm8,xmm2 - add ebp,edi - xor esi,ecx - movdqa XMMWORD[16+rsp],xmm9 - ror ebx,7 - add ebp,eax - add edx,DWORD[40+rsp] - pslld xmm2,2 - xor esi,ebx - mov edi,ebp - psrld xmm8,30 - rol ebp,5 - add edx,esi - xor edi,ebx - ror eax,7 - por xmm2,xmm8 - add edx,ebp - add ecx,DWORD[44+rsp] - pshufd xmm9,xmm1,238 - xor edi,eax - mov esi,edx - rol edx,5 - add ecx,edi - xor esi,eax - ror ebp,7 - add ecx,edx - pxor xmm3,xmm7 - add ebx,DWORD[48+rsp] - xor esi,ebp - punpcklqdq xmm9,xmm2 - mov edi,ecx - rol ecx,5 - pxor xmm3,xmm4 - add ebx,esi - xor edi,ebp - movdqa xmm8,xmm10 - ror edx,7 - paddd xmm10,xmm2 - add ebx,ecx - pxor xmm3,xmm9 - add eax,DWORD[52+rsp] - xor edi,edx - mov esi,ebx - rol ebx,5 - movdqa xmm9,xmm3 - add eax,edi - xor esi,edx - movdqa XMMWORD[32+rsp],xmm10 - ror ecx,7 - add eax,ebx - add ebp,DWORD[56+rsp] - pslld xmm3,2 - xor esi,ecx - mov edi,eax - psrld xmm9,30 - rol eax,5 - add ebp,esi - xor edi,ecx - ror ebx,7 - por xmm3,xmm9 - add ebp,eax - add edx,DWORD[60+rsp] - pshufd xmm10,xmm2,238 - xor edi,ebx - mov esi,ebp - rol ebp,5 - add edx,edi - xor esi,ebx - ror eax,7 - add edx,ebp - pxor xmm4,xmm0 - add ecx,DWORD[rsp] - xor esi,eax - punpcklqdq xmm10,xmm3 - mov edi,edx - rol edx,5 - pxor xmm4,xmm5 - add ecx,esi - xor edi,eax - movdqa xmm9,xmm8 - ror ebp,7 - paddd xmm8,xmm3 - add ecx,edx - pxor xmm4,xmm10 - add ebx,DWORD[4+rsp] - xor edi,ebp - mov esi,ecx - rol ecx,5 - movdqa xmm10,xmm4 - add ebx,edi - xor esi,ebp - movdqa XMMWORD[48+rsp],xmm8 - ror edx,7 - add ebx,ecx - add eax,DWORD[8+rsp] - pslld xmm4,2 - xor esi,edx - mov edi,ebx - psrld xmm10,30 - rol ebx,5 - add eax,esi - xor edi,edx - ror ecx,7 - por xmm4,xmm10 - add eax,ebx - add ebp,DWORD[12+rsp] - pshufd xmm8,xmm3,238 - xor edi,ecx - mov esi,eax - rol eax,5 - add ebp,edi - xor esi,ecx - ror ebx,7 - add ebp,eax - pxor xmm5,xmm1 - add edx,DWORD[16+rsp] - xor esi,ebx - punpcklqdq xmm8,xmm4 - mov edi,ebp - rol ebp,5 - pxor xmm5,xmm6 - add edx,esi - xor edi,ebx - movdqa xmm10,xmm9 - ror eax,7 - paddd xmm9,xmm4 - add edx,ebp - pxor xmm5,xmm8 - add ecx,DWORD[20+rsp] - xor edi,eax - mov esi,edx - rol edx,5 - movdqa xmm8,xmm5 - add ecx,edi - xor esi,eax - movdqa XMMWORD[rsp],xmm9 - ror ebp,7 - add ecx,edx - add ebx,DWORD[24+rsp] - pslld xmm5,2 - xor esi,ebp - mov edi,ecx - psrld xmm8,30 - rol ecx,5 - add ebx,esi - xor edi,ebp - ror edx,7 - por xmm5,xmm8 - add ebx,ecx - add eax,DWORD[28+rsp] - pshufd xmm9,xmm4,238 - ror ecx,7 - mov esi,ebx - xor edi,edx - rol ebx,5 - add eax,edi - xor esi,ecx - xor ecx,edx - add eax,ebx - pxor xmm6,xmm2 - add ebp,DWORD[32+rsp] - and esi,ecx - xor ecx,edx - ror ebx,7 - punpcklqdq xmm9,xmm5 - mov edi,eax - xor esi,ecx - pxor xmm6,xmm7 - rol eax,5 - add ebp,esi - movdqa xmm8,xmm10 - xor edi,ebx - paddd xmm10,xmm5 - xor ebx,ecx - pxor xmm6,xmm9 - add ebp,eax - add edx,DWORD[36+rsp] - and edi,ebx - xor ebx,ecx - ror eax,7 - movdqa xmm9,xmm6 - mov esi,ebp - xor edi,ebx - movdqa XMMWORD[16+rsp],xmm10 - rol ebp,5 - add edx,edi - xor esi,eax - pslld xmm6,2 - xor eax,ebx - add edx,ebp - psrld xmm9,30 - add ecx,DWORD[40+rsp] - and esi,eax - xor eax,ebx - por xmm6,xmm9 - ror ebp,7 - mov edi,edx - xor esi,eax - rol edx,5 - pshufd xmm10,xmm5,238 - add ecx,esi - xor edi,ebp - xor ebp,eax - add ecx,edx - add ebx,DWORD[44+rsp] - and edi,ebp - xor ebp,eax - ror edx,7 - mov esi,ecx - xor edi,ebp - rol ecx,5 - add ebx,edi - xor esi,edx - xor edx,ebp - add ebx,ecx - pxor xmm7,xmm3 - add eax,DWORD[48+rsp] - and esi,edx - xor edx,ebp - ror ecx,7 - punpcklqdq xmm10,xmm6 - mov edi,ebx - xor esi,edx - pxor xmm7,xmm0 - rol ebx,5 - add eax,esi - movdqa xmm9,XMMWORD[32+r11] - xor edi,ecx - paddd xmm8,xmm6 - xor ecx,edx - pxor xmm7,xmm10 - add eax,ebx - add ebp,DWORD[52+rsp] - and edi,ecx - xor ecx,edx - ror ebx,7 - movdqa xmm10,xmm7 - mov esi,eax - xor edi,ecx - movdqa XMMWORD[32+rsp],xmm8 - rol eax,5 - add ebp,edi - xor esi,ebx - pslld xmm7,2 - xor ebx,ecx - add ebp,eax - psrld xmm10,30 - add edx,DWORD[56+rsp] - and esi,ebx - xor ebx,ecx - por xmm7,xmm10 - ror eax,7 - mov edi,ebp - xor esi,ebx - rol ebp,5 - pshufd xmm8,xmm6,238 - add edx,esi - xor edi,eax - xor eax,ebx - add edx,ebp - add ecx,DWORD[60+rsp] - and edi,eax - xor eax,ebx - ror ebp,7 - mov esi,edx - xor edi,eax - rol edx,5 - add ecx,edi - xor esi,ebp - xor ebp,eax - add ecx,edx - pxor xmm0,xmm4 - add ebx,DWORD[rsp] - and esi,ebp - xor ebp,eax - ror edx,7 - punpcklqdq xmm8,xmm7 - mov edi,ecx - xor esi,ebp - pxor xmm0,xmm1 - rol ecx,5 - add ebx,esi - movdqa xmm10,xmm9 - xor edi,edx - paddd xmm9,xmm7 - xor edx,ebp - pxor xmm0,xmm8 - add ebx,ecx - add eax,DWORD[4+rsp] - and edi,edx - xor edx,ebp - ror ecx,7 - movdqa xmm8,xmm0 - mov esi,ebx - xor edi,edx - movdqa XMMWORD[48+rsp],xmm9 - rol ebx,5 - add eax,edi - xor esi,ecx - pslld xmm0,2 - xor ecx,edx - add eax,ebx - psrld xmm8,30 - add ebp,DWORD[8+rsp] - and esi,ecx - xor ecx,edx - por xmm0,xmm8 - ror ebx,7 - mov edi,eax - xor esi,ecx - rol eax,5 - pshufd xmm9,xmm7,238 - add ebp,esi - xor edi,ebx - xor ebx,ecx - add ebp,eax - add edx,DWORD[12+rsp] - and edi,ebx - xor ebx,ecx - ror eax,7 - mov esi,ebp - xor edi,ebx - rol ebp,5 - add edx,edi - xor esi,eax - xor eax,ebx - add edx,ebp - pxor xmm1,xmm5 - add ecx,DWORD[16+rsp] - and esi,eax - xor eax,ebx - ror ebp,7 - punpcklqdq xmm9,xmm0 - mov edi,edx - xor esi,eax - pxor xmm1,xmm2 - rol edx,5 - add ecx,esi - movdqa xmm8,xmm10 - xor edi,ebp - paddd xmm10,xmm0 - xor ebp,eax - pxor xmm1,xmm9 - add ecx,edx - add ebx,DWORD[20+rsp] - and edi,ebp - xor ebp,eax - ror edx,7 - movdqa xmm9,xmm1 - mov esi,ecx - xor edi,ebp - movdqa XMMWORD[rsp],xmm10 - rol ecx,5 - add ebx,edi - xor esi,edx - pslld xmm1,2 - xor edx,ebp - add ebx,ecx - psrld xmm9,30 - add eax,DWORD[24+rsp] - and esi,edx - xor edx,ebp - por xmm1,xmm9 - ror ecx,7 - mov edi,ebx - xor esi,edx - rol ebx,5 - pshufd xmm10,xmm0,238 - add eax,esi - xor edi,ecx - xor ecx,edx - add eax,ebx - add ebp,DWORD[28+rsp] - and edi,ecx - xor ecx,edx - ror ebx,7 - mov esi,eax - xor edi,ecx - rol eax,5 - add ebp,edi - xor esi,ebx - xor ebx,ecx - add ebp,eax - pxor xmm2,xmm6 - add edx,DWORD[32+rsp] - and esi,ebx - xor ebx,ecx - ror eax,7 - punpcklqdq xmm10,xmm1 - mov edi,ebp - xor esi,ebx - pxor xmm2,xmm3 - rol ebp,5 - add edx,esi - movdqa xmm9,xmm8 - xor edi,eax - paddd xmm8,xmm1 - xor eax,ebx - pxor xmm2,xmm10 - add edx,ebp - add ecx,DWORD[36+rsp] - and edi,eax - xor eax,ebx - ror ebp,7 - movdqa xmm10,xmm2 - mov esi,edx - xor edi,eax - movdqa XMMWORD[16+rsp],xmm8 - rol edx,5 - add ecx,edi - xor esi,ebp - pslld xmm2,2 - xor ebp,eax - add ecx,edx - psrld xmm10,30 - add ebx,DWORD[40+rsp] - and esi,ebp - xor ebp,eax - por xmm2,xmm10 - ror edx,7 - mov edi,ecx - xor esi,ebp - rol ecx,5 - pshufd xmm8,xmm1,238 - add ebx,esi - xor edi,edx - xor edx,ebp - add ebx,ecx - add eax,DWORD[44+rsp] - and edi,edx - xor edx,ebp - ror ecx,7 - mov esi,ebx - xor edi,edx - rol ebx,5 - add eax,edi - xor esi,edx - add eax,ebx - pxor xmm3,xmm7 - add ebp,DWORD[48+rsp] - xor esi,ecx - punpcklqdq xmm8,xmm2 - mov edi,eax - rol eax,5 - pxor xmm3,xmm4 - add ebp,esi - xor edi,ecx - movdqa xmm10,xmm9 - ror ebx,7 - paddd xmm9,xmm2 - add ebp,eax - pxor xmm3,xmm8 - add edx,DWORD[52+rsp] - xor edi,ebx - mov esi,ebp - rol ebp,5 - movdqa xmm8,xmm3 - add edx,edi - xor esi,ebx - movdqa XMMWORD[32+rsp],xmm9 - ror eax,7 - add edx,ebp - add ecx,DWORD[56+rsp] - pslld xmm3,2 - xor esi,eax - mov edi,edx - psrld xmm8,30 - rol edx,5 - add ecx,esi - xor edi,eax - ror ebp,7 - por xmm3,xmm8 - add ecx,edx - add ebx,DWORD[60+rsp] - xor edi,ebp - mov esi,ecx - rol ecx,5 - add ebx,edi - xor esi,ebp - ror edx,7 - add ebx,ecx - add eax,DWORD[rsp] - xor esi,edx - mov edi,ebx - rol ebx,5 - paddd xmm10,xmm3 - add eax,esi - xor edi,edx - movdqa XMMWORD[48+rsp],xmm10 - ror ecx,7 - add eax,ebx - add ebp,DWORD[4+rsp] - xor edi,ecx - mov esi,eax - rol eax,5 - add ebp,edi - xor esi,ecx - ror ebx,7 - add ebp,eax - add edx,DWORD[8+rsp] - xor esi,ebx - mov edi,ebp - rol ebp,5 - add edx,esi - xor edi,ebx - ror eax,7 - add edx,ebp - add ecx,DWORD[12+rsp] - xor edi,eax - mov esi,edx - rol edx,5 - add ecx,edi - xor esi,eax - ror ebp,7 - add ecx,edx - cmp r9,r10 - je NEAR $L$done_ssse3 - movdqa xmm6,XMMWORD[64+r11] - movdqa xmm9,XMMWORD[((-64))+r11] - movdqu xmm0,XMMWORD[r9] - movdqu xmm1,XMMWORD[16+r9] - movdqu xmm2,XMMWORD[32+r9] - movdqu xmm3,XMMWORD[48+r9] -DB 102,15,56,0,198 - add r9,64 - add ebx,DWORD[16+rsp] - xor esi,ebp - mov edi,ecx -DB 102,15,56,0,206 - rol ecx,5 - add ebx,esi - xor edi,ebp - ror edx,7 - paddd xmm0,xmm9 - add ebx,ecx - add eax,DWORD[20+rsp] - xor edi,edx - mov esi,ebx - movdqa XMMWORD[rsp],xmm0 - rol ebx,5 - add eax,edi - xor esi,edx - ror ecx,7 - psubd xmm0,xmm9 - add eax,ebx - add ebp,DWORD[24+rsp] - xor esi,ecx - mov edi,eax - rol eax,5 - add ebp,esi - xor edi,ecx - ror ebx,7 - add ebp,eax - add edx,DWORD[28+rsp] - xor edi,ebx - mov esi,ebp - rol ebp,5 - add edx,edi - xor esi,ebx - ror eax,7 - add edx,ebp - add ecx,DWORD[32+rsp] - xor esi,eax - mov edi,edx -DB 102,15,56,0,214 - rol edx,5 - add ecx,esi - xor edi,eax - ror ebp,7 - paddd xmm1,xmm9 - add ecx,edx - add ebx,DWORD[36+rsp] - xor edi,ebp - mov esi,ecx - movdqa XMMWORD[16+rsp],xmm1 - rol ecx,5 - add ebx,edi - xor esi,ebp - ror edx,7 - psubd xmm1,xmm9 - add ebx,ecx - add eax,DWORD[40+rsp] - xor esi,edx - mov edi,ebx - rol ebx,5 - add eax,esi - xor edi,edx - ror ecx,7 - add eax,ebx - add ebp,DWORD[44+rsp] - xor edi,ecx - mov esi,eax - rol eax,5 - add ebp,edi - xor esi,ecx - ror ebx,7 - add ebp,eax - add edx,DWORD[48+rsp] - xor esi,ebx - mov edi,ebp -DB 102,15,56,0,222 - rol ebp,5 - add edx,esi - xor edi,ebx - ror eax,7 - paddd xmm2,xmm9 - add edx,ebp - add ecx,DWORD[52+rsp] - xor edi,eax - mov esi,edx - movdqa XMMWORD[32+rsp],xmm2 - rol edx,5 - add ecx,edi - xor esi,eax - ror ebp,7 - psubd xmm2,xmm9 - add ecx,edx - add ebx,DWORD[56+rsp] - xor esi,ebp - mov edi,ecx - rol ecx,5 - add ebx,esi - xor edi,ebp - ror edx,7 - add ebx,ecx - add eax,DWORD[60+rsp] - xor edi,edx - mov esi,ebx - rol ebx,5 - add eax,edi - ror ecx,7 - add eax,ebx - add eax,DWORD[r8] - add esi,DWORD[4+r8] - add ecx,DWORD[8+r8] - add edx,DWORD[12+r8] - mov DWORD[r8],eax - add ebp,DWORD[16+r8] - mov DWORD[4+r8],esi - mov ebx,esi - mov DWORD[8+r8],ecx - mov edi,ecx - mov DWORD[12+r8],edx - xor edi,edx - mov DWORD[16+r8],ebp - and esi,edi - jmp NEAR $L$oop_ssse3 - -ALIGN 16 -$L$done_ssse3: - add ebx,DWORD[16+rsp] - xor esi,ebp - mov edi,ecx - rol ecx,5 - add ebx,esi - xor edi,ebp - ror edx,7 - add ebx,ecx - add eax,DWORD[20+rsp] - xor edi,edx - mov esi,ebx - rol ebx,5 - add eax,edi - xor esi,edx - ror ecx,7 - add eax,ebx - add ebp,DWORD[24+rsp] - xor esi,ecx - mov edi,eax - rol eax,5 - add ebp,esi - xor edi,ecx - ror ebx,7 - add ebp,eax - add edx,DWORD[28+rsp] - xor edi,ebx - mov esi,ebp - rol ebp,5 - add edx,edi - xor esi,ebx - ror eax,7 - add edx,ebp - add ecx,DWORD[32+rsp] - xor esi,eax - mov edi,edx - rol edx,5 - add ecx,esi - xor edi,eax - ror ebp,7 - add ecx,edx - add ebx,DWORD[36+rsp] - xor edi,ebp - mov esi,ecx - rol ecx,5 - add ebx,edi - xor esi,ebp - ror edx,7 - add ebx,ecx - add eax,DWORD[40+rsp] - xor esi,edx - mov edi,ebx - rol ebx,5 - add eax,esi - xor edi,edx - ror ecx,7 - add eax,ebx - add ebp,DWORD[44+rsp] - xor edi,ecx - mov esi,eax - rol eax,5 - add ebp,edi - xor esi,ecx - ror ebx,7 - add ebp,eax - add edx,DWORD[48+rsp] - xor esi,ebx - mov edi,ebp - rol ebp,5 - add edx,esi - xor edi,ebx - ror eax,7 - add edx,ebp - add ecx,DWORD[52+rsp] - xor edi,eax - mov esi,edx - rol edx,5 - add ecx,edi - xor esi,eax - ror ebp,7 - add ecx,edx - add ebx,DWORD[56+rsp] - xor esi,ebp - mov edi,ecx - rol ecx,5 - add ebx,esi - xor edi,ebp - ror edx,7 - add ebx,ecx - add eax,DWORD[60+rsp] - xor edi,edx - mov esi,ebx - rol ebx,5 - add eax,edi - ror ecx,7 - add eax,ebx - add eax,DWORD[r8] - add esi,DWORD[4+r8] - add ecx,DWORD[8+r8] - mov DWORD[r8],eax - add edx,DWORD[12+r8] - mov DWORD[4+r8],esi - add ebp,DWORD[16+r8] - mov DWORD[8+r8],ecx - mov DWORD[12+r8],edx - mov DWORD[16+r8],ebp - movaps xmm6,XMMWORD[((-40-96))+r14] - movaps xmm7,XMMWORD[((-40-80))+r14] - movaps xmm8,XMMWORD[((-40-64))+r14] - movaps xmm9,XMMWORD[((-40-48))+r14] - movaps xmm10,XMMWORD[((-40-32))+r14] - movaps xmm11,XMMWORD[((-40-16))+r14] - lea rsi,[r14] - mov r14,QWORD[((-40))+rsi] - mov r13,QWORD[((-32))+rsi] - mov r12,QWORD[((-24))+rsi] - mov rbp,QWORD[((-16))+rsi] - mov rbx,QWORD[((-8))+rsi] - lea rsp,[rsi] -$L$epilogue_ssse3: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_sha1_block_data_order_ssse3: -ALIGN 64 -K_XX_XX: - DD 0x5a827999,0x5a827999,0x5a827999,0x5a827999 - DD 0x5a827999,0x5a827999,0x5a827999,0x5a827999 - DD 0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1 - DD 0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1 - DD 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc - DD 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc - DD 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6 - DD 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6 - DD 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f - DD 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f -DB 0xf,0xe,0xd,0xc,0xb,0xa,0x9,0x8,0x7,0x6,0x5,0x4,0x3,0x2,0x1,0x0 -DB 83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115 -DB 102,111,114,109,32,102,111,114,32,120,56,54,95,54,52,44 -DB 32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60 -DB 97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114 -DB 103,62,0 -ALIGN 64 -EXTERN __imp_RtlVirtualUnwind - -ALIGN 16 -se_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - lea r10,[$L$prologue] - cmp rbx,r10 - jb NEAR $L$common_seh_tail - - mov rax,QWORD[152+r8] - - lea r10,[$L$epilogue] - cmp rbx,r10 - jae NEAR $L$common_seh_tail - - mov rax,QWORD[64+rax] - - mov rbx,QWORD[((-8))+rax] - mov rbp,QWORD[((-16))+rax] - mov r12,QWORD[((-24))+rax] - mov r13,QWORD[((-32))+rax] - mov r14,QWORD[((-40))+rax] - mov QWORD[144+r8],rbx - mov QWORD[160+r8],rbp - mov QWORD[216+r8],r12 - mov QWORD[224+r8],r13 - mov QWORD[232+r8],r14 - - jmp NEAR $L$common_seh_tail - - -ALIGN 16 -ssse3_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - mov rsi,QWORD[8+r9] - mov r11,QWORD[56+r9] - - mov r10d,DWORD[r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jb NEAR $L$common_seh_tail - - mov rax,QWORD[152+r8] - - mov r10d,DWORD[4+r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jae NEAR $L$common_seh_tail - - mov rax,QWORD[232+r8] - - lea rsi,[((-40-96))+rax] - lea rdi,[512+r8] - mov ecx,12 - DD 0xa548f3fc - - mov rbx,QWORD[((-8))+rax] - mov rbp,QWORD[((-16))+rax] - mov r12,QWORD[((-24))+rax] - mov r13,QWORD[((-32))+rax] - mov r14,QWORD[((-40))+rax] - mov QWORD[144+r8],rbx - mov QWORD[160+r8],rbp - mov QWORD[216+r8],r12 - mov QWORD[224+r8],r13 - mov QWORD[232+r8],r14 - -$L$common_seh_tail: - mov rdi,QWORD[8+rax] - mov rsi,QWORD[16+rax] - mov QWORD[152+r8],rax - mov QWORD[168+r8],rsi - mov QWORD[176+r8],rdi - - mov rdi,QWORD[40+r9] - mov rsi,r8 - mov ecx,154 - DD 0xa548f3fc - - mov rsi,r9 - xor rcx,rcx - mov rdx,QWORD[8+rsi] - mov r8,QWORD[rsi] - mov r9,QWORD[16+rsi] - mov r10,QWORD[40+rsi] - lea r11,[56+rsi] - lea r12,[24+rsi] - mov QWORD[32+rsp],r10 - mov QWORD[40+rsp],r11 - mov QWORD[48+rsp],r12 - mov QWORD[56+rsp],rcx - call QWORD[__imp_RtlVirtualUnwind] - - mov eax,1 - add rsp,64 - popfq - pop r15 - pop r14 - pop r13 - pop r12 - pop rbp - pop rbx - pop rdi - pop rsi - DB 0F3h,0C3h ;repret - - -section .pdata rdata align=4 -ALIGN 4 - DD $L$SEH_begin_sha1_block_data_order wrt ..imagebase - DD $L$SEH_end_sha1_block_data_order wrt ..imagebase - DD $L$SEH_info_sha1_block_data_order wrt ..imagebase - DD $L$SEH_begin_sha1_block_data_order_ssse3 wrt ..imagebase - DD $L$SEH_end_sha1_block_data_order_ssse3 wrt ..imagebase - DD $L$SEH_info_sha1_block_data_order_ssse3 wrt ..imagebase -section .xdata rdata align=8 -ALIGN 8 -$L$SEH_info_sha1_block_data_order: -DB 9,0,0,0 - DD se_handler wrt ..imagebase -$L$SEH_info_sha1_block_data_order_ssse3: -DB 9,0,0,0 - DD ssse3_handler wrt ..imagebase - DD $L$prologue_ssse3 wrt ..imagebase,$L$epilogue_ssse3 wrt ..imagebase diff --git a/third_party/boringssl/win-x86_64/crypto/sha/sha256-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/sha/sha256-x86_64.asm deleted file mode 100644 index e6193c5b9d754..0000000000000 --- a/third_party/boringssl/win-x86_64/crypto/sha/sha256-x86_64.asm +++ /dev/null @@ -1,2994 +0,0 @@ -default rel -%define XMMWORD -%define YMMWORD -%define ZMMWORD -section .text code align=64 - - -EXTERN OPENSSL_ia32cap_P -global sha256_block_data_order - -ALIGN 16 -sha256_block_data_order: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_sha256_block_data_order: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - - - lea r11,[OPENSSL_ia32cap_P] - mov r9d,DWORD[r11] - mov r10d,DWORD[4+r11] - mov r11d,DWORD[8+r11] - test r10d,512 - jnz NEAR $L$ssse3_shortcut - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - mov r11,rsp - shl rdx,4 - sub rsp,16*4+4*8 - lea rdx,[rdx*4+rsi] - and rsp,-64 - mov QWORD[((64+0))+rsp],rdi - mov QWORD[((64+8))+rsp],rsi - mov QWORD[((64+16))+rsp],rdx - mov QWORD[((64+24))+rsp],r11 -$L$prologue: - - mov eax,DWORD[rdi] - mov ebx,DWORD[4+rdi] - mov ecx,DWORD[8+rdi] - mov edx,DWORD[12+rdi] - mov r8d,DWORD[16+rdi] - mov r9d,DWORD[20+rdi] - mov r10d,DWORD[24+rdi] - mov r11d,DWORD[28+rdi] - jmp NEAR $L$loop - -ALIGN 16 -$L$loop: - mov edi,ebx - lea rbp,[K256] - xor edi,ecx - mov r12d,DWORD[rsi] - mov r13d,r8d - mov r14d,eax - bswap r12d - ror r13d,14 - mov r15d,r9d - - xor r13d,r8d - ror r14d,9 - xor r15d,r10d - - mov DWORD[rsp],r12d - xor r14d,eax - and r15d,r8d - - ror r13d,5 - add r12d,r11d - xor r15d,r10d - - ror r14d,11 - xor r13d,r8d - add r12d,r15d - - mov r15d,eax - add r12d,DWORD[rbp] - xor r14d,eax - - xor r15d,ebx - ror r13d,6 - mov r11d,ebx - - and edi,r15d - ror r14d,2 - add r12d,r13d - - xor r11d,edi - add edx,r12d - add r11d,r12d - - lea rbp,[4+rbp] - add r11d,r14d - mov r12d,DWORD[4+rsi] - mov r13d,edx - mov r14d,r11d - bswap r12d - ror r13d,14 - mov edi,r8d - - xor r13d,edx - ror r14d,9 - xor edi,r9d - - mov DWORD[4+rsp],r12d - xor r14d,r11d - and edi,edx - - ror r13d,5 - add r12d,r10d - xor edi,r9d - - ror r14d,11 - xor r13d,edx - add r12d,edi - - mov edi,r11d - add r12d,DWORD[rbp] - xor r14d,r11d - - xor edi,eax - ror r13d,6 - mov r10d,eax - - and r15d,edi - ror r14d,2 - add r12d,r13d - - xor r10d,r15d - add ecx,r12d - add r10d,r12d - - lea rbp,[4+rbp] - add r10d,r14d - mov r12d,DWORD[8+rsi] - mov r13d,ecx - mov r14d,r10d - bswap r12d - ror r13d,14 - mov r15d,edx - - xor r13d,ecx - ror r14d,9 - xor r15d,r8d - - mov DWORD[8+rsp],r12d - xor r14d,r10d - and r15d,ecx - - ror r13d,5 - add r12d,r9d - xor r15d,r8d - - ror r14d,11 - xor r13d,ecx - add r12d,r15d - - mov r15d,r10d - add r12d,DWORD[rbp] - xor r14d,r10d - - xor r15d,r11d - ror r13d,6 - mov r9d,r11d - - and edi,r15d - ror r14d,2 - add r12d,r13d - - xor r9d,edi - add ebx,r12d - add r9d,r12d - - lea rbp,[4+rbp] - add r9d,r14d - mov r12d,DWORD[12+rsi] - mov r13d,ebx - mov r14d,r9d - bswap r12d - ror r13d,14 - mov edi,ecx - - xor r13d,ebx - ror r14d,9 - xor edi,edx - - mov DWORD[12+rsp],r12d - xor r14d,r9d - and edi,ebx - - ror r13d,5 - add r12d,r8d - xor edi,edx - - ror r14d,11 - xor r13d,ebx - add r12d,edi - - mov edi,r9d - add r12d,DWORD[rbp] - xor r14d,r9d - - xor edi,r10d - ror r13d,6 - mov r8d,r10d - - and r15d,edi - ror r14d,2 - add r12d,r13d - - xor r8d,r15d - add eax,r12d - add r8d,r12d - - lea rbp,[20+rbp] - add r8d,r14d - mov r12d,DWORD[16+rsi] - mov r13d,eax - mov r14d,r8d - bswap r12d - ror r13d,14 - mov r15d,ebx - - xor r13d,eax - ror r14d,9 - xor r15d,ecx - - mov DWORD[16+rsp],r12d - xor r14d,r8d - and r15d,eax - - ror r13d,5 - add r12d,edx - xor r15d,ecx - - ror r14d,11 - xor r13d,eax - add r12d,r15d - - mov r15d,r8d - add r12d,DWORD[rbp] - xor r14d,r8d - - xor r15d,r9d - ror r13d,6 - mov edx,r9d - - and edi,r15d - ror r14d,2 - add r12d,r13d - - xor edx,edi - add r11d,r12d - add edx,r12d - - lea rbp,[4+rbp] - add edx,r14d - mov r12d,DWORD[20+rsi] - mov r13d,r11d - mov r14d,edx - bswap r12d - ror r13d,14 - mov edi,eax - - xor r13d,r11d - ror r14d,9 - xor edi,ebx - - mov DWORD[20+rsp],r12d - xor r14d,edx - and edi,r11d - - ror r13d,5 - add r12d,ecx - xor edi,ebx - - ror r14d,11 - xor r13d,r11d - add r12d,edi - - mov edi,edx - add r12d,DWORD[rbp] - xor r14d,edx - - xor edi,r8d - ror r13d,6 - mov ecx,r8d - - and r15d,edi - ror r14d,2 - add r12d,r13d - - xor ecx,r15d - add r10d,r12d - add ecx,r12d - - lea rbp,[4+rbp] - add ecx,r14d - mov r12d,DWORD[24+rsi] - mov r13d,r10d - mov r14d,ecx - bswap r12d - ror r13d,14 - mov r15d,r11d - - xor r13d,r10d - ror r14d,9 - xor r15d,eax - - mov DWORD[24+rsp],r12d - xor r14d,ecx - and r15d,r10d - - ror r13d,5 - add r12d,ebx - xor r15d,eax - - ror r14d,11 - xor r13d,r10d - add r12d,r15d - - mov r15d,ecx - add r12d,DWORD[rbp] - xor r14d,ecx - - xor r15d,edx - ror r13d,6 - mov ebx,edx - - and edi,r15d - ror r14d,2 - add r12d,r13d - - xor ebx,edi - add r9d,r12d - add ebx,r12d - - lea rbp,[4+rbp] - add ebx,r14d - mov r12d,DWORD[28+rsi] - mov r13d,r9d - mov r14d,ebx - bswap r12d - ror r13d,14 - mov edi,r10d - - xor r13d,r9d - ror r14d,9 - xor edi,r11d - - mov DWORD[28+rsp],r12d - xor r14d,ebx - and edi,r9d - - ror r13d,5 - add r12d,eax - xor edi,r11d - - ror r14d,11 - xor r13d,r9d - add r12d,edi - - mov edi,ebx - add r12d,DWORD[rbp] - xor r14d,ebx - - xor edi,ecx - ror r13d,6 - mov eax,ecx - - and r15d,edi - ror r14d,2 - add r12d,r13d - - xor eax,r15d - add r8d,r12d - add eax,r12d - - lea rbp,[20+rbp] - add eax,r14d - mov r12d,DWORD[32+rsi] - mov r13d,r8d - mov r14d,eax - bswap r12d - ror r13d,14 - mov r15d,r9d - - xor r13d,r8d - ror r14d,9 - xor r15d,r10d - - mov DWORD[32+rsp],r12d - xor r14d,eax - and r15d,r8d - - ror r13d,5 - add r12d,r11d - xor r15d,r10d - - ror r14d,11 - xor r13d,r8d - add r12d,r15d - - mov r15d,eax - add r12d,DWORD[rbp] - xor r14d,eax - - xor r15d,ebx - ror r13d,6 - mov r11d,ebx - - and edi,r15d - ror r14d,2 - add r12d,r13d - - xor r11d,edi - add edx,r12d - add r11d,r12d - - lea rbp,[4+rbp] - add r11d,r14d - mov r12d,DWORD[36+rsi] - mov r13d,edx - mov r14d,r11d - bswap r12d - ror r13d,14 - mov edi,r8d - - xor r13d,edx - ror r14d,9 - xor edi,r9d - - mov DWORD[36+rsp],r12d - xor r14d,r11d - and edi,edx - - ror r13d,5 - add r12d,r10d - xor edi,r9d - - ror r14d,11 - xor r13d,edx - add r12d,edi - - mov edi,r11d - add r12d,DWORD[rbp] - xor r14d,r11d - - xor edi,eax - ror r13d,6 - mov r10d,eax - - and r15d,edi - ror r14d,2 - add r12d,r13d - - xor r10d,r15d - add ecx,r12d - add r10d,r12d - - lea rbp,[4+rbp] - add r10d,r14d - mov r12d,DWORD[40+rsi] - mov r13d,ecx - mov r14d,r10d - bswap r12d - ror r13d,14 - mov r15d,edx - - xor r13d,ecx - ror r14d,9 - xor r15d,r8d - - mov DWORD[40+rsp],r12d - xor r14d,r10d - and r15d,ecx - - ror r13d,5 - add r12d,r9d - xor r15d,r8d - - ror r14d,11 - xor r13d,ecx - add r12d,r15d - - mov r15d,r10d - add r12d,DWORD[rbp] - xor r14d,r10d - - xor r15d,r11d - ror r13d,6 - mov r9d,r11d - - and edi,r15d - ror r14d,2 - add r12d,r13d - - xor r9d,edi - add ebx,r12d - add r9d,r12d - - lea rbp,[4+rbp] - add r9d,r14d - mov r12d,DWORD[44+rsi] - mov r13d,ebx - mov r14d,r9d - bswap r12d - ror r13d,14 - mov edi,ecx - - xor r13d,ebx - ror r14d,9 - xor edi,edx - - mov DWORD[44+rsp],r12d - xor r14d,r9d - and edi,ebx - - ror r13d,5 - add r12d,r8d - xor edi,edx - - ror r14d,11 - xor r13d,ebx - add r12d,edi - - mov edi,r9d - add r12d,DWORD[rbp] - xor r14d,r9d - - xor edi,r10d - ror r13d,6 - mov r8d,r10d - - and r15d,edi - ror r14d,2 - add r12d,r13d - - xor r8d,r15d - add eax,r12d - add r8d,r12d - - lea rbp,[20+rbp] - add r8d,r14d - mov r12d,DWORD[48+rsi] - mov r13d,eax - mov r14d,r8d - bswap r12d - ror r13d,14 - mov r15d,ebx - - xor r13d,eax - ror r14d,9 - xor r15d,ecx - - mov DWORD[48+rsp],r12d - xor r14d,r8d - and r15d,eax - - ror r13d,5 - add r12d,edx - xor r15d,ecx - - ror r14d,11 - xor r13d,eax - add r12d,r15d - - mov r15d,r8d - add r12d,DWORD[rbp] - xor r14d,r8d - - xor r15d,r9d - ror r13d,6 - mov edx,r9d - - and edi,r15d - ror r14d,2 - add r12d,r13d - - xor edx,edi - add r11d,r12d - add edx,r12d - - lea rbp,[4+rbp] - add edx,r14d - mov r12d,DWORD[52+rsi] - mov r13d,r11d - mov r14d,edx - bswap r12d - ror r13d,14 - mov edi,eax - - xor r13d,r11d - ror r14d,9 - xor edi,ebx - - mov DWORD[52+rsp],r12d - xor r14d,edx - and edi,r11d - - ror r13d,5 - add r12d,ecx - xor edi,ebx - - ror r14d,11 - xor r13d,r11d - add r12d,edi - - mov edi,edx - add r12d,DWORD[rbp] - xor r14d,edx - - xor edi,r8d - ror r13d,6 - mov ecx,r8d - - and r15d,edi - ror r14d,2 - add r12d,r13d - - xor ecx,r15d - add r10d,r12d - add ecx,r12d - - lea rbp,[4+rbp] - add ecx,r14d - mov r12d,DWORD[56+rsi] - mov r13d,r10d - mov r14d,ecx - bswap r12d - ror r13d,14 - mov r15d,r11d - - xor r13d,r10d - ror r14d,9 - xor r15d,eax - - mov DWORD[56+rsp],r12d - xor r14d,ecx - and r15d,r10d - - ror r13d,5 - add r12d,ebx - xor r15d,eax - - ror r14d,11 - xor r13d,r10d - add r12d,r15d - - mov r15d,ecx - add r12d,DWORD[rbp] - xor r14d,ecx - - xor r15d,edx - ror r13d,6 - mov ebx,edx - - and edi,r15d - ror r14d,2 - add r12d,r13d - - xor ebx,edi - add r9d,r12d - add ebx,r12d - - lea rbp,[4+rbp] - add ebx,r14d - mov r12d,DWORD[60+rsi] - mov r13d,r9d - mov r14d,ebx - bswap r12d - ror r13d,14 - mov edi,r10d - - xor r13d,r9d - ror r14d,9 - xor edi,r11d - - mov DWORD[60+rsp],r12d - xor r14d,ebx - and edi,r9d - - ror r13d,5 - add r12d,eax - xor edi,r11d - - ror r14d,11 - xor r13d,r9d - add r12d,edi - - mov edi,ebx - add r12d,DWORD[rbp] - xor r14d,ebx - - xor edi,ecx - ror r13d,6 - mov eax,ecx - - and r15d,edi - ror r14d,2 - add r12d,r13d - - xor eax,r15d - add r8d,r12d - add eax,r12d - - lea rbp,[20+rbp] - jmp NEAR $L$rounds_16_xx -ALIGN 16 -$L$rounds_16_xx: - mov r13d,DWORD[4+rsp] - mov r15d,DWORD[56+rsp] - - mov r12d,r13d - ror r13d,11 - add eax,r14d - mov r14d,r15d - ror r15d,2 - - xor r13d,r12d - shr r12d,3 - ror r13d,7 - xor r15d,r14d - shr r14d,10 - - ror r15d,17 - xor r12d,r13d - xor r15d,r14d - add r12d,DWORD[36+rsp] - - add r12d,DWORD[rsp] - mov r13d,r8d - add r12d,r15d - mov r14d,eax - ror r13d,14 - mov r15d,r9d - - xor r13d,r8d - ror r14d,9 - xor r15d,r10d - - mov DWORD[rsp],r12d - xor r14d,eax - and r15d,r8d - - ror r13d,5 - add r12d,r11d - xor r15d,r10d - - ror r14d,11 - xor r13d,r8d - add r12d,r15d - - mov r15d,eax - add r12d,DWORD[rbp] - xor r14d,eax - - xor r15d,ebx - ror r13d,6 - mov r11d,ebx - - and edi,r15d - ror r14d,2 - add r12d,r13d - - xor r11d,edi - add edx,r12d - add r11d,r12d - - lea rbp,[4+rbp] - mov r13d,DWORD[8+rsp] - mov edi,DWORD[60+rsp] - - mov r12d,r13d - ror r13d,11 - add r11d,r14d - mov r14d,edi - ror edi,2 - - xor r13d,r12d - shr r12d,3 - ror r13d,7 - xor edi,r14d - shr r14d,10 - - ror edi,17 - xor r12d,r13d - xor edi,r14d - add r12d,DWORD[40+rsp] - - add r12d,DWORD[4+rsp] - mov r13d,edx - add r12d,edi - mov r14d,r11d - ror r13d,14 - mov edi,r8d - - xor r13d,edx - ror r14d,9 - xor edi,r9d - - mov DWORD[4+rsp],r12d - xor r14d,r11d - and edi,edx - - ror r13d,5 - add r12d,r10d - xor edi,r9d - - ror r14d,11 - xor r13d,edx - add r12d,edi - - mov edi,r11d - add r12d,DWORD[rbp] - xor r14d,r11d - - xor edi,eax - ror r13d,6 - mov r10d,eax - - and r15d,edi - ror r14d,2 - add r12d,r13d - - xor r10d,r15d - add ecx,r12d - add r10d,r12d - - lea rbp,[4+rbp] - mov r13d,DWORD[12+rsp] - mov r15d,DWORD[rsp] - - mov r12d,r13d - ror r13d,11 - add r10d,r14d - mov r14d,r15d - ror r15d,2 - - xor r13d,r12d - shr r12d,3 - ror r13d,7 - xor r15d,r14d - shr r14d,10 - - ror r15d,17 - xor r12d,r13d - xor r15d,r14d - add r12d,DWORD[44+rsp] - - add r12d,DWORD[8+rsp] - mov r13d,ecx - add r12d,r15d - mov r14d,r10d - ror r13d,14 - mov r15d,edx - - xor r13d,ecx - ror r14d,9 - xor r15d,r8d - - mov DWORD[8+rsp],r12d - xor r14d,r10d - and r15d,ecx - - ror r13d,5 - add r12d,r9d - xor r15d,r8d - - ror r14d,11 - xor r13d,ecx - add r12d,r15d - - mov r15d,r10d - add r12d,DWORD[rbp] - xor r14d,r10d - - xor r15d,r11d - ror r13d,6 - mov r9d,r11d - - and edi,r15d - ror r14d,2 - add r12d,r13d - - xor r9d,edi - add ebx,r12d - add r9d,r12d - - lea rbp,[4+rbp] - mov r13d,DWORD[16+rsp] - mov edi,DWORD[4+rsp] - - mov r12d,r13d - ror r13d,11 - add r9d,r14d - mov r14d,edi - ror edi,2 - - xor r13d,r12d - shr r12d,3 - ror r13d,7 - xor edi,r14d - shr r14d,10 - - ror edi,17 - xor r12d,r13d - xor edi,r14d - add r12d,DWORD[48+rsp] - - add r12d,DWORD[12+rsp] - mov r13d,ebx - add r12d,edi - mov r14d,r9d - ror r13d,14 - mov edi,ecx - - xor r13d,ebx - ror r14d,9 - xor edi,edx - - mov DWORD[12+rsp],r12d - xor r14d,r9d - and edi,ebx - - ror r13d,5 - add r12d,r8d - xor edi,edx - - ror r14d,11 - xor r13d,ebx - add r12d,edi - - mov edi,r9d - add r12d,DWORD[rbp] - xor r14d,r9d - - xor edi,r10d - ror r13d,6 - mov r8d,r10d - - and r15d,edi - ror r14d,2 - add r12d,r13d - - xor r8d,r15d - add eax,r12d - add r8d,r12d - - lea rbp,[20+rbp] - mov r13d,DWORD[20+rsp] - mov r15d,DWORD[8+rsp] - - mov r12d,r13d - ror r13d,11 - add r8d,r14d - mov r14d,r15d - ror r15d,2 - - xor r13d,r12d - shr r12d,3 - ror r13d,7 - xor r15d,r14d - shr r14d,10 - - ror r15d,17 - xor r12d,r13d - xor r15d,r14d - add r12d,DWORD[52+rsp] - - add r12d,DWORD[16+rsp] - mov r13d,eax - add r12d,r15d - mov r14d,r8d - ror r13d,14 - mov r15d,ebx - - xor r13d,eax - ror r14d,9 - xor r15d,ecx - - mov DWORD[16+rsp],r12d - xor r14d,r8d - and r15d,eax - - ror r13d,5 - add r12d,edx - xor r15d,ecx - - ror r14d,11 - xor r13d,eax - add r12d,r15d - - mov r15d,r8d - add r12d,DWORD[rbp] - xor r14d,r8d - - xor r15d,r9d - ror r13d,6 - mov edx,r9d - - and edi,r15d - ror r14d,2 - add r12d,r13d - - xor edx,edi - add r11d,r12d - add edx,r12d - - lea rbp,[4+rbp] - mov r13d,DWORD[24+rsp] - mov edi,DWORD[12+rsp] - - mov r12d,r13d - ror r13d,11 - add edx,r14d - mov r14d,edi - ror edi,2 - - xor r13d,r12d - shr r12d,3 - ror r13d,7 - xor edi,r14d - shr r14d,10 - - ror edi,17 - xor r12d,r13d - xor edi,r14d - add r12d,DWORD[56+rsp] - - add r12d,DWORD[20+rsp] - mov r13d,r11d - add r12d,edi - mov r14d,edx - ror r13d,14 - mov edi,eax - - xor r13d,r11d - ror r14d,9 - xor edi,ebx - - mov DWORD[20+rsp],r12d - xor r14d,edx - and edi,r11d - - ror r13d,5 - add r12d,ecx - xor edi,ebx - - ror r14d,11 - xor r13d,r11d - add r12d,edi - - mov edi,edx - add r12d,DWORD[rbp] - xor r14d,edx - - xor edi,r8d - ror r13d,6 - mov ecx,r8d - - and r15d,edi - ror r14d,2 - add r12d,r13d - - xor ecx,r15d - add r10d,r12d - add ecx,r12d - - lea rbp,[4+rbp] - mov r13d,DWORD[28+rsp] - mov r15d,DWORD[16+rsp] - - mov r12d,r13d - ror r13d,11 - add ecx,r14d - mov r14d,r15d - ror r15d,2 - - xor r13d,r12d - shr r12d,3 - ror r13d,7 - xor r15d,r14d - shr r14d,10 - - ror r15d,17 - xor r12d,r13d - xor r15d,r14d - add r12d,DWORD[60+rsp] - - add r12d,DWORD[24+rsp] - mov r13d,r10d - add r12d,r15d - mov r14d,ecx - ror r13d,14 - mov r15d,r11d - - xor r13d,r10d - ror r14d,9 - xor r15d,eax - - mov DWORD[24+rsp],r12d - xor r14d,ecx - and r15d,r10d - - ror r13d,5 - add r12d,ebx - xor r15d,eax - - ror r14d,11 - xor r13d,r10d - add r12d,r15d - - mov r15d,ecx - add r12d,DWORD[rbp] - xor r14d,ecx - - xor r15d,edx - ror r13d,6 - mov ebx,edx - - and edi,r15d - ror r14d,2 - add r12d,r13d - - xor ebx,edi - add r9d,r12d - add ebx,r12d - - lea rbp,[4+rbp] - mov r13d,DWORD[32+rsp] - mov edi,DWORD[20+rsp] - - mov r12d,r13d - ror r13d,11 - add ebx,r14d - mov r14d,edi - ror edi,2 - - xor r13d,r12d - shr r12d,3 - ror r13d,7 - xor edi,r14d - shr r14d,10 - - ror edi,17 - xor r12d,r13d - xor edi,r14d - add r12d,DWORD[rsp] - - add r12d,DWORD[28+rsp] - mov r13d,r9d - add r12d,edi - mov r14d,ebx - ror r13d,14 - mov edi,r10d - - xor r13d,r9d - ror r14d,9 - xor edi,r11d - - mov DWORD[28+rsp],r12d - xor r14d,ebx - and edi,r9d - - ror r13d,5 - add r12d,eax - xor edi,r11d - - ror r14d,11 - xor r13d,r9d - add r12d,edi - - mov edi,ebx - add r12d,DWORD[rbp] - xor r14d,ebx - - xor edi,ecx - ror r13d,6 - mov eax,ecx - - and r15d,edi - ror r14d,2 - add r12d,r13d - - xor eax,r15d - add r8d,r12d - add eax,r12d - - lea rbp,[20+rbp] - mov r13d,DWORD[36+rsp] - mov r15d,DWORD[24+rsp] - - mov r12d,r13d - ror r13d,11 - add eax,r14d - mov r14d,r15d - ror r15d,2 - - xor r13d,r12d - shr r12d,3 - ror r13d,7 - xor r15d,r14d - shr r14d,10 - - ror r15d,17 - xor r12d,r13d - xor r15d,r14d - add r12d,DWORD[4+rsp] - - add r12d,DWORD[32+rsp] - mov r13d,r8d - add r12d,r15d - mov r14d,eax - ror r13d,14 - mov r15d,r9d - - xor r13d,r8d - ror r14d,9 - xor r15d,r10d - - mov DWORD[32+rsp],r12d - xor r14d,eax - and r15d,r8d - - ror r13d,5 - add r12d,r11d - xor r15d,r10d - - ror r14d,11 - xor r13d,r8d - add r12d,r15d - - mov r15d,eax - add r12d,DWORD[rbp] - xor r14d,eax - - xor r15d,ebx - ror r13d,6 - mov r11d,ebx - - and edi,r15d - ror r14d,2 - add r12d,r13d - - xor r11d,edi - add edx,r12d - add r11d,r12d - - lea rbp,[4+rbp] - mov r13d,DWORD[40+rsp] - mov edi,DWORD[28+rsp] - - mov r12d,r13d - ror r13d,11 - add r11d,r14d - mov r14d,edi - ror edi,2 - - xor r13d,r12d - shr r12d,3 - ror r13d,7 - xor edi,r14d - shr r14d,10 - - ror edi,17 - xor r12d,r13d - xor edi,r14d - add r12d,DWORD[8+rsp] - - add r12d,DWORD[36+rsp] - mov r13d,edx - add r12d,edi - mov r14d,r11d - ror r13d,14 - mov edi,r8d - - xor r13d,edx - ror r14d,9 - xor edi,r9d - - mov DWORD[36+rsp],r12d - xor r14d,r11d - and edi,edx - - ror r13d,5 - add r12d,r10d - xor edi,r9d - - ror r14d,11 - xor r13d,edx - add r12d,edi - - mov edi,r11d - add r12d,DWORD[rbp] - xor r14d,r11d - - xor edi,eax - ror r13d,6 - mov r10d,eax - - and r15d,edi - ror r14d,2 - add r12d,r13d - - xor r10d,r15d - add ecx,r12d - add r10d,r12d - - lea rbp,[4+rbp] - mov r13d,DWORD[44+rsp] - mov r15d,DWORD[32+rsp] - - mov r12d,r13d - ror r13d,11 - add r10d,r14d - mov r14d,r15d - ror r15d,2 - - xor r13d,r12d - shr r12d,3 - ror r13d,7 - xor r15d,r14d - shr r14d,10 - - ror r15d,17 - xor r12d,r13d - xor r15d,r14d - add r12d,DWORD[12+rsp] - - add r12d,DWORD[40+rsp] - mov r13d,ecx - add r12d,r15d - mov r14d,r10d - ror r13d,14 - mov r15d,edx - - xor r13d,ecx - ror r14d,9 - xor r15d,r8d - - mov DWORD[40+rsp],r12d - xor r14d,r10d - and r15d,ecx - - ror r13d,5 - add r12d,r9d - xor r15d,r8d - - ror r14d,11 - xor r13d,ecx - add r12d,r15d - - mov r15d,r10d - add r12d,DWORD[rbp] - xor r14d,r10d - - xor r15d,r11d - ror r13d,6 - mov r9d,r11d - - and edi,r15d - ror r14d,2 - add r12d,r13d - - xor r9d,edi - add ebx,r12d - add r9d,r12d - - lea rbp,[4+rbp] - mov r13d,DWORD[48+rsp] - mov edi,DWORD[36+rsp] - - mov r12d,r13d - ror r13d,11 - add r9d,r14d - mov r14d,edi - ror edi,2 - - xor r13d,r12d - shr r12d,3 - ror r13d,7 - xor edi,r14d - shr r14d,10 - - ror edi,17 - xor r12d,r13d - xor edi,r14d - add r12d,DWORD[16+rsp] - - add r12d,DWORD[44+rsp] - mov r13d,ebx - add r12d,edi - mov r14d,r9d - ror r13d,14 - mov edi,ecx - - xor r13d,ebx - ror r14d,9 - xor edi,edx - - mov DWORD[44+rsp],r12d - xor r14d,r9d - and edi,ebx - - ror r13d,5 - add r12d,r8d - xor edi,edx - - ror r14d,11 - xor r13d,ebx - add r12d,edi - - mov edi,r9d - add r12d,DWORD[rbp] - xor r14d,r9d - - xor edi,r10d - ror r13d,6 - mov r8d,r10d - - and r15d,edi - ror r14d,2 - add r12d,r13d - - xor r8d,r15d - add eax,r12d - add r8d,r12d - - lea rbp,[20+rbp] - mov r13d,DWORD[52+rsp] - mov r15d,DWORD[40+rsp] - - mov r12d,r13d - ror r13d,11 - add r8d,r14d - mov r14d,r15d - ror r15d,2 - - xor r13d,r12d - shr r12d,3 - ror r13d,7 - xor r15d,r14d - shr r14d,10 - - ror r15d,17 - xor r12d,r13d - xor r15d,r14d - add r12d,DWORD[20+rsp] - - add r12d,DWORD[48+rsp] - mov r13d,eax - add r12d,r15d - mov r14d,r8d - ror r13d,14 - mov r15d,ebx - - xor r13d,eax - ror r14d,9 - xor r15d,ecx - - mov DWORD[48+rsp],r12d - xor r14d,r8d - and r15d,eax - - ror r13d,5 - add r12d,edx - xor r15d,ecx - - ror r14d,11 - xor r13d,eax - add r12d,r15d - - mov r15d,r8d - add r12d,DWORD[rbp] - xor r14d,r8d - - xor r15d,r9d - ror r13d,6 - mov edx,r9d - - and edi,r15d - ror r14d,2 - add r12d,r13d - - xor edx,edi - add r11d,r12d - add edx,r12d - - lea rbp,[4+rbp] - mov r13d,DWORD[56+rsp] - mov edi,DWORD[44+rsp] - - mov r12d,r13d - ror r13d,11 - add edx,r14d - mov r14d,edi - ror edi,2 - - xor r13d,r12d - shr r12d,3 - ror r13d,7 - xor edi,r14d - shr r14d,10 - - ror edi,17 - xor r12d,r13d - xor edi,r14d - add r12d,DWORD[24+rsp] - - add r12d,DWORD[52+rsp] - mov r13d,r11d - add r12d,edi - mov r14d,edx - ror r13d,14 - mov edi,eax - - xor r13d,r11d - ror r14d,9 - xor edi,ebx - - mov DWORD[52+rsp],r12d - xor r14d,edx - and edi,r11d - - ror r13d,5 - add r12d,ecx - xor edi,ebx - - ror r14d,11 - xor r13d,r11d - add r12d,edi - - mov edi,edx - add r12d,DWORD[rbp] - xor r14d,edx - - xor edi,r8d - ror r13d,6 - mov ecx,r8d - - and r15d,edi - ror r14d,2 - add r12d,r13d - - xor ecx,r15d - add r10d,r12d - add ecx,r12d - - lea rbp,[4+rbp] - mov r13d,DWORD[60+rsp] - mov r15d,DWORD[48+rsp] - - mov r12d,r13d - ror r13d,11 - add ecx,r14d - mov r14d,r15d - ror r15d,2 - - xor r13d,r12d - shr r12d,3 - ror r13d,7 - xor r15d,r14d - shr r14d,10 - - ror r15d,17 - xor r12d,r13d - xor r15d,r14d - add r12d,DWORD[28+rsp] - - add r12d,DWORD[56+rsp] - mov r13d,r10d - add r12d,r15d - mov r14d,ecx - ror r13d,14 - mov r15d,r11d - - xor r13d,r10d - ror r14d,9 - xor r15d,eax - - mov DWORD[56+rsp],r12d - xor r14d,ecx - and r15d,r10d - - ror r13d,5 - add r12d,ebx - xor r15d,eax - - ror r14d,11 - xor r13d,r10d - add r12d,r15d - - mov r15d,ecx - add r12d,DWORD[rbp] - xor r14d,ecx - - xor r15d,edx - ror r13d,6 - mov ebx,edx - - and edi,r15d - ror r14d,2 - add r12d,r13d - - xor ebx,edi - add r9d,r12d - add ebx,r12d - - lea rbp,[4+rbp] - mov r13d,DWORD[rsp] - mov edi,DWORD[52+rsp] - - mov r12d,r13d - ror r13d,11 - add ebx,r14d - mov r14d,edi - ror edi,2 - - xor r13d,r12d - shr r12d,3 - ror r13d,7 - xor edi,r14d - shr r14d,10 - - ror edi,17 - xor r12d,r13d - xor edi,r14d - add r12d,DWORD[32+rsp] - - add r12d,DWORD[60+rsp] - mov r13d,r9d - add r12d,edi - mov r14d,ebx - ror r13d,14 - mov edi,r10d - - xor r13d,r9d - ror r14d,9 - xor edi,r11d - - mov DWORD[60+rsp],r12d - xor r14d,ebx - and edi,r9d - - ror r13d,5 - add r12d,eax - xor edi,r11d - - ror r14d,11 - xor r13d,r9d - add r12d,edi - - mov edi,ebx - add r12d,DWORD[rbp] - xor r14d,ebx - - xor edi,ecx - ror r13d,6 - mov eax,ecx - - and r15d,edi - ror r14d,2 - add r12d,r13d - - xor eax,r15d - add r8d,r12d - add eax,r12d - - lea rbp,[20+rbp] - cmp BYTE[3+rbp],0 - jnz NEAR $L$rounds_16_xx - - mov rdi,QWORD[((64+0))+rsp] - add eax,r14d - lea rsi,[64+rsi] - - add eax,DWORD[rdi] - add ebx,DWORD[4+rdi] - add ecx,DWORD[8+rdi] - add edx,DWORD[12+rdi] - add r8d,DWORD[16+rdi] - add r9d,DWORD[20+rdi] - add r10d,DWORD[24+rdi] - add r11d,DWORD[28+rdi] - - cmp rsi,QWORD[((64+16))+rsp] - - mov DWORD[rdi],eax - mov DWORD[4+rdi],ebx - mov DWORD[8+rdi],ecx - mov DWORD[12+rdi],edx - mov DWORD[16+rdi],r8d - mov DWORD[20+rdi],r9d - mov DWORD[24+rdi],r10d - mov DWORD[28+rdi],r11d - jb NEAR $L$loop - - mov rsi,QWORD[((64+24))+rsp] - mov r15,QWORD[rsi] - mov r14,QWORD[8+rsi] - mov r13,QWORD[16+rsi] - mov r12,QWORD[24+rsi] - mov rbp,QWORD[32+rsi] - mov rbx,QWORD[40+rsi] - lea rsp,[48+rsi] -$L$epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_sha256_block_data_order: -ALIGN 64 - -K256: - DD 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5 - DD 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5 - DD 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5 - DD 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5 - DD 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3 - DD 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3 - DD 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174 - DD 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174 - DD 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc - DD 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc - DD 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da - DD 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da - DD 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7 - DD 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7 - DD 0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967 - DD 0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967 - DD 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13 - DD 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13 - DD 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85 - DD 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85 - DD 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3 - DD 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3 - DD 0xd192e819,0xd6990624,0xf40e3585,0x106aa070 - DD 0xd192e819,0xd6990624,0xf40e3585,0x106aa070 - DD 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5 - DD 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5 - DD 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3 - DD 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3 - DD 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208 - DD 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208 - DD 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2 - DD 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2 - - DD 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f - DD 0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f - DD 0x03020100,0x0b0a0908,0xffffffff,0xffffffff - DD 0x03020100,0x0b0a0908,0xffffffff,0xffffffff - DD 0xffffffff,0xffffffff,0x03020100,0x0b0a0908 - DD 0xffffffff,0xffffffff,0x03020100,0x0b0a0908 -DB 83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97 -DB 110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54 -DB 52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121 -DB 32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46 -DB 111,114,103,62,0 - -ALIGN 64 -sha256_block_data_order_ssse3: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_sha256_block_data_order_ssse3: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - - -$L$ssse3_shortcut: - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - mov r11,rsp - shl rdx,4 - sub rsp,160 - lea rdx,[rdx*4+rsi] - and rsp,-64 - mov QWORD[((64+0))+rsp],rdi - mov QWORD[((64+8))+rsp],rsi - mov QWORD[((64+16))+rsp],rdx - mov QWORD[((64+24))+rsp],r11 - movaps XMMWORD[(64+32)+rsp],xmm6 - movaps XMMWORD[(64+48)+rsp],xmm7 - movaps XMMWORD[(64+64)+rsp],xmm8 - movaps XMMWORD[(64+80)+rsp],xmm9 -$L$prologue_ssse3: - - mov eax,DWORD[rdi] - mov ebx,DWORD[4+rdi] - mov ecx,DWORD[8+rdi] - mov edx,DWORD[12+rdi] - mov r8d,DWORD[16+rdi] - mov r9d,DWORD[20+rdi] - mov r10d,DWORD[24+rdi] - mov r11d,DWORD[28+rdi] - - - jmp NEAR $L$loop_ssse3 -ALIGN 16 -$L$loop_ssse3: - movdqa xmm7,XMMWORD[((K256+512))] - movdqu xmm0,XMMWORD[rsi] - movdqu xmm1,XMMWORD[16+rsi] - movdqu xmm2,XMMWORD[32+rsi] -DB 102,15,56,0,199 - movdqu xmm3,XMMWORD[48+rsi] - lea rbp,[K256] -DB 102,15,56,0,207 - movdqa xmm4,XMMWORD[rbp] - movdqa xmm5,XMMWORD[32+rbp] -DB 102,15,56,0,215 - paddd xmm4,xmm0 - movdqa xmm6,XMMWORD[64+rbp] -DB 102,15,56,0,223 - movdqa xmm7,XMMWORD[96+rbp] - paddd xmm5,xmm1 - paddd xmm6,xmm2 - paddd xmm7,xmm3 - movdqa XMMWORD[rsp],xmm4 - mov r14d,eax - movdqa XMMWORD[16+rsp],xmm5 - mov edi,ebx - movdqa XMMWORD[32+rsp],xmm6 - xor edi,ecx - movdqa XMMWORD[48+rsp],xmm7 - mov r13d,r8d - jmp NEAR $L$ssse3_00_47 - -ALIGN 16 -$L$ssse3_00_47: - sub rbp,-128 - ror r13d,14 - movdqa xmm4,xmm1 - mov eax,r14d - mov r12d,r9d - movdqa xmm7,xmm3 - ror r14d,9 - xor r13d,r8d - xor r12d,r10d - ror r13d,5 - xor r14d,eax -DB 102,15,58,15,224,4 - and r12d,r8d - xor r13d,r8d -DB 102,15,58,15,250,4 - add r11d,DWORD[rsp] - mov r15d,eax - xor r12d,r10d - ror r14d,11 - movdqa xmm5,xmm4 - xor r15d,ebx - add r11d,r12d - movdqa xmm6,xmm4 - ror r13d,6 - and edi,r15d - psrld xmm4,3 - xor r14d,eax - add r11d,r13d - xor edi,ebx - paddd xmm0,xmm7 - ror r14d,2 - add edx,r11d - psrld xmm6,7 - add r11d,edi - mov r13d,edx - pshufd xmm7,xmm3,250 - add r14d,r11d - ror r13d,14 - pslld xmm5,14 - mov r11d,r14d - mov r12d,r8d - pxor xmm4,xmm6 - ror r14d,9 - xor r13d,edx - xor r12d,r9d - ror r13d,5 - psrld xmm6,11 - xor r14d,r11d - pxor xmm4,xmm5 - and r12d,edx - xor r13d,edx - pslld xmm5,11 - add r10d,DWORD[4+rsp] - mov edi,r11d - pxor xmm4,xmm6 - xor r12d,r9d - ror r14d,11 - movdqa xmm6,xmm7 - xor edi,eax - add r10d,r12d - pxor xmm4,xmm5 - ror r13d,6 - and r15d,edi - xor r14d,r11d - psrld xmm7,10 - add r10d,r13d - xor r15d,eax - paddd xmm0,xmm4 - ror r14d,2 - add ecx,r10d - psrlq xmm6,17 - add r10d,r15d - mov r13d,ecx - add r14d,r10d - pxor xmm7,xmm6 - ror r13d,14 - mov r10d,r14d - mov r12d,edx - ror r14d,9 - psrlq xmm6,2 - xor r13d,ecx - xor r12d,r8d - pxor xmm7,xmm6 - ror r13d,5 - xor r14d,r10d - and r12d,ecx - pshufd xmm7,xmm7,128 - xor r13d,ecx - add r9d,DWORD[8+rsp] - mov r15d,r10d - psrldq xmm7,8 - xor r12d,r8d - ror r14d,11 - xor r15d,r11d - add r9d,r12d - ror r13d,6 - paddd xmm0,xmm7 - and edi,r15d - xor r14d,r10d - add r9d,r13d - pshufd xmm7,xmm0,80 - xor edi,r11d - ror r14d,2 - add ebx,r9d - movdqa xmm6,xmm7 - add r9d,edi - mov r13d,ebx - psrld xmm7,10 - add r14d,r9d - ror r13d,14 - psrlq xmm6,17 - mov r9d,r14d - mov r12d,ecx - pxor xmm7,xmm6 - ror r14d,9 - xor r13d,ebx - xor r12d,edx - ror r13d,5 - xor r14d,r9d - psrlq xmm6,2 - and r12d,ebx - xor r13d,ebx - add r8d,DWORD[12+rsp] - pxor xmm7,xmm6 - mov edi,r9d - xor r12d,edx - ror r14d,11 - pshufd xmm7,xmm7,8 - xor edi,r10d - add r8d,r12d - movdqa xmm6,XMMWORD[rbp] - ror r13d,6 - and r15d,edi - pslldq xmm7,8 - xor r14d,r9d - add r8d,r13d - xor r15d,r10d - paddd xmm0,xmm7 - ror r14d,2 - add eax,r8d - add r8d,r15d - paddd xmm6,xmm0 - mov r13d,eax - add r14d,r8d - movdqa XMMWORD[rsp],xmm6 - ror r13d,14 - movdqa xmm4,xmm2 - mov r8d,r14d - mov r12d,ebx - movdqa xmm7,xmm0 - ror r14d,9 - xor r13d,eax - xor r12d,ecx - ror r13d,5 - xor r14d,r8d -DB 102,15,58,15,225,4 - and r12d,eax - xor r13d,eax -DB 102,15,58,15,251,4 - add edx,DWORD[16+rsp] - mov r15d,r8d - xor r12d,ecx - ror r14d,11 - movdqa xmm5,xmm4 - xor r15d,r9d - add edx,r12d - movdqa xmm6,xmm4 - ror r13d,6 - and edi,r15d - psrld xmm4,3 - xor r14d,r8d - add edx,r13d - xor edi,r9d - paddd xmm1,xmm7 - ror r14d,2 - add r11d,edx - psrld xmm6,7 - add edx,edi - mov r13d,r11d - pshufd xmm7,xmm0,250 - add r14d,edx - ror r13d,14 - pslld xmm5,14 - mov edx,r14d - mov r12d,eax - pxor xmm4,xmm6 - ror r14d,9 - xor r13d,r11d - xor r12d,ebx - ror r13d,5 - psrld xmm6,11 - xor r14d,edx - pxor xmm4,xmm5 - and r12d,r11d - xor r13d,r11d - pslld xmm5,11 - add ecx,DWORD[20+rsp] - mov edi,edx - pxor xmm4,xmm6 - xor r12d,ebx - ror r14d,11 - movdqa xmm6,xmm7 - xor edi,r8d - add ecx,r12d - pxor xmm4,xmm5 - ror r13d,6 - and r15d,edi - xor r14d,edx - psrld xmm7,10 - add ecx,r13d - xor r15d,r8d - paddd xmm1,xmm4 - ror r14d,2 - add r10d,ecx - psrlq xmm6,17 - add ecx,r15d - mov r13d,r10d - add r14d,ecx - pxor xmm7,xmm6 - ror r13d,14 - mov ecx,r14d - mov r12d,r11d - ror r14d,9 - psrlq xmm6,2 - xor r13d,r10d - xor r12d,eax - pxor xmm7,xmm6 - ror r13d,5 - xor r14d,ecx - and r12d,r10d - pshufd xmm7,xmm7,128 - xor r13d,r10d - add ebx,DWORD[24+rsp] - mov r15d,ecx - psrldq xmm7,8 - xor r12d,eax - ror r14d,11 - xor r15d,edx - add ebx,r12d - ror r13d,6 - paddd xmm1,xmm7 - and edi,r15d - xor r14d,ecx - add ebx,r13d - pshufd xmm7,xmm1,80 - xor edi,edx - ror r14d,2 - add r9d,ebx - movdqa xmm6,xmm7 - add ebx,edi - mov r13d,r9d - psrld xmm7,10 - add r14d,ebx - ror r13d,14 - psrlq xmm6,17 - mov ebx,r14d - mov r12d,r10d - pxor xmm7,xmm6 - ror r14d,9 - xor r13d,r9d - xor r12d,r11d - ror r13d,5 - xor r14d,ebx - psrlq xmm6,2 - and r12d,r9d - xor r13d,r9d - add eax,DWORD[28+rsp] - pxor xmm7,xmm6 - mov edi,ebx - xor r12d,r11d - ror r14d,11 - pshufd xmm7,xmm7,8 - xor edi,ecx - add eax,r12d - movdqa xmm6,XMMWORD[32+rbp] - ror r13d,6 - and r15d,edi - pslldq xmm7,8 - xor r14d,ebx - add eax,r13d - xor r15d,ecx - paddd xmm1,xmm7 - ror r14d,2 - add r8d,eax - add eax,r15d - paddd xmm6,xmm1 - mov r13d,r8d - add r14d,eax - movdqa XMMWORD[16+rsp],xmm6 - ror r13d,14 - movdqa xmm4,xmm3 - mov eax,r14d - mov r12d,r9d - movdqa xmm7,xmm1 - ror r14d,9 - xor r13d,r8d - xor r12d,r10d - ror r13d,5 - xor r14d,eax -DB 102,15,58,15,226,4 - and r12d,r8d - xor r13d,r8d -DB 102,15,58,15,248,4 - add r11d,DWORD[32+rsp] - mov r15d,eax - xor r12d,r10d - ror r14d,11 - movdqa xmm5,xmm4 - xor r15d,ebx - add r11d,r12d - movdqa xmm6,xmm4 - ror r13d,6 - and edi,r15d - psrld xmm4,3 - xor r14d,eax - add r11d,r13d - xor edi,ebx - paddd xmm2,xmm7 - ror r14d,2 - add edx,r11d - psrld xmm6,7 - add r11d,edi - mov r13d,edx - pshufd xmm7,xmm1,250 - add r14d,r11d - ror r13d,14 - pslld xmm5,14 - mov r11d,r14d - mov r12d,r8d - pxor xmm4,xmm6 - ror r14d,9 - xor r13d,edx - xor r12d,r9d - ror r13d,5 - psrld xmm6,11 - xor r14d,r11d - pxor xmm4,xmm5 - and r12d,edx - xor r13d,edx - pslld xmm5,11 - add r10d,DWORD[36+rsp] - mov edi,r11d - pxor xmm4,xmm6 - xor r12d,r9d - ror r14d,11 - movdqa xmm6,xmm7 - xor edi,eax - add r10d,r12d - pxor xmm4,xmm5 - ror r13d,6 - and r15d,edi - xor r14d,r11d - psrld xmm7,10 - add r10d,r13d - xor r15d,eax - paddd xmm2,xmm4 - ror r14d,2 - add ecx,r10d - psrlq xmm6,17 - add r10d,r15d - mov r13d,ecx - add r14d,r10d - pxor xmm7,xmm6 - ror r13d,14 - mov r10d,r14d - mov r12d,edx - ror r14d,9 - psrlq xmm6,2 - xor r13d,ecx - xor r12d,r8d - pxor xmm7,xmm6 - ror r13d,5 - xor r14d,r10d - and r12d,ecx - pshufd xmm7,xmm7,128 - xor r13d,ecx - add r9d,DWORD[40+rsp] - mov r15d,r10d - psrldq xmm7,8 - xor r12d,r8d - ror r14d,11 - xor r15d,r11d - add r9d,r12d - ror r13d,6 - paddd xmm2,xmm7 - and edi,r15d - xor r14d,r10d - add r9d,r13d - pshufd xmm7,xmm2,80 - xor edi,r11d - ror r14d,2 - add ebx,r9d - movdqa xmm6,xmm7 - add r9d,edi - mov r13d,ebx - psrld xmm7,10 - add r14d,r9d - ror r13d,14 - psrlq xmm6,17 - mov r9d,r14d - mov r12d,ecx - pxor xmm7,xmm6 - ror r14d,9 - xor r13d,ebx - xor r12d,edx - ror r13d,5 - xor r14d,r9d - psrlq xmm6,2 - and r12d,ebx - xor r13d,ebx - add r8d,DWORD[44+rsp] - pxor xmm7,xmm6 - mov edi,r9d - xor r12d,edx - ror r14d,11 - pshufd xmm7,xmm7,8 - xor edi,r10d - add r8d,r12d - movdqa xmm6,XMMWORD[64+rbp] - ror r13d,6 - and r15d,edi - pslldq xmm7,8 - xor r14d,r9d - add r8d,r13d - xor r15d,r10d - paddd xmm2,xmm7 - ror r14d,2 - add eax,r8d - add r8d,r15d - paddd xmm6,xmm2 - mov r13d,eax - add r14d,r8d - movdqa XMMWORD[32+rsp],xmm6 - ror r13d,14 - movdqa xmm4,xmm0 - mov r8d,r14d - mov r12d,ebx - movdqa xmm7,xmm2 - ror r14d,9 - xor r13d,eax - xor r12d,ecx - ror r13d,5 - xor r14d,r8d -DB 102,15,58,15,227,4 - and r12d,eax - xor r13d,eax -DB 102,15,58,15,249,4 - add edx,DWORD[48+rsp] - mov r15d,r8d - xor r12d,ecx - ror r14d,11 - movdqa xmm5,xmm4 - xor r15d,r9d - add edx,r12d - movdqa xmm6,xmm4 - ror r13d,6 - and edi,r15d - psrld xmm4,3 - xor r14d,r8d - add edx,r13d - xor edi,r9d - paddd xmm3,xmm7 - ror r14d,2 - add r11d,edx - psrld xmm6,7 - add edx,edi - mov r13d,r11d - pshufd xmm7,xmm2,250 - add r14d,edx - ror r13d,14 - pslld xmm5,14 - mov edx,r14d - mov r12d,eax - pxor xmm4,xmm6 - ror r14d,9 - xor r13d,r11d - xor r12d,ebx - ror r13d,5 - psrld xmm6,11 - xor r14d,edx - pxor xmm4,xmm5 - and r12d,r11d - xor r13d,r11d - pslld xmm5,11 - add ecx,DWORD[52+rsp] - mov edi,edx - pxor xmm4,xmm6 - xor r12d,ebx - ror r14d,11 - movdqa xmm6,xmm7 - xor edi,r8d - add ecx,r12d - pxor xmm4,xmm5 - ror r13d,6 - and r15d,edi - xor r14d,edx - psrld xmm7,10 - add ecx,r13d - xor r15d,r8d - paddd xmm3,xmm4 - ror r14d,2 - add r10d,ecx - psrlq xmm6,17 - add ecx,r15d - mov r13d,r10d - add r14d,ecx - pxor xmm7,xmm6 - ror r13d,14 - mov ecx,r14d - mov r12d,r11d - ror r14d,9 - psrlq xmm6,2 - xor r13d,r10d - xor r12d,eax - pxor xmm7,xmm6 - ror r13d,5 - xor r14d,ecx - and r12d,r10d - pshufd xmm7,xmm7,128 - xor r13d,r10d - add ebx,DWORD[56+rsp] - mov r15d,ecx - psrldq xmm7,8 - xor r12d,eax - ror r14d,11 - xor r15d,edx - add ebx,r12d - ror r13d,6 - paddd xmm3,xmm7 - and edi,r15d - xor r14d,ecx - add ebx,r13d - pshufd xmm7,xmm3,80 - xor edi,edx - ror r14d,2 - add r9d,ebx - movdqa xmm6,xmm7 - add ebx,edi - mov r13d,r9d - psrld xmm7,10 - add r14d,ebx - ror r13d,14 - psrlq xmm6,17 - mov ebx,r14d - mov r12d,r10d - pxor xmm7,xmm6 - ror r14d,9 - xor r13d,r9d - xor r12d,r11d - ror r13d,5 - xor r14d,ebx - psrlq xmm6,2 - and r12d,r9d - xor r13d,r9d - add eax,DWORD[60+rsp] - pxor xmm7,xmm6 - mov edi,ebx - xor r12d,r11d - ror r14d,11 - pshufd xmm7,xmm7,8 - xor edi,ecx - add eax,r12d - movdqa xmm6,XMMWORD[96+rbp] - ror r13d,6 - and r15d,edi - pslldq xmm7,8 - xor r14d,ebx - add eax,r13d - xor r15d,ecx - paddd xmm3,xmm7 - ror r14d,2 - add r8d,eax - add eax,r15d - paddd xmm6,xmm3 - mov r13d,r8d - add r14d,eax - movdqa XMMWORD[48+rsp],xmm6 - cmp BYTE[131+rbp],0 - jne NEAR $L$ssse3_00_47 - ror r13d,14 - mov eax,r14d - mov r12d,r9d - ror r14d,9 - xor r13d,r8d - xor r12d,r10d - ror r13d,5 - xor r14d,eax - and r12d,r8d - xor r13d,r8d - add r11d,DWORD[rsp] - mov r15d,eax - xor r12d,r10d - ror r14d,11 - xor r15d,ebx - add r11d,r12d - ror r13d,6 - and edi,r15d - xor r14d,eax - add r11d,r13d - xor edi,ebx - ror r14d,2 - add edx,r11d - add r11d,edi - mov r13d,edx - add r14d,r11d - ror r13d,14 - mov r11d,r14d - mov r12d,r8d - ror r14d,9 - xor r13d,edx - xor r12d,r9d - ror r13d,5 - xor r14d,r11d - and r12d,edx - xor r13d,edx - add r10d,DWORD[4+rsp] - mov edi,r11d - xor r12d,r9d - ror r14d,11 - xor edi,eax - add r10d,r12d - ror r13d,6 - and r15d,edi - xor r14d,r11d - add r10d,r13d - xor r15d,eax - ror r14d,2 - add ecx,r10d - add r10d,r15d - mov r13d,ecx - add r14d,r10d - ror r13d,14 - mov r10d,r14d - mov r12d,edx - ror r14d,9 - xor r13d,ecx - xor r12d,r8d - ror r13d,5 - xor r14d,r10d - and r12d,ecx - xor r13d,ecx - add r9d,DWORD[8+rsp] - mov r15d,r10d - xor r12d,r8d - ror r14d,11 - xor r15d,r11d - add r9d,r12d - ror r13d,6 - and edi,r15d - xor r14d,r10d - add r9d,r13d - xor edi,r11d - ror r14d,2 - add ebx,r9d - add r9d,edi - mov r13d,ebx - add r14d,r9d - ror r13d,14 - mov r9d,r14d - mov r12d,ecx - ror r14d,9 - xor r13d,ebx - xor r12d,edx - ror r13d,5 - xor r14d,r9d - and r12d,ebx - xor r13d,ebx - add r8d,DWORD[12+rsp] - mov edi,r9d - xor r12d,edx - ror r14d,11 - xor edi,r10d - add r8d,r12d - ror r13d,6 - and r15d,edi - xor r14d,r9d - add r8d,r13d - xor r15d,r10d - ror r14d,2 - add eax,r8d - add r8d,r15d - mov r13d,eax - add r14d,r8d - ror r13d,14 - mov r8d,r14d - mov r12d,ebx - ror r14d,9 - xor r13d,eax - xor r12d,ecx - ror r13d,5 - xor r14d,r8d - and r12d,eax - xor r13d,eax - add edx,DWORD[16+rsp] - mov r15d,r8d - xor r12d,ecx - ror r14d,11 - xor r15d,r9d - add edx,r12d - ror r13d,6 - and edi,r15d - xor r14d,r8d - add edx,r13d - xor edi,r9d - ror r14d,2 - add r11d,edx - add edx,edi - mov r13d,r11d - add r14d,edx - ror r13d,14 - mov edx,r14d - mov r12d,eax - ror r14d,9 - xor r13d,r11d - xor r12d,ebx - ror r13d,5 - xor r14d,edx - and r12d,r11d - xor r13d,r11d - add ecx,DWORD[20+rsp] - mov edi,edx - xor r12d,ebx - ror r14d,11 - xor edi,r8d - add ecx,r12d - ror r13d,6 - and r15d,edi - xor r14d,edx - add ecx,r13d - xor r15d,r8d - ror r14d,2 - add r10d,ecx - add ecx,r15d - mov r13d,r10d - add r14d,ecx - ror r13d,14 - mov ecx,r14d - mov r12d,r11d - ror r14d,9 - xor r13d,r10d - xor r12d,eax - ror r13d,5 - xor r14d,ecx - and r12d,r10d - xor r13d,r10d - add ebx,DWORD[24+rsp] - mov r15d,ecx - xor r12d,eax - ror r14d,11 - xor r15d,edx - add ebx,r12d - ror r13d,6 - and edi,r15d - xor r14d,ecx - add ebx,r13d - xor edi,edx - ror r14d,2 - add r9d,ebx - add ebx,edi - mov r13d,r9d - add r14d,ebx - ror r13d,14 - mov ebx,r14d - mov r12d,r10d - ror r14d,9 - xor r13d,r9d - xor r12d,r11d - ror r13d,5 - xor r14d,ebx - and r12d,r9d - xor r13d,r9d - add eax,DWORD[28+rsp] - mov edi,ebx - xor r12d,r11d - ror r14d,11 - xor edi,ecx - add eax,r12d - ror r13d,6 - and r15d,edi - xor r14d,ebx - add eax,r13d - xor r15d,ecx - ror r14d,2 - add r8d,eax - add eax,r15d - mov r13d,r8d - add r14d,eax - ror r13d,14 - mov eax,r14d - mov r12d,r9d - ror r14d,9 - xor r13d,r8d - xor r12d,r10d - ror r13d,5 - xor r14d,eax - and r12d,r8d - xor r13d,r8d - add r11d,DWORD[32+rsp] - mov r15d,eax - xor r12d,r10d - ror r14d,11 - xor r15d,ebx - add r11d,r12d - ror r13d,6 - and edi,r15d - xor r14d,eax - add r11d,r13d - xor edi,ebx - ror r14d,2 - add edx,r11d - add r11d,edi - mov r13d,edx - add r14d,r11d - ror r13d,14 - mov r11d,r14d - mov r12d,r8d - ror r14d,9 - xor r13d,edx - xor r12d,r9d - ror r13d,5 - xor r14d,r11d - and r12d,edx - xor r13d,edx - add r10d,DWORD[36+rsp] - mov edi,r11d - xor r12d,r9d - ror r14d,11 - xor edi,eax - add r10d,r12d - ror r13d,6 - and r15d,edi - xor r14d,r11d - add r10d,r13d - xor r15d,eax - ror r14d,2 - add ecx,r10d - add r10d,r15d - mov r13d,ecx - add r14d,r10d - ror r13d,14 - mov r10d,r14d - mov r12d,edx - ror r14d,9 - xor r13d,ecx - xor r12d,r8d - ror r13d,5 - xor r14d,r10d - and r12d,ecx - xor r13d,ecx - add r9d,DWORD[40+rsp] - mov r15d,r10d - xor r12d,r8d - ror r14d,11 - xor r15d,r11d - add r9d,r12d - ror r13d,6 - and edi,r15d - xor r14d,r10d - add r9d,r13d - xor edi,r11d - ror r14d,2 - add ebx,r9d - add r9d,edi - mov r13d,ebx - add r14d,r9d - ror r13d,14 - mov r9d,r14d - mov r12d,ecx - ror r14d,9 - xor r13d,ebx - xor r12d,edx - ror r13d,5 - xor r14d,r9d - and r12d,ebx - xor r13d,ebx - add r8d,DWORD[44+rsp] - mov edi,r9d - xor r12d,edx - ror r14d,11 - xor edi,r10d - add r8d,r12d - ror r13d,6 - and r15d,edi - xor r14d,r9d - add r8d,r13d - xor r15d,r10d - ror r14d,2 - add eax,r8d - add r8d,r15d - mov r13d,eax - add r14d,r8d - ror r13d,14 - mov r8d,r14d - mov r12d,ebx - ror r14d,9 - xor r13d,eax - xor r12d,ecx - ror r13d,5 - xor r14d,r8d - and r12d,eax - xor r13d,eax - add edx,DWORD[48+rsp] - mov r15d,r8d - xor r12d,ecx - ror r14d,11 - xor r15d,r9d - add edx,r12d - ror r13d,6 - and edi,r15d - xor r14d,r8d - add edx,r13d - xor edi,r9d - ror r14d,2 - add r11d,edx - add edx,edi - mov r13d,r11d - add r14d,edx - ror r13d,14 - mov edx,r14d - mov r12d,eax - ror r14d,9 - xor r13d,r11d - xor r12d,ebx - ror r13d,5 - xor r14d,edx - and r12d,r11d - xor r13d,r11d - add ecx,DWORD[52+rsp] - mov edi,edx - xor r12d,ebx - ror r14d,11 - xor edi,r8d - add ecx,r12d - ror r13d,6 - and r15d,edi - xor r14d,edx - add ecx,r13d - xor r15d,r8d - ror r14d,2 - add r10d,ecx - add ecx,r15d - mov r13d,r10d - add r14d,ecx - ror r13d,14 - mov ecx,r14d - mov r12d,r11d - ror r14d,9 - xor r13d,r10d - xor r12d,eax - ror r13d,5 - xor r14d,ecx - and r12d,r10d - xor r13d,r10d - add ebx,DWORD[56+rsp] - mov r15d,ecx - xor r12d,eax - ror r14d,11 - xor r15d,edx - add ebx,r12d - ror r13d,6 - and edi,r15d - xor r14d,ecx - add ebx,r13d - xor edi,edx - ror r14d,2 - add r9d,ebx - add ebx,edi - mov r13d,r9d - add r14d,ebx - ror r13d,14 - mov ebx,r14d - mov r12d,r10d - ror r14d,9 - xor r13d,r9d - xor r12d,r11d - ror r13d,5 - xor r14d,ebx - and r12d,r9d - xor r13d,r9d - add eax,DWORD[60+rsp] - mov edi,ebx - xor r12d,r11d - ror r14d,11 - xor edi,ecx - add eax,r12d - ror r13d,6 - and r15d,edi - xor r14d,ebx - add eax,r13d - xor r15d,ecx - ror r14d,2 - add r8d,eax - add eax,r15d - mov r13d,r8d - add r14d,eax - mov rdi,QWORD[((64+0))+rsp] - mov eax,r14d - - add eax,DWORD[rdi] - lea rsi,[64+rsi] - add ebx,DWORD[4+rdi] - add ecx,DWORD[8+rdi] - add edx,DWORD[12+rdi] - add r8d,DWORD[16+rdi] - add r9d,DWORD[20+rdi] - add r10d,DWORD[24+rdi] - add r11d,DWORD[28+rdi] - - cmp rsi,QWORD[((64+16))+rsp] - - mov DWORD[rdi],eax - mov DWORD[4+rdi],ebx - mov DWORD[8+rdi],ecx - mov DWORD[12+rdi],edx - mov DWORD[16+rdi],r8d - mov DWORD[20+rdi],r9d - mov DWORD[24+rdi],r10d - mov DWORD[28+rdi],r11d - jb NEAR $L$loop_ssse3 - - mov rsi,QWORD[((64+24))+rsp] - movaps xmm6,XMMWORD[((64+32))+rsp] - movaps xmm7,XMMWORD[((64+48))+rsp] - movaps xmm8,XMMWORD[((64+64))+rsp] - movaps xmm9,XMMWORD[((64+80))+rsp] - mov r15,QWORD[rsi] - mov r14,QWORD[8+rsi] - mov r13,QWORD[16+rsi] - mov r12,QWORD[24+rsi] - mov rbp,QWORD[32+rsi] - mov rbx,QWORD[40+rsi] - lea rsp,[48+rsi] -$L$epilogue_ssse3: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_sha256_block_data_order_ssse3: -EXTERN __imp_RtlVirtualUnwind - -ALIGN 16 -se_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - mov rsi,QWORD[8+r9] - mov r11,QWORD[56+r9] - - mov r10d,DWORD[r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jb NEAR $L$in_prologue - - mov rax,QWORD[152+r8] - - mov r10d,DWORD[4+r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jae NEAR $L$in_prologue - mov rsi,rax - mov rax,QWORD[((64+24))+rax] - lea rax,[48+rax] - - mov rbx,QWORD[((-8))+rax] - mov rbp,QWORD[((-16))+rax] - mov r12,QWORD[((-24))+rax] - mov r13,QWORD[((-32))+rax] - mov r14,QWORD[((-40))+rax] - mov r15,QWORD[((-48))+rax] - mov QWORD[144+r8],rbx - mov QWORD[160+r8],rbp - mov QWORD[216+r8],r12 - mov QWORD[224+r8],r13 - mov QWORD[232+r8],r14 - mov QWORD[240+r8],r15 - - lea r10,[$L$epilogue] - cmp rbx,r10 - jb NEAR $L$in_prologue - - lea rsi,[((64+32))+rsi] - lea rdi,[512+r8] - mov ecx,8 - DD 0xa548f3fc - -$L$in_prologue: - mov rdi,QWORD[8+rax] - mov rsi,QWORD[16+rax] - mov QWORD[152+r8],rax - mov QWORD[168+r8],rsi - mov QWORD[176+r8],rdi - - mov rdi,QWORD[40+r9] - mov rsi,r8 - mov ecx,154 - DD 0xa548f3fc - - mov rsi,r9 - xor rcx,rcx - mov rdx,QWORD[8+rsi] - mov r8,QWORD[rsi] - mov r9,QWORD[16+rsi] - mov r10,QWORD[40+rsi] - lea r11,[56+rsi] - lea r12,[24+rsi] - mov QWORD[32+rsp],r10 - mov QWORD[40+rsp],r11 - mov QWORD[48+rsp],r12 - mov QWORD[56+rsp],rcx - call QWORD[__imp_RtlVirtualUnwind] - - mov eax,1 - add rsp,64 - popfq - pop r15 - pop r14 - pop r13 - pop r12 - pop rbp - pop rbx - pop rdi - pop rsi - DB 0F3h,0C3h ;repret - -section .pdata rdata align=4 -ALIGN 4 - DD $L$SEH_begin_sha256_block_data_order wrt ..imagebase - DD $L$SEH_end_sha256_block_data_order wrt ..imagebase - DD $L$SEH_info_sha256_block_data_order wrt ..imagebase - DD $L$SEH_begin_sha256_block_data_order_ssse3 wrt ..imagebase - DD $L$SEH_end_sha256_block_data_order_ssse3 wrt ..imagebase - DD $L$SEH_info_sha256_block_data_order_ssse3 wrt ..imagebase -section .xdata rdata align=8 -ALIGN 8 -$L$SEH_info_sha256_block_data_order: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$prologue wrt ..imagebase,$L$epilogue wrt ..imagebase -$L$SEH_info_sha256_block_data_order_ssse3: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$prologue_ssse3 wrt ..imagebase,$L$epilogue_ssse3 wrt ..imagebase diff --git a/third_party/boringssl/win-x86_64/crypto/sha/sha512-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/sha/sha512-x86_64.asm deleted file mode 100644 index b76cc0edb96ea..0000000000000 --- a/third_party/boringssl/win-x86_64/crypto/sha/sha512-x86_64.asm +++ /dev/null @@ -1,1911 +0,0 @@ -default rel -%define XMMWORD -%define YMMWORD -%define ZMMWORD -section .text code align=64 - - -EXTERN OPENSSL_ia32cap_P -global sha512_block_data_order - -ALIGN 16 -sha512_block_data_order: - mov QWORD[8+rsp],rdi ;WIN64 prologue - mov QWORD[16+rsp],rsi - mov rax,rsp -$L$SEH_begin_sha512_block_data_order: - mov rdi,rcx - mov rsi,rdx - mov rdx,r8 - - - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - mov r11,rsp - shl rdx,4 - sub rsp,16*8+4*8 - lea rdx,[rdx*8+rsi] - and rsp,-64 - mov QWORD[((128+0))+rsp],rdi - mov QWORD[((128+8))+rsp],rsi - mov QWORD[((128+16))+rsp],rdx - mov QWORD[((128+24))+rsp],r11 -$L$prologue: - - mov rax,QWORD[rdi] - mov rbx,QWORD[8+rdi] - mov rcx,QWORD[16+rdi] - mov rdx,QWORD[24+rdi] - mov r8,QWORD[32+rdi] - mov r9,QWORD[40+rdi] - mov r10,QWORD[48+rdi] - mov r11,QWORD[56+rdi] - jmp NEAR $L$loop - -ALIGN 16 -$L$loop: - mov rdi,rbx - lea rbp,[K512] - xor rdi,rcx - mov r12,QWORD[rsi] - mov r13,r8 - mov r14,rax - bswap r12 - ror r13,23 - mov r15,r9 - - xor r13,r8 - ror r14,5 - xor r15,r10 - - mov QWORD[rsp],r12 - xor r14,rax - and r15,r8 - - ror r13,4 - add r12,r11 - xor r15,r10 - - ror r14,6 - xor r13,r8 - add r12,r15 - - mov r15,rax - add r12,QWORD[rbp] - xor r14,rax - - xor r15,rbx - ror r13,14 - mov r11,rbx - - and rdi,r15 - ror r14,28 - add r12,r13 - - xor r11,rdi - add rdx,r12 - add r11,r12 - - lea rbp,[8+rbp] - add r11,r14 - mov r12,QWORD[8+rsi] - mov r13,rdx - mov r14,r11 - bswap r12 - ror r13,23 - mov rdi,r8 - - xor r13,rdx - ror r14,5 - xor rdi,r9 - - mov QWORD[8+rsp],r12 - xor r14,r11 - and rdi,rdx - - ror r13,4 - add r12,r10 - xor rdi,r9 - - ror r14,6 - xor r13,rdx - add r12,rdi - - mov rdi,r11 - add r12,QWORD[rbp] - xor r14,r11 - - xor rdi,rax - ror r13,14 - mov r10,rax - - and r15,rdi - ror r14,28 - add r12,r13 - - xor r10,r15 - add rcx,r12 - add r10,r12 - - lea rbp,[24+rbp] - add r10,r14 - mov r12,QWORD[16+rsi] - mov r13,rcx - mov r14,r10 - bswap r12 - ror r13,23 - mov r15,rdx - - xor r13,rcx - ror r14,5 - xor r15,r8 - - mov QWORD[16+rsp],r12 - xor r14,r10 - and r15,rcx - - ror r13,4 - add r12,r9 - xor r15,r8 - - ror r14,6 - xor r13,rcx - add r12,r15 - - mov r15,r10 - add r12,QWORD[rbp] - xor r14,r10 - - xor r15,r11 - ror r13,14 - mov r9,r11 - - and rdi,r15 - ror r14,28 - add r12,r13 - - xor r9,rdi - add rbx,r12 - add r9,r12 - - lea rbp,[8+rbp] - add r9,r14 - mov r12,QWORD[24+rsi] - mov r13,rbx - mov r14,r9 - bswap r12 - ror r13,23 - mov rdi,rcx - - xor r13,rbx - ror r14,5 - xor rdi,rdx - - mov QWORD[24+rsp],r12 - xor r14,r9 - and rdi,rbx - - ror r13,4 - add r12,r8 - xor rdi,rdx - - ror r14,6 - xor r13,rbx - add r12,rdi - - mov rdi,r9 - add r12,QWORD[rbp] - xor r14,r9 - - xor rdi,r10 - ror r13,14 - mov r8,r10 - - and r15,rdi - ror r14,28 - add r12,r13 - - xor r8,r15 - add rax,r12 - add r8,r12 - - lea rbp,[24+rbp] - add r8,r14 - mov r12,QWORD[32+rsi] - mov r13,rax - mov r14,r8 - bswap r12 - ror r13,23 - mov r15,rbx - - xor r13,rax - ror r14,5 - xor r15,rcx - - mov QWORD[32+rsp],r12 - xor r14,r8 - and r15,rax - - ror r13,4 - add r12,rdx - xor r15,rcx - - ror r14,6 - xor r13,rax - add r12,r15 - - mov r15,r8 - add r12,QWORD[rbp] - xor r14,r8 - - xor r15,r9 - ror r13,14 - mov rdx,r9 - - and rdi,r15 - ror r14,28 - add r12,r13 - - xor rdx,rdi - add r11,r12 - add rdx,r12 - - lea rbp,[8+rbp] - add rdx,r14 - mov r12,QWORD[40+rsi] - mov r13,r11 - mov r14,rdx - bswap r12 - ror r13,23 - mov rdi,rax - - xor r13,r11 - ror r14,5 - xor rdi,rbx - - mov QWORD[40+rsp],r12 - xor r14,rdx - and rdi,r11 - - ror r13,4 - add r12,rcx - xor rdi,rbx - - ror r14,6 - xor r13,r11 - add r12,rdi - - mov rdi,rdx - add r12,QWORD[rbp] - xor r14,rdx - - xor rdi,r8 - ror r13,14 - mov rcx,r8 - - and r15,rdi - ror r14,28 - add r12,r13 - - xor rcx,r15 - add r10,r12 - add rcx,r12 - - lea rbp,[24+rbp] - add rcx,r14 - mov r12,QWORD[48+rsi] - mov r13,r10 - mov r14,rcx - bswap r12 - ror r13,23 - mov r15,r11 - - xor r13,r10 - ror r14,5 - xor r15,rax - - mov QWORD[48+rsp],r12 - xor r14,rcx - and r15,r10 - - ror r13,4 - add r12,rbx - xor r15,rax - - ror r14,6 - xor r13,r10 - add r12,r15 - - mov r15,rcx - add r12,QWORD[rbp] - xor r14,rcx - - xor r15,rdx - ror r13,14 - mov rbx,rdx - - and rdi,r15 - ror r14,28 - add r12,r13 - - xor rbx,rdi - add r9,r12 - add rbx,r12 - - lea rbp,[8+rbp] - add rbx,r14 - mov r12,QWORD[56+rsi] - mov r13,r9 - mov r14,rbx - bswap r12 - ror r13,23 - mov rdi,r10 - - xor r13,r9 - ror r14,5 - xor rdi,r11 - - mov QWORD[56+rsp],r12 - xor r14,rbx - and rdi,r9 - - ror r13,4 - add r12,rax - xor rdi,r11 - - ror r14,6 - xor r13,r9 - add r12,rdi - - mov rdi,rbx - add r12,QWORD[rbp] - xor r14,rbx - - xor rdi,rcx - ror r13,14 - mov rax,rcx - - and r15,rdi - ror r14,28 - add r12,r13 - - xor rax,r15 - add r8,r12 - add rax,r12 - - lea rbp,[24+rbp] - add rax,r14 - mov r12,QWORD[64+rsi] - mov r13,r8 - mov r14,rax - bswap r12 - ror r13,23 - mov r15,r9 - - xor r13,r8 - ror r14,5 - xor r15,r10 - - mov QWORD[64+rsp],r12 - xor r14,rax - and r15,r8 - - ror r13,4 - add r12,r11 - xor r15,r10 - - ror r14,6 - xor r13,r8 - add r12,r15 - - mov r15,rax - add r12,QWORD[rbp] - xor r14,rax - - xor r15,rbx - ror r13,14 - mov r11,rbx - - and rdi,r15 - ror r14,28 - add r12,r13 - - xor r11,rdi - add rdx,r12 - add r11,r12 - - lea rbp,[8+rbp] - add r11,r14 - mov r12,QWORD[72+rsi] - mov r13,rdx - mov r14,r11 - bswap r12 - ror r13,23 - mov rdi,r8 - - xor r13,rdx - ror r14,5 - xor rdi,r9 - - mov QWORD[72+rsp],r12 - xor r14,r11 - and rdi,rdx - - ror r13,4 - add r12,r10 - xor rdi,r9 - - ror r14,6 - xor r13,rdx - add r12,rdi - - mov rdi,r11 - add r12,QWORD[rbp] - xor r14,r11 - - xor rdi,rax - ror r13,14 - mov r10,rax - - and r15,rdi - ror r14,28 - add r12,r13 - - xor r10,r15 - add rcx,r12 - add r10,r12 - - lea rbp,[24+rbp] - add r10,r14 - mov r12,QWORD[80+rsi] - mov r13,rcx - mov r14,r10 - bswap r12 - ror r13,23 - mov r15,rdx - - xor r13,rcx - ror r14,5 - xor r15,r8 - - mov QWORD[80+rsp],r12 - xor r14,r10 - and r15,rcx - - ror r13,4 - add r12,r9 - xor r15,r8 - - ror r14,6 - xor r13,rcx - add r12,r15 - - mov r15,r10 - add r12,QWORD[rbp] - xor r14,r10 - - xor r15,r11 - ror r13,14 - mov r9,r11 - - and rdi,r15 - ror r14,28 - add r12,r13 - - xor r9,rdi - add rbx,r12 - add r9,r12 - - lea rbp,[8+rbp] - add r9,r14 - mov r12,QWORD[88+rsi] - mov r13,rbx - mov r14,r9 - bswap r12 - ror r13,23 - mov rdi,rcx - - xor r13,rbx - ror r14,5 - xor rdi,rdx - - mov QWORD[88+rsp],r12 - xor r14,r9 - and rdi,rbx - - ror r13,4 - add r12,r8 - xor rdi,rdx - - ror r14,6 - xor r13,rbx - add r12,rdi - - mov rdi,r9 - add r12,QWORD[rbp] - xor r14,r9 - - xor rdi,r10 - ror r13,14 - mov r8,r10 - - and r15,rdi - ror r14,28 - add r12,r13 - - xor r8,r15 - add rax,r12 - add r8,r12 - - lea rbp,[24+rbp] - add r8,r14 - mov r12,QWORD[96+rsi] - mov r13,rax - mov r14,r8 - bswap r12 - ror r13,23 - mov r15,rbx - - xor r13,rax - ror r14,5 - xor r15,rcx - - mov QWORD[96+rsp],r12 - xor r14,r8 - and r15,rax - - ror r13,4 - add r12,rdx - xor r15,rcx - - ror r14,6 - xor r13,rax - add r12,r15 - - mov r15,r8 - add r12,QWORD[rbp] - xor r14,r8 - - xor r15,r9 - ror r13,14 - mov rdx,r9 - - and rdi,r15 - ror r14,28 - add r12,r13 - - xor rdx,rdi - add r11,r12 - add rdx,r12 - - lea rbp,[8+rbp] - add rdx,r14 - mov r12,QWORD[104+rsi] - mov r13,r11 - mov r14,rdx - bswap r12 - ror r13,23 - mov rdi,rax - - xor r13,r11 - ror r14,5 - xor rdi,rbx - - mov QWORD[104+rsp],r12 - xor r14,rdx - and rdi,r11 - - ror r13,4 - add r12,rcx - xor rdi,rbx - - ror r14,6 - xor r13,r11 - add r12,rdi - - mov rdi,rdx - add r12,QWORD[rbp] - xor r14,rdx - - xor rdi,r8 - ror r13,14 - mov rcx,r8 - - and r15,rdi - ror r14,28 - add r12,r13 - - xor rcx,r15 - add r10,r12 - add rcx,r12 - - lea rbp,[24+rbp] - add rcx,r14 - mov r12,QWORD[112+rsi] - mov r13,r10 - mov r14,rcx - bswap r12 - ror r13,23 - mov r15,r11 - - xor r13,r10 - ror r14,5 - xor r15,rax - - mov QWORD[112+rsp],r12 - xor r14,rcx - and r15,r10 - - ror r13,4 - add r12,rbx - xor r15,rax - - ror r14,6 - xor r13,r10 - add r12,r15 - - mov r15,rcx - add r12,QWORD[rbp] - xor r14,rcx - - xor r15,rdx - ror r13,14 - mov rbx,rdx - - and rdi,r15 - ror r14,28 - add r12,r13 - - xor rbx,rdi - add r9,r12 - add rbx,r12 - - lea rbp,[8+rbp] - add rbx,r14 - mov r12,QWORD[120+rsi] - mov r13,r9 - mov r14,rbx - bswap r12 - ror r13,23 - mov rdi,r10 - - xor r13,r9 - ror r14,5 - xor rdi,r11 - - mov QWORD[120+rsp],r12 - xor r14,rbx - and rdi,r9 - - ror r13,4 - add r12,rax - xor rdi,r11 - - ror r14,6 - xor r13,r9 - add r12,rdi - - mov rdi,rbx - add r12,QWORD[rbp] - xor r14,rbx - - xor rdi,rcx - ror r13,14 - mov rax,rcx - - and r15,rdi - ror r14,28 - add r12,r13 - - xor rax,r15 - add r8,r12 - add rax,r12 - - lea rbp,[24+rbp] - jmp NEAR $L$rounds_16_xx -ALIGN 16 -$L$rounds_16_xx: - mov r13,QWORD[8+rsp] - mov r15,QWORD[112+rsp] - - mov r12,r13 - ror r13,7 - add rax,r14 - mov r14,r15 - ror r15,42 - - xor r13,r12 - shr r12,7 - ror r13,1 - xor r15,r14 - shr r14,6 - - ror r15,19 - xor r12,r13 - xor r15,r14 - add r12,QWORD[72+rsp] - - add r12,QWORD[rsp] - mov r13,r8 - add r12,r15 - mov r14,rax - ror r13,23 - mov r15,r9 - - xor r13,r8 - ror r14,5 - xor r15,r10 - - mov QWORD[rsp],r12 - xor r14,rax - and r15,r8 - - ror r13,4 - add r12,r11 - xor r15,r10 - - ror r14,6 - xor r13,r8 - add r12,r15 - - mov r15,rax - add r12,QWORD[rbp] - xor r14,rax - - xor r15,rbx - ror r13,14 - mov r11,rbx - - and rdi,r15 - ror r14,28 - add r12,r13 - - xor r11,rdi - add rdx,r12 - add r11,r12 - - lea rbp,[8+rbp] - mov r13,QWORD[16+rsp] - mov rdi,QWORD[120+rsp] - - mov r12,r13 - ror r13,7 - add r11,r14 - mov r14,rdi - ror rdi,42 - - xor r13,r12 - shr r12,7 - ror r13,1 - xor rdi,r14 - shr r14,6 - - ror rdi,19 - xor r12,r13 - xor rdi,r14 - add r12,QWORD[80+rsp] - - add r12,QWORD[8+rsp] - mov r13,rdx - add r12,rdi - mov r14,r11 - ror r13,23 - mov rdi,r8 - - xor r13,rdx - ror r14,5 - xor rdi,r9 - - mov QWORD[8+rsp],r12 - xor r14,r11 - and rdi,rdx - - ror r13,4 - add r12,r10 - xor rdi,r9 - - ror r14,6 - xor r13,rdx - add r12,rdi - - mov rdi,r11 - add r12,QWORD[rbp] - xor r14,r11 - - xor rdi,rax - ror r13,14 - mov r10,rax - - and r15,rdi - ror r14,28 - add r12,r13 - - xor r10,r15 - add rcx,r12 - add r10,r12 - - lea rbp,[24+rbp] - mov r13,QWORD[24+rsp] - mov r15,QWORD[rsp] - - mov r12,r13 - ror r13,7 - add r10,r14 - mov r14,r15 - ror r15,42 - - xor r13,r12 - shr r12,7 - ror r13,1 - xor r15,r14 - shr r14,6 - - ror r15,19 - xor r12,r13 - xor r15,r14 - add r12,QWORD[88+rsp] - - add r12,QWORD[16+rsp] - mov r13,rcx - add r12,r15 - mov r14,r10 - ror r13,23 - mov r15,rdx - - xor r13,rcx - ror r14,5 - xor r15,r8 - - mov QWORD[16+rsp],r12 - xor r14,r10 - and r15,rcx - - ror r13,4 - add r12,r9 - xor r15,r8 - - ror r14,6 - xor r13,rcx - add r12,r15 - - mov r15,r10 - add r12,QWORD[rbp] - xor r14,r10 - - xor r15,r11 - ror r13,14 - mov r9,r11 - - and rdi,r15 - ror r14,28 - add r12,r13 - - xor r9,rdi - add rbx,r12 - add r9,r12 - - lea rbp,[8+rbp] - mov r13,QWORD[32+rsp] - mov rdi,QWORD[8+rsp] - - mov r12,r13 - ror r13,7 - add r9,r14 - mov r14,rdi - ror rdi,42 - - xor r13,r12 - shr r12,7 - ror r13,1 - xor rdi,r14 - shr r14,6 - - ror rdi,19 - xor r12,r13 - xor rdi,r14 - add r12,QWORD[96+rsp] - - add r12,QWORD[24+rsp] - mov r13,rbx - add r12,rdi - mov r14,r9 - ror r13,23 - mov rdi,rcx - - xor r13,rbx - ror r14,5 - xor rdi,rdx - - mov QWORD[24+rsp],r12 - xor r14,r9 - and rdi,rbx - - ror r13,4 - add r12,r8 - xor rdi,rdx - - ror r14,6 - xor r13,rbx - add r12,rdi - - mov rdi,r9 - add r12,QWORD[rbp] - xor r14,r9 - - xor rdi,r10 - ror r13,14 - mov r8,r10 - - and r15,rdi - ror r14,28 - add r12,r13 - - xor r8,r15 - add rax,r12 - add r8,r12 - - lea rbp,[24+rbp] - mov r13,QWORD[40+rsp] - mov r15,QWORD[16+rsp] - - mov r12,r13 - ror r13,7 - add r8,r14 - mov r14,r15 - ror r15,42 - - xor r13,r12 - shr r12,7 - ror r13,1 - xor r15,r14 - shr r14,6 - - ror r15,19 - xor r12,r13 - xor r15,r14 - add r12,QWORD[104+rsp] - - add r12,QWORD[32+rsp] - mov r13,rax - add r12,r15 - mov r14,r8 - ror r13,23 - mov r15,rbx - - xor r13,rax - ror r14,5 - xor r15,rcx - - mov QWORD[32+rsp],r12 - xor r14,r8 - and r15,rax - - ror r13,4 - add r12,rdx - xor r15,rcx - - ror r14,6 - xor r13,rax - add r12,r15 - - mov r15,r8 - add r12,QWORD[rbp] - xor r14,r8 - - xor r15,r9 - ror r13,14 - mov rdx,r9 - - and rdi,r15 - ror r14,28 - add r12,r13 - - xor rdx,rdi - add r11,r12 - add rdx,r12 - - lea rbp,[8+rbp] - mov r13,QWORD[48+rsp] - mov rdi,QWORD[24+rsp] - - mov r12,r13 - ror r13,7 - add rdx,r14 - mov r14,rdi - ror rdi,42 - - xor r13,r12 - shr r12,7 - ror r13,1 - xor rdi,r14 - shr r14,6 - - ror rdi,19 - xor r12,r13 - xor rdi,r14 - add r12,QWORD[112+rsp] - - add r12,QWORD[40+rsp] - mov r13,r11 - add r12,rdi - mov r14,rdx - ror r13,23 - mov rdi,rax - - xor r13,r11 - ror r14,5 - xor rdi,rbx - - mov QWORD[40+rsp],r12 - xor r14,rdx - and rdi,r11 - - ror r13,4 - add r12,rcx - xor rdi,rbx - - ror r14,6 - xor r13,r11 - add r12,rdi - - mov rdi,rdx - add r12,QWORD[rbp] - xor r14,rdx - - xor rdi,r8 - ror r13,14 - mov rcx,r8 - - and r15,rdi - ror r14,28 - add r12,r13 - - xor rcx,r15 - add r10,r12 - add rcx,r12 - - lea rbp,[24+rbp] - mov r13,QWORD[56+rsp] - mov r15,QWORD[32+rsp] - - mov r12,r13 - ror r13,7 - add rcx,r14 - mov r14,r15 - ror r15,42 - - xor r13,r12 - shr r12,7 - ror r13,1 - xor r15,r14 - shr r14,6 - - ror r15,19 - xor r12,r13 - xor r15,r14 - add r12,QWORD[120+rsp] - - add r12,QWORD[48+rsp] - mov r13,r10 - add r12,r15 - mov r14,rcx - ror r13,23 - mov r15,r11 - - xor r13,r10 - ror r14,5 - xor r15,rax - - mov QWORD[48+rsp],r12 - xor r14,rcx - and r15,r10 - - ror r13,4 - add r12,rbx - xor r15,rax - - ror r14,6 - xor r13,r10 - add r12,r15 - - mov r15,rcx - add r12,QWORD[rbp] - xor r14,rcx - - xor r15,rdx - ror r13,14 - mov rbx,rdx - - and rdi,r15 - ror r14,28 - add r12,r13 - - xor rbx,rdi - add r9,r12 - add rbx,r12 - - lea rbp,[8+rbp] - mov r13,QWORD[64+rsp] - mov rdi,QWORD[40+rsp] - - mov r12,r13 - ror r13,7 - add rbx,r14 - mov r14,rdi - ror rdi,42 - - xor r13,r12 - shr r12,7 - ror r13,1 - xor rdi,r14 - shr r14,6 - - ror rdi,19 - xor r12,r13 - xor rdi,r14 - add r12,QWORD[rsp] - - add r12,QWORD[56+rsp] - mov r13,r9 - add r12,rdi - mov r14,rbx - ror r13,23 - mov rdi,r10 - - xor r13,r9 - ror r14,5 - xor rdi,r11 - - mov QWORD[56+rsp],r12 - xor r14,rbx - and rdi,r9 - - ror r13,4 - add r12,rax - xor rdi,r11 - - ror r14,6 - xor r13,r9 - add r12,rdi - - mov rdi,rbx - add r12,QWORD[rbp] - xor r14,rbx - - xor rdi,rcx - ror r13,14 - mov rax,rcx - - and r15,rdi - ror r14,28 - add r12,r13 - - xor rax,r15 - add r8,r12 - add rax,r12 - - lea rbp,[24+rbp] - mov r13,QWORD[72+rsp] - mov r15,QWORD[48+rsp] - - mov r12,r13 - ror r13,7 - add rax,r14 - mov r14,r15 - ror r15,42 - - xor r13,r12 - shr r12,7 - ror r13,1 - xor r15,r14 - shr r14,6 - - ror r15,19 - xor r12,r13 - xor r15,r14 - add r12,QWORD[8+rsp] - - add r12,QWORD[64+rsp] - mov r13,r8 - add r12,r15 - mov r14,rax - ror r13,23 - mov r15,r9 - - xor r13,r8 - ror r14,5 - xor r15,r10 - - mov QWORD[64+rsp],r12 - xor r14,rax - and r15,r8 - - ror r13,4 - add r12,r11 - xor r15,r10 - - ror r14,6 - xor r13,r8 - add r12,r15 - - mov r15,rax - add r12,QWORD[rbp] - xor r14,rax - - xor r15,rbx - ror r13,14 - mov r11,rbx - - and rdi,r15 - ror r14,28 - add r12,r13 - - xor r11,rdi - add rdx,r12 - add r11,r12 - - lea rbp,[8+rbp] - mov r13,QWORD[80+rsp] - mov rdi,QWORD[56+rsp] - - mov r12,r13 - ror r13,7 - add r11,r14 - mov r14,rdi - ror rdi,42 - - xor r13,r12 - shr r12,7 - ror r13,1 - xor rdi,r14 - shr r14,6 - - ror rdi,19 - xor r12,r13 - xor rdi,r14 - add r12,QWORD[16+rsp] - - add r12,QWORD[72+rsp] - mov r13,rdx - add r12,rdi - mov r14,r11 - ror r13,23 - mov rdi,r8 - - xor r13,rdx - ror r14,5 - xor rdi,r9 - - mov QWORD[72+rsp],r12 - xor r14,r11 - and rdi,rdx - - ror r13,4 - add r12,r10 - xor rdi,r9 - - ror r14,6 - xor r13,rdx - add r12,rdi - - mov rdi,r11 - add r12,QWORD[rbp] - xor r14,r11 - - xor rdi,rax - ror r13,14 - mov r10,rax - - and r15,rdi - ror r14,28 - add r12,r13 - - xor r10,r15 - add rcx,r12 - add r10,r12 - - lea rbp,[24+rbp] - mov r13,QWORD[88+rsp] - mov r15,QWORD[64+rsp] - - mov r12,r13 - ror r13,7 - add r10,r14 - mov r14,r15 - ror r15,42 - - xor r13,r12 - shr r12,7 - ror r13,1 - xor r15,r14 - shr r14,6 - - ror r15,19 - xor r12,r13 - xor r15,r14 - add r12,QWORD[24+rsp] - - add r12,QWORD[80+rsp] - mov r13,rcx - add r12,r15 - mov r14,r10 - ror r13,23 - mov r15,rdx - - xor r13,rcx - ror r14,5 - xor r15,r8 - - mov QWORD[80+rsp],r12 - xor r14,r10 - and r15,rcx - - ror r13,4 - add r12,r9 - xor r15,r8 - - ror r14,6 - xor r13,rcx - add r12,r15 - - mov r15,r10 - add r12,QWORD[rbp] - xor r14,r10 - - xor r15,r11 - ror r13,14 - mov r9,r11 - - and rdi,r15 - ror r14,28 - add r12,r13 - - xor r9,rdi - add rbx,r12 - add r9,r12 - - lea rbp,[8+rbp] - mov r13,QWORD[96+rsp] - mov rdi,QWORD[72+rsp] - - mov r12,r13 - ror r13,7 - add r9,r14 - mov r14,rdi - ror rdi,42 - - xor r13,r12 - shr r12,7 - ror r13,1 - xor rdi,r14 - shr r14,6 - - ror rdi,19 - xor r12,r13 - xor rdi,r14 - add r12,QWORD[32+rsp] - - add r12,QWORD[88+rsp] - mov r13,rbx - add r12,rdi - mov r14,r9 - ror r13,23 - mov rdi,rcx - - xor r13,rbx - ror r14,5 - xor rdi,rdx - - mov QWORD[88+rsp],r12 - xor r14,r9 - and rdi,rbx - - ror r13,4 - add r12,r8 - xor rdi,rdx - - ror r14,6 - xor r13,rbx - add r12,rdi - - mov rdi,r9 - add r12,QWORD[rbp] - xor r14,r9 - - xor rdi,r10 - ror r13,14 - mov r8,r10 - - and r15,rdi - ror r14,28 - add r12,r13 - - xor r8,r15 - add rax,r12 - add r8,r12 - - lea rbp,[24+rbp] - mov r13,QWORD[104+rsp] - mov r15,QWORD[80+rsp] - - mov r12,r13 - ror r13,7 - add r8,r14 - mov r14,r15 - ror r15,42 - - xor r13,r12 - shr r12,7 - ror r13,1 - xor r15,r14 - shr r14,6 - - ror r15,19 - xor r12,r13 - xor r15,r14 - add r12,QWORD[40+rsp] - - add r12,QWORD[96+rsp] - mov r13,rax - add r12,r15 - mov r14,r8 - ror r13,23 - mov r15,rbx - - xor r13,rax - ror r14,5 - xor r15,rcx - - mov QWORD[96+rsp],r12 - xor r14,r8 - and r15,rax - - ror r13,4 - add r12,rdx - xor r15,rcx - - ror r14,6 - xor r13,rax - add r12,r15 - - mov r15,r8 - add r12,QWORD[rbp] - xor r14,r8 - - xor r15,r9 - ror r13,14 - mov rdx,r9 - - and rdi,r15 - ror r14,28 - add r12,r13 - - xor rdx,rdi - add r11,r12 - add rdx,r12 - - lea rbp,[8+rbp] - mov r13,QWORD[112+rsp] - mov rdi,QWORD[88+rsp] - - mov r12,r13 - ror r13,7 - add rdx,r14 - mov r14,rdi - ror rdi,42 - - xor r13,r12 - shr r12,7 - ror r13,1 - xor rdi,r14 - shr r14,6 - - ror rdi,19 - xor r12,r13 - xor rdi,r14 - add r12,QWORD[48+rsp] - - add r12,QWORD[104+rsp] - mov r13,r11 - add r12,rdi - mov r14,rdx - ror r13,23 - mov rdi,rax - - xor r13,r11 - ror r14,5 - xor rdi,rbx - - mov QWORD[104+rsp],r12 - xor r14,rdx - and rdi,r11 - - ror r13,4 - add r12,rcx - xor rdi,rbx - - ror r14,6 - xor r13,r11 - add r12,rdi - - mov rdi,rdx - add r12,QWORD[rbp] - xor r14,rdx - - xor rdi,r8 - ror r13,14 - mov rcx,r8 - - and r15,rdi - ror r14,28 - add r12,r13 - - xor rcx,r15 - add r10,r12 - add rcx,r12 - - lea rbp,[24+rbp] - mov r13,QWORD[120+rsp] - mov r15,QWORD[96+rsp] - - mov r12,r13 - ror r13,7 - add rcx,r14 - mov r14,r15 - ror r15,42 - - xor r13,r12 - shr r12,7 - ror r13,1 - xor r15,r14 - shr r14,6 - - ror r15,19 - xor r12,r13 - xor r15,r14 - add r12,QWORD[56+rsp] - - add r12,QWORD[112+rsp] - mov r13,r10 - add r12,r15 - mov r14,rcx - ror r13,23 - mov r15,r11 - - xor r13,r10 - ror r14,5 - xor r15,rax - - mov QWORD[112+rsp],r12 - xor r14,rcx - and r15,r10 - - ror r13,4 - add r12,rbx - xor r15,rax - - ror r14,6 - xor r13,r10 - add r12,r15 - - mov r15,rcx - add r12,QWORD[rbp] - xor r14,rcx - - xor r15,rdx - ror r13,14 - mov rbx,rdx - - and rdi,r15 - ror r14,28 - add r12,r13 - - xor rbx,rdi - add r9,r12 - add rbx,r12 - - lea rbp,[8+rbp] - mov r13,QWORD[rsp] - mov rdi,QWORD[104+rsp] - - mov r12,r13 - ror r13,7 - add rbx,r14 - mov r14,rdi - ror rdi,42 - - xor r13,r12 - shr r12,7 - ror r13,1 - xor rdi,r14 - shr r14,6 - - ror rdi,19 - xor r12,r13 - xor rdi,r14 - add r12,QWORD[64+rsp] - - add r12,QWORD[120+rsp] - mov r13,r9 - add r12,rdi - mov r14,rbx - ror r13,23 - mov rdi,r10 - - xor r13,r9 - ror r14,5 - xor rdi,r11 - - mov QWORD[120+rsp],r12 - xor r14,rbx - and rdi,r9 - - ror r13,4 - add r12,rax - xor rdi,r11 - - ror r14,6 - xor r13,r9 - add r12,rdi - - mov rdi,rbx - add r12,QWORD[rbp] - xor r14,rbx - - xor rdi,rcx - ror r13,14 - mov rax,rcx - - and r15,rdi - ror r14,28 - add r12,r13 - - xor rax,r15 - add r8,r12 - add rax,r12 - - lea rbp,[24+rbp] - cmp BYTE[7+rbp],0 - jnz NEAR $L$rounds_16_xx - - mov rdi,QWORD[((128+0))+rsp] - add rax,r14 - lea rsi,[128+rsi] - - add rax,QWORD[rdi] - add rbx,QWORD[8+rdi] - add rcx,QWORD[16+rdi] - add rdx,QWORD[24+rdi] - add r8,QWORD[32+rdi] - add r9,QWORD[40+rdi] - add r10,QWORD[48+rdi] - add r11,QWORD[56+rdi] - - cmp rsi,QWORD[((128+16))+rsp] - - mov QWORD[rdi],rax - mov QWORD[8+rdi],rbx - mov QWORD[16+rdi],rcx - mov QWORD[24+rdi],rdx - mov QWORD[32+rdi],r8 - mov QWORD[40+rdi],r9 - mov QWORD[48+rdi],r10 - mov QWORD[56+rdi],r11 - jb NEAR $L$loop - - mov rsi,QWORD[((128+24))+rsp] - mov r15,QWORD[rsi] - mov r14,QWORD[8+rsi] - mov r13,QWORD[16+rsi] - mov r12,QWORD[24+rsi] - mov rbp,QWORD[32+rsi] - mov rbx,QWORD[40+rsi] - lea rsp,[48+rsi] -$L$epilogue: - mov rdi,QWORD[8+rsp] ;WIN64 epilogue - mov rsi,QWORD[16+rsp] - DB 0F3h,0C3h ;repret -$L$SEH_end_sha512_block_data_order: -ALIGN 64 - -K512: - DQ 0x428a2f98d728ae22,0x7137449123ef65cd - DQ 0x428a2f98d728ae22,0x7137449123ef65cd - DQ 0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc - DQ 0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc - DQ 0x3956c25bf348b538,0x59f111f1b605d019 - DQ 0x3956c25bf348b538,0x59f111f1b605d019 - DQ 0x923f82a4af194f9b,0xab1c5ed5da6d8118 - DQ 0x923f82a4af194f9b,0xab1c5ed5da6d8118 - DQ 0xd807aa98a3030242,0x12835b0145706fbe - DQ 0xd807aa98a3030242,0x12835b0145706fbe - DQ 0x243185be4ee4b28c,0x550c7dc3d5ffb4e2 - DQ 0x243185be4ee4b28c,0x550c7dc3d5ffb4e2 - DQ 0x72be5d74f27b896f,0x80deb1fe3b1696b1 - DQ 0x72be5d74f27b896f,0x80deb1fe3b1696b1 - DQ 0x9bdc06a725c71235,0xc19bf174cf692694 - DQ 0x9bdc06a725c71235,0xc19bf174cf692694 - DQ 0xe49b69c19ef14ad2,0xefbe4786384f25e3 - DQ 0xe49b69c19ef14ad2,0xefbe4786384f25e3 - DQ 0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65 - DQ 0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65 - DQ 0x2de92c6f592b0275,0x4a7484aa6ea6e483 - DQ 0x2de92c6f592b0275,0x4a7484aa6ea6e483 - DQ 0x5cb0a9dcbd41fbd4,0x76f988da831153b5 - DQ 0x5cb0a9dcbd41fbd4,0x76f988da831153b5 - DQ 0x983e5152ee66dfab,0xa831c66d2db43210 - DQ 0x983e5152ee66dfab,0xa831c66d2db43210 - DQ 0xb00327c898fb213f,0xbf597fc7beef0ee4 - DQ 0xb00327c898fb213f,0xbf597fc7beef0ee4 - DQ 0xc6e00bf33da88fc2,0xd5a79147930aa725 - DQ 0xc6e00bf33da88fc2,0xd5a79147930aa725 - DQ 0x06ca6351e003826f,0x142929670a0e6e70 - DQ 0x06ca6351e003826f,0x142929670a0e6e70 - DQ 0x27b70a8546d22ffc,0x2e1b21385c26c926 - DQ 0x27b70a8546d22ffc,0x2e1b21385c26c926 - DQ 0x4d2c6dfc5ac42aed,0x53380d139d95b3df - DQ 0x4d2c6dfc5ac42aed,0x53380d139d95b3df - DQ 0x650a73548baf63de,0x766a0abb3c77b2a8 - DQ 0x650a73548baf63de,0x766a0abb3c77b2a8 - DQ 0x81c2c92e47edaee6,0x92722c851482353b - DQ 0x81c2c92e47edaee6,0x92722c851482353b - DQ 0xa2bfe8a14cf10364,0xa81a664bbc423001 - DQ 0xa2bfe8a14cf10364,0xa81a664bbc423001 - DQ 0xc24b8b70d0f89791,0xc76c51a30654be30 - DQ 0xc24b8b70d0f89791,0xc76c51a30654be30 - DQ 0xd192e819d6ef5218,0xd69906245565a910 - DQ 0xd192e819d6ef5218,0xd69906245565a910 - DQ 0xf40e35855771202a,0x106aa07032bbd1b8 - DQ 0xf40e35855771202a,0x106aa07032bbd1b8 - DQ 0x19a4c116b8d2d0c8,0x1e376c085141ab53 - DQ 0x19a4c116b8d2d0c8,0x1e376c085141ab53 - DQ 0x2748774cdf8eeb99,0x34b0bcb5e19b48a8 - DQ 0x2748774cdf8eeb99,0x34b0bcb5e19b48a8 - DQ 0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb - DQ 0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb - DQ 0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3 - DQ 0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3 - DQ 0x748f82ee5defb2fc,0x78a5636f43172f60 - DQ 0x748f82ee5defb2fc,0x78a5636f43172f60 - DQ 0x84c87814a1f0ab72,0x8cc702081a6439ec - DQ 0x84c87814a1f0ab72,0x8cc702081a6439ec - DQ 0x90befffa23631e28,0xa4506cebde82bde9 - DQ 0x90befffa23631e28,0xa4506cebde82bde9 - DQ 0xbef9a3f7b2c67915,0xc67178f2e372532b - DQ 0xbef9a3f7b2c67915,0xc67178f2e372532b - DQ 0xca273eceea26619c,0xd186b8c721c0c207 - DQ 0xca273eceea26619c,0xd186b8c721c0c207 - DQ 0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178 - DQ 0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178 - DQ 0x06f067aa72176fba,0x0a637dc5a2c898a6 - DQ 0x06f067aa72176fba,0x0a637dc5a2c898a6 - DQ 0x113f9804bef90dae,0x1b710b35131c471b - DQ 0x113f9804bef90dae,0x1b710b35131c471b - DQ 0x28db77f523047d84,0x32caab7b40c72493 - DQ 0x28db77f523047d84,0x32caab7b40c72493 - DQ 0x3c9ebe0a15c9bebc,0x431d67c49c100d4c - DQ 0x3c9ebe0a15c9bebc,0x431d67c49c100d4c - DQ 0x4cc5d4becb3e42b6,0x597f299cfc657e2a - DQ 0x4cc5d4becb3e42b6,0x597f299cfc657e2a - DQ 0x5fcb6fab3ad6faec,0x6c44198c4a475817 - DQ 0x5fcb6fab3ad6faec,0x6c44198c4a475817 - - DQ 0x0001020304050607,0x08090a0b0c0d0e0f - DQ 0x0001020304050607,0x08090a0b0c0d0e0f -DB 83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97 -DB 110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54 -DB 52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121 -DB 32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46 -DB 111,114,103,62,0 -EXTERN __imp_RtlVirtualUnwind - -ALIGN 16 -se_handler: - push rsi - push rdi - push rbx - push rbp - push r12 - push r13 - push r14 - push r15 - pushfq - sub rsp,64 - - mov rax,QWORD[120+r8] - mov rbx,QWORD[248+r8] - - mov rsi,QWORD[8+r9] - mov r11,QWORD[56+r9] - - mov r10d,DWORD[r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jb NEAR $L$in_prologue - - mov rax,QWORD[152+r8] - - mov r10d,DWORD[4+r11] - lea r10,[r10*1+rsi] - cmp rbx,r10 - jae NEAR $L$in_prologue - mov rsi,rax - mov rax,QWORD[((128+24))+rax] - lea rax,[48+rax] - - mov rbx,QWORD[((-8))+rax] - mov rbp,QWORD[((-16))+rax] - mov r12,QWORD[((-24))+rax] - mov r13,QWORD[((-32))+rax] - mov r14,QWORD[((-40))+rax] - mov r15,QWORD[((-48))+rax] - mov QWORD[144+r8],rbx - mov QWORD[160+r8],rbp - mov QWORD[216+r8],r12 - mov QWORD[224+r8],r13 - mov QWORD[232+r8],r14 - mov QWORD[240+r8],r15 - - lea r10,[$L$epilogue] - cmp rbx,r10 - jb NEAR $L$in_prologue - - lea rsi,[((128+32))+rsi] - lea rdi,[512+r8] - mov ecx,12 - DD 0xa548f3fc - -$L$in_prologue: - mov rdi,QWORD[8+rax] - mov rsi,QWORD[16+rax] - mov QWORD[152+r8],rax - mov QWORD[168+r8],rsi - mov QWORD[176+r8],rdi - - mov rdi,QWORD[40+r9] - mov rsi,r8 - mov ecx,154 - DD 0xa548f3fc - - mov rsi,r9 - xor rcx,rcx - mov rdx,QWORD[8+rsi] - mov r8,QWORD[rsi] - mov r9,QWORD[16+rsi] - mov r10,QWORD[40+rsi] - lea r11,[56+rsi] - lea r12,[24+rsi] - mov QWORD[32+rsp],r10 - mov QWORD[40+rsp],r11 - mov QWORD[48+rsp],r12 - mov QWORD[56+rsp],rcx - call QWORD[__imp_RtlVirtualUnwind] - - mov eax,1 - add rsp,64 - popfq - pop r15 - pop r14 - pop r13 - pop r12 - pop rbp - pop rbx - pop rdi - pop rsi - DB 0F3h,0C3h ;repret - -section .pdata rdata align=4 -ALIGN 4 - DD $L$SEH_begin_sha512_block_data_order wrt ..imagebase - DD $L$SEH_end_sha512_block_data_order wrt ..imagebase - DD $L$SEH_info_sha512_block_data_order wrt ..imagebase -section .xdata rdata align=8 -ALIGN 8 -$L$SEH_info_sha512_block_data_order: -DB 9,0,0,0 - DD se_handler wrt ..imagebase - DD $L$prologue wrt ..imagebase,$L$epilogue wrt ..imagebase diff --git a/third_party/cython/LICENSE b/third_party/cython/LICENSE deleted file mode 100644 index d9a10c0d8e868..0000000000000 --- a/third_party/cython/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/third_party/cython/OWNERS b/third_party/cython/OWNERS deleted file mode 100644 index 63938a8c23a34..0000000000000 --- a/third_party/cython/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -# Primary point of contact for reviews -qsr@chromium.org - -pkl@chromium.org diff --git a/third_party/cython/README.chromium b/third_party/cython/README.chromium deleted file mode 100644 index 241aa9f489c58..0000000000000 --- a/third_party/cython/README.chromium +++ /dev/null @@ -1,14 +0,0 @@ -Name: cython -URL: http://cython.org/ -Version: 0.20.2 -Security Critical: no -License: Apache Version 2.0 -License File: NOT_SHIPPED -Source File: http://cython.org/release/Cython-0.20.2.zip -Source File SHA256: 52eb018be32f7f9745171ed77d3363f4782046cc94d19ee68e10bd10531833b1 -Description: -Cython is an optimising static compiler for both the Python programming -language and the extended Cython programming language (based on Pyrex). It -makes writing C extensions for Python as easy as Python itself. - -Tests, documentation and demo have been removed from the project. diff --git a/third_party/cython/python_export.h b/third_party/cython/python_export.h deleted file mode 100644 index e943399c2ce07..0000000000000 --- a/third_party/cython/python_export.h +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#if defined(PyMODINIT_FUNC) -#undef PyMODINIT_FUNC -#endif - -#if defined(WIN32) -#define PyMODINIT_FUNC extern "C" __declspec(dllexport) void -#else -#define PyMODINIT_FUNC extern "C" __attribute__((visibility("default"))) void -#endif diff --git a/third_party/cython/python_flags.py b/third_party/cython/python_flags.py deleted file mode 100644 index 3c3b93627667e..0000000000000 --- a/third_party/cython/python_flags.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import argparse -import os -import sys -import sysconfig - -def main(): - """Command line utility to retrieve compilation options for python modules' - """ - parser = argparse.ArgumentParser( - description='Retrieves compilation options for python modules.') - parser.add_argument('--libraries', help='Returns libraries', - action='store_true') - parser.add_argument('--includes', help='Returns includes', - action='store_true') - parser.add_argument('--library_dirs', help='Returns library_dirs', - action='store_true') - opts = parser.parse_args() - - result = [] - - if opts.libraries: - python_lib = sysconfig.get_config_var('LDLIBRARY') - if python_lib.endswith(".so"): - python_lib = python_lib[:-3] - if python_lib.startswith("lib"): - python_lib = python_lib[3:] - - result.append(python_lib) - - if opts.includes: - result.append(sysconfig.get_config_var('INCLUDEPY')) - - if opts.library_dirs: - result.append(sysconfig.get_config_var('BINLIBDEST')) - - for x in result: - print x - -if __name__ == '__main__': - main() diff --git a/third_party/cython/python_module.gypi b/third_party/cython/python_module.gypi deleted file mode 100644 index 138c416966006..0000000000000 --- a/third_party/cython/python_module.gypi +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'python_module_destination': '<(PRODUCT_DIR)/python/<(python_base_module)', - }, - 'rules': [ - { - 'rule_name': '<(_target_name)_cp_python', - 'extension': 'py', - 'inputs': [ - '<(DEPTH)/build/cp.py', - ], - 'outputs': [ - '<(python_module_destination)/<(RULE_INPUT_NAME)', - ], - 'action': [ - 'python', - '<@(_inputs)', - '<(RULE_INPUT_PATH)', - '<@(_outputs)', - ], - 'message': 'Moving <(RULE_INPUT_PATH) to its destination', - }, - ], - 'hard_dependency': 1, -} diff --git a/third_party/cython/rules.gni b/third_party/cython/rules.gni deleted file mode 100644 index ea6e0aebf6f4d..0000000000000 --- a/third_party/cython/rules.gni +++ /dev/null @@ -1,161 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -template("python_binary_source_set") { - # Only available on linux for now. - assert(is_linux) - assert(defined(invoker.cython_sources) || defined(invoker.sources)) - - config_name = target_name + "_python_config" - - target_visibility = [ ":$target_name" ] - - if (defined(invoker.cython_sources)) { - generator_target_name = target_name + "_cython_compiler" - - cython_root = "//third_party/cython" - cython_script = "$cython_root/src/cython.py" - cython_output = "${target_out_dir}/${target_name}.cc" - - action(generator_target_name) { - visibility = target_visibility - script = cython_script - sources = invoker.cython_sources - outputs = [ - cython_output, - ] - args = [ - "--cplus", - "-I", - rebase_path("//", root_build_dir), - "-I", - rebase_path(target_gen_dir, root_build_dir), - "-o", - rebase_path(cython_output, root_build_dir), - ] + rebase_path(sources, root_build_dir) - } - } - - config(config_name) { - visibility = target_visibility - python_flags = "//third_party/cython/python_flags.py" - include_dirs = exec_script(python_flags, [ "--includes" ], "list lines") - libs = exec_script(python_flags, [ "--libraries" ], "list lines") - lib_dirs = exec_script(python_flags, [ "--library_dirs" ], "list lines") - if (!is_win) { - # Generated code includes static utility functions that often go unused. - cflags = [ "-Wno-unused-function" ] - } - } - - source_set(target_name) { - if (defined(invoker.visibility)) { - visibility = invoker.visibility - } - sources = [] - if (defined(invoker.cython_sources)) { - sources += [ cython_output ] - } - if (defined(invoker.sources)) { - sources += invoker.sources - } - if (defined(invoker.configs)) { - configs += invoker.configs - } - all_dependent_configs = [ ":$config_name" ] - deps = [] - if (defined(invoker.cython_sources)) { - deps += [ ":$generator_target_name" ] - } - if (defined(invoker.deps)) { - deps += invoker.deps - } - if (defined(invoker.datadeps)) { - datadeps = invoker.datadeps - } - } -} - -template("python_binary_module") { - # Only available on linux for now. - assert(is_linux) - - has_sources = defined(invoker.cython_sources) || defined(invoker.sources) - - assert(has_sources || defined(invoker.deps)) - assert( - !defined(invoker.python_base_module) || invoker.python_base_module != "") - - sources_target_name = target_name + "_cython_sources" - shared_library_name = target_name + "_shared_library" - - if (is_linux) { - shared_library_prefix = "lib" - shared_library_suffix = ".so" - python_module_suffix = ".so" - } - - target_visibility = [ - ":$sources_target_name", - ":$shared_library_name", - ":$target_name", - ] - - if (has_sources) { - python_binary_source_set(sources_target_name) { - visibility = target_visibility - if (defined(invoker.cython_sources)) { - cython_sources = invoker.cython_sources - } - if (defined(invoker.sources)) { - sources = invoker.sources - } - if (defined(invoker.configs)) { - configs = invoker.configs - } - if (defined(invoker.deps)) { - deps = invoker.deps - } - if (defined(invoker.datadeps)) { - datadeps = invoker.datadeps - } - } - } - - shared_library(shared_library_name) { - visibility = target_visibility - if (defined(invoker.configs)) { - configs += invoker.configs - } - deps = [] - if (has_sources) { - deps += [ ":$sources_target_name" ] - } - if (defined(invoker.deps)) { - deps += invoker.deps - } - if (defined(invoker.datadeps)) { - datadeps = invoker.datadeps - } - } - - copy(target_name) { - if (defined(invoker.python_base_module)) { - python_base_module = invoker.python_base_module - output = "$root_out_dir/python/$python_base_module/${target_name}${python_module_suffix}" - } else { - output = "$root_out_dir/python/${target_name}${python_module_suffix}" - } - - sources = [ - "$root_out_dir/${shared_library_prefix}${shared_library_name}${shared_library_suffix}", - ] - outputs = [ - output, - ] - deps = [ - ":$shared_library_name", - ] - } -} diff --git a/third_party/cython/src/CHANGES.rst b/third_party/cython/src/CHANGES.rst deleted file mode 100644 index d12eb2360c3ed..0000000000000 --- a/third_party/cython/src/CHANGES.rst +++ /dev/null @@ -1,916 +0,0 @@ -================ -Cython Changelog -================ - -0.20.2 (2014-06-16) -=================== - -Features added --------------- - -* Some optimisations for set/frozenset instantiation. - -* Support for C++ unordered_set and unordered_map. - -Bugs fixed ----------- - -* Access to attributes of optimised builtin methods (e.g. - ``[].append.__name__``) could fail to compile. - -* Memory leak when extension subtypes add a memory view as attribute - to those of the parent type without having Python object attributes - or a user provided dealloc method. - -* Compiler crash on readonly properties in "binding" mode. - -* Auto-encoding with ``c_string_encoding=ascii`` failed in Py3.3. - -* Crash when subtyping freelist enabled Cython extension types with - Python classes that use ``__slots__``. - -* Freelist usage is restricted to CPython to avoid problems with other - Python implementations. - -* Memory leak in memory views when copying overlapping, contiguous slices. - -* Format checking when requesting non-contiguous buffers from - ``cython.array`` objects was disabled in Py3. - -* C++ destructor calls in extension types could fail to compile in clang. - -* Buffer format validation failed for sequences of strings in structs. - -* Docstrings on extension type attributes in .pxd files were rejected. - - -0.20.1 (2014-02-11) -=================== - -Bugs fixed ----------- - -* Build error under recent MacOS-X versions where ``isspace()`` could not be - resolved by clang. - -* List/Tuple literals multiplied by more than one factor were only multiplied - by the last factor instead of all. - -* Lookups of special methods (specifically for context managers) could fail - in Python <= 2.6/3.1. - -* Local variables were erroneously appended to the signature introspection - of Cython implemented functions with keyword-only arguments under Python 3. - -* In-place assignments to variables with inferred Python builtin/extension - types could fail with type errors if the result value type was incompatible - with the type of the previous value. - -* The C code generation order of cdef classes, closures, helper code, - etc. was not deterministic, thus leading to high code churn. - -* Type inference could fail to deduce C enum types. - -* Type inference could deduce unsafe or inefficient types from integer - assignments within a mix of inferred Python variables and integer - variables. - - - -0.20 (2014-01-18) -================= - -Features added --------------- - -* Support for CPython 3.4. - -* Support for calling C++ template functions. - -* ``yield`` is supported in ``finally`` clauses. - -* The C code generated for finally blocks is duplicated for each exit - case to allow for better optimisations by the C compiler. - -* Cython tries to undo the Python optimisationism of assigning a bound - method to a local variable when it can generate better code for the - direct call. - -* Constant Python float values are cached. - -* String equality comparisons can use faster type specific code in - more cases than before. - -* String/Unicode formatting using the '%' operator uses a faster - C-API call. - -* ``bytearray`` has become a known type and supports coercion from and - to C strings. Indexing, slicing and decoding is optimised. Note that - this may have an impact on existing code due to type inference. - -* Using ``cdef basestring stringvar`` and function arguments typed as - ``basestring`` is now meaningful and allows assigning exactly - ``str`` and ``unicode`` objects, but no subtypes of these types. - -* Support for the ``__debug__`` builtin. - -* Assertions in Cython compiled modules are disabled if the running - Python interpreter was started with the "-O" option. - -* Some types that Cython provides internally, such as functions and - generators, are now shared across modules if more than one Cython - implemented module is imported. - -* The type inference algorithm works more fine granular by taking the - results of the control flow analysis into account. - -* A new script in ``bin/cythonize`` provides a command line frontend - to the cythonize() compilation function (including distutils build). - -* The new extension type decorator ``@cython.no_gc_clear`` prevents - objects from being cleared during cyclic garbage collection, thus - making sure that object attributes are kept alive until deallocation. - -* During cyclic garbage collection, attributes of extension types that - cannot create reference cycles due to their type (e.g. strings) are - no longer considered for traversal or clearing. This can reduce the - processing overhead when searching for or cleaning up reference cycles. - -* Package compilation (i.e. ``__init__.py`` files) now works, starting - with Python 3.3. - -* The cython-mode.el script for Emacs was updated. Patch by Ivan Andrus. - -* An option common_utility_include_dir was added to cythonize() to save - oft-used utility code once in a separate directory rather than as - part of each generated file. - -* ``unraisable_tracebacks`` directive added to control printing of - tracebacks of unraisable exceptions. - -Bugs fixed ----------- - -* Abstract Python classes that subtyped a Cython extension type - failed to raise an exception on instantiation, and thus ended - up being instantiated. - -* ``set.add(a_tuple)`` and ``set.discard(a_tuple)`` failed with a - TypeError in Py2.4. - -* The PEP 3155 ``__qualname__`` was incorrect for nested classes and - inner classes/functions declared as ``global``. - -* Several corner cases in the try-finally statement were fixed. - -* The metaclass of a Python class was not inherited from its parent - class(es). It is now extracted from the list of base classes if not - provided explicitly using the Py3 ``metaclass`` keyword argument. - In Py2 compilation mode, a ``__metaclass__`` entry in the class - dict will still take precedence if not using Py3 metaclass syntax, - but only *after* creating the class dict (which may have been done - by a metaclass of a base class, see PEP 3115). It is generally - recommended to use the explicit Py3 syntax to define metaclasses - for Python types at compile time. - -* The automatic C switch statement generation behaves more safely for - heterogeneous value types (e.g. mixing enum and char), allowing for - a slightly wider application and reducing corner cases. It now always - generates a 'default' clause to avoid C compiler warnings about - unmatched enum values. - -* Fixed a bug where class hierarchies declared out-of-order could result - in broken generated code. - -* Fixed a bug which prevented overriding const methods of C++ classes. - -* Fixed a crash when converting Python objects to C++ strings fails. - -Other changes -------------- - -* In Py3 compilation mode, Python2-style metaclasses declared by a - ``__metaclass__`` class dict entry are ignored. - -* In Py3.4+, the Cython generator type uses ``tp_finalize()`` for safer - cleanup instead of ``tp_del()``. - - -0.19.2 (2013-10-13) -=================== - -Features added --------------- - -Bugs fixed ----------- - -* Some standard declarations were fixed or updated, including the previously - incorrect declaration of ``PyBuffer_FillInfo()`` and some missing bits in - ``libc.math``. - -* Heap allocated subtypes of ``type`` used the wrong base type struct at the - C level. - -* Calling the unbound method dict.keys/value/items() in dict subtypes could - call the bound object method instead of the unbound supertype method. - -* "yield" wasn't supported in "return" value expressions. - -* Using the "bint" type in memory views lead to unexpected results. - It is now an error. - -* Assignments to global/closure variables could catch them in an illegal state - while deallocating the old value. - -Other changes -------------- - - -0.19.1 (2013-05-11) -=================== - -Features added --------------- - -* Completely empty C-API structs for extension type slots (protocols like - number/mapping/sequence) are no longer generated into the C code. - -* Docstrings that directly follow a public/readonly attribute declaration - in a cdef class will be used as docstring of the auto-generated property. - This fixes ticket 206. - -* The automatic signature documentation tries to preserve more semantics - of default arguments and argument types. Specifically, ``bint`` arguments - now appear as type ``bool``. - -* A warning is emitted when negative literal indices are found inside of - a code section that disables ``wraparound`` handling. This helps with - fixing invalid code that might fail in the face of future compiler - optimisations. - -* Constant folding for boolean expressions (and/or) was improved. - -* Added a build_dir option to cythonize() which allows one to place - the generated .c files outside the source tree. - -Bugs fixed ----------- - -* ``isinstance(X, type)`` failed to get optimised into a call to - ``PyType_Check()``, as done for other builtin types. - -* A spurious "from datetime cimport *" was removed from the "cpython" - declaration package. This means that the "datetime" declarations - (added in 0.19) are no longer available directly from the "cpython" - namespace, but only from "cpython.datetime". This is the correct - way of doing it because the declarations refer to a standard library - module, not the core CPython C-API itself. - -* The C code for extension types is now generated in topological order - instead of source code order to avoid C compiler errors about missing - declarations for subtypes that are defined before their parent. - -* The ``memoryview`` type name no longer shows up in the module dict of - modules that use memory views. This fixes trac ticket 775. - -* Regression in 0.19 that rejected valid C expressions from being used - in C array size declarations. - -* In C++ mode, the C99-only keyword ``restrict`` could accidentally be - seen by the GNU C++ compiler. It is now specially handled for both - GCC and MSVC. - -* Testing large (> int) C integer values for their truth value could fail - due to integer wrap-around. - -Other changes -------------- - - -0.19 (2013-04-19) -================= - -Features added --------------- - -* New directives ``c_string_type`` and ``c_string_encoding`` to more easily - and automatically convert between C strings and the different Python string - types. - -* The extension type flag ``Py_TPFLAGS_HAVE_VERSION_TAG`` is enabled by default - on extension types and can be disabled using the ``type_version_tag`` compiler - directive. - -* EXPERIMENTAL support for simple Cython code level line tracing. Enabled by - the "linetrace" compiler directive. - -* Cython implemented functions make their argument and return type annotations - available through the ``__annotations__`` attribute (PEP 3107). - -* Access to non-cdef module globals and Python object attributes is faster. - -* ``Py_UNICODE*`` coerces from and to Python unicode strings. This is - helpful when talking to Windows APIs, which use compatible wchar_t - arrays for strings. Note that the ``Py_UNICODE`` type is otherwise - deprecated as of CPython 3.3. - -* ``isinstance(obj, basestring)`` is optimised. In Python 3 it only tests - for instances of ``str`` (i.e. Py2 ``unicode``). - -* The ``basestring`` builtin is mapped to ``str`` (i.e. Py2 ``unicode``) when - compiling the generated C code under Python 3. - -* Closures use freelists, which can speed up their creation quite substantially. - This is also visible for short running generator expressions, for example. - -* A new class decorator ``@cython.freelist(N)`` creates a static freelist of N - instances for an extension type, thus avoiding the costly allocation step if - possible. This can speed up object instantiation by 20-30% in suitable - scenarios. Note that freelists are currently only supported for base types, - not for types that inherit from others. - -* Fast extension type instantiation using the ``Type.__new__(Type)`` idiom has - gained support for passing arguments. It is also a bit faster for types defined - inside of the module. - -* The Python2-only dict methods ``.iter*()`` and ``.view*()`` (requires Python 2.7) - are automatically mapped to the equivalent keys/values/items methods in Python 3 - for typed dictionaries. - -* Slicing unicode strings, lists and tuples is faster. - -* list.append() is faster on average. - -* ``raise Exception() from None`` suppresses the exception context in Py3.3. - -* Py3 compatible ``exec(tuple)`` syntax is supported in Py2 code. - -* Keyword arguments are supported for cdef functions. - -* External C++ classes can be declared nogil. Patch by John Stumpo. This fixes - trac ticket 805. - -Bugs fixed ----------- - -* 2-value slicing of unknown objects passes the correct slice when the ``getitem`` - protocol is used instead of the ``getslice`` protocol (especially in Python 3), - i.e. ``None`` values for missing bounds instead of ``[0,maxsize]``. It is also - a bit faster in some cases, e.g. for constant bounds. This fixes trac ticket 636. - -* Cascaded assignments of None values to extension type variables failed with - a ``TypeError`` at runtime. - -* The ``__defaults__`` attribute was not writable for Cython implemented - functions. - -* Default values of keyword-only arguments showed up in ``__defaults__`` instead - of ``__kwdefaults__`` (which was not implemented). Both are available for - Cython implemented functions now, as specified in Python 3.x. - -* ``yield`` works inside of ``with gil`` sections. It previously lead to a crash. - This fixes trac ticket 803. - -* Static methods without explicitly named positional arguments (e.g. having only - ``*args``) crashed when being called. This fixes trac ticket 804. - -* ``dir()`` without arguments previously returned an unsorted list, which now - gets sorted as expected. - -* ``dict.items()``, ``dict.keys()`` and ``dict.values()`` no longer return lists - in Python 3. - -* Exiting from an ``except-as`` clause now deletes the exception in Python 3 mode. - -* The declarations of ``frexp()`` and ``ldexp()`` in ``math.pxd`` were incorrect. - -Other changes -------------- - - -0.18 (2013-01-28) -================= - -Features added --------------- - -* Named Unicode escapes ("\N{...}") are supported. - -* Python functions/classes provide the special attribute "__qualname__" - as defined by PEP 3155. - -* Added a directive ``overflowcheck`` which raises an OverflowException when - arithmetic with C ints overflow. This has a modest performance penalty, but - is much faster than using Python ints. - -* Calls to nested Python functions are resolved at compile time. - -* Type inference works across nested functions. - -* ``py_bytes_string.decode(...)`` is optimised. - -* C ``const`` declarations are supported in the language. - -Bugs fixed ----------- - -* Automatic C++ exception mapping didn't work in nogil functions (only in - "with nogil" blocks). - -Other changes -------------- - - -0.17.4 (2013-01-03) -=================== - -Bugs fixed ----------- - -* Garbage collection triggered during deallocation of container classes could lead to a double-deallocation. - - -0.17.3 (2012-12-14) -=================== - -Features added --------------- - -Bugs fixed ----------- - -* During final interpreter cleanup (with types cleanup enabled at compile time), extension types that inherit from base types over more than one level that were cimported from other modules could lead to a crash. - -* Weak-reference support in extension types (with a ``cdef __weakref__`` attribute) generated incorrect deallocation code. - -* In CPython 3.3, converting a Unicode character to the Py_UNICODE type could fail to raise an overflow for non-BMP characters that do not fit into a wchar_t on the current platform. - -* Negative C integer constants lost their longness suffix in the generated C code. - -Other changes -------------- - - -0.17.2 (2012-11-20) -=================== - -Features added --------------- - -* ``cythonize()`` gained a best effort compile mode that can be used to simply ignore .py files that fail to compile. - -Bugs fixed ----------- - -* Replacing an object reference with the value of one of its cdef attributes could generate incorrect C code that accessed the object after deleting its last reference. - -* C-to-Python type coercions during cascaded comparisons could generate invalid C code, specifically when using the 'in' operator. - -* "obj[1,]" passed a single integer into the item getter instead of a tuple. - -* Cyclic imports at module init time did not work in Py3. - -* The names of C++ destructors for template classes were built incorrectly. - -* In pure mode, type casts in Cython syntax and the C ampersand operator are now rejected. Use the pure mode replacements instead. - -* In pure mode, C type names and the sizeof() function are no longer recognised as such and can be used as normal Python names. - -* The extended C level support for the CPython array type was declared too late to be used by user defined classes. - -* C++ class nesting was broken. - -* Better checking for required nullary constructors for stack-allocated C++ instances. - -* Remove module docstring in no-docstring mode. - -* Fix specialization for varargs function signatures. - -* Fix several compiler crashes. - -Other changes -------------- - -* An experimental distutils script for compiling the CPython standard library was added as Tools/cystdlib.py. - - -0.17.1 (2012-09-26) -=================== - -Features added --------------- - -Bugs fixed ----------- - -* A reference leak was fixed in the new dict iteration code when the loop target was not a plain variable but an unpacked tuple. - -* Memory views did not handle the special case of a NULL buffer strides value, as allowed by PEP3118. - -Other changes -------------- - - -0.17 (2012-09-01) -================= - -Features added --------------- - -* Alpha quality support for compiling and running Cython generated extension modules in PyPy (through cpyext). Note that this requires at least PyPy 1.9 and in many cases also adaptations in user code, especially to avoid borrowed references when no owned reference is being held directly in C space (a reference in a Python list or dict is not enough, for example). See the documentation on porting Cython code to PyPy. - -* "yield from" is supported (PEP 380) and a couple of minor problems with generators were fixed. - -* C++ STL container classes automatically coerce from and to the equivalent Python container types on typed assignments and casts. Note that the data in the containers is copied during this conversion. - -* C++ iterators can now be iterated over using "for x in cpp_container" whenever cpp_container has begin() and end() methods returning objects satisfying the iterator pattern (that is, it can be incremented, dereferenced, and compared (for non-equality)). - -* cdef classes can now have C++ class members (provided a zero-argument constructor exists) - -* A new cpython.array standard cimport file allows to efficiently talk to the stdlib array.array data type in Python 2. Since CPython does not export an official C-API for this module, it receives special casing by the compiler in order to avoid setup overhead on user side. In Python 3, both buffers and memory views on the array type already worked out of the box with earlier versions of Cython due to the native support for the buffer interface in the Py3 array module. - -* Fast dict iteration is now enabled optimistically also for untyped variables when the common iteration methods are used. - -* The unicode string processing code was adapted for the upcoming CPython 3.3 (PEP 393, new Unicode buffer layout). - -* Buffer arguments and memory view arguments in Python functions can be declared "not None" to raise a TypeError on None input. - -* c(p)def functions in pure mode can specify their return type with "@cython.returns()". - -* Automatic dispatch for fused functions with memoryview arguments - -* Support newaxis indexing for memoryviews - -* Support decorators for fused functions - -Bugs fixed ----------- - -* Old-style Py2 imports did not work reliably in Python 3.x and were broken in Python 3.3. Regardless of this fix, it's generally best to be explicit about relative and global imports in Cython code because old-style imports have a higher overhead. To this end, "from __future__ import absolute_import" is supported in Python/Cython 2.x code now (previous versions of Cython already used it when compiling Python 3 code). - -* Stricter constraints on the "inline" and "final" modifiers. If your code does not compile due to this change, chances are these modifiers were previously being ignored by the compiler and can be removed without any performance regression. - -* Exceptions are always instantiated while raising them (as in Python), instead of risking to instantiate them in potentially unsafe situations when they need to be handled or otherwise processed. - -* locals() properly ignores names that do not have Python compatible types (including automatically inferred types). - -* Some garbage collection issues of memory views were fixed. - -* numpy.pxd compiles in Python 3 mode. - -* Several C compiler warnings were fixed. - -* Several bugs related to memoryviews and fused types were fixed. - -* Several bug-fixes and improvements related to cythonize(), including ccache-style caching. - -Other changes -------------- - -* libc.string provides a convenience declaration for const uchar in addition to const char. - -* User declared char* types are now recognised as such and auto-coerce to and from Python bytes strings. - -* callable() and next() compile to more efficient C code. - -* list.append() is faster on average. - -* Modules generated by @cython.inline() are written into the directory pointed to by the environment variable CYTHON_CACHE_DIR if set. - - -0.16 (2012-04-21) -================= - -Features added --------------- - -* Enhancements to Cython's function type (support for weak references, default arguments, code objects, dynamic attributes, classmethods, staticmethods, and more) - -* Fused Types - Template-like support for functions and methods CEP 522 (docs) - -* Typed views on memory - Support for efficient direct and indirect buffers (indexing, slicing, transposing, ...) CEP 517 (docs) - -* super() without arguments - -* Final cdef methods (which translate into direct calls on known instances) - -Bugs fixed ----------- - -* fix alignment handling for record types in buffer support - -Other changes -------------- - -* support default arguments for closures - -* search sys.path for pxd files - -* support C++ template casting - -* faster traceback building and faster generator termination - -* support inplace operators on indexed buffers - -* allow nested prange sections - - -0.15.1 (2011-09-19) -=================== - -Features added --------------- - -Bugs fixed ----------- - -Other changes -------------- - - -0.15 (2011-08-05) -================= - -Features added --------------- - -* Generators (yield) - Cython has full support for generators, generator expressions and PEP 342 coroutines. - -* The nonlocal keyword is supported. - -* Re-acquiring the gil: with gil - works as expected within a nogil context. - -* OpenMP support: prange. - -* Control flow analysis prunes dead code and emits warnings and errors about uninitialised variables. - -* Debugger command cy set to assign values of expressions to Cython variables and cy exec counterpart $cy_eval(). - -* Exception chaining PEP 3134. - -* Relative imports PEP 328. - -* Improved pure syntax including cython.cclass, cython.cfunc, and cython.ccall. - -* The with statement has its own dedicated and faster C implementation. - -* Support for del. - -* Boundschecking directives implemented for builtin Python sequence types. - -* Several updates and additions to the shipped standard library .pxd files. - -* Forward declaration of types is no longer required for circular references. - -Bugs fixed ----------- - -Other changes -------------- - -* Uninitialized variables are no longer initialized to None and accessing them has the same semantics as standard Python. - -* globals() now returns a read-only dict of the Cython module's globals, rather than the globals of the first non-Cython module in the stack - -* Many C++ exceptions are now special cased to give closer Python counterparts. This means that except+ functions that formerly raised generic RuntimeErrors may raise something else such as ArithmeticError. - -* The inlined generator expressions (introduced in Cython 0.13) were disabled in favour of full generator expression support. This breaks code that previously used them inside of cdef functions (usage in def functions continues to work) and induces a performance regression for cases that continue to work but that were previously inlined. We hope to reinstate this feature in the near future. - - -0.14.1 (2011-02-04) -=================== - -Features added --------------- - -* The gdb debugging support was extended to include all major Cython features, including closures. - -* raise MemoryError() is now safe to use as Cython replaces it with the correct C-API call. - -Bugs fixed ----------- - -Other changes -------------- - -* Decorators on special methods of cdef classes now raise a compile time error rather than being ignored. - -* In Python 3 language level mode (-3 option), the 'str' type is now mapped to 'unicode', so that cdef str s declares a Unicode string even when running in Python 2. - - -0.14 (2010-12-14) -================= - -Features added --------------- - -* Python classes can now be nested and receive a proper closure at definition time. - -* Redefinition is supported for Python functions, even within the same scope. - -* Lambda expressions are supported in class bodies and at the module level. - -* Metaclasses are supported for Python classes, both in Python 2 and Python 3 syntax. The Python 3 syntax (using a keyword argument in the type declaration) is preferred and optimised at compile time. - -* "final" extension classes prevent inheritance in Python space. This feature is available through the new "cython.final" decorator. In the future, these classes may receive further optimisations. - -* "internal" extension classes do not show up in the module dictionary. This feature is available through the new "cython.internal" decorator. - -* Extension type inheritance from builtin types, such as "cdef class MyUnicode(unicode)", now works without further external type redeclarations (which are also strongly discouraged now and continue to issue a warning). - -* GDB support. http://docs.cython.org/src/userguide/debugging.html - -* A new build system with support for inline distutils directives, correct dependency tracking, and parallel compilation. http://wiki.cython.org/enhancements/distutils_preprocessing - -* Support for dynamic compilation at runtime via the new cython.inline function and cython.compile decorator. http://wiki.cython.org/enhancements/inline - -* "nogil" blocks are supported when compiling pure Python code by writing "with cython.nogil". - -* Iterating over arbitrary pointer types is now supported, as is an optimized version of the in operator, e.g. x in ptr[a:b]. - -Bugs fixed ----------- - -* In parallel assignments, the right side was evaluated in reverse order in 0.13. This could result in errors if it had side effects (e.g. function calls). - -* In some cases, methods of builtin types would raise a SystemError instead of an AttributeError when called on None. - -Other changes -------------- - -* Constant tuples are now cached over the lifetime of an extension module, just like CPython does. Constant argument tuples of Python function calls are also cached. - -* Closures have tightened to include exactly the names used in the inner functions and classes. Previously, they held the complete locals of the defining function. - -* The builtin "next()" function in Python 2.6 and later is now implemented internally and therefore available in all Python versions. This makes it the preferred and portable way of manually advancing an iterator. - -* In addition to the previously supported inlined generator expressions in 0.13, "sorted(genexpr)" can now be used as well. Typing issues were fixed in "sum(genexpr)" that could lead to invalid C code being generated. Other known issues with inlined generator expressions were also fixed that make upgrading to 0.14 a strong recommendation for code that uses them. Note that general generators and generator expressions continue to be not supported. - -* Inplace arithmetic operators now respect the cdivision directive and are supported for complex types. - -* Typing a variable as type "complex" previously gave it the Python object type. It now uses the appropriate C/C++ double complex type. A side-effect is that assignments and typed function parameters now accept anything that Python can coerce to a complex, including integers and floats, and not only complex instances. - -* Large integer literals pass through the compiler in a safer way. To prevent truncation in C code, non 32-bit literals are turned into Python objects if not used in a C context. This context can either be given by a clear C literal suffix such as "UL" or "LL" (or "L" in Python 3 code), or it can be an assignment to a typed variable or a typed function argument, in which case it is up to the user to take care of a sufficiently large value space of the target. - -* Python functions are declared in the order they appear in the file, rather than all being created at module creation time. This is consistent with Python and needed to support, for example, conditional or repeated declarations of functions. In the face of circular imports this may cause code to break, so a new --disable-function-redefinition flag was added to revert to the old behavior. This flag will be removed in a future release, so should only be used as a stopgap until old code can be fixed. - - -0.13 (2010-08-25) -================= - -Features added --------------- - -* Closures are fully supported for Python functions. Cython supports inner functions and lambda expressions. Generators and generator expressions are not supported in this release. - -* Proper C++ support. Cython knows about C++ classes, templates and overloaded function signatures, so that Cython code can interact with them in a straight forward way. - -* Type inference is enabled by default for safe C types (e.g. double, bint, C++ classes) and known extension types. This reduces the need for explicit type declarations and can improve the performance of untyped code in some cases. There is also a verbose compile mode for testing the impact on user code. - -* Cython's for-in-loop can iterate over C arrays and sliced pointers. The type of the loop variable will be inferred automatically in this case. - -* The Py_UNICODE integer type for Unicode code points is fully supported, including for-loops and 'in' tests on unicode strings. It coerces from and to single character unicode strings. Note that untyped for-loop variables will automatically be inferred as Py_UNICODE when iterating over a unicode string. In most cases, this will be much more efficient than yielding sliced string objects, but can also have a negative performance impact when the variable is used in a Python context multiple times, so that it needs to coerce to a unicode string object more than once. If this happens, typing the loop variable as unicode or object will help. - -* The built-in functions any(), all(), sum(), list(), set() and dict() are inlined as plain for loops when called on generator expressions. Note that generator expressions are not generally supported apart from this feature. Also, tuple(genexpr) is not currently supported - use tuple([listcomp]) instead. - -* More shipped standard library declarations. The python_* and stdlib/stdio .pxd files have been deprecated in favor of clib.* and cpython[.*] and may get removed in a future release. - -* Pure Python mode no longer disallows non-Python keywords like 'cdef', 'include' or 'cimport'. It also no longer recognises syntax extensions like the for-from loop. - -* Parsing has improved for Python 3 syntax in Python code, although not all features are correctly supported. The missing Python 3 features are being worked on for the next release. - -* from __future__ import print_function is supported in Python 2.6 and later. Note that there is currently no emulation for earlier Python versions, so code that uses print() with this future import will require at least Python 2.6. - -* New compiler directive language_level (valid values: 2 or 3) with corresponding command line options -2 and -3 requests source code compatibility with Python 2.x or Python 3.x respectively. Language level 3 currently enforces unicode literals for unprefixed string literals, enables the print function (requires Python 2.6 or later) and keeps loop variables in list comprehensions from leaking. - -* Loop variables in set/dict comprehensions no longer leak into the surrounding scope (following Python 2.7). List comprehensions are unchanged in language level 2. - -* print >> stream - -Bugs fixed ----------- - -Other changes -------------- - -* The availability of type inference by default means that Cython will also infer the type of pointers on assignments. Previously, code like this:: - - cdef char* s = ... - untyped_variable = s - - would convert the char* to a Python bytes string and assign that. This is no longer the case and no coercion will happen in the example above. The correct way of doing this is through an explicit cast or by typing the target variable, i.e. - - :: - - cdef char* s = ... - untyped_variable1 = s - untyped_variable2 = s - - cdef object py_object = s - cdef bytes bytes_string = s - -* bool is no longer a valid type name by default. The problem is that it's not clear whether bool should refer to the Python type or the C++ type, and expecting one and finding the other has already led to several hard-to-find bugs. Both types are available for importing: you can use from cpython cimport bool for the Python bool type, and from libcpp cimport bool for the C++ type. bool is still a valid object by default, so one can still write bool(x). - -* ``__getsegcount__`` is now correctly typed to take a ``Py_size_t*`` rather than an ``int*``. - - -0.12.1 (2010-02-02) -=================== - -Features added --------------- - -* Type inference improvements. - - * There have been several bug fixes and improvements to the type inferencer. - - * Notably, there is now a "safe" mode enabled by setting the infer_types directive to None. (The None here refers to the "default" mode, which will be the default in 0.13.) This safe mode limits inference to Python object types and C doubles, which should speed up execution without affecting any semantics such as integer overflow behavior like infer_types=True might. There is also an infer_types.verbose option which allows one to see what types are inferred. - -* The boundscheck directive works for lists and tuples as well as buffers. - -* len(s) and s.decode("encoding") are efficiently supported for char* s. - -* Cython's INLINE macro has been renamed to CYTHON_INLINE to reduce conflict and has better support for the MSVC compiler on Windows. It is no longer clobbered if externally defined. - -* Revision history is now omitted from the source package, resulting in a 85% size reduction. Running make repo will download the history and turn the directory into a complete Mercurial working repository. - -* Cython modules don't need to be recompiled when the size of an external type grows. (A warning, rather than an error, is produced.) This should be helpful for binary distributions relying on NumPy. - -Bugs fixed ----------- - -* Several other bugs and minor improvements have been made. This release should be fully backwards compatible with 0.12. - -Other changes -------------- - - -0.12 (2009-11-23) -================= - -Features added --------------- - -* Type inference with the infer_types directive - -* Seamless C++ complex support - -* Fast extension type instantiation using the normal Python meme obj = MyType.__new__(MyType) - -* Improved support for Py3.1 - -* Cython now runs under Python 3.x using the 2to3 tool - -* unittest support for doctests in Cython modules - -* Optimised handling of C strings (char*): for c in cstring[2:50] and cstring.decode() - -* Looping over c pointers: for i in intptr[:50]. - -* pyximport improvements - -* cython_freeze improvements - -Bugs fixed ----------- - -* Many bug fixes - -Other changes -------------- - -* Many other optimisation, e.g. enumerate() loops, parallel swap assignments (a,b = b,a), and unicode.encode() - -* More complete numpy.pxd - - -0.11.2 (2009-05-20) -=================== - -Features added --------------- - -* There's now native complex floating point support! C99 complex will be used if complex.h is included, otherwise explicit complex arithmetic working on all C compilers is used. [Robert Bradshaw] - - :: - - cdef double complex a = 1 + 0.3j - cdef np.ndarray[np.complex128_t, ndim=2] arr = \ - np.zeros(10, np.complex128) - -* Cython can now generate a main()-method for embedding of the Python interpreter into an executable (see #289) [Robert Bradshaw] - -* @wraparound directive (another way to disable arr[idx] for negative idx) [Dag Sverre Seljebotn] - -* Correct support for NumPy record dtypes with different alignments, and "cdef packed struct" support [Dag Sverre Seljebotn] - -* @callspec directive, allowing custom calling convention macros [Lisandro Dalcin] - -Bugs fixed ----------- - -Other changes -------------- - -* Bug fixes and smaller improvements. For the full list, see [1]. diff --git a/third_party/cython/src/COPYING.txt b/third_party/cython/src/COPYING.txt deleted file mode 100644 index 8e7130083b49a..0000000000000 --- a/third_party/cython/src/COPYING.txt +++ /dev/null @@ -1,12 +0,0 @@ -The original Pyrex code as of 2006-04 is licensed under the following -license: "Copyright stuff: Pyrex is free of restrictions. You may use, -redistribute, modify and distribute modified versions." - ------------------- - -Cython, which derives from Pyrex, is licensed under the Apache 2.0 -Software License. More precisely, all modifications and new code -made to go from Pyrex to Cython are so licensed. - -See LICENSE.txt for more details. - diff --git a/third_party/cython/src/Cython/Build/BuildExecutable.py b/third_party/cython/src/Cython/Build/BuildExecutable.py deleted file mode 100644 index 6df3135ec1f00..0000000000000 --- a/third_party/cython/src/Cython/Build/BuildExecutable.py +++ /dev/null @@ -1,139 +0,0 @@ -""" -Compile a Python script into an executable that embeds CPython and run it. -Requires CPython to be built as a shared library ('libpythonX.Y'). - -Basic usage: - - python cythonrun somefile.py [ARGS] -""" - -DEBUG = True - -import sys -import os -from distutils import sysconfig - -def get_config_var(name, default=''): - return sysconfig.get_config_var(name) or default - -INCDIR = sysconfig.get_python_inc() -LIBDIR1 = get_config_var('LIBDIR') -LIBDIR2 = get_config_var('LIBPL') -PYLIB = get_config_var('LIBRARY') -PYLIB_DYN = get_config_var('LDLIBRARY') -if PYLIB_DYN == PYLIB: - # no shared library - PYLIB_DYN = '' -else: - PYLIB_DYN = os.path.splitext(PYLIB_DYN[3:])[0] # 'lib(XYZ).so' -> XYZ - -CC = get_config_var('CC', os.environ.get('CC', '')) -CFLAGS = get_config_var('CFLAGS') + ' ' + os.environ.get('CFLAGS', '') -LINKCC = get_config_var('LINKCC', os.environ.get('LINKCC', CC)) -LINKFORSHARED = get_config_var('LINKFORSHARED') -LIBS = get_config_var('LIBS') -SYSLIBS = get_config_var('SYSLIBS') -EXE_EXT = sysconfig.get_config_var('EXE') - -def _debug(msg, *args): - if DEBUG: - if args: - msg = msg % args - sys.stderr.write(msg + '\n') - -def dump_config(): - _debug('INCDIR: %s', INCDIR) - _debug('LIBDIR1: %s', LIBDIR1) - _debug('LIBDIR2: %s', LIBDIR2) - _debug('PYLIB: %s', PYLIB) - _debug('PYLIB_DYN: %s', PYLIB_DYN) - _debug('CC: %s', CC) - _debug('CFLAGS: %s', CFLAGS) - _debug('LINKCC: %s', LINKCC) - _debug('LINKFORSHARED: %s', LINKFORSHARED) - _debug('LIBS: %s', LIBS) - _debug('SYSLIBS: %s', SYSLIBS) - _debug('EXE_EXT: %s', EXE_EXT) - -def runcmd(cmd, shell=True): - if shell: - cmd = ' '.join(cmd) - _debug(cmd) - else: - _debug(' '.join(cmd)) - - try: - import subprocess - except ImportError: # Python 2.3 ... - returncode = os.system(cmd) - else: - returncode = subprocess.call(cmd, shell=shell) - - if returncode: - sys.exit(returncode) - -def clink(basename): - runcmd([LINKCC, '-o', basename + EXE_EXT, basename+'.o', '-L'+LIBDIR1, '-L'+LIBDIR2] - + [PYLIB_DYN and ('-l'+PYLIB_DYN) or os.path.join(LIBDIR1, PYLIB)] - + LIBS.split() + SYSLIBS.split() + LINKFORSHARED.split()) - -def ccompile(basename): - runcmd([CC, '-c', '-o', basename+'.o', basename+'.c', '-I' + INCDIR] + CFLAGS.split()) - -def cycompile(input_file, options=()): - from Cython.Compiler import Version, CmdLine, Main - options, sources = CmdLine.parse_command_line(list(options or ()) + ['--embed', input_file]) - _debug('Using Cython %s to compile %s', Version.version, input_file) - result = Main.compile(sources, options) - if result.num_errors > 0: - sys.exit(1) - -def exec_file(program_name, args=()): - runcmd([os.path.abspath(program_name)] + list(args), shell=False) - -def build(input_file, compiler_args=(), force=False): - """ - Build an executable program from a Cython module. - - Returns the name of the executable file. - """ - basename = os.path.splitext(input_file)[0] - exe_file = basename + EXE_EXT - if not force and os.path.abspath(exe_file) == os.path.abspath(input_file): - raise ValueError("Input and output file names are the same, refusing to overwrite") - if (not force and os.path.exists(exe_file) and os.path.exists(input_file) - and os.path.getmtime(input_file) <= os.path.getmtime(exe_file)): - _debug("File is up to date, not regenerating %s", exe_file) - return exe_file - cycompile(input_file, compiler_args) - ccompile(basename) - clink(basename) - return exe_file - -def build_and_run(args): - """ - Build an executable program from a Cython module and runs it. - - Arguments after the module name will be passed verbatimely to the - program. - """ - cy_args = [] - last_arg = None - for i, arg in enumerate(args): - if arg.startswith('-'): - cy_args.append(arg) - elif last_arg in ('-X', '--directive'): - cy_args.append(arg) - else: - input_file = arg - args = args[i+1:] - break - last_arg = arg - else: - raise ValueError('no input file provided') - - program_name = build(input_file, cy_args) - exec_file(program_name, args) - -if __name__ == '__main__': - build_and_run(sys.argv[1:]) diff --git a/third_party/cython/src/Cython/Build/Cythonize.py b/third_party/cython/src/Cython/Build/Cythonize.py deleted file mode 100755 index b36fa60fdbb1a..0000000000000 --- a/third_party/cython/src/Cython/Build/Cythonize.py +++ /dev/null @@ -1,194 +0,0 @@ -#!/usr/bin/env python - -import os -import shutil -import tempfile - -from distutils.core import setup -from Cython.Build.Dependencies import cythonize, extended_iglob -from Cython.Utils import is_package_dir -from Cython.Compiler import Options - -try: - import multiprocessing - parallel_compiles = int(multiprocessing.cpu_count() * 1.5) -except ImportError: - multiprocessing = None - parallel_compiles = 0 - - -class _FakePool(object): - def map_async(self, func, args): - from itertools import imap - for _ in imap(func, args): - pass - - def close(self): pass - def terminate(self): pass - def join(self): pass - - -def parse_directives(option, name, value, parser): - dest = option.dest - old_directives = dict(getattr(parser.values, dest, - Options.directive_defaults)) - directives = Options.parse_directive_list( - value, relaxed_bool=True, current_settings=old_directives) - setattr(parser.values, dest, directives) - - -def parse_options(option, name, value, parser): - dest = option.dest - options = dict(getattr(parser.values, dest, {})) - for opt in value.split(','): - if '=' in opt: - n, v = opt.split('=', 1) - v = v.lower() not in ('false', 'f', '0', 'no') - else: - n, v = opt, True - options[n] = v - setattr(parser.values, dest, options) - - -def find_package_base(path): - base_dir, package_path = os.path.split(path) - while os.path.isfile(os.path.join(base_dir, '__init__.py')): - base_dir, parent = os.path.split(base_dir) - package_path = '%s/%s' % (parent, package_path) - return base_dir, package_path - - -def cython_compile(path_pattern, options): - pool = None - paths = map(os.path.abspath, extended_iglob(path_pattern)) - try: - for path in paths: - if options.build_inplace: - base_dir = path - while not os.path.isdir(base_dir) or is_package_dir(base_dir): - base_dir = os.path.dirname(base_dir) - else: - base_dir = None - - if os.path.isdir(path): - # recursively compiling a package - paths = [os.path.join(path, '**', '*.%s' % ext) - for ext in ('py', 'pyx')] - else: - # assume it's a file(-like thing) - paths = [path] - - ext_modules = cythonize( - paths, - nthreads=options.parallel, - exclude_failures=options.keep_going, - exclude=options.excludes, - compiler_directives=options.directives, - force=options.force, - quiet=options.quiet, - **options.options) - - if ext_modules and options.build: - if len(ext_modules) > 1 and options.parallel > 1: - if pool is None: - try: - pool = multiprocessing.Pool(options.parallel) - except OSError: - pool = _FakePool() - pool.map_async(run_distutils, [ - (base_dir, [ext]) for ext in ext_modules]) - else: - run_distutils((base_dir, ext_modules)) - except: - if pool is not None: - pool.terminate() - raise - else: - if pool is not None: - pool.close() - pool.join() - - -def run_distutils(args): - base_dir, ext_modules = args - script_args = ['build_ext', '-i'] - cwd = os.getcwd() - temp_dir = None - try: - if base_dir: - os.chdir(base_dir) - temp_dir = tempfile.mkdtemp(dir=base_dir) - script_args.extend(['--build-temp', temp_dir]) - setup( - script_name='setup.py', - script_args=script_args, - ext_modules=ext_modules, - ) - finally: - if base_dir: - os.chdir(cwd) - if temp_dir and os.path.isdir(temp_dir): - shutil.rmtree(temp_dir) - - -def parse_args(args): - from optparse import OptionParser - parser = OptionParser(usage='%prog [options] [sources and packages]+') - - parser.add_option('-X', '--directive', metavar='NAME=VALUE,...', dest='directives', - type=str, action='callback', callback=parse_directives, default={}, - help='set a compiler directive') - parser.add_option('-s', '--option', metavar='NAME=VALUE', dest='options', - type=str, action='callback', callback=parse_options, default={}, - help='set a cythonize option') - parser.add_option('-3', dest='python3_mode', action='store_true', - help='use Python 3 syntax mode by default') - - parser.add_option('-x', '--exclude', metavar='PATTERN', dest='excludes', - action='append', default=[], - help='exclude certain file patterns from the compilation') - - parser.add_option('-b', '--build', dest='build', action='store_true', - help='build extension modules using distutils') - parser.add_option('-i', '--inplace', dest='build_inplace', action='store_true', - help='build extension modules in place using distutils (implies -b)') - parser.add_option('-j', '--parallel', dest='parallel', metavar='N', - type=int, default=parallel_compiles, - help=('run builds in N parallel jobs (default: %d)' % - parallel_compiles or 1)) - parser.add_option('-f', '--force', dest='force', action='store_true', - help='force recompilation') - parser.add_option('-q', '--quiet', dest='quiet', action='store_true', - help='be less verbose during compilation') - - parser.add_option('--lenient', dest='lenient', action='store_true', - help='increase Python compatibility by ignoring some compile time errors') - parser.add_option('-k', '--keep-going', dest='keep_going', action='store_true', - help='compile as much as possible, ignore compilation failures') - - options, args = parser.parse_args(args) - if not args: - parser.error("no source files provided") - if options.build_inplace: - options.build = True - if multiprocessing is None: - options.parallel = 0 - if options.python3_mode: - options.options['language_level'] = 3 - return options, args - - -def main(args=None): - options, paths = parse_args(args) - - if options.lenient: - # increase Python compatibility by ignoring compile time errors - Options.error_on_unknown_names = False - Options.error_on_uninitialized = False - - for path in paths: - cython_compile(path, options) - - -if __name__ == '__main__': - main() diff --git a/third_party/cython/src/Cython/Build/Dependencies.py b/third_party/cython/src/Cython/Build/Dependencies.py deleted file mode 100644 index 467376a06466f..0000000000000 --- a/third_party/cython/src/Cython/Build/Dependencies.py +++ /dev/null @@ -1,959 +0,0 @@ -import cython -from Cython import __version__ - -import re, os, sys, time -try: - from glob import iglob -except ImportError: - # Py2.4 - from glob import glob as iglob - -try: - import gzip - gzip_open = gzip.open - gzip_ext = '.gz' -except ImportError: - gzip_open = open - gzip_ext = '' -import shutil -import subprocess - -try: - import hashlib -except ImportError: - import md5 as hashlib - -try: - from io import open as io_open -except ImportError: - from codecs import open as io_open - -try: - from os.path import relpath as _relpath -except ImportError: - # Py<2.6 - def _relpath(path, start=os.path.curdir): - if not path: - raise ValueError("no path specified") - start_list = os.path.abspath(start).split(os.path.sep) - path_list = os.path.abspath(path).split(os.path.sep) - i = len(os.path.commonprefix([start_list, path_list])) - rel_list = [os.path.pardir] * (len(start_list)-i) + path_list[i:] - if not rel_list: - return os.path.curdir - return os.path.join(*rel_list) - - -from distutils.extension import Extension - -from Cython import Utils -from Cython.Utils import cached_function, cached_method, path_exists, find_root_package_dir -from Cython.Compiler.Main import Context, CompilationOptions, default_options - -join_path = cached_function(os.path.join) - -if sys.version_info[0] < 3: - # stupid Py2 distutils enforces str type in list of sources - _fs_encoding = sys.getfilesystemencoding() - if _fs_encoding is None: - _fs_encoding = sys.getdefaultencoding() - def encode_filename_in_py2(filename): - if isinstance(filename, unicode): - return filename.encode(_fs_encoding) - return filename -else: - def encode_filename_in_py2(filename): - return filename - basestring = str - -def extended_iglob(pattern): - if '**/' in pattern: - seen = set() - first, rest = pattern.split('**/', 1) - if first: - first = iglob(first+'/') - else: - first = [''] - for root in first: - for path in extended_iglob(join_path(root, rest)): - if path not in seen: - seen.add(path) - yield path - for path in extended_iglob(join_path(root, '*', '**/' + rest)): - if path not in seen: - seen.add(path) - yield path - else: - for path in iglob(pattern): - yield path - -@cached_function -def file_hash(filename): - path = os.path.normpath(filename.encode("UTF-8")) - m = hashlib.md5(str(len(path)) + ":") - m.update(path) - f = open(filename, 'rb') - try: - data = f.read(65000) - while data: - m.update(data) - data = f.read(65000) - finally: - f.close() - return m.hexdigest() - -def parse_list(s): - """ - >>> parse_list("a b c") - ['a', 'b', 'c'] - >>> parse_list("[a, b, c]") - ['a', 'b', 'c'] - >>> parse_list('a " " b') - ['a', ' ', 'b'] - >>> parse_list('[a, ",a", "a,", ",", ]') - ['a', ',a', 'a,', ','] - """ - if s[0] == '[' and s[-1] == ']': - s = s[1:-1] - delimiter = ',' - else: - delimiter = ' ' - s, literals = strip_string_literals(s) - def unquote(literal): - literal = literal.strip() - if literal[0] in "'\"": - return literals[literal[1:-1]] - else: - return literal - return [unquote(item) for item in s.split(delimiter) if item.strip()] - -transitive_str = object() -transitive_list = object() - -distutils_settings = { - 'name': str, - 'sources': list, - 'define_macros': list, - 'undef_macros': list, - 'libraries': transitive_list, - 'library_dirs': transitive_list, - 'runtime_library_dirs': transitive_list, - 'include_dirs': transitive_list, - 'extra_objects': list, - 'extra_compile_args': transitive_list, - 'extra_link_args': transitive_list, - 'export_symbols': list, - 'depends': transitive_list, - 'language': transitive_str, -} - -@cython.locals(start=long, end=long) -def line_iter(source): - if isinstance(source, basestring): - start = 0 - while True: - end = source.find('\n', start) - if end == -1: - yield source[start:] - return - yield source[start:end] - start = end+1 - else: - for line in source: - yield line - -class DistutilsInfo(object): - - def __init__(self, source=None, exn=None): - self.values = {} - if source is not None: - for line in line_iter(source): - line = line.strip() - if line != '' and line[0] != '#': - break - line = line[1:].strip() - if line[:10] == 'distutils:': - line = line[10:] - ix = line.index('=') - key = str(line[:ix].strip()) - value = line[ix+1:].strip() - type = distutils_settings[key] - if type in (list, transitive_list): - value = parse_list(value) - if key == 'define_macros': - value = [tuple(macro.split('=')) for macro in value] - self.values[key] = value - elif exn is not None: - for key in distutils_settings: - if key in ('name', 'sources'): - continue - value = getattr(exn, key, None) - if value: - self.values[key] = value - - def merge(self, other): - if other is None: - return self - for key, value in other.values.items(): - type = distutils_settings[key] - if type is transitive_str and key not in self.values: - self.values[key] = value - elif type is transitive_list: - if key in self.values: - all = self.values[key] - for v in value: - if v not in all: - all.append(v) - else: - self.values[key] = value - return self - - def subs(self, aliases): - if aliases is None: - return self - resolved = DistutilsInfo() - for key, value in self.values.items(): - type = distutils_settings[key] - if type in [list, transitive_list]: - new_value_list = [] - for v in value: - if v in aliases: - v = aliases[v] - if isinstance(v, list): - new_value_list += v - else: - new_value_list.append(v) - value = new_value_list - else: - if value in aliases: - value = aliases[value] - resolved.values[key] = value - return resolved - - def apply(self, extension): - for key, value in self.values.items(): - type = distutils_settings[key] - if type in [list, transitive_list]: - getattr(extension, key).extend(value) - else: - setattr(extension, key, value) - -@cython.locals(start=long, q=long, single_q=long, double_q=long, hash_mark=long, - end=long, k=long, counter=long, quote_len=long) -def strip_string_literals(code, prefix='__Pyx_L'): - """ - Normalizes every string literal to be of the form '__Pyx_Lxxx', - returning the normalized code and a mapping of labels to - string literals. - """ - new_code = [] - literals = {} - counter = 0 - start = q = 0 - in_quote = False - hash_mark = single_q = double_q = -1 - code_len = len(code) - - while True: - if hash_mark < q: - hash_mark = code.find('#', q) - if single_q < q: - single_q = code.find("'", q) - if double_q < q: - double_q = code.find('"', q) - q = min(single_q, double_q) - if q == -1: q = max(single_q, double_q) - - # We're done. - if q == -1 and hash_mark == -1: - new_code.append(code[start:]) - break - - # Try to close the quote. - elif in_quote: - if code[q-1] == u'\\': - k = 2 - while q >= k and code[q-k] == u'\\': - k += 1 - if k % 2 == 0: - q += 1 - continue - if code[q] == quote_type and (quote_len == 1 or (code_len > q + 2 and quote_type == code[q+1] == code[q+2])): - counter += 1 - label = "%s%s_" % (prefix, counter) - literals[label] = code[start+quote_len:q] - full_quote = code[q:q+quote_len] - new_code.append(full_quote) - new_code.append(label) - new_code.append(full_quote) - q += quote_len - in_quote = False - start = q - else: - q += 1 - - # Process comment. - elif -1 != hash_mark and (hash_mark < q or q == -1): - new_code.append(code[start:hash_mark+1]) - end = code.find('\n', hash_mark) - counter += 1 - label = "%s%s_" % (prefix, counter) - if end == -1: - end_or_none = None - else: - end_or_none = end - literals[label] = code[hash_mark+1:end_or_none] - new_code.append(label) - if end == -1: - break - start = q = end - - # Open the quote. - else: - if code_len >= q+3 and (code[q] == code[q+1] == code[q+2]): - quote_len = 3 - else: - quote_len = 1 - in_quote = True - quote_type = code[q] - new_code.append(code[start:q]) - start = q - q += quote_len - - return "".join(new_code), literals - - -dependancy_regex = re.compile(r"(?:^from +([0-9a-zA-Z_.]+) +cimport)|" - r"(?:^cimport +([0-9a-zA-Z_.]+)\b)|" - r"(?:^cdef +extern +from +['\"]([^'\"]+)['\"])|" - r"(?:^include +['\"]([^'\"]+)['\"])", re.M) - -def normalize_existing(base_path, rel_paths): - return normalize_existing0(os.path.dirname(base_path), tuple(set(rel_paths))) - -@cached_function -def normalize_existing0(base_dir, rel_paths): - normalized = [] - for rel in rel_paths: - path = join_path(base_dir, rel) - if path_exists(path): - normalized.append(os.path.normpath(path)) - else: - normalized.append(rel) - return normalized - -def resolve_depends(depends, include_dirs): - include_dirs = tuple(include_dirs) - resolved = [] - for depend in depends: - path = resolve_depend(depend, include_dirs) - if path is not None: - resolved.append(path) - return resolved - -@cached_function -def resolve_depend(depend, include_dirs): - if depend[0] == '<' and depend[-1] == '>': - return None - for dir in include_dirs: - path = join_path(dir, depend) - if path_exists(path): - return os.path.normpath(path) - return None - -@cached_function -def package(filename): - dir = os.path.dirname(os.path.abspath(str(filename))) - if dir != filename and path_exists(join_path(dir, '__init__.py')): - return package(dir) + (os.path.basename(dir),) - else: - return () - -@cached_function -def fully_qualified_name(filename): - module = os.path.splitext(os.path.basename(filename))[0] - return '.'.join(package(filename) + (module,)) - - -@cached_function -def parse_dependencies(source_filename): - # Actual parsing is way to slow, so we use regular expressions. - # The only catch is that we must strip comments and string - # literals ahead of time. - fh = Utils.open_source_file(source_filename, "rU", error_handling='ignore') - try: - source = fh.read() - finally: - fh.close() - distutils_info = DistutilsInfo(source) - source, literals = strip_string_literals(source) - source = source.replace('\\\n', ' ').replace('\t', ' ') - - # TODO: pure mode - cimports = [] - includes = [] - externs = [] - for m in dependancy_regex.finditer(source): - cimport_from, cimport, extern, include = m.groups() - if cimport_from: - cimports.append(cimport_from) - elif cimport: - cimports.append(cimport) - elif extern: - externs.append(literals[extern]) - else: - includes.append(literals[include]) - return cimports, includes, externs, distutils_info - - -class DependencyTree(object): - - def __init__(self, context, quiet=False): - self.context = context - self.quiet = quiet - self._transitive_cache = {} - - def parse_dependencies(self, source_filename): - return parse_dependencies(source_filename) - - @cached_method - def included_files(self, filename): - # This is messy because included files are textually included, resolving - # cimports (but not includes) relative to the including file. - all = set() - for include in self.parse_dependencies(filename)[1]: - include_path = join_path(os.path.dirname(filename), include) - if not path_exists(include_path): - include_path = self.context.find_include_file(include, None) - if include_path: - if '.' + os.path.sep in include_path: - include_path = os.path.normpath(include_path) - all.add(include_path) - all.update(self.included_files(include_path)) - elif not self.quiet: - print("Unable to locate '%s' referenced from '%s'" % (filename, include)) - return all - - @cached_method - def cimports_and_externs(self, filename): - # This is really ugly. Nested cimports are resolved with respect to the - # includer, but includes are resolved with respect to the includee. - cimports, includes, externs = self.parse_dependencies(filename)[:3] - cimports = set(cimports) - externs = set(externs) - for include in self.included_files(filename): - included_cimports, included_externs = self.cimports_and_externs(include) - cimports.update(included_cimports) - externs.update(included_externs) - return tuple(cimports), normalize_existing(filename, externs) - - def cimports(self, filename): - return self.cimports_and_externs(filename)[0] - - def package(self, filename): - return package(filename) - - def fully_qualified_name(self, filename): - return fully_qualified_name(filename) - - @cached_method - def find_pxd(self, module, filename=None): - is_relative = module[0] == '.' - if is_relative and not filename: - raise NotImplementedError("New relative imports.") - if filename is not None: - module_path = module.split('.') - if is_relative: - module_path.pop(0) # just explicitly relative - package_path = list(self.package(filename)) - while module_path and not module_path[0]: - try: - package_path.pop() - except IndexError: - return None # FIXME: error? - module_path.pop(0) - relative = '.'.join(package_path + module_path) - pxd = self.context.find_pxd_file(relative, None) - if pxd: - return pxd - if is_relative: - return None # FIXME: error? - return self.context.find_pxd_file(module, None) - - @cached_method - def cimported_files(self, filename): - if filename[-4:] == '.pyx' and path_exists(filename[:-4] + '.pxd'): - pxd_list = [filename[:-4] + '.pxd'] - else: - pxd_list = [] - for module in self.cimports(filename): - if module[:7] == 'cython.' or module == 'cython': - continue - pxd_file = self.find_pxd(module, filename) - if pxd_file is not None: - pxd_list.append(pxd_file) - elif not self.quiet: - print("missing cimport in module '%s': %s" % (module, filename)) - return tuple(pxd_list) - - @cached_method - def immediate_dependencies(self, filename): - all = set([filename]) - all.update(self.cimported_files(filename)) - all.update(self.included_files(filename)) - return all - - def all_dependencies(self, filename): - return self.transitive_merge(filename, self.immediate_dependencies, set.union) - - @cached_method - def timestamp(self, filename): - return os.path.getmtime(filename) - - def extract_timestamp(self, filename): - return self.timestamp(filename), filename - - def newest_dependency(self, filename): - return max([self.extract_timestamp(f) for f in self.all_dependencies(filename)]) - - def transitive_fingerprint(self, filename, extra=None): - try: - m = hashlib.md5(__version__) - m.update(file_hash(filename)) - for x in sorted(self.all_dependencies(filename)): - if os.path.splitext(x)[1] not in ('.c', '.cpp', '.h'): - m.update(file_hash(x)) - if extra is not None: - m.update(str(extra)) - return m.hexdigest() - except IOError: - return None - - def distutils_info0(self, filename): - info = self.parse_dependencies(filename)[3] - externs = self.cimports_and_externs(filename)[1] - if externs: - if 'depends' in info.values: - info.values['depends'] = list(set(info.values['depends']).union(externs)) - else: - info.values['depends'] = list(externs) - return info - - def distutils_info(self, filename, aliases=None, base=None): - return (self.transitive_merge(filename, self.distutils_info0, DistutilsInfo.merge) - .subs(aliases) - .merge(base)) - - def transitive_merge(self, node, extract, merge): - try: - seen = self._transitive_cache[extract, merge] - except KeyError: - seen = self._transitive_cache[extract, merge] = {} - return self.transitive_merge_helper( - node, extract, merge, seen, {}, self.cimported_files)[0] - - def transitive_merge_helper(self, node, extract, merge, seen, stack, outgoing): - if node in seen: - return seen[node], None - deps = extract(node) - if node in stack: - return deps, node - try: - stack[node] = len(stack) - loop = None - for next in outgoing(node): - sub_deps, sub_loop = self.transitive_merge_helper(next, extract, merge, seen, stack, outgoing) - if sub_loop is not None: - if loop is not None and stack[loop] < stack[sub_loop]: - pass - else: - loop = sub_loop - deps = merge(deps, sub_deps) - if loop == node: - loop = None - if loop is None: - seen[node] = deps - return deps, loop - finally: - del stack[node] - -_dep_tree = None -def create_dependency_tree(ctx=None, quiet=False): - global _dep_tree - if _dep_tree is None: - if ctx is None: - ctx = Context(["."], CompilationOptions(default_options)) - _dep_tree = DependencyTree(ctx, quiet=quiet) - return _dep_tree - -# This may be useful for advanced users? -def create_extension_list(patterns, exclude=[], ctx=None, aliases=None, quiet=False, exclude_failures=False): - if not isinstance(patterns, (list, tuple)): - patterns = [patterns] - explicit_modules = set([m.name for m in patterns if isinstance(m, Extension)]) - seen = set() - deps = create_dependency_tree(ctx, quiet=quiet) - to_exclude = set() - if not isinstance(exclude, list): - exclude = [exclude] - for pattern in exclude: - to_exclude.update(map(os.path.abspath, extended_iglob(pattern))) - module_list = [] - for pattern in patterns: - if isinstance(pattern, str): - filepattern = pattern - template = None - name = '*' - base = None - exn_type = Extension - elif isinstance(pattern, Extension): - filepattern = pattern.sources[0] - if os.path.splitext(filepattern)[1] not in ('.py', '.pyx'): - # ignore non-cython modules - module_list.append(pattern) - continue - template = pattern - name = template.name - base = DistutilsInfo(exn=template) - exn_type = template.__class__ - else: - raise TypeError(pattern) - for file in extended_iglob(filepattern): - if os.path.abspath(file) in to_exclude: - continue - pkg = deps.package(file) - if '*' in name: - module_name = deps.fully_qualified_name(file) - if module_name in explicit_modules: - continue - else: - module_name = name - if module_name not in seen: - try: - kwds = deps.distutils_info(file, aliases, base).values - except Exception: - if exclude_failures: - continue - raise - if base is not None: - for key, value in base.values.items(): - if key not in kwds: - kwds[key] = value - sources = [file] - if template is not None: - sources += template.sources[1:] - if 'sources' in kwds: - # allow users to add .c files etc. - for source in kwds['sources']: - source = encode_filename_in_py2(source) - if source not in sources: - sources.append(source) - del kwds['sources'] - if 'depends' in kwds: - depends = resolve_depends(kwds['depends'], (kwds.get('include_dirs') or []) + [find_root_package_dir(file)]) - if template is not None: - # Always include everything from the template. - depends = list(set(template.depends).union(set(depends))) - kwds['depends'] = depends - module_list.append(exn_type( - name=module_name, - sources=sources, - **kwds)) - m = module_list[-1] - seen.add(name) - return module_list - -# This is the user-exposed entry point. -def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, force=False, - exclude_failures=False, **options): - """ - Compile a set of source modules into C/C++ files and return a list of distutils - Extension objects for them. - - As module list, pass either a glob pattern, a list of glob patterns or a list of - Extension objects. The latter allows you to configure the extensions separately - through the normal distutils options. - - When using glob patterns, you can exclude certain module names explicitly - by passing them into the 'exclude' option. - - For parallel compilation, set the 'nthreads' option to the number of - concurrent builds. - - For a broad 'try to compile' mode that ignores compilation failures and - simply excludes the failed extensions, pass 'exclude_failures=True'. Note - that this only really makes sense for compiling .py files which can also - be used without compilation. - - Additional compilation options can be passed as keyword arguments. - """ - if 'include_path' not in options: - options['include_path'] = ['.'] - if 'common_utility_include_dir' in options: - if options.get('cache'): - raise NotImplementedError("common_utility_include_dir does not yet work with caching") - if not os.path.exists(options['common_utility_include_dir']): - os.makedirs(options['common_utility_include_dir']) - c_options = CompilationOptions(**options) - cpp_options = CompilationOptions(**options); cpp_options.cplus = True - ctx = c_options.create_context() - options = c_options - module_list = create_extension_list( - module_list, - exclude=exclude, - ctx=ctx, - quiet=quiet, - exclude_failures=exclude_failures, - aliases=aliases) - deps = create_dependency_tree(ctx, quiet=quiet) - build_dir = getattr(options, 'build_dir', None) - modules_by_cfile = {} - to_compile = [] - for m in module_list: - if build_dir: - root = os.path.realpath(os.path.abspath(find_root_package_dir(m.sources[0]))) - def copy_to_build_dir(filepath, root=root): - filepath_abs = os.path.realpath(os.path.abspath(filepath)) - if os.path.isabs(filepath): - filepath = filepath_abs - if filepath_abs.startswith(root): - mod_dir = os.path.join(build_dir, - os.path.dirname(_relpath(filepath, root))) - if not os.path.isdir(mod_dir): - os.makedirs(mod_dir) - shutil.copy(filepath, mod_dir) - for dep in m.depends: - copy_to_build_dir(dep) - - new_sources = [] - for source in m.sources: - base, ext = os.path.splitext(source) - if ext in ('.pyx', '.py'): - if m.language == 'c++': - c_file = base + '.cpp' - options = cpp_options - else: - c_file = base + '.c' - options = c_options - - # setup for out of place build directory if enabled - if build_dir: - c_file = os.path.join(build_dir, c_file) - dir = os.path.dirname(c_file) - if not os.path.isdir(dir): - os.makedirs(dir) - - if os.path.exists(c_file): - c_timestamp = os.path.getmtime(c_file) - else: - c_timestamp = -1 - - # Priority goes first to modified files, second to direct - # dependents, and finally to indirect dependents. - if c_timestamp < deps.timestamp(source): - dep_timestamp, dep = deps.timestamp(source), source - priority = 0 - else: - dep_timestamp, dep = deps.newest_dependency(source) - priority = 2 - (dep in deps.immediate_dependencies(source)) - if force or c_timestamp < dep_timestamp: - if not quiet: - if source == dep: - print("Compiling %s because it changed." % source) - else: - print("Compiling %s because it depends on %s." % (source, dep)) - if not force and hasattr(options, 'cache'): - extra = m.language - fingerprint = deps.transitive_fingerprint(source, extra) - else: - fingerprint = None - to_compile.append((priority, source, c_file, fingerprint, quiet, - options, not exclude_failures)) - new_sources.append(c_file) - if c_file not in modules_by_cfile: - modules_by_cfile[c_file] = [m] - else: - modules_by_cfile[c_file].append(m) - else: - new_sources.append(source) - if build_dir: - copy_to_build_dir(source) - m.sources = new_sources - if hasattr(options, 'cache'): - if not os.path.exists(options.cache): - os.makedirs(options.cache) - to_compile.sort() - if nthreads: - # Requires multiprocessing (or Python >= 2.6) - try: - import multiprocessing - pool = multiprocessing.Pool(nthreads) - except (ImportError, OSError): - print("multiprocessing required for parallel cythonization") - nthreads = 0 - else: - pool.map(cythonize_one_helper, to_compile) - if not nthreads: - for args in to_compile: - cythonize_one(*args[1:]) - if exclude_failures: - failed_modules = set() - for c_file, modules in modules_by_cfile.iteritems(): - if not os.path.exists(c_file): - failed_modules.update(modules) - elif os.path.getsize(c_file) < 200: - f = io_open(c_file, 'r', encoding='iso8859-1') - try: - if f.read(len('#error ')) == '#error ': - # dead compilation result - failed_modules.update(modules) - finally: - f.close() - if failed_modules: - for module in failed_modules: - module_list.remove(module) - print("Failed compilations: %s" % ', '.join(sorted([ - module.name for module in failed_modules]))) - if hasattr(options, 'cache'): - cleanup_cache(options.cache, getattr(options, 'cache_size', 1024 * 1024 * 100)) - # cythonize() is often followed by the (non-Python-buffered) - # compiler output, flush now to avoid interleaving output. - sys.stdout.flush() - return module_list - - -if os.environ.get('XML_RESULTS'): - compile_result_dir = os.environ['XML_RESULTS'] - def record_results(func): - def with_record(*args): - t = time.time() - success = True - try: - try: - func(*args) - except: - success = False - finally: - t = time.time() - t - module = fully_qualified_name(args[0]) - name = "cythonize." + module - failures = 1 - success - if success: - failure_item = "" - else: - failure_item = "failure" - output = open(os.path.join(compile_result_dir, name + ".xml"), "w") - output.write(""" - - - - %(failure_item)s - - - """.strip() % locals()) - output.close() - return with_record -else: - record_results = lambda x: x - -# TODO: Share context? Issue: pyx processing leaks into pxd module -@record_results -def cythonize_one(pyx_file, c_file, fingerprint, quiet, options=None, raise_on_failure=True): - from Cython.Compiler.Main import compile, default_options - from Cython.Compiler.Errors import CompileError, PyrexError - - if fingerprint: - if not os.path.exists(options.cache): - try: - os.mkdir(options.cache) - except: - if not os.path.exists(options.cache): - raise - # Cython-generated c files are highly compressible. - # (E.g. a compression ratio of about 10 for Sage). - fingerprint_file = join_path( - options.cache, "%s-%s%s" % (os.path.basename(c_file), fingerprint, gzip_ext)) - if os.path.exists(fingerprint_file): - if not quiet: - print("Found compiled %s in cache" % pyx_file) - os.utime(fingerprint_file, None) - g = gzip_open(fingerprint_file, 'rb') - try: - f = open(c_file, 'wb') - try: - shutil.copyfileobj(g, f) - finally: - f.close() - finally: - g.close() - return - if not quiet: - print("Cythonizing %s" % pyx_file) - if options is None: - options = CompilationOptions(default_options) - options.output_file = c_file - - any_failures = 0 - try: - result = compile([pyx_file], options) - if result.num_errors > 0: - any_failures = 1 - except (EnvironmentError, PyrexError), e: - sys.stderr.write('%s\n' % e) - any_failures = 1 - # XXX - import traceback - traceback.print_exc() - except Exception: - if raise_on_failure: - raise - import traceback - traceback.print_exc() - any_failures = 1 - if any_failures: - if raise_on_failure: - raise CompileError(None, pyx_file) - elif os.path.exists(c_file): - os.remove(c_file) - elif fingerprint: - f = open(c_file, 'rb') - try: - g = gzip_open(fingerprint_file, 'wb') - try: - shutil.copyfileobj(f, g) - finally: - g.close() - finally: - f.close() - -def cythonize_one_helper(m): - import traceback - try: - return cythonize_one(*m[1:]) - except Exception: - traceback.print_exc() - raise - -def cleanup_cache(cache, target_size, ratio=.85): - try: - p = subprocess.Popen(['du', '-s', '-k', os.path.abspath(cache)], stdout=subprocess.PIPE) - res = p.wait() - if res == 0: - total_size = 1024 * int(p.stdout.read().strip().split()[0]) - if total_size < target_size: - return - except (OSError, ValueError): - pass - total_size = 0 - all = [] - for file in os.listdir(cache): - path = join_path(cache, file) - s = os.stat(path) - total_size += s.st_size - all.append((s.st_atime, s.st_size, path)) - if total_size > target_size: - for time, size, file in reversed(sorted(all)): - os.unlink(file) - total_size -= size - if total_size < target_size * ratio: - break diff --git a/third_party/cython/src/Cython/Build/Inline.py b/third_party/cython/src/Cython/Build/Inline.py deleted file mode 100644 index fcbb6c1282a3e..0000000000000 --- a/third_party/cython/src/Cython/Build/Inline.py +++ /dev/null @@ -1,304 +0,0 @@ -import sys, os, re, inspect -import imp - -try: - import hashlib -except ImportError: - import md5 as hashlib - -from distutils.core import Distribution, Extension -from distutils.command.build_ext import build_ext - -import Cython -from Cython.Compiler.Main import Context, CompilationOptions, default_options - -from Cython.Compiler.ParseTreeTransforms import CythonTransform, SkipDeclarations, AnalyseDeclarationsTransform -from Cython.Compiler.TreeFragment import parse_from_strings -from Cython.Build.Dependencies import strip_string_literals, cythonize, cached_function -from Cython.Compiler import Pipeline -from Cython.Utils import get_cython_cache_dir -import cython as cython_module - -# A utility function to convert user-supplied ASCII strings to unicode. -if sys.version_info[0] < 3: - def to_unicode(s): - if not isinstance(s, unicode): - return s.decode('ascii') - else: - return s -else: - to_unicode = lambda x: x - - -class AllSymbols(CythonTransform, SkipDeclarations): - def __init__(self): - CythonTransform.__init__(self, None) - self.names = set() - def visit_NameNode(self, node): - self.names.add(node.name) - -@cached_function -def unbound_symbols(code, context=None): - code = to_unicode(code) - if context is None: - context = Context([], default_options) - from Cython.Compiler.ParseTreeTransforms import AnalyseDeclarationsTransform - tree = parse_from_strings('(tree fragment)', code) - for phase in Pipeline.create_pipeline(context, 'pyx'): - if phase is None: - continue - tree = phase(tree) - if isinstance(phase, AnalyseDeclarationsTransform): - break - symbol_collector = AllSymbols() - symbol_collector(tree) - unbound = [] - try: - import builtins - except ImportError: - import __builtin__ as builtins - for name in symbol_collector.names: - if not tree.scope.lookup(name) and not hasattr(builtins, name): - unbound.append(name) - return unbound - -def unsafe_type(arg, context=None): - py_type = type(arg) - if py_type is int: - return 'long' - else: - return safe_type(arg, context) - -def safe_type(arg, context=None): - py_type = type(arg) - if py_type in [list, tuple, dict, str]: - return py_type.__name__ - elif py_type is complex: - return 'double complex' - elif py_type is float: - return 'double' - elif py_type is bool: - return 'bint' - elif 'numpy' in sys.modules and isinstance(arg, sys.modules['numpy'].ndarray): - return 'numpy.ndarray[numpy.%s_t, ndim=%s]' % (arg.dtype.name, arg.ndim) - else: - for base_type in py_type.mro(): - if base_type.__module__ in ('__builtin__', 'builtins'): - return 'object' - module = context.find_module(base_type.__module__, need_pxd=False) - if module: - entry = module.lookup(base_type.__name__) - if entry.is_type: - return '%s.%s' % (base_type.__module__, base_type.__name__) - return 'object' - -def _get_build_extension(): - dist = Distribution() - # Ensure the build respects distutils configuration by parsing - # the configuration files - config_files = dist.find_config_files() - dist.parse_config_files(config_files) - build_extension = build_ext(dist) - build_extension.finalize_options() - return build_extension - -@cached_function -def _create_context(cython_include_dirs): - return Context(list(cython_include_dirs), default_options) - -def cython_inline(code, - get_type=unsafe_type, - lib_dir=os.path.join(get_cython_cache_dir(), 'inline'), - cython_include_dirs=['.'], - force=False, - quiet=False, - locals=None, - globals=None, - **kwds): - if get_type is None: - get_type = lambda x: 'object' - code = to_unicode(code) - orig_code = code - code, literals = strip_string_literals(code) - code = strip_common_indent(code) - ctx = _create_context(tuple(cython_include_dirs)) - if locals is None: - locals = inspect.currentframe().f_back.f_back.f_locals - if globals is None: - globals = inspect.currentframe().f_back.f_back.f_globals - try: - for symbol in unbound_symbols(code): - if symbol in kwds: - continue - elif symbol in locals: - kwds[symbol] = locals[symbol] - elif symbol in globals: - kwds[symbol] = globals[symbol] - else: - print("Couldn't find ", symbol) - except AssertionError: - if not quiet: - # Parsing from strings not fully supported (e.g. cimports). - print("Could not parse code as a string (to extract unbound symbols).") - cimports = [] - for name, arg in kwds.items(): - if arg is cython_module: - cimports.append('\ncimport cython as %s' % name) - del kwds[name] - arg_names = kwds.keys() - arg_names.sort() - arg_sigs = tuple([(get_type(kwds[arg], ctx), arg) for arg in arg_names]) - key = orig_code, arg_sigs, sys.version_info, sys.executable, Cython.__version__ - module_name = "_cython_inline_" + hashlib.md5(str(key).encode('utf-8')).hexdigest() - - if module_name in sys.modules: - module = sys.modules[module_name] - - else: - build_extension = None - if cython_inline.so_ext is None: - # Figure out and cache current extension suffix - build_extension = _get_build_extension() - cython_inline.so_ext = build_extension.get_ext_filename('') - - module_path = os.path.join(lib_dir, module_name + cython_inline.so_ext) - - if not os.path.exists(lib_dir): - os.makedirs(lib_dir) - if force or not os.path.isfile(module_path): - cflags = [] - c_include_dirs = [] - qualified = re.compile(r'([.\w]+)[.]') - for type, _ in arg_sigs: - m = qualified.match(type) - if m: - cimports.append('\ncimport %s' % m.groups()[0]) - # one special case - if m.groups()[0] == 'numpy': - import numpy - c_include_dirs.append(numpy.get_include()) - # cflags.append('-Wno-unused') - module_body, func_body = extract_func_code(code) - params = ', '.join(['%s %s' % a for a in arg_sigs]) - module_code = """ -%(module_body)s -%(cimports)s -def __invoke(%(params)s): -%(func_body)s - """ % {'cimports': '\n'.join(cimports), 'module_body': module_body, 'params': params, 'func_body': func_body } - for key, value in literals.items(): - module_code = module_code.replace(key, value) - pyx_file = os.path.join(lib_dir, module_name + '.pyx') - fh = open(pyx_file, 'w') - try: - fh.write(module_code) - finally: - fh.close() - extension = Extension( - name = module_name, - sources = [pyx_file], - include_dirs = c_include_dirs, - extra_compile_args = cflags) - if build_extension is None: - build_extension = _get_build_extension() - build_extension.extensions = cythonize([extension], include_path=cython_include_dirs, quiet=quiet) - build_extension.build_temp = os.path.dirname(pyx_file) - build_extension.build_lib = lib_dir - build_extension.run() - - module = imp.load_dynamic(module_name, module_path) - - arg_list = [kwds[arg] for arg in arg_names] - return module.__invoke(*arg_list) - -# Cached suffix used by cython_inline above. None should get -# overridden with actual value upon the first cython_inline invocation -cython_inline.so_ext = None - -non_space = re.compile('[^ ]') -def strip_common_indent(code): - min_indent = None - lines = code.split('\n') - for line in lines: - match = non_space.search(line) - if not match: - continue # blank - indent = match.start() - if line[indent] == '#': - continue # comment - elif min_indent is None or min_indent > indent: - min_indent = indent - for ix, line in enumerate(lines): - match = non_space.search(line) - if not match or line[indent] == '#': - continue - else: - lines[ix] = line[min_indent:] - return '\n'.join(lines) - -module_statement = re.compile(r'^((cdef +(extern|class))|cimport|(from .+ cimport)|(from .+ import +[*]))') -def extract_func_code(code): - module = [] - function = [] - current = function - code = code.replace('\t', ' ') - lines = code.split('\n') - for line in lines: - if not line.startswith(' '): - if module_statement.match(line): - current = module - else: - current = function - current.append(line) - return '\n'.join(module), ' ' + '\n '.join(function) - - - -try: - from inspect import getcallargs -except ImportError: - def getcallargs(func, *arg_values, **kwd_values): - all = {} - args, varargs, kwds, defaults = inspect.getargspec(func) - if varargs is not None: - all[varargs] = arg_values[len(args):] - for name, value in zip(args, arg_values): - all[name] = value - for name, value in kwd_values.items(): - if name in args: - if name in all: - raise TypeError("Duplicate argument %s" % name) - all[name] = kwd_values.pop(name) - if kwds is not None: - all[kwds] = kwd_values - elif kwd_values: - raise TypeError("Unexpected keyword arguments: %s" % kwd_values.keys()) - if defaults is None: - defaults = () - first_default = len(args) - len(defaults) - for ix, name in enumerate(args): - if name not in all: - if ix >= first_default: - all[name] = defaults[ix - first_default] - else: - raise TypeError("Missing argument: %s" % name) - return all - -def get_body(source): - ix = source.index(':') - if source[:5] == 'lambda': - return "return %s" % source[ix+1:] - else: - return source[ix+1:] - -# Lots to be done here... It would be especially cool if compiled functions -# could invoke each other quickly. -class RuntimeCompiledFunction(object): - - def __init__(self, f): - self._f = f - self._body = get_body(inspect.getsource(f)) - - def __call__(self, *args, **kwds): - all = getcallargs(self._f, *args, **kwds) - return cython_inline(self._body, locals=self._f.func_globals, globals=self._f.func_globals, **all) diff --git a/third_party/cython/src/Cython/Build/Tests/TestInline.py b/third_party/cython/src/Cython/Build/Tests/TestInline.py deleted file mode 100644 index 54fffcb9f9925..0000000000000 --- a/third_party/cython/src/Cython/Build/Tests/TestInline.py +++ /dev/null @@ -1,59 +0,0 @@ -import os, tempfile -from Cython.Shadow import inline -from Cython.Build.Inline import safe_type -from Cython.TestUtils import CythonTest - -try: - import numpy - has_numpy = True -except: - has_numpy = False - -test_kwds = dict(force=True, quiet=True) - -global_value = 100 - -class TestInline(CythonTest): - def setUp(self): - CythonTest.setUp(self) - self.test_kwds = dict(test_kwds) - if os.path.isdir('BUILD'): - lib_dir = os.path.join('BUILD','inline') - else: - lib_dir = tempfile.mkdtemp(prefix='cython_inline_') - self.test_kwds['lib_dir'] = lib_dir - - def test_simple(self): - self.assertEquals(inline("return 1+2", **self.test_kwds), 3) - - def test_types(self): - self.assertEquals(inline(""" - cimport cython - return cython.typeof(a), cython.typeof(b) - """, a=1.0, b=[], **self.test_kwds), ('double', 'list object')) - - def test_locals(self): - a = 1 - b = 2 - self.assertEquals(inline("return a+b", **self.test_kwds), 3) - - def test_globals(self): - self.assertEquals(inline("return global_value + 1", **self.test_kwds), global_value + 1) - - def test_pure(self): - import cython as cy - b = inline(""" - b = cy.declare(float, a) - c = cy.declare(cy.pointer(cy.float), &b) - return b - """, a=3) - self.assertEquals(type(b), float) - - if has_numpy: - - def test_numpy(self): - import numpy - a = numpy.ndarray((10, 20)) - a[0,0] = 10 - self.assertEquals(safe_type(a), 'numpy.ndarray[numpy.float64_t, ndim=2]') - self.assertEquals(inline("return a[0,0]", a=a, **self.test_kwds), 10.0) diff --git a/third_party/cython/src/Cython/Build/Tests/TestStripLiterals.py b/third_party/cython/src/Cython/Build/Tests/TestStripLiterals.py deleted file mode 100644 index ca8e6a7d1456b..0000000000000 --- a/third_party/cython/src/Cython/Build/Tests/TestStripLiterals.py +++ /dev/null @@ -1,57 +0,0 @@ -from Cython.Build.Dependencies import strip_string_literals - -from Cython.TestUtils import CythonTest - -class TestStripLiterals(CythonTest): - - def t(self, before, expected): - actual, literals = strip_string_literals(before, prefix="_L") - self.assertEquals(expected, actual) - for key, value in literals.items(): - actual = actual.replace(key, value) - self.assertEquals(before, actual) - - def test_empty(self): - self.t("", "") - - def test_single_quote(self): - self.t("'x'", "'_L1_'") - - def test_double_quote(self): - self.t('"x"', '"_L1_"') - - def test_nested_quotes(self): - self.t(""" '"' "'" """, """ '_L1_' "_L2_" """) - - def test_triple_quote(self): - self.t(" '''a\n''' ", " '''_L1_''' ") - - def test_backslash(self): - self.t(r"'a\'b'", "'_L1_'") - self.t(r"'a\\'", "'_L1_'") - self.t(r"'a\\\'b'", "'_L1_'") - - def test_unicode(self): - self.t("u'abc'", "u'_L1_'") - - def test_raw(self): - self.t(r"r'abc\\'", "r'_L1_'") - - def test_raw_unicode(self): - self.t(r"ru'abc\\'", "ru'_L1_'") - - def test_comment(self): - self.t("abc # foo", "abc #_L1_") - - def test_comment_and_quote(self): - self.t("abc # 'x'", "abc #_L1_") - self.t("'abc#'", "'_L1_'") - - def test_include(self): - self.t("include 'a.pxi' # something here", - "include '_L1_' #_L2_") - - def test_extern(self): - self.t("cdef extern from 'a.h': # comment", - "cdef extern from '_L1_': #_L2_") - diff --git a/third_party/cython/src/Cython/Build/Tests/__init__.py b/third_party/cython/src/Cython/Build/Tests/__init__.py deleted file mode 100644 index fa81adaff68e0..0000000000000 --- a/third_party/cython/src/Cython/Build/Tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# empty file diff --git a/third_party/cython/src/Cython/Build/__init__.py b/third_party/cython/src/Cython/Build/__init__.py deleted file mode 100644 index ee22938612d3d..0000000000000 --- a/third_party/cython/src/Cython/Build/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from Dependencies import cythonize diff --git a/third_party/cython/src/Cython/CodeWriter.py b/third_party/cython/src/Cython/CodeWriter.py deleted file mode 100644 index 704ef7437a4bf..0000000000000 --- a/third_party/cython/src/Cython/CodeWriter.py +++ /dev/null @@ -1,512 +0,0 @@ -""" -Serializes a Cython code tree to Cython code. This is primarily useful for -debugging and testing purposes. - -The output is in a strict format, no whitespace or comments from the input -is preserved (and it could not be as it is not present in the code tree). -""" - -from Cython.Compiler.Visitor import TreeVisitor -from Cython.Compiler.ExprNodes import * - -class LinesResult(object): - def __init__(self): - self.lines = [] - self.s = u"" - - def put(self, s): - self.s += s - - def newline(self): - self.lines.append(self.s) - self.s = u"" - - def putline(self, s): - self.put(s) - self.newline() - -class DeclarationWriter(TreeVisitor): - - indent_string = u" " - - def __init__(self, result = None): - super(DeclarationWriter, self).__init__() - if result is None: - result = LinesResult() - self.result = result - self.numindents = 0 - self.tempnames = {} - self.tempblockindex = 0 - - def write(self, tree): - self.visit(tree) - return self.result - - def indent(self): - self.numindents += 1 - - def dedent(self): - self.numindents -= 1 - - def startline(self, s = u""): - self.result.put(self.indent_string * self.numindents + s) - - def put(self, s): - self.result.put(s) - - def putline(self, s): - self.result.putline(self.indent_string * self.numindents + s) - - def endline(self, s = u""): - self.result.putline(s) - - def line(self, s): - self.startline(s) - self.endline() - - def comma_separated_list(self, items, output_rhs=False): - if len(items) > 0: - for item in items[:-1]: - self.visit(item) - if output_rhs and item.default is not None: - self.put(u" = ") - self.visit(item.default) - self.put(u", ") - self.visit(items[-1]) - - def visit_Node(self, node): - raise AssertionError("Node not handled by serializer: %r" % node) - - def visit_ModuleNode(self, node): - self.visitchildren(node) - - def visit_StatListNode(self, node): - self.visitchildren(node) - - def visit_CDefExternNode(self, node): - if node.include_file is None: - file = u'*' - else: - file = u'"%s"' % node.include_file - self.putline(u"cdef extern from %s:" % file) - self.indent() - self.visit(node.body) - self.dedent() - - def visit_CPtrDeclaratorNode(self, node): - self.put('*') - self.visit(node.base) - - def visit_CReferenceDeclaratorNode(self, node): - self.put('&') - self.visit(node.base) - - def visit_CArrayDeclaratorNode(self, node): - self.visit(node.base) - self.put(u'[') - if node.dimension is not None: - self.visit(node.dimension) - self.put(u']') - - def visit_CArrayDeclaratorNode(self, node): - self.visit(node.base) - self.put(u'[') - if node.dimension is not None: - self.visit(node.dimension) - self.put(u']') - - def visit_CFuncDeclaratorNode(self, node): - # TODO: except, gil, etc. - self.visit(node.base) - self.put(u'(') - self.comma_separated_list(node.args) - self.endline(u')') - - def visit_CNameDeclaratorNode(self, node): - self.put(node.name) - - def visit_CSimpleBaseTypeNode(self, node): - # See Parsing.p_sign_and_longness - if node.is_basic_c_type: - self.put(("unsigned ", "", "signed ")[node.signed]) - if node.longness < 0: - self.put("short " * -node.longness) - elif node.longness > 0: - self.put("long " * node.longness) - self.put(node.name) - - def visit_CComplexBaseTypeNode(self, node): - self.put(u'(') - self.visit(node.base_type) - self.visit(node.declarator) - self.put(u')') - - def visit_CNestedBaseTypeNode(self, node): - self.visit(node.base_type) - self.put(u'.') - self.put(node.name) - - def visit_TemplatedTypeNode(self, node): - self.visit(node.base_type_node) - self.put(u'[') - self.comma_separated_list(node.positional_args + node.keyword_args.key_value_pairs) - self.put(u']') - - def visit_CVarDefNode(self, node): - self.startline(u"cdef ") - self.visit(node.base_type) - self.put(u" ") - self.comma_separated_list(node.declarators, output_rhs=True) - self.endline() - - def visit_container_node(self, node, decl, extras, attributes): - # TODO: visibility - self.startline(decl) - if node.name: - self.put(u' ') - self.put(node.name) - if node.cname is not None: - self.put(u' "%s"' % node.cname) - if extras: - self.put(extras) - self.endline(':') - self.indent() - if not attributes: - self.putline('pass') - else: - for attribute in attributes: - self.visit(attribute) - self.dedent() - - def visit_CStructOrUnionDefNode(self, node): - if node.typedef_flag: - decl = u'ctypedef ' - else: - decl = u'cdef ' - if node.visibility == 'public': - decl += u'public ' - if node.packed: - decl += u'packed ' - decl += node.kind - self.visit_container_node(node, decl, None, node.attributes) - - def visit_CppClassNode(self, node): - extras = "" - if node.templates: - extras = u"[%s]" % ", ".join(node.templates) - if node.base_classes: - extras += "(%s)" % ", ".join(node.base_classes) - self.visit_container_node(node, u"cdef cppclass", extras, node.attributes) - - def visit_CEnumDefNode(self, node): - self.visit_container_node(node, u"cdef enum", None, node.items) - - def visit_CEnumDefItemNode(self, node): - self.startline(node.name) - if node.cname: - self.put(u' "%s"' % node.cname) - if node.value: - self.put(u" = ") - self.visit(node.value) - self.endline() - - def visit_CClassDefNode(self, node): - assert not node.module_name - if node.decorators: - for decorator in node.decorators: - self.visit(decorator) - self.startline(u"cdef class ") - self.put(node.class_name) - if node.base_class_name: - self.put(u"(") - if node.base_class_module: - self.put(node.base_class_module) - self.put(u".") - self.put(node.base_class_name) - self.put(u")") - self.endline(u":") - self.indent() - self.visit(node.body) - self.dedent() - - def visit_CTypeDefNode(self, node): - self.startline(u"ctypedef ") - self.visit(node.base_type) - self.put(u" ") - self.visit(node.declarator) - self.endline() - - def visit_FuncDefNode(self, node): - self.startline(u"def %s(" % node.name) - self.comma_separated_list(node.args) - self.endline(u"):") - self.indent() - self.visit(node.body) - self.dedent() - - def visit_CArgDeclNode(self, node): - if node.base_type.name is not None: - self.visit(node.base_type) - self.put(u" ") - self.visit(node.declarator) - if node.default is not None: - self.put(u" = ") - self.visit(node.default) - - def visit_CImportStatNode(self, node): - self.startline(u"cimport ") - self.put(node.module_name) - if node.as_name: - self.put(u" as ") - self.put(node.as_name) - self.endline() - - def visit_FromCImportStatNode(self, node): - self.startline(u"from ") - self.put(node.module_name) - self.put(u" cimport ") - first = True - for pos, name, as_name, kind in node.imported_names: - assert kind is None - if first: - first = False - else: - self.put(u", ") - self.put(name) - if as_name: - self.put(u" as ") - self.put(as_name) - self.endline() - - def visit_NameNode(self, node): - self.put(node.name) - - def visit_IntNode(self, node): - self.put(node.value) - - def visit_NoneNode(self, node): - self.put(u"None") - - def visit_NotNode(self, node): - self.put(u"(not ") - self.visit(node.operand) - self.put(u")") - - def visit_DecoratorNode(self, node): - self.startline("@") - self.visit(node.decorator) - self.endline() - - def visit_BinopNode(self, node): - self.visit(node.operand1) - self.put(u" %s " % node.operator) - self.visit(node.operand2) - - def visit_AttributeNode(self, node): - self.visit(node.obj) - self.put(u".%s" % node.attribute) - - def visit_BoolNode(self, node): - self.put(str(node.value)) - - # FIXME: represent string nodes correctly - def visit_StringNode(self, node): - value = node.value - if value.encoding is not None: - value = value.encode(value.encoding) - self.put(repr(value)) - - def visit_PassStatNode(self, node): - self.startline(u"pass") - self.endline() - -class CodeWriter(DeclarationWriter): - - def visit_SingleAssignmentNode(self, node): - self.startline() - self.visit(node.lhs) - self.put(u" = ") - self.visit(node.rhs) - self.endline() - - def visit_CascadedAssignmentNode(self, node): - self.startline() - for lhs in node.lhs_list: - self.visit(lhs) - self.put(u" = ") - self.visit(node.rhs) - self.endline() - - def visit_PrintStatNode(self, node): - self.startline(u"print ") - self.comma_separated_list(node.arg_tuple.args) - if not node.append_newline: - self.put(u",") - self.endline() - - def visit_ForInStatNode(self, node): - self.startline(u"for ") - self.visit(node.target) - self.put(u" in ") - self.visit(node.iterator.sequence) - self.endline(u":") - self.indent() - self.visit(node.body) - self.dedent() - if node.else_clause is not None: - self.line(u"else:") - self.indent() - self.visit(node.else_clause) - self.dedent() - - def visit_IfStatNode(self, node): - # The IfClauseNode is handled directly without a seperate match - # for clariy. - self.startline(u"if ") - self.visit(node.if_clauses[0].condition) - self.endline(":") - self.indent() - self.visit(node.if_clauses[0].body) - self.dedent() - for clause in node.if_clauses[1:]: - self.startline("elif ") - self.visit(clause.condition) - self.endline(":") - self.indent() - self.visit(clause.body) - self.dedent() - if node.else_clause is not None: - self.line("else:") - self.indent() - self.visit(node.else_clause) - self.dedent() - - def visit_SequenceNode(self, node): - self.comma_separated_list(node.args) # Might need to discover whether we need () around tuples...hmm... - - def visit_SimpleCallNode(self, node): - self.visit(node.function) - self.put(u"(") - self.comma_separated_list(node.args) - self.put(")") - - def visit_GeneralCallNode(self, node): - self.visit(node.function) - self.put(u"(") - posarg = node.positional_args - if isinstance(posarg, AsTupleNode): - self.visit(posarg.arg) - else: - self.comma_separated_list(posarg) - if node.keyword_args is not None or node.starstar_arg is not None: - raise Exception("Not implemented yet") - self.put(u")") - - def visit_ExprStatNode(self, node): - self.startline() - self.visit(node.expr) - self.endline() - - def visit_InPlaceAssignmentNode(self, node): - self.startline() - self.visit(node.lhs) - self.put(u" %s= " % node.operator) - self.visit(node.rhs) - self.endline() - - def visit_WithStatNode(self, node): - self.startline() - self.put(u"with ") - self.visit(node.manager) - if node.target is not None: - self.put(u" as ") - self.visit(node.target) - self.endline(u":") - self.indent() - self.visit(node.body) - self.dedent() - - def visit_TryFinallyStatNode(self, node): - self.line(u"try:") - self.indent() - self.visit(node.body) - self.dedent() - self.line(u"finally:") - self.indent() - self.visit(node.finally_clause) - self.dedent() - - def visit_TryExceptStatNode(self, node): - self.line(u"try:") - self.indent() - self.visit(node.body) - self.dedent() - for x in node.except_clauses: - self.visit(x) - if node.else_clause is not None: - self.visit(node.else_clause) - - def visit_ExceptClauseNode(self, node): - self.startline(u"except") - if node.pattern is not None: - self.put(u" ") - self.visit(node.pattern) - if node.target is not None: - self.put(u", ") - self.visit(node.target) - self.endline(":") - self.indent() - self.visit(node.body) - self.dedent() - - def visit_ReturnStatNode(self, node): - self.startline("return ") - self.visit(node.value) - self.endline() - - def visit_ReraiseStatNode(self, node): - self.line("raise") - - def visit_ImportNode(self, node): - self.put(u"(import %s)" % node.module_name.value) - - def visit_TempsBlockNode(self, node): - """ - Temporaries are output like $1_1', where the first number is - an index of the TempsBlockNode and the second number is an index - of the temporary which that block allocates. - """ - idx = 0 - for handle in node.temps: - self.tempnames[handle] = "$%d_%d" % (self.tempblockindex, idx) - idx += 1 - self.tempblockindex += 1 - self.visit(node.body) - - def visit_TempRefNode(self, node): - self.put(self.tempnames[node.handle]) - - -class PxdWriter(DeclarationWriter): - def __call__(self, node): - print u'\n'.join(self.write(node).lines) - return node - - def visit_CFuncDefNode(self, node): - if 'inline' in node.modifiers: - return - if node.overridable: - self.startline(u'cpdef ') - else: - self.startline(u'cdef ') - if node.visibility != 'private': - self.put(node.visibility) - self.put(u' ') - if node.api: - self.put(u'api ') - self.visit(node.declarator) - - def visit_StatNode(self, node): - pass - - diff --git a/third_party/cython/src/Cython/Compiler/AnalysedTreeTransforms.py b/third_party/cython/src/Cython/Compiler/AnalysedTreeTransforms.py deleted file mode 100644 index b8d8661a9f9ce..0000000000000 --- a/third_party/cython/src/Cython/Compiler/AnalysedTreeTransforms.py +++ /dev/null @@ -1,97 +0,0 @@ -from Visitor import ScopeTrackingTransform -from Nodes import StatListNode, SingleAssignmentNode, CFuncDefNode, DefNode -from ExprNodes import DictNode, DictItemNode, NameNode, UnicodeNode -from PyrexTypes import py_object_type -from StringEncoding import EncodedString -import Symtab - -class AutoTestDictTransform(ScopeTrackingTransform): - # Handles autotestdict directive - - blacklist = ['__cinit__', '__dealloc__', '__richcmp__', - '__nonzero__', '__bool__', - '__len__', '__contains__'] - - def visit_ModuleNode(self, node): - if node.is_pxd: - return node - self.scope_type = 'module' - self.scope_node = node - - if not self.current_directives['autotestdict']: - return node - self.all_docstrings = self.current_directives['autotestdict.all'] - self.cdef_docstrings = self.all_docstrings or self.current_directives['autotestdict.cdef'] - - assert isinstance(node.body, StatListNode) - - # First see if __test__ is already created - if u'__test__' in node.scope.entries: - # Do nothing - return node - - pos = node.pos - - self.tests = [] - self.testspos = node.pos - - test_dict_entry = node.scope.declare_var(EncodedString(u'__test__'), - py_object_type, - pos, - visibility='public') - create_test_dict_assignment = SingleAssignmentNode(pos, - lhs=NameNode(pos, name=EncodedString(u'__test__'), - entry=test_dict_entry), - rhs=DictNode(pos, key_value_pairs=self.tests)) - self.visitchildren(node) - node.body.stats.append(create_test_dict_assignment) - return node - - def add_test(self, testpos, path, doctest): - pos = self.testspos - keystr = u'%s (line %d)' % (path, testpos[1]) - key = UnicodeNode(pos, value=EncodedString(keystr)) - value = UnicodeNode(pos, value=doctest) - self.tests.append(DictItemNode(pos, key=key, value=value)) - - def visit_ExprNode(self, node): - # expressions cannot contain functions and lambda expressions - # do not have a docstring - return node - - def visit_FuncDefNode(self, node): - if not node.doc or (isinstance(node, DefNode) and node.fused_py_func): - return node - if not self.cdef_docstrings: - if isinstance(node, CFuncDefNode) and not node.py_func: - return node - if not self.all_docstrings and '>>>' not in node.doc: - return node - - pos = self.testspos - if self.scope_type == 'module': - path = node.entry.name - elif self.scope_type in ('pyclass', 'cclass'): - if isinstance(node, CFuncDefNode): - if node.py_func is not None: - name = node.py_func.name - else: - name = node.entry.name - else: - name = node.name - if self.scope_type == 'cclass' and name in self.blacklist: - return node - if self.scope_type == 'pyclass': - class_name = self.scope_node.name - else: - class_name = self.scope_node.class_name - if isinstance(node.entry.scope, Symtab.PropertyScope): - property_method_name = node.entry.scope.name - path = "%s.%s.%s" % (class_name, node.entry.scope.name, - node.entry.name) - else: - path = "%s.%s" % (class_name, node.entry.name) - else: - assert False - self.add_test(node.pos, path, node.doc) - return node diff --git a/third_party/cython/src/Cython/Compiler/Annotate.py b/third_party/cython/src/Cython/Compiler/Annotate.py deleted file mode 100644 index 4bbdeccfb3f81..0000000000000 --- a/third_party/cython/src/Cython/Compiler/Annotate.py +++ /dev/null @@ -1,207 +0,0 @@ -# Note: Work in progress - -import os -import re -import codecs -from xml.sax.saxutils import escape as html_escape -from StringIO import StringIO - -import Version -from Code import CCodeWriter -from Cython import Utils - -# need one-characters subsitutions (for now) so offsets aren't off -special_chars = [ - (u'&', u'\xF2', u'&'), - (u'<', u'\xF0', u'<'), - (u'>', u'\xF1', u'>'), -] - - -class AnnotationCCodeWriter(CCodeWriter): - - def __init__(self, create_from=None, buffer=None, copy_formatting=True): - CCodeWriter.__init__(self, create_from, buffer, copy_formatting=True) - if create_from is None: - self.annotation_buffer = StringIO() - self.annotations = [] - self.last_pos = None - self.code = {} - else: - # When creating an insertion point, keep references to the same database - self.annotation_buffer = create_from.annotation_buffer - self.annotations = create_from.annotations - self.code = create_from.code - self.last_pos = create_from.last_pos - - def create_new(self, create_from, buffer, copy_formatting): - return AnnotationCCodeWriter(create_from, buffer, copy_formatting) - - def write(self, s): - CCodeWriter.write(self, s) - self.annotation_buffer.write(s) - - def mark_pos(self, pos): - if pos is not None: - CCodeWriter.mark_pos(self, pos) - if self.last_pos: - pos_code = self.code.setdefault(self.last_pos[0].filename,{}) - code = pos_code.get(self.last_pos[1], "") - pos_code[self.last_pos[1]] = code + self.annotation_buffer.getvalue() - self.annotation_buffer = StringIO() - self.last_pos = pos - - def annotate(self, pos, item): - self.annotations.append((pos, item)) - - def save_annotation(self, source_filename, target_filename): - self.mark_pos(None) - f = Utils.open_source_file(source_filename) - lines = f.readlines() - for k, line in enumerate(lines): - for c, cc, html in special_chars: - line = line.replace(c, cc) - lines[k] = line - f.close() - all = [] - if False: - for pos, item in self.annotations: - if pos[0].filename == source_filename: - start = item.start() - size, end = item.end() - if size: - all.append((pos, start)) - all.append(((source_filename, pos[1], pos[2]+size), end)) - else: - all.append((pos, start+end)) - - all.sort(reverse=True) - for pos, item in all: - _, line_no, col = pos - line_no -= 1 - col += 1 - line = lines[line_no] - lines[line_no] = line[:col] + item + line[col:] - - html_filename = os.path.splitext(target_filename)[0] + ".html" - f = codecs.open(html_filename, "w", encoding="UTF-8") - f.write(u'\n') - f.write(u'\n' % Version.watermark) - f.write(u'\n') - f.write(u""" - - - - - - """) - f.write(u'\n') - f.write(u'

Generated by Cython %s\n' % Version.watermark) - c_file = Utils.decode_filename(os.path.basename(target_filename)) - f.write(u'

Raw output: %s\n' % (c_file, c_file)) - - zero_calls = dict((name, 0) for name in - 'refnanny py_macro_api py_c_api pyx_macro_api pyx_c_api error_goto'.split()) - - def annotate(match): - group_name = match.lastgroup - calls[group_name] += 1 - return ur"%s" % ( - group_name, match.group(group_name)) - - pos_comment_marker = u'/* \N{HORIZONTAL ELLIPSIS} */\n' - k = 0 - code_source_file = self.code.get(source_filename, {}) - for line in lines: - k += 1 - try: - code = code_source_file[k] - except KeyError: - code = '' - else: - code = _replace_pos_comment(pos_comment_marker, code) - if code.startswith(pos_comment_marker): - code = code[len(pos_comment_marker):] - code = html_escape(code) - - calls = zero_calls.copy() - code = _parse_code(annotate, code) - score = (5 * calls['py_c_api'] + 2 * calls['pyx_c_api'] + - calls['py_macro_api'] + calls['pyx_macro_api']) - color = u"FFFF%02x" % int(255/(1+score/10.0)) - f.write(u"

" % (color, k))
-
-            f.write(u" %d: " % k)
-            for c, cc, html in special_chars:
-                line = line.replace(cc, html)
-            f.write(line.rstrip())
-
-            f.write(u'
\n') - f.write(u"
%s
" % (k, color, code)) - f.write(u'\n') - f.close() - - -_parse_code = re.compile( - ur'(?P__Pyx_X?(?:GOT|GIVE)REF|__Pyx_RefNanny[A-Za-z]+)|' - ur'(?:' - ur'(?P__Pyx_[A-Z][A-Z_]+)|' - ur'(?P__Pyx_[A-Z][a-z_][A-Za-z_]+)|' - ur'(?PPy[A-Z][a-z]+_[A-Z][A-Z_]+)|' - ur'(?PPy[A-Z][a-z]+_[A-Z][a-z][A-Za-z_]+)' - ur')(?=\()|' # look-ahead to exclude subsequent '(' from replacement - ur'(?P(?:(?<=;) *if .* +)?\{__pyx_filename = .*goto __pyx_L\w+;\})' -).sub - - -_replace_pos_comment = re.compile( - # this matches what Cython generates as code line marker comment - ur'^\s*/\*(?:(?:[^*]|\*[^/])*\n)+\s*\*/\s*\n', - re.M -).sub - - -class AnnotationItem(object): - - def __init__(self, style, text, tag="", size=0): - self.style = style - self.text = text - self.tag = tag - self.size = size - - def start(self): - return u"%s" % (self.style, self.text, self.tag) - - def end(self): - return self.size, u"" diff --git a/third_party/cython/src/Cython/Compiler/AutoDocTransforms.py b/third_party/cython/src/Cython/Compiler/AutoDocTransforms.py deleted file mode 100644 index 408ce9abb1768..0000000000000 --- a/third_party/cython/src/Cython/Compiler/AutoDocTransforms.py +++ /dev/null @@ -1,229 +0,0 @@ -from Cython.Compiler.Visitor import CythonTransform -from Cython.Compiler.StringEncoding import EncodedString -from Cython.Compiler import Options -from Cython.Compiler import PyrexTypes, ExprNodes - -class EmbedSignature(CythonTransform): - - def __init__(self, context): - super(EmbedSignature, self).__init__(context) - self.denv = None # XXX - self.class_name = None - self.class_node = None - - unop_precedence = 11 - binop_precedence = { - 'or': 1, - 'and': 2, - 'not': 3, - 'in': 4, 'not in': 4, 'is': 4, 'is not': 4, '<': 4, '<=': 4, '>': 4, '>=': 4, '!=': 4, '==': 4, - '|': 5, - '^': 6, - '&': 7, - '<<': 8, '>>': 8, - '+': 9, '-': 9, - '*': 10, '/': 10, '//': 10, '%': 10, - # unary: '+': 11, '-': 11, '~': 11 - '**': 12} - - def _fmt_expr_node(self, node, precedence=0): - if isinstance(node, ExprNodes.BinopNode) and not node.inplace: - new_prec = self.binop_precedence.get(node.operator, 0) - result = '%s %s %s' % (self._fmt_expr_node(node.operand1, new_prec), - node.operator, - self._fmt_expr_node(node.operand2, new_prec)) - if precedence > new_prec: - result = '(%s)' % result - elif isinstance(node, ExprNodes.UnopNode): - result = '%s%s' % (node.operator, - self._fmt_expr_node(node.operand, self.unop_precedence)) - if precedence > self.unop_precedence: - result = '(%s)' % result - elif isinstance(node, ExprNodes.AttributeNode): - result = '%s.%s' % (self._fmt_expr_node(node.obj), node.attribute) - else: - result = node.name - return result - - def _fmt_arg_defv(self, arg): - default_val = arg.default - if not default_val: - return None - try: - denv = self.denv # XXX - ctval = default_val.compile_time_value(self.denv) - repr_val = repr(ctval) - if isinstance(default_val, ExprNodes.UnicodeNode): - if repr_val[:1] != 'u': - return u'u%s' % repr_val - elif isinstance(default_val, ExprNodes.BytesNode): - if repr_val[:1] != 'b': - return u'b%s' % repr_val - elif isinstance(default_val, ExprNodes.StringNode): - if repr_val[:1] in 'ub': - return repr_val[1:] - return repr_val - except Exception: - try: - return self._fmt_expr_node(default_val) - except AttributeError, e: - return '' - - def _fmt_arg(self, arg): - if arg.type is PyrexTypes.py_object_type or arg.is_self_arg: - doc = arg.name - else: - doc = arg.type.declaration_code(arg.name, for_display=1) - if arg.default: - arg_defv = self._fmt_arg_defv(arg) - if arg_defv: - doc = doc + ('=%s' % arg_defv) - return doc - - def _fmt_arglist(self, args, - npargs=0, pargs=None, - nkargs=0, kargs=None, - hide_self=False): - arglist = [] - for arg in args: - if not hide_self or not arg.entry.is_self_arg: - arg_doc = self._fmt_arg(arg) - arglist.append(arg_doc) - if pargs: - arglist.insert(npargs, '*%s' % pargs.name) - elif nkargs: - arglist.insert(npargs, '*') - if kargs: - arglist.append('**%s' % kargs.name) - return arglist - - def _fmt_ret_type(self, ret): - if ret is PyrexTypes.py_object_type: - return None - else: - return ret.declaration_code("", for_display=1) - - def _fmt_signature(self, cls_name, func_name, args, - npargs=0, pargs=None, - nkargs=0, kargs=None, - return_type=None, hide_self=False): - arglist = self._fmt_arglist(args, - npargs, pargs, - nkargs, kargs, - hide_self=hide_self) - arglist_doc = ', '.join(arglist) - func_doc = '%s(%s)' % (func_name, arglist_doc) - if cls_name: - func_doc = '%s.%s' % (cls_name, func_doc) - if return_type: - ret_doc = self._fmt_ret_type(return_type) - if ret_doc: - func_doc = '%s -> %s' % (func_doc, ret_doc) - return func_doc - - def _embed_signature(self, signature, node_doc): - if node_doc: - return "%s\n%s" % (signature, node_doc) - else: - return signature - - def __call__(self, node): - if not Options.docstrings: - return node - else: - return super(EmbedSignature, self).__call__(node) - - def visit_ClassDefNode(self, node): - oldname = self.class_name - oldclass = self.class_node - self.class_node = node - try: - # PyClassDefNode - self.class_name = node.name - except AttributeError: - # CClassDefNode - self.class_name = node.class_name - self.visitchildren(node) - self.class_name = oldname - self.class_node = oldclass - return node - - def visit_DefNode(self, node): - if not self.current_directives['embedsignature']: - return node - - is_constructor = False - hide_self = False - if node.entry.is_special: - is_constructor = self.class_node and node.name == '__init__' - if not is_constructor: - return node - class_name, func_name = None, self.class_name - hide_self = True - else: - class_name, func_name = self.class_name, node.name - - nkargs = getattr(node, 'num_kwonly_args', 0) - npargs = len(node.args) - nkargs - signature = self._fmt_signature( - class_name, func_name, node.args, - npargs, node.star_arg, - nkargs, node.starstar_arg, - return_type=None, hide_self=hide_self) - if signature: - if is_constructor: - doc_holder = self.class_node.entry.type.scope - else: - doc_holder = node.entry - - if doc_holder.doc is not None: - old_doc = doc_holder.doc - elif not is_constructor and getattr(node, 'py_func', None) is not None: - old_doc = node.py_func.entry.doc - else: - old_doc = None - new_doc = self._embed_signature(signature, old_doc) - doc_holder.doc = EncodedString(new_doc) - if not is_constructor and getattr(node, 'py_func', None) is not None: - node.py_func.entry.doc = EncodedString(new_doc) - return node - - def visit_CFuncDefNode(self, node): - if not self.current_directives['embedsignature']: - return node - if not node.overridable: # not cpdef FOO(...): - return node - - signature = self._fmt_signature( - self.class_name, node.declarator.base.name, - node.declarator.args, - return_type=node.return_type) - if signature: - if node.entry.doc is not None: - old_doc = node.entry.doc - elif getattr(node, 'py_func', None) is not None: - old_doc = node.py_func.entry.doc - else: - old_doc = None - new_doc = self._embed_signature(signature, old_doc) - node.entry.doc = EncodedString(new_doc) - if hasattr(node, 'py_func') and node.py_func is not None: - node.py_func.entry.doc = EncodedString(new_doc) - return node - - def visit_PropertyNode(self, node): - if not self.current_directives['embedsignature']: - return node - - entry = node.entry - if entry.visibility == 'public': - # property synthesised from a cdef public attribute - type_name = entry.type.declaration_code("", for_display=1) - if not entry.type.is_pyobject: - type_name = "'%s'" % type_name - elif entry.type.is_extension_type: - type_name = entry.type.module_name + '.' + type_name - signature = '%s: %s' % (entry.name, type_name) - new_doc = self._embed_signature(signature, entry.doc) - entry.doc = EncodedString(new_doc) - return node diff --git a/third_party/cython/src/Cython/Compiler/Buffer.py b/third_party/cython/src/Cython/Compiler/Buffer.py deleted file mode 100644 index 229ab8b385349..0000000000000 --- a/third_party/cython/src/Cython/Compiler/Buffer.py +++ /dev/null @@ -1,744 +0,0 @@ -from Cython.Compiler.Visitor import CythonTransform -from Cython.Compiler.ModuleNode import ModuleNode -from Cython.Compiler.Errors import CompileError -from Cython.Compiler.UtilityCode import CythonUtilityCode -from Cython.Compiler.Code import UtilityCode, TempitaUtilityCode - -from Cython.Compiler import Options -from Cython.Compiler import Interpreter -from Cython.Compiler import PyrexTypes -from Cython.Compiler import Naming -from Cython.Compiler import Symtab - - -def dedent(text, reindent=0): - from textwrap import dedent - text = dedent(text) - if reindent > 0: - indent = " " * reindent - text = '\n'.join([indent + x for x in text.split('\n')]) - return text - -class IntroduceBufferAuxiliaryVars(CythonTransform): - - # - # Entry point - # - - buffers_exists = False - using_memoryview = False - - def __call__(self, node): - assert isinstance(node, ModuleNode) - self.max_ndim = 0 - result = super(IntroduceBufferAuxiliaryVars, self).__call__(node) - if self.buffers_exists: - use_bufstruct_declare_code(node.scope) - use_py2_buffer_functions(node.scope) - node.scope.use_utility_code(empty_bufstruct_utility) - - return result - - - # - # Basic operations for transforms - # - def handle_scope(self, node, scope): - # For all buffers, insert extra variables in the scope. - # The variables are also accessible from the buffer_info - # on the buffer entry - bufvars = [entry for name, entry - in scope.entries.iteritems() - if entry.type.is_buffer] - if len(bufvars) > 0: - bufvars.sort(key=lambda entry: entry.name) - self.buffers_exists = True - - memviewslicevars = [entry for name, entry - in scope.entries.iteritems() - if entry.type.is_memoryviewslice] - if len(memviewslicevars) > 0: - self.buffers_exists = True - - - for (name, entry) in scope.entries.iteritems(): - if name == 'memoryview' and isinstance(entry.utility_code_definition, CythonUtilityCode): - self.using_memoryview = True - break - - - if isinstance(node, ModuleNode) and len(bufvars) > 0: - # for now...note that pos is wrong - raise CompileError(node.pos, "Buffer vars not allowed in module scope") - for entry in bufvars: - if entry.type.dtype.is_ptr: - raise CompileError(node.pos, "Buffers with pointer types not yet supported.") - - name = entry.name - buftype = entry.type - if buftype.ndim > Options.buffer_max_dims: - raise CompileError(node.pos, - "Buffer ndims exceeds Options.buffer_max_dims = %d" % Options.buffer_max_dims) - if buftype.ndim > self.max_ndim: - self.max_ndim = buftype.ndim - - # Declare auxiliary vars - def decvar(type, prefix): - cname = scope.mangle(prefix, name) - aux_var = scope.declare_var(name=None, cname=cname, - type=type, pos=node.pos) - if entry.is_arg: - aux_var.used = True # otherwise, NameNode will mark whether it is used - - return aux_var - - auxvars = ((PyrexTypes.c_pyx_buffer_nd_type, Naming.pybuffernd_prefix), - (PyrexTypes.c_pyx_buffer_type, Naming.pybufferstruct_prefix)) - pybuffernd, rcbuffer = [decvar(type, prefix) for (type, prefix) in auxvars] - - entry.buffer_aux = Symtab.BufferAux(pybuffernd, rcbuffer) - - scope.buffer_entries = bufvars - self.scope = scope - - def visit_ModuleNode(self, node): - self.handle_scope(node, node.scope) - self.visitchildren(node) - return node - - def visit_FuncDefNode(self, node): - self.handle_scope(node, node.local_scope) - self.visitchildren(node) - return node - -# -# Analysis -# -buffer_options = ("dtype", "ndim", "mode", "negative_indices", "cast") # ordered! -buffer_defaults = {"ndim": 1, "mode": "full", "negative_indices": True, "cast": False} -buffer_positional_options_count = 1 # anything beyond this needs keyword argument - -ERR_BUF_OPTION_UNKNOWN = '"%s" is not a buffer option' -ERR_BUF_TOO_MANY = 'Too many buffer options' -ERR_BUF_DUP = '"%s" buffer option already supplied' -ERR_BUF_MISSING = '"%s" missing' -ERR_BUF_MODE = 'Only allowed buffer modes are: "c", "fortran", "full", "strided" (as a compile-time string)' -ERR_BUF_NDIM = 'ndim must be a non-negative integer' -ERR_BUF_DTYPE = 'dtype must be "object", numeric type or a struct' -ERR_BUF_BOOL = '"%s" must be a boolean' - -def analyse_buffer_options(globalpos, env, posargs, dictargs, defaults=None, need_complete=True): - """ - Must be called during type analysis, as analyse is called - on the dtype argument. - - posargs and dictargs should consist of a list and a dict - of tuples (value, pos). Defaults should be a dict of values. - - Returns a dict containing all the options a buffer can have and - its value (with the positions stripped). - """ - if defaults is None: - defaults = buffer_defaults - - posargs, dictargs = Interpreter.interpret_compiletime_options(posargs, dictargs, type_env=env, type_args = (0,'dtype')) - - if len(posargs) > buffer_positional_options_count: - raise CompileError(posargs[-1][1], ERR_BUF_TOO_MANY) - - options = {} - for name, (value, pos) in dictargs.iteritems(): - if not name in buffer_options: - raise CompileError(pos, ERR_BUF_OPTION_UNKNOWN % name) - options[name] = value - - for name, (value, pos) in zip(buffer_options, posargs): - if not name in buffer_options: - raise CompileError(pos, ERR_BUF_OPTION_UNKNOWN % name) - if name in options: - raise CompileError(pos, ERR_BUF_DUP % name) - options[name] = value - - # Check that they are all there and copy defaults - for name in buffer_options: - if not name in options: - try: - options[name] = defaults[name] - except KeyError: - if need_complete: - raise CompileError(globalpos, ERR_BUF_MISSING % name) - - dtype = options.get("dtype") - if dtype and dtype.is_extension_type: - raise CompileError(globalpos, ERR_BUF_DTYPE) - - ndim = options.get("ndim") - if ndim and (not isinstance(ndim, int) or ndim < 0): - raise CompileError(globalpos, ERR_BUF_NDIM) - - mode = options.get("mode") - if mode and not (mode in ('full', 'strided', 'c', 'fortran')): - raise CompileError(globalpos, ERR_BUF_MODE) - - def assert_bool(name): - x = options.get(name) - if not isinstance(x, bool): - raise CompileError(globalpos, ERR_BUF_BOOL % name) - - assert_bool('negative_indices') - assert_bool('cast') - - return options - - -# -# Code generation -# - -class BufferEntry(object): - def __init__(self, entry): - self.entry = entry - self.type = entry.type - self.cname = entry.buffer_aux.buflocal_nd_var.cname - self.buf_ptr = "%s.rcbuffer->pybuffer.buf" % self.cname - self.buf_ptr_type = self.entry.type.buffer_ptr_type - - def get_buf_suboffsetvars(self): - return self._for_all_ndim("%s.diminfo[%d].suboffsets") - - def get_buf_stridevars(self): - return self._for_all_ndim("%s.diminfo[%d].strides") - - def get_buf_shapevars(self): - return self._for_all_ndim("%s.diminfo[%d].shape") - - def _for_all_ndim(self, s): - return [s % (self.cname, i) for i in range(self.type.ndim)] - - def generate_buffer_lookup_code(self, code, index_cnames): - # Create buffer lookup and return it - # This is done via utility macros/inline functions, which vary - # according to the access mode used. - params = [] - nd = self.type.ndim - mode = self.type.mode - if mode == 'full': - for i, s, o in zip(index_cnames, - self.get_buf_stridevars(), - self.get_buf_suboffsetvars()): - params.append(i) - params.append(s) - params.append(o) - funcname = "__Pyx_BufPtrFull%dd" % nd - funcgen = buf_lookup_full_code - else: - if mode == 'strided': - funcname = "__Pyx_BufPtrStrided%dd" % nd - funcgen = buf_lookup_strided_code - elif mode == 'c': - funcname = "__Pyx_BufPtrCContig%dd" % nd - funcgen = buf_lookup_c_code - elif mode == 'fortran': - funcname = "__Pyx_BufPtrFortranContig%dd" % nd - funcgen = buf_lookup_fortran_code - else: - assert False - for i, s in zip(index_cnames, self.get_buf_stridevars()): - params.append(i) - params.append(s) - - # Make sure the utility code is available - if funcname not in code.globalstate.utility_codes: - code.globalstate.utility_codes.add(funcname) - protocode = code.globalstate['utility_code_proto'] - defcode = code.globalstate['utility_code_def'] - funcgen(protocode, defcode, name=funcname, nd=nd) - - buf_ptr_type_code = self.buf_ptr_type.declaration_code("") - ptrcode = "%s(%s, %s, %s)" % (funcname, buf_ptr_type_code, self.buf_ptr, - ", ".join(params)) - return ptrcode - - -def get_flags(buffer_aux, buffer_type): - flags = 'PyBUF_FORMAT' - mode = buffer_type.mode - if mode == 'full': - flags += '| PyBUF_INDIRECT' - elif mode == 'strided': - flags += '| PyBUF_STRIDES' - elif mode == 'c': - flags += '| PyBUF_C_CONTIGUOUS' - elif mode == 'fortran': - flags += '| PyBUF_F_CONTIGUOUS' - else: - assert False - if buffer_aux.writable_needed: flags += "| PyBUF_WRITABLE" - return flags - -def used_buffer_aux_vars(entry): - buffer_aux = entry.buffer_aux - buffer_aux.buflocal_nd_var.used = True - buffer_aux.rcbuf_var.used = True - -def put_unpack_buffer_aux_into_scope(buf_entry, code): - # Generate code to copy the needed struct info into local - # variables. - buffer_aux, mode = buf_entry.buffer_aux, buf_entry.type.mode - pybuffernd_struct = buffer_aux.buflocal_nd_var.cname - - fldnames = ['strides', 'shape'] - if mode == 'full': - fldnames.append('suboffsets') - - ln = [] - for i in range(buf_entry.type.ndim): - for fldname in fldnames: - ln.append("%s.diminfo[%d].%s = %s.rcbuffer->pybuffer.%s[%d];" % \ - (pybuffernd_struct, i, fldname, - pybuffernd_struct, fldname, i)) - code.putln(' '.join(ln)) - -def put_init_vars(entry, code): - bufaux = entry.buffer_aux - pybuffernd_struct = bufaux.buflocal_nd_var.cname - pybuffer_struct = bufaux.rcbuf_var.cname - # init pybuffer_struct - code.putln("%s.pybuffer.buf = NULL;" % pybuffer_struct) - code.putln("%s.refcount = 0;" % pybuffer_struct) - # init the buffer object - # code.put_init_var_to_py_none(entry) - # init the pybuffernd_struct - code.putln("%s.data = NULL;" % pybuffernd_struct) - code.putln("%s.rcbuffer = &%s;" % (pybuffernd_struct, pybuffer_struct)) - -def put_acquire_arg_buffer(entry, code, pos): - code.globalstate.use_utility_code(acquire_utility_code) - buffer_aux = entry.buffer_aux - getbuffer = get_getbuffer_call(code, entry.cname, buffer_aux, entry.type) - - # Acquire any new buffer - code.putln("{") - code.putln("__Pyx_BufFmt_StackElem __pyx_stack[%d];" % entry.type.dtype.struct_nesting_depth()) - code.putln(code.error_goto_if("%s == -1" % getbuffer, pos)) - code.putln("}") - # An exception raised in arg parsing cannot be catched, so no - # need to care about the buffer then. - put_unpack_buffer_aux_into_scope(entry, code) - -def put_release_buffer_code(code, entry): - code.globalstate.use_utility_code(acquire_utility_code) - code.putln("__Pyx_SafeReleaseBuffer(&%s.rcbuffer->pybuffer);" % entry.buffer_aux.buflocal_nd_var.cname) - -def get_getbuffer_call(code, obj_cname, buffer_aux, buffer_type): - ndim = buffer_type.ndim - cast = int(buffer_type.cast) - flags = get_flags(buffer_aux, buffer_type) - pybuffernd_struct = buffer_aux.buflocal_nd_var.cname - - dtype_typeinfo = get_type_information_cname(code, buffer_type.dtype) - - return ("__Pyx_GetBufferAndValidate(&%(pybuffernd_struct)s.rcbuffer->pybuffer, " - "(PyObject*)%(obj_cname)s, &%(dtype_typeinfo)s, %(flags)s, %(ndim)d, " - "%(cast)d, __pyx_stack)" % locals()) - -def put_assign_to_buffer(lhs_cname, rhs_cname, buf_entry, - is_initialized, pos, code): - """ - Generate code for reassigning a buffer variables. This only deals with getting - the buffer auxiliary structure and variables set up correctly, the assignment - itself and refcounting is the responsibility of the caller. - - However, the assignment operation may throw an exception so that the reassignment - never happens. - - Depending on the circumstances there are two possible outcomes: - - Old buffer released, new acquired, rhs assigned to lhs - - Old buffer released, new acquired which fails, reaqcuire old lhs buffer - (which may or may not succeed). - """ - - buffer_aux, buffer_type = buf_entry.buffer_aux, buf_entry.type - code.globalstate.use_utility_code(acquire_utility_code) - pybuffernd_struct = buffer_aux.buflocal_nd_var.cname - flags = get_flags(buffer_aux, buffer_type) - - code.putln("{") # Set up necesarry stack for getbuffer - code.putln("__Pyx_BufFmt_StackElem __pyx_stack[%d];" % buffer_type.dtype.struct_nesting_depth()) - - getbuffer = get_getbuffer_call(code, "%s", buffer_aux, buffer_type) # fill in object below - - if is_initialized: - # Release any existing buffer - code.putln('__Pyx_SafeReleaseBuffer(&%s.rcbuffer->pybuffer);' % pybuffernd_struct) - # Acquire - retcode_cname = code.funcstate.allocate_temp(PyrexTypes.c_int_type, manage_ref=False) - code.putln("%s = %s;" % (retcode_cname, getbuffer % rhs_cname)) - code.putln('if (%s) {' % (code.unlikely("%s < 0" % retcode_cname))) - # If acquisition failed, attempt to reacquire the old buffer - # before raising the exception. A failure of reacquisition - # will cause the reacquisition exception to be reported, one - # can consider working around this later. - type, value, tb = [code.funcstate.allocate_temp(PyrexTypes.py_object_type, manage_ref=False) - for i in range(3)] - code.putln('PyErr_Fetch(&%s, &%s, &%s);' % (type, value, tb)) - code.putln('if (%s) {' % code.unlikely("%s == -1" % (getbuffer % lhs_cname))) - code.putln('Py_XDECREF(%s); Py_XDECREF(%s); Py_XDECREF(%s);' % (type, value, tb)) # Do not refnanny these! - code.globalstate.use_utility_code(raise_buffer_fallback_code) - code.putln('__Pyx_RaiseBufferFallbackError();') - code.putln('} else {') - code.putln('PyErr_Restore(%s, %s, %s);' % (type, value, tb)) - for t in (type, value, tb): - code.funcstate.release_temp(t) - code.putln('}') - code.putln('}') - # Unpack indices - put_unpack_buffer_aux_into_scope(buf_entry, code) - code.putln(code.error_goto_if_neg(retcode_cname, pos)) - code.funcstate.release_temp(retcode_cname) - else: - # Our entry had no previous value, so set to None when acquisition fails. - # In this case, auxiliary vars should be set up right in initialization to a zero-buffer, - # so it suffices to set the buf field to NULL. - code.putln('if (%s) {' % code.unlikely("%s == -1" % (getbuffer % rhs_cname))) - code.putln('%s = %s; __Pyx_INCREF(Py_None); %s.rcbuffer->pybuffer.buf = NULL;' % - (lhs_cname, - PyrexTypes.typecast(buffer_type, PyrexTypes.py_object_type, "Py_None"), - pybuffernd_struct)) - code.putln(code.error_goto(pos)) - code.put('} else {') - # Unpack indices - put_unpack_buffer_aux_into_scope(buf_entry, code) - code.putln('}') - - code.putln("}") # Release stack - -def put_buffer_lookup_code(entry, index_signeds, index_cnames, directives, - pos, code, negative_indices, in_nogil_context): - """ - Generates code to process indices and calculate an offset into - a buffer. Returns a C string which gives a pointer which can be - read from or written to at will (it is an expression so caller should - store it in a temporary if it is used more than once). - - As the bounds checking can have any number of combinations of unsigned - arguments, smart optimizations etc. we insert it directly in the function - body. The lookup however is delegated to a inline function that is instantiated - once per ndim (lookup with suboffsets tend to get quite complicated). - - entry is a BufferEntry - """ - negative_indices = directives['wraparound'] and negative_indices - - if directives['boundscheck']: - # Check bounds and fix negative indices. - # We allocate a temporary which is initialized to -1, meaning OK (!). - # If an error occurs, the temp is set to the dimension index the - # error is occuring at. - tmp_cname = code.funcstate.allocate_temp(PyrexTypes.c_int_type, manage_ref=False) - code.putln("%s = -1;" % tmp_cname) - for dim, (signed, cname, shape) in enumerate(zip(index_signeds, index_cnames, - entry.get_buf_shapevars())): - if signed != 0: - # not unsigned, deal with negative index - code.putln("if (%s < 0) {" % cname) - if negative_indices: - code.putln("%s += %s;" % (cname, shape)) - code.putln("if (%s) %s = %d;" % ( - code.unlikely("%s < 0" % cname), tmp_cname, dim)) - else: - code.putln("%s = %d;" % (tmp_cname, dim)) - code.put("} else ") - # check bounds in positive direction - if signed != 0: - cast = "" - else: - cast = "(size_t)" - code.putln("if (%s) %s = %d;" % ( - code.unlikely("%s >= %s%s" % (cname, cast, shape)), - tmp_cname, dim)) - - if in_nogil_context: - code.globalstate.use_utility_code(raise_indexerror_nogil) - func = '__Pyx_RaiseBufferIndexErrorNogil' - else: - code.globalstate.use_utility_code(raise_indexerror_code) - func = '__Pyx_RaiseBufferIndexError' - - code.putln("if (%s) {" % code.unlikely("%s != -1" % tmp_cname)) - code.putln('%s(%s);' % (func, tmp_cname)) - code.putln(code.error_goto(pos)) - code.putln('}') - code.funcstate.release_temp(tmp_cname) - elif negative_indices: - # Only fix negative indices. - for signed, cname, shape in zip(index_signeds, index_cnames, - entry.get_buf_shapevars()): - if signed != 0: - code.putln("if (%s < 0) %s += %s;" % (cname, cname, shape)) - - return entry.generate_buffer_lookup_code(code, index_cnames) - - -def use_bufstruct_declare_code(env): - env.use_utility_code(buffer_struct_declare_code) - - -def get_empty_bufstruct_code(max_ndim): - code = dedent(""" - static Py_ssize_t __Pyx_zeros[] = {%s}; - static Py_ssize_t __Pyx_minusones[] = {%s}; - """) % (", ".join(["0"] * max_ndim), ", ".join(["-1"] * max_ndim)) - return UtilityCode(proto=code) - -empty_bufstruct_utility = get_empty_bufstruct_code(Options.buffer_max_dims) - -def buf_lookup_full_code(proto, defin, name, nd): - """ - Generates a buffer lookup function for the right number - of dimensions. The function gives back a void* at the right location. - """ - # _i_ndex, _s_tride, sub_o_ffset - macroargs = ", ".join(["i%d, s%d, o%d" % (i, i, i) for i in range(nd)]) - proto.putln("#define %s(type, buf, %s) (type)(%s_imp(buf, %s))" % (name, macroargs, name, macroargs)) - - funcargs = ", ".join(["Py_ssize_t i%d, Py_ssize_t s%d, Py_ssize_t o%d" % (i, i, i) for i in range(nd)]) - proto.putln("static CYTHON_INLINE void* %s_imp(void* buf, %s);" % (name, funcargs)) - defin.putln(dedent(""" - static CYTHON_INLINE void* %s_imp(void* buf, %s) { - char* ptr = (char*)buf; - """) % (name, funcargs) + "".join([dedent("""\ - ptr += s%d * i%d; - if (o%d >= 0) ptr = *((char**)ptr) + o%d; - """) % (i, i, i, i) for i in range(nd)] - ) + "\nreturn ptr;\n}") - -def buf_lookup_strided_code(proto, defin, name, nd): - """ - Generates a buffer lookup function for the right number - of dimensions. The function gives back a void* at the right location. - """ - # _i_ndex, _s_tride - args = ", ".join(["i%d, s%d" % (i, i) for i in range(nd)]) - offset = " + ".join(["i%d * s%d" % (i, i) for i in range(nd)]) - proto.putln("#define %s(type, buf, %s) (type)((char*)buf + %s)" % (name, args, offset)) - -def buf_lookup_c_code(proto, defin, name, nd): - """ - Similar to strided lookup, but can assume that the last dimension - doesn't need a multiplication as long as. - Still we keep the same signature for now. - """ - if nd == 1: - proto.putln("#define %s(type, buf, i0, s0) ((type)buf + i0)" % name) - else: - args = ", ".join(["i%d, s%d" % (i, i) for i in range(nd)]) - offset = " + ".join(["i%d * s%d" % (i, i) for i in range(nd - 1)]) - proto.putln("#define %s(type, buf, %s) ((type)((char*)buf + %s) + i%d)" % (name, args, offset, nd - 1)) - -def buf_lookup_fortran_code(proto, defin, name, nd): - """ - Like C lookup, but the first index is optimized instead. - """ - if nd == 1: - proto.putln("#define %s(type, buf, i0, s0) ((type)buf + i0)" % name) - else: - args = ", ".join(["i%d, s%d" % (i, i) for i in range(nd)]) - offset = " + ".join(["i%d * s%d" % (i, i) for i in range(1, nd)]) - proto.putln("#define %s(type, buf, %s) ((type)((char*)buf + %s) + i%d)" % (name, args, offset, 0)) - - -def use_py2_buffer_functions(env): - env.use_utility_code(GetAndReleaseBufferUtilityCode()) - -class GetAndReleaseBufferUtilityCode(object): - # Emulation of PyObject_GetBuffer and PyBuffer_Release for Python 2. - # For >= 2.6 we do double mode -- use the new buffer interface on objects - # which has the right tp_flags set, but emulation otherwise. - - requires = None - is_cython_utility = False - - def __init__(self): - pass - - def __eq__(self, other): - return isinstance(other, GetAndReleaseBufferUtilityCode) - - def __hash__(self): - return 24342342 - - def get_tree(self): pass - - def put_code(self, output): - code = output['utility_code_def'] - proto_code = output['utility_code_proto'] - env = output.module_node.scope - cython_scope = env.context.cython_scope - - # Search all types for __getbuffer__ overloads - types = [] - visited_scopes = set() - def find_buffer_types(scope): - if scope in visited_scopes: - return - visited_scopes.add(scope) - for m in scope.cimported_modules: - find_buffer_types(m) - for e in scope.type_entries: - if isinstance(e.utility_code_definition, CythonUtilityCode): - continue - t = e.type - if t.is_extension_type: - if scope is cython_scope and not e.used: - continue - release = get = None - for x in t.scope.pyfunc_entries: - if x.name == u"__getbuffer__": get = x.func_cname - elif x.name == u"__releasebuffer__": release = x.func_cname - if get: - types.append((t.typeptr_cname, get, release)) - - find_buffer_types(env) - - util_code = TempitaUtilityCode.load( - "GetAndReleaseBuffer", from_file="Buffer.c", - context=dict(types=types)) - - proto = util_code.format_code(util_code.proto) - impl = util_code.format_code( - util_code.inject_string_constants(util_code.impl, output)[1]) - - proto_code.putln(proto) - code.putln(impl) - - -def mangle_dtype_name(dtype): - # Use prefixes to seperate user defined types from builtins - # (consider "typedef float unsigned_int") - if dtype.is_pyobject: - return "object" - elif dtype.is_ptr: - return "ptr" - else: - if dtype.is_typedef or dtype.is_struct_or_union: - prefix = "nn_" - else: - prefix = "" - type_decl = dtype.declaration_code("") - type_decl = type_decl.replace(" ", "_") - return prefix + type_decl.replace("[", "_").replace("]", "_") - -def get_type_information_cname(code, dtype, maxdepth=None): - """ - Output the run-time type information (__Pyx_TypeInfo) for given dtype, - and return the name of the type info struct. - - Structs with two floats of the same size are encoded as complex numbers. - One can seperate between complex numbers declared as struct or with native - encoding by inspecting to see if the fields field of the type is - filled in. - """ - namesuffix = mangle_dtype_name(dtype) - name = "__Pyx_TypeInfo_%s" % namesuffix - structinfo_name = "__Pyx_StructFields_%s" % namesuffix - - if dtype.is_error: return "" - - # It's critical that walking the type info doesn't use more stack - # depth than dtype.struct_nesting_depth() returns, so use an assertion for this - if maxdepth is None: maxdepth = dtype.struct_nesting_depth() - if maxdepth <= 0: - assert False - - if name not in code.globalstate.utility_codes: - code.globalstate.utility_codes.add(name) - typecode = code.globalstate['typeinfo'] - - arraysizes = [] - if dtype.is_array: - while dtype.is_array: - arraysizes.append(dtype.size) - dtype = dtype.base_type - - complex_possible = dtype.is_struct_or_union and dtype.can_be_complex() - - declcode = dtype.declaration_code("") - if dtype.is_simple_buffer_dtype(): - structinfo_name = "NULL" - elif dtype.is_struct: - fields = dtype.scope.var_entries - # Must pre-call all used types in order not to recurse utility code - # writing. - assert len(fields) > 0 - types = [get_type_information_cname(code, f.type, maxdepth - 1) - for f in fields] - typecode.putln("static __Pyx_StructField %s[] = {" % structinfo_name, safe=True) - for f, typeinfo in zip(fields, types): - typecode.putln(' {&%s, "%s", offsetof(%s, %s)},' % - (typeinfo, f.name, dtype.declaration_code(""), f.cname), safe=True) - typecode.putln(' {NULL, NULL, 0}', safe=True) - typecode.putln("};", safe=True) - else: - assert False - - rep = str(dtype) - - flags = "0" - is_unsigned = "0" - if dtype is PyrexTypes.c_char_type: - is_unsigned = "IS_UNSIGNED(%s)" % declcode - typegroup = "'H'" - elif dtype.is_int: - is_unsigned = "IS_UNSIGNED(%s)" % declcode - typegroup = "%s ? 'U' : 'I'" % is_unsigned - elif complex_possible or dtype.is_complex: - typegroup = "'C'" - elif dtype.is_float: - typegroup = "'R'" - elif dtype.is_struct: - typegroup = "'S'" - if dtype.packed: - flags = "__PYX_BUF_FLAGS_PACKED_STRUCT" - elif dtype.is_pyobject: - typegroup = "'O'" - else: - assert False, dtype - - typeinfo = ('static __Pyx_TypeInfo %s = ' - '{ "%s", %s, sizeof(%s), { %s }, %s, %s, %s, %s };') - tup = (name, rep, structinfo_name, declcode, - ', '.join([str(x) for x in arraysizes]) or '0', len(arraysizes), - typegroup, is_unsigned, flags) - typecode.putln(typeinfo % tup, safe=True) - - return name - -def load_buffer_utility(util_code_name, context=None, **kwargs): - if context is None: - return UtilityCode.load(util_code_name, "Buffer.c", **kwargs) - else: - return TempitaUtilityCode.load(util_code_name, "Buffer.c", context=context, **kwargs) - -context = dict(max_dims=str(Options.buffer_max_dims)) -buffer_struct_declare_code = load_buffer_utility("BufferStructDeclare", - context=context) - - -# Utility function to set the right exception -# The caller should immediately goto_error -raise_indexerror_code = load_buffer_utility("BufferIndexError") -raise_indexerror_nogil = load_buffer_utility("BufferIndexErrorNogil") - -raise_buffer_fallback_code = load_buffer_utility("BufferFallbackError") -buffer_structs_code = load_buffer_utility( - "BufferFormatStructs", proto_block='utility_code_proto_before_types') -acquire_utility_code = load_buffer_utility("BufferFormatCheck", - context=context, - requires=[buffer_structs_code]) - -# See utility code BufferFormatFromTypeInfo -_typeinfo_to_format_code = load_buffer_utility("TypeInfoToFormat", context={}, - requires=[buffer_structs_code]) -typeinfo_compare_code = load_buffer_utility("TypeInfoCompare", context={}, - requires=[buffer_structs_code]) diff --git a/third_party/cython/src/Cython/Compiler/Builtin.py b/third_party/cython/src/Cython/Compiler/Builtin.py deleted file mode 100644 index 81eaa0f7e1d8c..0000000000000 --- a/third_party/cython/src/Cython/Compiler/Builtin.py +++ /dev/null @@ -1,404 +0,0 @@ -# -# Builtin Definitions -# - -from Symtab import BuiltinScope, StructOrUnionScope -from Code import UtilityCode -from TypeSlots import Signature -import PyrexTypes -import Options - - -# C-level implementations of builtin types, functions and methods - -iter_next_utility_code = UtilityCode.load("IterNext", "ObjectHandling.c") -getattr_utility_code = UtilityCode.load("GetAttr", "ObjectHandling.c") -getattr3_utility_code = UtilityCode.load("GetAttr3", "Builtins.c") -pyexec_utility_code = UtilityCode.load("PyExec", "Builtins.c") -pyexec_globals_utility_code = UtilityCode.load("PyExecGlobals", "Builtins.c") -globals_utility_code = UtilityCode.load("Globals", "Builtins.c") - -py_set_utility_code = UtilityCode.load("pyset_compat", "Builtins.c") - -builtin_utility_code = { - 'set' : py_set_utility_code, - 'frozenset' : py_set_utility_code, -} - - -# mapping from builtins to their C-level equivalents - -class _BuiltinOverride(object): - def __init__(self, py_name, args, ret_type, cname, py_equiv="*", - utility_code=None, sig=None, func_type=None, - is_strict_signature=False, builtin_return_type=None): - self.py_name, self.cname, self.py_equiv = py_name, cname, py_equiv - self.args, self.ret_type = args, ret_type - self.func_type, self.sig = func_type, sig - self.builtin_return_type = builtin_return_type - self.is_strict_signature = is_strict_signature - self.utility_code = utility_code - - def build_func_type(self, sig=None, self_arg=None): - if sig is None: - sig = Signature(self.args, self.ret_type) - sig.exception_check = False # not needed for the current builtins - func_type = sig.function_type(self_arg) - if self.is_strict_signature: - func_type.is_strict_signature = True - if self.builtin_return_type: - func_type.return_type = builtin_types[self.builtin_return_type] - return func_type - - -class BuiltinAttribute(object): - def __init__(self, py_name, cname=None, field_type=None, field_type_name=None): - self.py_name = py_name - self.cname = cname or py_name - self.field_type_name = field_type_name # can't do the lookup before the type is declared! - self.field_type = field_type - - def declare_in_type(self, self_type): - if self.field_type_name is not None: - # lazy type lookup - field_type = builtin_scope.lookup(self.field_type_name).type - else: - field_type = self.field_type or PyrexTypes.py_object_type - entry = self_type.scope.declare(self.py_name, self.cname, field_type, None, 'private') - entry.is_variable = True - - -class BuiltinFunction(_BuiltinOverride): - def declare_in_scope(self, scope): - func_type, sig = self.func_type, self.sig - if func_type is None: - func_type = self.build_func_type(sig) - scope.declare_builtin_cfunction(self.py_name, func_type, self.cname, - self.py_equiv, self.utility_code) - - -class BuiltinMethod(_BuiltinOverride): - def declare_in_type(self, self_type): - method_type, sig = self.func_type, self.sig - if method_type is None: - # override 'self' type (first argument) - self_arg = PyrexTypes.CFuncTypeArg("", self_type, None) - self_arg.not_none = True - self_arg.accept_builtin_subtypes = True - method_type = self.build_func_type(sig, self_arg) - self_type.scope.declare_builtin_cfunction( - self.py_name, method_type, self.cname, utility_code=self.utility_code) - - -builtin_function_table = [ - # name, args, return, C API func, py equiv = "*" - BuiltinFunction('abs', "d", "d", "fabs", - is_strict_signature = True), - BuiltinFunction('abs', "f", "f", "fabsf", - is_strict_signature = True), - BuiltinFunction('abs', None, None, "__Pyx_abs_int", - utility_code = UtilityCode.load("abs_int", "Builtins.c"), - func_type = PyrexTypes.CFuncType( - PyrexTypes.c_uint_type, [ - PyrexTypes.CFuncTypeArg("arg", PyrexTypes.c_int_type, None) - ], - is_strict_signature = True)), - BuiltinFunction('abs', None, None, "__Pyx_abs_long", - utility_code = UtilityCode.load("abs_long", "Builtins.c"), - func_type = PyrexTypes.CFuncType( - PyrexTypes.c_ulong_type, [ - PyrexTypes.CFuncTypeArg("arg", PyrexTypes.c_long_type, None) - ], - is_strict_signature = True)), - BuiltinFunction('abs', None, None, "__Pyx_abs_longlong", - utility_code = UtilityCode.load("abs_longlong", "Builtins.c"), - func_type = PyrexTypes.CFuncType( - PyrexTypes.c_ulonglong_type, [ - PyrexTypes.CFuncTypeArg("arg", PyrexTypes.c_longlong_type, None) - ], - is_strict_signature = True)), - BuiltinFunction('abs', "O", "O", "PyNumber_Absolute"), - BuiltinFunction('callable', "O", "b", "__Pyx_PyCallable_Check", - utility_code = UtilityCode.load("CallableCheck", "ObjectHandling.c")), - #('chr', "", "", ""), - #('cmp', "", "", "", ""), # int PyObject_Cmp(PyObject *o1, PyObject *o2, int *result) - #('compile', "", "", ""), # PyObject* Py_CompileString( char *str, char *filename, int start) - BuiltinFunction('delattr', "OO", "r", "PyObject_DelAttr"), - BuiltinFunction('dir', "O", "O", "PyObject_Dir"), - BuiltinFunction('divmod', "OO", "O", "PyNumber_Divmod"), - BuiltinFunction('exec', "O", "O", "__Pyx_PyExecGlobals", - utility_code = pyexec_globals_utility_code), - BuiltinFunction('exec', "OO", "O", "__Pyx_PyExec2", - utility_code = pyexec_utility_code), - BuiltinFunction('exec', "OOO", "O", "__Pyx_PyExec3", - utility_code = pyexec_utility_code), - #('eval', "", "", ""), - #('execfile', "", "", ""), - #('filter', "", "", ""), - BuiltinFunction('getattr3', "OOO", "O", "__Pyx_GetAttr3", "getattr", - utility_code=getattr3_utility_code), # Pyrex legacy - BuiltinFunction('getattr', "OOO", "O", "__Pyx_GetAttr3", - utility_code=getattr3_utility_code), - BuiltinFunction('getattr', "OO", "O", "__Pyx_GetAttr", - utility_code=getattr_utility_code), - BuiltinFunction('hasattr', "OO", "b", "PyObject_HasAttr"), - BuiltinFunction('hash', "O", "h", "PyObject_Hash"), - #('hex', "", "", ""), - #('id', "", "", ""), - #('input', "", "", ""), - BuiltinFunction('intern', "O", "O", "__Pyx_Intern", - utility_code = UtilityCode.load("Intern", "Builtins.c")), - BuiltinFunction('isinstance', "OO", "b", "PyObject_IsInstance"), - BuiltinFunction('issubclass', "OO", "b", "PyObject_IsSubclass"), - BuiltinFunction('iter', "OO", "O", "PyCallIter_New"), - BuiltinFunction('iter', "O", "O", "PyObject_GetIter"), - BuiltinFunction('len', "O", "z", "PyObject_Length"), - BuiltinFunction('locals', "", "O", "__pyx_locals"), - #('map', "", "", ""), - #('max', "", "", ""), - #('min', "", "", ""), - BuiltinFunction('next', "O", "O", "__Pyx_PyIter_Next", - utility_code = iter_next_utility_code), # not available in Py2 => implemented here - BuiltinFunction('next', "OO", "O", "__Pyx_PyIter_Next2", - utility_code = iter_next_utility_code), # not available in Py2 => implemented here - #('oct', "", "", ""), - #('open', "ss", "O", "PyFile_FromString"), # not in Py3 - #('ord', "", "", ""), - BuiltinFunction('pow', "OOO", "O", "PyNumber_Power"), - BuiltinFunction('pow', "OO", "O", "__Pyx_PyNumber_Power2", - utility_code = UtilityCode.load("pow2", "Builtins.c")), - #('range', "", "", ""), - #('raw_input', "", "", ""), - #('reduce', "", "", ""), - BuiltinFunction('reload', "O", "O", "PyImport_ReloadModule"), - BuiltinFunction('repr', "O", "O", "PyObject_Repr", builtin_return_type='str'), - #('round', "", "", ""), - BuiltinFunction('setattr', "OOO", "r", "PyObject_SetAttr"), - #('sum', "", "", ""), - #('type', "O", "O", "PyObject_Type"), - #('unichr', "", "", ""), - #('unicode', "", "", ""), - #('vars', "", "", ""), - #('zip', "", "", ""), - # Can't do these easily until we have builtin type entries. - #('typecheck', "OO", "i", "PyObject_TypeCheck", False), - #('issubtype', "OO", "i", "PyType_IsSubtype", False), - - # Put in namespace append optimization. - BuiltinFunction('__Pyx_PyObject_Append', "OO", "O", "__Pyx_PyObject_Append"), -] - -if not Options.old_style_globals: - builtin_function_table.append( - BuiltinFunction('globals', "", "O", "__Pyx_Globals", - utility_code=globals_utility_code)) - -# Builtin types -# bool -# buffer -# classmethod -# dict -# enumerate -# file -# float -# int -# list -# long -# object -# property -# slice -# staticmethod -# super -# str -# tuple -# type -# xrange - -builtin_types_table = [ - - ("type", "PyType_Type", []), - -# This conflicts with the C++ bool type, and unfortunately -# C++ is too liberal about PyObject* <-> bool conversions, -# resulting in unintuitive runtime behavior and segfaults. -# ("bool", "PyBool_Type", []), - - ("int", "PyInt_Type", []), - ("long", "PyLong_Type", []), - ("float", "PyFloat_Type", []), - - ("complex", "PyComplex_Type", [BuiltinAttribute('cval', field_type_name = 'Py_complex'), - BuiltinAttribute('real', 'cval.real', field_type = PyrexTypes.c_double_type), - BuiltinAttribute('imag', 'cval.imag', field_type = PyrexTypes.c_double_type), - ]), - - ("basestring", "PyBaseString_Type", [ - BuiltinMethod("join", "TO", "T", "__Pyx_PyBaseString_Join", - utility_code=UtilityCode.load("StringJoin", "StringTools.c")), - ]), - ("bytearray", "PyByteArray_Type", [ - ]), - ("bytes", "PyBytes_Type", [BuiltinMethod("__contains__", "TO", "b", "PySequence_Contains"), - BuiltinMethod("join", "TO", "O", "__Pyx_PyBytes_Join", - utility_code=UtilityCode.load("StringJoin", "StringTools.c")), - ]), - ("str", "PyString_Type", [BuiltinMethod("__contains__", "TO", "b", "PySequence_Contains"), - BuiltinMethod("join", "TO", "O", "__Pyx_PyString_Join", - builtin_return_type='basestring', - utility_code=UtilityCode.load("StringJoin", "StringTools.c")), - ]), - ("unicode", "PyUnicode_Type", [BuiltinMethod("__contains__", "TO", "b", "PyUnicode_Contains"), - BuiltinMethod("join", "TO", "T", "PyUnicode_Join"), - ]), - - ("tuple", "PyTuple_Type", [BuiltinMethod("__contains__", "TO", "b", "PySequence_Contains"), - ]), - - ("list", "PyList_Type", [BuiltinMethod("__contains__", "TO", "b", "PySequence_Contains"), - BuiltinMethod("insert", "TzO", "r", "PyList_Insert"), - BuiltinMethod("reverse", "T", "r", "PyList_Reverse"), - BuiltinMethod("append", "TO", "r", "__Pyx_PyList_Append", - utility_code=UtilityCode.load("ListAppend", "Optimize.c")), - BuiltinMethod("extend", "TO", "r", "__Pyx_PyList_Extend", - utility_code=UtilityCode.load("ListExtend", "Optimize.c")), - ]), - - ("dict", "PyDict_Type", [BuiltinMethod("__contains__", "TO", "b", "PyDict_Contains"), - BuiltinMethod("has_key", "TO", "b", "PyDict_Contains"), - BuiltinMethod("items", "T", "O", "__Pyx_PyDict_Items", - utility_code=UtilityCode.load("py_dict_items", "Builtins.c")), - BuiltinMethod("keys", "T", "O", "__Pyx_PyDict_Keys", - utility_code=UtilityCode.load("py_dict_keys", "Builtins.c")), - BuiltinMethod("values", "T", "O", "__Pyx_PyDict_Values", - utility_code=UtilityCode.load("py_dict_values", "Builtins.c")), - BuiltinMethod("iteritems", "T", "O", "__Pyx_PyDict_IterItems", - utility_code=UtilityCode.load("py_dict_iteritems", "Builtins.c")), - BuiltinMethod("iterkeys", "T", "O", "__Pyx_PyDict_IterKeys", - utility_code=UtilityCode.load("py_dict_iterkeys", "Builtins.c")), - BuiltinMethod("itervalues", "T", "O", "__Pyx_PyDict_IterValues", - utility_code=UtilityCode.load("py_dict_itervalues", "Builtins.c")), - BuiltinMethod("viewitems", "T", "O", "__Pyx_PyDict_ViewItems", - utility_code=UtilityCode.load("py_dict_viewitems", "Builtins.c")), - BuiltinMethod("viewkeys", "T", "O", "__Pyx_PyDict_ViewKeys", - utility_code=UtilityCode.load("py_dict_viewkeys", "Builtins.c")), - BuiltinMethod("viewvalues", "T", "O", "__Pyx_PyDict_ViewValues", - utility_code=UtilityCode.load("py_dict_viewvalues", "Builtins.c")), - BuiltinMethod("clear", "T", "r", "__Pyx_PyDict_Clear", - utility_code=UtilityCode.load("py_dict_clear", "Optimize.c")), - BuiltinMethod("copy", "T", "T", "PyDict_Copy")]), - - ("slice", "PySlice_Type", [BuiltinAttribute('start'), - BuiltinAttribute('stop'), - BuiltinAttribute('step'), - ]), -# ("file", "PyFile_Type", []), # not in Py3 - - ("set", "PySet_Type", [BuiltinMethod("__contains__", "TO", "b", "PySequence_Contains"), - BuiltinMethod("clear", "T", "r", "PySet_Clear", - utility_code = py_set_utility_code), - # discard() and remove() have a special treatment for unhashable values -# BuiltinMethod("discard", "TO", "r", "PySet_Discard", -# utility_code = py_set_utility_code), - BuiltinMethod("add", "TO", "r", "PySet_Add", - utility_code = py_set_utility_code), - BuiltinMethod("pop", "T", "O", "PySet_Pop", - utility_code = py_set_utility_code)]), - ("frozenset", "PyFrozenSet_Type", []), -] - - -types_that_construct_their_instance = set([ - # some builtin types do not always return an instance of - # themselves - these do: - 'type', 'bool', 'long', 'float', 'complex', - 'bytes', 'unicode', 'bytearray', - 'tuple', 'list', 'dict', 'set', 'frozenset' - # 'str', # only in Py3.x - # 'file', # only in Py2.x -]) - - -builtin_structs_table = [ - ('Py_buffer', 'Py_buffer', - [("buf", PyrexTypes.c_void_ptr_type), - ("obj", PyrexTypes.py_object_type), - ("len", PyrexTypes.c_py_ssize_t_type), - ("itemsize", PyrexTypes.c_py_ssize_t_type), - ("readonly", PyrexTypes.c_bint_type), - ("ndim", PyrexTypes.c_int_type), - ("format", PyrexTypes.c_char_ptr_type), - ("shape", PyrexTypes.c_py_ssize_t_ptr_type), - ("strides", PyrexTypes.c_py_ssize_t_ptr_type), - ("suboffsets", PyrexTypes.c_py_ssize_t_ptr_type), - ("smalltable", PyrexTypes.CArrayType(PyrexTypes.c_py_ssize_t_type, 2)), - ("internal", PyrexTypes.c_void_ptr_type), - ]), - ('Py_complex', 'Py_complex', - [('real', PyrexTypes.c_double_type), - ('imag', PyrexTypes.c_double_type), - ]) -] - -# set up builtin scope - -builtin_scope = BuiltinScope() - -def init_builtin_funcs(): - for bf in builtin_function_table: - bf.declare_in_scope(builtin_scope) - -builtin_types = {} - -def init_builtin_types(): - global builtin_types - for name, cname, methods in builtin_types_table: - utility = builtin_utility_code.get(name) - if name == 'frozenset': - objstruct_cname = 'PySetObject' - elif name == 'bool': - objstruct_cname = None - else: - objstruct_cname = 'Py%sObject' % name.capitalize() - the_type = builtin_scope.declare_builtin_type(name, cname, utility, objstruct_cname) - builtin_types[name] = the_type - for method in methods: - method.declare_in_type(the_type) - -def init_builtin_structs(): - for name, cname, attribute_types in builtin_structs_table: - scope = StructOrUnionScope(name) - for attribute_name, attribute_type in attribute_types: - scope.declare_var(attribute_name, attribute_type, None, - attribute_name, allow_pyobject=True) - builtin_scope.declare_struct_or_union( - name, "struct", scope, 1, None, cname = cname) - - -def init_builtins(): - init_builtin_structs() - init_builtin_types() - init_builtin_funcs() - builtin_scope.declare_var( - '__debug__', PyrexTypes.c_const_type(PyrexTypes.c_bint_type), - pos=None, cname='(!Py_OptimizeFlag)', is_cdef=True) - global list_type, tuple_type, dict_type, set_type, frozenset_type - global bytes_type, str_type, unicode_type, basestring_type, slice_type - global float_type, bool_type, type_type, complex_type, bytearray_type - type_type = builtin_scope.lookup('type').type - list_type = builtin_scope.lookup('list').type - tuple_type = builtin_scope.lookup('tuple').type - dict_type = builtin_scope.lookup('dict').type - set_type = builtin_scope.lookup('set').type - frozenset_type = builtin_scope.lookup('frozenset').type - slice_type = builtin_scope.lookup('slice').type - bytes_type = builtin_scope.lookup('bytes').type - str_type = builtin_scope.lookup('str').type - unicode_type = builtin_scope.lookup('unicode').type - basestring_type = builtin_scope.lookup('basestring').type - bytearray_type = builtin_scope.lookup('bytearray').type - float_type = builtin_scope.lookup('float').type - bool_type = builtin_scope.lookup('bool').type - complex_type = builtin_scope.lookup('complex').type - - -init_builtins() diff --git a/third_party/cython/src/Cython/Compiler/CmdLine.py b/third_party/cython/src/Cython/Compiler/CmdLine.py deleted file mode 100644 index dfc2b96e65084..0000000000000 --- a/third_party/cython/src/Cython/Compiler/CmdLine.py +++ /dev/null @@ -1,184 +0,0 @@ -# -# Cython - Command Line Parsing -# - -import os -import sys -import Options - -usage = """\ -Cython (http://cython.org) is a compiler for code written in the -Cython language. Cython is based on Pyrex by Greg Ewing. - -Usage: cython [options] sourcefile.{pyx,py} ... - -Options: - -V, --version Display version number of cython compiler - -l, --create-listing Write error messages to a listing file - -I, --include-dir Search for include files in named directory - (multiple include directories are allowed). - -o, --output-file Specify name of generated C file - -t, --timestamps Only compile newer source files - -f, --force Compile all source files (overrides implied -t) - -v, --verbose Be verbose, print file names on multiple compilation - -p, --embed-positions If specified, the positions in Cython files of each - function definition is embedded in its docstring. - --cleanup Release interned objects on python exit, for memory debugging. - Level indicates aggressiveness, default 0 releases nothing. - -w, --working Sets the working directory for Cython (the directory modules - are searched from) - --gdb Output debug information for cygdb - --gdb-outdir Specify gdb debug information output directory. Implies --gdb. - - -D, --no-docstrings Strip docstrings from the compiled module. - -a, --annotate Produce a colorized HTML version of the source. - --line-directives Produce #line directives pointing to the .pyx source - --cplus Output a C++ rather than C file. - --embed[=] Generate a main() function that embeds the Python interpreter. - -2 Compile based on Python-2 syntax and code semantics. - -3 Compile based on Python-3 syntax and code semantics. - --lenient Change some compile time errors to runtime errors to - improve Python compatibility - --capi-reexport-cincludes Add cincluded headers to any auto-generated header files. - --fast-fail Abort the compilation on the first error - --warning-errors, -Werror Make all warnings into errors - --warning-extra, -Wextra Enable extra warnings - -X, --directive =[, 1: - sys.stderr.write( - "cython: Only one source file allowed when using -o\n") - sys.exit(1) - if len(sources) == 0 and not options.show_version: - bad_usage() - if Options.embed and len(sources) > 1: - sys.stderr.write( - "cython: Only one source file allowed when using -embed\n") - sys.exit(1) - return options, sources - diff --git a/third_party/cython/src/Cython/Compiler/Code.pxd b/third_party/cython/src/Cython/Compiler/Code.pxd deleted file mode 100644 index 5ec9a97743115..0000000000000 --- a/third_party/cython/src/Cython/Compiler/Code.pxd +++ /dev/null @@ -1,91 +0,0 @@ - -cimport cython - -#cdef class UtilityCodeBase(object): -# cdef public object name -# cdef public object proto -# cdef public object impl -# cdef public object init -# cdef public object cleanup -# cdef public object requires -# cdef public dict _cache -# cdef public list specialize_list -# cdef public object proto_block -# cdef public object file -# -# cpdef format_code(self, code_string, replace_empty_lines=*) - -cdef class FunctionState: - cdef public set names_taken - cdef public object owner - - cdef public object error_label - cdef public size_t label_counter - cdef public set labels_used - cdef public object return_label - cdef public object continue_label - cdef public object break_label - cdef public list yield_labels - - cdef public object return_from_error_cleanup_label # not used in __init__ ? - - cdef public bint in_try_finally - cdef public object exc_vars - cdef public bint can_trace - - cdef public list temps_allocated - cdef public dict temps_free - cdef public dict temps_used_type - cdef public size_t temp_counter - cdef public list collect_temps_stack - - cdef public object closure_temps - cdef public bint should_declare_error_indicator - cdef public bint uses_error_indicator - - @cython.locals(n=size_t) - cpdef new_label(self, name=*) - cpdef tuple get_loop_labels(self) - cpdef set_loop_labels(self, labels) - cpdef tuple get_all_labels(self) - cpdef set_all_labels(self, labels) - cpdef start_collecting_temps(self) - cpdef stop_collecting_temps(self) - - cpdef list temps_in_use(self) - -cdef class IntConst: - cdef public object cname - cdef public object value - cdef public bint is_long - -cdef class PyObjectConst: - cdef public object cname - cdef public object type - -cdef class StringConst: - cdef public object cname - cdef public object text - cdef public object escaped_value - cdef public dict py_strings - cdef public list py_versions - - @cython.locals(intern=bint, is_str=bint, is_unicode=bint) - cpdef get_py_string_const(self, encoding, identifier=*, is_str=*, py3str_cstring=*) - -## cdef class PyStringConst: -## cdef public object cname -## cdef public object encoding -## cdef public bint is_str -## cdef public bint is_unicode -## cdef public bint intern - -#class GlobalState(object): - -#def funccontext_property(name): - -#class CCodeWriter(object): - -cdef class PyrexCodeWriter: - cdef public object f - cdef public Py_ssize_t level diff --git a/third_party/cython/src/Cython/Compiler/Code.py b/third_party/cython/src/Cython/Compiler/Code.py deleted file mode 100644 index 1ef646badd89b..0000000000000 --- a/third_party/cython/src/Cython/Compiler/Code.py +++ /dev/null @@ -1,2238 +0,0 @@ -# cython: language_level = 2 -# -# Code output module -# - -import cython -cython.declare(os=object, re=object, operator=object, - Naming=object, Options=object, StringEncoding=object, - Utils=object, SourceDescriptor=object, StringIOTree=object, - DebugFlags=object, basestring=object) - -import os -import re -import sys -from string import Template -import operator -import textwrap - -try: - import hashlib -except ImportError: - import md5 as hashlib - -import Naming -import Options -import StringEncoding -from Cython import Utils -from Scanning import SourceDescriptor -from Cython.StringIOTree import StringIOTree -import DebugFlags - -try: - from __builtin__ import basestring -except ImportError: - from builtins import str as basestring - -KEYWORDS_MUST_BE_BYTES = sys.version_info < (2,7) - - -non_portable_builtins_map = { - # builtins that have different names in different Python versions - 'bytes' : ('PY_MAJOR_VERSION < 3', 'str'), - 'unicode' : ('PY_MAJOR_VERSION >= 3', 'str'), - 'basestring' : ('PY_MAJOR_VERSION >= 3', 'str'), - 'xrange' : ('PY_MAJOR_VERSION >= 3', 'range'), - 'raw_input' : ('PY_MAJOR_VERSION >= 3', 'input'), - 'BaseException' : ('PY_VERSION_HEX < 0x02050000', 'Exception'), - } - -basicsize_builtins_map = { - # builtins whose type has a different tp_basicsize than sizeof(...) - 'PyTypeObject' : 'PyHeapTypeObject', - } - -uncachable_builtins = [ - # builtin names that cannot be cached because they may or may not - # be available at import time - 'WindowsError', - ] - -modifier_output_mapper = { - 'inline': 'CYTHON_INLINE' -}.get - -is_self_assignment = re.compile(r" *(\w+) = (\1);\s*$").match - - -def get_utility_dir(): - # make this a function and not global variables: - # http://trac.cython.org/cython_trac/ticket/475 - Cython_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - return os.path.join(Cython_dir, "Utility") - - -class UtilityCodeBase(object): - """ - Support for loading utility code from a file. - - Code sections in the file can be specified as follows: - - ##### MyUtility.proto ##### - - [proto declarations] - - ##### MyUtility.init ##### - - [code run at module initialization] - - ##### MyUtility ##### - #@requires: MyOtherUtility - #@substitute: naming - - [definitions] - - for prototypes and implementation respectively. For non-python or - -cython files backslashes should be used instead. 5 to 30 comment - characters may be used on either side. - - If the @cname decorator is not used and this is a CythonUtilityCode, - one should pass in the 'name' keyword argument to be used for name - mangling of such entries. - """ - - is_cython_utility = False - requires = None - _utility_cache = {} - - @classmethod - def _add_utility(cls, utility, type, lines, begin_lineno, tags=None): - if utility is None: - return - - code = '\n'.join(lines) - if tags and 'substitute' in tags and tags['substitute'] == set(['naming']): - del tags['substitute'] - try: - code = Template(code).substitute(vars(Naming)) - except (KeyError, ValueError), e: - raise RuntimeError("Error parsing templated utility code of type '%s' at line %d: %s" % ( - type, begin_lineno, e)) - - # remember correct line numbers at least until after templating - code = '\n' * begin_lineno + code - - if type == 'proto': - utility[0] = code - elif type == 'impl': - utility[1] = code - else: - all_tags = utility[2] - if KEYWORDS_MUST_BE_BYTES: - type = type.encode('ASCII') - all_tags[type] = code - - if tags: - all_tags = utility[2] - for name, values in tags.items(): - if KEYWORDS_MUST_BE_BYTES: - name = name.encode('ASCII') - all_tags.setdefault(name, set()).update(values) - - @classmethod - def load_utilities_from_file(cls, path): - utilities = cls._utility_cache.get(path) - if utilities: - return utilities - - filename = os.path.join(get_utility_dir(), path) - _, ext = os.path.splitext(path) - if ext in ('.pyx', '.py', '.pxd', '.pxi'): - comment = '#' - replace_comments = re.compile(r'^\s*#.*').sub - else: - comment = '/' - replace_comments = re.compile(r'^\s*//.*|^\s*/\*[^*]*\*/').sub - match_special = re.compile( - (r'^%(C)s{5,30}\s*(?P(?:\w|\.)+)\s*%(C)s{5,30}|' - r'^%(C)s+@(?P\w+)\s*:\s*(?P(?:\w|[.:])+)' - ) % {'C':comment}).match - match_type = re.compile('(.+)[.](proto|impl|init|cleanup)$').match - - f = Utils.open_source_file(filename, encoding='UTF-8') - try: - all_lines = f.readlines() - finally: - f.close() - - utilities = {} - lines = [] - tags = {} - utility = type = None - begin_lineno = 0 - - for lineno, line in enumerate(all_lines): - m = match_special(line) - if m: - if m.group('name'): - cls._add_utility(utility, type, lines, begin_lineno, tags) - - begin_lineno = lineno + 1 - del lines[:] - tags.clear() - - name = m.group('name') - mtype = match_type(name) - if mtype: - name, type = mtype.groups() - else: - type = 'impl' - utility = utilities.setdefault(name, [None, None, {}]) - else: - tags.setdefault(m.group('tag'), set()).add(m.group('value')) - lines.append('') # keep line number correct - else: - lines.append(replace_comments('', line).rstrip()) - - if utility is None: - raise ValueError("Empty utility code file") - - # Don't forget to add the last utility code - cls._add_utility(utility, type, lines, begin_lineno, tags) - - cls._utility_cache[path] = utilities - return utilities - - @classmethod - def load(cls, util_code_name, from_file=None, **kwargs): - """ - Load utility code from a file specified by from_file (relative to - Cython/Utility) and name util_code_name. If from_file is not given, - load it from the file util_code_name.*. There should be only one - file matched by this pattern. - """ - if '::' in util_code_name: - from_file, util_code_name = util_code_name.rsplit('::', 1) - if not from_file: - utility_dir = get_utility_dir() - prefix = util_code_name + '.' - try: - listing = os.listdir(utility_dir) - except OSError: - # XXX the code below assumes as 'zipimport.zipimporter' instance - # XXX should be easy to generalize, but too lazy right now to write it - import zipfile - global __loader__ - loader = __loader__ - archive = loader.archive - fileobj = zipfile.ZipFile(archive) - listing = [ os.path.basename(name) - for name in fileobj.namelist() - if os.path.join(archive, name).startswith(utility_dir)] - fileobj.close() - files = [ os.path.join(utility_dir, filename) - for filename in listing - if filename.startswith(prefix) ] - if not files: - raise ValueError("No match found for utility code " + util_code_name) - if len(files) > 1: - raise ValueError("More than one filename match found for utility code " + util_code_name) - from_file = files[0] - - utilities = cls.load_utilities_from_file(from_file) - proto, impl, tags = utilities[util_code_name] - - if tags: - orig_kwargs = kwargs.copy() - for name, values in tags.items(): - if name in kwargs: - continue - # only pass lists when we have to: most argument expect one value or None - if name == 'requires': - if orig_kwargs: - values = [cls.load(dep, from_file, **orig_kwargs) - for dep in sorted(values)] - else: - # dependencies are rarely unique, so use load_cached() when we can - values = [cls.load_cached(dep, from_file) - for dep in sorted(values)] - elif not values: - values = None - elif len(values) == 1: - values = values[0] - kwargs[name] = values - - if proto is not None: - kwargs['proto'] = proto - if impl is not None: - kwargs['impl'] = impl - - if 'name' not in kwargs: - kwargs['name'] = util_code_name - - if 'file' not in kwargs and from_file: - kwargs['file'] = from_file - return cls(**kwargs) - - @classmethod - def load_cached(cls, utility_code_name, from_file=None, __cache={}): - """ - Calls .load(), but using a per-type cache based on utility name and file name. - """ - key = (cls, from_file, utility_code_name) - try: - return __cache[key] - except KeyError: - pass - code = __cache[key] = cls.load(utility_code_name, from_file) - return code - - @classmethod - def load_as_string(cls, util_code_name, from_file=None, **kwargs): - """ - Load a utility code as a string. Returns (proto, implementation) - """ - util = cls.load(util_code_name, from_file, **kwargs) - proto, impl = util.proto, util.impl - return util.format_code(proto), util.format_code(impl) - - def format_code(self, code_string, replace_empty_lines=re.compile(r'\n\n+').sub): - """ - Format a code section for output. - """ - if code_string: - code_string = replace_empty_lines('\n', code_string.strip()) + '\n\n' - return code_string - - def __str__(self): - return "<%s(%s)" % (type(self).__name__, self.name) - - def get_tree(self): - pass - - -class UtilityCode(UtilityCodeBase): - """ - Stores utility code to add during code generation. - - See GlobalState.put_utility_code. - - hashes/equals by instance - - proto C prototypes - impl implemenation code - init code to call on module initialization - requires utility code dependencies - proto_block the place in the resulting file where the prototype should - end up - name name of the utility code (or None) - file filename of the utility code file this utility was loaded - from (or None) - """ - - def __init__(self, proto=None, impl=None, init=None, cleanup=None, requires=None, - proto_block='utility_code_proto', name=None, file=None): - # proto_block: Which code block to dump prototype in. See GlobalState. - self.proto = proto - self.impl = impl - self.init = init - self.cleanup = cleanup - self.requires = requires - self._cache = {} - self.specialize_list = [] - self.proto_block = proto_block - self.name = name - self.file = file - - def __hash__(self): - return hash((self.proto, self.impl)) - - def __eq__(self, other): - if self is other: - return True - if not isinstance(other, type(self)): - return False - - self_proto = getattr(self, 'proto', None) - other_proto = getattr(other, 'proto', None) - return (self_proto, self.impl) == (other_proto, other.impl) - - def none_or_sub(self, s, context): - """ - Format a string in this utility code with context. If None, do nothing. - """ - if s is None: - return None - return s % context - - def specialize(self, pyrex_type=None, **data): - # Dicts aren't hashable... - if pyrex_type is not None: - data['type'] = pyrex_type.declaration_code('') - data['type_name'] = pyrex_type.specialization_name() - key = tuple(sorted(data.items())) - try: - return self._cache[key] - except KeyError: - if self.requires is None: - requires = None - else: - requires = [r.specialize(data) for r in self.requires] - - s = self._cache[key] = UtilityCode( - self.none_or_sub(self.proto, data), - self.none_or_sub(self.impl, data), - self.none_or_sub(self.init, data), - self.none_or_sub(self.cleanup, data), - requires, - self.proto_block) - - self.specialize_list.append(s) - return s - - def inject_string_constants(self, impl, output): - """Replace 'PYIDENT("xyz")' by a constant Python identifier cname. - """ - replacements = {} - def externalise(matchobj): - name = matchobj.group(1) - try: - cname = replacements[name] - except KeyError: - cname = replacements[name] = output.get_interned_identifier( - StringEncoding.EncodedString(name)).cname - return cname - - impl = re.sub('PYIDENT\("([^"]+)"\)', externalise, impl) - return bool(replacements), impl - - def put_code(self, output): - if self.requires: - for dependency in self.requires: - output.use_utility_code(dependency) - if self.proto: - output[self.proto_block].put_or_include( - self.format_code(self.proto), - '%s_proto' % self.name) - if self.impl: - impl = self.format_code(self.impl) - is_specialised, impl = self.inject_string_constants(impl, output) - if not is_specialised: - # no module specific adaptations => can be reused - output['utility_code_def'].put_or_include( - impl, '%s_impl' % self.name) - else: - output['utility_code_def'].put(impl) - if self.init: - writer = output['init_globals'] - writer.putln("/* %s.init */" % self.name) - if isinstance(self.init, basestring): - writer.put(self.format_code(self.init)) - else: - self.init(writer, output.module_pos) - writer.putln(writer.error_goto_if_PyErr(output.module_pos)) - writer.putln() - if self.cleanup and Options.generate_cleanup_code: - writer = output['cleanup_globals'] - if isinstance(self.cleanup, basestring): - writer.put_or_include( - self.format_code(self.cleanup), - '%s_cleanup' % self.name) - else: - self.cleanup(writer, output.module_pos) - - -def sub_tempita(s, context, file=None, name=None): - "Run tempita on string s with given context." - if not s: - return None - - if file: - context['__name'] = "%s:%s" % (file, name) - elif name: - context['__name'] = name - - from Cython.Tempita import sub - return sub(s, **context) - -class TempitaUtilityCode(UtilityCode): - def __init__(self, name=None, proto=None, impl=None, init=None, file=None, context=None, **kwargs): - if context is None: - context = {} - proto = sub_tempita(proto, context, file, name) - impl = sub_tempita(impl, context, file, name) - init = sub_tempita(init, context, file, name) - super(TempitaUtilityCode, self).__init__( - proto, impl, init=init, name=name, file=file, **kwargs) - - def none_or_sub(self, s, context): - """ - Format a string in this utility code with context. If None, do nothing. - """ - if s is None: - return None - return sub_tempita(s, context, self.file, self.name) - - -class LazyUtilityCode(UtilityCodeBase): - """ - Utility code that calls a callback with the root code writer when - available. Useful when you only have 'env' but not 'code'. - """ - - def __init__(self, callback): - self.callback = callback - - def put_code(self, globalstate): - utility = self.callback(globalstate.rootwriter) - globalstate.use_utility_code(utility) - - -class FunctionState(object): - # return_label string function return point label - # error_label string error catch point label - # continue_label string loop continue point label - # break_label string loop break point label - # return_from_error_cleanup_label string - # label_counter integer counter for naming labels - # in_try_finally boolean inside try of try...finally - # exc_vars (string * 3) exception variables for reraise, or None - # can_trace boolean line tracing is supported in the current context - - # Not used for now, perhaps later - def __init__(self, owner, names_taken=set()): - self.names_taken = names_taken - self.owner = owner - - self.error_label = None - self.label_counter = 0 - self.labels_used = set() - self.return_label = self.new_label() - self.new_error_label() - self.continue_label = None - self.break_label = None - self.yield_labels = [] - - self.in_try_finally = 0 - self.exc_vars = None - self.can_trace = False - - self.temps_allocated = [] # of (name, type, manage_ref, static) - self.temps_free = {} # (type, manage_ref) -> list of free vars with same type/managed status - self.temps_used_type = {} # name -> (type, manage_ref) - self.temp_counter = 0 - self.closure_temps = None - - # This is used to collect temporaries, useful to find out which temps - # need to be privatized in parallel sections - self.collect_temps_stack = [] - - # This is used for the error indicator, which needs to be local to the - # function. It used to be global, which relies on the GIL being held. - # However, exceptions may need to be propagated through 'nogil' - # sections, in which case we introduce a race condition. - self.should_declare_error_indicator = False - self.uses_error_indicator = False - - # labels - - def new_label(self, name=None): - n = self.label_counter - self.label_counter = n + 1 - label = "%s%d" % (Naming.label_prefix, n) - if name is not None: - label += '_' + name - return label - - def new_yield_label(self): - label = self.new_label('resume_from_yield') - num_and_label = (len(self.yield_labels) + 1, label) - self.yield_labels.append(num_and_label) - return num_and_label - - def new_error_label(self): - old_err_lbl = self.error_label - self.error_label = self.new_label('error') - return old_err_lbl - - def get_loop_labels(self): - return ( - self.continue_label, - self.break_label) - - def set_loop_labels(self, labels): - (self.continue_label, - self.break_label) = labels - - def new_loop_labels(self): - old_labels = self.get_loop_labels() - self.set_loop_labels( - (self.new_label("continue"), - self.new_label("break"))) - return old_labels - - def get_all_labels(self): - return ( - self.continue_label, - self.break_label, - self.return_label, - self.error_label) - - def set_all_labels(self, labels): - (self.continue_label, - self.break_label, - self.return_label, - self.error_label) = labels - - def all_new_labels(self): - old_labels = self.get_all_labels() - new_labels = [] - for old_label, name in zip(old_labels, ['continue', 'break', 'return', 'error']): - if old_label: - new_labels.append(self.new_label(name)) - else: - new_labels.append(old_label) - self.set_all_labels(new_labels) - return old_labels - - def use_label(self, lbl): - self.labels_used.add(lbl) - - def label_used(self, lbl): - return lbl in self.labels_used - - # temp handling - - def allocate_temp(self, type, manage_ref, static=False): - """ - Allocates a temporary (which may create a new one or get a previously - allocated and released one of the same type). Type is simply registered - and handed back, but will usually be a PyrexType. - - If type.is_pyobject, manage_ref comes into play. If manage_ref is set to - True, the temp will be decref-ed on return statements and in exception - handling clauses. Otherwise the caller has to deal with any reference - counting of the variable. - - If not type.is_pyobject, then manage_ref will be ignored, but it - still has to be passed. It is recommended to pass False by convention - if it is known that type will never be a Python object. - - static=True marks the temporary declaration with "static". - This is only used when allocating backing store for a module-level - C array literals. - - A C string referring to the variable is returned. - """ - if type.is_const: - type = type.const_base_type - if not type.is_pyobject and not type.is_memoryviewslice: - # Make manage_ref canonical, so that manage_ref will always mean - # a decref is needed. - manage_ref = False - - freelist = self.temps_free.get((type, manage_ref)) - if freelist is not None and len(freelist) > 0: - result = freelist.pop() - else: - while True: - self.temp_counter += 1 - result = "%s%d" % (Naming.codewriter_temp_prefix, self.temp_counter) - if not result in self.names_taken: break - self.temps_allocated.append((result, type, manage_ref, static)) - self.temps_used_type[result] = (type, manage_ref) - if DebugFlags.debug_temp_code_comments: - self.owner.putln("/* %s allocated */" % result) - - if self.collect_temps_stack: - self.collect_temps_stack[-1].add((result, type)) - - return result - - def release_temp(self, name): - """ - Releases a temporary so that it can be reused by other code needing - a temp of the same type. - """ - type, manage_ref = self.temps_used_type[name] - freelist = self.temps_free.get((type, manage_ref)) - if freelist is None: - freelist = [] - self.temps_free[(type, manage_ref)] = freelist - if name in freelist: - raise RuntimeError("Temp %s freed twice!" % name) - freelist.append(name) - if DebugFlags.debug_temp_code_comments: - self.owner.putln("/* %s released */" % name) - - def temps_in_use(self): - """Return a list of (cname,type,manage_ref) tuples of temp names and their type - that are currently in use. - """ - used = [] - for name, type, manage_ref, static in self.temps_allocated: - freelist = self.temps_free.get((type, manage_ref)) - if freelist is None or name not in freelist: - used.append((name, type, manage_ref and type.is_pyobject)) - return used - - def temps_holding_reference(self): - """Return a list of (cname,type) tuples of temp names and their type - that are currently in use. This includes only temps of a - Python object type which owns its reference. - """ - return [(name, type) - for name, type, manage_ref in self.temps_in_use() - if manage_ref and type.is_pyobject] - - def all_managed_temps(self): - """Return a list of (cname, type) tuples of refcount-managed Python objects. - """ - return [(cname, type) - for cname, type, manage_ref, static in self.temps_allocated - if manage_ref] - - def all_free_managed_temps(self): - """Return a list of (cname, type) tuples of refcount-managed Python - objects that are not currently in use. This is used by - try-except and try-finally blocks to clean up temps in the - error case. - """ - return [(cname, type) - for (type, manage_ref), freelist in self.temps_free.items() - if manage_ref - for cname in freelist] - - def start_collecting_temps(self): - """ - Useful to find out which temps were used in a code block - """ - self.collect_temps_stack.append(set()) - - def stop_collecting_temps(self): - return self.collect_temps_stack.pop() - - def init_closure_temps(self, scope): - self.closure_temps = ClosureTempAllocator(scope) - - -class NumConst(object): - """Global info about a Python number constant held by GlobalState. - - cname string - value string - py_type string int, long, float - value_code string evaluation code if different from value - """ - - def __init__(self, cname, value, py_type, value_code=None): - self.cname = cname - self.value = value - self.py_type = py_type - self.value_code = value_code or value - - -class PyObjectConst(object): - """Global info about a generic constant held by GlobalState. - """ - # cname string - # type PyrexType - - def __init__(self, cname, type): - self.cname = cname - self.type = type - - -cython.declare(possible_unicode_identifier=object, possible_bytes_identifier=object, - replace_identifier=object, find_alphanums=object) -possible_unicode_identifier = re.compile(ur"(?![0-9])\w+$", re.U).match -possible_bytes_identifier = re.compile(r"(?![0-9])\w+$".encode('ASCII')).match -replace_identifier = re.compile(r'[^a-zA-Z0-9_]+').sub -find_alphanums = re.compile('([a-zA-Z0-9]+)').findall - -class StringConst(object): - """Global info about a C string constant held by GlobalState. - """ - # cname string - # text EncodedString or BytesLiteral - # py_strings {(identifier, encoding) : PyStringConst} - - def __init__(self, cname, text, byte_string): - self.cname = cname - self.text = text - self.escaped_value = StringEncoding.escape_byte_string(byte_string) - self.py_strings = None - self.py_versions = [] - - def add_py_version(self, version): - if not version: - self.py_versions = [2,3] - elif version not in self.py_versions: - self.py_versions.append(version) - - def get_py_string_const(self, encoding, identifier=None, - is_str=False, py3str_cstring=None): - py_strings = self.py_strings - text = self.text - - is_str = bool(identifier or is_str) - is_unicode = encoding is None and not is_str - - if encoding is None: - # unicode string - encoding_key = None - else: - # bytes or str - encoding = encoding.lower() - if encoding in ('utf8', 'utf-8', 'ascii', 'usascii', 'us-ascii'): - encoding = None - encoding_key = None - else: - encoding_key = ''.join(find_alphanums(encoding)) - - key = (is_str, is_unicode, encoding_key, py3str_cstring) - if py_strings is not None: - try: - return py_strings[key] - except KeyError: - pass - else: - self.py_strings = {} - - if identifier: - intern = True - elif identifier is None: - if isinstance(text, unicode): - intern = bool(possible_unicode_identifier(text)) - else: - intern = bool(possible_bytes_identifier(text)) - else: - intern = False - if intern: - prefix = Naming.interned_prefixes['str'] - else: - prefix = Naming.py_const_prefix - - if encoding_key: - encoding_prefix = '_%s' % encoding_key - else: - encoding_prefix = '' - - pystring_cname = "%s%s%s_%s" % ( - prefix, - (is_str and 's') or (is_unicode and 'u') or 'b', - encoding_prefix, - self.cname[len(Naming.const_prefix):]) - - py_string = PyStringConst( - pystring_cname, encoding, is_unicode, is_str, py3str_cstring, intern) - self.py_strings[key] = py_string - return py_string - -class PyStringConst(object): - """Global info about a Python string constant held by GlobalState. - """ - # cname string - # py3str_cstring string - # encoding string - # intern boolean - # is_unicode boolean - # is_str boolean - - def __init__(self, cname, encoding, is_unicode, is_str=False, - py3str_cstring=None, intern=False): - self.cname = cname - self.py3str_cstring = py3str_cstring - self.encoding = encoding - self.is_str = is_str - self.is_unicode = is_unicode - self.intern = intern - - def __lt__(self, other): - return self.cname < other.cname - - -class GlobalState(object): - # filename_table {string : int} for finding filename table indexes - # filename_list [string] filenames in filename table order - # input_file_contents dict contents (=list of lines) of any file that was used as input - # to create this output C code. This is - # used to annotate the comments. - # - # utility_codes set IDs of used utility code (to avoid reinsertion) - # - # declared_cnames {string:Entry} used in a transition phase to merge pxd-declared - # constants etc. into the pyx-declared ones (i.e, - # check if constants are already added). - # In time, hopefully the literals etc. will be - # supplied directly instead. - # - # const_cnames_used dict global counter for unique constant identifiers - # - - # parts {string:CCodeWriter} - - - # interned_strings - # consts - # interned_nums - - # directives set Temporary variable used to track - # the current set of directives in the code generation - # process. - - directives = {} - - code_layout = [ - 'h_code', - 'filename_table', - 'utility_code_proto_before_types', - 'numeric_typedefs', # Let these detailed individual parts stay!, - 'complex_type_declarations', # as the proper solution is to make a full DAG... - 'type_declarations', # More coarse-grained blocks would simply hide - 'utility_code_proto', # the ugliness, not fix it - 'module_declarations', - 'typeinfo', - 'before_global_var', - 'global_var', - 'decls', - 'all_the_rest', - 'pystring_table', - 'cached_builtins', - 'cached_constants', - 'init_globals', - 'init_module', - 'cleanup_globals', - 'cleanup_module', - 'main_method', - 'utility_code_def', - 'end' - ] - - - def __init__(self, writer, module_node, emit_linenums=False, common_utility_include_dir=None): - self.filename_table = {} - self.filename_list = [] - self.input_file_contents = {} - self.utility_codes = set() - self.declared_cnames = {} - self.in_utility_code_generation = False - self.emit_linenums = emit_linenums - self.common_utility_include_dir = common_utility_include_dir - self.parts = {} - self.module_node = module_node # because some utility code generation needs it - # (generating backwards-compatible Get/ReleaseBuffer - - self.const_cnames_used = {} - self.string_const_index = {} - self.pyunicode_ptr_const_index = {} - self.num_const_index = {} - self.py_constants = [] - - assert writer.globalstate is None - writer.globalstate = self - self.rootwriter = writer - - def initialize_main_c_code(self): - rootwriter = self.rootwriter - for part in self.code_layout: - self.parts[part] = rootwriter.insertion_point() - - if not Options.cache_builtins: - del self.parts['cached_builtins'] - else: - w = self.parts['cached_builtins'] - w.enter_cfunc_scope() - w.putln("static int __Pyx_InitCachedBuiltins(void) {") - - w = self.parts['cached_constants'] - w.enter_cfunc_scope() - w.putln("") - w.putln("static int __Pyx_InitCachedConstants(void) {") - w.put_declare_refcount_context() - w.put_setup_refcount_context("__Pyx_InitCachedConstants") - - w = self.parts['init_globals'] - w.enter_cfunc_scope() - w.putln("") - w.putln("static int __Pyx_InitGlobals(void) {") - - if not Options.generate_cleanup_code: - del self.parts['cleanup_globals'] - else: - w = self.parts['cleanup_globals'] - w.enter_cfunc_scope() - w.putln("") - w.putln("static void __Pyx_CleanupGlobals(void) {") - - # - # utility_code_def - # - code = self.parts['utility_code_def'] - if self.emit_linenums: - code.write('\n#line 1 "cython_utility"\n') - code.putln("") - code.putln("/* Runtime support code */") - - def finalize_main_c_code(self): - self.close_global_decls() - - # - # utility_code_def - # - code = self.parts['utility_code_def'] - code.put(UtilityCode.load_as_string("TypeConversions", "TypeConversion.c")[1]) - code.putln("") - - def __getitem__(self, key): - return self.parts[key] - - # - # Global constants, interned objects, etc. - # - def close_global_decls(self): - # This is called when it is known that no more global declarations will - # declared. - self.generate_const_declarations() - if Options.cache_builtins: - w = self.parts['cached_builtins'] - w.putln("return 0;") - if w.label_used(w.error_label): - w.put_label(w.error_label) - w.putln("return -1;") - w.putln("}") - w.exit_cfunc_scope() - - w = self.parts['cached_constants'] - w.put_finish_refcount_context() - w.putln("return 0;") - if w.label_used(w.error_label): - w.put_label(w.error_label) - w.put_finish_refcount_context() - w.putln("return -1;") - w.putln("}") - w.exit_cfunc_scope() - - w = self.parts['init_globals'] - w.putln("return 0;") - if w.label_used(w.error_label): - w.put_label(w.error_label) - w.putln("return -1;") - w.putln("}") - w.exit_cfunc_scope() - - if Options.generate_cleanup_code: - w = self.parts['cleanup_globals'] - w.putln("}") - w.exit_cfunc_scope() - - if Options.generate_cleanup_code: - w = self.parts['cleanup_module'] - w.putln("}") - w.exit_cfunc_scope() - - def put_pyobject_decl(self, entry): - self['global_var'].putln("static PyObject *%s;" % entry.cname) - - # constant handling at code generation time - - def get_cached_constants_writer(self): - return self.parts['cached_constants'] - - def get_int_const(self, str_value, longness=False): - py_type = longness and 'long' or 'int' - try: - c = self.num_const_index[(str_value, py_type)] - except KeyError: - c = self.new_num_const(str_value, py_type) - return c - - def get_float_const(self, str_value, value_code): - try: - c = self.num_const_index[(str_value, 'float')] - except KeyError: - c = self.new_num_const(str_value, 'float', value_code) - return c - - def get_py_const(self, type, prefix='', cleanup_level=None): - # create a new Python object constant - const = self.new_py_const(type, prefix) - if cleanup_level is not None \ - and cleanup_level <= Options.generate_cleanup_code: - cleanup_writer = self.parts['cleanup_globals'] - cleanup_writer.putln('Py_CLEAR(%s);' % const.cname) - return const - - def get_string_const(self, text, py_version=None): - # return a C string constant, creating a new one if necessary - if text.is_unicode: - byte_string = text.utf8encode() - else: - byte_string = text.byteencode() - try: - c = self.string_const_index[byte_string] - except KeyError: - c = self.new_string_const(text, byte_string) - c.add_py_version(py_version) - return c - - def get_pyunicode_ptr_const(self, text): - # return a Py_UNICODE[] constant, creating a new one if necessary - assert text.is_unicode - try: - c = self.pyunicode_ptr_const_index[text] - except KeyError: - c = self.pyunicode_ptr_const_index[text] = self.new_const_cname() - return c - - def get_py_string_const(self, text, identifier=None, - is_str=False, unicode_value=None): - # return a Python string constant, creating a new one if necessary - py3str_cstring = None - if is_str and unicode_value is not None \ - and unicode_value.utf8encode() != text.byteencode(): - py3str_cstring = self.get_string_const(unicode_value, py_version=3) - c_string = self.get_string_const(text, py_version=2) - else: - c_string = self.get_string_const(text) - py_string = c_string.get_py_string_const( - text.encoding, identifier, is_str, py3str_cstring) - return py_string - - def get_interned_identifier(self, text): - return self.get_py_string_const(text, identifier=True) - - def new_string_const(self, text, byte_string): - cname = self.new_string_const_cname(byte_string) - c = StringConst(cname, text, byte_string) - self.string_const_index[byte_string] = c - return c - - def new_num_const(self, value, py_type, value_code=None): - cname = self.new_num_const_cname(value, py_type) - c = NumConst(cname, value, py_type, value_code) - self.num_const_index[(value, py_type)] = c - return c - - def new_py_const(self, type, prefix=''): - cname = self.new_const_cname(prefix) - c = PyObjectConst(cname, type) - self.py_constants.append(c) - return c - - def new_string_const_cname(self, bytes_value): - # Create a new globally-unique nice name for a C string constant. - value = bytes_value.decode('ASCII', 'ignore') - return self.new_const_cname(value=value) - - def new_num_const_cname(self, value, py_type): - if py_type == 'long': - value += 'L' - py_type = 'int' - prefix = Naming.interned_prefixes[py_type] - cname = "%s%s" % (prefix, value) - cname = cname.replace('+', '_').replace('-', 'neg_').replace('.', '_') - return cname - - def new_const_cname(self, prefix='', value=''): - value = replace_identifier('_', value)[:32].strip('_') - used = self.const_cnames_used - name_suffix = value - while name_suffix in used: - counter = used[value] = used[value] + 1 - name_suffix = '%s_%d' % (value, counter) - used[name_suffix] = 1 - if prefix: - prefix = Naming.interned_prefixes[prefix] - else: - prefix = Naming.const_prefix - return "%s%s" % (prefix, name_suffix) - - def add_cached_builtin_decl(self, entry): - if entry.is_builtin and entry.is_const: - if self.should_declare(entry.cname, entry): - self.put_pyobject_decl(entry) - w = self.parts['cached_builtins'] - condition = None - if entry.name in non_portable_builtins_map: - condition, replacement = non_portable_builtins_map[entry.name] - w.putln('#if %s' % condition) - self.put_cached_builtin_init( - entry.pos, StringEncoding.EncodedString(replacement), - entry.cname) - w.putln('#else') - self.put_cached_builtin_init( - entry.pos, StringEncoding.EncodedString(entry.name), - entry.cname) - if condition: - w.putln('#endif') - - def put_cached_builtin_init(self, pos, name, cname): - w = self.parts['cached_builtins'] - interned_cname = self.get_interned_identifier(name).cname - self.use_utility_code( - UtilityCode.load_cached("GetBuiltinName", "ObjectHandling.c")) - w.putln('%s = __Pyx_GetBuiltinName(%s); if (!%s) %s' % ( - cname, - interned_cname, - cname, - w.error_goto(pos))) - - def generate_const_declarations(self): - self.generate_string_constants() - self.generate_num_constants() - self.generate_object_constant_decls() - - def generate_object_constant_decls(self): - consts = [ (len(c.cname), c.cname, c) - for c in self.py_constants ] - consts.sort() - decls_writer = self.parts['decls'] - for _, cname, c in consts: - decls_writer.putln( - "static %s;" % c.type.declaration_code(cname)) - - def generate_string_constants(self): - c_consts = [ (len(c.cname), c.cname, c) - for c in self.string_const_index.values() ] - c_consts.sort() - py_strings = [] - - decls_writer = self.parts['decls'] - for _, cname, c in c_consts: - conditional = False - if c.py_versions and (2 not in c.py_versions or 3 not in c.py_versions): - conditional = True - decls_writer.putln("#if PY_MAJOR_VERSION %s 3" % ( - (2 in c.py_versions) and '<' or '>=')) - decls_writer.putln('static char %s[] = "%s";' % ( - cname, StringEncoding.split_string_literal(c.escaped_value))) - if conditional: - decls_writer.putln("#endif") - if c.py_strings is not None: - for py_string in c.py_strings.values(): - py_strings.append((c.cname, len(py_string.cname), py_string)) - - for c, cname in self.pyunicode_ptr_const_index.items(): - utf16_array, utf32_array = StringEncoding.encode_pyunicode_string(c) - if utf16_array: - # Narrow and wide representations differ - decls_writer.putln("#ifdef Py_UNICODE_WIDE") - decls_writer.putln("static Py_UNICODE %s[] = { %s };" % (cname, utf32_array)) - if utf16_array: - decls_writer.putln("#else") - decls_writer.putln("static Py_UNICODE %s[] = { %s };" % (cname, utf16_array)) - decls_writer.putln("#endif") - - if py_strings: - self.use_utility_code(UtilityCode.load_cached("InitStrings", "StringTools.c")) - py_strings.sort() - w = self.parts['pystring_table'] - w.putln("") - w.putln("static __Pyx_StringTabEntry %s[] = {" % - Naming.stringtab_cname) - for c_cname, _, py_string in py_strings: - if not py_string.is_str or not py_string.encoding or \ - py_string.encoding in ('ASCII', 'USASCII', 'US-ASCII', - 'UTF8', 'UTF-8'): - encoding = '0' - else: - encoding = '"%s"' % py_string.encoding.lower() - - decls_writer.putln( - "static PyObject *%s;" % py_string.cname) - if py_string.py3str_cstring: - w.putln("#if PY_MAJOR_VERSION >= 3") - w.putln( - "{&%s, %s, sizeof(%s), %s, %d, %d, %d}," % ( - py_string.cname, - py_string.py3str_cstring.cname, - py_string.py3str_cstring.cname, - '0', 1, 0, - py_string.intern - )) - w.putln("#else") - w.putln( - "{&%s, %s, sizeof(%s), %s, %d, %d, %d}," % ( - py_string.cname, - c_cname, - c_cname, - encoding, - py_string.is_unicode, - py_string.is_str, - py_string.intern - )) - if py_string.py3str_cstring: - w.putln("#endif") - w.putln("{0, 0, 0, 0, 0, 0, 0}") - w.putln("};") - - init_globals = self.parts['init_globals'] - init_globals.putln( - "if (__Pyx_InitStrings(%s) < 0) %s;" % ( - Naming.stringtab_cname, - init_globals.error_goto(self.module_pos))) - - def generate_num_constants(self): - consts = [(c.py_type, c.value[0] == '-', len(c.value), c.value, c.value_code, c) - for c in self.num_const_index.values()] - consts.sort() - decls_writer = self.parts['decls'] - init_globals = self.parts['init_globals'] - for py_type, _, _, value, value_code, c in consts: - cname = c.cname - decls_writer.putln("static PyObject *%s;" % cname) - if py_type == 'float': - function = 'PyFloat_FromDouble(%s)' - elif py_type == 'long': - function = 'PyLong_FromString((char *)"%s", 0, 0)' - elif Utils.long_literal(value): - function = 'PyInt_FromString((char *)"%s", 0, 0)' - elif len(value.lstrip('-')) > 4: - function = "PyInt_FromLong(%sL)" - else: - function = "PyInt_FromLong(%s)" - init_globals.putln('%s = %s; %s' % ( - cname, function % value_code, - init_globals.error_goto_if_null(cname, self.module_pos))) - - # The functions below are there in a transition phase only - # and will be deprecated. They are called from Nodes.BlockNode. - # The copy&paste duplication is intentional in order to be able - # to see quickly how BlockNode worked, until this is replaced. - - def should_declare(self, cname, entry): - if cname in self.declared_cnames: - other = self.declared_cnames[cname] - assert str(entry.type) == str(other.type) - assert entry.init == other.init - return False - else: - self.declared_cnames[cname] = entry - return True - - # - # File name state - # - - def lookup_filename(self, filename): - try: - index = self.filename_table[filename] - except KeyError: - index = len(self.filename_list) - self.filename_list.append(filename) - self.filename_table[filename] = index - return index - - def commented_file_contents(self, source_desc): - try: - return self.input_file_contents[source_desc] - except KeyError: - pass - source_file = source_desc.get_lines(encoding='ASCII', - error_handling='ignore') - try: - F = [u' * ' + line.rstrip().replace( - u'*/', u'*[inserted by cython to avoid comment closer]/' - ).replace( - u'/*', u'/[inserted by cython to avoid comment start]*' - ) - for line in source_file] - finally: - if hasattr(source_file, 'close'): - source_file.close() - if not F: F.append(u'') - self.input_file_contents[source_desc] = F - return F - - # - # Utility code state - # - - def use_utility_code(self, utility_code): - """ - Adds code to the C file. utility_code should - a) implement __eq__/__hash__ for the purpose of knowing whether the same - code has already been included - b) implement put_code, which takes a globalstate instance - - See UtilityCode. - """ - if utility_code not in self.utility_codes: - self.utility_codes.add(utility_code) - utility_code.put_code(self) - - -def funccontext_property(name): - attribute_of = operator.attrgetter(name) - def get(self): - return attribute_of(self.funcstate) - def set(self, value): - setattr(self.funcstate, name, value) - return property(get, set) - - -class CCodeWriter(object): - """ - Utility class to output C code. - - When creating an insertion point one must care about the state that is - kept: - - formatting state (level, bol) is cloned and used in insertion points - as well - - labels, temps, exc_vars: One must construct a scope in which these can - exist by calling enter_cfunc_scope/exit_cfunc_scope (these are for - sanity checking and forward compatabilty). Created insertion points - looses this scope and cannot access it. - - marker: Not copied to insertion point - - filename_table, filename_list, input_file_contents: All codewriters - coming from the same root share the same instances simultaneously. - """ - - # f file output file - # buffer StringIOTree - - # level int indentation level - # bol bool beginning of line? - # marker string comment to emit before next line - # funcstate FunctionState contains state local to a C function used for code - # generation (labels and temps state etc.) - # globalstate GlobalState contains state global for a C file (input file info, - # utility code, declared constants etc.) - # emit_linenums boolean whether or not to write #line pragmas - # - # c_line_in_traceback boolean append the c file and line number to the traceback for exceptions - # - # pyclass_stack list used during recursive code generation to pass information - # about the current class one is in - - globalstate = None - - def __init__(self, create_from=None, buffer=None, copy_formatting=False, emit_linenums=None, c_line_in_traceback=True): - if buffer is None: buffer = StringIOTree() - self.buffer = buffer - self.marker = None - self.last_marker_line = 0 - self.source_desc = "" - self.pyclass_stack = [] - - self.funcstate = None - self.level = 0 - self.call_level = 0 - self.bol = 1 - - if create_from is not None: - # Use same global state - self.globalstate = create_from.globalstate - self.funcstate = create_from.funcstate - # Clone formatting state - if copy_formatting: - self.level = create_from.level - self.bol = create_from.bol - self.call_level = create_from.call_level - - if emit_linenums is None and self.globalstate: - self.emit_linenums = self.globalstate.emit_linenums - else: - self.emit_linenums = emit_linenums - self.c_line_in_traceback = c_line_in_traceback - - def create_new(self, create_from, buffer, copy_formatting): - # polymorphic constructor -- very slightly more versatile - # than using __class__ - result = CCodeWriter(create_from, buffer, copy_formatting, - c_line_in_traceback=self.c_line_in_traceback) - return result - - def copyto(self, f): - self.buffer.copyto(f) - - def getvalue(self): - return self.buffer.getvalue() - - def write(self, s): - # also put invalid markers (lineno 0), to indicate that those lines - # have no Cython source code correspondence - if self.marker is None: - cython_lineno = self.last_marker_line - else: - cython_lineno = self.marker[0] - - self.buffer.markers.extend([cython_lineno] * s.count('\n')) - self.buffer.write(s) - - def insertion_point(self): - other = self.create_new(create_from=self, buffer=self.buffer.insertion_point(), copy_formatting=True) - return other - - def new_writer(self): - """ - Creates a new CCodeWriter connected to the same global state, which - can later be inserted using insert. - """ - return CCodeWriter(create_from=self, c_line_in_traceback=self.c_line_in_traceback) - - def insert(self, writer): - """ - Inserts the contents of another code writer (created with - the same global state) in the current location. - - It is ok to write to the inserted writer also after insertion. - """ - assert writer.globalstate is self.globalstate - self.buffer.insert(writer.buffer) - - # Properties delegated to function scope - label_counter = funccontext_property("label_counter") - return_label = funccontext_property("return_label") - error_label = funccontext_property("error_label") - labels_used = funccontext_property("labels_used") - continue_label = funccontext_property("continue_label") - break_label = funccontext_property("break_label") - return_from_error_cleanup_label = funccontext_property("return_from_error_cleanup_label") - yield_labels = funccontext_property("yield_labels") - - # Functions delegated to function scope - def new_label(self, name=None): return self.funcstate.new_label(name) - def new_error_label(self): return self.funcstate.new_error_label() - def new_yield_label(self): return self.funcstate.new_yield_label() - def get_loop_labels(self): return self.funcstate.get_loop_labels() - def set_loop_labels(self, labels): return self.funcstate.set_loop_labels(labels) - def new_loop_labels(self): return self.funcstate.new_loop_labels() - def get_all_labels(self): return self.funcstate.get_all_labels() - def set_all_labels(self, labels): return self.funcstate.set_all_labels(labels) - def all_new_labels(self): return self.funcstate.all_new_labels() - def use_label(self, lbl): return self.funcstate.use_label(lbl) - def label_used(self, lbl): return self.funcstate.label_used(lbl) - - - def enter_cfunc_scope(self): - self.funcstate = FunctionState(self) - - def exit_cfunc_scope(self): - self.funcstate = None - - # constant handling - - def get_py_int(self, str_value, longness): - return self.globalstate.get_int_const(str_value, longness).cname - - def get_py_float(self, str_value, value_code): - return self.globalstate.get_float_const(str_value, value_code).cname - - def get_py_const(self, type, prefix='', cleanup_level=None): - return self.globalstate.get_py_const(type, prefix, cleanup_level).cname - - def get_string_const(self, text): - return self.globalstate.get_string_const(text).cname - - def get_pyunicode_ptr_const(self, text): - return self.globalstate.get_pyunicode_ptr_const(text) - - def get_py_string_const(self, text, identifier=None, - is_str=False, unicode_value=None): - return self.globalstate.get_py_string_const( - text, identifier, is_str, unicode_value).cname - - def get_argument_default_const(self, type): - return self.globalstate.get_py_const(type).cname - - def intern(self, text): - return self.get_py_string_const(text) - - def intern_identifier(self, text): - return self.get_py_string_const(text, identifier=True) - - def get_cached_constants_writer(self): - return self.globalstate.get_cached_constants_writer() - - # code generation - - def putln(self, code="", safe=False): - if self.marker and self.bol: - self.emit_marker() - if self.emit_linenums and self.last_marker_line != 0: - self.write('\n#line %s "%s"\n' % (self.last_marker_line, self.source_desc)) - - if code: - if safe: - self.put_safe(code) - else: - self.put(code) - self.write("\n") - self.bol = 1 - - def emit_marker(self): - self.write("\n") - self.indent() - self.write("/* %s */\n" % self.marker[1]) - if (self.funcstate and self.funcstate.can_trace - and self.globalstate.directives['linetrace']): - self.indent() - self.write('__Pyx_TraceLine(%d)\n' % self.marker[0]) - self.last_marker_line = self.marker[0] - self.marker = None - - def put_safe(self, code): - # put code, but ignore {} - self.write(code) - self.bol = 0 - - def put_or_include(self, code, name): - include_dir = self.globalstate.common_utility_include_dir - if include_dir and len(code) > 1024: - include_file = "%s_%s.h" % ( - name, hashlib.md5(code.encode('utf8')).hexdigest()) - path = os.path.join(include_dir, include_file) - if not os.path.exists(path): - tmp_path = '%s.tmp%s' % (path, os.getpid()) - f = Utils.open_new_file(tmp_path) - try: - f.write(code) - finally: - f.close() - os.rename(tmp_path, path) - code = '#include "%s"\n' % path - self.put(code) - - def put(self, code): - if is_self_assignment(code): - return - fix_indent = False - if "{" in code: - dl = code.count("{") - else: - dl = 0 - if "}" in code: - dl -= code.count("}") - if dl < 0: - self.level += dl - elif dl == 0 and code[0] == "}": - # special cases like "} else {" need a temporary dedent - fix_indent = True - self.level -= 1 - if self.bol: - self.indent() - self.write(code) - self.bol = 0 - if dl > 0: - self.level += dl - elif fix_indent: - self.level += 1 - - def putln_tempita(self, code, **context): - from Cython.Tempita import sub - self.putln(sub(code, **context)) - - def put_tempita(self, code, **context): - from Cython.Tempita import sub - self.put(sub(code, **context)) - - def increase_indent(self): - self.level += 1 - - def decrease_indent(self): - self.level -= 1 - - def begin_block(self): - self.putln("{") - self.increase_indent() - - def end_block(self): - self.decrease_indent() - self.putln("}") - - def indent(self): - self.write(" " * self.level) - - def get_py_version_hex(self, pyversion): - return "0x%02X%02X%02X%02X" % (tuple(pyversion) + (0,0,0,0))[:4] - - def mark_pos(self, pos): - if pos is None: - return - source_desc, line, col = pos - if self.last_marker_line == line: - return - assert isinstance(source_desc, SourceDescriptor) - contents = self.globalstate.commented_file_contents(source_desc) - lines = contents[max(0, line-3):line] # line numbers start at 1 - lines[-1] += u' # <<<<<<<<<<<<<<' - lines += contents[line:line+2] - - marker = u'"%s":%d\n%s\n' % ( - source_desc.get_escaped_description(), line, u'\n'.join(lines)) - self.marker = (line, marker) - if self.emit_linenums: - self.source_desc = source_desc.get_escaped_description() - - def put_label(self, lbl): - if lbl in self.funcstate.labels_used: - self.putln("%s:;" % lbl) - - def put_goto(self, lbl): - self.funcstate.use_label(lbl) - self.putln("goto %s;" % lbl) - - def put_var_declaration(self, entry, storage_class="", - dll_linkage=None, definition=True): - #print "Code.put_var_declaration:", entry.name, "definition =", definition ### - if entry.visibility == 'private' and not (definition or entry.defined_in_pxd): - #print "...private and not definition, skipping", entry.cname ### - return - if entry.visibility == "private" and not entry.used: - #print "...private and not used, skipping", entry.cname ### - return - if storage_class: - self.put("%s " % storage_class) - if not entry.cf_used: - self.put('CYTHON_UNUSED ') - self.put(entry.type.declaration_code( - entry.cname, dll_linkage=dll_linkage)) - if entry.init is not None: - self.put_safe(" = %s" % entry.type.literal_code(entry.init)) - elif entry.type.is_pyobject: - self.put(" = NULL") - self.putln(";") - - def put_temp_declarations(self, func_context): - for name, type, manage_ref, static in func_context.temps_allocated: - decl = type.declaration_code(name) - if type.is_pyobject: - self.putln("%s = NULL;" % decl) - elif type.is_memoryviewslice: - import MemoryView - self.putln("%s = %s;" % (decl, MemoryView.memslice_entry_init)) - else: - self.putln("%s%s;" % (static and "static " or "", decl)) - - if func_context.should_declare_error_indicator: - if self.funcstate.uses_error_indicator: - unused = '' - else: - unused = 'CYTHON_UNUSED ' - # Initialize these variables to silence compiler warnings - self.putln("%sint %s = 0;" % (unused, Naming.lineno_cname)) - self.putln("%sconst char *%s = NULL;" % (unused, Naming.filename_cname)) - self.putln("%sint %s = 0;" % (unused, Naming.clineno_cname)) - - def put_h_guard(self, guard): - self.putln("#ifndef %s" % guard) - self.putln("#define %s" % guard) - - def unlikely(self, cond): - if Options.gcc_branch_hints: - return 'unlikely(%s)' % cond - else: - return cond - - def build_function_modifiers(self, modifiers, mapper=modifier_output_mapper): - if not modifiers: - return '' - return '%s ' % ' '.join([mapper(m,m) for m in modifiers]) - - # Python objects and reference counting - - def entry_as_pyobject(self, entry): - type = entry.type - if (not entry.is_self_arg and not entry.type.is_complete() - or entry.type.is_extension_type): - return "(PyObject *)" + entry.cname - else: - return entry.cname - - def as_pyobject(self, cname, type): - from PyrexTypes import py_object_type, typecast - return typecast(py_object_type, type, cname) - - def put_gotref(self, cname): - self.putln("__Pyx_GOTREF(%s);" % cname) - - def put_giveref(self, cname): - self.putln("__Pyx_GIVEREF(%s);" % cname) - - def put_xgiveref(self, cname): - self.putln("__Pyx_XGIVEREF(%s);" % cname) - - def put_xgotref(self, cname): - self.putln("__Pyx_XGOTREF(%s);" % cname) - - def put_incref(self, cname, type, nanny=True): - if nanny: - self.putln("__Pyx_INCREF(%s);" % self.as_pyobject(cname, type)) - else: - self.putln("Py_INCREF(%s);" % self.as_pyobject(cname, type)) - - def put_decref(self, cname, type, nanny=True): - self._put_decref(cname, type, nanny, null_check=False, clear=False) - - def put_var_gotref(self, entry): - if entry.type.is_pyobject: - self.putln("__Pyx_GOTREF(%s);" % self.entry_as_pyobject(entry)) - - def put_var_giveref(self, entry): - if entry.type.is_pyobject: - self.putln("__Pyx_GIVEREF(%s);" % self.entry_as_pyobject(entry)) - - def put_var_xgotref(self, entry): - if entry.type.is_pyobject: - self.putln("__Pyx_XGOTREF(%s);" % self.entry_as_pyobject(entry)) - - def put_var_xgiveref(self, entry): - if entry.type.is_pyobject: - self.putln("__Pyx_XGIVEREF(%s);" % self.entry_as_pyobject(entry)) - - def put_var_incref(self, entry): - if entry.type.is_pyobject: - self.putln("__Pyx_INCREF(%s);" % self.entry_as_pyobject(entry)) - - def put_decref_clear(self, cname, type, nanny=True, clear_before_decref=False): - self._put_decref(cname, type, nanny, null_check=False, - clear=True, clear_before_decref=clear_before_decref) - - def put_xdecref(self, cname, type, nanny=True, have_gil=True): - self._put_decref(cname, type, nanny, null_check=True, - have_gil=have_gil, clear=False) - - def put_xdecref_clear(self, cname, type, nanny=True, clear_before_decref=False): - self._put_decref(cname, type, nanny, null_check=True, - clear=True, clear_before_decref=clear_before_decref) - - def _put_decref(self, cname, type, nanny=True, null_check=False, - have_gil=True, clear=False, clear_before_decref=False): - if type.is_memoryviewslice: - self.put_xdecref_memoryviewslice(cname, have_gil=have_gil) - return - - prefix = nanny and '__Pyx' or 'Py' - X = null_check and 'X' or '' - - if clear: - if clear_before_decref: - if not nanny: - X = '' # CPython doesn't have a Py_XCLEAR() - self.putln("%s_%sCLEAR(%s);" % (prefix, X, cname)) - else: - self.putln("%s_%sDECREF(%s); %s = 0;" % ( - prefix, X, self.as_pyobject(cname, type), cname)) - else: - self.putln("%s_%sDECREF(%s);" % ( - prefix, X, self.as_pyobject(cname, type))) - - def put_decref_set(self, cname, rhs_cname): - self.putln("__Pyx_DECREF_SET(%s, %s);" % (cname, rhs_cname)) - - def put_xdecref_set(self, cname, rhs_cname): - self.putln("__Pyx_XDECREF_SET(%s, %s);" % (cname, rhs_cname)) - - def put_var_decref(self, entry): - if entry.type.is_pyobject: - self.putln("__Pyx_XDECREF(%s);" % self.entry_as_pyobject(entry)) - - def put_var_xdecref(self, entry): - if entry.type.is_pyobject: - self.putln("__Pyx_XDECREF(%s);" % self.entry_as_pyobject(entry)) - - def put_var_decref_clear(self, entry): - self._put_var_decref_clear(entry, null_check=False) - - def put_var_xdecref_clear(self, entry): - self._put_var_decref_clear(entry, null_check=True) - - def _put_var_decref_clear(self, entry, null_check): - if entry.type.is_pyobject: - if entry.in_closure: - # reset before DECREF to make sure closure state is - # consistent during call to DECREF() - self.putln("__Pyx_%sCLEAR(%s);" % ( - null_check and 'X' or '', - entry.cname)) - else: - self.putln("__Pyx_%sDECREF(%s); %s = 0;" % ( - null_check and 'X' or '', - self.entry_as_pyobject(entry), - entry.cname)) - - def put_var_decrefs(self, entries, used_only = 0): - for entry in entries: - if not used_only or entry.used: - if entry.xdecref_cleanup: - self.put_var_xdecref(entry) - else: - self.put_var_decref(entry) - - def put_var_xdecrefs(self, entries): - for entry in entries: - self.put_var_xdecref(entry) - - def put_var_xdecrefs_clear(self, entries): - for entry in entries: - self.put_var_xdecref_clear(entry) - - def put_incref_memoryviewslice(self, slice_cname, have_gil=False): - import MemoryView - self.globalstate.use_utility_code(MemoryView.memviewslice_init_code) - self.putln("__PYX_INC_MEMVIEW(&%s, %d);" % (slice_cname, int(have_gil))) - - def put_xdecref_memoryviewslice(self, slice_cname, have_gil=False): - import MemoryView - self.globalstate.use_utility_code(MemoryView.memviewslice_init_code) - self.putln("__PYX_XDEC_MEMVIEW(&%s, %d);" % (slice_cname, int(have_gil))) - - def put_xgiveref_memoryviewslice(self, slice_cname): - self.put_xgiveref("%s.memview" % slice_cname) - - def put_init_to_py_none(self, cname, type, nanny=True): - from PyrexTypes import py_object_type, typecast - py_none = typecast(type, py_object_type, "Py_None") - if nanny: - self.putln("%s = %s; __Pyx_INCREF(Py_None);" % (cname, py_none)) - else: - self.putln("%s = %s; Py_INCREF(Py_None);" % (cname, py_none)) - - def put_init_var_to_py_none(self, entry, template = "%s", nanny=True): - code = template % entry.cname - #if entry.type.is_extension_type: - # code = "((PyObject*)%s)" % code - self.put_init_to_py_none(code, entry.type, nanny) - if entry.in_closure: - self.put_giveref('Py_None') - - def put_pymethoddef(self, entry, term, allow_skip=True): - if entry.is_special or entry.name == '__getattribute__': - if entry.name not in ['__cinit__', '__dealloc__', '__richcmp__', '__next__', '__getreadbuffer__', '__getwritebuffer__', '__getsegcount__', '__getcharbuffer__', '__getbuffer__', '__releasebuffer__']: - if entry.name == '__getattr__' and not self.globalstate.directives['fast_getattr']: - pass - # Python's typeobject.c will automatically fill in our slot - # in add_operators() (called by PyType_Ready) with a value - # that's better than ours. - elif allow_skip: - return - from TypeSlots import method_coexist - if entry.doc: - doc_code = entry.doc_cname - else: - doc_code = 0 - method_flags = entry.signature.method_flags() - if method_flags: - if entry.is_special: - method_flags += [method_coexist] - self.putln( - '{__Pyx_NAMESTR("%s"), (PyCFunction)%s, %s, __Pyx_DOCSTR(%s)}%s' % ( - entry.name, - entry.func_cname, - "|".join(method_flags), - doc_code, - term)) - - # GIL methods - - def put_ensure_gil(self, declare_gilstate=True, variable=None): - """ - Acquire the GIL. The generated code is safe even when no PyThreadState - has been allocated for this thread (for threads not initialized by - using the Python API). Additionally, the code generated by this method - may be called recursively. - """ - self.globalstate.use_utility_code( - UtilityCode.load_cached("ForceInitThreads", "ModuleSetupCode.c")) - self.putln("#ifdef WITH_THREAD") - if not variable: - variable = '__pyx_gilstate_save' - if declare_gilstate: - self.put("PyGILState_STATE ") - self.putln("%s = PyGILState_Ensure();" % variable) - self.putln("#endif") - - def put_release_ensured_gil(self, variable=None): - """ - Releases the GIL, corresponds to `put_ensure_gil`. - """ - if not variable: - variable = '__pyx_gilstate_save' - self.putln("#ifdef WITH_THREAD") - self.putln("PyGILState_Release(%s);" % variable) - self.putln("#endif") - - def put_acquire_gil(self, variable=None): - """ - Acquire the GIL. The thread's thread state must have been initialized - by a previous `put_release_gil` - """ - self.putln("#ifdef WITH_THREAD") - if variable: - self.putln('_save = %s;' % variable) - self.putln("Py_BLOCK_THREADS") - self.putln("#endif") - - def put_release_gil(self, variable=None): - "Release the GIL, corresponds to `put_acquire_gil`." - self.putln("#ifdef WITH_THREAD") - self.putln("PyThreadState *_save;") - self.putln("Py_UNBLOCK_THREADS") - if variable: - self.putln('%s = _save;' % variable) - self.putln("#endif") - - def declare_gilstate(self): - self.putln("#ifdef WITH_THREAD") - self.putln("PyGILState_STATE __pyx_gilstate_save;") - self.putln("#endif") - - # error handling - - def put_error_if_neg(self, pos, value): -# return self.putln("if (unlikely(%s < 0)) %s" % (value, self.error_goto(pos))) # TODO this path is almost _never_ taken, yet this macro makes is slower! - return self.putln("if (%s < 0) %s" % (value, self.error_goto(pos))) - - def put_error_if_unbound(self, pos, entry, in_nogil_context=False): - import ExprNodes - if entry.from_closure: - func = '__Pyx_RaiseClosureNameError' - self.globalstate.use_utility_code( - ExprNodes.raise_closure_name_error_utility_code) - elif entry.type.is_memoryviewslice and in_nogil_context: - func = '__Pyx_RaiseUnboundMemoryviewSliceNogil' - self.globalstate.use_utility_code( - ExprNodes.raise_unbound_memoryview_utility_code_nogil) - else: - func = '__Pyx_RaiseUnboundLocalError' - self.globalstate.use_utility_code( - ExprNodes.raise_unbound_local_error_utility_code) - - self.putln('if (unlikely(!%s)) { %s("%s"); %s }' % ( - entry.type.check_for_null_code(entry.cname), - func, - entry.name, - self.error_goto(pos))) - - def set_error_info(self, pos, used=False): - self.funcstate.should_declare_error_indicator = True - if used: - self.funcstate.uses_error_indicator = True - if self.c_line_in_traceback: - cinfo = " %s = %s;" % (Naming.clineno_cname, Naming.line_c_macro) - else: - cinfo = "" - - return "%s = %s[%s]; %s = %s;%s" % ( - Naming.filename_cname, - Naming.filetable_cname, - self.lookup_filename(pos[0]), - Naming.lineno_cname, - pos[1], - cinfo) - - def error_goto(self, pos): - lbl = self.funcstate.error_label - self.funcstate.use_label(lbl) - return "{%s goto %s;}" % ( - self.set_error_info(pos), - lbl) - - def error_goto_if(self, cond, pos): - return "if (%s) %s" % (self.unlikely(cond), self.error_goto(pos)) - - def error_goto_if_null(self, cname, pos): - return self.error_goto_if("!%s" % cname, pos) - - def error_goto_if_neg(self, cname, pos): - return self.error_goto_if("%s < 0" % cname, pos) - - def error_goto_if_PyErr(self, pos): - return self.error_goto_if("PyErr_Occurred()", pos) - - def lookup_filename(self, filename): - return self.globalstate.lookup_filename(filename) - - def put_declare_refcount_context(self): - self.putln('__Pyx_RefNannyDeclarations') - - def put_setup_refcount_context(self, name, acquire_gil=False): - if acquire_gil: - self.globalstate.use_utility_code( - UtilityCode.load_cached("ForceInitThreads", "ModuleSetupCode.c")) - self.putln('__Pyx_RefNannySetupContext("%s", %d);' % (name, acquire_gil and 1 or 0)) - - def put_finish_refcount_context(self): - self.putln("__Pyx_RefNannyFinishContext();") - - def put_add_traceback(self, qualified_name): - """ - Build a Python traceback for propagating exceptions. - - qualified_name should be the qualified name of the function. - """ - format_tuple = ( - qualified_name, - Naming.clineno_cname, - Naming.lineno_cname, - Naming.filename_cname, - ) - self.funcstate.uses_error_indicator = True - self.putln('__Pyx_AddTraceback("%s", %s, %s, %s);' % format_tuple) - - def put_unraisable(self, qualified_name): - """ - Generate code to print a Python warning for an unraisable exception. - - qualified_name should be the qualified name of the function. - """ - format_tuple = ( - qualified_name, - Naming.clineno_cname, - Naming.lineno_cname, - Naming.filename_cname, - int(self.globalstate.directives['unraisable_tracebacks']) - ) - self.funcstate.uses_error_indicator = True - self.putln('__Pyx_WriteUnraisable("%s", %s, %s, %s, %s);' % format_tuple) - self.globalstate.use_utility_code( - UtilityCode.load_cached("WriteUnraisableException", "Exceptions.c")) - - def put_trace_declarations(self): - self.putln('__Pyx_TraceDeclarations') - - def put_trace_call(self, name, pos): - self.putln('__Pyx_TraceCall("%s", %s[%s], %s);' % (name, Naming.filetable_cname, self.lookup_filename(pos[0]), pos[1])) - - def put_trace_exception(self): - self.putln("__Pyx_TraceException();") - - def put_trace_return(self, retvalue_cname): - self.putln("__Pyx_TraceReturn(%s);" % retvalue_cname) - - def putln_openmp(self, string): - self.putln("#ifdef _OPENMP") - self.putln(string) - self.putln("#endif /* _OPENMP */") - - def undef_builtin_expect(self, cond): - """ - Redefine the macros likely() and unlikely to no-ops, depending on - condition 'cond' - """ - self.putln("#if %s" % cond) - self.putln(" #undef likely") - self.putln(" #undef unlikely") - self.putln(" #define likely(x) (x)") - self.putln(" #define unlikely(x) (x)") - self.putln("#endif") - - def redef_builtin_expect(self, cond): - self.putln("#if %s" % cond) - self.putln(" #undef likely") - self.putln(" #undef unlikely") - self.putln(" #define likely(x) __builtin_expect(!!(x), 1)") - self.putln(" #define unlikely(x) __builtin_expect(!!(x), 0)") - self.putln("#endif") - -class PyrexCodeWriter(object): - # f file output file - # level int indentation level - - def __init__(self, outfile_name): - self.f = Utils.open_new_file(outfile_name) - self.level = 0 - - def putln(self, code): - self.f.write("%s%s\n" % (" " * self.level, code)) - - def indent(self): - self.level += 1 - - def dedent(self): - self.level -= 1 - -class PyxCodeWriter(object): - """ - Can be used for writing out some Cython code. To use the indenter - functionality, the Cython.Compiler.Importer module will have to be used - to load the code to support python 2.4 - """ - - def __init__(self, buffer=None, indent_level=0, context=None, encoding='ascii'): - self.buffer = buffer or StringIOTree() - self.level = indent_level - self.context = context - self.encoding = encoding - - def indent(self, levels=1): - self.level += levels - return True - - def dedent(self, levels=1): - self.level -= levels - - def indenter(self, line): - """ - Instead of - - with pyx_code.indenter("for i in range(10):"): - pyx_code.putln("print i") - - write - - if pyx_code.indenter("for i in range(10);"): - pyx_code.putln("print i") - pyx_code.dedent() - """ - self.putln(line) - self.indent() - return True - - def getvalue(self): - result = self.buffer.getvalue() - if not isinstance(result, unicode): - result = result.decode(self.encoding) - - return result - - def putln(self, line, context=None): - context = context or self.context - if context: - line = sub_tempita(line, context) - self._putln(line) - - def _putln(self, line): - self.buffer.write("%s%s\n" % (self.level * " ", line)) - - def put_chunk(self, chunk, context=None): - context = context or self.context - if context: - chunk = sub_tempita(chunk, context) - - chunk = textwrap.dedent(chunk) - for line in chunk.splitlines(): - self._putln(line) - - def insertion_point(self): - return PyxCodeWriter(self.buffer.insertion_point(), self.level, - self.context) - - def named_insertion_point(self, name): - setattr(self, name, self.insertion_point()) - - -class ClosureTempAllocator(object): - def __init__(self, klass): - self.klass = klass - self.temps_allocated = {} - self.temps_free = {} - self.temps_count = 0 - - def reset(self): - for type, cnames in self.temps_allocated.items(): - self.temps_free[type] = list(cnames) - - def allocate_temp(self, type): - if not type in self.temps_allocated: - self.temps_allocated[type] = [] - self.temps_free[type] = [] - elif self.temps_free[type]: - return self.temps_free[type].pop(0) - cname = '%s%d' % (Naming.codewriter_temp_prefix, self.temps_count) - self.klass.declare_var(pos=None, name=cname, cname=cname, type=type, is_cdef=True) - self.temps_allocated[type].append(cname) - self.temps_count += 1 - return cname diff --git a/third_party/cython/src/Cython/Compiler/CodeGeneration.py b/third_party/cython/src/Cython/Compiler/CodeGeneration.py deleted file mode 100644 index f446d9e92340b..0000000000000 --- a/third_party/cython/src/Cython/Compiler/CodeGeneration.py +++ /dev/null @@ -1,32 +0,0 @@ -from Cython.Compiler.Visitor import VisitorTransform -from Cython.Compiler.Nodes import StatListNode - -class ExtractPxdCode(VisitorTransform): - """ - Finds nodes in a pxd file that should generate code, and - returns them in a StatListNode. - - The result is a tuple (StatListNode, ModuleScope), i.e. - everything that is needed from the pxd after it is processed. - - A purer approach would be to seperately compile the pxd code, - but the result would have to be slightly more sophisticated - than pure strings (functions + wanted interned strings + - wanted utility code + wanted cached objects) so for now this - approach is taken. - """ - - def __call__(self, root): - self.funcs = [] - self.visitchildren(root) - return (StatListNode(root.pos, stats=self.funcs), root.scope) - - def visit_FuncDefNode(self, node): - self.funcs.append(node) - # Do not visit children, nested funcdefnodes will - # also be moved by this action... - return node - - def visit_Node(self, node): - self.visitchildren(node) - return node diff --git a/third_party/cython/src/Cython/Compiler/CythonScope.py b/third_party/cython/src/Cython/Compiler/CythonScope.py deleted file mode 100644 index 2bc72b44476a9..0000000000000 --- a/third_party/cython/src/Cython/Compiler/CythonScope.py +++ /dev/null @@ -1,155 +0,0 @@ -from Symtab import ModuleScope -from PyrexTypes import * -from UtilityCode import CythonUtilityCode -from Errors import error -from Scanning import StringSourceDescriptor -import MemoryView - -class CythonScope(ModuleScope): - is_cython_builtin = 1 - _cythonscope_initialized = False - - def __init__(self, context): - ModuleScope.__init__(self, u'cython', None, None) - self.pxd_file_loaded = True - self.populate_cython_scope() - # The Main.Context object - self.context = context - - for fused_type in (cy_integral_type, cy_floating_type, cy_numeric_type): - entry = self.declare_typedef(fused_type.name, - fused_type, - None, - cname='') - entry.in_cinclude = True - - def lookup_type(self, name): - # This function should go away when types are all first-level objects. - type = parse_basic_type(name) - if type: - return type - - return super(CythonScope, self).lookup_type(name) - - def lookup(self, name): - entry = super(CythonScope, self).lookup(name) - - if entry is None and not self._cythonscope_initialized: - self.load_cythonscope() - entry = super(CythonScope, self).lookup(name) - - return entry - - def find_module(self, module_name, pos): - error("cython.%s is not available" % module_name, pos) - - def find_submodule(self, module_name): - entry = self.entries.get(module_name, None) - if not entry: - self.load_cythonscope() - entry = self.entries.get(module_name, None) - - if entry and entry.as_module: - return entry.as_module - else: - # TODO: fix find_submodule control flow so that we're not - # expected to create a submodule here (to protect CythonScope's - # possible immutability). Hack ourselves out of the situation - # for now. - raise error((StringSourceDescriptor(u"cython", u""), 0, 0), - "cython.%s is not available" % module_name) - - def lookup_qualified_name(self, qname): - # ExprNode.as_cython_attribute generates qnames and we untangle it here... - name_path = qname.split(u'.') - scope = self - while len(name_path) > 1: - scope = scope.lookup_here(name_path[0]).as_module - del name_path[0] - if scope is None: - return None - else: - return scope.lookup_here(name_path[0]) - - def populate_cython_scope(self): - # These are used to optimize isinstance in FinalOptimizePhase - type_object = self.declare_typedef( - 'PyTypeObject', - base_type = c_void_type, - pos = None, - cname = 'PyTypeObject') - type_object.is_void = True - type_object_type = type_object.type - - self.declare_cfunction( - 'PyObject_TypeCheck', - CFuncType(c_bint_type, [CFuncTypeArg("o", py_object_type, None), - CFuncTypeArg("t", c_ptr_type(type_object_type), None)]), - pos = None, - defining = 1, - cname = 'PyObject_TypeCheck') - - def load_cythonscope(self): - """ - Creates some entries for testing purposes and entries for - cython.array() and for cython.view.*. - """ - if self._cythonscope_initialized: - return - - self._cythonscope_initialized = True - cython_testscope_utility_code.declare_in_scope( - self, cython_scope=self) - cython_test_extclass_utility_code.declare_in_scope( - self, cython_scope=self) - - # - # The view sub-scope - # - self.viewscope = viewscope = ModuleScope(u'view', self, None) - self.declare_module('view', viewscope, None).as_module = viewscope - viewscope.is_cython_builtin = True - viewscope.pxd_file_loaded = True - - cythonview_testscope_utility_code.declare_in_scope( - viewscope, cython_scope=self) - - view_utility_scope = MemoryView.view_utility_code.declare_in_scope( - self.viewscope, cython_scope=self, - whitelist=MemoryView.view_utility_whitelist) - - # self.entries["array"] = view_utility_scope.entries.pop("array") - - -def create_cython_scope(context): - # One could in fact probably make it a singleton, - # but not sure yet whether any code mutates it (which would kill reusing - # it across different contexts) - return CythonScope(context) - -# Load test utilities for the cython scope - -def load_testscope_utility(cy_util_name, **kwargs): - return CythonUtilityCode.load(cy_util_name, "TestCythonScope.pyx", **kwargs) - - -undecorated_methods_protos = UtilityCode(proto=u""" - /* These methods are undecorated and have therefore no prototype */ - static PyObject *__pyx_TestClass_cdef_method( - struct __pyx_TestClass_obj *self, int value); - static PyObject *__pyx_TestClass_cpdef_method( - struct __pyx_TestClass_obj *self, int value, int skip_dispatch); - static PyObject *__pyx_TestClass_def_method( - PyObject *self, PyObject *value); -""") - -cython_testscope_utility_code = load_testscope_utility("TestScope") - -test_cython_utility_dep = load_testscope_utility("TestDep") - -cython_test_extclass_utility_code = \ - load_testscope_utility("TestClass", name="TestClass", - requires=[undecorated_methods_protos, - test_cython_utility_dep]) - -cythonview_testscope_utility_code = load_testscope_utility("View.TestScope") diff --git a/third_party/cython/src/Cython/Compiler/DebugFlags.py b/third_party/cython/src/Cython/Compiler/DebugFlags.py deleted file mode 100644 index e830ab1849cf5..0000000000000 --- a/third_party/cython/src/Cython/Compiler/DebugFlags.py +++ /dev/null @@ -1,21 +0,0 @@ -# Can be enabled at the command line with --debug-xxx. - -debug_disposal_code = 0 -debug_temp_alloc = 0 -debug_coercion = 0 - -# Write comments into the C code that show where temporary variables -# are allocated and released. -debug_temp_code_comments = 0 - -# Write a call trace of the code generation phase into the C code. -debug_trace_code_generation = 0 - -# Do not replace exceptions with user-friendly error messages. -debug_no_exception_intercept = 0 - -# Print a message each time a new stage in the pipeline is entered. -debug_verbose_pipeline = 0 - -# Raise an exception when an error is encountered. -debug_exception_on_error = 0 diff --git a/third_party/cython/src/Cython/Compiler/Errors.py b/third_party/cython/src/Cython/Compiler/Errors.py deleted file mode 100644 index 046ab531196ac..0000000000000 --- a/third_party/cython/src/Cython/Compiler/Errors.py +++ /dev/null @@ -1,235 +0,0 @@ -# -# Errors -# - -import sys -from Cython.Utils import open_new_file -import DebugFlags -import Options - - -class PyrexError(Exception): - pass - -class PyrexWarning(Exception): - pass - - -def context(position): - source = position[0] - assert not (isinstance(source, unicode) or isinstance(source, str)), ( - "Please replace filename strings with Scanning.FileSourceDescriptor instances %r" % source) - try: - F = source.get_lines() - except UnicodeDecodeError: - # file has an encoding problem - s = u"[unprintable code]\n" - else: - s = u''.join(F[max(0, position[1]-6):position[1]]) - s = u'...\n%s%s^\n' % (s, u' '*(position[2]-1)) - s = u'%s\n%s%s\n' % (u'-'*60, s, u'-'*60) - return s - -def format_position(position): - if position: - return u"%s:%d:%d: " % (position[0].get_error_description(), - position[1], position[2]) - return u'' - -def format_error(message, position): - if position: - pos_str = format_position(position) - cont = context(position) - message = u'\nError compiling Cython file:\n%s\n%s%s' % (cont, pos_str, message or u'') - return message - -class CompileError(PyrexError): - - def __init__(self, position = None, message = u""): - self.position = position - self.message_only = message - self.formatted_message = format_error(message, position) - self.reported = False - # Deprecated and withdrawn in 2.6: - # self.message = message - Exception.__init__(self, self.formatted_message) - # Python Exception subclass pickling is broken, - # see http://bugs.python.org/issue1692335 - self.args = (position, message) - - def __str__(self): - return self.formatted_message - -class CompileWarning(PyrexWarning): - - def __init__(self, position = None, message = ""): - self.position = position - # Deprecated and withdrawn in 2.6: - # self.message = message - Exception.__init__(self, format_position(position) + message) - -class InternalError(Exception): - # If this is ever raised, there is a bug in the compiler. - - def __init__(self, message): - self.message_only = message - Exception.__init__(self, u"Internal compiler error: %s" - % message) - -class AbortError(Exception): - # Throw this to stop the compilation immediately. - - def __init__(self, message): - self.message_only = message - Exception.__init__(self, u"Abort error: %s" % message) - -class CompilerCrash(CompileError): - # raised when an unexpected exception occurs in a transform - def __init__(self, pos, context, message, cause, stacktrace=None): - if message: - message = u'\n' + message - else: - message = u'\n' - self.message_only = message - if context: - message = u"Compiler crash in %s%s" % (context, message) - if stacktrace: - import traceback - message += ( - u'\n\nCompiler crash traceback from this point on:\n' + - u''.join(traceback.format_tb(stacktrace))) - if cause: - if not stacktrace: - message += u'\n' - message += u'%s: %s' % (cause.__class__.__name__, cause) - CompileError.__init__(self, pos, message) - # Python Exception subclass pickling is broken, - # see http://bugs.python.org/issue1692335 - self.args = (pos, context, message, cause, stacktrace) - -class NoElementTreeInstalledException(PyrexError): - """raised when the user enabled options.gdb_debug but no ElementTree - implementation was found - """ - -listing_file = None -num_errors = 0 -echo_file = None - -def open_listing_file(path, echo_to_stderr = 1): - # Begin a new error listing. If path is None, no file - # is opened, the error counter is just reset. - global listing_file, num_errors, echo_file - if path is not None: - listing_file = open_new_file(path) - else: - listing_file = None - if echo_to_stderr: - echo_file = sys.stderr - else: - echo_file = None - num_errors = 0 - -def close_listing_file(): - global listing_file - if listing_file: - listing_file.close() - listing_file = None - -def report_error(err): - if error_stack: - error_stack[-1].append(err) - else: - global num_errors - # See Main.py for why dual reporting occurs. Quick fix for now. - if err.reported: return - err.reported = True - try: line = u"%s\n" % err - except UnicodeEncodeError: - # Python <= 2.5 does this for non-ASCII Unicode exceptions - line = format_error(getattr(err, 'message_only', "[unprintable exception message]"), - getattr(err, 'position', None)) + u'\n' - if listing_file: - try: listing_file.write(line) - except UnicodeEncodeError: - listing_file.write(line.encode('ASCII', 'replace')) - if echo_file: - try: echo_file.write(line) - except UnicodeEncodeError: - echo_file.write(line.encode('ASCII', 'replace')) - num_errors = num_errors + 1 - if Options.fast_fail: - raise AbortError("fatal errors") - -def error(position, message): - #print "Errors.error:", repr(position), repr(message) ### - if position is None: - raise InternalError(message) - err = CompileError(position, message) - if DebugFlags.debug_exception_on_error: raise Exception(err) # debug - report_error(err) - return err - -LEVEL=1 # warn about all errors level 1 or higher - -def message(position, message, level=1): - if level < LEVEL: - return - warn = CompileWarning(position, message) - line = "note: %s\n" % warn - if listing_file: - listing_file.write(line) - if echo_file: - echo_file.write(line) - return warn - -def warning(position, message, level=0): - if level < LEVEL: - return - if Options.warning_errors and position: - return error(position, message) - warn = CompileWarning(position, message) - line = "warning: %s\n" % warn - if listing_file: - listing_file.write(line) - if echo_file: - echo_file.write(line) - return warn - -_warn_once_seen = {} -def warn_once(position, message, level=0): - if level < LEVEL or message in _warn_once_seen: - return - warn = CompileWarning(position, message) - line = "warning: %s\n" % warn - if listing_file: - listing_file.write(line) - if echo_file: - echo_file.write(line) - _warn_once_seen[message] = True - return warn - - -# These functions can be used to momentarily suppress errors. - -error_stack = [] - -def hold_errors(): - error_stack.append([]) - -def release_errors(ignore=False): - held_errors = error_stack.pop() - if not ignore: - for err in held_errors: - report_error(err) - -def held_errors(): - return error_stack[-1] - - -# this module needs a redesign to support parallel cythonisation, but -# for now, the following works at least in sequential compiler runs - -def reset(): - _warn_once_seen.clear() - del error_stack[:] diff --git a/third_party/cython/src/Cython/Compiler/ExprNodes.py b/third_party/cython/src/Cython/Compiler/ExprNodes.py deleted file mode 100644 index 74e1004fd4b4a..0000000000000 --- a/third_party/cython/src/Cython/Compiler/ExprNodes.py +++ /dev/null @@ -1,11289 +0,0 @@ -# -# Parse tree nodes for expressions -# - -import cython -cython.declare(error=object, warning=object, warn_once=object, InternalError=object, - CompileError=object, UtilityCode=object, TempitaUtilityCode=object, - StringEncoding=object, operator=object, - Naming=object, Nodes=object, PyrexTypes=object, py_object_type=object, - list_type=object, tuple_type=object, set_type=object, dict_type=object, - unicode_type=object, str_type=object, bytes_type=object, type_type=object, - Builtin=object, Symtab=object, Utils=object, find_coercion_error=object, - debug_disposal_code=object, debug_temp_alloc=object, debug_coercion=object, - bytearray_type=object, slice_type=object) - -import sys -import copy -import operator - -from Errors import error, warning, warn_once, InternalError, CompileError -from Errors import hold_errors, release_errors, held_errors, report_error -from Code import UtilityCode, TempitaUtilityCode -import StringEncoding -import Naming -import Nodes -from Nodes import Node -import PyrexTypes -from PyrexTypes import py_object_type, c_long_type, typecast, error_type, \ - unspecified_type -import TypeSlots -from Builtin import list_type, tuple_type, set_type, dict_type, type_type, \ - unicode_type, str_type, bytes_type, bytearray_type, basestring_type, slice_type -import Builtin -import Symtab -from Cython import Utils -from Annotate import AnnotationItem -from Cython.Compiler import Future -from Cython.Debugging import print_call_chain -from DebugFlags import debug_disposal_code, debug_temp_alloc, \ - debug_coercion - -try: - from __builtin__ import basestring -except ImportError: - basestring = str # Python 3 - -try: - from builtins import bytes -except ImportError: - bytes = str # Python 2 - - -class NotConstant(object): - _obj = None - - def __new__(cls): - if NotConstant._obj is None: - NotConstant._obj = super(NotConstant, cls).__new__(cls) - - return NotConstant._obj - - def __repr__(self): - return "" - -not_a_constant = NotConstant() -constant_value_not_set = object() - -# error messages when coercing from key[0] to key[1] -coercion_error_dict = { - # string related errors - (Builtin.unicode_type, Builtin.bytes_type) : "Cannot convert Unicode string to 'bytes' implicitly, encoding required.", - (Builtin.unicode_type, Builtin.str_type) : "Cannot convert Unicode string to 'str' implicitly. This is not portable and requires explicit encoding.", - (Builtin.unicode_type, PyrexTypes.c_char_ptr_type) : "Unicode objects only support coercion to Py_UNICODE*.", - (Builtin.unicode_type, PyrexTypes.c_uchar_ptr_type) : "Unicode objects only support coercion to Py_UNICODE*.", - (Builtin.bytes_type, Builtin.unicode_type) : "Cannot convert 'bytes' object to unicode implicitly, decoding required", - (Builtin.bytes_type, Builtin.str_type) : "Cannot convert 'bytes' object to str implicitly. This is not portable to Py3.", - (Builtin.bytes_type, Builtin.basestring_type) : "Cannot convert 'bytes' object to basestring implicitly. This is not portable to Py3.", - (Builtin.bytes_type, PyrexTypes.c_py_unicode_ptr_type) : "Cannot convert 'bytes' object to Py_UNICODE*, use 'unicode'.", - (Builtin.basestring_type, Builtin.bytes_type) : "Cannot convert 'basestring' object to bytes implicitly. This is not portable.", - (Builtin.str_type, Builtin.unicode_type) : "str objects do not support coercion to unicode, use a unicode string literal instead (u'')", - (Builtin.str_type, Builtin.bytes_type) : "Cannot convert 'str' to 'bytes' implicitly. This is not portable.", - (Builtin.str_type, PyrexTypes.c_char_ptr_type) : "'str' objects do not support coercion to C types (use 'bytes'?).", - (Builtin.str_type, PyrexTypes.c_uchar_ptr_type) : "'str' objects do not support coercion to C types (use 'bytes'?).", - (Builtin.str_type, PyrexTypes.c_py_unicode_ptr_type) : "'str' objects do not support coercion to C types (use 'unicode'?).", - (PyrexTypes.c_char_ptr_type, Builtin.unicode_type) : "Cannot convert 'char*' to unicode implicitly, decoding required", - (PyrexTypes.c_uchar_ptr_type, Builtin.unicode_type) : "Cannot convert 'char*' to unicode implicitly, decoding required", -} - -def find_coercion_error(type_tuple, default, env): - err = coercion_error_dict.get(type_tuple) - if err is None: - return default - elif ((PyrexTypes.c_char_ptr_type in type_tuple or PyrexTypes.c_uchar_ptr_type in type_tuple) - and env.directives['c_string_encoding']): - if type_tuple[1].is_pyobject: - return default - elif env.directives['c_string_encoding'] in ('ascii', 'default'): - return default - else: - return "'%s' objects do not support coercion to C types with non-ascii or non-default c_string_encoding" % type_tuple[0].name - else: - return err - - -def default_str_type(env): - return { - 'bytes': bytes_type, - 'bytearray': bytearray_type, - 'str': str_type, - 'unicode': unicode_type - }.get(env.directives['c_string_type']) - - -def check_negative_indices(*nodes): - """ - Raise a warning on nodes that are known to have negative numeric values. - Used to find (potential) bugs inside of "wraparound=False" sections. - """ - for node in nodes: - if (node is None - or not isinstance(node.constant_result, (int, float, long))): - continue - if node.constant_result < 0: - warning(node.pos, - "the result of using negative indices inside of " - "code sections marked as 'wraparound=False' is " - "undefined", level=1) - - -def infer_sequence_item_type(env, seq_node, index_node=None, seq_type=None): - if not seq_node.is_sequence_constructor: - if seq_type is None: - seq_type = seq_node.infer_type(env) - if seq_type is tuple_type: - # tuples are immutable => we can safely follow assignments - if seq_node.cf_state and len(seq_node.cf_state) == 1: - try: - seq_node = seq_node.cf_state[0].rhs - except AttributeError: - pass - if seq_node is not None and seq_node.is_sequence_constructor: - if index_node is not None and index_node.has_constant_result(): - try: - item = seq_node.args[index_node.constant_result] - except (ValueError, TypeError, IndexError): - pass - else: - return item.infer_type(env) - # if we're lucky, all items have the same type - item_types = set([item.infer_type(env) for item in seq_node.args]) - if len(item_types) == 1: - return item_types.pop() - return None - - -class ExprNode(Node): - # subexprs [string] Class var holding names of subexpr node attrs - # type PyrexType Type of the result - # result_code string Code fragment - # result_ctype string C type of result_code if different from type - # is_temp boolean Result is in a temporary variable - # is_sequence_constructor - # boolean Is a list or tuple constructor expression - # is_starred boolean Is a starred expression (e.g. '*a') - # saved_subexpr_nodes - # [ExprNode or [ExprNode or None] or None] - # Cached result of subexpr_nodes() - # use_managed_ref boolean use ref-counted temps/assignments/etc. - # result_is_used boolean indicates that the result will be dropped and the - # result_code/temp_result can safely be set to None - - result_ctype = None - type = None - temp_code = None - old_temp = None # error checker for multiple frees etc. - use_managed_ref = True # can be set by optimisation transforms - result_is_used = True - - # The Analyse Expressions phase for expressions is split - # into two sub-phases: - # - # Analyse Types - # Determines the result type of the expression based - # on the types of its sub-expressions, and inserts - # coercion nodes into the expression tree where needed. - # Marks nodes which will need to have temporary variables - # allocated. - # - # Allocate Temps - # Allocates temporary variables where needed, and fills - # in the result_code field of each node. - # - # ExprNode provides some convenience routines which - # perform both of the above phases. These should only - # be called from statement nodes, and only when no - # coercion nodes need to be added around the expression - # being analysed. In that case, the above two phases - # should be invoked separately. - # - # Framework code in ExprNode provides much of the common - # processing for the various phases. It makes use of the - # 'subexprs' class attribute of ExprNodes, which should - # contain a list of the names of attributes which can - # hold sub-nodes or sequences of sub-nodes. - # - # The framework makes use of a number of abstract methods. - # Their responsibilities are as follows. - # - # Declaration Analysis phase - # - # analyse_target_declaration - # Called during the Analyse Declarations phase to analyse - # the LHS of an assignment or argument of a del statement. - # Nodes which cannot be the LHS of an assignment need not - # implement it. - # - # Expression Analysis phase - # - # analyse_types - # - Call analyse_types on all sub-expressions. - # - Check operand types, and wrap coercion nodes around - # sub-expressions where needed. - # - Set the type of this node. - # - If a temporary variable will be required for the - # result, set the is_temp flag of this node. - # - # analyse_target_types - # Called during the Analyse Types phase to analyse - # the LHS of an assignment or argument of a del - # statement. Similar responsibilities to analyse_types. - # - # target_code - # Called by the default implementation of allocate_target_temps. - # Should return a C lvalue for assigning to the node. The default - # implementation calls calculate_result_code. - # - # check_const - # - Check that this node and its subnodes form a - # legal constant expression. If so, do nothing, - # otherwise call not_const. - # - # The default implementation of check_const - # assumes that the expression is not constant. - # - # check_const_addr - # - Same as check_const, except check that the - # expression is a C lvalue whose address is - # constant. Otherwise, call addr_not_const. - # - # The default implementation of calc_const_addr - # assumes that the expression is not a constant - # lvalue. - # - # Code Generation phase - # - # generate_evaluation_code - # - Call generate_evaluation_code for sub-expressions. - # - Perform the functions of generate_result_code - # (see below). - # - If result is temporary, call generate_disposal_code - # on all sub-expressions. - # - # A default implementation of generate_evaluation_code - # is provided which uses the following abstract methods: - # - # generate_result_code - # - Generate any C statements necessary to calculate - # the result of this node from the results of its - # sub-expressions. - # - # calculate_result_code - # - Should return a C code fragment evaluating to the - # result. This is only called when the result is not - # a temporary. - # - # generate_assignment_code - # Called on the LHS of an assignment. - # - Call generate_evaluation_code for sub-expressions. - # - Generate code to perform the assignment. - # - If the assignment absorbed a reference, call - # generate_post_assignment_code on the RHS, - # otherwise call generate_disposal_code on it. - # - # generate_deletion_code - # Called on an argument of a del statement. - # - Call generate_evaluation_code for sub-expressions. - # - Generate code to perform the deletion. - # - Call generate_disposal_code on all sub-expressions. - # - # - - is_sequence_constructor = 0 - is_string_literal = 0 - is_attribute = 0 - is_subscript = 0 - - saved_subexpr_nodes = None - is_temp = 0 - is_target = 0 - is_starred = 0 - - constant_result = constant_value_not_set - - # whether this node with a memoryview type should be broadcast - memslice_broadcast = False - - child_attrs = property(fget=operator.attrgetter('subexprs')) - - def not_implemented(self, method_name): - print_call_chain(method_name, "not implemented") ### - raise InternalError( - "%s.%s not implemented" % - (self.__class__.__name__, method_name)) - - def is_lvalue(self): - return 0 - - def is_addressable(self): - return self.is_lvalue() and not self.type.is_memoryviewslice - - def is_ephemeral(self): - # An ephemeral node is one whose result is in - # a Python temporary and we suspect there are no - # other references to it. Certain operations are - # disallowed on such values, since they are - # likely to result in a dangling pointer. - return self.type.is_pyobject and self.is_temp - - def subexpr_nodes(self): - # Extract a list of subexpression nodes based - # on the contents of the subexprs class attribute. - nodes = [] - for name in self.subexprs: - item = getattr(self, name) - if item is not None: - if type(item) is list: - nodes.extend(item) - else: - nodes.append(item) - return nodes - - def result(self): - if self.is_temp: - return self.temp_code - else: - return self.calculate_result_code() - - def result_as(self, type = None): - # Return the result code cast to the specified C type. - if (self.is_temp and self.type.is_pyobject and - type != py_object_type): - # Allocated temporaries are always PyObject *, which may not - # reflect the actual type (e.g. an extension type) - return typecast(type, py_object_type, self.result()) - return typecast(type, self.ctype(), self.result()) - - def py_result(self): - # Return the result code cast to PyObject *. - return self.result_as(py_object_type) - - def ctype(self): - # Return the native C type of the result (i.e. the - # C type of the result_code expression). - return self.result_ctype or self.type - - def get_constant_c_result_code(self): - # Return the constant value of this node as a result code - # string, or None if the node is not constant. This method - # can be called when the constant result code is required - # before the code generation phase. - # - # The return value is a string that can represent a simple C - # value, a constant C name or a constant C expression. If the - # node type depends on Python code, this must return None. - return None - - def calculate_constant_result(self): - # Calculate the constant compile time result value of this - # expression and store it in ``self.constant_result``. Does - # nothing by default, thus leaving ``self.constant_result`` - # unknown. If valid, the result can be an arbitrary Python - # value. - # - # This must only be called when it is assured that all - # sub-expressions have a valid constant_result value. The - # ConstantFolding transform will do this. - pass - - def has_constant_result(self): - return self.constant_result is not constant_value_not_set and \ - self.constant_result is not not_a_constant - - def compile_time_value(self, denv): - # Return value of compile-time expression, or report error. - error(self.pos, "Invalid compile-time expression") - - def compile_time_value_error(self, e): - error(self.pos, "Error in compile-time expression: %s: %s" % ( - e.__class__.__name__, e)) - - # ------------- Declaration Analysis ---------------- - - def analyse_target_declaration(self, env): - error(self.pos, "Cannot assign to or delete this") - - # ------------- Expression Analysis ---------------- - - def analyse_const_expression(self, env): - # Called during the analyse_declarations phase of a - # constant expression. Analyses the expression's type, - # checks whether it is a legal const expression, - # and determines its value. - node = self.analyse_types(env) - node.check_const() - return node - - def analyse_expressions(self, env): - # Convenience routine performing both the Type - # Analysis and Temp Allocation phases for a whole - # expression. - return self.analyse_types(env) - - def analyse_target_expression(self, env, rhs): - # Convenience routine performing both the Type - # Analysis and Temp Allocation phases for the LHS of - # an assignment. - return self.analyse_target_types(env) - - def analyse_boolean_expression(self, env): - # Analyse expression and coerce to a boolean. - node = self.analyse_types(env) - bool = node.coerce_to_boolean(env) - return bool - - def analyse_temp_boolean_expression(self, env): - # Analyse boolean expression and coerce result into - # a temporary. This is used when a branch is to be - # performed on the result and we won't have an - # opportunity to ensure disposal code is executed - # afterwards. By forcing the result into a temporary, - # we ensure that all disposal has been done by the - # time we get the result. - node = self.analyse_types(env) - return node.coerce_to_boolean(env).coerce_to_simple(env) - - # --------------- Type Inference ----------------- - - def type_dependencies(self, env): - # Returns the list of entries whose types must be determined - # before the type of self can be inferred. - if hasattr(self, 'type') and self.type is not None: - return () - return sum([node.type_dependencies(env) for node in self.subexpr_nodes()], ()) - - def infer_type(self, env): - # Attempt to deduce the type of self. - # Differs from analyse_types as it avoids unnecessary - # analysis of subexpressions, but can assume everything - # in self.type_dependencies() has been resolved. - if hasattr(self, 'type') and self.type is not None: - return self.type - elif hasattr(self, 'entry') and self.entry is not None: - return self.entry.type - else: - self.not_implemented("infer_type") - - def nonlocally_immutable(self): - # Returns whether this variable is a safe reference, i.e. - # can't be modified as part of globals or closures. - return self.is_literal or self.is_temp or self.type.is_array or self.type.is_cfunction - - # --------------- Type Analysis ------------------ - - def analyse_as_module(self, env): - # If this node can be interpreted as a reference to a - # cimported module, return its scope, else None. - return None - - def analyse_as_type(self, env): - # If this node can be interpreted as a reference to a - # type, return that type, else None. - return None - - def analyse_as_extension_type(self, env): - # If this node can be interpreted as a reference to an - # extension type or builtin type, return its type, else None. - return None - - def analyse_types(self, env): - self.not_implemented("analyse_types") - - def analyse_target_types(self, env): - return self.analyse_types(env) - - def nogil_check(self, env): - # By default, any expression based on Python objects is - # prevented in nogil environments. Subtypes must override - # this if they can work without the GIL. - if self.type and self.type.is_pyobject: - self.gil_error() - - def gil_assignment_check(self, env): - if env.nogil and self.type.is_pyobject: - error(self.pos, "Assignment of Python object not allowed without gil") - - def check_const(self): - self.not_const() - return False - - def not_const(self): - error(self.pos, "Not allowed in a constant expression") - - def check_const_addr(self): - self.addr_not_const() - return False - - def addr_not_const(self): - error(self.pos, "Address is not constant") - - # ----------------- Result Allocation ----------------- - - def result_in_temp(self): - # Return true if result is in a temporary owned by - # this node or one of its subexpressions. Overridden - # by certain nodes which can share the result of - # a subnode. - return self.is_temp - - def target_code(self): - # Return code fragment for use as LHS of a C assignment. - return self.calculate_result_code() - - def calculate_result_code(self): - self.not_implemented("calculate_result_code") - -# def release_target_temp(self, env): -# # Release temporaries used by LHS of an assignment. -# self.release_subexpr_temps(env) - - def allocate_temp_result(self, code): - if self.temp_code: - raise RuntimeError("Temp allocated multiple times in %r: %r" % (self.__class__.__name__, self.pos)) - type = self.type - if not type.is_void: - if type.is_pyobject: - type = PyrexTypes.py_object_type - self.temp_code = code.funcstate.allocate_temp( - type, manage_ref=self.use_managed_ref) - else: - self.temp_code = None - - def release_temp_result(self, code): - if not self.temp_code: - if not self.result_is_used: - # not used anyway, so ignore if not set up - return - if self.old_temp: - raise RuntimeError("temp %s released multiple times in %s" % ( - self.old_temp, self.__class__.__name__)) - else: - raise RuntimeError("no temp, but release requested in %s" % ( - self.__class__.__name__)) - code.funcstate.release_temp(self.temp_code) - self.old_temp = self.temp_code - self.temp_code = None - - # ---------------- Code Generation ----------------- - - def make_owned_reference(self, code): - """ - If result is a pyobject, make sure we own a reference to it. - If the result is in a temp, it is already a new reference. - """ - if self.type.is_pyobject and not self.result_in_temp(): - code.put_incref(self.result(), self.ctype()) - - def make_owned_memoryviewslice(self, code): - """ - Make sure we own the reference to this memoryview slice. - """ - if not self.result_in_temp(): - code.put_incref_memoryviewslice(self.result(), - have_gil=self.in_nogil_context) - - def generate_evaluation_code(self, code): - # Generate code to evaluate this node and - # its sub-expressions, and dispose of any - # temporary results of its sub-expressions. - self.generate_subexpr_evaluation_code(code) - - code.mark_pos(self.pos) - if self.is_temp: - self.allocate_temp_result(code) - - self.generate_result_code(code) - if self.is_temp: - # If we are temp we do not need to wait until this node is disposed - # before disposing children. - self.generate_subexpr_disposal_code(code) - self.free_subexpr_temps(code) - - def generate_subexpr_evaluation_code(self, code): - for node in self.subexpr_nodes(): - node.generate_evaluation_code(code) - - def generate_result_code(self, code): - self.not_implemented("generate_result_code") - - def generate_disposal_code(self, code): - if self.is_temp: - if self.result(): - if self.type.is_pyobject: - code.put_decref_clear(self.result(), self.ctype()) - elif self.type.is_memoryviewslice: - code.put_xdecref_memoryviewslice( - self.result(), have_gil=not self.in_nogil_context) - else: - # Already done if self.is_temp - self.generate_subexpr_disposal_code(code) - - def generate_subexpr_disposal_code(self, code): - # Generate code to dispose of temporary results - # of all sub-expressions. - for node in self.subexpr_nodes(): - node.generate_disposal_code(code) - - def generate_post_assignment_code(self, code): - if self.is_temp: - if self.type.is_pyobject: - code.putln("%s = 0;" % self.result()) - elif self.type.is_memoryviewslice: - code.putln("%s.memview = NULL;" % self.result()) - code.putln("%s.data = NULL;" % self.result()) - else: - self.generate_subexpr_disposal_code(code) - - def generate_assignment_code(self, rhs, code): - # Stub method for nodes which are not legal as - # the LHS of an assignment. An error will have - # been reported earlier. - pass - - def generate_deletion_code(self, code, ignore_nonexisting=False): - # Stub method for nodes that are not legal as - # the argument of a del statement. An error - # will have been reported earlier. - pass - - def free_temps(self, code): - if self.is_temp: - if not self.type.is_void: - self.release_temp_result(code) - else: - self.free_subexpr_temps(code) - - def free_subexpr_temps(self, code): - for sub in self.subexpr_nodes(): - sub.free_temps(code) - - def generate_function_definitions(self, env, code): - pass - - # ---------------- Annotation --------------------- - - def annotate(self, code): - for node in self.subexpr_nodes(): - node.annotate(code) - - # ----------------- Coercion ---------------------- - - def coerce_to(self, dst_type, env): - # Coerce the result so that it can be assigned to - # something of type dst_type. If processing is necessary, - # wraps this node in a coercion node and returns that. - # Otherwise, returns this node unchanged. - # - # This method is called during the analyse_expressions - # phase of the src_node's processing. - # - # Note that subclasses that override this (especially - # ConstNodes) must not (re-)set their own .type attribute - # here. Since expression nodes may turn up in different - # places in the tree (e.g. inside of CloneNodes in cascaded - # assignments), this method must return a new node instance - # if it changes the type. - # - src = self - src_type = self.type - - if self.check_for_coercion_error(dst_type, env): - return self - - if dst_type.is_reference and not src_type.is_reference: - dst_type = dst_type.ref_base_type - - if src_type.is_const: - src_type = src_type.const_base_type - - if src_type.is_fused or dst_type.is_fused: - # See if we are coercing a fused function to a pointer to a - # specialized function - if (src_type.is_cfunction and not dst_type.is_fused and - dst_type.is_ptr and dst_type.base_type.is_cfunction): - - dst_type = dst_type.base_type - - for signature in src_type.get_all_specialized_function_types(): - if signature.same_as(dst_type): - src.type = signature - src.entry = src.type.entry - src.entry.used = True - return self - - if src_type.is_fused: - error(self.pos, "Type is not specialized") - else: - error(self.pos, "Cannot coerce to a type that is not specialized") - - self.type = error_type - return self - - if self.coercion_type is not None: - # This is purely for error checking purposes! - node = NameNode(self.pos, name='', type=self.coercion_type) - node.coerce_to(dst_type, env) - - if dst_type.is_memoryviewslice: - import MemoryView - if not src.type.is_memoryviewslice: - if src.type.is_pyobject: - src = CoerceToMemViewSliceNode(src, dst_type, env) - elif src.type.is_array: - src = CythonArrayNode.from_carray(src, env).coerce_to( - dst_type, env) - elif not src_type.is_error: - error(self.pos, - "Cannot convert '%s' to memoryviewslice" % - (src_type,)) - elif not MemoryView.src_conforms_to_dst( - src.type, dst_type, broadcast=self.memslice_broadcast): - if src.type.dtype.same_as(dst_type.dtype): - msg = "Memoryview '%s' not conformable to memoryview '%s'." - tup = src.type, dst_type - else: - msg = "Different base types for memoryviews (%s, %s)" - tup = src.type.dtype, dst_type.dtype - - error(self.pos, msg % tup) - - elif dst_type.is_pyobject: - if not src.type.is_pyobject: - if dst_type is bytes_type and src.type.is_int: - src = CoerceIntToBytesNode(src, env) - else: - src = CoerceToPyTypeNode(src, env, type=dst_type) - if not src.type.subtype_of(dst_type): - if src.constant_result is not None: - src = PyTypeTestNode(src, dst_type, env) - elif src.type.is_pyobject: - src = CoerceFromPyTypeNode(dst_type, src, env) - elif (dst_type.is_complex - and src_type != dst_type - and dst_type.assignable_from(src_type)): - src = CoerceToComplexNode(src, dst_type, env) - else: # neither src nor dst are py types - # Added the string comparison, since for c types that - # is enough, but Cython gets confused when the types are - # in different pxi files. - if not (str(src.type) == str(dst_type) or dst_type.assignable_from(src_type)): - self.fail_assignment(dst_type) - return src - - def fail_assignment(self, dst_type): - error(self.pos, "Cannot assign type '%s' to '%s'" % (self.type, dst_type)) - - def check_for_coercion_error(self, dst_type, env, fail=False, default=None): - if fail and not default: - default = "Cannot assign type '%(FROM)s' to '%(TO)s'" - message = find_coercion_error((self.type, dst_type), default, env) - if message is not None: - error(self.pos, message % {'FROM': self.type, 'TO': dst_type}) - return True - if fail: - self.fail_assignment(dst_type) - return True - return False - - def coerce_to_pyobject(self, env): - return self.coerce_to(PyrexTypes.py_object_type, env) - - def coerce_to_boolean(self, env): - # Coerce result to something acceptable as - # a boolean value. - - # if it's constant, calculate the result now - if self.has_constant_result(): - bool_value = bool(self.constant_result) - return BoolNode(self.pos, value=bool_value, - constant_result=bool_value) - - type = self.type - if type.is_enum or type.is_error: - return self - elif type.is_pyobject or type.is_int or type.is_ptr or type.is_float: - return CoerceToBooleanNode(self, env) - else: - error(self.pos, "Type '%s' not acceptable as a boolean" % type) - return self - - def coerce_to_integer(self, env): - # If not already some C integer type, coerce to longint. - if self.type.is_int: - return self - else: - return self.coerce_to(PyrexTypes.c_long_type, env) - - def coerce_to_temp(self, env): - # Ensure that the result is in a temporary. - if self.result_in_temp(): - return self - else: - return CoerceToTempNode(self, env) - - def coerce_to_simple(self, env): - # Ensure that the result is simple (see is_simple). - if self.is_simple(): - return self - else: - return self.coerce_to_temp(env) - - def is_simple(self): - # A node is simple if its result is something that can - # be referred to without performing any operations, e.g. - # a constant, local var, C global var, struct member - # reference, or temporary. - return self.result_in_temp() - - def may_be_none(self): - if self.type and not (self.type.is_pyobject or - self.type.is_memoryviewslice): - return False - if self.has_constant_result(): - return self.constant_result is not None - return True - - def as_cython_attribute(self): - return None - - def as_none_safe_node(self, message, error="PyExc_TypeError", format_args=()): - # Wraps the node in a NoneCheckNode if it is not known to be - # not-None (e.g. because it is a Python literal). - if self.may_be_none(): - return NoneCheckNode(self, error, message, format_args) - else: - return self - - @classmethod - def from_node(cls, node, **kwargs): - """Instantiate this node class from another node, properly - copying over all attributes that one would forget otherwise. - """ - attributes = "cf_state cf_maybe_null cf_is_null constant_result".split() - for attr_name in attributes: - if attr_name in kwargs: - continue - try: - value = getattr(node, attr_name) - except AttributeError: - pass - else: - kwargs[attr_name] = value - return cls(node.pos, **kwargs) - - -class AtomicExprNode(ExprNode): - # Abstract base class for expression nodes which have - # no sub-expressions. - - subexprs = [] - - # Override to optimize -- we know we have no children - def generate_subexpr_evaluation_code(self, code): - pass - def generate_subexpr_disposal_code(self, code): - pass - -class PyConstNode(AtomicExprNode): - # Abstract base class for constant Python values. - - is_literal = 1 - type = py_object_type - - def is_simple(self): - return 1 - - def may_be_none(self): - return False - - def analyse_types(self, env): - return self - - def calculate_result_code(self): - return self.value - - def generate_result_code(self, code): - pass - - -class NoneNode(PyConstNode): - # The constant value None - - is_none = 1 - value = "Py_None" - - constant_result = None - - nogil_check = None - - def compile_time_value(self, denv): - return None - - def may_be_none(self): - return True - - -class EllipsisNode(PyConstNode): - # '...' in a subscript list. - - value = "Py_Ellipsis" - - constant_result = Ellipsis - - def compile_time_value(self, denv): - return Ellipsis - - -class ConstNode(AtomicExprNode): - # Abstract base type for literal constant nodes. - # - # value string C code fragment - - is_literal = 1 - nogil_check = None - - def is_simple(self): - return 1 - - def nonlocally_immutable(self): - return 1 - - def may_be_none(self): - return False - - def analyse_types(self, env): - return self # Types are held in class variables - - def check_const(self): - return True - - def get_constant_c_result_code(self): - return self.calculate_result_code() - - def calculate_result_code(self): - return str(self.value) - - def generate_result_code(self, code): - pass - - -class BoolNode(ConstNode): - type = PyrexTypes.c_bint_type - # The constant value True or False - - def calculate_constant_result(self): - self.constant_result = self.value - - def compile_time_value(self, denv): - return self.value - - def calculate_result_code(self): - if self.type.is_pyobject: - return self.value and 'Py_True' or 'Py_False' - else: - return str(int(self.value)) - - def coerce_to(self, dst_type, env): - if dst_type.is_pyobject and self.type.is_int: - return BoolNode( - self.pos, value=self.value, - constant_result=self.constant_result, - type=Builtin.bool_type) - if dst_type.is_int and self.type.is_pyobject: - return BoolNode( - self.pos, value=self.value, - constant_result=self.constant_result, - type=PyrexTypes.c_bint_type) - return ConstNode.coerce_to(self, dst_type, env) - - -class NullNode(ConstNode): - type = PyrexTypes.c_null_ptr_type - value = "NULL" - constant_result = 0 - - def get_constant_c_result_code(self): - return self.value - - -class CharNode(ConstNode): - type = PyrexTypes.c_char_type - - def calculate_constant_result(self): - self.constant_result = ord(self.value) - - def compile_time_value(self, denv): - return ord(self.value) - - def calculate_result_code(self): - return "'%s'" % StringEncoding.escape_char(self.value) - - -class IntNode(ConstNode): - - # unsigned "" or "U" - # longness "" or "L" or "LL" - # is_c_literal True/False/None creator considers this a C integer literal - - unsigned = "" - longness = "" - is_c_literal = None # unknown - - def __init__(self, pos, **kwds): - ExprNode.__init__(self, pos, **kwds) - if 'type' not in kwds: - self.type = self.find_suitable_type_for_value() - - def find_suitable_type_for_value(self): - if self.constant_result is constant_value_not_set: - try: - self.calculate_constant_result() - except ValueError: - pass - # we ignore 'is_c_literal = True' and instead map signed 32bit - # integers as C long values - if self.is_c_literal or \ - self.constant_result in (constant_value_not_set, not_a_constant) or \ - self.unsigned or self.longness == 'LL': - # clearly a C literal - rank = (self.longness == 'LL') and 2 or 1 - suitable_type = PyrexTypes.modifiers_and_name_to_type[not self.unsigned, rank, "int"] - if self.type: - suitable_type = PyrexTypes.widest_numeric_type(suitable_type, self.type) - else: - # C literal or Python literal - split at 32bit boundary - if -2**31 <= self.constant_result < 2**31: - if self.type and self.type.is_int: - suitable_type = self.type - else: - suitable_type = PyrexTypes.c_long_type - else: - suitable_type = PyrexTypes.py_object_type - return suitable_type - - def coerce_to(self, dst_type, env): - if self.type is dst_type: - return self - elif dst_type.is_float: - if self.has_constant_result(): - return FloatNode(self.pos, value='%d.0' % int(self.constant_result), type=dst_type, - constant_result=float(self.constant_result)) - else: - return FloatNode(self.pos, value=self.value, type=dst_type, - constant_result=not_a_constant) - if dst_type.is_numeric and not dst_type.is_complex: - node = IntNode(self.pos, value=self.value, constant_result=self.constant_result, - type = dst_type, is_c_literal = True, - unsigned=self.unsigned, longness=self.longness) - return node - elif dst_type.is_pyobject: - node = IntNode(self.pos, value=self.value, constant_result=self.constant_result, - type = PyrexTypes.py_object_type, is_c_literal = False, - unsigned=self.unsigned, longness=self.longness) - else: - # FIXME: not setting the type here to keep it working with - # complex numbers. Should they be special cased? - node = IntNode(self.pos, value=self.value, constant_result=self.constant_result, - unsigned=self.unsigned, longness=self.longness) - # We still need to perform normal coerce_to processing on the - # result, because we might be coercing to an extension type, - # in which case a type test node will be needed. - return ConstNode.coerce_to(node, dst_type, env) - - def coerce_to_boolean(self, env): - return IntNode( - self.pos, value=self.value, - constant_result=self.constant_result, - type=PyrexTypes.c_bint_type, - unsigned=self.unsigned, longness=self.longness) - - def generate_evaluation_code(self, code): - if self.type.is_pyobject: - # pre-allocate a Python version of the number - plain_integer_string = str(Utils.str_to_number(self.value)) - self.result_code = code.get_py_int(plain_integer_string, self.longness) - else: - self.result_code = self.get_constant_c_result_code() - - def get_constant_c_result_code(self): - return self.value_as_c_integer_string() + self.unsigned + self.longness - - def value_as_c_integer_string(self): - value = self.value - if len(value) > 2: - # convert C-incompatible Py3 oct/bin notations - if value[1] in 'oO': - value = value[0] + value[2:] # '0o123' => '0123' - elif value[1] in 'bB': - value = int(value[2:], 2) - return str(value) - - def calculate_result_code(self): - return self.result_code - - def calculate_constant_result(self): - self.constant_result = Utils.str_to_number(self.value) - - def compile_time_value(self, denv): - return Utils.str_to_number(self.value) - - -class FloatNode(ConstNode): - type = PyrexTypes.c_double_type - - def calculate_constant_result(self): - self.constant_result = float(self.value) - - def compile_time_value(self, denv): - return float(self.value) - - def coerce_to(self, dst_type, env): - if dst_type.is_pyobject and self.type.is_float: - return FloatNode( - self.pos, value=self.value, - constant_result=self.constant_result, - type=Builtin.float_type) - if dst_type.is_float and self.type.is_pyobject: - return FloatNode( - self.pos, value=self.value, - constant_result=self.constant_result, - type=dst_type) - return ConstNode.coerce_to(self, dst_type, env) - - def calculate_result_code(self): - return self.result_code - - def get_constant_c_result_code(self): - strval = self.value - assert isinstance(strval, (str, unicode)) - cmpval = repr(float(strval)) - if cmpval == 'nan': - return "(Py_HUGE_VAL * 0)" - elif cmpval == 'inf': - return "Py_HUGE_VAL" - elif cmpval == '-inf': - return "(-Py_HUGE_VAL)" - else: - return strval - - def generate_evaluation_code(self, code): - c_value = self.get_constant_c_result_code() - if self.type.is_pyobject: - self.result_code = code.get_py_float(self.value, c_value) - else: - self.result_code = c_value - - -class BytesNode(ConstNode): - # A char* or bytes literal - # - # value BytesLiteral - - is_string_literal = True - # start off as Python 'bytes' to support len() in O(1) - type = bytes_type - - def calculate_constant_result(self): - self.constant_result = self.value - - def as_sliced_node(self, start, stop, step=None): - value = StringEncoding.BytesLiteral(self.value[start:stop:step]) - value.encoding = self.value.encoding - return BytesNode( - self.pos, value=value, constant_result=value) - - def compile_time_value(self, denv): - return self.value - - def analyse_as_type(self, env): - type = PyrexTypes.parse_basic_type(self.value) - if type is not None: - return type - from TreeFragment import TreeFragment - pos = (self.pos[0], self.pos[1], self.pos[2]-7) - declaration = TreeFragment(u"sizeof(%s)" % self.value, name=pos[0].filename, initial_pos=pos) - sizeof_node = declaration.root.stats[0].expr - sizeof_node = sizeof_node.analyse_types(env) - if isinstance(sizeof_node, SizeofTypeNode): - return sizeof_node.arg_type - - def can_coerce_to_char_literal(self): - return len(self.value) == 1 - - def coerce_to_boolean(self, env): - # This is special because testing a C char* for truth directly - # would yield the wrong result. - bool_value = bool(self.value) - return BoolNode(self.pos, value=bool_value, constant_result=bool_value) - - def coerce_to(self, dst_type, env): - if self.type == dst_type: - return self - if dst_type.is_int: - if not self.can_coerce_to_char_literal(): - error(self.pos, "Only single-character string literals can be coerced into ints.") - return self - if dst_type.is_unicode_char: - error(self.pos, "Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead.") - return self - return CharNode(self.pos, value=self.value, - constant_result=ord(self.value)) - - node = BytesNode(self.pos, value=self.value, - constant_result=self.constant_result) - if dst_type.is_pyobject: - if dst_type in (py_object_type, Builtin.bytes_type): - node.type = Builtin.bytes_type - else: - self.check_for_coercion_error(dst_type, env, fail=True) - return node - elif dst_type == PyrexTypes.c_char_ptr_type: - node.type = dst_type - return node - elif dst_type == PyrexTypes.c_uchar_ptr_type: - node.type = PyrexTypes.c_char_ptr_type - return CastNode(node, PyrexTypes.c_uchar_ptr_type) - elif dst_type.assignable_from(PyrexTypes.c_char_ptr_type): - node.type = dst_type - return node - - # We still need to perform normal coerce_to processing on the - # result, because we might be coercing to an extension type, - # in which case a type test node will be needed. - return ConstNode.coerce_to(node, dst_type, env) - - def generate_evaluation_code(self, code): - if self.type.is_pyobject: - self.result_code = code.get_py_string_const(self.value) - else: - self.result_code = code.get_string_const(self.value) - - def get_constant_c_result_code(self): - return None # FIXME - - def calculate_result_code(self): - return self.result_code - - -class UnicodeNode(ConstNode): - # A Py_UNICODE* or unicode literal - # - # value EncodedString - # bytes_value BytesLiteral the literal parsed as bytes string - # ('-3' unicode literals only) - - is_string_literal = True - bytes_value = None - type = unicode_type - - def calculate_constant_result(self): - self.constant_result = self.value - - def as_sliced_node(self, start, stop, step=None): - if StringEncoding.string_contains_surrogates(self.value[:stop]): - # this is unsafe as it may give different results - # in different runtimes - return None - value = StringEncoding.EncodedString(self.value[start:stop:step]) - value.encoding = self.value.encoding - if self.bytes_value is not None: - bytes_value = StringEncoding.BytesLiteral( - self.bytes_value[start:stop:step]) - bytes_value.encoding = self.bytes_value.encoding - else: - bytes_value = None - return UnicodeNode( - self.pos, value=value, bytes_value=bytes_value, - constant_result=value) - - def coerce_to(self, dst_type, env): - if dst_type is self.type: - pass - elif dst_type.is_unicode_char: - if not self.can_coerce_to_char_literal(): - error(self.pos, - "Only single-character Unicode string literals or " - "surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.") - return self - int_value = ord(self.value) - return IntNode(self.pos, type=dst_type, value=str(int_value), - constant_result=int_value) - elif not dst_type.is_pyobject: - if dst_type.is_string and self.bytes_value is not None: - # special case: '-3' enforced unicode literal used in a - # C char* context - return BytesNode(self.pos, value=self.bytes_value - ).coerce_to(dst_type, env) - if dst_type.is_pyunicode_ptr: - node = UnicodeNode(self.pos, value=self.value) - node.type = dst_type - return node - error(self.pos, - "Unicode literals do not support coercion to C types other " - "than Py_UNICODE/Py_UCS4 (for characters) or Py_UNICODE* " - "(for strings).") - elif dst_type not in (py_object_type, Builtin.basestring_type): - self.check_for_coercion_error(dst_type, env, fail=True) - return self - - def can_coerce_to_char_literal(self): - return len(self.value) == 1 - ## or (len(self.value) == 2 - ## and (0xD800 <= self.value[0] <= 0xDBFF) - ## and (0xDC00 <= self.value[1] <= 0xDFFF)) - - def coerce_to_boolean(self, env): - bool_value = bool(self.value) - return BoolNode(self.pos, value=bool_value, constant_result=bool_value) - - def contains_surrogates(self): - return StringEncoding.string_contains_surrogates(self.value) - - def generate_evaluation_code(self, code): - if self.type.is_pyobject: - if self.contains_surrogates(): - # surrogates are not really portable and cannot be - # decoded by the UTF-8 codec in Py3.3 - self.result_code = code.get_py_const(py_object_type, 'ustring') - data_cname = code.get_pyunicode_ptr_const(self.value) - code = code.get_cached_constants_writer() - code.mark_pos(self.pos) - code.putln( - "%s = PyUnicode_FromUnicode(%s, (sizeof(%s) / sizeof(Py_UNICODE))-1); %s" % ( - self.result_code, - data_cname, - data_cname, - code.error_goto_if_null(self.result_code, self.pos))) - code.putln("#if CYTHON_PEP393_ENABLED") - code.put_error_if_neg( - self.pos, "PyUnicode_READY(%s)" % self.result_code) - code.putln("#endif") - else: - self.result_code = code.get_py_string_const(self.value) - else: - self.result_code = code.get_pyunicode_ptr_const(self.value) - - def calculate_result_code(self): - return self.result_code - - def compile_time_value(self, env): - return self.value - - -class StringNode(PyConstNode): - # A Python str object, i.e. a byte string in Python 2.x and a - # unicode string in Python 3.x - # - # value BytesLiteral (or EncodedString with ASCII content) - # unicode_value EncodedString or None - # is_identifier boolean - - type = str_type - is_string_literal = True - is_identifier = None - unicode_value = None - - def calculate_constant_result(self): - if self.unicode_value is not None: - # only the Unicode value is portable across Py2/3 - self.constant_result = self.unicode_value - - def as_sliced_node(self, start, stop, step=None): - value = type(self.value)(self.value[start:stop:step]) - value.encoding = self.value.encoding - if self.unicode_value is not None: - if StringEncoding.string_contains_surrogates(self.unicode_value[:stop]): - # this is unsafe as it may give different results in different runtimes - return None - unicode_value = StringEncoding.EncodedString( - self.unicode_value[start:stop:step]) - else: - unicode_value = None - return StringNode( - self.pos, value=value, unicode_value=unicode_value, - constant_result=value, is_identifier=self.is_identifier) - - def coerce_to(self, dst_type, env): - if dst_type is not py_object_type and not str_type.subtype_of(dst_type): -# if dst_type is Builtin.bytes_type: -# # special case: bytes = 'str literal' -# return BytesNode(self.pos, value=self.value) - if not dst_type.is_pyobject: - return BytesNode(self.pos, value=self.value).coerce_to(dst_type, env) - if dst_type is not Builtin.basestring_type: - self.check_for_coercion_error(dst_type, env, fail=True) - return self - - def can_coerce_to_char_literal(self): - return not self.is_identifier and len(self.value) == 1 - - def generate_evaluation_code(self, code): - self.result_code = code.get_py_string_const( - self.value, identifier=self.is_identifier, is_str=True, - unicode_value=self.unicode_value) - - def get_constant_c_result_code(self): - return None - - def calculate_result_code(self): - return self.result_code - - def compile_time_value(self, env): - return self.value - - -class IdentifierStringNode(StringNode): - # A special str value that represents an identifier (bytes in Py2, - # unicode in Py3). - is_identifier = True - - -class ImagNode(AtomicExprNode): - # Imaginary number literal - # - # value float imaginary part - - type = PyrexTypes.c_double_complex_type - - def calculate_constant_result(self): - self.constant_result = complex(0.0, self.value) - - def compile_time_value(self, denv): - return complex(0.0, self.value) - - def analyse_types(self, env): - self.type.create_declaration_utility_code(env) - return self - - def may_be_none(self): - return False - - def coerce_to(self, dst_type, env): - if self.type is dst_type: - return self - node = ImagNode(self.pos, value=self.value) - if dst_type.is_pyobject: - node.is_temp = 1 - node.type = PyrexTypes.py_object_type - # We still need to perform normal coerce_to processing on the - # result, because we might be coercing to an extension type, - # in which case a type test node will be needed. - return AtomicExprNode.coerce_to(node, dst_type, env) - - gil_message = "Constructing complex number" - - def calculate_result_code(self): - if self.type.is_pyobject: - return self.result() - else: - return "%s(0, %r)" % (self.type.from_parts, float(self.value)) - - def generate_result_code(self, code): - if self.type.is_pyobject: - code.putln( - "%s = PyComplex_FromDoubles(0.0, %r); %s" % ( - self.result(), - float(self.value), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class NewExprNode(AtomicExprNode): - - # C++ new statement - # - # cppclass node c++ class to create - - type = None - - def infer_type(self, env): - type = self.cppclass.analyse_as_type(env) - if type is None or not type.is_cpp_class: - error(self.pos, "new operator can only be applied to a C++ class") - self.type = error_type - return - self.cpp_check(env) - constructor = type.scope.lookup(u'') - if constructor is None: - func_type = PyrexTypes.CFuncType(type, [], exception_check='+') - type.scope.declare_cfunction(u'', func_type, self.pos) - constructor = type.scope.lookup(u'') - self.class_type = type - self.entry = constructor - self.type = constructor.type - return self.type - - def analyse_types(self, env): - if self.type is None: - self.infer_type(env) - return self - - def may_be_none(self): - return False - - def generate_result_code(self, code): - pass - - def calculate_result_code(self): - return "new " + self.class_type.declaration_code("") - - -class NameNode(AtomicExprNode): - # Reference to a local or global variable name. - # - # name string Python name of the variable - # entry Entry Symbol table entry - # type_entry Entry For extension type names, the original type entry - # cf_is_null boolean Is uninitialized before this node - # cf_maybe_null boolean Maybe uninitialized before this node - # allow_null boolean Don't raise UnboundLocalError - # nogil boolean Whether it is used in a nogil context - - is_name = True - is_cython_module = False - cython_attribute = None - lhs_of_first_assignment = False # TODO: remove me - is_used_as_rvalue = 0 - entry = None - type_entry = None - cf_maybe_null = True - cf_is_null = False - allow_null = False - nogil = False - inferred_type = None - - def as_cython_attribute(self): - return self.cython_attribute - - def type_dependencies(self, env): - if self.entry is None: - self.entry = env.lookup(self.name) - if self.entry is not None and self.entry.type.is_unspecified: - return (self,) - else: - return () - - def infer_type(self, env): - if self.entry is None: - self.entry = env.lookup(self.name) - if self.entry is None or self.entry.type is unspecified_type: - if self.inferred_type is not None: - return self.inferred_type - return py_object_type - elif (self.entry.type.is_extension_type or self.entry.type.is_builtin_type) and \ - self.name == self.entry.type.name: - # Unfortunately the type attribute of type objects - # is used for the pointer to the type they represent. - return type_type - elif self.entry.type.is_cfunction: - if self.entry.scope.is_builtin_scope: - # special case: optimised builtin functions must be treated as Python objects - return py_object_type - else: - # special case: referring to a C function must return its pointer - return PyrexTypes.CPtrType(self.entry.type) - else: - # If entry is inferred as pyobject it's safe to use local - # NameNode's inferred_type. - if self.entry.type.is_pyobject and self.inferred_type: - # Overflow may happen if integer - if not (self.inferred_type.is_int and self.entry.might_overflow): - return self.inferred_type - return self.entry.type - - def compile_time_value(self, denv): - try: - return denv.lookup(self.name) - except KeyError: - error(self.pos, "Compile-time name '%s' not defined" % self.name) - - def get_constant_c_result_code(self): - if not self.entry or self.entry.type.is_pyobject: - return None - return self.entry.cname - - def coerce_to(self, dst_type, env): - # If coercing to a generic pyobject and this is a builtin - # C function with a Python equivalent, manufacture a NameNode - # referring to the Python builtin. - #print "NameNode.coerce_to:", self.name, dst_type ### - if dst_type is py_object_type: - entry = self.entry - if entry and entry.is_cfunction: - var_entry = entry.as_variable - if var_entry: - if var_entry.is_builtin and var_entry.is_const: - var_entry = env.declare_builtin(var_entry.name, self.pos) - node = NameNode(self.pos, name = self.name) - node.entry = var_entry - node.analyse_rvalue_entry(env) - return node - - return super(NameNode, self).coerce_to(dst_type, env) - - def analyse_as_module(self, env): - # Try to interpret this as a reference to a cimported module. - # Returns the module scope, or None. - entry = self.entry - if not entry: - entry = env.lookup(self.name) - if entry and entry.as_module: - return entry.as_module - return None - - def analyse_as_type(self, env): - if self.cython_attribute: - type = PyrexTypes.parse_basic_type(self.cython_attribute) - else: - type = PyrexTypes.parse_basic_type(self.name) - if type: - return type - entry = self.entry - if not entry: - entry = env.lookup(self.name) - if entry and entry.is_type: - return entry.type - else: - return None - - def analyse_as_extension_type(self, env): - # Try to interpret this as a reference to an extension type. - # Returns the extension type, or None. - entry = self.entry - if not entry: - entry = env.lookup(self.name) - if entry and entry.is_type: - if entry.type.is_extension_type or entry.type.is_builtin_type: - return entry.type - return None - - def analyse_target_declaration(self, env): - if not self.entry: - self.entry = env.lookup_here(self.name) - if not self.entry: - if env.directives['warn.undeclared']: - warning(self.pos, "implicit declaration of '%s'" % self.name, 1) - if env.directives['infer_types'] != False: - type = unspecified_type - else: - type = py_object_type - self.entry = env.declare_var(self.name, type, self.pos) - if self.entry.is_declared_generic: - self.result_ctype = py_object_type - - def analyse_types(self, env): - self.initialized_check = env.directives['initializedcheck'] - if self.entry is None: - self.entry = env.lookup(self.name) - if not self.entry: - self.entry = env.declare_builtin(self.name, self.pos) - if not self.entry: - self.type = PyrexTypes.error_type - return self - entry = self.entry - if entry: - entry.used = 1 - if entry.type.is_buffer: - import Buffer - Buffer.used_buffer_aux_vars(entry) - self.analyse_rvalue_entry(env) - return self - - def analyse_target_types(self, env): - self.analyse_entry(env, is_target=True) - - if (not self.is_lvalue() and self.entry.is_cfunction and - self.entry.fused_cfunction and self.entry.as_variable): - # We need this for the fused 'def' TreeFragment - self.entry = self.entry.as_variable - self.type = self.entry.type - - if self.type.is_const: - error(self.pos, "Assignment to const '%s'" % self.name) - if self.type.is_reference: - error(self.pos, "Assignment to reference '%s'" % self.name) - if not self.is_lvalue(): - error(self.pos, "Assignment to non-lvalue '%s'" - % self.name) - self.type = PyrexTypes.error_type - self.entry.used = 1 - if self.entry.type.is_buffer: - import Buffer - Buffer.used_buffer_aux_vars(self.entry) - return self - - def analyse_rvalue_entry(self, env): - #print "NameNode.analyse_rvalue_entry:", self.name ### - #print "Entry:", self.entry.__dict__ ### - self.analyse_entry(env) - entry = self.entry - - if entry.is_declared_generic: - self.result_ctype = py_object_type - - if entry.is_pyglobal or entry.is_builtin: - if entry.is_builtin and entry.is_const: - self.is_temp = 0 - else: - self.is_temp = 1 - - self.is_used_as_rvalue = 1 - elif entry.type.is_memoryviewslice: - self.is_temp = False - self.is_used_as_rvalue = True - self.use_managed_ref = True - return self - - def nogil_check(self, env): - self.nogil = True - if self.is_used_as_rvalue: - entry = self.entry - if entry.is_builtin: - if not entry.is_const: # cached builtins are ok - self.gil_error() - elif entry.is_pyglobal: - self.gil_error() - elif self.entry.type.is_memoryviewslice: - if self.cf_is_null or self.cf_maybe_null: - import MemoryView - MemoryView.err_if_nogil_initialized_check(self.pos, env) - - gil_message = "Accessing Python global or builtin" - - def analyse_entry(self, env, is_target=False): - #print "NameNode.analyse_entry:", self.name ### - self.check_identifier_kind() - entry = self.entry - type = entry.type - if (not is_target and type.is_pyobject and self.inferred_type and - self.inferred_type.is_builtin_type): - # assume that type inference is smarter than the static entry - type = self.inferred_type - self.type = type - - def check_identifier_kind(self): - # Check that this is an appropriate kind of name for use in an - # expression. Also finds the variable entry associated with - # an extension type. - entry = self.entry - if entry.is_type and entry.type.is_extension_type: - self.type_entry = entry - if not (entry.is_const or entry.is_variable - or entry.is_builtin or entry.is_cfunction - or entry.is_cpp_class): - if self.entry.as_variable: - self.entry = self.entry.as_variable - else: - error(self.pos, - "'%s' is not a constant, variable or function identifier" % self.name) - - def is_simple(self): - # If it's not a C variable, it'll be in a temp. - return 1 - - def may_be_none(self): - if self.cf_state and self.type and (self.type.is_pyobject or - self.type.is_memoryviewslice): - # gard against infinite recursion on self-dependencies - if getattr(self, '_none_checking', False): - # self-dependency - either this node receives a None - # value from *another* node, or it can not reference - # None at this point => safe to assume "not None" - return False - self._none_checking = True - # evaluate control flow state to see if there were any - # potential None values assigned to the node so far - may_be_none = False - for assignment in self.cf_state: - if assignment.rhs.may_be_none(): - may_be_none = True - break - del self._none_checking - return may_be_none - return super(NameNode, self).may_be_none() - - def nonlocally_immutable(self): - if ExprNode.nonlocally_immutable(self): - return True - entry = self.entry - if not entry or entry.in_closure: - return False - return entry.is_local or entry.is_arg or entry.is_builtin or entry.is_readonly - - def calculate_target_results(self, env): - pass - - def check_const(self): - entry = self.entry - if entry is not None and not (entry.is_const or entry.is_cfunction or entry.is_builtin): - self.not_const() - return False - return True - - def check_const_addr(self): - entry = self.entry - if not (entry.is_cglobal or entry.is_cfunction or entry.is_builtin): - self.addr_not_const() - return False - return True - - def is_lvalue(self): - return self.entry.is_variable and \ - not self.entry.type.is_array and \ - not self.entry.is_readonly - - def is_addressable(self): - return self.entry.is_variable and not self.type.is_memoryviewslice - - def is_ephemeral(self): - # Name nodes are never ephemeral, even if the - # result is in a temporary. - return 0 - - def calculate_result_code(self): - entry = self.entry - if not entry: - return "" # There was an error earlier - return entry.cname - - def generate_result_code(self, code): - assert hasattr(self, 'entry') - entry = self.entry - if entry is None: - return # There was an error earlier - if entry.is_builtin and entry.is_const: - return # Lookup already cached - elif entry.is_pyclass_attr: - assert entry.type.is_pyobject, "Python global or builtin not a Python object" - interned_cname = code.intern_identifier(self.entry.name) - if entry.is_builtin: - namespace = Naming.builtins_cname - else: # entry.is_pyglobal - namespace = entry.scope.namespace_cname - if not self.cf_is_null: - code.putln( - '%s = PyObject_GetItem(%s, %s);' % ( - self.result(), - namespace, - interned_cname)) - code.putln('if (unlikely(!%s)) {' % self.result()) - code.putln('PyErr_Clear();') - code.globalstate.use_utility_code( - UtilityCode.load_cached("GetModuleGlobalName", "ObjectHandling.c")) - code.putln( - '%s = __Pyx_GetModuleGlobalName(%s);' % ( - self.result(), - interned_cname)) - if not self.cf_is_null: - code.putln("}") - code.putln(code.error_goto_if_null(self.result(), self.pos)) - code.put_gotref(self.py_result()) - - elif entry.is_builtin: - assert entry.type.is_pyobject, "Python global or builtin not a Python object" - interned_cname = code.intern_identifier(self.entry.name) - code.globalstate.use_utility_code( - UtilityCode.load_cached("GetBuiltinName", "ObjectHandling.c")) - code.putln( - '%s = __Pyx_GetBuiltinName(%s); %s' % ( - self.result(), - interned_cname, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - elif entry.is_pyglobal: - assert entry.type.is_pyobject, "Python global or builtin not a Python object" - interned_cname = code.intern_identifier(self.entry.name) - if entry.scope.is_module_scope: - code.globalstate.use_utility_code( - UtilityCode.load_cached("GetModuleGlobalName", "ObjectHandling.c")) - code.putln( - '%s = __Pyx_GetModuleGlobalName(%s); %s' % ( - self.result(), - interned_cname, - code.error_goto_if_null(self.result(), self.pos))) - else: - # FIXME: is_pyglobal is also used for class namespace - code.globalstate.use_utility_code( - UtilityCode.load_cached("GetNameInClass", "ObjectHandling.c")) - code.putln( - '%s = __Pyx_GetNameInClass(%s, %s); %s' % ( - self.result(), - entry.scope.namespace_cname, - interned_cname, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - elif entry.is_local or entry.in_closure or entry.from_closure or entry.type.is_memoryviewslice: - # Raise UnboundLocalError for objects and memoryviewslices - raise_unbound = ( - (self.cf_maybe_null or self.cf_is_null) and not self.allow_null) - null_code = entry.type.check_for_null_code(entry.cname) - - memslice_check = entry.type.is_memoryviewslice and self.initialized_check - - if null_code and raise_unbound and (entry.type.is_pyobject or memslice_check): - code.put_error_if_unbound(self.pos, entry, self.in_nogil_context) - - def generate_assignment_code(self, rhs, code): - #print "NameNode.generate_assignment_code:", self.name ### - entry = self.entry - if entry is None: - return # There was an error earlier - - if (self.entry.type.is_ptr and isinstance(rhs, ListNode) - and not self.lhs_of_first_assignment and not rhs.in_module_scope): - error(self.pos, "Literal list must be assigned to pointer at time of declaration") - - # is_pyglobal seems to be True for module level-globals only. - # We use this to access class->tp_dict if necessary. - if entry.is_pyglobal: - assert entry.type.is_pyobject, "Python global or builtin not a Python object" - interned_cname = code.intern_identifier(self.entry.name) - namespace = self.entry.scope.namespace_cname - if entry.is_member: - # if the entry is a member we have to cheat: SetAttr does not work - # on types, so we create a descriptor which is then added to tp_dict - setter = 'PyDict_SetItem' - namespace = '%s->tp_dict' % namespace - elif entry.scope.is_module_scope: - setter = 'PyDict_SetItem' - namespace = Naming.moddict_cname - elif entry.is_pyclass_attr: - setter = 'PyObject_SetItem' - else: - assert False, repr(entry) - code.put_error_if_neg( - self.pos, - '%s(%s, %s, %s)' % ( - setter, - namespace, - interned_cname, - rhs.py_result())) - if debug_disposal_code: - print("NameNode.generate_assignment_code:") - print("...generating disposal code for %s" % rhs) - rhs.generate_disposal_code(code) - rhs.free_temps(code) - if entry.is_member: - # in Py2.6+, we need to invalidate the method cache - code.putln("PyType_Modified(%s);" % - entry.scope.parent_type.typeptr_cname) - else: - if self.type.is_memoryviewslice: - self.generate_acquire_memoryviewslice(rhs, code) - - elif self.type.is_buffer: - # Generate code for doing the buffer release/acquisition. - # This might raise an exception in which case the assignment (done - # below) will not happen. - # - # The reason this is not in a typetest-like node is because the - # variables that the acquired buffer info is stored to is allocated - # per entry and coupled with it. - self.generate_acquire_buffer(rhs, code) - assigned = False - if self.type.is_pyobject: - #print "NameNode.generate_assignment_code: to", self.name ### - #print "...from", rhs ### - #print "...LHS type", self.type, "ctype", self.ctype() ### - #print "...RHS type", rhs.type, "ctype", rhs.ctype() ### - if self.use_managed_ref: - rhs.make_owned_reference(code) - is_external_ref = entry.is_cglobal or self.entry.in_closure or self.entry.from_closure - if is_external_ref: - if not self.cf_is_null: - if self.cf_maybe_null: - code.put_xgotref(self.py_result()) - else: - code.put_gotref(self.py_result()) - assigned = True - if entry.is_cglobal: - code.put_decref_set( - self.result(), rhs.result_as(self.ctype())) - else: - if not self.cf_is_null: - if self.cf_maybe_null: - code.put_xdecref_set( - self.result(), rhs.result_as(self.ctype())) - else: - code.put_decref_set( - self.result(), rhs.result_as(self.ctype())) - else: - assigned = False - if is_external_ref: - code.put_giveref(rhs.py_result()) - if not self.type.is_memoryviewslice: - if not assigned: - code.putln('%s = %s;' % ( - self.result(), rhs.result_as(self.ctype()))) - if debug_disposal_code: - print("NameNode.generate_assignment_code:") - print("...generating post-assignment code for %s" % rhs) - rhs.generate_post_assignment_code(code) - elif rhs.result_in_temp(): - rhs.generate_post_assignment_code(code) - - rhs.free_temps(code) - - def generate_acquire_memoryviewslice(self, rhs, code): - """ - Slices, coercions from objects, return values etc are new references. - We have a borrowed reference in case of dst = src - """ - import MemoryView - - MemoryView.put_acquire_memoryviewslice( - lhs_cname=self.result(), - lhs_type=self.type, - lhs_pos=self.pos, - rhs=rhs, - code=code, - have_gil=not self.in_nogil_context, - first_assignment=self.cf_is_null) - - def generate_acquire_buffer(self, rhs, code): - # rhstmp is only used in case the rhs is a complicated expression leading to - # the object, to avoid repeating the same C expression for every reference - # to the rhs. It does NOT hold a reference. - pretty_rhs = isinstance(rhs, NameNode) or rhs.is_temp - if pretty_rhs: - rhstmp = rhs.result_as(self.ctype()) - else: - rhstmp = code.funcstate.allocate_temp(self.entry.type, manage_ref=False) - code.putln('%s = %s;' % (rhstmp, rhs.result_as(self.ctype()))) - - import Buffer - Buffer.put_assign_to_buffer(self.result(), rhstmp, self.entry, - is_initialized=not self.lhs_of_first_assignment, - pos=self.pos, code=code) - - if not pretty_rhs: - code.putln("%s = 0;" % rhstmp) - code.funcstate.release_temp(rhstmp) - - def generate_deletion_code(self, code, ignore_nonexisting=False): - if self.entry is None: - return # There was an error earlier - elif self.entry.is_pyclass_attr: - namespace = self.entry.scope.namespace_cname - interned_cname = code.intern_identifier(self.entry.name) - if ignore_nonexisting: - key_error_code = 'PyErr_Clear(); else' - else: - # minor hack: fake a NameError on KeyError - key_error_code = ( - '{ PyErr_Clear(); PyErr_Format(PyExc_NameError, "name \'%%s\' is not defined", "%s"); }' % - self.entry.name) - code.putln( - 'if (unlikely(PyObject_DelItem(%s, %s) < 0)) {' - ' if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) %s' - ' %s ' - '}' % (namespace, interned_cname, - key_error_code, - code.error_goto(self.pos))) - elif self.entry.is_pyglobal: - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyObjectSetAttrStr", "ObjectHandling.c")) - interned_cname = code.intern_identifier(self.entry.name) - del_code = '__Pyx_PyObject_DelAttrStr(%s, %s)' % ( - Naming.module_cname, interned_cname) - if ignore_nonexisting: - code.putln('if (unlikely(%s < 0)) { if (likely(PyErr_ExceptionMatches(PyExc_AttributeError))) PyErr_Clear(); else %s }' % ( - del_code, - code.error_goto(self.pos))) - else: - code.put_error_if_neg(self.pos, del_code) - elif self.entry.type.is_pyobject or self.entry.type.is_memoryviewslice: - if not self.cf_is_null: - if self.cf_maybe_null and not ignore_nonexisting: - code.put_error_if_unbound(self.pos, self.entry) - - if self.entry.type.is_pyobject: - if self.entry.in_closure: - # generator - if ignore_nonexisting and self.cf_maybe_null: - code.put_xgotref(self.result()) - else: - code.put_gotref(self.result()) - if ignore_nonexisting and self.cf_maybe_null: - code.put_xdecref(self.result(), self.ctype()) - else: - code.put_decref(self.result(), self.ctype()) - code.putln('%s = NULL;' % self.result()) - else: - code.put_xdecref_memoryviewslice(self.entry.cname, - have_gil=not self.nogil) - else: - error(self.pos, "Deletion of C names not supported") - - def annotate(self, code): - if hasattr(self, 'is_called') and self.is_called: - pos = (self.pos[0], self.pos[1], self.pos[2] - len(self.name) - 1) - if self.type.is_pyobject: - style, text = 'py_call', 'python function (%s)' - else: - style, text = 'c_call', 'c function (%s)' - code.annotate(pos, AnnotationItem(style, text % self.type, size=len(self.name))) - -class BackquoteNode(ExprNode): - # `expr` - # - # arg ExprNode - - type = py_object_type - - subexprs = ['arg'] - - def analyse_types(self, env): - self.arg = self.arg.analyse_types(env) - self.arg = self.arg.coerce_to_pyobject(env) - self.is_temp = 1 - return self - - gil_message = "Backquote expression" - - def calculate_constant_result(self): - self.constant_result = repr(self.arg.constant_result) - - def generate_result_code(self, code): - code.putln( - "%s = PyObject_Repr(%s); %s" % ( - self.result(), - self.arg.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class ImportNode(ExprNode): - # Used as part of import statement implementation. - # Implements result = - # __import__(module_name, globals(), None, name_list, level) - # - # module_name StringNode dotted name of module. Empty module - # name means importing the parent package according - # to level - # name_list ListNode or None list of names to be imported - # level int relative import level: - # -1: attempt both relative import and absolute import; - # 0: absolute import; - # >0: the number of parent directories to search - # relative to the current module. - # None: decide the level according to language level and - # directives - - type = py_object_type - - subexprs = ['module_name', 'name_list'] - - def analyse_types(self, env): - if self.level is None: - if (env.directives['py2_import'] or - Future.absolute_import not in env.global_scope().context.future_directives): - self.level = -1 - else: - self.level = 0 - module_name = self.module_name.analyse_types(env) - self.module_name = module_name.coerce_to_pyobject(env) - if self.name_list: - name_list = self.name_list.analyse_types(env) - self.name_list = name_list.coerce_to_pyobject(env) - self.is_temp = 1 - env.use_utility_code(UtilityCode.load_cached("Import", "ImportExport.c")) - return self - - gil_message = "Python import" - - def generate_result_code(self, code): - if self.name_list: - name_list_code = self.name_list.py_result() - else: - name_list_code = "0" - code.putln( - "%s = __Pyx_Import(%s, %s, %d); %s" % ( - self.result(), - self.module_name.py_result(), - name_list_code, - self.level, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class IteratorNode(ExprNode): - # Used as part of for statement implementation. - # - # Implements result = iter(sequence) - # - # sequence ExprNode - - type = py_object_type - iter_func_ptr = None - counter_cname = None - cpp_iterator_cname = None - reversed = False # currently only used for list/tuple types (see Optimize.py) - - subexprs = ['sequence'] - - def analyse_types(self, env): - self.sequence = self.sequence.analyse_types(env) - if (self.sequence.type.is_array or self.sequence.type.is_ptr) and \ - not self.sequence.type.is_string: - # C array iteration will be transformed later on - self.type = self.sequence.type - elif self.sequence.type.is_cpp_class: - self.analyse_cpp_types(env) - else: - self.sequence = self.sequence.coerce_to_pyobject(env) - if self.sequence.type is list_type or \ - self.sequence.type is tuple_type: - self.sequence = self.sequence.as_none_safe_node("'NoneType' object is not iterable") - self.is_temp = 1 - return self - - gil_message = "Iterating over Python object" - - _func_iternext_type = PyrexTypes.CPtrType(PyrexTypes.CFuncType( - PyrexTypes.py_object_type, [ - PyrexTypes.CFuncTypeArg("it", PyrexTypes.py_object_type, None), - ])) - - def type_dependencies(self, env): - return self.sequence.type_dependencies(env) - - def infer_type(self, env): - sequence_type = self.sequence.infer_type(env) - if sequence_type.is_array or sequence_type.is_ptr: - return sequence_type - elif sequence_type.is_cpp_class: - begin = sequence_type.scope.lookup("begin") - if begin is not None: - return begin.type.return_type - elif sequence_type.is_pyobject: - return sequence_type - return py_object_type - - def analyse_cpp_types(self, env): - sequence_type = self.sequence.type - if sequence_type.is_ptr: - sequence_type = sequence_type.base_type - begin = sequence_type.scope.lookup("begin") - end = sequence_type.scope.lookup("end") - if (begin is None - or not begin.type.is_cfunction - or begin.type.args): - error(self.pos, "missing begin() on %s" % self.sequence.type) - self.type = error_type - return - if (end is None - or not end.type.is_cfunction - or end.type.args): - error(self.pos, "missing end() on %s" % self.sequence.type) - self.type = error_type - return - iter_type = begin.type.return_type - if iter_type.is_cpp_class: - if env.lookup_operator_for_types( - self.pos, - "!=", - [iter_type, end.type.return_type]) is None: - error(self.pos, "missing operator!= on result of begin() on %s" % self.sequence.type) - self.type = error_type - return - if env.lookup_operator_for_types(self.pos, '++', [iter_type]) is None: - error(self.pos, "missing operator++ on result of begin() on %s" % self.sequence.type) - self.type = error_type - return - if env.lookup_operator_for_types(self.pos, '*', [iter_type]) is None: - error(self.pos, "missing operator* on result of begin() on %s" % self.sequence.type) - self.type = error_type - return - self.type = iter_type - elif iter_type.is_ptr: - if not (iter_type == end.type.return_type): - error(self.pos, "incompatible types for begin() and end()") - self.type = iter_type - else: - error(self.pos, "result type of begin() on %s must be a C++ class or pointer" % self.sequence.type) - self.type = error_type - return - - def generate_result_code(self, code): - sequence_type = self.sequence.type - if sequence_type.is_cpp_class: - if self.sequence.is_name: - # safe: C++ won't allow you to reassign to class references - begin_func = "%s.begin" % self.sequence.result() - else: - sequence_type = PyrexTypes.c_ptr_type(sequence_type) - self.cpp_iterator_cname = code.funcstate.allocate_temp(sequence_type, manage_ref=False) - code.putln("%s = &%s;" % (self.cpp_iterator_cname, self.sequence.result())) - begin_func = "%s->begin" % self.cpp_iterator_cname - # TODO: Limit scope. - code.putln("%s = %s();" % (self.result(), begin_func)) - return - if sequence_type.is_array or sequence_type.is_ptr: - raise InternalError("for in carray slice not transformed") - is_builtin_sequence = sequence_type is list_type or \ - sequence_type is tuple_type - if not is_builtin_sequence: - # reversed() not currently optimised (see Optimize.py) - assert not self.reversed, "internal error: reversed() only implemented for list/tuple objects" - self.may_be_a_sequence = not sequence_type.is_builtin_type - if self.may_be_a_sequence: - code.putln( - "if (PyList_CheckExact(%s) || PyTuple_CheckExact(%s)) {" % ( - self.sequence.py_result(), - self.sequence.py_result())) - if is_builtin_sequence or self.may_be_a_sequence: - self.counter_cname = code.funcstate.allocate_temp( - PyrexTypes.c_py_ssize_t_type, manage_ref=False) - if self.reversed: - if sequence_type is list_type: - init_value = 'PyList_GET_SIZE(%s) - 1' % self.result() - else: - init_value = 'PyTuple_GET_SIZE(%s) - 1' % self.result() - else: - init_value = '0' - code.putln( - "%s = %s; __Pyx_INCREF(%s); %s = %s;" % ( - self.result(), - self.sequence.py_result(), - self.result(), - self.counter_cname, - init_value - )) - if not is_builtin_sequence: - self.iter_func_ptr = code.funcstate.allocate_temp(self._func_iternext_type, manage_ref=False) - if self.may_be_a_sequence: - code.putln("%s = NULL;" % self.iter_func_ptr) - code.putln("} else {") - code.put("%s = -1; " % self.counter_cname) - code.putln("%s = PyObject_GetIter(%s); %s" % ( - self.result(), - self.sequence.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - code.putln("%s = Py_TYPE(%s)->tp_iternext;" % (self.iter_func_ptr, self.py_result())) - if self.may_be_a_sequence: - code.putln("}") - - def generate_next_sequence_item(self, test_name, result_name, code): - assert self.counter_cname, "internal error: counter_cname temp not prepared" - final_size = 'Py%s_GET_SIZE(%s)' % (test_name, self.py_result()) - if self.sequence.is_sequence_constructor: - item_count = len(self.sequence.args) - if self.sequence.mult_factor is None: - final_size = item_count - elif isinstance(self.sequence.mult_factor.constant_result, (int, long)): - final_size = item_count * self.sequence.mult_factor.constant_result - code.putln("if (%s >= %s) break;" % (self.counter_cname, final_size)) - if self.reversed: - inc_dec = '--' - else: - inc_dec = '++' - code.putln("#if CYTHON_COMPILING_IN_CPYTHON") - code.putln( - "%s = Py%s_GET_ITEM(%s, %s); __Pyx_INCREF(%s); %s%s; %s" % ( - result_name, - test_name, - self.py_result(), - self.counter_cname, - result_name, - self.counter_cname, - inc_dec, - # use the error label to avoid C compiler warnings if we only use it below - code.error_goto_if_neg('0', self.pos) - )) - code.putln("#else") - code.putln( - "%s = PySequence_ITEM(%s, %s); %s%s; %s" % ( - result_name, - self.py_result(), - self.counter_cname, - self.counter_cname, - inc_dec, - code.error_goto_if_null(result_name, self.pos))) - code.putln("#endif") - - def generate_iter_next_result_code(self, result_name, code): - sequence_type = self.sequence.type - if self.reversed: - code.putln("if (%s < 0) break;" % self.counter_cname) - if sequence_type.is_cpp_class: - if self.cpp_iterator_cname: - end_func = "%s->end" % self.cpp_iterator_cname - else: - end_func = "%s.end" % self.sequence.result() - # TODO: Cache end() call? - code.putln("if (!(%s != %s())) break;" % ( - self.result(), - end_func)) - code.putln("%s = *%s;" % ( - result_name, - self.result())) - code.putln("++%s;" % self.result()) - return - elif sequence_type is list_type: - self.generate_next_sequence_item('List', result_name, code) - return - elif sequence_type is tuple_type: - self.generate_next_sequence_item('Tuple', result_name, code) - return - - if self.may_be_a_sequence: - for test_name in ('List', 'Tuple'): - code.putln("if (!%s && Py%s_CheckExact(%s)) {" % ( - self.iter_func_ptr, test_name, self.py_result())) - self.generate_next_sequence_item(test_name, result_name, code) - code.put("} else ") - - code.putln("{") - code.putln( - "%s = %s(%s);" % ( - result_name, - self.iter_func_ptr, - self.py_result())) - code.putln("if (unlikely(!%s)) {" % result_name) - code.putln("PyObject* exc_type = PyErr_Occurred();") - code.putln("if (exc_type) {") - code.putln("if (likely(exc_type == PyExc_StopIteration ||" - " PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();") - code.putln("else %s" % code.error_goto(self.pos)) - code.putln("}") - code.putln("break;") - code.putln("}") - code.put_gotref(result_name) - code.putln("}") - - def free_temps(self, code): - if self.counter_cname: - code.funcstate.release_temp(self.counter_cname) - if self.iter_func_ptr: - code.funcstate.release_temp(self.iter_func_ptr) - self.iter_func_ptr = None - if self.cpp_iterator_cname: - code.funcstate.release_temp(self.cpp_iterator_cname) - ExprNode.free_temps(self, code) - - -class NextNode(AtomicExprNode): - # Used as part of for statement implementation. - # Implements result = iterator.next() - # Created during analyse_types phase. - # The iterator is not owned by this node. - # - # iterator IteratorNode - - def __init__(self, iterator): - AtomicExprNode.__init__(self, iterator.pos) - self.iterator = iterator - - def type_dependencies(self, env): - return self.iterator.type_dependencies(env) - - def infer_type(self, env, iterator_type = None): - if iterator_type is None: - iterator_type = self.iterator.infer_type(env) - if iterator_type.is_ptr or iterator_type.is_array: - return iterator_type.base_type - elif iterator_type.is_cpp_class: - item_type = env.lookup_operator_for_types(self.pos, "*", [iterator_type]).type.return_type - if item_type.is_reference: - item_type = item_type.ref_base_type - if item_type.is_const: - item_type = item_type.const_base_type - return item_type - else: - # Avoid duplication of complicated logic. - fake_index_node = IndexNode( - self.pos, - base=self.iterator.sequence, - index=IntNode(self.pos, value='PY_SSIZE_T_MAX', - type=PyrexTypes.c_py_ssize_t_type)) - return fake_index_node.infer_type(env) - - def analyse_types(self, env): - self.type = self.infer_type(env, self.iterator.type) - self.is_temp = 1 - return self - - def generate_result_code(self, code): - self.iterator.generate_iter_next_result_code(self.result(), code) - - -class WithExitCallNode(ExprNode): - # The __exit__() call of a 'with' statement. Used in both the - # except and finally clauses. - - # with_stat WithStatNode the surrounding 'with' statement - # args TupleNode or ResultStatNode the exception info tuple - - subexprs = ['args'] - test_if_run = True - - def analyse_types(self, env): - self.args = self.args.analyse_types(env) - self.type = PyrexTypes.c_bint_type - self.is_temp = True - return self - - def generate_evaluation_code(self, code): - if self.test_if_run: - # call only if it was not already called (and decref-cleared) - code.putln("if (%s) {" % self.with_stat.exit_var) - - self.args.generate_evaluation_code(code) - result_var = code.funcstate.allocate_temp(py_object_type, manage_ref=False) - - code.mark_pos(self.pos) - code.globalstate.use_utility_code(UtilityCode.load_cached( - "PyObjectCall", "ObjectHandling.c")) - code.putln("%s = __Pyx_PyObject_Call(%s, %s, NULL);" % ( - result_var, - self.with_stat.exit_var, - self.args.result())) - code.put_decref_clear(self.with_stat.exit_var, type=py_object_type) - self.args.generate_disposal_code(code) - self.args.free_temps(code) - - code.putln(code.error_goto_if_null(result_var, self.pos)) - code.put_gotref(result_var) - if self.result_is_used: - self.allocate_temp_result(code) - code.putln("%s = __Pyx_PyObject_IsTrue(%s);" % (self.result(), result_var)) - code.put_decref_clear(result_var, type=py_object_type) - if self.result_is_used: - code.put_error_if_neg(self.pos, self.result()) - code.funcstate.release_temp(result_var) - if self.test_if_run: - code.putln("}") - - -class ExcValueNode(AtomicExprNode): - # Node created during analyse_types phase - # of an ExceptClauseNode to fetch the current - # exception value. - - type = py_object_type - - def __init__(self, pos): - ExprNode.__init__(self, pos) - - def set_var(self, var): - self.var = var - - def calculate_result_code(self): - return self.var - - def generate_result_code(self, code): - pass - - def analyse_types(self, env): - return self - - -class TempNode(ExprNode): - # Node created during analyse_types phase - # of some nodes to hold a temporary value. - # - # Note: One must call "allocate" and "release" on - # the node during code generation to get/release the temp. - # This is because the temp result is often used outside of - # the regular cycle. - - subexprs = [] - - def __init__(self, pos, type, env=None): - ExprNode.__init__(self, pos) - self.type = type - if type.is_pyobject: - self.result_ctype = py_object_type - self.is_temp = 1 - - def analyse_types(self, env): - return self - - def analyse_target_declaration(self, env): - pass - - def generate_result_code(self, code): - pass - - def allocate(self, code): - self.temp_cname = code.funcstate.allocate_temp(self.type, manage_ref=True) - - def release(self, code): - code.funcstate.release_temp(self.temp_cname) - self.temp_cname = None - - def result(self): - try: - return self.temp_cname - except: - assert False, "Remember to call allocate/release on TempNode" - raise - - # Do not participate in normal temp alloc/dealloc: - def allocate_temp_result(self, code): - pass - - def release_temp_result(self, code): - pass - -class PyTempNode(TempNode): - # TempNode holding a Python value. - - def __init__(self, pos, env): - TempNode.__init__(self, pos, PyrexTypes.py_object_type, env) - -class RawCNameExprNode(ExprNode): - subexprs = [] - - def __init__(self, pos, type=None, cname=None): - ExprNode.__init__(self, pos, type=type) - if cname is not None: - self.cname = cname - - def analyse_types(self, env): - return self - - def set_cname(self, cname): - self.cname = cname - - def result(self): - return self.cname - - def generate_result_code(self, code): - pass - - -#------------------------------------------------------------------- -# -# Parallel nodes (cython.parallel.thread(savailable|id)) -# -#------------------------------------------------------------------- - -class ParallelThreadsAvailableNode(AtomicExprNode): - """ - Note: this is disabled and not a valid directive at this moment - - Implements cython.parallel.threadsavailable(). If we are called from the - sequential part of the application, we need to call omp_get_max_threads(), - and in the parallel part we can just call omp_get_num_threads() - """ - - type = PyrexTypes.c_int_type - - def analyse_types(self, env): - self.is_temp = True - # env.add_include_file("omp.h") - return self - - def generate_result_code(self, code): - code.putln("#ifdef _OPENMP") - code.putln("if (omp_in_parallel()) %s = omp_get_max_threads();" % - self.temp_code) - code.putln("else %s = omp_get_num_threads();" % self.temp_code) - code.putln("#else") - code.putln("%s = 1;" % self.temp_code) - code.putln("#endif") - - def result(self): - return self.temp_code - - -class ParallelThreadIdNode(AtomicExprNode): #, Nodes.ParallelNode): - """ - Implements cython.parallel.threadid() - """ - - type = PyrexTypes.c_int_type - - def analyse_types(self, env): - self.is_temp = True - # env.add_include_file("omp.h") - return self - - def generate_result_code(self, code): - code.putln("#ifdef _OPENMP") - code.putln("%s = omp_get_thread_num();" % self.temp_code) - code.putln("#else") - code.putln("%s = 0;" % self.temp_code) - code.putln("#endif") - - def result(self): - return self.temp_code - - -#------------------------------------------------------------------- -# -# Trailer nodes -# -#------------------------------------------------------------------- - -class IndexNode(ExprNode): - # Sequence indexing. - # - # base ExprNode - # index ExprNode - # indices [ExprNode] - # type_indices [PyrexType] - # is_buffer_access boolean Whether this is a buffer access. - # - # indices is used on buffer access, index on non-buffer access. - # The former contains a clean list of index parameters, the - # latter whatever Python object is needed for index access. - # - # is_fused_index boolean Whether the index is used to specialize a - # c(p)def function - - subexprs = ['base', 'index', 'indices'] - indices = None - type_indices = None - - is_subscript = True - is_fused_index = False - - # Whether we're assigning to a buffer (in that case it needs to be - # writable) - writable_needed = False - - # Whether we are indexing or slicing a memoryviewslice - memslice_index = False - memslice_slice = False - is_memslice_copy = False - memslice_ellipsis_noop = False - warned_untyped_idx = False - # set by SingleAssignmentNode after analyse_types() - is_memslice_scalar_assignment = False - - def __init__(self, pos, index, **kw): - ExprNode.__init__(self, pos, index=index, **kw) - self._index = index - - def calculate_constant_result(self): - self.constant_result = \ - self.base.constant_result[self.index.constant_result] - - def compile_time_value(self, denv): - base = self.base.compile_time_value(denv) - index = self.index.compile_time_value(denv) - try: - return base[index] - except Exception, e: - self.compile_time_value_error(e) - - def is_ephemeral(self): - return self.base.is_ephemeral() - - def is_simple(self): - if self.is_buffer_access or self.memslice_index: - return False - elif self.memslice_slice: - return True - - base = self.base - return (base.is_simple() and self.index.is_simple() - and base.type and (base.type.is_ptr or base.type.is_array)) - - def may_be_none(self): - base_type = self.base.type - if base_type: - if base_type.is_string: - return False - if isinstance(self.index, SliceNode): - # slicing! - if base_type in (bytes_type, str_type, unicode_type, - basestring_type, list_type, tuple_type): - return False - return ExprNode.may_be_none(self) - - def analyse_target_declaration(self, env): - pass - - def analyse_as_type(self, env): - base_type = self.base.analyse_as_type(env) - if base_type and not base_type.is_pyobject: - if base_type.is_cpp_class: - if isinstance(self.index, TupleNode): - template_values = self.index.args - else: - template_values = [self.index] - import Nodes - type_node = Nodes.TemplatedTypeNode( - pos = self.pos, - positional_args = template_values, - keyword_args = None) - return type_node.analyse(env, base_type = base_type) - else: - index = self.index.compile_time_value(env) - if index is not None: - return PyrexTypes.CArrayType(base_type, int(index)) - error(self.pos, "Array size must be a compile time constant") - return None - - def type_dependencies(self, env): - return self.base.type_dependencies(env) + self.index.type_dependencies(env) - - def infer_type(self, env): - base_type = self.base.infer_type(env) - if isinstance(self.index, SliceNode): - # slicing! - if base_type.is_string: - # sliced C strings must coerce to Python - return bytes_type - elif base_type.is_pyunicode_ptr: - # sliced Py_UNICODE* strings must coerce to Python - return unicode_type - elif base_type in (unicode_type, bytes_type, str_type, - bytearray_type, list_type, tuple_type): - # slicing these returns the same type - return base_type - else: - # TODO: Handle buffers (hopefully without too much redundancy). - return py_object_type - - index_type = self.index.infer_type(env) - if index_type and index_type.is_int or isinstance(self.index, IntNode): - # indexing! - if base_type is unicode_type: - # Py_UCS4 will automatically coerce to a unicode string - # if required, so this is safe. We only infer Py_UCS4 - # when the index is a C integer type. Otherwise, we may - # need to use normal Python item access, in which case - # it's faster to return the one-char unicode string than - # to receive it, throw it away, and potentially rebuild it - # on a subsequent PyObject coercion. - return PyrexTypes.c_py_ucs4_type - elif base_type is str_type: - # always returns str - Py2: bytes, Py3: unicode - return base_type - elif base_type is bytearray_type: - return PyrexTypes.c_uchar_type - elif isinstance(self.base, BytesNode): - #if env.global_scope().context.language_level >= 3: - # # inferring 'char' can be made to work in Python 3 mode - # return PyrexTypes.c_char_type - # Py2/3 return different types on indexing bytes objects - return py_object_type - elif base_type in (tuple_type, list_type): - # if base is a literal, take a look at its values - item_type = infer_sequence_item_type( - env, self.base, self.index, seq_type=base_type) - if item_type is not None: - return item_type - elif base_type.is_ptr or base_type.is_array: - return base_type.base_type - - if base_type.is_cpp_class: - class FakeOperand: - def __init__(self, **kwds): - self.__dict__.update(kwds) - operands = [ - FakeOperand(pos=self.pos, type=base_type), - FakeOperand(pos=self.pos, type=index_type), - ] - index_func = env.lookup_operator('[]', operands) - if index_func is not None: - return index_func.type.return_type - - # may be slicing or indexing, we don't know - if base_type in (unicode_type, str_type): - # these types always returns their own type on Python indexing/slicing - return base_type - else: - # TODO: Handle buffers (hopefully without too much redundancy). - return py_object_type - - def analyse_types(self, env): - return self.analyse_base_and_index_types(env, getting=True) - - def analyse_target_types(self, env): - node = self.analyse_base_and_index_types(env, setting=True) - if node.type.is_const: - error(self.pos, "Assignment to const dereference") - if not node.is_lvalue(): - error(self.pos, "Assignment to non-lvalue of type '%s'" % node.type) - return node - - def analyse_base_and_index_types(self, env, getting=False, setting=False, - analyse_base=True): - # Note: This might be cleaned up by having IndexNode - # parsed in a saner way and only construct the tuple if - # needed. - - # Note that this function must leave IndexNode in a cloneable state. - # For buffers, self.index is packed out on the initial analysis, and - # when cloning self.indices is copied. - self.is_buffer_access = False - - # a[...] = b - self.is_memslice_copy = False - # incomplete indexing, Ellipsis indexing or slicing - self.memslice_slice = False - # integer indexing - self.memslice_index = False - - if analyse_base: - self.base = self.base.analyse_types(env) - - if self.base.type.is_error: - # Do not visit child tree if base is undeclared to avoid confusing - # error messages - self.type = PyrexTypes.error_type - return self - - is_slice = isinstance(self.index, SliceNode) - - if not env.directives['wraparound']: - if is_slice: - check_negative_indices(self.index.start, self.index.stop) - else: - check_negative_indices(self.index) - - # Potentially overflowing index value. - if not is_slice and isinstance(self.index, IntNode) and Utils.long_literal(self.index.value): - self.index = self.index.coerce_to_pyobject(env) - - is_memslice = self.base.type.is_memoryviewslice - - # Handle the case where base is a literal char* (and we expect a string, not an int) - if not is_memslice and (isinstance(self.base, BytesNode) or is_slice): - if self.base.type.is_string or not (self.base.type.is_ptr or self.base.type.is_array): - self.base = self.base.coerce_to_pyobject(env) - - skip_child_analysis = False - buffer_access = False - - if self.indices: - indices = self.indices - elif isinstance(self.index, TupleNode): - indices = self.index.args - else: - indices = [self.index] - - if (is_memslice and not self.indices and - isinstance(self.index, EllipsisNode)): - # Memoryviewslice copying - self.is_memslice_copy = True - - elif is_memslice: - # memoryviewslice indexing or slicing - import MemoryView - - skip_child_analysis = True - newaxes = [newaxis for newaxis in indices if newaxis.is_none] - have_slices, indices = MemoryView.unellipsify(indices, - newaxes, - self.base.type.ndim) - - self.memslice_index = (not newaxes and - len(indices) == self.base.type.ndim) - axes = [] - - index_type = PyrexTypes.c_py_ssize_t_type - new_indices = [] - - if len(indices) - len(newaxes) > self.base.type.ndim: - self.type = error_type - error(indices[self.base.type.ndim].pos, - "Too many indices specified for type %s" % - self.base.type) - return self - - axis_idx = 0 - for i, index in enumerate(indices[:]): - index = index.analyse_types(env) - if not index.is_none: - access, packing = self.base.type.axes[axis_idx] - axis_idx += 1 - - if isinstance(index, SliceNode): - self.memslice_slice = True - if index.step.is_none: - axes.append((access, packing)) - else: - axes.append((access, 'strided')) - - # Coerce start, stop and step to temps of the right type - for attr in ('start', 'stop', 'step'): - value = getattr(index, attr) - if not value.is_none: - value = value.coerce_to(index_type, env) - #value = value.coerce_to_temp(env) - setattr(index, attr, value) - new_indices.append(value) - - elif index.is_none: - self.memslice_slice = True - new_indices.append(index) - axes.append(('direct', 'strided')) - - elif index.type.is_int or index.type.is_pyobject: - if index.type.is_pyobject and not self.warned_untyped_idx: - warning(index.pos, "Index should be typed for more " - "efficient access", level=2) - IndexNode.warned_untyped_idx = True - - self.memslice_index = True - index = index.coerce_to(index_type, env) - indices[i] = index - new_indices.append(index) - - else: - self.type = error_type - error(index.pos, "Invalid index for memoryview specified") - return self - - self.memslice_index = self.memslice_index and not self.memslice_slice - self.original_indices = indices - # All indices with all start/stop/step for slices. - # We need to keep this around - self.indices = new_indices - self.env = env - - elif self.base.type.is_buffer: - # Buffer indexing - if len(indices) == self.base.type.ndim: - buffer_access = True - skip_child_analysis = True - for x in indices: - x = x.analyse_types(env) - if not x.type.is_int: - buffer_access = False - - if buffer_access and not self.base.type.is_memoryviewslice: - assert hasattr(self.base, "entry") # Must be a NameNode-like node - - # On cloning, indices is cloned. Otherwise, unpack index into indices - assert not (buffer_access and isinstance(self.index, CloneNode)) - - self.nogil = env.nogil - - if buffer_access or self.memslice_index: - #if self.base.type.is_memoryviewslice and not self.base.is_name: - # self.base = self.base.coerce_to_temp(env) - self.base = self.base.coerce_to_simple(env) - - self.indices = indices - self.index = None - self.type = self.base.type.dtype - self.is_buffer_access = True - self.buffer_type = self.base.type #self.base.entry.type - - if getting and self.type.is_pyobject: - self.is_temp = True - - if setting and self.base.type.is_memoryviewslice: - self.base.type.writable_needed = True - elif setting: - if not self.base.entry.type.writable: - error(self.pos, "Writing to readonly buffer") - else: - self.writable_needed = True - if self.base.type.is_buffer: - self.base.entry.buffer_aux.writable_needed = True - - elif self.is_memslice_copy: - self.type = self.base.type - if getting: - self.memslice_ellipsis_noop = True - else: - self.memslice_broadcast = True - - elif self.memslice_slice: - self.index = None - self.is_temp = True - self.use_managed_ref = True - - if not MemoryView.validate_axes(self.pos, axes): - self.type = error_type - return self - - self.type = PyrexTypes.MemoryViewSliceType( - self.base.type.dtype, axes) - - if (self.base.type.is_memoryviewslice and not - self.base.is_name and not - self.base.result_in_temp()): - self.base = self.base.coerce_to_temp(env) - - if setting: - self.memslice_broadcast = True - - else: - base_type = self.base.type - - if not base_type.is_cfunction: - if isinstance(self.index, TupleNode): - self.index = self.index.analyse_types( - env, skip_children=skip_child_analysis) - elif not skip_child_analysis: - self.index = self.index.analyse_types(env) - self.original_index_type = self.index.type - - if base_type.is_unicode_char: - # we infer Py_UNICODE/Py_UCS4 for unicode strings in some - # cases, but indexing must still work for them - if setting: - warning(self.pos, "cannot assign to Unicode string index", level=1) - elif self.index.constant_result in (0, -1): - # uchar[0] => uchar - return self.base - self.base = self.base.coerce_to_pyobject(env) - base_type = self.base.type - if base_type.is_pyobject: - if self.index.type.is_int and base_type is not dict_type: - if (getting - and (base_type in (list_type, tuple_type, bytearray_type)) - and (not self.index.type.signed - or not env.directives['wraparound'] - or (isinstance(self.index, IntNode) and - self.index.has_constant_result() and self.index.constant_result >= 0)) - and not env.directives['boundscheck']): - self.is_temp = 0 - else: - self.is_temp = 1 - self.index = self.index.coerce_to(PyrexTypes.c_py_ssize_t_type, env).coerce_to_simple(env) - self.original_index_type.create_to_py_utility_code(env) - else: - self.index = self.index.coerce_to_pyobject(env) - self.is_temp = 1 - if self.index.type.is_int and base_type is unicode_type: - # Py_UNICODE/Py_UCS4 will automatically coerce to a unicode string - # if required, so this is fast and safe - self.type = PyrexTypes.c_py_ucs4_type - elif self.index.type.is_int and base_type is bytearray_type: - if setting: - self.type = PyrexTypes.c_uchar_type - else: - # not using 'uchar' to enable fast and safe error reporting as '-1' - self.type = PyrexTypes.c_int_type - elif is_slice and base_type in (bytes_type, str_type, unicode_type, list_type, tuple_type): - self.type = base_type - else: - item_type = None - if base_type in (list_type, tuple_type) and self.index.type.is_int: - item_type = infer_sequence_item_type( - env, self.base, self.index, seq_type=base_type) - if item_type is None: - item_type = py_object_type - self.type = item_type - if base_type in (list_type, tuple_type, dict_type): - # do the None check explicitly (not in a helper) to allow optimising it away - self.base = self.base.as_none_safe_node("'NoneType' object is not subscriptable") - else: - if base_type.is_ptr or base_type.is_array: - self.type = base_type.base_type - if is_slice: - self.type = base_type - elif self.index.type.is_pyobject: - self.index = self.index.coerce_to( - PyrexTypes.c_py_ssize_t_type, env) - elif not self.index.type.is_int: - error(self.pos, - "Invalid index type '%s'" % - self.index.type) - elif base_type.is_cpp_class: - function = env.lookup_operator("[]", [self.base, self.index]) - if function is None: - error(self.pos, "Indexing '%s' not supported for index type '%s'" % (base_type, self.index.type)) - self.type = PyrexTypes.error_type - self.result_code = "" - return self - func_type = function.type - if func_type.is_ptr: - func_type = func_type.base_type - self.index = self.index.coerce_to(func_type.args[0].type, env) - self.type = func_type.return_type - if setting and not func_type.return_type.is_reference: - error(self.pos, "Can't set non-reference result '%s'" % self.type) - elif base_type.is_cfunction: - if base_type.is_fused: - self.parse_indexed_fused_cdef(env) - else: - self.type_indices = self.parse_index_as_types(env) - if base_type.templates is None: - error(self.pos, "Can only parameterize template functions.") - elif len(base_type.templates) != len(self.type_indices): - error(self.pos, "Wrong number of template arguments: expected %s, got %s" % ( - (len(base_type.templates), len(self.type_indices)))) - self.type = base_type.specialize(dict(zip(base_type.templates, self.type_indices))) - else: - error(self.pos, - "Attempting to index non-array type '%s'" % - base_type) - self.type = PyrexTypes.error_type - - self.wrap_in_nonecheck_node(env, getting) - return self - - def wrap_in_nonecheck_node(self, env, getting): - if not env.directives['nonecheck'] or not self.base.may_be_none(): - return - - if self.base.type.is_memoryviewslice: - if self.is_memslice_copy and not getting: - msg = "Cannot assign to None memoryview slice" - elif self.memslice_slice: - msg = "Cannot slice None memoryview slice" - else: - msg = "Cannot index None memoryview slice" - else: - msg = "'NoneType' object is not subscriptable" - - self.base = self.base.as_none_safe_node(msg) - - def parse_index_as_types(self, env, required=True): - if isinstance(self.index, TupleNode): - indices = self.index.args - else: - indices = [self.index] - type_indices = [] - for index in indices: - type_indices.append(index.analyse_as_type(env)) - if type_indices[-1] is None: - if required: - error(index.pos, "not parsable as a type") - return None - return type_indices - - def parse_indexed_fused_cdef(self, env): - """ - Interpret fused_cdef_func[specific_type1, ...] - - Note that if this method is called, we are an indexed cdef function - with fused argument types, and this IndexNode will be replaced by the - NameNode with specific entry just after analysis of expressions by - AnalyseExpressionsTransform. - """ - self.type = PyrexTypes.error_type - - self.is_fused_index = True - - base_type = self.base.type - specific_types = [] - positions = [] - - if self.index.is_name or self.index.is_attribute: - positions.append(self.index.pos) - elif isinstance(self.index, TupleNode): - for arg in self.index.args: - positions.append(arg.pos) - specific_types = self.parse_index_as_types(env, required=False) - - if specific_types is None: - self.index = self.index.analyse_types(env) - - if not self.base.entry.as_variable: - error(self.pos, "Can only index fused functions with types") - else: - # A cpdef function indexed with Python objects - self.base.entry = self.entry = self.base.entry.as_variable - self.base.type = self.type = self.entry.type - - self.base.is_temp = True - self.is_temp = True - - self.entry.used = True - - self.is_fused_index = False - return - - for i, type in enumerate(specific_types): - specific_types[i] = type.specialize_fused(env) - - fused_types = base_type.get_fused_types() - if len(specific_types) > len(fused_types): - return error(self.pos, "Too many types specified") - elif len(specific_types) < len(fused_types): - t = fused_types[len(specific_types)] - return error(self.pos, "Not enough types specified to specialize " - "the function, %s is still fused" % t) - - # See if our index types form valid specializations - for pos, specific_type, fused_type in zip(positions, - specific_types, - fused_types): - if not Utils.any([specific_type.same_as(t) - for t in fused_type.types]): - return error(pos, "Type not in fused type") - - if specific_type is None or specific_type.is_error: - return - - fused_to_specific = dict(zip(fused_types, specific_types)) - type = base_type.specialize(fused_to_specific) - - if type.is_fused: - # Only partially specific, this is invalid - error(self.pos, - "Index operation makes function only partially specific") - else: - # Fully specific, find the signature with the specialized entry - for signature in self.base.type.get_all_specialized_function_types(): - if type.same_as(signature): - self.type = signature - - if self.base.is_attribute: - # Pretend to be a normal attribute, for cdef extension - # methods - self.entry = signature.entry - self.is_attribute = True - self.obj = self.base.obj - - self.type.entry.used = True - self.base.type = signature - self.base.entry = signature.entry - - break - else: - # This is a bug - raise InternalError("Couldn't find the right signature") - - gil_message = "Indexing Python object" - - def nogil_check(self, env): - if self.is_buffer_access or self.memslice_index or self.memslice_slice: - if not self.memslice_slice and env.directives['boundscheck']: - # error(self.pos, "Cannot check buffer index bounds without gil; " - # "use boundscheck(False) directive") - warning(self.pos, "Use boundscheck(False) for faster access", - level=1) - if self.type.is_pyobject: - error(self.pos, "Cannot access buffer with object dtype without gil") - return - super(IndexNode, self).nogil_check(env) - - - def check_const_addr(self): - return self.base.check_const_addr() and self.index.check_const() - - def is_lvalue(self): - # NOTE: references currently have both is_reference and is_ptr - # set. Since pointers and references have different lvalue - # rules, we must be careful to separate the two. - if self.type.is_reference: - if self.type.ref_base_type.is_array: - # fixed-sized arrays aren't l-values - return False - elif self.type.is_ptr: - # non-const pointers can always be reassigned - return True - elif self.type.is_array: - # fixed-sized arrays aren't l-values - return False - # Just about everything else returned by the index operator - # can be an lvalue. - return True - - def calculate_result_code(self): - if self.is_buffer_access: - return "(*%s)" % self.buffer_ptr_code - elif self.is_memslice_copy: - return self.base.result() - elif self.base.type in (list_type, tuple_type, bytearray_type): - if self.base.type is list_type: - index_code = "PyList_GET_ITEM(%s, %s)" - elif self.base.type is tuple_type: - index_code = "PyTuple_GET_ITEM(%s, %s)" - elif self.base.type is bytearray_type: - index_code = "((unsigned char)(PyByteArray_AS_STRING(%s)[%s]))" - else: - assert False, "unexpected base type in indexing: %s" % self.base.type - elif self.base.type.is_cfunction: - return "%s<%s>" % ( - self.base.result(), - ",".join([param.declaration_code("") for param in self.type_indices])) - else: - if (self.type.is_ptr or self.type.is_array) and self.type == self.base.type: - error(self.pos, "Invalid use of pointer slice") - return - index_code = "(%s[%s])" - return index_code % (self.base.result(), self.index.result()) - - def extra_index_params(self, code): - if self.index.type.is_int: - is_list = self.base.type is list_type - wraparound = ( - bool(code.globalstate.directives['wraparound']) and - self.original_index_type.signed and - not (isinstance(self.index.constant_result, (int, long)) - and self.index.constant_result >= 0)) - boundscheck = bool(code.globalstate.directives['boundscheck']) - return ", %s, %d, %s, %d, %d, %d" % ( - self.original_index_type.declaration_code(""), - self.original_index_type.signed and 1 or 0, - self.original_index_type.to_py_function, - is_list, wraparound, boundscheck) - else: - return "" - - def generate_subexpr_evaluation_code(self, code): - self.base.generate_evaluation_code(code) - if self.type_indices is not None: - pass - elif self.indices is None: - self.index.generate_evaluation_code(code) - else: - for i in self.indices: - i.generate_evaluation_code(code) - - def generate_subexpr_disposal_code(self, code): - self.base.generate_disposal_code(code) - if self.type_indices is not None: - pass - elif self.indices is None: - self.index.generate_disposal_code(code) - else: - for i in self.indices: - i.generate_disposal_code(code) - - def free_subexpr_temps(self, code): - self.base.free_temps(code) - if self.indices is None: - self.index.free_temps(code) - else: - for i in self.indices: - i.free_temps(code) - - def generate_result_code(self, code): - if self.is_buffer_access or self.memslice_index: - buffer_entry, self.buffer_ptr_code = self.buffer_lookup_code(code) - if self.type.is_pyobject: - # is_temp is True, so must pull out value and incref it. - # NOTE: object temporary results for nodes are declared - # as PyObject *, so we need a cast - code.putln("%s = (PyObject *) *%s;" % (self.temp_code, - self.buffer_ptr_code)) - code.putln("__Pyx_INCREF((PyObject*)%s);" % self.temp_code) - - elif self.memslice_slice: - self.put_memoryviewslice_slice_code(code) - - elif self.is_temp: - if self.type.is_pyobject: - error_value = 'NULL' - if self.index.type.is_int: - if self.base.type is list_type: - function = "__Pyx_GetItemInt_List" - elif self.base.type is tuple_type: - function = "__Pyx_GetItemInt_Tuple" - else: - function = "__Pyx_GetItemInt" - code.globalstate.use_utility_code( - TempitaUtilityCode.load_cached("GetItemInt", "ObjectHandling.c")) - else: - if self.base.type is dict_type: - function = "__Pyx_PyDict_GetItem" - code.globalstate.use_utility_code( - UtilityCode.load_cached("DictGetItem", "ObjectHandling.c")) - else: - function = "PyObject_GetItem" - elif self.type.is_unicode_char and self.base.type is unicode_type: - assert self.index.type.is_int - function = "__Pyx_GetItemInt_Unicode" - error_value = '(Py_UCS4)-1' - code.globalstate.use_utility_code( - UtilityCode.load_cached("GetItemIntUnicode", "StringTools.c")) - elif self.base.type is bytearray_type: - assert self.index.type.is_int - assert self.type.is_int - function = "__Pyx_GetItemInt_ByteArray" - error_value = '-1' - code.globalstate.use_utility_code( - UtilityCode.load_cached("GetItemIntByteArray", "StringTools.c")) - else: - assert False, "unexpected type %s and base type %s for indexing" % ( - self.type, self.base.type) - - if self.index.type.is_int: - index_code = self.index.result() - else: - index_code = self.index.py_result() - - code.putln( - "%s = %s(%s, %s%s); if (unlikely(%s == %s)) %s;" % ( - self.result(), - function, - self.base.py_result(), - index_code, - self.extra_index_params(code), - self.result(), - error_value, - code.error_goto(self.pos))) - if self.type.is_pyobject: - code.put_gotref(self.py_result()) - - def generate_setitem_code(self, value_code, code): - if self.index.type.is_int: - if self.base.type is bytearray_type: - code.globalstate.use_utility_code( - UtilityCode.load_cached("SetItemIntByteArray", "StringTools.c")) - function = "__Pyx_SetItemInt_ByteArray" - else: - code.globalstate.use_utility_code( - UtilityCode.load_cached("SetItemInt", "ObjectHandling.c")) - function = "__Pyx_SetItemInt" - index_code = self.index.result() - else: - index_code = self.index.py_result() - if self.base.type is dict_type: - function = "PyDict_SetItem" - # It would seem that we could specialized lists/tuples, but that - # shouldn't happen here. - # Both PyList_SetItem() and PyTuple_SetItem() take a Py_ssize_t as - # index instead of an object, and bad conversion here would give - # the wrong exception. Also, tuples are supposed to be immutable, - # and raise a TypeError when trying to set their entries - # (PyTuple_SetItem() is for creating new tuples from scratch). - else: - function = "PyObject_SetItem" - code.putln( - "if (unlikely(%s(%s, %s, %s%s) < 0)) %s" % ( - function, - self.base.py_result(), - index_code, - value_code, - self.extra_index_params(code), - code.error_goto(self.pos))) - - def generate_buffer_setitem_code(self, rhs, code, op=""): - # Used from generate_assignment_code and InPlaceAssignmentNode - buffer_entry, ptrexpr = self.buffer_lookup_code(code) - - if self.buffer_type.dtype.is_pyobject: - # Must manage refcounts. Decref what is already there - # and incref what we put in. - ptr = code.funcstate.allocate_temp(buffer_entry.buf_ptr_type, - manage_ref=False) - rhs_code = rhs.result() - code.putln("%s = %s;" % (ptr, ptrexpr)) - code.put_gotref("*%s" % ptr) - code.putln("__Pyx_INCREF(%s); __Pyx_DECREF(*%s);" % ( - rhs_code, ptr)) - code.putln("*%s %s= %s;" % (ptr, op, rhs_code)) - code.put_giveref("*%s" % ptr) - code.funcstate.release_temp(ptr) - else: - # Simple case - code.putln("*%s %s= %s;" % (ptrexpr, op, rhs.result())) - - def generate_assignment_code(self, rhs, code): - generate_evaluation_code = (self.is_memslice_scalar_assignment or - self.memslice_slice) - if generate_evaluation_code: - self.generate_evaluation_code(code) - else: - self.generate_subexpr_evaluation_code(code) - - if self.is_buffer_access or self.memslice_index: - self.generate_buffer_setitem_code(rhs, code) - elif self.is_memslice_scalar_assignment: - self.generate_memoryviewslice_assign_scalar_code(rhs, code) - elif self.memslice_slice or self.is_memslice_copy: - self.generate_memoryviewslice_setslice_code(rhs, code) - elif self.type.is_pyobject: - self.generate_setitem_code(rhs.py_result(), code) - elif self.base.type is bytearray_type: - value_code = self._check_byte_value(code, rhs) - self.generate_setitem_code(value_code, code) - else: - code.putln( - "%s = %s;" % ( - self.result(), rhs.result())) - - if generate_evaluation_code: - self.generate_disposal_code(code) - else: - self.generate_subexpr_disposal_code(code) - self.free_subexpr_temps(code) - - rhs.generate_disposal_code(code) - rhs.free_temps(code) - - def _check_byte_value(self, code, rhs): - # TODO: should we do this generally on downcasts, or just here? - assert rhs.type.is_int, repr(rhs.type) - value_code = rhs.result() - if rhs.has_constant_result(): - if 0 <= rhs.constant_result < 256: - return value_code - needs_cast = True # make at least the C compiler happy - warning(rhs.pos, - "value outside of range(0, 256)" - " when assigning to byte: %s" % rhs.constant_result, - level=1) - else: - needs_cast = rhs.type != PyrexTypes.c_uchar_type - - if not self.nogil: - conditions = [] - if rhs.is_literal or rhs.type.signed: - conditions.append('%s < 0' % value_code) - if (rhs.is_literal or not - (rhs.is_temp and rhs.type in ( - PyrexTypes.c_uchar_type, PyrexTypes.c_char_type, - PyrexTypes.c_schar_type))): - conditions.append('%s > 255' % value_code) - if conditions: - code.putln("if (unlikely(%s)) {" % ' || '.join(conditions)) - code.putln( - 'PyErr_SetString(PyExc_ValueError,' - ' "byte must be in range(0, 256)"); %s' % - code.error_goto(self.pos)) - code.putln("}") - - if needs_cast: - value_code = '((unsigned char)%s)' % value_code - return value_code - - def generate_deletion_code(self, code, ignore_nonexisting=False): - self.generate_subexpr_evaluation_code(code) - #if self.type.is_pyobject: - if self.index.type.is_int: - function = "__Pyx_DelItemInt" - index_code = self.index.result() - code.globalstate.use_utility_code( - UtilityCode.load_cached("DelItemInt", "ObjectHandling.c")) - else: - index_code = self.index.py_result() - if self.base.type is dict_type: - function = "PyDict_DelItem" - else: - function = "PyObject_DelItem" - code.putln( - "if (%s(%s, %s%s) < 0) %s" % ( - function, - self.base.py_result(), - index_code, - self.extra_index_params(code), - code.error_goto(self.pos))) - self.generate_subexpr_disposal_code(code) - self.free_subexpr_temps(code) - - def buffer_entry(self): - import Buffer, MemoryView - - base = self.base - if self.base.is_nonecheck: - base = base.arg - - if base.is_name: - entry = base.entry - else: - # SimpleCallNode is_simple is not consistent with coerce_to_simple - assert base.is_simple() or base.is_temp - cname = base.result() - entry = Symtab.Entry(cname, cname, self.base.type, self.base.pos) - - if entry.type.is_buffer: - buffer_entry = Buffer.BufferEntry(entry) - else: - buffer_entry = MemoryView.MemoryViewSliceBufferEntry(entry) - - return buffer_entry - - def buffer_lookup_code(self, code): - "ndarray[1, 2, 3] and memslice[1, 2, 3]" - # Assign indices to temps - index_temps = [code.funcstate.allocate_temp(i.type, manage_ref=False) - for i in self.indices] - - for temp, index in zip(index_temps, self.indices): - code.putln("%s = %s;" % (temp, index.result())) - - # Generate buffer access code using these temps - import Buffer - buffer_entry = self.buffer_entry() - if buffer_entry.type.is_buffer: - negative_indices = buffer_entry.type.negative_indices - else: - negative_indices = Buffer.buffer_defaults['negative_indices'] - - return buffer_entry, Buffer.put_buffer_lookup_code( - entry=buffer_entry, - index_signeds=[i.type.signed for i in self.indices], - index_cnames=index_temps, - directives=code.globalstate.directives, - pos=self.pos, code=code, - negative_indices=negative_indices, - in_nogil_context=self.in_nogil_context) - - def put_memoryviewslice_slice_code(self, code): - "memslice[:]" - buffer_entry = self.buffer_entry() - have_gil = not self.in_nogil_context - - if sys.version_info < (3,): - def next_(it): - return it.next() - else: - next_ = next - - have_slices = False - it = iter(self.indices) - for index in self.original_indices: - is_slice = isinstance(index, SliceNode) - have_slices = have_slices or is_slice - if is_slice: - if not index.start.is_none: - index.start = next_(it) - if not index.stop.is_none: - index.stop = next_(it) - if not index.step.is_none: - index.step = next_(it) - else: - next_(it) - - assert not list(it) - - buffer_entry.generate_buffer_slice_code(code, self.original_indices, - self.result(), - have_gil=have_gil, - have_slices=have_slices, - directives=code.globalstate.directives) - - def generate_memoryviewslice_setslice_code(self, rhs, code): - "memslice1[...] = memslice2 or memslice1[:] = memslice2" - import MemoryView - MemoryView.copy_broadcast_memview_src_to_dst(rhs, self, code) - - def generate_memoryviewslice_assign_scalar_code(self, rhs, code): - "memslice1[...] = 0.0 or memslice1[:] = 0.0" - import MemoryView - MemoryView.assign_scalar(self, rhs, code) - - -class SliceIndexNode(ExprNode): - # 2-element slice indexing - # - # base ExprNode - # start ExprNode or None - # stop ExprNode or None - # slice ExprNode or None constant slice object - - subexprs = ['base', 'start', 'stop', 'slice'] - - slice = None - - def infer_type(self, env): - base_type = self.base.infer_type(env) - if base_type.is_string or base_type.is_cpp_class: - return bytes_type - elif base_type.is_pyunicode_ptr: - return unicode_type - elif base_type in (bytes_type, str_type, unicode_type, - basestring_type, list_type, tuple_type): - return base_type - elif base_type.is_ptr or base_type.is_array: - return PyrexTypes.c_array_type(base_type.base_type, None) - return py_object_type - - def may_be_none(self): - base_type = self.base.type - if base_type: - if base_type.is_string: - return False - if base_type in (bytes_type, str_type, unicode_type, - basestring_type, list_type, tuple_type): - return False - return ExprNode.may_be_none(self) - - def calculate_constant_result(self): - if self.start is None: - start = None - else: - start = self.start.constant_result - if self.stop is None: - stop = None - else: - stop = self.stop.constant_result - self.constant_result = self.base.constant_result[start:stop] - - def compile_time_value(self, denv): - base = self.base.compile_time_value(denv) - if self.start is None: - start = 0 - else: - start = self.start.compile_time_value(denv) - if self.stop is None: - stop = None - else: - stop = self.stop.compile_time_value(denv) - try: - return base[start:stop] - except Exception, e: - self.compile_time_value_error(e) - - def analyse_target_declaration(self, env): - pass - - def analyse_target_types(self, env): - node = self.analyse_types(env, getting=False) - # when assigning, we must accept any Python type - if node.type.is_pyobject: - node.type = py_object_type - return node - - def analyse_types(self, env, getting=True): - self.base = self.base.analyse_types(env) - - if self.base.type.is_memoryviewslice: - none_node = NoneNode(self.pos) - index = SliceNode(self.pos, - start=self.start or none_node, - stop=self.stop or none_node, - step=none_node) - index_node = IndexNode(self.pos, index, base=self.base) - return index_node.analyse_base_and_index_types( - env, getting=getting, setting=not getting, - analyse_base=False) - - if self.start: - self.start = self.start.analyse_types(env) - if self.stop: - self.stop = self.stop.analyse_types(env) - - if not env.directives['wraparound']: - check_negative_indices(self.start, self.stop) - - base_type = self.base.type - if base_type.is_string or base_type.is_cpp_string: - self.type = default_str_type(env) - elif base_type.is_pyunicode_ptr: - self.type = unicode_type - elif base_type.is_ptr: - self.type = base_type - elif base_type.is_array: - # we need a ptr type here instead of an array type, as - # array types can result in invalid type casts in the C - # code - self.type = PyrexTypes.CPtrType(base_type.base_type) - else: - self.base = self.base.coerce_to_pyobject(env) - self.type = py_object_type - if base_type.is_builtin_type: - # slicing builtin types returns something of the same type - self.type = base_type - self.base = self.base.as_none_safe_node("'NoneType' object is not subscriptable") - - if self.type is py_object_type: - if (not self.start or self.start.is_literal) and \ - (not self.stop or self.stop.is_literal): - # cache the constant slice object, in case we need it - none_node = NoneNode(self.pos) - self.slice = SliceNode( - self.pos, - start=copy.deepcopy(self.start or none_node), - stop=copy.deepcopy(self.stop or none_node), - step=none_node - ).analyse_types(env) - else: - c_int = PyrexTypes.c_py_ssize_t_type - if self.start: - self.start = self.start.coerce_to(c_int, env) - if self.stop: - self.stop = self.stop.coerce_to(c_int, env) - self.is_temp = 1 - return self - - nogil_check = Node.gil_error - gil_message = "Slicing Python object" - - get_slice_utility_code = TempitaUtilityCode.load( - "SliceObject", "ObjectHandling.c", context={'access': 'Get'}) - - set_slice_utility_code = TempitaUtilityCode.load( - "SliceObject", "ObjectHandling.c", context={'access': 'Set'}) - - def coerce_to(self, dst_type, env): - if ((self.base.type.is_string or self.base.type.is_cpp_string) - and dst_type in (bytes_type, bytearray_type, str_type, unicode_type)): - if (dst_type not in (bytes_type, bytearray_type) - and not env.directives['c_string_encoding']): - error(self.pos, - "default encoding required for conversion from '%s' to '%s'" % - (self.base.type, dst_type)) - self.type = dst_type - return super(SliceIndexNode, self).coerce_to(dst_type, env) - - def generate_result_code(self, code): - if not self.type.is_pyobject: - error(self.pos, - "Slicing is not currently supported for '%s'." % self.type) - return - - base_result = self.base.result() - result = self.result() - start_code = self.start_code() - stop_code = self.stop_code() - if self.base.type.is_string: - base_result = self.base.result() - if self.base.type != PyrexTypes.c_char_ptr_type: - base_result = '((const char*)%s)' % base_result - if self.type is bytearray_type: - type_name = 'ByteArray' - else: - type_name = self.type.name.title() - if self.stop is None: - code.putln( - "%s = __Pyx_Py%s_FromString(%s + %s); %s" % ( - result, - type_name, - base_result, - start_code, - code.error_goto_if_null(result, self.pos))) - else: - code.putln( - "%s = __Pyx_Py%s_FromStringAndSize(%s + %s, %s - %s); %s" % ( - result, - type_name, - base_result, - start_code, - stop_code, - start_code, - code.error_goto_if_null(result, self.pos))) - elif self.base.type.is_pyunicode_ptr: - base_result = self.base.result() - if self.base.type != PyrexTypes.c_py_unicode_ptr_type: - base_result = '((const Py_UNICODE*)%s)' % base_result - if self.stop is None: - code.putln( - "%s = __Pyx_PyUnicode_FromUnicode(%s + %s); %s" % ( - result, - base_result, - start_code, - code.error_goto_if_null(result, self.pos))) - else: - code.putln( - "%s = __Pyx_PyUnicode_FromUnicodeAndLength(%s + %s, %s - %s); %s" % ( - result, - base_result, - start_code, - stop_code, - start_code, - code.error_goto_if_null(result, self.pos))) - - elif self.base.type is unicode_type: - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyUnicode_Substring", "StringTools.c")) - code.putln( - "%s = __Pyx_PyUnicode_Substring(%s, %s, %s); %s" % ( - result, - base_result, - start_code, - stop_code, - code.error_goto_if_null(result, self.pos))) - elif self.type is py_object_type: - code.globalstate.use_utility_code(self.get_slice_utility_code) - (has_c_start, has_c_stop, c_start, c_stop, - py_start, py_stop, py_slice) = self.get_slice_config() - code.putln( - "%s = __Pyx_PyObject_GetSlice(%s, %s, %s, %s, %s, %s, %d, %d, %d); %s" % ( - result, - self.base.py_result(), - c_start, c_stop, - py_start, py_stop, py_slice, - has_c_start, has_c_stop, - bool(code.globalstate.directives['wraparound']), - code.error_goto_if_null(result, self.pos))) - else: - if self.base.type is list_type: - code.globalstate.use_utility_code( - TempitaUtilityCode.load_cached("SliceTupleAndList", "ObjectHandling.c")) - cfunc = '__Pyx_PyList_GetSlice' - elif self.base.type is tuple_type: - code.globalstate.use_utility_code( - TempitaUtilityCode.load_cached("SliceTupleAndList", "ObjectHandling.c")) - cfunc = '__Pyx_PyTuple_GetSlice' - else: - cfunc = '__Pyx_PySequence_GetSlice' - code.putln( - "%s = %s(%s, %s, %s); %s" % ( - result, - cfunc, - self.base.py_result(), - start_code, - stop_code, - code.error_goto_if_null(result, self.pos))) - code.put_gotref(self.py_result()) - - def generate_assignment_code(self, rhs, code): - self.generate_subexpr_evaluation_code(code) - if self.type.is_pyobject: - code.globalstate.use_utility_code(self.set_slice_utility_code) - (has_c_start, has_c_stop, c_start, c_stop, - py_start, py_stop, py_slice) = self.get_slice_config() - code.put_error_if_neg(self.pos, - "__Pyx_PyObject_SetSlice(%s, %s, %s, %s, %s, %s, %s, %d, %d, %d)" % ( - self.base.py_result(), - rhs.py_result(), - c_start, c_stop, - py_start, py_stop, py_slice, - has_c_start, has_c_stop, - bool(code.globalstate.directives['wraparound']))) - else: - start_offset = '' - if self.start: - start_offset = self.start_code() - if start_offset == '0': - start_offset = '' - else: - start_offset += '+' - if rhs.type.is_array: - array_length = rhs.type.size - self.generate_slice_guard_code(code, array_length) - else: - error(self.pos, - "Slice assignments from pointers are not yet supported.") - # FIXME: fix the array size according to start/stop - array_length = self.base.type.size - for i in range(array_length): - code.putln("%s[%s%s] = %s[%d];" % ( - self.base.result(), start_offset, i, - rhs.result(), i)) - self.generate_subexpr_disposal_code(code) - self.free_subexpr_temps(code) - rhs.generate_disposal_code(code) - rhs.free_temps(code) - - def generate_deletion_code(self, code, ignore_nonexisting=False): - if not self.base.type.is_pyobject: - error(self.pos, - "Deleting slices is only supported for Python types, not '%s'." % self.type) - return - self.generate_subexpr_evaluation_code(code) - code.globalstate.use_utility_code(self.set_slice_utility_code) - (has_c_start, has_c_stop, c_start, c_stop, - py_start, py_stop, py_slice) = self.get_slice_config() - code.put_error_if_neg(self.pos, - "__Pyx_PyObject_DelSlice(%s, %s, %s, %s, %s, %s, %d, %d, %d)" % ( - self.base.py_result(), - c_start, c_stop, - py_start, py_stop, py_slice, - has_c_start, has_c_stop, - bool(code.globalstate.directives['wraparound']))) - self.generate_subexpr_disposal_code(code) - self.free_subexpr_temps(code) - - def get_slice_config(self): - has_c_start, c_start, py_start = False, '0', 'NULL' - if self.start: - has_c_start = not self.start.type.is_pyobject - if has_c_start: - c_start = self.start.result() - else: - py_start = '&%s' % self.start.py_result() - has_c_stop, c_stop, py_stop = False, '0', 'NULL' - if self.stop: - has_c_stop = not self.stop.type.is_pyobject - if has_c_stop: - c_stop = self.stop.result() - else: - py_stop = '&%s' % self.stop.py_result() - py_slice = self.slice and '&%s' % self.slice.py_result() or 'NULL' - return (has_c_start, has_c_stop, c_start, c_stop, - py_start, py_stop, py_slice) - - def generate_slice_guard_code(self, code, target_size): - if not self.base.type.is_array: - return - slice_size = self.base.type.size - start = stop = None - if self.stop: - stop = self.stop.result() - try: - stop = int(stop) - if stop < 0: - slice_size = self.base.type.size + stop - else: - slice_size = stop - stop = None - except ValueError: - pass - if self.start: - start = self.start.result() - try: - start = int(start) - if start < 0: - start = self.base.type.size + start - slice_size -= start - start = None - except ValueError: - pass - check = None - if slice_size < 0: - if target_size > 0: - error(self.pos, "Assignment to empty slice.") - elif start is None and stop is None: - # we know the exact slice length - if target_size != slice_size: - error(self.pos, "Assignment to slice of wrong length, expected %d, got %d" % ( - slice_size, target_size)) - elif start is not None: - if stop is None: - stop = slice_size - check = "(%s)-(%s)" % (stop, start) - else: # stop is not None: - check = stop - if check: - code.putln("if (unlikely((%s) != %d)) {" % (check, target_size)) - code.putln('PyErr_Format(PyExc_ValueError, "Assignment to slice of wrong length, expected %%" CYTHON_FORMAT_SSIZE_T "d, got %%" CYTHON_FORMAT_SSIZE_T "d", (Py_ssize_t)%d, (Py_ssize_t)(%s));' % ( - target_size, check)) - code.putln(code.error_goto(self.pos)) - code.putln("}") - - def start_code(self): - if self.start: - return self.start.result() - else: - return "0" - - def stop_code(self): - if self.stop: - return self.stop.result() - elif self.base.type.is_array: - return self.base.type.size - else: - return "PY_SSIZE_T_MAX" - - def calculate_result_code(self): - # self.result() is not used, but this method must exist - return "" - - -class SliceNode(ExprNode): - # start:stop:step in subscript list - # - # start ExprNode - # stop ExprNode - # step ExprNode - - subexprs = ['start', 'stop', 'step'] - - type = slice_type - is_temp = 1 - - def calculate_constant_result(self): - self.constant_result = slice( - self.start.constant_result, - self.stop.constant_result, - self.step.constant_result) - - def compile_time_value(self, denv): - start = self.start.compile_time_value(denv) - stop = self.stop.compile_time_value(denv) - step = self.step.compile_time_value(denv) - try: - return slice(start, stop, step) - except Exception, e: - self.compile_time_value_error(e) - - def may_be_none(self): - return False - - def analyse_types(self, env): - start = self.start.analyse_types(env) - stop = self.stop.analyse_types(env) - step = self.step.analyse_types(env) - self.start = start.coerce_to_pyobject(env) - self.stop = stop.coerce_to_pyobject(env) - self.step = step.coerce_to_pyobject(env) - if self.start.is_literal and self.stop.is_literal and self.step.is_literal: - self.is_literal = True - self.is_temp = False - return self - - gil_message = "Constructing Python slice object" - - def calculate_result_code(self): - return self.result_code - - def generate_result_code(self, code): - if self.is_literal: - self.result_code = code.get_py_const(py_object_type, 'slice', cleanup_level=2) - code = code.get_cached_constants_writer() - code.mark_pos(self.pos) - - code.putln( - "%s = PySlice_New(%s, %s, %s); %s" % ( - self.result(), - self.start.py_result(), - self.stop.py_result(), - self.step.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - if self.is_literal: - code.put_giveref(self.py_result()) - - def __deepcopy__(self, memo): - """ - There is a copy bug in python 2.4 for slice objects. - """ - return SliceNode( - self.pos, - start=copy.deepcopy(self.start, memo), - stop=copy.deepcopy(self.stop, memo), - step=copy.deepcopy(self.step, memo), - is_temp=self.is_temp, - is_literal=self.is_literal, - constant_result=self.constant_result) - - -class CallNode(ExprNode): - - # allow overriding the default 'may_be_none' behaviour - may_return_none = None - - def infer_type(self, env): - function = self.function - func_type = function.infer_type(env) - if isinstance(function, NewExprNode): - # note: needs call to infer_type() above - return PyrexTypes.CPtrType(function.class_type) - if func_type is py_object_type: - # function might have lied for safety => try to find better type - entry = getattr(function, 'entry', None) - if entry is not None: - func_type = entry.type or func_type - if func_type.is_ptr: - func_type = func_type.base_type - if func_type.is_cfunction: - return func_type.return_type - elif func_type is type_type: - if function.is_name and function.entry and function.entry.type: - result_type = function.entry.type - if result_type.is_extension_type: - return result_type - elif result_type.is_builtin_type: - if function.entry.name == 'float': - return PyrexTypes.c_double_type - elif function.entry.name in Builtin.types_that_construct_their_instance: - return result_type - return py_object_type - - def type_dependencies(self, env): - # TODO: Update when Danilo's C++ code merged in to handle the - # the case of function overloading. - return self.function.type_dependencies(env) - - def is_simple(self): - # C function calls could be considered simple, but they may - # have side-effects that may hit when multiple operations must - # be effected in order, e.g. when constructing the argument - # sequence for a function call or comparing values. - return False - - def may_be_none(self): - if self.may_return_none is not None: - return self.may_return_none - func_type = self.function.type - if func_type is type_type and self.function.is_name: - entry = self.function.entry - if entry.type.is_extension_type: - return False - if (entry.type.is_builtin_type and - entry.name in Builtin.types_that_construct_their_instance): - return False - return ExprNode.may_be_none(self) - - def analyse_as_type_constructor(self, env): - type = self.function.analyse_as_type(env) - if type and type.is_struct_or_union: - args, kwds = self.explicit_args_kwds() - items = [] - for arg, member in zip(args, type.scope.var_entries): - items.append(DictItemNode(pos=arg.pos, key=StringNode(pos=arg.pos, value=member.name), value=arg)) - if kwds: - items += kwds.key_value_pairs - self.key_value_pairs = items - self.__class__ = DictNode - self.analyse_types(env) # FIXME - self.coerce_to(type, env) - return True - elif type and type.is_cpp_class: - self.args = [ arg.analyse_types(env) for arg in self.args ] - constructor = type.scope.lookup("") - self.function = RawCNameExprNode(self.function.pos, constructor.type) - self.function.entry = constructor - self.function.set_cname(type.declaration_code("")) - self.analyse_c_function_call(env) - self.type = type - return True - - def is_lvalue(self): - return self.type.is_reference - - def nogil_check(self, env): - func_type = self.function_type() - if func_type.is_pyobject: - self.gil_error() - elif not getattr(func_type, 'nogil', False): - self.gil_error() - - gil_message = "Calling gil-requiring function" - - -class SimpleCallNode(CallNode): - # Function call without keyword, * or ** args. - # - # function ExprNode - # args [ExprNode] - # arg_tuple ExprNode or None used internally - # self ExprNode or None used internally - # coerced_self ExprNode or None used internally - # wrapper_call bool used internally - # has_optional_args bool used internally - # nogil bool used internally - - subexprs = ['self', 'coerced_self', 'function', 'args', 'arg_tuple'] - - self = None - coerced_self = None - arg_tuple = None - wrapper_call = False - has_optional_args = False - nogil = False - analysed = False - - def compile_time_value(self, denv): - function = self.function.compile_time_value(denv) - args = [arg.compile_time_value(denv) for arg in self.args] - try: - return function(*args) - except Exception, e: - self.compile_time_value_error(e) - - def analyse_as_type(self, env): - attr = self.function.as_cython_attribute() - if attr == 'pointer': - if len(self.args) != 1: - error(self.args.pos, "only one type allowed.") - else: - type = self.args[0].analyse_as_type(env) - if not type: - error(self.args[0].pos, "Unknown type") - else: - return PyrexTypes.CPtrType(type) - - def explicit_args_kwds(self): - return self.args, None - - def analyse_types(self, env): - if self.analyse_as_type_constructor(env): - return self - if self.analysed: - return self - self.analysed = True - self.function.is_called = 1 - self.function = self.function.analyse_types(env) - function = self.function - - if function.is_attribute and function.entry and function.entry.is_cmethod: - # Take ownership of the object from which the attribute - # was obtained, because we need to pass it as 'self'. - self.self = function.obj - function.obj = CloneNode(self.self) - - func_type = self.function_type() - if func_type.is_pyobject: - self.arg_tuple = TupleNode(self.pos, args = self.args) - self.arg_tuple = self.arg_tuple.analyse_types(env) - self.args = None - if func_type is Builtin.type_type and function.is_name and \ - function.entry and \ - function.entry.is_builtin and \ - function.entry.name in Builtin.types_that_construct_their_instance: - # calling a builtin type that returns a specific object type - if function.entry.name == 'float': - # the following will come true later on in a transform - self.type = PyrexTypes.c_double_type - self.result_ctype = PyrexTypes.c_double_type - else: - self.type = Builtin.builtin_types[function.entry.name] - self.result_ctype = py_object_type - self.may_return_none = False - elif function.is_name and function.type_entry: - # We are calling an extension type constructor. As - # long as we do not support __new__(), the result type - # is clear - self.type = function.type_entry.type - self.result_ctype = py_object_type - self.may_return_none = False - else: - self.type = py_object_type - self.is_temp = 1 - else: - self.args = [ arg.analyse_types(env) for arg in self.args ] - self.analyse_c_function_call(env) - return self - - def function_type(self): - # Return the type of the function being called, coercing a function - # pointer to a function if necessary. If the function has fused - # arguments, return the specific type. - func_type = self.function.type - - if func_type.is_ptr: - func_type = func_type.base_type - - return func_type - - def analyse_c_function_call(self, env): - if self.function.type is error_type: - self.type = error_type - return - - if self.self: - args = [self.self] + self.args - else: - args = self.args - - if self.function.type.is_cpp_class: - overloaded_entry = self.function.type.scope.lookup("operator()") - if overloaded_entry is None: - self.type = PyrexTypes.error_type - self.result_code = "" - return - elif hasattr(self.function, 'entry'): - overloaded_entry = self.function.entry - elif (isinstance(self.function, IndexNode) and - self.function.is_fused_index): - overloaded_entry = self.function.type.entry - else: - overloaded_entry = None - - if overloaded_entry: - if self.function.type.is_fused: - functypes = self.function.type.get_all_specialized_function_types() - alternatives = [f.entry for f in functypes] - else: - alternatives = overloaded_entry.all_alternatives() - - entry = PyrexTypes.best_match(args, alternatives, self.pos, env) - - if not entry: - self.type = PyrexTypes.error_type - self.result_code = "" - return - - entry.used = True - self.function.entry = entry - self.function.type = entry.type - func_type = self.function_type() - else: - entry = None - func_type = self.function_type() - if not func_type.is_cfunction: - error(self.pos, "Calling non-function type '%s'" % func_type) - self.type = PyrexTypes.error_type - self.result_code = "" - return - - # Check no. of args - max_nargs = len(func_type.args) - expected_nargs = max_nargs - func_type.optional_arg_count - actual_nargs = len(args) - if func_type.optional_arg_count and expected_nargs != actual_nargs: - self.has_optional_args = 1 - self.is_temp = 1 - - # check 'self' argument - if entry and entry.is_cmethod and func_type.args: - formal_arg = func_type.args[0] - arg = args[0] - if formal_arg.not_none: - if self.self: - self.self = self.self.as_none_safe_node( - "'NoneType' object has no attribute '%s'", - error='PyExc_AttributeError', - format_args=[entry.name]) - else: - # unbound method - arg = arg.as_none_safe_node( - "descriptor '%s' requires a '%s' object but received a 'NoneType'", - format_args=[entry.name, formal_arg.type.name]) - if self.self: - if formal_arg.accept_builtin_subtypes: - arg = CMethodSelfCloneNode(self.self) - else: - arg = CloneNode(self.self) - arg = self.coerced_self = arg.coerce_to(formal_arg.type, env) - elif formal_arg.type.is_builtin_type: - # special case: unbound methods of builtins accept subtypes - arg = arg.coerce_to(formal_arg.type, env) - if arg.type.is_builtin_type and isinstance(arg, PyTypeTestNode): - arg.exact_builtin_type = False - args[0] = arg - - # Coerce arguments - some_args_in_temps = False - for i in xrange(min(max_nargs, actual_nargs)): - formal_arg = func_type.args[i] - formal_type = formal_arg.type - arg = args[i].coerce_to(formal_type, env) - if formal_arg.not_none: - # C methods must do the None checks at *call* time - arg = arg.as_none_safe_node( - "cannot pass None into a C function argument that is declared 'not None'") - if arg.is_temp: - if i > 0: - # first argument in temp doesn't impact subsequent arguments - some_args_in_temps = True - elif arg.type.is_pyobject and not env.nogil: - if i == 0 and self.self is not None: - # a method's cloned "self" argument is ok - pass - elif arg.nonlocally_immutable(): - # plain local variables are ok - pass - else: - # we do not safely own the argument's reference, - # but we must make sure it cannot be collected - # before we return from the function, so we create - # an owned temp reference to it - if i > 0: # first argument doesn't matter - some_args_in_temps = True - arg = arg.coerce_to_temp(env) - args[i] = arg - - # handle additional varargs parameters - for i in xrange(max_nargs, actual_nargs): - arg = args[i] - if arg.type.is_pyobject: - arg_ctype = arg.type.default_coerced_ctype() - if arg_ctype is None: - error(self.args[i].pos, - "Python object cannot be passed as a varargs parameter") - else: - args[i] = arg = arg.coerce_to(arg_ctype, env) - if arg.is_temp and i > 0: - some_args_in_temps = True - - if some_args_in_temps: - # if some args are temps and others are not, they may get - # constructed in the wrong order (temps first) => make - # sure they are either all temps or all not temps (except - # for the last argument, which is evaluated last in any - # case) - for i in xrange(actual_nargs-1): - if i == 0 and self.self is not None: - continue # self is ok - arg = args[i] - if arg.nonlocally_immutable(): - # locals, C functions, unassignable types are safe. - pass - elif arg.type.is_cpp_class: - # Assignment has side effects, avoid. - pass - elif env.nogil and arg.type.is_pyobject: - # can't copy a Python reference into a temp in nogil - # env (this is safe: a construction would fail in - # nogil anyway) - pass - else: - #self.args[i] = arg.coerce_to_temp(env) - # instead: issue a warning - if i > 0 or i == 1 and self.self is not None: # skip first arg - warning(arg.pos, "Argument evaluation order in C function call is undefined and may not be as expected", 0) - break - - self.args[:] = args - - # Calc result type and code fragment - if isinstance(self.function, NewExprNode): - self.type = PyrexTypes.CPtrType(self.function.class_type) - else: - self.type = func_type.return_type - - if self.function.is_name or self.function.is_attribute: - if self.function.entry and self.function.entry.utility_code: - self.is_temp = 1 # currently doesn't work for self.calculate_result_code() - - if self.type.is_pyobject: - self.result_ctype = py_object_type - self.is_temp = 1 - elif func_type.exception_value is not None \ - or func_type.exception_check: - self.is_temp = 1 - elif self.type.is_memoryviewslice: - self.is_temp = 1 - # func_type.exception_check = True - - # Called in 'nogil' context? - self.nogil = env.nogil - if (self.nogil and - func_type.exception_check and - func_type.exception_check != '+'): - env.use_utility_code(pyerr_occurred_withgil_utility_code) - # C++ exception handler - if func_type.exception_check == '+': - if func_type.exception_value is None: - env.use_utility_code(UtilityCode.load_cached("CppExceptionConversion", "CppSupport.cpp")) - - def calculate_result_code(self): - return self.c_call_code() - - def c_call_code(self): - func_type = self.function_type() - if self.type is PyrexTypes.error_type or not func_type.is_cfunction: - return "" - formal_args = func_type.args - arg_list_code = [] - args = list(zip(formal_args, self.args)) - max_nargs = len(func_type.args) - expected_nargs = max_nargs - func_type.optional_arg_count - actual_nargs = len(self.args) - for formal_arg, actual_arg in args[:expected_nargs]: - arg_code = actual_arg.result_as(formal_arg.type) - arg_list_code.append(arg_code) - - if func_type.is_overridable: - arg_list_code.append(str(int(self.wrapper_call or self.function.entry.is_unbound_cmethod))) - - if func_type.optional_arg_count: - if expected_nargs == actual_nargs: - optional_args = 'NULL' - else: - optional_args = "&%s" % self.opt_arg_struct - arg_list_code.append(optional_args) - - for actual_arg in self.args[len(formal_args):]: - arg_list_code.append(actual_arg.result()) - - result = "%s(%s)" % (self.function.result(), ', '.join(arg_list_code)) - return result - - def generate_result_code(self, code): - func_type = self.function_type() - if self.function.is_name or self.function.is_attribute: - if self.function.entry and self.function.entry.utility_code: - code.globalstate.use_utility_code(self.function.entry.utility_code) - if func_type.is_pyobject: - arg_code = self.arg_tuple.py_result() - code.globalstate.use_utility_code(UtilityCode.load_cached( - "PyObjectCall", "ObjectHandling.c")) - code.putln( - "%s = __Pyx_PyObject_Call(%s, %s, NULL); %s" % ( - self.result(), - self.function.py_result(), - arg_code, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - elif func_type.is_cfunction: - if self.has_optional_args: - actual_nargs = len(self.args) - expected_nargs = len(func_type.args) - func_type.optional_arg_count - self.opt_arg_struct = code.funcstate.allocate_temp( - func_type.op_arg_struct.base_type, manage_ref=True) - code.putln("%s.%s = %s;" % ( - self.opt_arg_struct, - Naming.pyrex_prefix + "n", - len(self.args) - expected_nargs)) - args = list(zip(func_type.args, self.args)) - for formal_arg, actual_arg in args[expected_nargs:actual_nargs]: - code.putln("%s.%s = %s;" % ( - self.opt_arg_struct, - func_type.opt_arg_cname(formal_arg.name), - actual_arg.result_as(formal_arg.type))) - exc_checks = [] - if self.type.is_pyobject and self.is_temp: - exc_checks.append("!%s" % self.result()) - elif self.type.is_memoryviewslice: - assert self.is_temp - exc_checks.append(self.type.error_condition(self.result())) - else: - exc_val = func_type.exception_value - exc_check = func_type.exception_check - if exc_val is not None: - exc_checks.append("%s == %s" % (self.result(), exc_val)) - if exc_check: - if self.nogil: - exc_checks.append("__Pyx_ErrOccurredWithGIL()") - else: - exc_checks.append("PyErr_Occurred()") - if self.is_temp or exc_checks: - rhs = self.c_call_code() - if self.result(): - lhs = "%s = " % self.result() - if self.is_temp and self.type.is_pyobject: - #return_type = self.type # func_type.return_type - #print "SimpleCallNode.generate_result_code: casting", rhs, \ - # "from", return_type, "to pyobject" ### - rhs = typecast(py_object_type, self.type, rhs) - else: - lhs = "" - if func_type.exception_check == '+': - if func_type.exception_value is None: - raise_py_exception = "__Pyx_CppExn2PyErr();" - elif func_type.exception_value.type.is_pyobject: - raise_py_exception = 'try { throw; } catch(const std::exception& exn) { PyErr_SetString(%s, exn.what()); } catch(...) { PyErr_SetNone(%s); }' % ( - func_type.exception_value.entry.cname, - func_type.exception_value.entry.cname) - else: - raise_py_exception = '%s(); if (!PyErr_Occurred()) PyErr_SetString(PyExc_RuntimeError , "Error converting c++ exception.");' % func_type.exception_value.entry.cname - code.putln("try {") - code.putln("%s%s;" % (lhs, rhs)) - code.putln("} catch(...) {") - if self.nogil: - code.put_ensure_gil(declare_gilstate=True) - code.putln(raise_py_exception) - if self.nogil: - code.put_release_ensured_gil() - code.putln(code.error_goto(self.pos)) - code.putln("}") - else: - if exc_checks: - goto_error = code.error_goto_if(" && ".join(exc_checks), self.pos) - else: - goto_error = "" - code.putln("%s%s; %s" % (lhs, rhs, goto_error)) - if self.type.is_pyobject and self.result(): - code.put_gotref(self.py_result()) - if self.has_optional_args: - code.funcstate.release_temp(self.opt_arg_struct) - - -class InlinedDefNodeCallNode(CallNode): - # Inline call to defnode - # - # function PyCFunctionNode - # function_name NameNode - # args [ExprNode] - - subexprs = ['args', 'function_name'] - is_temp = 1 - type = py_object_type - function = None - function_name = None - - def can_be_inlined(self): - func_type= self.function.def_node - if func_type.star_arg or func_type.starstar_arg: - return False - if len(func_type.args) != len(self.args): - return False - return True - - def analyse_types(self, env): - self.function_name = self.function_name.analyse_types(env) - - self.args = [ arg.analyse_types(env) for arg in self.args ] - func_type = self.function.def_node - actual_nargs = len(self.args) - - # Coerce arguments - some_args_in_temps = False - for i in xrange(actual_nargs): - formal_type = func_type.args[i].type - arg = self.args[i].coerce_to(formal_type, env) - if arg.is_temp: - if i > 0: - # first argument in temp doesn't impact subsequent arguments - some_args_in_temps = True - elif arg.type.is_pyobject and not env.nogil: - if arg.nonlocally_immutable(): - # plain local variables are ok - pass - else: - # we do not safely own the argument's reference, - # but we must make sure it cannot be collected - # before we return from the function, so we create - # an owned temp reference to it - if i > 0: # first argument doesn't matter - some_args_in_temps = True - arg = arg.coerce_to_temp(env) - self.args[i] = arg - - if some_args_in_temps: - # if some args are temps and others are not, they may get - # constructed in the wrong order (temps first) => make - # sure they are either all temps or all not temps (except - # for the last argument, which is evaluated last in any - # case) - for i in xrange(actual_nargs-1): - arg = self.args[i] - if arg.nonlocally_immutable(): - # locals, C functions, unassignable types are safe. - pass - elif arg.type.is_cpp_class: - # Assignment has side effects, avoid. - pass - elif env.nogil and arg.type.is_pyobject: - # can't copy a Python reference into a temp in nogil - # env (this is safe: a construction would fail in - # nogil anyway) - pass - else: - #self.args[i] = arg.coerce_to_temp(env) - # instead: issue a warning - if i > 0: - warning(arg.pos, "Argument evaluation order in C function call is undefined and may not be as expected", 0) - break - return self - - def generate_result_code(self, code): - arg_code = [self.function_name.py_result()] - func_type = self.function.def_node - for arg, proto_arg in zip(self.args, func_type.args): - if arg.type.is_pyobject: - arg_code.append(arg.result_as(proto_arg.type)) - else: - arg_code.append(arg.result()) - arg_code = ', '.join(arg_code) - code.putln( - "%s = %s(%s); %s" % ( - self.result(), - self.function.def_node.entry.pyfunc_cname, - arg_code, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class PythonCapiFunctionNode(ExprNode): - subexprs = [] - - def __init__(self, pos, py_name, cname, func_type, utility_code = None): - ExprNode.__init__(self, pos, name=py_name, cname=cname, - type=func_type, utility_code=utility_code) - - def analyse_types(self, env): - return self - - def generate_result_code(self, code): - if self.utility_code: - code.globalstate.use_utility_code(self.utility_code) - - def calculate_result_code(self): - return self.cname - - -class PythonCapiCallNode(SimpleCallNode): - # Python C-API Function call (only created in transforms) - - # By default, we assume that the call never returns None, as this - # is true for most C-API functions in CPython. If this does not - # apply to a call, set the following to True (or None to inherit - # the default behaviour). - may_return_none = False - - def __init__(self, pos, function_name, func_type, - utility_code = None, py_name=None, **kwargs): - self.type = func_type.return_type - self.result_ctype = self.type - self.function = PythonCapiFunctionNode( - pos, py_name, function_name, func_type, - utility_code = utility_code) - # call this last so that we can override the constructed - # attributes above with explicit keyword arguments if required - SimpleCallNode.__init__(self, pos, **kwargs) - - -class GeneralCallNode(CallNode): - # General Python function call, including keyword, - # * and ** arguments. - # - # function ExprNode - # positional_args ExprNode Tuple of positional arguments - # keyword_args ExprNode or None Dict of keyword arguments - - type = py_object_type - - subexprs = ['function', 'positional_args', 'keyword_args'] - - nogil_check = Node.gil_error - - def compile_time_value(self, denv): - function = self.function.compile_time_value(denv) - positional_args = self.positional_args.compile_time_value(denv) - keyword_args = self.keyword_args.compile_time_value(denv) - try: - return function(*positional_args, **keyword_args) - except Exception, e: - self.compile_time_value_error(e) - - def explicit_args_kwds(self): - if (self.keyword_args and not isinstance(self.keyword_args, DictNode) or - not isinstance(self.positional_args, TupleNode)): - raise CompileError(self.pos, - 'Compile-time keyword arguments must be explicit.') - return self.positional_args.args, self.keyword_args - - def analyse_types(self, env): - if self.analyse_as_type_constructor(env): - return self - self.function = self.function.analyse_types(env) - if not self.function.type.is_pyobject: - if self.function.type.is_error: - self.type = error_type - return self - if hasattr(self.function, 'entry'): - node = self.map_to_simple_call_node() - if node is not None and node is not self: - return node.analyse_types(env) - elif self.function.entry.as_variable: - self.function = self.function.coerce_to_pyobject(env) - elif node is self: - error(self.pos, - "Non-trivial keyword arguments and starred " - "arguments not allowed in cdef functions.") - else: - # error was already reported - pass - else: - self.function = self.function.coerce_to_pyobject(env) - if self.keyword_args: - self.keyword_args = self.keyword_args.analyse_types(env) - self.positional_args = self.positional_args.analyse_types(env) - self.positional_args = \ - self.positional_args.coerce_to_pyobject(env) - function = self.function - if function.is_name and function.type_entry: - # We are calling an extension type constructor. As long - # as we do not support __new__(), the result type is clear - self.type = function.type_entry.type - self.result_ctype = py_object_type - self.may_return_none = False - else: - self.type = py_object_type - self.is_temp = 1 - return self - - def map_to_simple_call_node(self): - """ - Tries to map keyword arguments to declared positional arguments. - Returns self to try a Python call, None to report an error - or a SimpleCallNode if the mapping succeeds. - """ - if not isinstance(self.positional_args, TupleNode): - # has starred argument - return self - if not isinstance(self.keyword_args, DictNode): - # keywords come from arbitrary expression => nothing to do here - return self - function = self.function - entry = getattr(function, 'entry', None) - if not entry: - return self - function_type = entry.type - if function_type.is_ptr: - function_type = function_type.base_type - if not function_type.is_cfunction: - return self - - pos_args = self.positional_args.args - kwargs = self.keyword_args - declared_args = function_type.args - if entry.is_cmethod: - declared_args = declared_args[1:] # skip 'self' - - if len(pos_args) > len(declared_args): - error(self.pos, "function call got too many positional arguments, " - "expected %d, got %s" % (len(declared_args), - len(pos_args))) - return None - - matched_args = set([ arg.name for arg in declared_args[:len(pos_args)] - if arg.name ]) - unmatched_args = declared_args[len(pos_args):] - matched_kwargs_count = 0 - args = list(pos_args) - - # check for duplicate keywords - seen = set(matched_args) - has_errors = False - for arg in kwargs.key_value_pairs: - name = arg.key.value - if name in seen: - error(arg.pos, "argument '%s' passed twice" % name) - has_errors = True - # continue to report more errors if there are any - seen.add(name) - - # match keywords that are passed in order - for decl_arg, arg in zip(unmatched_args, kwargs.key_value_pairs): - name = arg.key.value - if decl_arg.name == name: - matched_args.add(name) - matched_kwargs_count += 1 - args.append(arg.value) - else: - break - - # match keyword arguments that are passed out-of-order, but keep - # the evaluation of non-simple arguments in order by moving them - # into temps - from Cython.Compiler.UtilNodes import EvalWithTempExprNode, LetRefNode - temps = [] - if len(kwargs.key_value_pairs) > matched_kwargs_count: - unmatched_args = declared_args[len(args):] - keywords = dict([ (arg.key.value, (i+len(pos_args), arg)) - for i, arg in enumerate(kwargs.key_value_pairs) ]) - first_missing_keyword = None - for decl_arg in unmatched_args: - name = decl_arg.name - if name not in keywords: - # missing keyword argument => either done or error - if not first_missing_keyword: - first_missing_keyword = name - continue - elif first_missing_keyword: - if entry.as_variable: - # we might be able to convert the function to a Python - # object, which then allows full calling semantics - # with default values in gaps - currently, we only - # support optional arguments at the end - return self - # wasn't the last keyword => gaps are not supported - error(self.pos, "C function call is missing " - "argument '%s'" % first_missing_keyword) - return None - pos, arg = keywords[name] - matched_args.add(name) - matched_kwargs_count += 1 - if arg.value.is_simple(): - args.append(arg.value) - else: - temp = LetRefNode(arg.value) - assert temp.is_simple() - args.append(temp) - temps.append((pos, temp)) - - if temps: - # may have to move preceding non-simple args into temps - final_args = [] - new_temps = [] - first_temp_arg = temps[0][-1] - for arg_value in args: - if arg_value is first_temp_arg: - break # done - if arg_value.is_simple(): - final_args.append(arg_value) - else: - temp = LetRefNode(arg_value) - new_temps.append(temp) - final_args.append(temp) - if new_temps: - args = final_args - temps = new_temps + [ arg for i,arg in sorted(temps) ] - - # check for unexpected keywords - for arg in kwargs.key_value_pairs: - name = arg.key.value - if name not in matched_args: - has_errors = True - error(arg.pos, - "C function got unexpected keyword argument '%s'" % - name) - - if has_errors: - # error was reported already - return None - - # all keywords mapped to positional arguments - # if we are missing arguments, SimpleCallNode will figure it out - node = SimpleCallNode(self.pos, function=function, args=args) - for temp in temps[::-1]: - node = EvalWithTempExprNode(temp, node) - return node - - def generate_result_code(self, code): - if self.type.is_error: return - if self.keyword_args: - kwargs = self.keyword_args.py_result() - else: - kwargs = 'NULL' - code.globalstate.use_utility_code(UtilityCode.load_cached( - "PyObjectCall", "ObjectHandling.c")) - code.putln( - "%s = __Pyx_PyObject_Call(%s, %s, %s); %s" % ( - self.result(), - self.function.py_result(), - self.positional_args.py_result(), - kwargs, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class AsTupleNode(ExprNode): - # Convert argument to tuple. Used for normalising - # the * argument of a function call. - # - # arg ExprNode - - subexprs = ['arg'] - - def calculate_constant_result(self): - self.constant_result = tuple(self.arg.constant_result) - - def compile_time_value(self, denv): - arg = self.arg.compile_time_value(denv) - try: - return tuple(arg) - except Exception, e: - self.compile_time_value_error(e) - - def analyse_types(self, env): - self.arg = self.arg.analyse_types(env) - self.arg = self.arg.coerce_to_pyobject(env) - self.type = tuple_type - self.is_temp = 1 - return self - - def may_be_none(self): - return False - - nogil_check = Node.gil_error - gil_message = "Constructing Python tuple" - - def generate_result_code(self, code): - code.putln( - "%s = PySequence_Tuple(%s); %s" % ( - self.result(), - self.arg.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class AttributeNode(ExprNode): - # obj.attribute - # - # obj ExprNode - # attribute string - # needs_none_check boolean Used if obj is an extension type. - # If set to True, it is known that the type is not None. - # - # Used internally: - # - # is_py_attr boolean Is a Python getattr operation - # member string C name of struct member - # is_called boolean Function call is being done on result - # entry Entry Symbol table entry of attribute - - is_attribute = 1 - subexprs = ['obj'] - - type = PyrexTypes.error_type - entry = None - is_called = 0 - needs_none_check = True - is_memslice_transpose = False - is_special_lookup = False - - def as_cython_attribute(self): - if (isinstance(self.obj, NameNode) and - self.obj.is_cython_module and not - self.attribute == u"parallel"): - return self.attribute - - cy = self.obj.as_cython_attribute() - if cy: - return "%s.%s" % (cy, self.attribute) - return None - - def coerce_to(self, dst_type, env): - # If coercing to a generic pyobject and this is a cpdef function - # we can create the corresponding attribute - if dst_type is py_object_type: - entry = self.entry - if entry and entry.is_cfunction and entry.as_variable: - # must be a cpdef function - self.is_temp = 1 - self.entry = entry.as_variable - self.analyse_as_python_attribute(env) - return self - return ExprNode.coerce_to(self, dst_type, env) - - def calculate_constant_result(self): - attr = self.attribute - if attr.startswith("__") and attr.endswith("__"): - return - self.constant_result = getattr(self.obj.constant_result, attr) - - def compile_time_value(self, denv): - attr = self.attribute - if attr.startswith("__") and attr.endswith("__"): - error(self.pos, - "Invalid attribute name '%s' in compile-time expression" % attr) - return None - obj = self.obj.compile_time_value(denv) - try: - return getattr(obj, attr) - except Exception, e: - self.compile_time_value_error(e) - - def type_dependencies(self, env): - return self.obj.type_dependencies(env) - - def infer_type(self, env): - # FIXME: this is way too redundant with analyse_types() - node = self.analyse_as_cimported_attribute_node(env, target=False) - if node is not None: - return node.entry.type - node = self.analyse_as_unbound_cmethod_node(env) - if node is not None: - return node.entry.type - obj_type = self.obj.infer_type(env) - self.analyse_attribute(env, obj_type=obj_type) - if obj_type.is_builtin_type and self.type.is_cfunction: - # special case: C-API replacements for C methods of - # builtin types cannot be inferred as C functions as - # that would prevent their use as bound methods - return py_object_type - return self.type - - def analyse_target_declaration(self, env): - pass - - def analyse_target_types(self, env): - node = self.analyse_types(env, target = 1) - if node.type.is_const: - error(self.pos, "Assignment to const attribute '%s'" % self.attribute) - if not node.is_lvalue(): - error(self.pos, "Assignment to non-lvalue of type '%s'" % self.type) - return node - - def analyse_types(self, env, target = 0): - self.initialized_check = env.directives['initializedcheck'] - node = self.analyse_as_cimported_attribute_node(env, target) - if node is None and not target: - node = self.analyse_as_unbound_cmethod_node(env) - if node is None: - node = self.analyse_as_ordinary_attribute_node(env, target) - assert node is not None - if node.entry: - node.entry.used = True - if node.is_attribute: - node.wrap_obj_in_nonecheck(env) - return node - - def analyse_as_cimported_attribute_node(self, env, target): - # Try to interpret this as a reference to an imported - # C const, type, var or function. If successful, mutates - # this node into a NameNode and returns 1, otherwise - # returns 0. - module_scope = self.obj.analyse_as_module(env) - if module_scope: - entry = module_scope.lookup_here(self.attribute) - if entry and ( - entry.is_cglobal or entry.is_cfunction - or entry.is_type or entry.is_const): - return self.as_name_node(env, entry, target) - return None - - def analyse_as_unbound_cmethod_node(self, env): - # Try to interpret this as a reference to an unbound - # C method of an extension type or builtin type. If successful, - # creates a corresponding NameNode and returns it, otherwise - # returns None. - type = self.obj.analyse_as_extension_type(env) - if type: - entry = type.scope.lookup_here(self.attribute) - if entry and entry.is_cmethod: - if type.is_builtin_type: - if not self.is_called: - # must handle this as Python object - return None - ubcm_entry = entry - else: - # Create a temporary entry describing the C method - # as an ordinary function. - ubcm_entry = Symtab.Entry(entry.name, - "%s->%s" % (type.vtabptr_cname, entry.cname), - entry.type) - ubcm_entry.is_cfunction = 1 - ubcm_entry.func_cname = entry.func_cname - ubcm_entry.is_unbound_cmethod = 1 - return self.as_name_node(env, ubcm_entry, target=False) - return None - - def analyse_as_type(self, env): - module_scope = self.obj.analyse_as_module(env) - if module_scope: - return module_scope.lookup_type(self.attribute) - if not self.obj.is_string_literal: - base_type = self.obj.analyse_as_type(env) - if base_type and hasattr(base_type, 'scope') and base_type.scope is not None: - return base_type.scope.lookup_type(self.attribute) - return None - - def analyse_as_extension_type(self, env): - # Try to interpret this as a reference to an extension type - # in a cimported module. Returns the extension type, or None. - module_scope = self.obj.analyse_as_module(env) - if module_scope: - entry = module_scope.lookup_here(self.attribute) - if entry and entry.is_type: - if entry.type.is_extension_type or entry.type.is_builtin_type: - return entry.type - return None - - def analyse_as_module(self, env): - # Try to interpret this as a reference to a cimported module - # in another cimported module. Returns the module scope, or None. - module_scope = self.obj.analyse_as_module(env) - if module_scope: - entry = module_scope.lookup_here(self.attribute) - if entry and entry.as_module: - return entry.as_module - return None - - def as_name_node(self, env, entry, target): - # Create a corresponding NameNode from this node and complete the - # analyse_types phase. - node = NameNode.from_node(self, name=self.attribute, entry=entry) - if target: - node = node.analyse_target_types(env) - else: - node = node.analyse_rvalue_entry(env) - node.entry.used = 1 - return node - - def analyse_as_ordinary_attribute_node(self, env, target): - self.obj = self.obj.analyse_types(env) - self.analyse_attribute(env) - if self.entry and self.entry.is_cmethod and not self.is_called: -# error(self.pos, "C method can only be called") - pass - ## Reference to C array turns into pointer to first element. - #while self.type.is_array: - # self.type = self.type.element_ptr_type() - if self.is_py_attr: - if not target: - self.is_temp = 1 - self.result_ctype = py_object_type - elif target and self.obj.type.is_builtin_type: - error(self.pos, "Assignment to an immutable object field") - #elif self.type.is_memoryviewslice and not target: - # self.is_temp = True - return self - - def analyse_attribute(self, env, obj_type = None): - # Look up attribute and set self.type and self.member. - immutable_obj = obj_type is not None # used during type inference - self.is_py_attr = 0 - self.member = self.attribute - if obj_type is None: - if self.obj.type.is_string or self.obj.type.is_pyunicode_ptr: - self.obj = self.obj.coerce_to_pyobject(env) - obj_type = self.obj.type - else: - if obj_type.is_string or obj_type.is_pyunicode_ptr: - obj_type = py_object_type - if obj_type.is_ptr or obj_type.is_array: - obj_type = obj_type.base_type - self.op = "->" - elif obj_type.is_extension_type or obj_type.is_builtin_type: - self.op = "->" - else: - self.op = "." - if obj_type.has_attributes: - if obj_type.attributes_known(): - if (obj_type.is_memoryviewslice and not - obj_type.scope.lookup_here(self.attribute)): - if self.attribute == 'T': - self.is_memslice_transpose = True - self.is_temp = True - self.use_managed_ref = True - self.type = self.obj.type - return - else: - obj_type.declare_attribute(self.attribute, env, self.pos) - entry = obj_type.scope.lookup_here(self.attribute) - if entry and entry.is_member: - entry = None - else: - error(self.pos, - "Cannot select attribute of incomplete type '%s'" - % obj_type) - self.type = PyrexTypes.error_type - return - self.entry = entry - if entry: - if obj_type.is_extension_type and entry.name == "__weakref__": - error(self.pos, "Illegal use of special attribute __weakref__") - - # def methods need the normal attribute lookup - # because they do not have struct entries - # fused function go through assignment synthesis - # (foo = pycfunction(foo_func_obj)) and need to go through - # regular Python lookup as well - if (entry.is_variable and not entry.fused_cfunction) or entry.is_cmethod: - self.type = entry.type - self.member = entry.cname - return - else: - # If it's not a variable or C method, it must be a Python - # method of an extension type, so we treat it like a Python - # attribute. - pass - # If we get here, the base object is not a struct/union/extension - # type, or it is an extension type and the attribute is either not - # declared or is declared as a Python method. Treat it as a Python - # attribute reference. - self.analyse_as_python_attribute(env, obj_type, immutable_obj) - - def analyse_as_python_attribute(self, env, obj_type=None, immutable_obj=False): - if obj_type is None: - obj_type = self.obj.type - # mangle private '__*' Python attributes used inside of a class - self.attribute = env.mangle_class_private_name(self.attribute) - self.member = self.attribute - self.type = py_object_type - self.is_py_attr = 1 - if not obj_type.is_pyobject and not obj_type.is_error: - if obj_type.can_coerce_to_pyobject(env): - if not immutable_obj: - self.obj = self.obj.coerce_to_pyobject(env) - elif (obj_type.is_cfunction and (self.obj.is_name or self.obj.is_attribute) - and self.obj.entry.as_variable - and self.obj.entry.as_variable.type.is_pyobject): - # might be an optimised builtin function => unpack it - if not immutable_obj: - self.obj = self.obj.coerce_to_pyobject(env) - else: - error(self.pos, - "Object of type '%s' has no attribute '%s'" % - (obj_type, self.attribute)) - - def wrap_obj_in_nonecheck(self, env): - if not env.directives['nonecheck']: - return - - msg = None - format_args = () - if (self.obj.type.is_extension_type and self.needs_none_check and not - self.is_py_attr): - msg = "'NoneType' object has no attribute '%s'" - format_args = (self.attribute,) - elif self.obj.type.is_memoryviewslice: - if self.is_memslice_transpose: - msg = "Cannot transpose None memoryview slice" - else: - entry = self.obj.type.scope.lookup_here(self.attribute) - if entry: - # copy/is_c_contig/shape/strides etc - msg = "Cannot access '%s' attribute of None memoryview slice" - format_args = (entry.name,) - - if msg: - self.obj = self.obj.as_none_safe_node(msg, 'PyExc_AttributeError', - format_args=format_args) - - - def nogil_check(self, env): - if self.is_py_attr: - self.gil_error() - elif self.type.is_memoryviewslice: - import MemoryView - MemoryView.err_if_nogil_initialized_check(self.pos, env, 'attribute') - - gil_message = "Accessing Python attribute" - - def is_simple(self): - if self.obj: - return self.result_in_temp() or self.obj.is_simple() - else: - return NameNode.is_simple(self) - - def is_lvalue(self): - if self.obj: - return not self.type.is_array - else: - return NameNode.is_lvalue(self) - - def is_ephemeral(self): - if self.obj: - return self.obj.is_ephemeral() - else: - return NameNode.is_ephemeral(self) - - def calculate_result_code(self): - #print "AttributeNode.calculate_result_code:", self.member ### - #print "...obj node =", self.obj, "code", self.obj.result() ### - #print "...obj type", self.obj.type, "ctype", self.obj.ctype() ### - obj = self.obj - obj_code = obj.result_as(obj.type) - #print "...obj_code =", obj_code ### - if self.entry and self.entry.is_cmethod: - if obj.type.is_extension_type and not self.entry.is_builtin_cmethod: - if self.entry.final_func_cname: - return self.entry.final_func_cname - - if self.type.from_fused: - # If the attribute was specialized through indexing, make - # sure to get the right fused name, as our entry was - # replaced by our parent index node - # (AnalyseExpressionsTransform) - self.member = self.entry.cname - - return "((struct %s *)%s%s%s)->%s" % ( - obj.type.vtabstruct_cname, obj_code, self.op, - obj.type.vtabslot_cname, self.member) - elif self.result_is_used: - return self.member - # Generating no code at all for unused access to optimised builtin - # methods fixes the problem that some optimisations only exist as - # macros, i.e. there is no function pointer to them, so we would - # generate invalid C code here. - return - elif obj.type.is_complex: - return "__Pyx_C%s(%s)" % (self.member.upper(), obj_code) - else: - if obj.type.is_builtin_type and self.entry and self.entry.is_variable: - # accessing a field of a builtin type, need to cast better than result_as() does - obj_code = obj.type.cast_code(obj.result(), to_object_struct = True) - return "%s%s%s" % (obj_code, self.op, self.member) - - def generate_result_code(self, code): - if self.is_py_attr: - if self.is_special_lookup: - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyObjectLookupSpecial", "ObjectHandling.c")) - lookup_func_name = '__Pyx_PyObject_LookupSpecial' - else: - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyObjectGetAttrStr", "ObjectHandling.c")) - lookup_func_name = '__Pyx_PyObject_GetAttrStr' - code.putln( - '%s = %s(%s, %s); %s' % ( - self.result(), - lookup_func_name, - self.obj.py_result(), - code.intern_identifier(self.attribute), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - elif self.type.is_memoryviewslice: - if self.is_memslice_transpose: - # transpose the slice - for access, packing in self.type.axes: - if access == 'ptr': - error(self.pos, "Transposing not supported for slices " - "with indirect dimensions") - return - - code.putln("%s = %s;" % (self.result(), self.obj.result())) - if self.obj.is_name or (self.obj.is_attribute and - self.obj.is_memslice_transpose): - code.put_incref_memoryviewslice(self.result(), have_gil=True) - - T = "__pyx_memslice_transpose(&%s) == 0" - code.putln(code.error_goto_if(T % self.result(), self.pos)) - elif self.initialized_check: - code.putln( - 'if (unlikely(!%s.memview)) {' - 'PyErr_SetString(PyExc_AttributeError,' - '"Memoryview is not initialized");' - '%s' - '}' % (self.result(), code.error_goto(self.pos))) - else: - # result_code contains what is needed, but we may need to insert - # a check and raise an exception - if self.obj.type.is_extension_type: - pass - elif self.entry and self.entry.is_cmethod and self.entry.utility_code: - # C method implemented as function call with utility code - code.globalstate.use_utility_code(self.entry.utility_code) - - def generate_disposal_code(self, code): - if self.is_temp and self.type.is_memoryviewslice and self.is_memslice_transpose: - # mirror condition for putting the memview incref here: - if self.obj.is_name or (self.obj.is_attribute and - self.obj.is_memslice_transpose): - code.put_xdecref_memoryviewslice( - self.result(), have_gil=True) - else: - ExprNode.generate_disposal_code(self, code) - - def generate_assignment_code(self, rhs, code): - self.obj.generate_evaluation_code(code) - if self.is_py_attr: - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyObjectSetAttrStr", "ObjectHandling.c")) - code.put_error_if_neg(self.pos, - '__Pyx_PyObject_SetAttrStr(%s, %s, %s)' % ( - self.obj.py_result(), - code.intern_identifier(self.attribute), - rhs.py_result())) - rhs.generate_disposal_code(code) - rhs.free_temps(code) - elif self.obj.type.is_complex: - code.putln("__Pyx_SET_C%s(%s, %s);" % ( - self.member.upper(), - self.obj.result_as(self.obj.type), - rhs.result_as(self.ctype()))) - else: - select_code = self.result() - if self.type.is_pyobject and self.use_managed_ref: - rhs.make_owned_reference(code) - code.put_giveref(rhs.py_result()) - code.put_gotref(select_code) - code.put_decref(select_code, self.ctype()) - elif self.type.is_memoryviewslice: - import MemoryView - MemoryView.put_assign_to_memviewslice( - select_code, rhs, rhs.result(), self.type, code) - - if not self.type.is_memoryviewslice: - code.putln( - "%s = %s;" % ( - select_code, - rhs.result_as(self.ctype()))) - #rhs.result())) - rhs.generate_post_assignment_code(code) - rhs.free_temps(code) - self.obj.generate_disposal_code(code) - self.obj.free_temps(code) - - def generate_deletion_code(self, code, ignore_nonexisting=False): - self.obj.generate_evaluation_code(code) - if self.is_py_attr or (self.entry.scope.is_property_scope - and u'__del__' in self.entry.scope.entries): - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyObjectSetAttrStr", "ObjectHandling.c")) - code.put_error_if_neg(self.pos, - '__Pyx_PyObject_DelAttrStr(%s, %s)' % ( - self.obj.py_result(), - code.intern_identifier(self.attribute))) - else: - error(self.pos, "Cannot delete C attribute of extension type") - self.obj.generate_disposal_code(code) - self.obj.free_temps(code) - - def annotate(self, code): - if self.is_py_attr: - style, text = 'py_attr', 'python attribute (%s)' - else: - style, text = 'c_attr', 'c attribute (%s)' - code.annotate(self.pos, AnnotationItem(style, text % self.type, size=len(self.attribute))) - - -#------------------------------------------------------------------- -# -# Constructor nodes -# -#------------------------------------------------------------------- - -class StarredTargetNode(ExprNode): - # A starred expression like "*a" - # - # This is only allowed in sequence assignment targets such as - # - # a, *b = (1,2,3,4) => a = 1 ; b = [2,3,4] - # - # and will be removed during type analysis (or generate an error - # if it's found at unexpected places). - # - # target ExprNode - - subexprs = ['target'] - is_starred = 1 - type = py_object_type - is_temp = 1 - - def __init__(self, pos, target): - ExprNode.__init__(self, pos) - self.target = target - - def analyse_declarations(self, env): - error(self.pos, "can use starred expression only as assignment target") - self.target.analyse_declarations(env) - - def analyse_types(self, env): - error(self.pos, "can use starred expression only as assignment target") - self.target = self.target.analyse_types(env) - self.type = self.target.type - return self - - def analyse_target_declaration(self, env): - self.target.analyse_target_declaration(env) - - def analyse_target_types(self, env): - self.target = self.target.analyse_target_types(env) - self.type = self.target.type - return self - - def calculate_result_code(self): - return "" - - def generate_result_code(self, code): - pass - - -class SequenceNode(ExprNode): - # Base class for list and tuple constructor nodes. - # Contains common code for performing sequence unpacking. - # - # args [ExprNode] - # unpacked_items [ExprNode] or None - # coerced_unpacked_items [ExprNode] or None - # mult_factor ExprNode the integer number of content repetitions ([1,2]*3) - - subexprs = ['args', 'mult_factor'] - - is_sequence_constructor = 1 - unpacked_items = None - mult_factor = None - slow = False # trade speed for code size (e.g. use PyTuple_Pack()) - - def compile_time_value_list(self, denv): - return [arg.compile_time_value(denv) for arg in self.args] - - def replace_starred_target_node(self): - # replace a starred node in the targets by the contained expression - self.starred_assignment = False - args = [] - for arg in self.args: - if arg.is_starred: - if self.starred_assignment: - error(arg.pos, "more than 1 starred expression in assignment") - self.starred_assignment = True - arg = arg.target - arg.is_starred = True - args.append(arg) - self.args = args - - def analyse_target_declaration(self, env): - self.replace_starred_target_node() - for arg in self.args: - arg.analyse_target_declaration(env) - - def analyse_types(self, env, skip_children=False): - for i in range(len(self.args)): - arg = self.args[i] - if not skip_children: arg = arg.analyse_types(env) - self.args[i] = arg.coerce_to_pyobject(env) - if self.mult_factor: - self.mult_factor = self.mult_factor.analyse_types(env) - if not self.mult_factor.type.is_int: - self.mult_factor = self.mult_factor.coerce_to_pyobject(env) - self.is_temp = 1 - # not setting self.type here, subtypes do this - return self - - def may_be_none(self): - return False - - def analyse_target_types(self, env): - if self.mult_factor: - error(self.pos, "can't assign to multiplied sequence") - self.unpacked_items = [] - self.coerced_unpacked_items = [] - self.any_coerced_items = False - for i, arg in enumerate(self.args): - arg = self.args[i] = arg.analyse_target_types(env) - if arg.is_starred: - if not arg.type.assignable_from(Builtin.list_type): - error(arg.pos, - "starred target must have Python object (list) type") - if arg.type is py_object_type: - arg.type = Builtin.list_type - unpacked_item = PyTempNode(self.pos, env) - coerced_unpacked_item = unpacked_item.coerce_to(arg.type, env) - if unpacked_item is not coerced_unpacked_item: - self.any_coerced_items = True - self.unpacked_items.append(unpacked_item) - self.coerced_unpacked_items.append(coerced_unpacked_item) - self.type = py_object_type - return self - - def generate_result_code(self, code): - self.generate_operation_code(code) - - def generate_sequence_packing_code(self, code, target=None, plain=False): - if target is None: - target = self.result() - size_factor = c_mult = '' - mult_factor = None - - if self.mult_factor and not plain: - mult_factor = self.mult_factor - if mult_factor.type.is_int: - c_mult = mult_factor.result() - if isinstance(mult_factor.constant_result, (int,long)) \ - and mult_factor.constant_result > 0: - size_factor = ' * %s' % mult_factor.constant_result - else: - size_factor = ' * ((%s<0) ? 0:%s)' % (c_mult, c_mult) - - if self.type is Builtin.tuple_type and (self.is_literal or self.slow) and not c_mult: - # use PyTuple_Pack() to avoid generating huge amounts of one-time code - code.putln('%s = PyTuple_Pack(%d, %s); %s' % ( - target, - len(self.args), - ', '.join([ arg.py_result() for arg in self.args ]), - code.error_goto_if_null(target, self.pos))) - code.put_gotref(target) - else: - # build the tuple/list step by step, potentially multiplying it as we go - if self.type is Builtin.list_type: - create_func, set_item_func = 'PyList_New', 'PyList_SET_ITEM' - elif self.type is Builtin.tuple_type: - create_func, set_item_func = 'PyTuple_New', 'PyTuple_SET_ITEM' - else: - raise InternalError("sequence packing for unexpected type %s" % self.type) - arg_count = len(self.args) - code.putln("%s = %s(%s%s); %s" % ( - target, create_func, arg_count, size_factor, - code.error_goto_if_null(target, self.pos))) - code.put_gotref(target) - - if c_mult: - # FIXME: can't use a temp variable here as the code may - # end up in the constant building function. Temps - # currently don't work there. - - #counter = code.funcstate.allocate_temp(mult_factor.type, manage_ref=False) - counter = Naming.quick_temp_cname - code.putln('{ Py_ssize_t %s;' % counter) - if arg_count == 1: - offset = counter - else: - offset = '%s * %s' % (counter, arg_count) - code.putln('for (%s=0; %s < %s; %s++) {' % ( - counter, counter, c_mult, counter - )) - else: - offset = '' - - for i in xrange(arg_count): - arg = self.args[i] - if c_mult or not arg.result_in_temp(): - code.put_incref(arg.result(), arg.ctype()) - code.putln("%s(%s, %s, %s);" % ( - set_item_func, - target, - (offset and i) and ('%s + %s' % (offset, i)) or (offset or i), - arg.py_result())) - code.put_giveref(arg.py_result()) - - if c_mult: - code.putln('}') - #code.funcstate.release_temp(counter) - code.putln('}') - - if mult_factor is not None and mult_factor.type.is_pyobject: - code.putln('{ PyObject* %s = PyNumber_InPlaceMultiply(%s, %s); %s' % ( - Naming.quick_temp_cname, target, mult_factor.py_result(), - code.error_goto_if_null(Naming.quick_temp_cname, self.pos) - )) - code.put_gotref(Naming.quick_temp_cname) - code.put_decref(target, py_object_type) - code.putln('%s = %s;' % (target, Naming.quick_temp_cname)) - code.putln('}') - - def generate_subexpr_disposal_code(self, code): - if self.mult_factor and self.mult_factor.type.is_int: - super(SequenceNode, self).generate_subexpr_disposal_code(code) - elif self.type is Builtin.tuple_type and (self.is_literal or self.slow): - super(SequenceNode, self).generate_subexpr_disposal_code(code) - else: - # We call generate_post_assignment_code here instead - # of generate_disposal_code, because values were stored - # in the tuple using a reference-stealing operation. - for arg in self.args: - arg.generate_post_assignment_code(code) - # Should NOT call free_temps -- this is invoked by the default - # generate_evaluation_code which will do that. - if self.mult_factor: - self.mult_factor.generate_disposal_code(code) - - def generate_assignment_code(self, rhs, code): - if self.starred_assignment: - self.generate_starred_assignment_code(rhs, code) - else: - self.generate_parallel_assignment_code(rhs, code) - - for item in self.unpacked_items: - item.release(code) - rhs.free_temps(code) - - _func_iternext_type = PyrexTypes.CPtrType(PyrexTypes.CFuncType( - PyrexTypes.py_object_type, [ - PyrexTypes.CFuncTypeArg("it", PyrexTypes.py_object_type, None), - ])) - - def generate_parallel_assignment_code(self, rhs, code): - # Need to work around the fact that generate_evaluation_code - # allocates the temps in a rather hacky way -- the assignment - # is evaluated twice, within each if-block. - for item in self.unpacked_items: - item.allocate(code) - special_unpack = (rhs.type is py_object_type - or rhs.type in (tuple_type, list_type) - or not rhs.type.is_builtin_type) - long_enough_for_a_loop = len(self.unpacked_items) > 3 - - if special_unpack: - self.generate_special_parallel_unpacking_code( - code, rhs, use_loop=long_enough_for_a_loop) - else: - code.putln("{") - self.generate_generic_parallel_unpacking_code( - code, rhs, self.unpacked_items, use_loop=long_enough_for_a_loop) - code.putln("}") - - for value_node in self.coerced_unpacked_items: - value_node.generate_evaluation_code(code) - for i in range(len(self.args)): - self.args[i].generate_assignment_code( - self.coerced_unpacked_items[i], code) - - def generate_special_parallel_unpacking_code(self, code, rhs, use_loop): - sequence_type_test = '1' - none_check = "likely(%s != Py_None)" % rhs.py_result() - if rhs.type is list_type: - sequence_types = ['List'] - if rhs.may_be_none(): - sequence_type_test = none_check - elif rhs.type is tuple_type: - sequence_types = ['Tuple'] - if rhs.may_be_none(): - sequence_type_test = none_check - else: - sequence_types = ['Tuple', 'List'] - tuple_check = 'likely(PyTuple_CheckExact(%s))' % rhs.py_result() - list_check = 'PyList_CheckExact(%s)' % rhs.py_result() - sequence_type_test = "(%s) || (%s)" % (tuple_check, list_check) - - code.putln("if (%s) {" % sequence_type_test) - code.putln("PyObject* sequence = %s;" % rhs.py_result()) - - # list/tuple => check size - code.putln("#if CYTHON_COMPILING_IN_CPYTHON") - code.putln("Py_ssize_t size = Py_SIZE(sequence);") - code.putln("#else") - code.putln("Py_ssize_t size = PySequence_Size(sequence);") # < 0 => exception - code.putln("#endif") - code.putln("if (unlikely(size != %d)) {" % len(self.args)) - code.globalstate.use_utility_code(raise_too_many_values_to_unpack) - code.putln("if (size > %d) __Pyx_RaiseTooManyValuesError(%d);" % ( - len(self.args), len(self.args))) - code.globalstate.use_utility_code(raise_need_more_values_to_unpack) - code.putln("else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);") - code.putln(code.error_goto(self.pos)) - code.putln("}") - - code.putln("#if CYTHON_COMPILING_IN_CPYTHON") - # unpack items from list/tuple in unrolled loop (can't fail) - if len(sequence_types) == 2: - code.putln("if (likely(Py%s_CheckExact(sequence))) {" % sequence_types[0]) - for i, item in enumerate(self.unpacked_items): - code.putln("%s = Py%s_GET_ITEM(sequence, %d); " % ( - item.result(), sequence_types[0], i)) - if len(sequence_types) == 2: - code.putln("} else {") - for i, item in enumerate(self.unpacked_items): - code.putln("%s = Py%s_GET_ITEM(sequence, %d); " % ( - item.result(), sequence_types[1], i)) - code.putln("}") - for item in self.unpacked_items: - code.put_incref(item.result(), item.ctype()) - - code.putln("#else") - # in non-CPython, use the PySequence protocol (which can fail) - if not use_loop: - for i, item in enumerate(self.unpacked_items): - code.putln("%s = PySequence_ITEM(sequence, %d); %s" % ( - item.result(), i, - code.error_goto_if_null(item.result(), self.pos))) - code.put_gotref(item.result()) - else: - code.putln("{") - code.putln("Py_ssize_t i;") - code.putln("PyObject** temps[%s] = {%s};" % ( - len(self.unpacked_items), - ','.join(['&%s' % item.result() for item in self.unpacked_items]))) - code.putln("for (i=0; i < %s; i++) {" % len(self.unpacked_items)) - code.putln("PyObject* item = PySequence_ITEM(sequence, i); %s" % ( - code.error_goto_if_null('item', self.pos))) - code.put_gotref('item') - code.putln("*(temps[i]) = item;") - code.putln("}") - code.putln("}") - - code.putln("#endif") - rhs.generate_disposal_code(code) - - if sequence_type_test == '1': - code.putln("}") # all done - elif sequence_type_test == none_check: - # either tuple/list or None => save some code by generating the error directly - code.putln("} else {") - code.globalstate.use_utility_code( - UtilityCode.load_cached("RaiseNoneIterError", "ObjectHandling.c")) - code.putln("__Pyx_RaiseNoneNotIterableError(); %s" % code.error_goto(self.pos)) - code.putln("}") # all done - else: - code.putln("} else {") # needs iteration fallback code - self.generate_generic_parallel_unpacking_code( - code, rhs, self.unpacked_items, use_loop=use_loop) - code.putln("}") - - def generate_generic_parallel_unpacking_code(self, code, rhs, unpacked_items, use_loop, terminate=True): - code.globalstate.use_utility_code(raise_need_more_values_to_unpack) - code.globalstate.use_utility_code(UtilityCode.load_cached("IterFinish", "ObjectHandling.c")) - code.putln("Py_ssize_t index = -1;") # must be at the start of a C block! - - if use_loop: - code.putln("PyObject** temps[%s] = {%s};" % ( - len(self.unpacked_items), - ','.join(['&%s' % item.result() for item in unpacked_items]))) - - iterator_temp = code.funcstate.allocate_temp(py_object_type, manage_ref=True) - code.putln( - "%s = PyObject_GetIter(%s); %s" % ( - iterator_temp, - rhs.py_result(), - code.error_goto_if_null(iterator_temp, self.pos))) - code.put_gotref(iterator_temp) - rhs.generate_disposal_code(code) - - iternext_func = code.funcstate.allocate_temp(self._func_iternext_type, manage_ref=False) - code.putln("%s = Py_TYPE(%s)->tp_iternext;" % ( - iternext_func, iterator_temp)) - - unpacking_error_label = code.new_label('unpacking_failed') - unpack_code = "%s(%s)" % (iternext_func, iterator_temp) - if use_loop: - code.putln("for (index=0; index < %s; index++) {" % len(unpacked_items)) - code.put("PyObject* item = %s; if (unlikely(!item)) " % unpack_code) - code.put_goto(unpacking_error_label) - code.put_gotref("item") - code.putln("*(temps[index]) = item;") - code.putln("}") - else: - for i, item in enumerate(unpacked_items): - code.put( - "index = %d; %s = %s; if (unlikely(!%s)) " % ( - i, - item.result(), - unpack_code, - item.result())) - code.put_goto(unpacking_error_label) - code.put_gotref(item.py_result()) - - if terminate: - code.globalstate.use_utility_code( - UtilityCode.load_cached("UnpackItemEndCheck", "ObjectHandling.c")) - code.put_error_if_neg(self.pos, "__Pyx_IternextUnpackEndCheck(%s, %d)" % ( - unpack_code, - len(unpacked_items))) - code.putln("%s = NULL;" % iternext_func) - code.put_decref_clear(iterator_temp, py_object_type) - - unpacking_done_label = code.new_label('unpacking_done') - code.put_goto(unpacking_done_label) - - code.put_label(unpacking_error_label) - code.put_decref_clear(iterator_temp, py_object_type) - code.putln("%s = NULL;" % iternext_func) - code.putln("if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);") - code.putln(code.error_goto(self.pos)) - code.put_label(unpacking_done_label) - - code.funcstate.release_temp(iternext_func) - if terminate: - code.funcstate.release_temp(iterator_temp) - iterator_temp = None - - return iterator_temp - - def generate_starred_assignment_code(self, rhs, code): - for i, arg in enumerate(self.args): - if arg.is_starred: - starred_target = self.unpacked_items[i] - unpacked_fixed_items_left = self.unpacked_items[:i] - unpacked_fixed_items_right = self.unpacked_items[i+1:] - break - else: - assert False - - iterator_temp = None - if unpacked_fixed_items_left: - for item in unpacked_fixed_items_left: - item.allocate(code) - code.putln('{') - iterator_temp = self.generate_generic_parallel_unpacking_code( - code, rhs, unpacked_fixed_items_left, - use_loop=True, terminate=False) - for i, item in enumerate(unpacked_fixed_items_left): - value_node = self.coerced_unpacked_items[i] - value_node.generate_evaluation_code(code) - code.putln('}') - - starred_target.allocate(code) - target_list = starred_target.result() - code.putln("%s = PySequence_List(%s); %s" % ( - target_list, - iterator_temp or rhs.py_result(), - code.error_goto_if_null(target_list, self.pos))) - code.put_gotref(target_list) - - if iterator_temp: - code.put_decref_clear(iterator_temp, py_object_type) - code.funcstate.release_temp(iterator_temp) - else: - rhs.generate_disposal_code(code) - - if unpacked_fixed_items_right: - code.globalstate.use_utility_code(raise_need_more_values_to_unpack) - length_temp = code.funcstate.allocate_temp(PyrexTypes.c_py_ssize_t_type, manage_ref=False) - code.putln('%s = PyList_GET_SIZE(%s);' % (length_temp, target_list)) - code.putln("if (unlikely(%s < %d)) {" % (length_temp, len(unpacked_fixed_items_right))) - code.putln("__Pyx_RaiseNeedMoreValuesError(%d+%s); %s" % ( - len(unpacked_fixed_items_left), length_temp, - code.error_goto(self.pos))) - code.putln('}') - - for item in unpacked_fixed_items_right[::-1]: - item.allocate(code) - for i, (item, coerced_arg) in enumerate(zip(unpacked_fixed_items_right[::-1], - self.coerced_unpacked_items[::-1])): - code.putln('#if CYTHON_COMPILING_IN_CPYTHON') - code.putln("%s = PyList_GET_ITEM(%s, %s-%d); " % ( - item.py_result(), target_list, length_temp, i+1)) - # resize the list the hard way - code.putln("((PyVarObject*)%s)->ob_size--;" % target_list) - code.putln('#else') - code.putln("%s = PySequence_ITEM(%s, %s-%d); " % ( - item.py_result(), target_list, length_temp, i+1)) - code.putln('#endif') - code.put_gotref(item.py_result()) - coerced_arg.generate_evaluation_code(code) - - code.putln('#if !CYTHON_COMPILING_IN_CPYTHON') - sublist_temp = code.funcstate.allocate_temp(py_object_type, manage_ref=True) - code.putln('%s = PySequence_GetSlice(%s, 0, %s-%d); %s' % ( - sublist_temp, target_list, length_temp, len(unpacked_fixed_items_right), - code.error_goto_if_null(sublist_temp, self.pos))) - code.put_gotref(sublist_temp) - code.funcstate.release_temp(length_temp) - code.put_decref(target_list, py_object_type) - code.putln('%s = %s; %s = NULL;' % (target_list, sublist_temp, sublist_temp)) - code.putln('#else') - code.putln('%s = %s;' % (sublist_temp, sublist_temp)) # avoid warning about unused variable - code.funcstate.release_temp(sublist_temp) - code.putln('#endif') - - for i, arg in enumerate(self.args): - arg.generate_assignment_code(self.coerced_unpacked_items[i], code) - - def annotate(self, code): - for arg in self.args: - arg.annotate(code) - if self.unpacked_items: - for arg in self.unpacked_items: - arg.annotate(code) - for arg in self.coerced_unpacked_items: - arg.annotate(code) - - -class TupleNode(SequenceNode): - # Tuple constructor. - - type = tuple_type - is_partly_literal = False - - gil_message = "Constructing Python tuple" - - def analyse_types(self, env, skip_children=False): - if len(self.args) == 0: - node = self - node.is_temp = False - node.is_literal = True - else: - node = SequenceNode.analyse_types(self, env, skip_children) - for child in node.args: - if not child.is_literal: - break - else: - if not node.mult_factor or node.mult_factor.is_literal and \ - isinstance(node.mult_factor.constant_result, (int, long)): - node.is_temp = False - node.is_literal = True - else: - if not node.mult_factor.type.is_pyobject: - node.mult_factor = node.mult_factor.coerce_to_pyobject(env) - node.is_temp = True - node.is_partly_literal = True - return node - - def is_simple(self): - # either temp or constant => always simple - return True - - def nonlocally_immutable(self): - # either temp or constant => always safe - return True - - def calculate_result_code(self): - if len(self.args) > 0: - return self.result_code - else: - return Naming.empty_tuple - - def calculate_constant_result(self): - self.constant_result = tuple([ - arg.constant_result for arg in self.args]) - - def compile_time_value(self, denv): - values = self.compile_time_value_list(denv) - try: - return tuple(values) - except Exception, e: - self.compile_time_value_error(e) - - def generate_operation_code(self, code): - if len(self.args) == 0: - # result_code is Naming.empty_tuple - return - if self.is_partly_literal: - # underlying tuple is const, but factor is not - tuple_target = code.get_py_const(py_object_type, 'tuple', cleanup_level=2) - const_code = code.get_cached_constants_writer() - const_code.mark_pos(self.pos) - self.generate_sequence_packing_code(const_code, tuple_target, plain=True) - const_code.put_giveref(tuple_target) - code.putln('%s = PyNumber_Multiply(%s, %s); %s' % ( - self.result(), tuple_target, self.mult_factor.py_result(), - code.error_goto_if_null(self.result(), self.pos) - )) - code.put_gotref(self.py_result()) - elif self.is_literal: - # non-empty cached tuple => result is global constant, - # creation code goes into separate code writer - self.result_code = code.get_py_const(py_object_type, 'tuple', cleanup_level=2) - code = code.get_cached_constants_writer() - code.mark_pos(self.pos) - self.generate_sequence_packing_code(code) - code.put_giveref(self.py_result()) - else: - self.generate_sequence_packing_code(code) - - -class ListNode(SequenceNode): - # List constructor. - - # obj_conversion_errors [PyrexError] used internally - # orignial_args [ExprNode] used internally - - obj_conversion_errors = [] - type = list_type - in_module_scope = False - - gil_message = "Constructing Python list" - - def type_dependencies(self, env): - return () - - def infer_type(self, env): - # TOOD: Infer non-object list arrays. - return list_type - - def analyse_expressions(self, env): - node = SequenceNode.analyse_expressions(self, env) - return node.coerce_to_pyobject(env) - - def analyse_types(self, env): - hold_errors() - self.original_args = list(self.args) - node = SequenceNode.analyse_types(self, env) - node.obj_conversion_errors = held_errors() - release_errors(ignore=True) - if env.is_module_scope: - self.in_module_scope = True - return node - - def coerce_to(self, dst_type, env): - if dst_type.is_pyobject: - for err in self.obj_conversion_errors: - report_error(err) - self.obj_conversion_errors = [] - if not self.type.subtype_of(dst_type): - error(self.pos, "Cannot coerce list to type '%s'" % dst_type) - elif self.mult_factor: - error(self.pos, "Cannot coerce multiplied list to '%s'" % dst_type) - elif dst_type.is_ptr and dst_type.base_type is not PyrexTypes.c_void_type: - base_type = dst_type.base_type - self.type = PyrexTypes.CArrayType(base_type, len(self.args)) - for i in range(len(self.original_args)): - arg = self.args[i] - if isinstance(arg, CoerceToPyTypeNode): - arg = arg.arg - self.args[i] = arg.coerce_to(base_type, env) - elif dst_type.is_struct: - if len(self.args) > len(dst_type.scope.var_entries): - error(self.pos, "Too may members for '%s'" % dst_type) - else: - if len(self.args) < len(dst_type.scope.var_entries): - warning(self.pos, "Too few members for '%s'" % dst_type, 1) - for i, (arg, member) in enumerate(zip(self.original_args, dst_type.scope.var_entries)): - if isinstance(arg, CoerceToPyTypeNode): - arg = arg.arg - self.args[i] = arg.coerce_to(member.type, env) - self.type = dst_type - else: - self.type = error_type - error(self.pos, "Cannot coerce list to type '%s'" % dst_type) - return self - - def as_tuple(self): - t = TupleNode(self.pos, args=self.args, mult_factor=self.mult_factor) - if isinstance(self.constant_result, list): - t.constant_result = tuple(self.constant_result) - return t - - def allocate_temp_result(self, code): - if self.type.is_array and self.in_module_scope: - self.temp_code = code.funcstate.allocate_temp( - self.type, manage_ref=False, static=True) - else: - SequenceNode.allocate_temp_result(self, code) - - def release_temp_result(self, env): - if self.type.is_array: - # To be valid C++, we must allocate the memory on the stack - # manually and be sure not to reuse it for something else. - pass - else: - SequenceNode.release_temp_result(self, env) - - def calculate_constant_result(self): - if self.mult_factor: - raise ValueError() # may exceed the compile time memory - self.constant_result = [ - arg.constant_result for arg in self.args] - - def compile_time_value(self, denv): - l = self.compile_time_value_list(denv) - if self.mult_factor: - l *= self.mult_factor.compile_time_value(denv) - return l - - def generate_operation_code(self, code): - if self.type.is_pyobject: - for err in self.obj_conversion_errors: - report_error(err) - self.generate_sequence_packing_code(code) - elif self.type.is_array: - for i, arg in enumerate(self.args): - code.putln("%s[%s] = %s;" % ( - self.result(), - i, - arg.result())) - elif self.type.is_struct: - for arg, member in zip(self.args, self.type.scope.var_entries): - code.putln("%s.%s = %s;" % ( - self.result(), - member.cname, - arg.result())) - else: - raise InternalError("List type never specified") - - -class ScopedExprNode(ExprNode): - # Abstract base class for ExprNodes that have their own local - # scope, such as generator expressions. - # - # expr_scope Scope the inner scope of the expression - - subexprs = [] - expr_scope = None - - # does this node really have a local scope, e.g. does it leak loop - # variables or not? non-leaking Py3 behaviour is default, except - # for list comprehensions where the behaviour differs in Py2 and - # Py3 (set in Parsing.py based on parser context) - has_local_scope = True - - def init_scope(self, outer_scope, expr_scope=None): - if expr_scope is not None: - self.expr_scope = expr_scope - elif self.has_local_scope: - self.expr_scope = Symtab.GeneratorExpressionScope(outer_scope) - else: - self.expr_scope = None - - def analyse_declarations(self, env): - self.init_scope(env) - - def analyse_scoped_declarations(self, env): - # this is called with the expr_scope as env - pass - - def analyse_types(self, env): - # no recursion here, the children will be analysed separately below - return self - - def analyse_scoped_expressions(self, env): - # this is called with the expr_scope as env - return self - - def generate_evaluation_code(self, code): - # set up local variables and free their references on exit - generate_inner_evaluation_code = super(ScopedExprNode, self).generate_evaluation_code - if not self.has_local_scope or not self.expr_scope.var_entries: - # no local variables => delegate, done - generate_inner_evaluation_code(code) - return - - code.putln('{ /* enter inner scope */') - py_entries = [] - for entry in self.expr_scope.var_entries: - if not entry.in_closure: - code.put_var_declaration(entry) - if entry.type.is_pyobject and entry.used: - py_entries.append(entry) - if not py_entries: - # no local Python references => no cleanup required - generate_inner_evaluation_code(code) - code.putln('} /* exit inner scope */') - return - - # must free all local Python references at each exit point - old_loop_labels = tuple(code.new_loop_labels()) - old_error_label = code.new_error_label() - - generate_inner_evaluation_code(code) - - # normal (non-error) exit - for entry in py_entries: - code.put_var_decref(entry) - - # error/loop body exit points - exit_scope = code.new_label('exit_scope') - code.put_goto(exit_scope) - for label, old_label in ([(code.error_label, old_error_label)] + - list(zip(code.get_loop_labels(), old_loop_labels))): - if code.label_used(label): - code.put_label(label) - for entry in py_entries: - code.put_var_decref(entry) - code.put_goto(old_label) - code.put_label(exit_scope) - code.putln('} /* exit inner scope */') - - code.set_loop_labels(old_loop_labels) - code.error_label = old_error_label - - -class ComprehensionNode(ScopedExprNode): - # A list/set/dict comprehension - - child_attrs = ["loop"] - - is_temp = True - - def infer_type(self, env): - return self.type - - def analyse_declarations(self, env): - self.append.target = self # this is used in the PyList_Append of the inner loop - self.init_scope(env) - - def analyse_scoped_declarations(self, env): - self.loop.analyse_declarations(env) - - def analyse_types(self, env): - if not self.has_local_scope: - self.loop = self.loop.analyse_expressions(env) - return self - - def analyse_scoped_expressions(self, env): - if self.has_local_scope: - self.loop = self.loop.analyse_expressions(env) - return self - - def may_be_none(self): - return False - - def generate_result_code(self, code): - self.generate_operation_code(code) - - def generate_operation_code(self, code): - if self.type is Builtin.list_type: - create_code = 'PyList_New(0)' - elif self.type is Builtin.set_type: - create_code = 'PySet_New(NULL)' - elif self.type is Builtin.dict_type: - create_code = 'PyDict_New()' - else: - raise InternalError("illegal type for comprehension: %s" % self.type) - code.putln('%s = %s; %s' % ( - self.result(), create_code, - code.error_goto_if_null(self.result(), self.pos))) - - code.put_gotref(self.result()) - self.loop.generate_execution_code(code) - - def annotate(self, code): - self.loop.annotate(code) - - -class ComprehensionAppendNode(Node): - # Need to be careful to avoid infinite recursion: - # target must not be in child_attrs/subexprs - - child_attrs = ['expr'] - target = None - - type = PyrexTypes.c_int_type - - def analyse_expressions(self, env): - self.expr = self.expr.analyse_expressions(env) - if not self.expr.type.is_pyobject: - self.expr = self.expr.coerce_to_pyobject(env) - return self - - def generate_execution_code(self, code): - if self.target.type is list_type: - code.globalstate.use_utility_code( - UtilityCode.load_cached("ListCompAppend", "Optimize.c")) - function = "__Pyx_ListComp_Append" - elif self.target.type is set_type: - function = "PySet_Add" - else: - raise InternalError( - "Invalid type for comprehension node: %s" % self.target.type) - - self.expr.generate_evaluation_code(code) - code.putln(code.error_goto_if("%s(%s, (PyObject*)%s)" % ( - function, - self.target.result(), - self.expr.result() - ), self.pos)) - self.expr.generate_disposal_code(code) - self.expr.free_temps(code) - - def generate_function_definitions(self, env, code): - self.expr.generate_function_definitions(env, code) - - def annotate(self, code): - self.expr.annotate(code) - -class DictComprehensionAppendNode(ComprehensionAppendNode): - child_attrs = ['key_expr', 'value_expr'] - - def analyse_expressions(self, env): - self.key_expr = self.key_expr.analyse_expressions(env) - if not self.key_expr.type.is_pyobject: - self.key_expr = self.key_expr.coerce_to_pyobject(env) - self.value_expr = self.value_expr.analyse_expressions(env) - if not self.value_expr.type.is_pyobject: - self.value_expr = self.value_expr.coerce_to_pyobject(env) - return self - - def generate_execution_code(self, code): - self.key_expr.generate_evaluation_code(code) - self.value_expr.generate_evaluation_code(code) - code.putln(code.error_goto_if("PyDict_SetItem(%s, (PyObject*)%s, (PyObject*)%s)" % ( - self.target.result(), - self.key_expr.result(), - self.value_expr.result() - ), self.pos)) - self.key_expr.generate_disposal_code(code) - self.key_expr.free_temps(code) - self.value_expr.generate_disposal_code(code) - self.value_expr.free_temps(code) - - def generate_function_definitions(self, env, code): - self.key_expr.generate_function_definitions(env, code) - self.value_expr.generate_function_definitions(env, code) - - def annotate(self, code): - self.key_expr.annotate(code) - self.value_expr.annotate(code) - - -class InlinedGeneratorExpressionNode(ScopedExprNode): - # An inlined generator expression for which the result is - # calculated inside of the loop. This will only be created by - # transforms when replacing builtin calls on generator - # expressions. - # - # loop ForStatNode the for-loop, not containing any YieldExprNodes - # result_node ResultRefNode the reference to the result value temp - # orig_func String the name of the builtin function this node replaces - - child_attrs = ["loop"] - loop_analysed = False - type = py_object_type - - def analyse_scoped_declarations(self, env): - self.loop.analyse_declarations(env) - - def may_be_none(self): - return False - - def annotate(self, code): - self.loop.annotate(code) - - def infer_type(self, env): - return self.result_node.infer_type(env) - - def analyse_types(self, env): - if not self.has_local_scope: - self.loop_analysed = True - self.loop = self.loop.analyse_expressions(env) - self.type = self.result_node.type - self.is_temp = True - return self - - def analyse_scoped_expressions(self, env): - self.loop_analysed = True - if self.has_local_scope: - self.loop = self.loop.analyse_expressions(env) - return self - - def coerce_to(self, dst_type, env): - if self.orig_func == 'sum' and dst_type.is_numeric and not self.loop_analysed: - # We can optimise by dropping the aggregation variable and - # the add operations into C. This can only be done safely - # before analysing the loop body, after that, the result - # reference type will have infected expressions and - # assignments. - self.result_node.type = self.type = dst_type - return self - return super(InlinedGeneratorExpressionNode, self).coerce_to(dst_type, env) - - def generate_result_code(self, code): - self.result_node.result_code = self.result() - self.loop.generate_execution_code(code) - - -class SetNode(ExprNode): - # Set constructor. - - type = set_type - - subexprs = ['args'] - - gil_message = "Constructing Python set" - - def analyse_types(self, env): - for i in range(len(self.args)): - arg = self.args[i] - arg = arg.analyse_types(env) - self.args[i] = arg.coerce_to_pyobject(env) - self.type = set_type - self.is_temp = 1 - return self - - def may_be_none(self): - return False - - def calculate_constant_result(self): - self.constant_result = set([ - arg.constant_result for arg in self.args]) - - def compile_time_value(self, denv): - values = [arg.compile_time_value(denv) for arg in self.args] - try: - return set(values) - except Exception, e: - self.compile_time_value_error(e) - - def generate_evaluation_code(self, code): - code.globalstate.use_utility_code(Builtin.py_set_utility_code) - self.allocate_temp_result(code) - code.putln( - "%s = PySet_New(0); %s" % ( - self.result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - for arg in self.args: - arg.generate_evaluation_code(code) - code.put_error_if_neg( - self.pos, - "PySet_Add(%s, %s)" % (self.result(), arg.py_result())) - arg.generate_disposal_code(code) - arg.free_temps(code) - - -class DictNode(ExprNode): - # Dictionary constructor. - # - # key_value_pairs [DictItemNode] - # exclude_null_values [boolean] Do not add NULL values to dict - # - # obj_conversion_errors [PyrexError] used internally - - subexprs = ['key_value_pairs'] - is_temp = 1 - exclude_null_values = False - type = dict_type - - obj_conversion_errors = [] - - @classmethod - def from_pairs(cls, pos, pairs): - return cls(pos, key_value_pairs=[ - DictItemNode(pos, key=k, value=v) for k, v in pairs]) - - def calculate_constant_result(self): - self.constant_result = dict([ - item.constant_result for item in self.key_value_pairs]) - - def compile_time_value(self, denv): - pairs = [(item.key.compile_time_value(denv), item.value.compile_time_value(denv)) - for item in self.key_value_pairs] - try: - return dict(pairs) - except Exception, e: - self.compile_time_value_error(e) - - def type_dependencies(self, env): - return () - - def infer_type(self, env): - # TOOD: Infer struct constructors. - return dict_type - - def analyse_types(self, env): - hold_errors() - self.key_value_pairs = [ item.analyse_types(env) - for item in self.key_value_pairs ] - self.obj_conversion_errors = held_errors() - release_errors(ignore=True) - return self - - def may_be_none(self): - return False - - def coerce_to(self, dst_type, env): - if dst_type.is_pyobject: - self.release_errors() - if not self.type.subtype_of(dst_type): - error(self.pos, "Cannot interpret dict as type '%s'" % dst_type) - elif dst_type.is_struct_or_union: - self.type = dst_type - if not dst_type.is_struct and len(self.key_value_pairs) != 1: - error(self.pos, "Exactly one field must be specified to convert to union '%s'" % dst_type) - elif dst_type.is_struct and len(self.key_value_pairs) < len(dst_type.scope.var_entries): - warning(self.pos, "Not all members given for struct '%s'" % dst_type, 1) - for item in self.key_value_pairs: - if isinstance(item.key, CoerceToPyTypeNode): - item.key = item.key.arg - if not item.key.is_string_literal: - error(item.key.pos, "Invalid struct field identifier") - item.key = StringNode(item.key.pos, value="") - else: - key = str(item.key.value) # converts string literals to unicode in Py3 - member = dst_type.scope.lookup_here(key) - if not member: - error(item.key.pos, "struct '%s' has no field '%s'" % (dst_type, key)) - else: - value = item.value - if isinstance(value, CoerceToPyTypeNode): - value = value.arg - item.value = value.coerce_to(member.type, env) - else: - self.type = error_type - error(self.pos, "Cannot interpret dict as type '%s'" % dst_type) - return self - - def release_errors(self): - for err in self.obj_conversion_errors: - report_error(err) - self.obj_conversion_errors = [] - - gil_message = "Constructing Python dict" - - def generate_evaluation_code(self, code): - # Custom method used here because key-value - # pairs are evaluated and used one at a time. - code.mark_pos(self.pos) - self.allocate_temp_result(code) - if self.type.is_pyobject: - self.release_errors() - code.putln( - "%s = PyDict_New(); %s" % ( - self.result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - for item in self.key_value_pairs: - item.generate_evaluation_code(code) - if self.type.is_pyobject: - if self.exclude_null_values: - code.putln('if (%s) {' % item.value.py_result()) - code.put_error_if_neg(self.pos, - "PyDict_SetItem(%s, %s, %s)" % ( - self.result(), - item.key.py_result(), - item.value.py_result())) - if self.exclude_null_values: - code.putln('}') - else: - code.putln("%s.%s = %s;" % ( - self.result(), - item.key.value, - item.value.result())) - item.generate_disposal_code(code) - item.free_temps(code) - - def annotate(self, code): - for item in self.key_value_pairs: - item.annotate(code) - -class DictItemNode(ExprNode): - # Represents a single item in a DictNode - # - # key ExprNode - # value ExprNode - subexprs = ['key', 'value'] - - nogil_check = None # Parent DictNode takes care of it - - def calculate_constant_result(self): - self.constant_result = ( - self.key.constant_result, self.value.constant_result) - - def analyse_types(self, env): - self.key = self.key.analyse_types(env) - self.value = self.value.analyse_types(env) - self.key = self.key.coerce_to_pyobject(env) - self.value = self.value.coerce_to_pyobject(env) - return self - - def generate_evaluation_code(self, code): - self.key.generate_evaluation_code(code) - self.value.generate_evaluation_code(code) - - def generate_disposal_code(self, code): - self.key.generate_disposal_code(code) - self.value.generate_disposal_code(code) - - def free_temps(self, code): - self.key.free_temps(code) - self.value.free_temps(code) - - def __iter__(self): - return iter([self.key, self.value]) - - -class SortedDictKeysNode(ExprNode): - # build sorted list of dict keys, e.g. for dir() - subexprs = ['arg'] - - is_temp = True - - def __init__(self, arg): - ExprNode.__init__(self, arg.pos, arg=arg) - self.type = Builtin.list_type - - def analyse_types(self, env): - arg = self.arg.analyse_types(env) - if arg.type is Builtin.dict_type: - arg = arg.as_none_safe_node( - "'NoneType' object is not iterable") - self.arg = arg - return self - - def may_be_none(self): - return False - - def generate_result_code(self, code): - dict_result = self.arg.py_result() - if self.arg.type is Builtin.dict_type: - function = 'PyDict_Keys' - else: - function = 'PyMapping_Keys' - code.putln('%s = %s(%s); %s' % ( - self.result(), function, dict_result, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - code.put_error_if_neg( - self.pos, 'PyList_Sort(%s)' % self.py_result()) - - -class ModuleNameMixin(object): - def get_py_mod_name(self, code): - return code.get_py_string_const( - self.module_name, identifier=True) - - def get_py_qualified_name(self, code): - return code.get_py_string_const( - self.qualname, identifier=True) - - -class ClassNode(ExprNode, ModuleNameMixin): - # Helper class used in the implementation of Python - # class definitions. Constructs a class object given - # a name, tuple of bases and class dictionary. - # - # name EncodedString Name of the class - # bases ExprNode Base class tuple - # dict ExprNode Class dict (not owned by this node) - # doc ExprNode or None Doc string - # module_name EncodedString Name of defining module - - subexprs = ['bases', 'doc'] - - def analyse_types(self, env): - self.bases = self.bases.analyse_types(env) - if self.doc: - self.doc = self.doc.analyse_types(env) - self.doc = self.doc.coerce_to_pyobject(env) - self.type = py_object_type - self.is_temp = 1 - env.use_utility_code(UtilityCode.load_cached("CreateClass", "ObjectHandling.c")) - return self - - def may_be_none(self): - return True - - gil_message = "Constructing Python class" - - def generate_result_code(self, code): - cname = code.intern_identifier(self.name) - - if self.doc: - code.put_error_if_neg(self.pos, - 'PyDict_SetItem(%s, %s, %s)' % ( - self.dict.py_result(), - code.intern_identifier( - StringEncoding.EncodedString("__doc__")), - self.doc.py_result())) - py_mod_name = self.get_py_mod_name(code) - qualname = self.get_py_qualified_name(code) - code.putln( - '%s = __Pyx_CreateClass(%s, %s, %s, %s, %s); %s' % ( - self.result(), - self.bases.py_result(), - self.dict.py_result(), - cname, - qualname, - py_mod_name, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class Py3ClassNode(ExprNode): - # Helper class used in the implementation of Python3+ - # class definitions. Constructs a class object given - # a name, tuple of bases and class dictionary. - # - # name EncodedString Name of the class - # dict ExprNode Class dict (not owned by this node) - # module_name EncodedString Name of defining module - # calculate_metaclass bool should call CalculateMetaclass() - # allow_py2_metaclass bool should look for Py2 metaclass - - subexprs = [] - - def analyse_types(self, env): - self.type = py_object_type - self.is_temp = 1 - return self - - def may_be_none(self): - return True - - gil_message = "Constructing Python class" - - def generate_result_code(self, code): - code.globalstate.use_utility_code(UtilityCode.load_cached("Py3ClassCreate", "ObjectHandling.c")) - cname = code.intern_identifier(self.name) - if self.mkw: - mkw = self.mkw.py_result() - else: - mkw = 'NULL' - if self.metaclass: - metaclass = self.metaclass.result() - else: - metaclass = "((PyObject*)&__Pyx_DefaultClassType)" - code.putln( - '%s = __Pyx_Py3ClassCreate(%s, %s, %s, %s, %s, %d, %d); %s' % ( - self.result(), - metaclass, - cname, - self.bases.py_result(), - self.dict.py_result(), - mkw, - self.calculate_metaclass, - self.allow_py2_metaclass, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - -class KeywordArgsNode(ExprNode): - # Helper class for keyword arguments. - # - # starstar_arg DictNode - # keyword_args [DictItemNode] - - subexprs = ['starstar_arg', 'keyword_args'] - is_temp = 1 - type = dict_type - - def calculate_constant_result(self): - result = dict(self.starstar_arg.constant_result) - for item in self.keyword_args: - key, value = item.constant_result - if key in result: - raise ValueError("duplicate keyword argument found: %s" % key) - result[key] = value - self.constant_result = result - - def compile_time_value(self, denv): - result = self.starstar_arg.compile_time_value(denv) - pairs = [ (item.key.compile_time_value(denv), item.value.compile_time_value(denv)) - for item in self.keyword_args ] - try: - result = dict(result) - for key, value in pairs: - if key in result: - raise ValueError("duplicate keyword argument found: %s" % key) - result[key] = value - except Exception, e: - self.compile_time_value_error(e) - return result - - def type_dependencies(self, env): - return () - - def infer_type(self, env): - return dict_type - - def analyse_types(self, env): - arg = self.starstar_arg.analyse_types(env) - arg = arg.coerce_to_pyobject(env) - self.starstar_arg = arg.as_none_safe_node( - # FIXME: CPython's error message starts with the runtime function name - 'argument after ** must be a mapping, not NoneType') - self.keyword_args = [ item.analyse_types(env) - for item in self.keyword_args ] - return self - - def may_be_none(self): - return False - - gil_message = "Constructing Python dict" - - def generate_evaluation_code(self, code): - code.mark_pos(self.pos) - self.allocate_temp_result(code) - self.starstar_arg.generate_evaluation_code(code) - if self.starstar_arg.type is not Builtin.dict_type: - # CPython supports calling functions with non-dicts, so do we - code.putln('if (likely(PyDict_Check(%s))) {' % - self.starstar_arg.py_result()) - if self.keyword_args: - code.putln( - "%s = PyDict_Copy(%s); %s" % ( - self.result(), - self.starstar_arg.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - else: - code.putln("%s = %s;" % ( - self.result(), - self.starstar_arg.py_result())) - code.put_incref(self.result(), py_object_type) - if self.starstar_arg.type is not Builtin.dict_type: - code.putln('} else {') - code.putln( - "%s = PyObject_CallFunctionObjArgs(" - "(PyObject*)&PyDict_Type, %s, NULL); %s" % ( - self.result(), - self.starstar_arg.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - code.putln('}') - self.starstar_arg.generate_disposal_code(code) - self.starstar_arg.free_temps(code) - - if not self.keyword_args: - return - - code.globalstate.use_utility_code( - UtilityCode.load_cached("RaiseDoubleKeywords", "FunctionArguments.c")) - for item in self.keyword_args: - item.generate_evaluation_code(code) - code.putln("if (unlikely(PyDict_GetItem(%s, %s))) {" % ( - self.result(), - item.key.py_result())) - # FIXME: find out function name at runtime! - code.putln('__Pyx_RaiseDoubleKeywordsError("function", %s); %s' % ( - item.key.py_result(), - code.error_goto(self.pos))) - code.putln("}") - code.put_error_if_neg(self.pos, - "PyDict_SetItem(%s, %s, %s)" % ( - self.result(), - item.key.py_result(), - item.value.py_result())) - item.generate_disposal_code(code) - item.free_temps(code) - - def annotate(self, code): - self.starstar_arg.annotate(code) - for item in self.keyword_args: - item.annotate(code) - -class PyClassMetaclassNode(ExprNode): - # Helper class holds Python3 metaclass object - # - # bases ExprNode Base class tuple (not owned by this node) - # mkw ExprNode Class keyword arguments (not owned by this node) - - subexprs = [] - - def analyse_types(self, env): - self.type = py_object_type - self.is_temp = True - return self - - def may_be_none(self): - return True - - def generate_result_code(self, code): - if self.mkw: - code.globalstate.use_utility_code( - UtilityCode.load_cached("Py3MetaclassGet", "ObjectHandling.c")) - call = "__Pyx_Py3MetaclassGet(%s, %s)" % ( - self.bases.result(), - self.mkw.result()) - else: - code.globalstate.use_utility_code( - UtilityCode.load_cached("CalculateMetaclass", "ObjectHandling.c")) - call = "__Pyx_CalculateMetaclass(NULL, %s)" % ( - self.bases.result()) - code.putln( - "%s = %s; %s" % ( - self.result(), call, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - -class PyClassNamespaceNode(ExprNode, ModuleNameMixin): - # Helper class holds Python3 namespace object - # - # All this are not owned by this node - # metaclass ExprNode Metaclass object - # bases ExprNode Base class tuple - # mkw ExprNode Class keyword arguments - # doc ExprNode or None Doc string (owned) - - subexprs = ['doc'] - - def analyse_types(self, env): - if self.doc: - self.doc = self.doc.analyse_types(env) - self.doc = self.doc.coerce_to_pyobject(env) - self.type = py_object_type - self.is_temp = 1 - return self - - def may_be_none(self): - return True - - def generate_result_code(self, code): - cname = code.intern_identifier(self.name) - py_mod_name = self.get_py_mod_name(code) - qualname = self.get_py_qualified_name(code) - if self.doc: - doc_code = self.doc.result() - else: - doc_code = '(PyObject *) NULL' - if self.mkw: - mkw = self.mkw.py_result() - else: - mkw = '(PyObject *) NULL' - if self.metaclass: - metaclass = self.metaclass.result() - else: - metaclass = "(PyObject *) NULL" - code.putln( - "%s = __Pyx_Py3MetaclassPrepare(%s, %s, %s, %s, %s, %s, %s); %s" % ( - self.result(), - metaclass, - self.bases.result(), - cname, - qualname, - mkw, - py_mod_name, - doc_code, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class ClassCellInjectorNode(ExprNode): - # Initialize CyFunction.func_classobj - is_temp = True - type = py_object_type - subexprs = [] - is_active = False - - def analyse_expressions(self, env): - if self.is_active: - env.use_utility_code( - UtilityCode.load_cached("CyFunctionClassCell", "CythonFunction.c")) - return self - - def generate_evaluation_code(self, code): - if self.is_active: - self.allocate_temp_result(code) - code.putln( - '%s = PyList_New(0); %s' % ( - self.result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.result()) - - def generate_injection_code(self, code, classobj_cname): - if self.is_active: - code.putln('__Pyx_CyFunction_InitClassCell(%s, %s);' % ( - self.result(), classobj_cname)) - - -class ClassCellNode(ExprNode): - # Class Cell for noargs super() - subexprs = [] - is_temp = True - is_generator = False - type = py_object_type - - def analyse_types(self, env): - return self - - def generate_result_code(self, code): - if not self.is_generator: - code.putln('%s = __Pyx_CyFunction_GetClassObj(%s);' % ( - self.result(), - Naming.self_cname)) - else: - code.putln('%s = %s->classobj;' % ( - self.result(), Naming.generator_cname)) - code.putln( - 'if (!%s) { PyErr_SetString(PyExc_SystemError, ' - '"super(): empty __class__ cell"); %s }' % ( - self.result(), - code.error_goto(self.pos))) - code.put_incref(self.result(), py_object_type) - - -class BoundMethodNode(ExprNode): - # Helper class used in the implementation of Python - # class definitions. Constructs an bound method - # object from a class and a function. - # - # function ExprNode Function object - # self_object ExprNode self object - - subexprs = ['function'] - - def analyse_types(self, env): - self.function = self.function.analyse_types(env) - self.type = py_object_type - self.is_temp = 1 - return self - - gil_message = "Constructing a bound method" - - def generate_result_code(self, code): - code.putln( - "%s = PyMethod_New(%s, %s, (PyObject*)%s->ob_type); %s" % ( - self.result(), - self.function.py_result(), - self.self_object.py_result(), - self.self_object.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - -class UnboundMethodNode(ExprNode): - # Helper class used in the implementation of Python - # class definitions. Constructs an unbound method - # object from a class and a function. - # - # function ExprNode Function object - - type = py_object_type - is_temp = 1 - - subexprs = ['function'] - - def analyse_types(self, env): - self.function = self.function.analyse_types(env) - return self - - def may_be_none(self): - return False - - gil_message = "Constructing an unbound method" - - def generate_result_code(self, code): - class_cname = code.pyclass_stack[-1].classobj.result() - code.putln( - "%s = PyMethod_New(%s, 0, %s); %s" % ( - self.result(), - self.function.py_result(), - class_cname, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class PyCFunctionNode(ExprNode, ModuleNameMixin): - # Helper class used in the implementation of Python - # functions. Constructs a PyCFunction object - # from a PyMethodDef struct. - # - # pymethdef_cname string PyMethodDef structure - # self_object ExprNode or None - # binding bool - # def_node DefNode the Python function node - # module_name EncodedString Name of defining module - # code_object CodeObjectNode the PyCodeObject creator node - - subexprs = ['code_object', 'defaults_tuple', 'defaults_kwdict', - 'annotations_dict'] - - self_object = None - code_object = None - binding = False - def_node = None - defaults = None - defaults_struct = None - defaults_pyobjects = 0 - defaults_tuple = None - defaults_kwdict = None - annotations_dict = None - - type = py_object_type - is_temp = 1 - - specialized_cpdefs = None - is_specialization = False - - @classmethod - def from_defnode(cls, node, binding): - return cls(node.pos, - def_node=node, - pymethdef_cname=node.entry.pymethdef_cname, - binding=binding or node.specialized_cpdefs, - specialized_cpdefs=node.specialized_cpdefs, - code_object=CodeObjectNode(node)) - - def analyse_types(self, env): - if self.binding: - self.analyse_default_args(env) - return self - - def analyse_default_args(self, env): - """ - Handle non-literal function's default arguments. - """ - nonliteral_objects = [] - nonliteral_other = [] - default_args = [] - default_kwargs = [] - annotations = [] - for arg in self.def_node.args: - if arg.default: - if not arg.default.is_literal: - arg.is_dynamic = True - if arg.type.is_pyobject: - nonliteral_objects.append(arg) - else: - nonliteral_other.append(arg) - else: - arg.default = DefaultLiteralArgNode(arg.pos, arg.default) - if arg.kw_only: - default_kwargs.append(arg) - else: - default_args.append(arg) - if arg.annotation: - arg.annotation = arg.annotation.analyse_types(env) - if not arg.annotation.type.is_pyobject: - arg.annotation = arg.annotation.coerce_to_pyobject(env) - annotations.append((arg.pos, arg.name, arg.annotation)) - if self.def_node.return_type_annotation: - annotations.append((self.def_node.return_type_annotation.pos, - StringEncoding.EncodedString("return"), - self.def_node.return_type_annotation)) - - if nonliteral_objects or nonliteral_other: - module_scope = env.global_scope() - cname = module_scope.next_id(Naming.defaults_struct_prefix) - scope = Symtab.StructOrUnionScope(cname) - self.defaults = [] - for arg in nonliteral_objects: - entry = scope.declare_var(arg.name, arg.type, None, - Naming.arg_prefix + arg.name, - allow_pyobject=True) - self.defaults.append((arg, entry)) - for arg in nonliteral_other: - entry = scope.declare_var(arg.name, arg.type, None, - Naming.arg_prefix + arg.name, - allow_pyobject=False) - self.defaults.append((arg, entry)) - entry = module_scope.declare_struct_or_union( - None, 'struct', scope, 1, None, cname=cname) - self.defaults_struct = scope - self.defaults_pyobjects = len(nonliteral_objects) - for arg, entry in self.defaults: - arg.default_value = '%s->%s' % ( - Naming.dynamic_args_cname, entry.cname) - self.def_node.defaults_struct = self.defaults_struct.name - - if default_args or default_kwargs: - if self.defaults_struct is None: - if default_args: - defaults_tuple = TupleNode(self.pos, args=[ - arg.default for arg in default_args]) - self.defaults_tuple = defaults_tuple.analyse_types(env) - if default_kwargs: - defaults_kwdict = DictNode(self.pos, key_value_pairs=[ - DictItemNode( - arg.pos, - key=IdentifierStringNode(arg.pos, value=arg.name), - value=arg.default) - for arg in default_kwargs]) - self.defaults_kwdict = defaults_kwdict.analyse_types(env) - else: - if default_args: - defaults_tuple = DefaultsTupleNode( - self.pos, default_args, self.defaults_struct) - else: - defaults_tuple = NoneNode(self.pos) - if default_kwargs: - defaults_kwdict = DefaultsKwDictNode( - self.pos, default_kwargs, self.defaults_struct) - else: - defaults_kwdict = NoneNode(self.pos) - - defaults_getter = Nodes.DefNode( - self.pos, args=[], star_arg=None, starstar_arg=None, - body=Nodes.ReturnStatNode( - self.pos, return_type=py_object_type, - value=TupleNode( - self.pos, args=[defaults_tuple, defaults_kwdict])), - decorators=None, - name=StringEncoding.EncodedString("__defaults__")) - defaults_getter.analyse_declarations(env) - defaults_getter = defaults_getter.analyse_expressions(env) - defaults_getter.body = defaults_getter.body.analyse_expressions( - defaults_getter.local_scope) - defaults_getter.py_wrapper_required = False - defaults_getter.pymethdef_required = False - self.def_node.defaults_getter = defaults_getter - if annotations: - annotations_dict = DictNode(self.pos, key_value_pairs=[ - DictItemNode( - pos, key=IdentifierStringNode(pos, value=name), - value=value) - for pos, name, value in annotations]) - self.annotations_dict = annotations_dict.analyse_types(env) - - def may_be_none(self): - return False - - gil_message = "Constructing Python function" - - def self_result_code(self): - if self.self_object is None: - self_result = "NULL" - else: - self_result = self.self_object.py_result() - return self_result - - def generate_result_code(self, code): - if self.binding: - self.generate_cyfunction_code(code) - else: - self.generate_pycfunction_code(code) - - def generate_pycfunction_code(self, code): - py_mod_name = self.get_py_mod_name(code) - code.putln( - '%s = PyCFunction_NewEx(&%s, %s, %s); %s' % ( - self.result(), - self.pymethdef_cname, - self.self_result_code(), - py_mod_name, - code.error_goto_if_null(self.result(), self.pos))) - - code.put_gotref(self.py_result()) - - def generate_cyfunction_code(self, code): - if self.specialized_cpdefs: - def_node = self.specialized_cpdefs[0] - else: - def_node = self.def_node - - if self.specialized_cpdefs or self.is_specialization: - code.globalstate.use_utility_code( - UtilityCode.load_cached("FusedFunction", "CythonFunction.c")) - constructor = "__pyx_FusedFunction_NewEx" - else: - code.globalstate.use_utility_code( - UtilityCode.load_cached("CythonFunction", "CythonFunction.c")) - constructor = "__Pyx_CyFunction_NewEx" - - if self.code_object: - code_object_result = self.code_object.py_result() - else: - code_object_result = 'NULL' - - flags = [] - if def_node.is_staticmethod: - flags.append('__Pyx_CYFUNCTION_STATICMETHOD') - elif def_node.is_classmethod: - flags.append('__Pyx_CYFUNCTION_CLASSMETHOD') - - if def_node.local_scope.parent_scope.is_c_class_scope: - flags.append('__Pyx_CYFUNCTION_CCLASS') - - if flags: - flags = ' | '.join(flags) - else: - flags = '0' - - code.putln( - '%s = %s(&%s, %s, %s, %s, %s, %s, %s); %s' % ( - self.result(), - constructor, - self.pymethdef_cname, - flags, - self.get_py_qualified_name(code), - self.self_result_code(), - self.get_py_mod_name(code), - "PyModule_GetDict(%s)" % Naming.module_cname, - code_object_result, - code.error_goto_if_null(self.result(), self.pos))) - - code.put_gotref(self.py_result()) - - if def_node.requires_classobj: - assert code.pyclass_stack, "pyclass_stack is empty" - class_node = code.pyclass_stack[-1] - code.put_incref(self.py_result(), py_object_type) - code.putln( - 'PyList_Append(%s, %s);' % ( - class_node.class_cell.result(), - self.result())) - code.put_giveref(self.py_result()) - - if self.defaults: - code.putln( - 'if (!__Pyx_CyFunction_InitDefaults(%s, sizeof(%s), %d)) %s' % ( - self.result(), self.defaults_struct.name, - self.defaults_pyobjects, code.error_goto(self.pos))) - defaults = '__Pyx_CyFunction_Defaults(%s, %s)' % ( - self.defaults_struct.name, self.result()) - for arg, entry in self.defaults: - arg.generate_assignment_code(code, target='%s->%s' % ( - defaults, entry.cname)) - - if self.defaults_tuple: - code.putln('__Pyx_CyFunction_SetDefaultsTuple(%s, %s);' % ( - self.result(), self.defaults_tuple.py_result())) - if self.defaults_kwdict: - code.putln('__Pyx_CyFunction_SetDefaultsKwDict(%s, %s);' % ( - self.result(), self.defaults_kwdict.py_result())) - if def_node.defaults_getter: - code.putln('__Pyx_CyFunction_SetDefaultsGetter(%s, %s);' % ( - self.result(), def_node.defaults_getter.entry.pyfunc_cname)) - if self.annotations_dict: - code.putln('__Pyx_CyFunction_SetAnnotationsDict(%s, %s);' % ( - self.result(), self.annotations_dict.py_result())) - - -class InnerFunctionNode(PyCFunctionNode): - # Special PyCFunctionNode that depends on a closure class - # - - binding = True - needs_self_code = True - - def self_result_code(self): - if self.needs_self_code: - return "((PyObject*)%s)" % Naming.cur_scope_cname - return "NULL" - - -class CodeObjectNode(ExprNode): - # Create a PyCodeObject for a CyFunction instance. - # - # def_node DefNode the Python function node - # varnames TupleNode a tuple with all local variable names - - subexprs = ['varnames'] - is_temp = False - - def __init__(self, def_node): - ExprNode.__init__(self, def_node.pos, def_node=def_node) - args = list(def_node.args) - # if we have args/kwargs, then the first two in var_entries are those - local_vars = [arg for arg in def_node.local_scope.var_entries if arg.name] - self.varnames = TupleNode( - def_node.pos, - args=[IdentifierStringNode(arg.pos, value=arg.name) - for arg in args + local_vars], - is_temp=0, - is_literal=1) - - def may_be_none(self): - return False - - def calculate_result_code(self): - return self.result_code - - def generate_result_code(self, code): - self.result_code = code.get_py_const(py_object_type, 'codeobj', cleanup_level=2) - - code = code.get_cached_constants_writer() - code.mark_pos(self.pos) - func = self.def_node - func_name = code.get_py_string_const( - func.name, identifier=True, is_str=False, unicode_value=func.name) - # FIXME: better way to get the module file path at module init time? Encoding to use? - file_path = StringEncoding.BytesLiteral(func.pos[0].get_filenametable_entry().encode('utf8')) - file_path_const = code.get_py_string_const(file_path, identifier=False, is_str=True) - - flags = [] - if self.def_node.star_arg: - flags.append('CO_VARARGS') - if self.def_node.starstar_arg: - flags.append('CO_VARKEYWORDS') - - code.putln("%s = (PyObject*)__Pyx_PyCode_New(%d, %d, %d, 0, %s, %s, %s, %s, %s, %s, %s, %s, %s, %d, %s); %s" % ( - self.result_code, - len(func.args) - func.num_kwonly_args, # argcount - func.num_kwonly_args, # kwonlyargcount (Py3 only) - len(self.varnames.args), # nlocals - '|'.join(flags) or '0', # flags - Naming.empty_bytes, # code - Naming.empty_tuple, # consts - Naming.empty_tuple, # names (FIXME) - self.varnames.result(), # varnames - Naming.empty_tuple, # freevars (FIXME) - Naming.empty_tuple, # cellvars (FIXME) - file_path_const, # filename - func_name, # name - self.pos[1], # firstlineno - Naming.empty_bytes, # lnotab - code.error_goto_if_null(self.result_code, self.pos), - )) - - -class DefaultLiteralArgNode(ExprNode): - # CyFunction's literal argument default value - # - # Evaluate literal only once. - - subexprs = [] - is_literal = True - is_temp = False - - def __init__(self, pos, arg): - super(DefaultLiteralArgNode, self).__init__(pos) - self.arg = arg - self.type = self.arg.type - self.evaluated = False - - def analyse_types(self, env): - return self - - def generate_result_code(self, code): - pass - - def generate_evaluation_code(self, code): - if not self.evaluated: - self.arg.generate_evaluation_code(code) - self.evaluated = True - - def result(self): - return self.type.cast_code(self.arg.result()) - - -class DefaultNonLiteralArgNode(ExprNode): - # CyFunction's non-literal argument default value - - subexprs = [] - - def __init__(self, pos, arg, defaults_struct): - super(DefaultNonLiteralArgNode, self).__init__(pos) - self.arg = arg - self.defaults_struct = defaults_struct - - def analyse_types(self, env): - self.type = self.arg.type - self.is_temp = False - return self - - def generate_result_code(self, code): - pass - - def result(self): - return '__Pyx_CyFunction_Defaults(%s, %s)->%s' % ( - self.defaults_struct.name, Naming.self_cname, - self.defaults_struct.lookup(self.arg.name).cname) - - -class DefaultsTupleNode(TupleNode): - # CyFunction's __defaults__ tuple - - def __init__(self, pos, defaults, defaults_struct): - args = [] - for arg in defaults: - if not arg.default.is_literal: - arg = DefaultNonLiteralArgNode(pos, arg, defaults_struct) - else: - arg = arg.default - args.append(arg) - super(DefaultsTupleNode, self).__init__(pos, args=args) - - -class DefaultsKwDictNode(DictNode): - # CyFunction's __kwdefaults__ dict - - def __init__(self, pos, defaults, defaults_struct): - items = [] - for arg in defaults: - name = IdentifierStringNode(arg.pos, value=arg.name) - if not arg.default.is_literal: - arg = DefaultNonLiteralArgNode(pos, arg, defaults_struct) - else: - arg = arg.default - items.append(DictItemNode(arg.pos, key=name, value=arg)) - super(DefaultsKwDictNode, self).__init__(pos, key_value_pairs=items) - - -class LambdaNode(InnerFunctionNode): - # Lambda expression node (only used as a function reference) - # - # args [CArgDeclNode] formal arguments - # star_arg PyArgDeclNode or None * argument - # starstar_arg PyArgDeclNode or None ** argument - # lambda_name string a module-globally unique lambda name - # result_expr ExprNode - # def_node DefNode the underlying function 'def' node - - child_attrs = ['def_node'] - - name = StringEncoding.EncodedString('') - - def analyse_declarations(self, env): - self.def_node.no_assignment_synthesis = True - self.def_node.pymethdef_required = True - self.def_node.analyse_declarations(env) - self.def_node.is_cyfunction = True - self.pymethdef_cname = self.def_node.entry.pymethdef_cname - env.add_lambda_def(self.def_node) - - def analyse_types(self, env): - self.def_node = self.def_node.analyse_expressions(env) - return super(LambdaNode, self).analyse_types(env) - - def generate_result_code(self, code): - self.def_node.generate_execution_code(code) - super(LambdaNode, self).generate_result_code(code) - - -class GeneratorExpressionNode(LambdaNode): - # A generator expression, e.g. (i for i in range(10)) - # - # Result is a generator. - # - # loop ForStatNode the for-loop, containing a YieldExprNode - # def_node DefNode the underlying generator 'def' node - - name = StringEncoding.EncodedString('genexpr') - binding = False - - def analyse_declarations(self, env): - super(GeneratorExpressionNode, self).analyse_declarations(env) - # No pymethdef required - self.def_node.pymethdef_required = False - self.def_node.py_wrapper_required = False - self.def_node.is_cyfunction = False - # Force genexpr signature - self.def_node.entry.signature = TypeSlots.pyfunction_noargs - - def generate_result_code(self, code): - code.putln( - '%s = %s(%s); %s' % ( - self.result(), - self.def_node.entry.pyfunc_cname, - self.self_result_code(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class YieldExprNode(ExprNode): - # Yield expression node - # - # arg ExprNode the value to return from the generator - # label_num integer yield label number - # is_yield_from boolean is a YieldFromExprNode to delegate to another generator - - subexprs = ['arg'] - type = py_object_type - label_num = 0 - is_yield_from = False - - def analyse_types(self, env): - if not self.label_num: - error(self.pos, "'yield' not supported here") - self.is_temp = 1 - if self.arg is not None: - self.arg = self.arg.analyse_types(env) - if not self.arg.type.is_pyobject: - self.coerce_yield_argument(env) - return self - - def coerce_yield_argument(self, env): - self.arg = self.arg.coerce_to_pyobject(env) - - def generate_evaluation_code(self, code): - if self.arg: - self.arg.generate_evaluation_code(code) - self.arg.make_owned_reference(code) - code.putln( - "%s = %s;" % ( - Naming.retval_cname, - self.arg.result_as(py_object_type))) - self.arg.generate_post_assignment_code(code) - self.arg.free_temps(code) - else: - code.put_init_to_py_none(Naming.retval_cname, py_object_type) - self.generate_yield_code(code) - - def generate_yield_code(self, code): - """ - Generate the code to return the argument in 'Naming.retval_cname' - and to continue at the yield label. - """ - label_num, label_name = code.new_yield_label() - code.use_label(label_name) - - saved = [] - code.funcstate.closure_temps.reset() - for cname, type, manage_ref in code.funcstate.temps_in_use(): - save_cname = code.funcstate.closure_temps.allocate_temp(type) - saved.append((cname, save_cname, type)) - if type.is_pyobject: - code.put_xgiveref(cname) - code.putln('%s->%s = %s;' % (Naming.cur_scope_cname, save_cname, cname)) - - code.put_xgiveref(Naming.retval_cname) - code.put_finish_refcount_context() - code.putln("/* return from generator, yielding value */") - code.putln("%s->resume_label = %d;" % ( - Naming.generator_cname, label_num)) - code.putln("return %s;" % Naming.retval_cname) - - code.put_label(label_name) - for cname, save_cname, type in saved: - code.putln('%s = %s->%s;' % (cname, Naming.cur_scope_cname, save_cname)) - if type.is_pyobject: - code.putln('%s->%s = 0;' % (Naming.cur_scope_cname, save_cname)) - code.put_xgotref(cname) - code.putln(code.error_goto_if_null(Naming.sent_value_cname, self.pos)) - if self.result_is_used: - self.allocate_temp_result(code) - code.put('%s = %s; ' % (self.result(), Naming.sent_value_cname)) - code.put_incref(self.result(), py_object_type) - - -class YieldFromExprNode(YieldExprNode): - # "yield from GEN" expression - is_yield_from = True - - def coerce_yield_argument(self, env): - if not self.arg.type.is_string: - # FIXME: support C arrays and C++ iterators? - error(self.pos, "yielding from non-Python object not supported") - self.arg = self.arg.coerce_to_pyobject(env) - - def generate_evaluation_code(self, code): - code.globalstate.use_utility_code(UtilityCode.load_cached("YieldFrom", "Generator.c")) - - self.arg.generate_evaluation_code(code) - code.putln("%s = __Pyx_Generator_Yield_From(%s, %s);" % ( - Naming.retval_cname, - Naming.generator_cname, - self.arg.result_as(py_object_type))) - self.arg.generate_disposal_code(code) - self.arg.free_temps(code) - code.put_xgotref(Naming.retval_cname) - - code.putln("if (likely(%s)) {" % Naming.retval_cname) - self.generate_yield_code(code) - code.putln("} else {") - # either error or sub-generator has normally terminated: return value => node result - if self.result_is_used: - # YieldExprNode has allocated the result temp for us - code.putln("%s = NULL;" % self.result()) - code.putln("if (unlikely(__Pyx_PyGen_FetchStopIterationValue(&%s) < 0)) %s" % ( - self.result(), - code.error_goto(self.pos))) - code.put_gotref(self.result()) - else: - code.putln("PyObject* exc_type = PyErr_Occurred();") - code.putln("if (exc_type) {") - code.putln("if (likely(exc_type == PyExc_StopIteration ||" - " PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();") - code.putln("else %s" % code.error_goto(self.pos)) - code.putln("}") - code.putln("}") - -class GlobalsExprNode(AtomicExprNode): - type = dict_type - is_temp = 1 - - def analyse_types(self, env): - env.use_utility_code(Builtin.globals_utility_code) - return self - - gil_message = "Constructing globals dict" - - def may_be_none(self): - return False - - def generate_result_code(self, code): - code.putln('%s = __Pyx_Globals(); %s' % ( - self.result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.result()) - - -class LocalsDictItemNode(DictItemNode): - def analyse_types(self, env): - self.key = self.key.analyse_types(env) - self.value = self.value.analyse_types(env) - self.key = self.key.coerce_to_pyobject(env) - if self.value.type.can_coerce_to_pyobject(env): - self.value = self.value.coerce_to_pyobject(env) - else: - self.value = None - return self - - -class FuncLocalsExprNode(DictNode): - def __init__(self, pos, env): - local_vars = sorted([ - entry.name for entry in env.entries.values() if entry.name]) - items = [LocalsDictItemNode( - pos, key=IdentifierStringNode(pos, value=var), - value=NameNode(pos, name=var, allow_null=True)) - for var in local_vars] - DictNode.__init__(self, pos, key_value_pairs=items, - exclude_null_values=True) - - def analyse_types(self, env): - node = super(FuncLocalsExprNode, self).analyse_types(env) - node.key_value_pairs = [ i for i in node.key_value_pairs - if i.value is not None ] - return node - - -class PyClassLocalsExprNode(AtomicExprNode): - def __init__(self, pos, pyclass_dict): - AtomicExprNode.__init__(self, pos) - self.pyclass_dict = pyclass_dict - - def analyse_types(self, env): - self.type = self.pyclass_dict.type - self.is_temp = False - return self - - def may_be_none(self): - return False - - def result(self): - return self.pyclass_dict.result() - - def generate_result_code(self, code): - pass - - -def LocalsExprNode(pos, scope_node, env): - if env.is_module_scope: - return GlobalsExprNode(pos) - if env.is_py_class_scope: - return PyClassLocalsExprNode(pos, scope_node.dict) - return FuncLocalsExprNode(pos, env) - - -#------------------------------------------------------------------- -# -# Unary operator nodes -# -#------------------------------------------------------------------- - -compile_time_unary_operators = { - 'not': operator.not_, - '~': operator.inv, - '-': operator.neg, - '+': operator.pos, -} - -class UnopNode(ExprNode): - # operator string - # operand ExprNode - # - # Processing during analyse_expressions phase: - # - # analyse_c_operation - # Called when the operand is not a pyobject. - # - Check operand type and coerce if needed. - # - Determine result type and result code fragment. - # - Allocate temporary for result if needed. - - subexprs = ['operand'] - infix = True - - def calculate_constant_result(self): - func = compile_time_unary_operators[self.operator] - self.constant_result = func(self.operand.constant_result) - - def compile_time_value(self, denv): - func = compile_time_unary_operators.get(self.operator) - if not func: - error(self.pos, - "Unary '%s' not supported in compile-time expression" - % self.operator) - operand = self.operand.compile_time_value(denv) - try: - return func(operand) - except Exception, e: - self.compile_time_value_error(e) - - def infer_type(self, env): - operand_type = self.operand.infer_type(env) - if operand_type.is_cpp_class or operand_type.is_ptr: - cpp_type = operand_type.find_cpp_operation_type(self.operator) - if cpp_type is not None: - return cpp_type - return self.infer_unop_type(env, operand_type) - - def infer_unop_type(self, env, operand_type): - if operand_type.is_pyobject: - return py_object_type - else: - return operand_type - - def may_be_none(self): - if self.operand.type and self.operand.type.is_builtin_type: - if self.operand.type is not type_type: - return False - return ExprNode.may_be_none(self) - - def analyse_types(self, env): - self.operand = self.operand.analyse_types(env) - if self.is_py_operation(): - self.coerce_operand_to_pyobject(env) - self.type = py_object_type - self.is_temp = 1 - elif self.is_cpp_operation(): - self.analyse_cpp_operation(env) - else: - self.analyse_c_operation(env) - return self - - def check_const(self): - return self.operand.check_const() - - def is_py_operation(self): - return self.operand.type.is_pyobject - - def nogil_check(self, env): - if self.is_py_operation(): - self.gil_error() - - def is_cpp_operation(self): - type = self.operand.type - return type.is_cpp_class - - def coerce_operand_to_pyobject(self, env): - self.operand = self.operand.coerce_to_pyobject(env) - - def generate_result_code(self, code): - if self.operand.type.is_pyobject: - self.generate_py_operation_code(code) - - def generate_py_operation_code(self, code): - function = self.py_operation_function() - code.putln( - "%s = %s(%s); %s" % ( - self.result(), - function, - self.operand.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - def type_error(self): - if not self.operand.type.is_error: - error(self.pos, "Invalid operand type for '%s' (%s)" % - (self.operator, self.operand.type)) - self.type = PyrexTypes.error_type - - def analyse_cpp_operation(self, env): - cpp_type = self.operand.type.find_cpp_operation_type(self.operator) - if cpp_type is None: - error(self.pos, "'%s' operator not defined for %s" % ( - self.operator, type)) - self.type_error() - return - self.type = cpp_type - - -class NotNode(UnopNode): - # 'not' operator - # - # operand ExprNode - operator = '!' - - type = PyrexTypes.c_bint_type - - def calculate_constant_result(self): - self.constant_result = not self.operand.constant_result - - def compile_time_value(self, denv): - operand = self.operand.compile_time_value(denv) - try: - return not operand - except Exception, e: - self.compile_time_value_error(e) - - def infer_unop_type(self, env, operand_type): - return PyrexTypes.c_bint_type - - def analyse_types(self, env): - self.operand = self.operand.analyse_types(env) - operand_type = self.operand.type - if operand_type.is_cpp_class: - cpp_type = operand_type.find_cpp_operation_type(self.operator) - if not cpp_type: - error(self.pos, "'!' operator not defined for %s" % operand_type) - self.type = PyrexTypes.error_type - return - self.type = cpp_type - else: - self.operand = self.operand.coerce_to_boolean(env) - return self - - def calculate_result_code(self): - return "(!%s)" % self.operand.result() - - def generate_result_code(self, code): - pass - - -class UnaryPlusNode(UnopNode): - # unary '+' operator - - operator = '+' - - def analyse_c_operation(self, env): - self.type = PyrexTypes.widest_numeric_type( - self.operand.type, PyrexTypes.c_int_type) - - def py_operation_function(self): - return "PyNumber_Positive" - - def calculate_result_code(self): - if self.is_cpp_operation(): - return "(+%s)" % self.operand.result() - else: - return self.operand.result() - - -class UnaryMinusNode(UnopNode): - # unary '-' operator - - operator = '-' - - def analyse_c_operation(self, env): - if self.operand.type.is_numeric: - self.type = PyrexTypes.widest_numeric_type( - self.operand.type, PyrexTypes.c_int_type) - elif self.operand.type.is_enum: - self.type = PyrexTypes.c_int_type - else: - self.type_error() - if self.type.is_complex: - self.infix = False - - def py_operation_function(self): - return "PyNumber_Negative" - - def calculate_result_code(self): - if self.infix: - return "(-%s)" % self.operand.result() - else: - return "%s(%s)" % (self.operand.type.unary_op('-'), self.operand.result()) - - def get_constant_c_result_code(self): - value = self.operand.get_constant_c_result_code() - if value: - return "(-%s)" % value - -class TildeNode(UnopNode): - # unary '~' operator - - def analyse_c_operation(self, env): - if self.operand.type.is_int: - self.type = PyrexTypes.widest_numeric_type( - self.operand.type, PyrexTypes.c_int_type) - elif self.operand.type.is_enum: - self.type = PyrexTypes.c_int_type - else: - self.type_error() - - def py_operation_function(self): - return "PyNumber_Invert" - - def calculate_result_code(self): - return "(~%s)" % self.operand.result() - - -class CUnopNode(UnopNode): - - def is_py_operation(self): - return False - -class DereferenceNode(CUnopNode): - # unary * operator - - operator = '*' - - def infer_unop_type(self, env, operand_type): - if operand_type.is_ptr: - return operand_type.base_type - else: - return PyrexTypes.error_type - - def analyse_c_operation(self, env): - if self.operand.type.is_ptr: - self.type = self.operand.type.base_type - else: - self.type_error() - - def calculate_result_code(self): - return "(*%s)" % self.operand.result() - - -class DecrementIncrementNode(CUnopNode): - # unary ++/-- operator - - def analyse_c_operation(self, env): - if self.operand.type.is_numeric: - self.type = PyrexTypes.widest_numeric_type( - self.operand.type, PyrexTypes.c_int_type) - elif self.operand.type.is_ptr: - self.type = self.operand.type - else: - self.type_error() - - def calculate_result_code(self): - if self.is_prefix: - return "(%s%s)" % (self.operator, self.operand.result()) - else: - return "(%s%s)" % (self.operand.result(), self.operator) - -def inc_dec_constructor(is_prefix, operator): - return lambda pos, **kwds: DecrementIncrementNode(pos, is_prefix=is_prefix, operator=operator, **kwds) - - -class AmpersandNode(CUnopNode): - # The C address-of operator. - # - # operand ExprNode - operator = '&' - - def infer_unop_type(self, env, operand_type): - return PyrexTypes.c_ptr_type(operand_type) - - def analyse_types(self, env): - self.operand = self.operand.analyse_types(env) - argtype = self.operand.type - if argtype.is_cpp_class: - cpp_type = argtype.find_cpp_operation_type(self.operator) - if cpp_type is not None: - self.type = cpp_type - return self - if not (argtype.is_cfunction or argtype.is_reference or self.operand.is_addressable()): - if argtype.is_memoryviewslice: - self.error("Cannot take address of memoryview slice") - else: - self.error("Taking address of non-lvalue") - return self - if argtype.is_pyobject: - self.error("Cannot take address of Python variable") - return self - self.type = PyrexTypes.c_ptr_type(argtype) - return self - - def check_const(self): - return self.operand.check_const_addr() - - def error(self, mess): - error(self.pos, mess) - self.type = PyrexTypes.error_type - self.result_code = "" - - def calculate_result_code(self): - return "(&%s)" % self.operand.result() - - def generate_result_code(self, code): - pass - - -unop_node_classes = { - "+": UnaryPlusNode, - "-": UnaryMinusNode, - "~": TildeNode, -} - -def unop_node(pos, operator, operand): - # Construct unnop node of appropriate class for - # given operator. - if isinstance(operand, IntNode) and operator == '-': - return IntNode(pos = operand.pos, value = str(-Utils.str_to_number(operand.value)), - longness=operand.longness, unsigned=operand.unsigned) - elif isinstance(operand, UnopNode) and operand.operator == operator in '+-': - warning(pos, "Python has no increment/decrement operator: %s%sx == %s(%sx) == x" % ((operator,)*4), 5) - return unop_node_classes[operator](pos, - operator = operator, - operand = operand) - - -class TypecastNode(ExprNode): - # C type cast - # - # operand ExprNode - # base_type CBaseTypeNode - # declarator CDeclaratorNode - # typecheck boolean - # - # If used from a transform, one can if wanted specify the attribute - # "type" directly and leave base_type and declarator to None - - subexprs = ['operand'] - base_type = declarator = type = None - - def type_dependencies(self, env): - return () - - def infer_type(self, env): - if self.type is None: - base_type = self.base_type.analyse(env) - _, self.type = self.declarator.analyse(base_type, env) - return self.type - - def analyse_types(self, env): - if self.type is None: - base_type = self.base_type.analyse(env) - _, self.type = self.declarator.analyse(base_type, env) - if self.operand.has_constant_result(): - # Must be done after self.type is resolved. - self.calculate_constant_result() - if self.type.is_cfunction: - error(self.pos, - "Cannot cast to a function type") - self.type = PyrexTypes.error_type - self.operand = self.operand.analyse_types(env) - if self.type is PyrexTypes.c_bint_type: - # short circuit this to a coercion - return self.operand.coerce_to_boolean(env) - to_py = self.type.is_pyobject - from_py = self.operand.type.is_pyobject - if from_py and not to_py and self.operand.is_ephemeral(): - if not self.type.is_numeric and not self.type.is_cpp_class: - error(self.pos, "Casting temporary Python object to non-numeric non-Python type") - if to_py and not from_py: - if self.type is bytes_type and self.operand.type.is_int: - return CoerceIntToBytesNode(self.operand, env) - elif self.operand.type.can_coerce_to_pyobject(env): - self.result_ctype = py_object_type - base_type = self.base_type.analyse(env) - self.operand = self.operand.coerce_to(base_type, env) - else: - if self.operand.type.is_ptr: - if not (self.operand.type.base_type.is_void or self.operand.type.base_type.is_struct): - error(self.pos, "Python objects cannot be cast from pointers of primitive types") - else: - # Should this be an error? - warning(self.pos, "No conversion from %s to %s, python object pointer used." % (self.operand.type, self.type)) - self.operand = self.operand.coerce_to_simple(env) - elif from_py and not to_py: - if self.type.create_from_py_utility_code(env): - self.operand = self.operand.coerce_to(self.type, env) - elif self.type.is_ptr: - if not (self.type.base_type.is_void or self.type.base_type.is_struct): - error(self.pos, "Python objects cannot be cast to pointers of primitive types") - else: - warning(self.pos, "No conversion from %s to %s, python object pointer used." % (self.type, self.operand.type)) - elif from_py and to_py: - if self.typecheck: - self.operand = PyTypeTestNode(self.operand, self.type, env, notnone=True) - elif isinstance(self.operand, SliceIndexNode): - # This cast can influence the created type of string slices. - self.operand = self.operand.coerce_to(self.type, env) - elif self.type.is_complex and self.operand.type.is_complex: - self.operand = self.operand.coerce_to_simple(env) - elif self.operand.type.is_fused: - self.operand = self.operand.coerce_to(self.type, env) - #self.type = self.operand.type - return self - - def is_simple(self): - # either temp or a C cast => no side effects other than the operand's - return self.operand.is_simple() - - def nonlocally_immutable(self): - return self.is_temp or self.operand.nonlocally_immutable() - - def nogil_check(self, env): - if self.type and self.type.is_pyobject and self.is_temp: - self.gil_error() - - def check_const(self): - return self.operand.check_const() - - def calculate_constant_result(self): - self.constant_result = self.calculate_result_code(self.operand.constant_result) - - def calculate_result_code(self, operand_result = None): - if operand_result is None: - operand_result = self.operand.result() - if self.type.is_complex: - operand_result = self.operand.result() - if self.operand.type.is_complex: - real_part = self.type.real_type.cast_code("__Pyx_CREAL(%s)" % operand_result) - imag_part = self.type.real_type.cast_code("__Pyx_CIMAG(%s)" % operand_result) - else: - real_part = self.type.real_type.cast_code(operand_result) - imag_part = "0" - return "%s(%s, %s)" % ( - self.type.from_parts, - real_part, - imag_part) - else: - return self.type.cast_code(operand_result) - - def get_constant_c_result_code(self): - operand_result = self.operand.get_constant_c_result_code() - if operand_result: - return self.type.cast_code(operand_result) - - def result_as(self, type): - if self.type.is_pyobject and not self.is_temp: - # Optimise away some unnecessary casting - return self.operand.result_as(type) - else: - return ExprNode.result_as(self, type) - - def generate_result_code(self, code): - if self.is_temp: - code.putln( - "%s = (PyObject *)%s;" % ( - self.result(), - self.operand.result())) - code.put_incref(self.result(), self.ctype()) - - -ERR_START = "Start may not be given" -ERR_NOT_STOP = "Stop must be provided to indicate shape" -ERR_STEPS = ("Strides may only be given to indicate contiguity. " - "Consider slicing it after conversion") -ERR_NOT_POINTER = "Can only create cython.array from pointer or array" -ERR_BASE_TYPE = "Pointer base type does not match cython.array base type" - -class CythonArrayNode(ExprNode): - """ - Used when a pointer of base_type is cast to a memoryviewslice with that - base type. i.e. - - p - - creates a fortran-contiguous cython.array. - - We leave the type set to object so coercions to object are more efficient - and less work. Acquiring a memoryviewslice from this will be just as - efficient. ExprNode.coerce_to() will do the additional typecheck on - self.compile_time_type - - This also handles my_c_array - - - operand ExprNode the thing we're casting - base_type_node MemoryViewSliceTypeNode the cast expression node - """ - - subexprs = ['operand', 'shapes'] - - shapes = None - is_temp = True - mode = "c" - array_dtype = None - - shape_type = PyrexTypes.c_py_ssize_t_type - - def analyse_types(self, env): - import MemoryView - - self.operand = self.operand.analyse_types(env) - if self.array_dtype: - array_dtype = self.array_dtype - else: - array_dtype = self.base_type_node.base_type_node.analyse(env) - axes = self.base_type_node.axes - - MemoryView.validate_memslice_dtype(self.pos, array_dtype) - - self.type = error_type - self.shapes = [] - ndim = len(axes) - - # Base type of the pointer or C array we are converting - base_type = self.operand.type - - if not self.operand.type.is_ptr and not self.operand.type.is_array: - error(self.operand.pos, ERR_NOT_POINTER) - return self - - # Dimension sizes of C array - array_dimension_sizes = [] - if base_type.is_array: - while base_type.is_array: - array_dimension_sizes.append(base_type.size) - base_type = base_type.base_type - elif base_type.is_ptr: - base_type = base_type.base_type - else: - error(self.pos, "unexpected base type %s found" % base_type) - return self - - if not (base_type.same_as(array_dtype) or base_type.is_void): - error(self.operand.pos, ERR_BASE_TYPE) - return self - elif self.operand.type.is_array and len(array_dimension_sizes) != ndim: - error(self.operand.pos, - "Expected %d dimensions, array has %d dimensions" % - (ndim, len(array_dimension_sizes))) - return self - - # Verify the start, stop and step values - # In case of a C array, use the size of C array in each dimension to - # get an automatic cast - for axis_no, axis in enumerate(axes): - if not axis.start.is_none: - error(axis.start.pos, ERR_START) - return self - - if axis.stop.is_none: - if array_dimension_sizes: - dimsize = array_dimension_sizes[axis_no] - axis.stop = IntNode(self.pos, value=str(dimsize), - constant_result=dimsize, - type=PyrexTypes.c_int_type) - else: - error(axis.pos, ERR_NOT_STOP) - return self - - axis.stop = axis.stop.analyse_types(env) - shape = axis.stop.coerce_to(self.shape_type, env) - if not shape.is_literal: - shape.coerce_to_temp(env) - - self.shapes.append(shape) - - first_or_last = axis_no in (0, ndim - 1) - if not axis.step.is_none and first_or_last: - # '1' in the first or last dimension denotes F or C contiguity - axis.step = axis.step.analyse_types(env) - if (not axis.step.type.is_int and axis.step.is_literal and not - axis.step.type.is_error): - error(axis.step.pos, "Expected an integer literal") - return self - - if axis.step.compile_time_value(env) != 1: - error(axis.step.pos, ERR_STEPS) - return self - - if axis_no == 0: - self.mode = "fortran" - - elif not axis.step.is_none and not first_or_last: - # step provided in some other dimension - error(axis.step.pos, ERR_STEPS) - return self - - if not self.operand.is_name: - self.operand = self.operand.coerce_to_temp(env) - - axes = [('direct', 'follow')] * len(axes) - if self.mode == "fortran": - axes[0] = ('direct', 'contig') - else: - axes[-1] = ('direct', 'contig') - - self.coercion_type = PyrexTypes.MemoryViewSliceType(array_dtype, axes) - self.type = self.get_cython_array_type(env) - MemoryView.use_cython_array_utility_code(env) - env.use_utility_code(MemoryView.typeinfo_to_format_code) - return self - - def allocate_temp_result(self, code): - if self.temp_code: - raise RuntimeError("temp allocated mulitple times") - - self.temp_code = code.funcstate.allocate_temp(self.type, True) - - def infer_type(self, env): - return self.get_cython_array_type(env) - - def get_cython_array_type(self, env): - return env.global_scope().context.cython_scope.viewscope.lookup("array").type - - def generate_result_code(self, code): - import Buffer - - shapes = [self.shape_type.cast_code(shape.result()) - for shape in self.shapes] - dtype = self.coercion_type.dtype - - shapes_temp = code.funcstate.allocate_temp(py_object_type, True) - format_temp = code.funcstate.allocate_temp(py_object_type, True) - - itemsize = "sizeof(%s)" % dtype.declaration_code("") - type_info = Buffer.get_type_information_cname(code, dtype) - - if self.operand.type.is_ptr: - code.putln("if (!%s) {" % self.operand.result()) - code.putln( 'PyErr_SetString(PyExc_ValueError,' - '"Cannot create cython.array from NULL pointer");') - code.putln(code.error_goto(self.operand.pos)) - code.putln("}") - - code.putln("%s = __pyx_format_from_typeinfo(&%s);" % - (format_temp, type_info)) - buildvalue_fmt = " __PYX_BUILD_PY_SSIZE_T " * len(shapes) - code.putln('%s = Py_BuildValue((char*) "(" %s ")", %s);' % ( - shapes_temp, buildvalue_fmt, ", ".join(shapes))) - - err = "!%s || !%s || !PyBytes_AsString(%s)" % (format_temp, - shapes_temp, - format_temp) - code.putln(code.error_goto_if(err, self.pos)) - code.put_gotref(format_temp) - code.put_gotref(shapes_temp) - - tup = (self.result(), shapes_temp, itemsize, format_temp, - self.mode, self.operand.result()) - code.putln('%s = __pyx_array_new(' - '%s, %s, PyBytes_AS_STRING(%s), ' - '(char *) "%s", (char *) %s);' % tup) - code.putln(code.error_goto_if_null(self.result(), self.pos)) - code.put_gotref(self.result()) - - def dispose(temp): - code.put_decref_clear(temp, py_object_type) - code.funcstate.release_temp(temp) - - dispose(shapes_temp) - dispose(format_temp) - - @classmethod - def from_carray(cls, src_node, env): - """ - Given a C array type, return a CythonArrayNode - """ - pos = src_node.pos - base_type = src_node.type - - none_node = NoneNode(pos) - axes = [] - - while base_type.is_array: - axes.append(SliceNode(pos, start=none_node, stop=none_node, - step=none_node)) - base_type = base_type.base_type - axes[-1].step = IntNode(pos, value="1", is_c_literal=True) - - memslicenode = Nodes.MemoryViewSliceTypeNode(pos, axes=axes, - base_type_node=base_type) - result = CythonArrayNode(pos, base_type_node=memslicenode, - operand=src_node, array_dtype=base_type) - result = result.analyse_types(env) - return result - -class SizeofNode(ExprNode): - # Abstract base class for sizeof(x) expression nodes. - - type = PyrexTypes.c_size_t_type - - def check_const(self): - return True - - def generate_result_code(self, code): - pass - - -class SizeofTypeNode(SizeofNode): - # C sizeof function applied to a type - # - # base_type CBaseTypeNode - # declarator CDeclaratorNode - - subexprs = [] - arg_type = None - - def analyse_types(self, env): - # we may have incorrectly interpreted a dotted name as a type rather than an attribute - # this could be better handled by more uniformly treating types as runtime-available objects - if 0 and self.base_type.module_path: - path = self.base_type.module_path - obj = env.lookup(path[0]) - if obj.as_module is None: - operand = NameNode(pos=self.pos, name=path[0]) - for attr in path[1:]: - operand = AttributeNode(pos=self.pos, obj=operand, attribute=attr) - operand = AttributeNode(pos=self.pos, obj=operand, attribute=self.base_type.name) - self.operand = operand - self.__class__ = SizeofVarNode - node = self.analyse_types(env) - return node - if self.arg_type is None: - base_type = self.base_type.analyse(env) - _, arg_type = self.declarator.analyse(base_type, env) - self.arg_type = arg_type - self.check_type() - return self - - def check_type(self): - arg_type = self.arg_type - if arg_type.is_pyobject and not arg_type.is_extension_type: - error(self.pos, "Cannot take sizeof Python object") - elif arg_type.is_void: - error(self.pos, "Cannot take sizeof void") - elif not arg_type.is_complete(): - error(self.pos, "Cannot take sizeof incomplete type '%s'" % arg_type) - - def calculate_result_code(self): - if self.arg_type.is_extension_type: - # the size of the pointer is boring - # we want the size of the actual struct - arg_code = self.arg_type.declaration_code("", deref=1) - else: - arg_code = self.arg_type.declaration_code("") - return "(sizeof(%s))" % arg_code - - -class SizeofVarNode(SizeofNode): - # C sizeof function applied to a variable - # - # operand ExprNode - - subexprs = ['operand'] - - def analyse_types(self, env): - # We may actually be looking at a type rather than a variable... - # If we are, traditional analysis would fail... - operand_as_type = self.operand.analyse_as_type(env) - if operand_as_type: - self.arg_type = operand_as_type - if self.arg_type.is_fused: - self.arg_type = self.arg_type.specialize(env.fused_to_specific) - self.__class__ = SizeofTypeNode - self.check_type() - else: - self.operand = self.operand.analyse_types(env) - return self - - def calculate_result_code(self): - return "(sizeof(%s))" % self.operand.result() - - def generate_result_code(self, code): - pass - -class TypeofNode(ExprNode): - # Compile-time type of an expression, as a string. - # - # operand ExprNode - # literal StringNode # internal - - literal = None - type = py_object_type - - subexprs = ['literal'] # 'operand' will be ignored after type analysis! - - def analyse_types(self, env): - self.operand = self.operand.analyse_types(env) - value = StringEncoding.EncodedString(str(self.operand.type)) #self.operand.type.typeof_name()) - literal = StringNode(self.pos, value=value) - literal = literal.analyse_types(env) - self.literal = literal.coerce_to_pyobject(env) - return self - - def may_be_none(self): - return False - - def generate_evaluation_code(self, code): - self.literal.generate_evaluation_code(code) - - def calculate_result_code(self): - return self.literal.calculate_result_code() - -#------------------------------------------------------------------- -# -# Binary operator nodes -# -#------------------------------------------------------------------- - -compile_time_binary_operators = { - '<': operator.lt, - '<=': operator.le, - '==': operator.eq, - '!=': operator.ne, - '>=': operator.ge, - '>': operator.gt, - 'is': operator.is_, - 'is_not': operator.is_not, - '+': operator.add, - '&': operator.and_, - '/': operator.truediv, - '//': operator.floordiv, - '<<': operator.lshift, - '%': operator.mod, - '*': operator.mul, - '|': operator.or_, - '**': operator.pow, - '>>': operator.rshift, - '-': operator.sub, - '^': operator.xor, - 'in': lambda x, seq: x in seq, - 'not_in': lambda x, seq: x not in seq, -} - -def get_compile_time_binop(node): - func = compile_time_binary_operators.get(node.operator) - if not func: - error(node.pos, - "Binary '%s' not supported in compile-time expression" - % node.operator) - return func - -class BinopNode(ExprNode): - # operator string - # operand1 ExprNode - # operand2 ExprNode - # - # Processing during analyse_expressions phase: - # - # analyse_c_operation - # Called when neither operand is a pyobject. - # - Check operand types and coerce if needed. - # - Determine result type and result code fragment. - # - Allocate temporary for result if needed. - - subexprs = ['operand1', 'operand2'] - inplace = False - - def calculate_constant_result(self): - func = compile_time_binary_operators[self.operator] - self.constant_result = func( - self.operand1.constant_result, - self.operand2.constant_result) - - def compile_time_value(self, denv): - func = get_compile_time_binop(self) - operand1 = self.operand1.compile_time_value(denv) - operand2 = self.operand2.compile_time_value(denv) - try: - return func(operand1, operand2) - except Exception, e: - self.compile_time_value_error(e) - - def infer_type(self, env): - return self.result_type(self.operand1.infer_type(env), - self.operand2.infer_type(env)) - - def analyse_types(self, env): - self.operand1 = self.operand1.analyse_types(env) - self.operand2 = self.operand2.analyse_types(env) - self.analyse_operation(env) - return self - - def analyse_operation(self, env): - if self.is_py_operation(): - self.coerce_operands_to_pyobjects(env) - self.type = self.result_type(self.operand1.type, - self.operand2.type) - assert self.type.is_pyobject - self.is_temp = 1 - elif self.is_cpp_operation(): - self.analyse_cpp_operation(env) - else: - self.analyse_c_operation(env) - - def is_py_operation(self): - return self.is_py_operation_types(self.operand1.type, self.operand2.type) - - def is_py_operation_types(self, type1, type2): - return type1.is_pyobject or type2.is_pyobject - - def is_cpp_operation(self): - return (self.operand1.type.is_cpp_class - or self.operand2.type.is_cpp_class) - - def analyse_cpp_operation(self, env): - entry = env.lookup_operator(self.operator, [self.operand1, self.operand2]) - if not entry: - self.type_error() - return - func_type = entry.type - if func_type.is_ptr: - func_type = func_type.base_type - if len(func_type.args) == 1: - self.operand2 = self.operand2.coerce_to(func_type.args[0].type, env) - else: - self.operand1 = self.operand1.coerce_to(func_type.args[0].type, env) - self.operand2 = self.operand2.coerce_to(func_type.args[1].type, env) - self.type = func_type.return_type - - def result_type(self, type1, type2): - if self.is_py_operation_types(type1, type2): - if type2.is_string: - type2 = Builtin.bytes_type - elif type2.is_pyunicode_ptr: - type2 = Builtin.unicode_type - if type1.is_string: - type1 = Builtin.bytes_type - elif type1.is_pyunicode_ptr: - type1 = Builtin.unicode_type - if type1.is_builtin_type or type2.is_builtin_type: - if type1 is type2 and self.operator in '**%+|&^': - # FIXME: at least these operators should be safe - others? - return type1 - result_type = self.infer_builtin_types_operation(type1, type2) - if result_type is not None: - return result_type - return py_object_type - else: - return self.compute_c_result_type(type1, type2) - - def infer_builtin_types_operation(self, type1, type2): - return None - - def nogil_check(self, env): - if self.is_py_operation(): - self.gil_error() - - def coerce_operands_to_pyobjects(self, env): - self.operand1 = self.operand1.coerce_to_pyobject(env) - self.operand2 = self.operand2.coerce_to_pyobject(env) - - def check_const(self): - return self.operand1.check_const() and self.operand2.check_const() - - def generate_result_code(self, code): - #print "BinopNode.generate_result_code:", self.operand1, self.operand2 ### - if self.operand1.type.is_pyobject: - function = self.py_operation_function() - if self.operator == '**': - extra_args = ", Py_None" - else: - extra_args = "" - code.putln( - "%s = %s(%s, %s%s); %s" % ( - self.result(), - function, - self.operand1.py_result(), - self.operand2.py_result(), - extra_args, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - elif self.is_temp: - code.putln("%s = %s;" % (self.result(), self.calculate_result_code())) - - def type_error(self): - if not (self.operand1.type.is_error - or self.operand2.type.is_error): - error(self.pos, "Invalid operand types for '%s' (%s; %s)" % - (self.operator, self.operand1.type, - self.operand2.type)) - self.type = PyrexTypes.error_type - - -class CBinopNode(BinopNode): - - def analyse_types(self, env): - node = BinopNode.analyse_types(self, env) - if node.is_py_operation(): - node.type = PyrexTypes.error_type - return node - - def py_operation_function(self): - return "" - - def calculate_result_code(self): - return "(%s %s %s)" % ( - self.operand1.result(), - self.operator, - self.operand2.result()) - - def compute_c_result_type(self, type1, type2): - cpp_type = None - if type1.is_cpp_class or type1.is_ptr: - cpp_type = type1.find_cpp_operation_type(self.operator, type2) - # FIXME: handle the reversed case? - #if cpp_type is None and (type2.is_cpp_class or type2.is_ptr): - # cpp_type = type2.find_cpp_operation_type(self.operator, type1) - # FIXME: do we need to handle other cases here? - return cpp_type - - -def c_binop_constructor(operator): - def make_binop_node(pos, **operands): - return CBinopNode(pos, operator=operator, **operands) - return make_binop_node - -class NumBinopNode(BinopNode): - # Binary operation taking numeric arguments. - - infix = True - overflow_check = False - overflow_bit_node = None - - def analyse_c_operation(self, env): - type1 = self.operand1.type - type2 = self.operand2.type - self.type = self.compute_c_result_type(type1, type2) - if not self.type: - self.type_error() - return - if self.type.is_complex: - self.infix = False - if (self.type.is_int - and env.directives['overflowcheck'] - and self.operator in self.overflow_op_names): - if (self.operator in ('+', '*') - and self.operand1.has_constant_result() - and not self.operand2.has_constant_result()): - self.operand1, self.operand2 = self.operand2, self.operand1 - self.overflow_check = True - self.overflow_fold = env.directives['overflowcheck.fold'] - self.func = self.type.overflow_check_binop( - self.overflow_op_names[self.operator], - env, - const_rhs = self.operand2.has_constant_result()) - self.is_temp = True - if not self.infix or (type1.is_numeric and type2.is_numeric): - self.operand1 = self.operand1.coerce_to(self.type, env) - self.operand2 = self.operand2.coerce_to(self.type, env) - - def compute_c_result_type(self, type1, type2): - if self.c_types_okay(type1, type2): - widest_type = PyrexTypes.widest_numeric_type(type1, type2) - if widest_type is PyrexTypes.c_bint_type: - if self.operator not in '|^&': - # False + False == 0 # not False! - widest_type = PyrexTypes.c_int_type - else: - widest_type = PyrexTypes.widest_numeric_type( - widest_type, PyrexTypes.c_int_type) - return widest_type - else: - return None - - def may_be_none(self): - if self.type and self.type.is_builtin_type: - # if we know the result type, we know the operation, so it can't be None - return False - type1 = self.operand1.type - type2 = self.operand2.type - if type1 and type1.is_builtin_type and type2 and type2.is_builtin_type: - # XXX: I can't think of any case where a binary operation - # on builtin types evaluates to None - add a special case - # here if there is one. - return False - return super(NumBinopNode, self).may_be_none() - - def get_constant_c_result_code(self): - value1 = self.operand1.get_constant_c_result_code() - value2 = self.operand2.get_constant_c_result_code() - if value1 and value2: - return "(%s %s %s)" % (value1, self.operator, value2) - else: - return None - - def c_types_okay(self, type1, type2): - #print "NumBinopNode.c_types_okay:", type1, type2 ### - return (type1.is_numeric or type1.is_enum) \ - and (type2.is_numeric or type2.is_enum) - - def generate_evaluation_code(self, code): - if self.overflow_check: - self.overflow_bit_node = self - self.overflow_bit = code.funcstate.allocate_temp(PyrexTypes.c_int_type, manage_ref=False) - code.putln("%s = 0;" % self.overflow_bit) - super(NumBinopNode, self).generate_evaluation_code(code) - if self.overflow_check: - code.putln("if (unlikely(%s)) {" % self.overflow_bit) - code.putln('PyErr_SetString(PyExc_OverflowError, "value too large");') - code.putln(code.error_goto(self.pos)) - code.putln("}") - code.funcstate.release_temp(self.overflow_bit) - - def calculate_result_code(self): - if self.overflow_bit_node is not None: - return "%s(%s, %s, &%s)" % ( - self.func, - self.operand1.result(), - self.operand2.result(), - self.overflow_bit_node.overflow_bit) - elif self.infix: - return "(%s %s %s)" % ( - self.operand1.result(), - self.operator, - self.operand2.result()) - else: - func = self.type.binary_op(self.operator) - if func is None: - error(self.pos, "binary operator %s not supported for %s" % (self.operator, self.type)) - return "%s(%s, %s)" % ( - func, - self.operand1.result(), - self.operand2.result()) - - def is_py_operation_types(self, type1, type2): - return (type1.is_unicode_char or - type2.is_unicode_char or - BinopNode.is_py_operation_types(self, type1, type2)) - - def py_operation_function(self): - function_name = self.py_functions[self.operator] - if self.inplace: - function_name = function_name.replace('PyNumber_', 'PyNumber_InPlace') - return function_name - - py_functions = { - "|": "PyNumber_Or", - "^": "PyNumber_Xor", - "&": "PyNumber_And", - "<<": "PyNumber_Lshift", - ">>": "PyNumber_Rshift", - "+": "PyNumber_Add", - "-": "PyNumber_Subtract", - "*": "PyNumber_Multiply", - "/": "__Pyx_PyNumber_Divide", - "//": "PyNumber_FloorDivide", - "%": "PyNumber_Remainder", - "**": "PyNumber_Power" - } - - overflow_op_names = { - "+": "add", - "-": "sub", - "*": "mul", - "<<": "lshift", - } - - -class IntBinopNode(NumBinopNode): - # Binary operation taking integer arguments. - - def c_types_okay(self, type1, type2): - #print "IntBinopNode.c_types_okay:", type1, type2 ### - return (type1.is_int or type1.is_enum) \ - and (type2.is_int or type2.is_enum) - - -class AddNode(NumBinopNode): - # '+' operator. - - def is_py_operation_types(self, type1, type2): - if type1.is_string and type2.is_string or type1.is_pyunicode_ptr and type2.is_pyunicode_ptr: - return 1 - else: - return NumBinopNode.is_py_operation_types(self, type1, type2) - - def infer_builtin_types_operation(self, type1, type2): - # b'abc' + 'abc' raises an exception in Py3, - # so we can safely infer the Py2 type for bytes here - string_types = [bytes_type, str_type, basestring_type, unicode_type] # Py2.4 lacks tuple.index() - if type1 in string_types and type2 in string_types: - return string_types[max(string_types.index(type1), - string_types.index(type2))] - return None - - def compute_c_result_type(self, type1, type2): - #print "AddNode.compute_c_result_type:", type1, self.operator, type2 ### - if (type1.is_ptr or type1.is_array) and (type2.is_int or type2.is_enum): - return type1 - elif (type2.is_ptr or type2.is_array) and (type1.is_int or type1.is_enum): - return type2 - else: - return NumBinopNode.compute_c_result_type( - self, type1, type2) - - def py_operation_function(self): - type1, type2 = self.operand1.type, self.operand2.type - if type1 is unicode_type or type2 is unicode_type: - if type1.is_builtin_type and type2.is_builtin_type: - if self.operand1.may_be_none() or self.operand2.may_be_none(): - return '__Pyx_PyUnicode_ConcatSafe' - else: - return '__Pyx_PyUnicode_Concat' - return super(AddNode, self).py_operation_function() - - -class SubNode(NumBinopNode): - # '-' operator. - - def compute_c_result_type(self, type1, type2): - if (type1.is_ptr or type1.is_array) and (type2.is_int or type2.is_enum): - return type1 - elif (type1.is_ptr or type1.is_array) and (type2.is_ptr or type2.is_array): - return PyrexTypes.c_ptrdiff_t_type - else: - return NumBinopNode.compute_c_result_type( - self, type1, type2) - - -class MulNode(NumBinopNode): - # '*' operator. - - def is_py_operation_types(self, type1, type2): - if ((type1.is_string and type2.is_int) or - (type2.is_string and type1.is_int)): - return 1 - else: - return NumBinopNode.is_py_operation_types(self, type1, type2) - - def infer_builtin_types_operation(self, type1, type2): - # let's assume that whatever builtin type you multiply a string with - # will either return a string of the same type or fail with an exception - string_types = (bytes_type, str_type, basestring_type, unicode_type) - if type1 in string_types and type2.is_builtin_type: - return type1 - if type2 in string_types and type1.is_builtin_type: - return type2 - # multiplication of containers/numbers with an integer value - # always (?) returns the same type - if type1.is_int: - return type2 - if type2.is_int: - return type1 - return None - - -class DivNode(NumBinopNode): - # '/' or '//' operator. - - cdivision = None - truedivision = None # == "unknown" if operator == '/' - ctruedivision = False - cdivision_warnings = False - zerodivision_check = None - - def find_compile_time_binary_operator(self, op1, op2): - func = compile_time_binary_operators[self.operator] - if self.operator == '/' and self.truedivision is None: - # => true div for floats, floor div for integers - if isinstance(op1, (int,long)) and isinstance(op2, (int,long)): - func = compile_time_binary_operators['//'] - return func - - def calculate_constant_result(self): - op1 = self.operand1.constant_result - op2 = self.operand2.constant_result - func = self.find_compile_time_binary_operator(op1, op2) - self.constant_result = func( - self.operand1.constant_result, - self.operand2.constant_result) - - def compile_time_value(self, denv): - operand1 = self.operand1.compile_time_value(denv) - operand2 = self.operand2.compile_time_value(denv) - try: - func = self.find_compile_time_binary_operator( - operand1, operand2) - return func(operand1, operand2) - except Exception, e: - self.compile_time_value_error(e) - - def analyse_operation(self, env): - if self.cdivision or env.directives['cdivision']: - self.ctruedivision = False - else: - self.ctruedivision = self.truedivision - NumBinopNode.analyse_operation(self, env) - if self.is_cpp_operation(): - self.cdivision = True - if not self.type.is_pyobject: - self.zerodivision_check = ( - self.cdivision is None and not env.directives['cdivision'] - and (not self.operand2.has_constant_result() or - self.operand2.constant_result == 0)) - if self.zerodivision_check or env.directives['cdivision_warnings']: - # Need to check ahead of time to warn or raise zero division error - self.operand1 = self.operand1.coerce_to_simple(env) - self.operand2 = self.operand2.coerce_to_simple(env) - - def compute_c_result_type(self, type1, type2): - if self.operator == '/' and self.ctruedivision: - if not type1.is_float and not type2.is_float: - widest_type = PyrexTypes.widest_numeric_type(type1, PyrexTypes.c_double_type) - widest_type = PyrexTypes.widest_numeric_type(type2, widest_type) - return widest_type - return NumBinopNode.compute_c_result_type(self, type1, type2) - - def zero_division_message(self): - if self.type.is_int: - return "integer division or modulo by zero" - else: - return "float division" - - def generate_evaluation_code(self, code): - if not self.type.is_pyobject and not self.type.is_complex: - if self.cdivision is None: - self.cdivision = (code.globalstate.directives['cdivision'] - or not self.type.signed - or self.type.is_float) - if not self.cdivision: - code.globalstate.use_utility_code(div_int_utility_code.specialize(self.type)) - NumBinopNode.generate_evaluation_code(self, code) - self.generate_div_warning_code(code) - - def generate_div_warning_code(self, code): - if not self.type.is_pyobject: - if self.zerodivision_check: - if not self.infix: - zero_test = "%s(%s)" % (self.type.unary_op('zero'), self.operand2.result()) - else: - zero_test = "%s == 0" % self.operand2.result() - code.putln("if (unlikely(%s)) {" % zero_test) - code.put_ensure_gil() - code.putln('PyErr_SetString(PyExc_ZeroDivisionError, "%s");' % self.zero_division_message()) - code.put_release_ensured_gil() - code.putln(code.error_goto(self.pos)) - code.putln("}") - if self.type.is_int and self.type.signed and self.operator != '%': - code.globalstate.use_utility_code(division_overflow_test_code) - if self.operand2.type.signed == 2: - # explicitly signed, no runtime check needed - minus1_check = 'unlikely(%s == -1)' % self.operand2.result() - else: - type_of_op2 = self.operand2.type.declaration_code('') - minus1_check = '(!(((%s)-1) > 0)) && unlikely(%s == (%s)-1)' % ( - type_of_op2, self.operand2.result(), type_of_op2) - code.putln("else if (sizeof(%s) == sizeof(long) && %s " - " && unlikely(UNARY_NEG_WOULD_OVERFLOW(%s))) {" % ( - self.type.declaration_code(''), - minus1_check, - self.operand1.result())) - code.put_ensure_gil() - code.putln('PyErr_SetString(PyExc_OverflowError, "value too large to perform division");') - code.put_release_ensured_gil() - code.putln(code.error_goto(self.pos)) - code.putln("}") - if code.globalstate.directives['cdivision_warnings'] and self.operator != '/': - code.globalstate.use_utility_code(cdivision_warning_utility_code) - code.putln("if (unlikely((%s < 0) ^ (%s < 0))) {" % ( - self.operand1.result(), - self.operand2.result())) - code.put_ensure_gil() - code.putln(code.set_error_info(self.pos, used=True)) - code.putln("if (__Pyx_cdivision_warning(%(FILENAME)s, " - "%(LINENO)s)) {" % { - 'FILENAME': Naming.filename_cname, - 'LINENO': Naming.lineno_cname, - }) - code.put_release_ensured_gil() - code.put_goto(code.error_label) - code.putln("}") - code.put_release_ensured_gil() - code.putln("}") - - def calculate_result_code(self): - if self.type.is_complex: - return NumBinopNode.calculate_result_code(self) - elif self.type.is_float and self.operator == '//': - return "floor(%s / %s)" % ( - self.operand1.result(), - self.operand2.result()) - elif self.truedivision or self.cdivision: - op1 = self.operand1.result() - op2 = self.operand2.result() - if self.truedivision: - if self.type != self.operand1.type: - op1 = self.type.cast_code(op1) - if self.type != self.operand2.type: - op2 = self.type.cast_code(op2) - return "(%s / %s)" % (op1, op2) - else: - return "__Pyx_div_%s(%s, %s)" % ( - self.type.specialization_name(), - self.operand1.result(), - self.operand2.result()) - - -class ModNode(DivNode): - # '%' operator. - - def is_py_operation_types(self, type1, type2): - return (type1.is_string - or type2.is_string - or NumBinopNode.is_py_operation_types(self, type1, type2)) - - def infer_builtin_types_operation(self, type1, type2): - # b'%s' % xyz raises an exception in Py3, so it's safe to infer the type for Py2 - if type1 is unicode_type: - # None + xyz may be implemented by RHS - if type2.is_builtin_type or not self.operand1.may_be_none(): - return type1 - elif type1 in (bytes_type, str_type, basestring_type): - if type2 is unicode_type: - return type2 - elif type2.is_numeric: - return type1 - elif type1 is bytes_type and not type2.is_builtin_type: - return None # RHS might implement '% operator differently in Py3 - else: - return basestring_type # either str or unicode, can't tell - return None - - def zero_division_message(self): - if self.type.is_int: - return "integer division or modulo by zero" - else: - return "float divmod()" - - def analyse_operation(self, env): - DivNode.analyse_operation(self, env) - if not self.type.is_pyobject: - if self.cdivision is None: - self.cdivision = env.directives['cdivision'] or not self.type.signed - if not self.cdivision and not self.type.is_int and not self.type.is_float: - error(self.pos, "mod operator not supported for type '%s'" % self.type) - - def generate_evaluation_code(self, code): - if not self.type.is_pyobject and not self.cdivision: - if self.type.is_int: - code.globalstate.use_utility_code( - mod_int_utility_code.specialize(self.type)) - else: # float - code.globalstate.use_utility_code( - mod_float_utility_code.specialize( - self.type, math_h_modifier=self.type.math_h_modifier)) - # note: skipping over DivNode here - NumBinopNode.generate_evaluation_code(self, code) - self.generate_div_warning_code(code) - - def calculate_result_code(self): - if self.cdivision: - if self.type.is_float: - return "fmod%s(%s, %s)" % ( - self.type.math_h_modifier, - self.operand1.result(), - self.operand2.result()) - else: - return "(%s %% %s)" % ( - self.operand1.result(), - self.operand2.result()) - else: - return "__Pyx_mod_%s(%s, %s)" % ( - self.type.specialization_name(), - self.operand1.result(), - self.operand2.result()) - - def py_operation_function(self): - if self.operand1.type is unicode_type: - if self.operand1.may_be_none(): - return '__Pyx_PyUnicode_FormatSafe' - else: - return 'PyUnicode_Format' - elif self.operand1.type is str_type: - if self.operand1.may_be_none(): - return '__Pyx_PyString_FormatSafe' - else: - return '__Pyx_PyString_Format' - return super(ModNode, self).py_operation_function() - - -class PowNode(NumBinopNode): - # '**' operator. - - def analyse_c_operation(self, env): - NumBinopNode.analyse_c_operation(self, env) - if self.type.is_complex: - if self.type.real_type.is_float: - self.operand1 = self.operand1.coerce_to(self.type, env) - self.operand2 = self.operand2.coerce_to(self.type, env) - self.pow_func = "__Pyx_c_pow" + self.type.real_type.math_h_modifier - else: - error(self.pos, "complex int powers not supported") - self.pow_func = "" - elif self.type.is_float: - self.pow_func = "pow" + self.type.math_h_modifier - elif self.type.is_int: - self.pow_func = "__Pyx_pow_%s" % self.type.declaration_code('').replace(' ', '_') - env.use_utility_code( - int_pow_utility_code.specialize( - func_name=self.pow_func, - type=self.type.declaration_code(''), - signed=self.type.signed and 1 or 0)) - elif not self.type.is_error: - error(self.pos, "got unexpected types for C power operator: %s, %s" % - (self.operand1.type, self.operand2.type)) - - def calculate_result_code(self): - # Work around MSVC overloading ambiguity. - def typecast(operand): - if self.type == operand.type: - return operand.result() - else: - return self.type.cast_code(operand.result()) - return "%s(%s, %s)" % ( - self.pow_func, - typecast(self.operand1), - typecast(self.operand2)) - - -# Note: This class is temporarily "shut down" into an ineffective temp -# allocation mode. -# -# More sophisticated temp reuse was going on before, one could have a -# look at adding this again after /all/ classes are converted to the -# new temp scheme. (The temp juggling cannot work otherwise). -class BoolBinopNode(ExprNode): - # Short-circuiting boolean operation. - # - # operator string - # operand1 ExprNode - # operand2 ExprNode - - subexprs = ['operand1', 'operand2'] - - def infer_type(self, env): - type1 = self.operand1.infer_type(env) - type2 = self.operand2.infer_type(env) - return PyrexTypes.independent_spanning_type(type1, type2) - - def may_be_none(self): - if self.operator == 'or': - return self.operand2.may_be_none() - else: - return self.operand1.may_be_none() or self.operand2.may_be_none() - - def calculate_constant_result(self): - if self.operator == 'and': - self.constant_result = \ - self.operand1.constant_result and \ - self.operand2.constant_result - else: - self.constant_result = \ - self.operand1.constant_result or \ - self.operand2.constant_result - - def compile_time_value(self, denv): - if self.operator == 'and': - return self.operand1.compile_time_value(denv) \ - and self.operand2.compile_time_value(denv) - else: - return self.operand1.compile_time_value(denv) \ - or self.operand2.compile_time_value(denv) - - def coerce_to_boolean(self, env): - return BoolBinopNode( - self.pos, - operator = self.operator, - operand1 = self.operand1.coerce_to_boolean(env), - operand2 = self.operand2.coerce_to_boolean(env), - type = PyrexTypes.c_bint_type, - is_temp = self.is_temp) - - def analyse_types(self, env): - self.operand1 = self.operand1.analyse_types(env) - self.operand2 = self.operand2.analyse_types(env) - self.type = PyrexTypes.independent_spanning_type(self.operand1.type, self.operand2.type) - self.operand1 = self.operand1.coerce_to(self.type, env) - self.operand2 = self.operand2.coerce_to(self.type, env) - - # For what we're about to do, it's vital that - # both operands be temp nodes. - self.operand1 = self.operand1.coerce_to_simple(env) - self.operand2 = self.operand2.coerce_to_simple(env) - self.is_temp = 1 - return self - - gil_message = "Truth-testing Python object" - - def check_const(self): - return self.operand1.check_const() and self.operand2.check_const() - - def generate_evaluation_code(self, code): - code.mark_pos(self.pos) - self.operand1.generate_evaluation_code(code) - test_result, uses_temp = self.generate_operand1_test(code) - if self.operator == 'and': - sense = "" - else: - sense = "!" - code.putln( - "if (%s%s) {" % ( - sense, - test_result)) - if uses_temp: - code.funcstate.release_temp(test_result) - self.operand1.generate_disposal_code(code) - self.operand2.generate_evaluation_code(code) - self.allocate_temp_result(code) - self.operand2.make_owned_reference(code) - code.putln("%s = %s;" % (self.result(), self.operand2.result())) - self.operand2.generate_post_assignment_code(code) - self.operand2.free_temps(code) - code.putln("} else {") - self.operand1.make_owned_reference(code) - code.putln("%s = %s;" % (self.result(), self.operand1.result())) - self.operand1.generate_post_assignment_code(code) - self.operand1.free_temps(code) - code.putln("}") - - def generate_operand1_test(self, code): - # Generate code to test the truth of the first operand. - if self.type.is_pyobject: - test_result = code.funcstate.allocate_temp(PyrexTypes.c_bint_type, - manage_ref=False) - code.putln( - "%s = __Pyx_PyObject_IsTrue(%s); %s" % ( - test_result, - self.operand1.py_result(), - code.error_goto_if_neg(test_result, self.pos))) - else: - test_result = self.operand1.result() - return (test_result, self.type.is_pyobject) - - -class CondExprNode(ExprNode): - # Short-circuiting conditional expression. - # - # test ExprNode - # true_val ExprNode - # false_val ExprNode - - true_val = None - false_val = None - - subexprs = ['test', 'true_val', 'false_val'] - - def type_dependencies(self, env): - return self.true_val.type_dependencies(env) + self.false_val.type_dependencies(env) - - def infer_type(self, env): - return PyrexTypes.independent_spanning_type( - self.true_val.infer_type(env), - self.false_val.infer_type(env)) - - def calculate_constant_result(self): - if self.test.constant_result: - self.constant_result = self.true_val.constant_result - else: - self.constant_result = self.false_val.constant_result - - def analyse_types(self, env): - self.test = self.test.analyse_types(env).coerce_to_boolean(env) - self.true_val = self.true_val.analyse_types(env) - self.false_val = self.false_val.analyse_types(env) - self.is_temp = 1 - return self.analyse_result_type(env) - - def analyse_result_type(self, env): - self.type = PyrexTypes.independent_spanning_type( - self.true_val.type, self.false_val.type) - if self.type.is_pyobject: - self.result_ctype = py_object_type - if self.true_val.type.is_pyobject or self.false_val.type.is_pyobject: - self.true_val = self.true_val.coerce_to(self.type, env) - self.false_val = self.false_val.coerce_to(self.type, env) - if self.type == PyrexTypes.error_type: - self.type_error() - return self - - def coerce_to(self, dst_type, env): - self.true_val = self.true_val.coerce_to(dst_type, env) - self.false_val = self.false_val.coerce_to(dst_type, env) - self.result_ctype = None - return self.analyse_result_type(env) - - def type_error(self): - if not (self.true_val.type.is_error or self.false_val.type.is_error): - error(self.pos, "Incompatible types in conditional expression (%s; %s)" % - (self.true_val.type, self.false_val.type)) - self.type = PyrexTypes.error_type - - def check_const(self): - return (self.test.check_const() - and self.true_val.check_const() - and self.false_val.check_const()) - - def generate_evaluation_code(self, code): - # Because subexprs may not be evaluated we can use a more optimal - # subexpr allocation strategy than the default, so override evaluation_code. - - code.mark_pos(self.pos) - self.allocate_temp_result(code) - self.test.generate_evaluation_code(code) - code.putln("if (%s) {" % self.test.result() ) - self.eval_and_get(code, self.true_val) - code.putln("} else {") - self.eval_and_get(code, self.false_val) - code.putln("}") - self.test.generate_disposal_code(code) - self.test.free_temps(code) - - def eval_and_get(self, code, expr): - expr.generate_evaluation_code(code) - expr.make_owned_reference(code) - code.putln('%s = %s;' % (self.result(), expr.result_as(self.ctype()))) - expr.generate_post_assignment_code(code) - expr.free_temps(code) - -richcmp_constants = { - "<" : "Py_LT", - "<=": "Py_LE", - "==": "Py_EQ", - "!=": "Py_NE", - "<>": "Py_NE", - ">" : "Py_GT", - ">=": "Py_GE", - # the following are faked by special compare functions - "in" : "Py_EQ", - "not_in": "Py_NE", -} - -class CmpNode(object): - # Mixin class containing code common to PrimaryCmpNodes - # and CascadedCmpNodes. - - special_bool_cmp_function = None - special_bool_cmp_utility_code = None - - def infer_type(self, env): - # TODO: Actually implement this (after merging with -unstable). - return py_object_type - - def calculate_cascaded_constant_result(self, operand1_result): - func = compile_time_binary_operators[self.operator] - operand2_result = self.operand2.constant_result - if (isinstance(operand1_result, (bytes, unicode)) and - isinstance(operand2_result, (bytes, unicode)) and - type(operand1_result) != type(operand2_result)): - # string comparison of different types isn't portable - return - - if self.operator in ('in', 'not_in'): - if isinstance(self.operand2, (ListNode, TupleNode, SetNode)): - if not self.operand2.args: - self.constant_result = self.operator == 'not_in' - return - elif isinstance(self.operand2, ListNode) and not self.cascade: - # tuples are more efficient to store than lists - self.operand2 = self.operand2.as_tuple() - elif isinstance(self.operand2, DictNode): - if not self.operand2.key_value_pairs: - self.constant_result = self.operator == 'not_in' - return - - self.constant_result = func(operand1_result, operand2_result) - - def cascaded_compile_time_value(self, operand1, denv): - func = get_compile_time_binop(self) - operand2 = self.operand2.compile_time_value(denv) - try: - result = func(operand1, operand2) - except Exception, e: - self.compile_time_value_error(e) - result = None - if result: - cascade = self.cascade - if cascade: - result = result and cascade.cascaded_compile_time_value(operand2, denv) - return result - - def is_cpp_comparison(self): - return self.operand1.type.is_cpp_class or self.operand2.type.is_cpp_class - - def find_common_int_type(self, env, op, operand1, operand2): - # type1 != type2 and at least one of the types is not a C int - type1 = operand1.type - type2 = operand2.type - type1_can_be_int = False - type2_can_be_int = False - - if operand1.is_string_literal and operand1.can_coerce_to_char_literal(): - type1_can_be_int = True - if operand2.is_string_literal and operand2.can_coerce_to_char_literal(): - type2_can_be_int = True - - if type1.is_int: - if type2_can_be_int: - return type1 - elif type2.is_int: - if type1_can_be_int: - return type2 - elif type1_can_be_int: - if type2_can_be_int: - if Builtin.unicode_type in (type1, type2): - return PyrexTypes.c_py_ucs4_type - else: - return PyrexTypes.c_uchar_type - - return None - - def find_common_type(self, env, op, operand1, common_type=None): - operand2 = self.operand2 - type1 = operand1.type - type2 = operand2.type - - new_common_type = None - - # catch general errors - if type1 == str_type and (type2.is_string or type2 in (bytes_type, unicode_type)) or \ - type2 == str_type and (type1.is_string or type1 in (bytes_type, unicode_type)): - error(self.pos, "Comparisons between bytes/unicode and str are not portable to Python 3") - new_common_type = error_type - - # try to use numeric comparisons where possible - elif type1.is_complex or type2.is_complex: - if op not in ('==', '!=') \ - and (type1.is_complex or type1.is_numeric) \ - and (type2.is_complex or type2.is_numeric): - error(self.pos, "complex types are unordered") - new_common_type = error_type - elif type1.is_pyobject: - new_common_type = type1 - elif type2.is_pyobject: - new_common_type = type2 - else: - new_common_type = PyrexTypes.widest_numeric_type(type1, type2) - elif type1.is_numeric and type2.is_numeric: - new_common_type = PyrexTypes.widest_numeric_type(type1, type2) - elif common_type is None or not common_type.is_pyobject: - new_common_type = self.find_common_int_type(env, op, operand1, operand2) - - if new_common_type is None: - # fall back to generic type compatibility tests - if type1 == type2: - new_common_type = type1 - elif type1.is_pyobject or type2.is_pyobject: - if type2.is_numeric or type2.is_string: - if operand2.check_for_coercion_error(type1, env): - new_common_type = error_type - else: - new_common_type = py_object_type - elif type1.is_numeric or type1.is_string: - if operand1.check_for_coercion_error(type2, env): - new_common_type = error_type - else: - new_common_type = py_object_type - elif py_object_type.assignable_from(type1) and py_object_type.assignable_from(type2): - new_common_type = py_object_type - else: - # one Python type and one non-Python type, not assignable - self.invalid_types_error(operand1, op, operand2) - new_common_type = error_type - elif type1.assignable_from(type2): - new_common_type = type1 - elif type2.assignable_from(type1): - new_common_type = type2 - else: - # C types that we couldn't handle up to here are an error - self.invalid_types_error(operand1, op, operand2) - new_common_type = error_type - - if new_common_type.is_string and (isinstance(operand1, BytesNode) or - isinstance(operand2, BytesNode)): - # special case when comparing char* to bytes literal: must - # compare string values! - new_common_type = bytes_type - - # recursively merge types - if common_type is None or new_common_type.is_error: - common_type = new_common_type - else: - # we could do a lot better by splitting the comparison - # into a non-Python part and a Python part, but this is - # safer for now - common_type = PyrexTypes.spanning_type(common_type, new_common_type) - - if self.cascade: - common_type = self.cascade.find_common_type(env, self.operator, operand2, common_type) - - return common_type - - def invalid_types_error(self, operand1, op, operand2): - error(self.pos, "Invalid types for '%s' (%s, %s)" % - (op, operand1.type, operand2.type)) - - def is_python_comparison(self): - return (not self.is_ptr_contains() - and not self.is_c_string_contains() - and (self.has_python_operands() - or (self.cascade and self.cascade.is_python_comparison()) - or self.operator in ('in', 'not_in'))) - - def coerce_operands_to(self, dst_type, env): - operand2 = self.operand2 - if operand2.type != dst_type: - self.operand2 = operand2.coerce_to(dst_type, env) - if self.cascade: - self.cascade.coerce_operands_to(dst_type, env) - - def is_python_result(self): - return ((self.has_python_operands() and - self.special_bool_cmp_function is None and - self.operator not in ('is', 'is_not', 'in', 'not_in') and - not self.is_c_string_contains() and - not self.is_ptr_contains()) - or (self.cascade and self.cascade.is_python_result())) - - def is_c_string_contains(self): - return self.operator in ('in', 'not_in') and \ - ((self.operand1.type.is_int - and (self.operand2.type.is_string or self.operand2.type is bytes_type)) or - (self.operand1.type.is_unicode_char - and self.operand2.type is unicode_type)) - - def is_ptr_contains(self): - if self.operator in ('in', 'not_in'): - container_type = self.operand2.type - return (container_type.is_ptr or container_type.is_array) \ - and not container_type.is_string - - def find_special_bool_compare_function(self, env, operand1, result_is_bool=False): - # note: currently operand1 must get coerced to a Python object if we succeed here! - if self.operator in ('==', '!='): - type1, type2 = operand1.type, self.operand2.type - if result_is_bool or (type1.is_builtin_type and type2.is_builtin_type): - if type1 is Builtin.unicode_type or type2 is Builtin.unicode_type: - self.special_bool_cmp_utility_code = UtilityCode.load_cached("UnicodeEquals", "StringTools.c") - self.special_bool_cmp_function = "__Pyx_PyUnicode_Equals" - return True - elif type1 is Builtin.bytes_type or type2 is Builtin.bytes_type: - self.special_bool_cmp_utility_code = UtilityCode.load_cached("BytesEquals", "StringTools.c") - self.special_bool_cmp_function = "__Pyx_PyBytes_Equals" - return True - elif type1 is Builtin.basestring_type or type2 is Builtin.basestring_type: - self.special_bool_cmp_utility_code = UtilityCode.load_cached("UnicodeEquals", "StringTools.c") - self.special_bool_cmp_function = "__Pyx_PyUnicode_Equals" - return True - elif type1 is Builtin.str_type or type2 is Builtin.str_type: - self.special_bool_cmp_utility_code = UtilityCode.load_cached("StrEquals", "StringTools.c") - self.special_bool_cmp_function = "__Pyx_PyString_Equals" - return True - elif self.operator in ('in', 'not_in'): - if self.operand2.type is Builtin.dict_type: - self.operand2 = self.operand2.as_none_safe_node("'NoneType' object is not iterable") - self.special_bool_cmp_utility_code = UtilityCode.load_cached("PyDictContains", "ObjectHandling.c") - self.special_bool_cmp_function = "__Pyx_PyDict_Contains" - return True - elif self.operand2.type is Builtin.unicode_type: - self.operand2 = self.operand2.as_none_safe_node("'NoneType' object is not iterable") - self.special_bool_cmp_utility_code = UtilityCode.load_cached("PyUnicodeContains", "StringTools.c") - self.special_bool_cmp_function = "__Pyx_PyUnicode_Contains" - return True - else: - if not self.operand2.type.is_pyobject: - self.operand2 = self.operand2.coerce_to_pyobject(env) - self.special_bool_cmp_utility_code = UtilityCode.load_cached("PySequenceContains", "ObjectHandling.c") - self.special_bool_cmp_function = "__Pyx_PySequence_Contains" - return True - return False - - def generate_operation_code(self, code, result_code, - operand1, op , operand2): - if self.type.is_pyobject: - error_clause = code.error_goto_if_null - got_ref = "__Pyx_XGOTREF(%s); " % result_code - if self.special_bool_cmp_function: - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyBoolOrNullFromLong", "ObjectHandling.c")) - coerce_result = "__Pyx_PyBoolOrNull_FromLong" - else: - coerce_result = "__Pyx_PyBool_FromLong" - else: - error_clause = code.error_goto_if_neg - got_ref = "" - coerce_result = "" - - if self.special_bool_cmp_function: - if operand1.type.is_pyobject: - result1 = operand1.py_result() - else: - result1 = operand1.result() - if operand2.type.is_pyobject: - result2 = operand2.py_result() - else: - result2 = operand2.result() - if self.special_bool_cmp_utility_code: - code.globalstate.use_utility_code(self.special_bool_cmp_utility_code) - code.putln( - "%s = %s(%s(%s, %s, %s)); %s%s" % ( - result_code, - coerce_result, - self.special_bool_cmp_function, - result1, result2, richcmp_constants[op], - got_ref, - error_clause(result_code, self.pos))) - - elif operand1.type.is_pyobject and op not in ('is', 'is_not'): - assert op not in ('in', 'not_in'), op - code.putln("%s = PyObject_RichCompare(%s, %s, %s); %s%s" % ( - result_code, - operand1.py_result(), - operand2.py_result(), - richcmp_constants[op], - got_ref, - error_clause(result_code, self.pos))) - - elif operand1.type.is_complex: - code.putln("%s = %s(%s%s(%s, %s));" % ( - result_code, - coerce_result, - op == "!=" and "!" or "", - operand1.type.unary_op('eq'), - operand1.result(), - operand2.result())) - - else: - type1 = operand1.type - type2 = operand2.type - if (type1.is_extension_type or type2.is_extension_type) \ - and not type1.same_as(type2): - common_type = py_object_type - elif type1.is_numeric: - common_type = PyrexTypes.widest_numeric_type(type1, type2) - else: - common_type = type1 - code1 = operand1.result_as(common_type) - code2 = operand2.result_as(common_type) - code.putln("%s = %s(%s %s %s);" % ( - result_code, - coerce_result, - code1, - self.c_operator(op), - code2)) - - def c_operator(self, op): - if op == 'is': - return "==" - elif op == 'is_not': - return "!=" - else: - return op - -class PrimaryCmpNode(ExprNode, CmpNode): - # Non-cascaded comparison or first comparison of - # a cascaded sequence. - # - # operator string - # operand1 ExprNode - # operand2 ExprNode - # cascade CascadedCmpNode - - # We don't use the subexprs mechanism, because - # things here are too complicated for it to handle. - # Instead, we override all the framework methods - # which use it. - - child_attrs = ['operand1', 'operand2', 'coerced_operand2', 'cascade'] - - cascade = None - coerced_operand2 = None - is_memslice_nonecheck = False - - def infer_type(self, env): - # TODO: Actually implement this (after merging with -unstable). - return py_object_type - - def type_dependencies(self, env): - return () - - def calculate_constant_result(self): - assert not self.cascade - self.calculate_cascaded_constant_result(self.operand1.constant_result) - - def compile_time_value(self, denv): - operand1 = self.operand1.compile_time_value(denv) - return self.cascaded_compile_time_value(operand1, denv) - - def analyse_types(self, env): - self.operand1 = self.operand1.analyse_types(env) - self.operand2 = self.operand2.analyse_types(env) - if self.is_cpp_comparison(): - self.analyse_cpp_comparison(env) - if self.cascade: - error(self.pos, "Cascading comparison not yet supported for cpp types.") - return self - - if self.analyse_memoryviewslice_comparison(env): - return self - - if self.cascade: - self.cascade = self.cascade.analyse_types(env) - - if self.operator in ('in', 'not_in'): - if self.is_c_string_contains(): - self.is_pycmp = False - common_type = None - if self.cascade: - error(self.pos, "Cascading comparison not yet supported for 'int_val in string'.") - return self - if self.operand2.type is unicode_type: - env.use_utility_code(UtilityCode.load_cached("PyUCS4InUnicode", "StringTools.c")) - else: - if self.operand1.type is PyrexTypes.c_uchar_type: - self.operand1 = self.operand1.coerce_to(PyrexTypes.c_char_type, env) - if self.operand2.type is not bytes_type: - self.operand2 = self.operand2.coerce_to(bytes_type, env) - env.use_utility_code(UtilityCode.load_cached("BytesContains", "StringTools.c")) - self.operand2 = self.operand2.as_none_safe_node( - "argument of type 'NoneType' is not iterable") - elif self.is_ptr_contains(): - if self.cascade: - error(self.pos, "Cascading comparison not supported for 'val in sliced pointer'.") - self.type = PyrexTypes.c_bint_type - # Will be transformed by IterationTransform - return self - elif self.find_special_bool_compare_function(env, self.operand1): - if not self.operand1.type.is_pyobject: - self.operand1 = self.operand1.coerce_to_pyobject(env) - common_type = None # if coercion needed, the method call above has already done it - self.is_pycmp = False # result is bint - else: - common_type = py_object_type - self.is_pycmp = True - elif self.find_special_bool_compare_function(env, self.operand1): - if not self.operand1.type.is_pyobject: - self.operand1 = self.operand1.coerce_to_pyobject(env) - common_type = None # if coercion needed, the method call above has already done it - self.is_pycmp = False # result is bint - else: - common_type = self.find_common_type(env, self.operator, self.operand1) - self.is_pycmp = common_type.is_pyobject - - if common_type is not None and not common_type.is_error: - if self.operand1.type != common_type: - self.operand1 = self.operand1.coerce_to(common_type, env) - self.coerce_operands_to(common_type, env) - - if self.cascade: - self.operand2 = self.operand2.coerce_to_simple(env) - self.cascade.coerce_cascaded_operands_to_temp(env) - operand2 = self.cascade.optimise_comparison(self.operand2, env) - if operand2 is not self.operand2: - self.coerced_operand2 = operand2 - if self.is_python_result(): - self.type = PyrexTypes.py_object_type - else: - self.type = PyrexTypes.c_bint_type - cdr = self.cascade - while cdr: - cdr.type = self.type - cdr = cdr.cascade - if self.is_pycmp or self.cascade or self.special_bool_cmp_function: - # 1) owned reference, 2) reused value, 3) potential function error return value - self.is_temp = 1 - return self - - def analyse_cpp_comparison(self, env): - type1 = self.operand1.type - type2 = self.operand2.type - entry = env.lookup_operator(self.operator, [self.operand1, self.operand2]) - if entry is None: - error(self.pos, "Invalid types for '%s' (%s, %s)" % - (self.operator, type1, type2)) - self.type = PyrexTypes.error_type - self.result_code = "" - return - func_type = entry.type - if func_type.is_ptr: - func_type = func_type.base_type - if len(func_type.args) == 1: - self.operand2 = self.operand2.coerce_to(func_type.args[0].type, env) - else: - self.operand1 = self.operand1.coerce_to(func_type.args[0].type, env) - self.operand2 = self.operand2.coerce_to(func_type.args[1].type, env) - self.is_pycmp = False - self.type = func_type.return_type - - def analyse_memoryviewslice_comparison(self, env): - have_none = self.operand1.is_none or self.operand2.is_none - have_slice = (self.operand1.type.is_memoryviewslice or - self.operand2.type.is_memoryviewslice) - ops = ('==', '!=', 'is', 'is_not') - if have_slice and have_none and self.operator in ops: - self.is_pycmp = False - self.type = PyrexTypes.c_bint_type - self.is_memslice_nonecheck = True - return True - - return False - - def coerce_to_boolean(self, env): - if self.is_pycmp: - # coercing to bool => may allow for more efficient comparison code - if self.find_special_bool_compare_function( - env, self.operand1, result_is_bool=True): - self.is_pycmp = False - self.type = PyrexTypes.c_bint_type - self.is_temp = 1 - if self.cascade: - operand2 = self.cascade.optimise_comparison( - self.operand2, env, result_is_bool=True) - if operand2 is not self.operand2: - self.coerced_operand2 = operand2 - return self - # TODO: check if we can optimise parts of the cascade here - return ExprNode.coerce_to_boolean(self, env) - - def has_python_operands(self): - return (self.operand1.type.is_pyobject - or self.operand2.type.is_pyobject) - - def check_const(self): - if self.cascade: - self.not_const() - return False - else: - return self.operand1.check_const() and self.operand2.check_const() - - def calculate_result_code(self): - if self.operand1.type.is_complex: - if self.operator == "!=": - negation = "!" - else: - negation = "" - return "(%s%s(%s, %s))" % ( - negation, - self.operand1.type.binary_op('=='), - self.operand1.result(), - self.operand2.result()) - elif self.is_c_string_contains(): - if self.operand2.type is unicode_type: - method = "__Pyx_UnicodeContainsUCS4" - else: - method = "__Pyx_BytesContains" - if self.operator == "not_in": - negation = "!" - else: - negation = "" - return "(%s%s(%s, %s))" % ( - negation, - method, - self.operand2.result(), - self.operand1.result()) - else: - result1 = self.operand1.result() - result2 = self.operand2.result() - if self.is_memslice_nonecheck: - if self.operand1.type.is_memoryviewslice: - result1 = "((PyObject *) %s.memview)" % result1 - else: - result2 = "((PyObject *) %s.memview)" % result2 - - return "(%s %s %s)" % ( - result1, - self.c_operator(self.operator), - result2) - - def generate_evaluation_code(self, code): - self.operand1.generate_evaluation_code(code) - self.operand2.generate_evaluation_code(code) - if self.is_temp: - self.allocate_temp_result(code) - self.generate_operation_code(code, self.result(), - self.operand1, self.operator, self.operand2) - if self.cascade: - self.cascade.generate_evaluation_code( - code, self.result(), self.coerced_operand2 or self.operand2, - needs_evaluation=self.coerced_operand2 is not None) - self.operand1.generate_disposal_code(code) - self.operand1.free_temps(code) - self.operand2.generate_disposal_code(code) - self.operand2.free_temps(code) - - def generate_subexpr_disposal_code(self, code): - # If this is called, it is a non-cascaded cmp, - # so only need to dispose of the two main operands. - self.operand1.generate_disposal_code(code) - self.operand2.generate_disposal_code(code) - - def free_subexpr_temps(self, code): - # If this is called, it is a non-cascaded cmp, - # so only need to dispose of the two main operands. - self.operand1.free_temps(code) - self.operand2.free_temps(code) - - def annotate(self, code): - self.operand1.annotate(code) - self.operand2.annotate(code) - if self.cascade: - self.cascade.annotate(code) - - -class CascadedCmpNode(Node, CmpNode): - # A CascadedCmpNode is not a complete expression node. It - # hangs off the side of another comparison node, shares - # its left operand with that node, and shares its result - # with the PrimaryCmpNode at the head of the chain. - # - # operator string - # operand2 ExprNode - # cascade CascadedCmpNode - - child_attrs = ['operand2', 'coerced_operand2', 'cascade'] - - cascade = None - coerced_operand2 = None - constant_result = constant_value_not_set # FIXME: where to calculate this? - - def infer_type(self, env): - # TODO: Actually implement this (after merging with -unstable). - return py_object_type - - def type_dependencies(self, env): - return () - - def has_constant_result(self): - return self.constant_result is not constant_value_not_set and \ - self.constant_result is not not_a_constant - - def analyse_types(self, env): - self.operand2 = self.operand2.analyse_types(env) - if self.cascade: - self.cascade = self.cascade.analyse_types(env) - return self - - def has_python_operands(self): - return self.operand2.type.is_pyobject - - def optimise_comparison(self, operand1, env, result_is_bool=False): - if self.find_special_bool_compare_function(env, operand1, result_is_bool): - self.is_pycmp = False - self.type = PyrexTypes.c_bint_type - if not operand1.type.is_pyobject: - operand1 = operand1.coerce_to_pyobject(env) - if self.cascade: - operand2 = self.cascade.optimise_comparison(self.operand2, env, result_is_bool) - if operand2 is not self.operand2: - self.coerced_operand2 = operand2 - return operand1 - - def coerce_operands_to_pyobjects(self, env): - self.operand2 = self.operand2.coerce_to_pyobject(env) - if self.operand2.type is dict_type and self.operator in ('in', 'not_in'): - self.operand2 = self.operand2.as_none_safe_node("'NoneType' object is not iterable") - if self.cascade: - self.cascade.coerce_operands_to_pyobjects(env) - - def coerce_cascaded_operands_to_temp(self, env): - if self.cascade: - #self.operand2 = self.operand2.coerce_to_temp(env) #CTT - self.operand2 = self.operand2.coerce_to_simple(env) - self.cascade.coerce_cascaded_operands_to_temp(env) - - def generate_evaluation_code(self, code, result, operand1, needs_evaluation=False): - if self.type.is_pyobject: - code.putln("if (__Pyx_PyObject_IsTrue(%s)) {" % result) - code.put_decref(result, self.type) - else: - code.putln("if (%s) {" % result) - if needs_evaluation: - operand1.generate_evaluation_code(code) - self.operand2.generate_evaluation_code(code) - self.generate_operation_code(code, result, - operand1, self.operator, self.operand2) - if self.cascade: - self.cascade.generate_evaluation_code( - code, result, self.coerced_operand2 or self.operand2, - needs_evaluation=self.coerced_operand2 is not None) - if needs_evaluation: - operand1.generate_disposal_code(code) - operand1.free_temps(code) - # Cascaded cmp result is always temp - self.operand2.generate_disposal_code(code) - self.operand2.free_temps(code) - code.putln("}") - - def annotate(self, code): - self.operand2.annotate(code) - if self.cascade: - self.cascade.annotate(code) - - -binop_node_classes = { - "or": BoolBinopNode, - "and": BoolBinopNode, - "|": IntBinopNode, - "^": IntBinopNode, - "&": IntBinopNode, - "<<": IntBinopNode, - ">>": IntBinopNode, - "+": AddNode, - "-": SubNode, - "*": MulNode, - "/": DivNode, - "//": DivNode, - "%": ModNode, - "**": PowNode -} - -def binop_node(pos, operator, operand1, operand2, inplace=False): - # Construct binop node of appropriate class for - # given operator. - return binop_node_classes[operator](pos, - operator = operator, - operand1 = operand1, - operand2 = operand2, - inplace = inplace) - -#------------------------------------------------------------------- -# -# Coercion nodes -# -# Coercion nodes are special in that they are created during -# the analyse_types phase of parse tree processing. -# Their __init__ methods consequently incorporate some aspects -# of that phase. -# -#------------------------------------------------------------------- - -class CoercionNode(ExprNode): - # Abstract base class for coercion nodes. - # - # arg ExprNode node being coerced - - subexprs = ['arg'] - constant_result = not_a_constant - - def __init__(self, arg): - super(CoercionNode, self).__init__(arg.pos) - self.arg = arg - if debug_coercion: - print("%s Coercing %s" % (self, self.arg)) - - def calculate_constant_result(self): - # constant folding can break type coercion, so this is disabled - pass - - def annotate(self, code): - self.arg.annotate(code) - if self.arg.type != self.type: - file, line, col = self.pos - code.annotate((file, line, col-1), AnnotationItem( - style='coerce', tag='coerce', text='[%s] to [%s]' % (self.arg.type, self.type))) - -class CoerceToMemViewSliceNode(CoercionNode): - """ - Coerce an object to a memoryview slice. This holds a new reference in - a managed temp. - """ - - def __init__(self, arg, dst_type, env): - assert dst_type.is_memoryviewslice - assert not arg.type.is_memoryviewslice - CoercionNode.__init__(self, arg) - self.type = dst_type - self.is_temp = 1 - self.env = env - self.use_managed_ref = True - self.arg = arg - - def generate_result_code(self, code): - self.type.create_from_py_utility_code(self.env) - code.putln("%s = %s(%s);" % (self.result(), - self.type.from_py_function, - self.arg.py_result())) - - error_cond = self.type.error_condition(self.result()) - code.putln(code.error_goto_if(error_cond, self.pos)) - - -class CastNode(CoercionNode): - # Wrap a node in a C type cast. - - def __init__(self, arg, new_type): - CoercionNode.__init__(self, arg) - self.type = new_type - - def may_be_none(self): - return self.arg.may_be_none() - - def calculate_result_code(self): - return self.arg.result_as(self.type) - - def generate_result_code(self, code): - self.arg.generate_result_code(code) - - -class PyTypeTestNode(CoercionNode): - # This node is used to check that a generic Python - # object is an instance of a particular extension type. - # This node borrows the result of its argument node. - - exact_builtin_type = True - - def __init__(self, arg, dst_type, env, notnone=False): - # The arg is know to be a Python object, and - # the dst_type is known to be an extension type. - assert dst_type.is_extension_type or dst_type.is_builtin_type, "PyTypeTest on non extension type" - CoercionNode.__init__(self, arg) - self.type = dst_type - self.result_ctype = arg.ctype() - self.notnone = notnone - - nogil_check = Node.gil_error - gil_message = "Python type test" - - def analyse_types(self, env): - return self - - def may_be_none(self): - if self.notnone: - return False - return self.arg.may_be_none() - - def is_simple(self): - return self.arg.is_simple() - - def result_in_temp(self): - return self.arg.result_in_temp() - - def is_ephemeral(self): - return self.arg.is_ephemeral() - - def nonlocally_immutable(self): - return self.arg.nonlocally_immutable() - - def calculate_constant_result(self): - # FIXME - pass - - def calculate_result_code(self): - return self.arg.result() - - def generate_result_code(self, code): - if self.type.typeobj_is_available(): - if self.type.is_builtin_type: - type_test = self.type.type_test_code( - self.arg.py_result(), - self.notnone, exact=self.exact_builtin_type) - else: - type_test = self.type.type_test_code( - self.arg.py_result(), self.notnone) - code.globalstate.use_utility_code( - UtilityCode.load_cached("ExtTypeTest", "ObjectHandling.c")) - code.putln("if (!(%s)) %s" % ( - type_test, code.error_goto(self.pos))) - else: - error(self.pos, "Cannot test type of extern C class " - "without type object name specification") - - def generate_post_assignment_code(self, code): - self.arg.generate_post_assignment_code(code) - - def free_temps(self, code): - self.arg.free_temps(code) - - -class NoneCheckNode(CoercionNode): - # This node is used to check that a Python object is not None and - # raises an appropriate exception (as specified by the creating - # transform). - - is_nonecheck = True - - def __init__(self, arg, exception_type_cname, exception_message, - exception_format_args): - CoercionNode.__init__(self, arg) - self.type = arg.type - self.result_ctype = arg.ctype() - self.exception_type_cname = exception_type_cname - self.exception_message = exception_message - self.exception_format_args = tuple(exception_format_args or ()) - - nogil_check = None # this node only guards an operation that would fail already - - def analyse_types(self, env): - return self - - def may_be_none(self): - return False - - def is_simple(self): - return self.arg.is_simple() - - def result_in_temp(self): - return self.arg.result_in_temp() - - def nonlocally_immutable(self): - return self.arg.nonlocally_immutable() - - def calculate_result_code(self): - return self.arg.result() - - def condition(self): - if self.type.is_pyobject: - return self.arg.py_result() - elif self.type.is_memoryviewslice: - return "((PyObject *) %s.memview)" % self.arg.result() - else: - raise Exception("unsupported type") - - def put_nonecheck(self, code): - code.putln( - "if (unlikely(%s == Py_None)) {" % self.condition()) - - if self.in_nogil_context: - code.put_ensure_gil() - - escape = StringEncoding.escape_byte_string - if self.exception_format_args: - code.putln('PyErr_Format(%s, "%s", %s);' % ( - self.exception_type_cname, - StringEncoding.escape_byte_string( - self.exception_message.encode('UTF-8')), - ', '.join([ '"%s"' % escape(str(arg).encode('UTF-8')) - for arg in self.exception_format_args ]))) - else: - code.putln('PyErr_SetString(%s, "%s");' % ( - self.exception_type_cname, - escape(self.exception_message.encode('UTF-8')))) - - if self.in_nogil_context: - code.put_release_ensured_gil() - - code.putln(code.error_goto(self.pos)) - code.putln("}") - - def generate_result_code(self, code): - self.put_nonecheck(code) - - def generate_post_assignment_code(self, code): - self.arg.generate_post_assignment_code(code) - - def free_temps(self, code): - self.arg.free_temps(code) - - -class CoerceToPyTypeNode(CoercionNode): - # This node is used to convert a C data type - # to a Python object. - - type = py_object_type - is_temp = 1 - - def __init__(self, arg, env, type=py_object_type): - if not arg.type.create_to_py_utility_code(env): - error(arg.pos, "Cannot convert '%s' to Python object" % arg.type) - elif arg.type.is_complex: - # special case: complex coercion is so complex that it - # uses a macro ("__pyx_PyComplex_FromComplex()"), for - # which the argument must be simple - arg = arg.coerce_to_simple(env) - CoercionNode.__init__(self, arg) - if type is py_object_type: - # be specific about some known types - if arg.type.is_string or arg.type.is_cpp_string: - self.type = default_str_type(env) - elif arg.type.is_pyunicode_ptr or arg.type.is_unicode_char: - self.type = unicode_type - elif arg.type.is_complex: - self.type = Builtin.complex_type - elif arg.type.is_string or arg.type.is_cpp_string: - if (type not in (bytes_type, bytearray_type) - and not env.directives['c_string_encoding']): - error(arg.pos, - "default encoding required for conversion from '%s' to '%s'" % - (arg.type, type)) - self.type = type - else: - # FIXME: check that the target type and the resulting type are compatible - pass - - if arg.type.is_memoryviewslice: - # Register utility codes at this point - arg.type.get_to_py_function(env, arg) - - self.env = env - - gil_message = "Converting to Python object" - - def may_be_none(self): - # FIXME: is this always safe? - return False - - def coerce_to_boolean(self, env): - arg_type = self.arg.type - if (arg_type == PyrexTypes.c_bint_type or - (arg_type.is_pyobject and arg_type.name == 'bool')): - return self.arg.coerce_to_temp(env) - else: - return CoerceToBooleanNode(self, env) - - def coerce_to_integer(self, env): - # If not already some C integer type, coerce to longint. - if self.arg.type.is_int: - return self.arg - else: - return self.arg.coerce_to(PyrexTypes.c_long_type, env) - - def analyse_types(self, env): - # The arg is always already analysed - return self - - def generate_result_code(self, code): - arg_type = self.arg.type - if arg_type.is_memoryviewslice: - funccall = arg_type.get_to_py_function(self.env, self.arg) - else: - func = arg_type.to_py_function - if arg_type.is_string or arg_type.is_cpp_string: - if self.type in (bytes_type, str_type, unicode_type): - func = func.replace("Object", self.type.name.title()) - elif self.type is bytearray_type: - func = func.replace("Object", "ByteArray") - funccall = "%s(%s)" % (func, self.arg.result()) - - code.putln('%s = %s; %s' % ( - self.result(), - funccall, - code.error_goto_if_null(self.result(), self.pos))) - - code.put_gotref(self.py_result()) - - -class CoerceIntToBytesNode(CoerceToPyTypeNode): - # This node is used to convert a C int type to a Python bytes - # object. - - is_temp = 1 - - def __init__(self, arg, env): - arg = arg.coerce_to_simple(env) - CoercionNode.__init__(self, arg) - self.type = Builtin.bytes_type - - def generate_result_code(self, code): - arg = self.arg - arg_result = arg.result() - if arg.type not in (PyrexTypes.c_char_type, - PyrexTypes.c_uchar_type, - PyrexTypes.c_schar_type): - if arg.type.signed: - code.putln("if ((%s < 0) || (%s > 255)) {" % ( - arg_result, arg_result)) - else: - code.putln("if (%s > 255) {" % arg_result) - code.putln('PyErr_SetString(PyExc_OverflowError, ' - '"value too large to pack into a byte"); %s' % ( - code.error_goto(self.pos))) - code.putln('}') - temp = None - if arg.type is not PyrexTypes.c_char_type: - temp = code.funcstate.allocate_temp(PyrexTypes.c_char_type, manage_ref=False) - code.putln("%s = (char)%s;" % (temp, arg_result)) - arg_result = temp - code.putln('%s = PyBytes_FromStringAndSize(&%s, 1); %s' % ( - self.result(), - arg_result, - code.error_goto_if_null(self.result(), self.pos))) - if temp is not None: - code.funcstate.release_temp(temp) - code.put_gotref(self.py_result()) - - -class CoerceFromPyTypeNode(CoercionNode): - # This node is used to convert a Python object - # to a C data type. - - def __init__(self, result_type, arg, env): - CoercionNode.__init__(self, arg) - self.type = result_type - self.is_temp = 1 - if not result_type.create_from_py_utility_code(env): - error(arg.pos, - "Cannot convert Python object to '%s'" % result_type) - if self.type.is_string or self.type.is_pyunicode_ptr: - if self.arg.is_ephemeral(): - error(arg.pos, - "Obtaining '%s' from temporary Python value" % result_type) - elif self.arg.is_name and self.arg.entry and self.arg.entry.is_pyglobal: - warning(arg.pos, - "Obtaining '%s' from externally modifiable global Python value" % result_type, - level=1) - - def analyse_types(self, env): - # The arg is always already analysed - return self - - def generate_result_code(self, code): - function = self.type.from_py_function - operand = self.arg.py_result() - rhs = "%s(%s)" % (function, operand) - if self.type.is_enum: - rhs = typecast(self.type, c_long_type, rhs) - code.putln('%s = %s; %s' % ( - self.result(), - rhs, - code.error_goto_if(self.type.error_condition(self.result()), self.pos))) - if self.type.is_pyobject: - code.put_gotref(self.py_result()) - - def nogil_check(self, env): - error(self.pos, "Coercion from Python not allowed without the GIL") - - -class CoerceToBooleanNode(CoercionNode): - # This node is used when a result needs to be used - # in a boolean context. - - type = PyrexTypes.c_bint_type - - _special_builtins = { - Builtin.list_type : 'PyList_GET_SIZE', - Builtin.tuple_type : 'PyTuple_GET_SIZE', - Builtin.bytes_type : 'PyBytes_GET_SIZE', - Builtin.unicode_type : 'PyUnicode_GET_SIZE', - } - - def __init__(self, arg, env): - CoercionNode.__init__(self, arg) - if arg.type.is_pyobject: - self.is_temp = 1 - - def nogil_check(self, env): - if self.arg.type.is_pyobject and self._special_builtins.get(self.arg.type) is None: - self.gil_error() - - gil_message = "Truth-testing Python object" - - def check_const(self): - if self.is_temp: - self.not_const() - return False - return self.arg.check_const() - - def calculate_result_code(self): - return "(%s != 0)" % self.arg.result() - - def generate_result_code(self, code): - if not self.is_temp: - return - test_func = self._special_builtins.get(self.arg.type) - if test_func is not None: - code.putln("%s = (%s != Py_None) && (%s(%s) != 0);" % ( - self.result(), - self.arg.py_result(), - test_func, - self.arg.py_result())) - else: - code.putln( - "%s = __Pyx_PyObject_IsTrue(%s); %s" % ( - self.result(), - self.arg.py_result(), - code.error_goto_if_neg(self.result(), self.pos))) - -class CoerceToComplexNode(CoercionNode): - - def __init__(self, arg, dst_type, env): - if arg.type.is_complex: - arg = arg.coerce_to_simple(env) - self.type = dst_type - CoercionNode.__init__(self, arg) - dst_type.create_declaration_utility_code(env) - - def calculate_result_code(self): - if self.arg.type.is_complex: - real_part = "__Pyx_CREAL(%s)" % self.arg.result() - imag_part = "__Pyx_CIMAG(%s)" % self.arg.result() - else: - real_part = self.arg.result() - imag_part = "0" - return "%s(%s, %s)" % ( - self.type.from_parts, - real_part, - imag_part) - - def generate_result_code(self, code): - pass - -class CoerceToTempNode(CoercionNode): - # This node is used to force the result of another node - # to be stored in a temporary. It is only used if the - # argument node's result is not already in a temporary. - - def __init__(self, arg, env): - CoercionNode.__init__(self, arg) - self.type = self.arg.type.as_argument_type() - self.constant_result = self.arg.constant_result - self.is_temp = 1 - if self.type.is_pyobject: - self.result_ctype = py_object_type - - gil_message = "Creating temporary Python reference" - - def analyse_types(self, env): - # The arg is always already analysed - return self - - def coerce_to_boolean(self, env): - self.arg = self.arg.coerce_to_boolean(env) - if self.arg.is_simple(): - return self.arg - self.type = self.arg.type - self.result_ctype = self.type - return self - - def generate_result_code(self, code): - #self.arg.generate_evaluation_code(code) # Already done - # by generic generate_subexpr_evaluation_code! - code.putln("%s = %s;" % ( - self.result(), self.arg.result_as(self.ctype()))) - if self.use_managed_ref: - if self.type.is_pyobject: - code.put_incref(self.result(), self.ctype()) - elif self.type.is_memoryviewslice: - code.put_incref_memoryviewslice(self.result(), - not self.in_nogil_context) - -class ProxyNode(CoercionNode): - """ - A node that should not be replaced by transforms or other means, - and hence can be useful to wrap the argument to a clone node - - MyNode -> ProxyNode -> ArgNode - CloneNode -^ - """ - - nogil_check = None - - def __init__(self, arg): - super(ProxyNode, self).__init__(arg) - self.constant_result = arg.constant_result - self._proxy_type() - - def analyse_expressions(self, env): - self.arg = self.arg.analyse_expressions(env) - self._proxy_type() - return self - - def _proxy_type(self): - if hasattr(self.arg, 'type'): - self.type = self.arg.type - self.result_ctype = self.arg.result_ctype - if hasattr(self.arg, 'entry'): - self.entry = self.arg.entry - - def generate_result_code(self, code): - self.arg.generate_result_code(code) - - def result(self): - return self.arg.result() - - def is_simple(self): - return self.arg.is_simple() - - def may_be_none(self): - return self.arg.may_be_none() - - def generate_evaluation_code(self, code): - self.arg.generate_evaluation_code(code) - - def generate_result_code(self, code): - self.arg.generate_result_code(code) - - def generate_disposal_code(self, code): - self.arg.generate_disposal_code(code) - - def free_temps(self, code): - self.arg.free_temps(code) - -class CloneNode(CoercionNode): - # This node is employed when the result of another node needs - # to be used multiple times. The argument node's result must - # be in a temporary. This node "borrows" the result from the - # argument node, and does not generate any evaluation or - # disposal code for it. The original owner of the argument - # node is responsible for doing those things. - - subexprs = [] # Arg is not considered a subexpr - nogil_check = None - - def __init__(self, arg): - CoercionNode.__init__(self, arg) - self.constant_result = arg.constant_result - if hasattr(arg, 'type'): - self.type = arg.type - self.result_ctype = arg.result_ctype - if hasattr(arg, 'entry'): - self.entry = arg.entry - - def result(self): - return self.arg.result() - - def may_be_none(self): - return self.arg.may_be_none() - - def type_dependencies(self, env): - return self.arg.type_dependencies(env) - - def infer_type(self, env): - return self.arg.infer_type(env) - - def analyse_types(self, env): - self.type = self.arg.type - self.result_ctype = self.arg.result_ctype - self.is_temp = 1 - if hasattr(self.arg, 'entry'): - self.entry = self.arg.entry - return self - - def is_simple(self): - return True # result is always in a temp (or a name) - - def generate_evaluation_code(self, code): - pass - - def generate_result_code(self, code): - pass - - def generate_disposal_code(self, code): - pass - - def free_temps(self, code): - pass - - -class CMethodSelfCloneNode(CloneNode): - # Special CloneNode for the self argument of builtin C methods - # that accepts subtypes of the builtin type. This is safe only - # for 'final' subtypes, as subtypes of the declared type may - # override the C method. - - def coerce_to(self, dst_type, env): - if dst_type.is_builtin_type and self.type.subtype_of(dst_type): - return self - return CloneNode.coerce_to(self, dst_type, env) - - -class ModuleRefNode(ExprNode): - # Simple returns the module object - - type = py_object_type - is_temp = False - subexprs = [] - - def analyse_types(self, env): - return self - - def may_be_none(self): - return False - - def calculate_result_code(self): - return Naming.module_cname - - def generate_result_code(self, code): - pass - -class DocstringRefNode(ExprNode): - # Extracts the docstring of the body element - - subexprs = ['body'] - type = py_object_type - is_temp = True - - def __init__(self, pos, body): - ExprNode.__init__(self, pos) - assert body.type.is_pyobject - self.body = body - - def analyse_types(self, env): - return self - - def generate_result_code(self, code): - code.putln('%s = __Pyx_GetAttr(%s, %s); %s' % ( - self.result(), self.body.result(), - code.intern_identifier(StringEncoding.EncodedString("__doc__")), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.result()) - - - -#------------------------------------------------------------------------------------ -# -# Runtime support code -# -#------------------------------------------------------------------------------------ - -pyerr_occurred_withgil_utility_code= UtilityCode( -proto = """ -static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); /* proto */ -""", -impl = """ -static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) { - int err; - #ifdef WITH_THREAD - PyGILState_STATE _save = PyGILState_Ensure(); - #endif - err = !!PyErr_Occurred(); - #ifdef WITH_THREAD - PyGILState_Release(_save); - #endif - return err; -} -""" -) - -#------------------------------------------------------------------------------------ - -raise_unbound_local_error_utility_code = UtilityCode( -proto = """ -static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); -""", -impl = """ -static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { - PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); -} -""") - -raise_closure_name_error_utility_code = UtilityCode( -proto = """ -static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); -""", -impl = """ -static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { - PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); -} -""") - -# Don't inline the function, it should really never be called in production -raise_unbound_memoryview_utility_code_nogil = UtilityCode( -proto = """ -static void __Pyx_RaiseUnboundMemoryviewSliceNogil(const char *varname); -""", -impl = """ -static void __Pyx_RaiseUnboundMemoryviewSliceNogil(const char *varname) { - #ifdef WITH_THREAD - PyGILState_STATE gilstate = PyGILState_Ensure(); - #endif - __Pyx_RaiseUnboundLocalError(varname); - #ifdef WITH_THREAD - PyGILState_Release(gilstate); - #endif -} -""", -requires = [raise_unbound_local_error_utility_code]) - -#------------------------------------------------------------------------------------ - -raise_too_many_values_to_unpack = UtilityCode.load_cached("RaiseTooManyValuesToUnpack", "ObjectHandling.c") -raise_need_more_values_to_unpack = UtilityCode.load_cached("RaiseNeedMoreValuesToUnpack", "ObjectHandling.c") -tuple_unpacking_error_code = UtilityCode.load_cached("UnpackTupleError", "ObjectHandling.c") - -#------------------------------------------------------------------------------------ - -int_pow_utility_code = UtilityCode( -proto=""" -static CYTHON_INLINE %(type)s %(func_name)s(%(type)s, %(type)s); /* proto */ -""", -impl=""" -static CYTHON_INLINE %(type)s %(func_name)s(%(type)s b, %(type)s e) { - %(type)s t = b; - switch (e) { - case 3: - t *= b; - case 2: - t *= b; - case 1: - return t; - case 0: - return 1; - } - #if %(signed)s - if (unlikely(e<0)) return 0; - #endif - t = 1; - while (likely(e)) { - t *= (b * (e&1)) | ((~e)&1); /* 1 or b */ - b *= b; - e >>= 1; - } - return t; -} -""") - -# ------------------------------ Division ------------------------------------ - -div_int_utility_code = UtilityCode( -proto=""" -static CYTHON_INLINE %(type)s __Pyx_div_%(type_name)s(%(type)s, %(type)s); /* proto */ -""", -impl=""" -static CYTHON_INLINE %(type)s __Pyx_div_%(type_name)s(%(type)s a, %(type)s b) { - %(type)s q = a / b; - %(type)s r = a - q*b; - q -= ((r != 0) & ((r ^ b) < 0)); - return q; -} -""") - -mod_int_utility_code = UtilityCode( -proto=""" -static CYTHON_INLINE %(type)s __Pyx_mod_%(type_name)s(%(type)s, %(type)s); /* proto */ -""", -impl=""" -static CYTHON_INLINE %(type)s __Pyx_mod_%(type_name)s(%(type)s a, %(type)s b) { - %(type)s r = a %% b; - r += ((r != 0) & ((r ^ b) < 0)) * b; - return r; -} -""") - -mod_float_utility_code = UtilityCode( -proto=""" -static CYTHON_INLINE %(type)s __Pyx_mod_%(type_name)s(%(type)s, %(type)s); /* proto */ -""", -impl=""" -static CYTHON_INLINE %(type)s __Pyx_mod_%(type_name)s(%(type)s a, %(type)s b) { - %(type)s r = fmod%(math_h_modifier)s(a, b); - r += ((r != 0) & ((r < 0) ^ (b < 0))) * b; - return r; -} -""") - -cdivision_warning_utility_code = UtilityCode( -proto=""" -static int __Pyx_cdivision_warning(const char *, int); /* proto */ -""", -impl=""" -static int __Pyx_cdivision_warning(const char *filename, int lineno) { -#if CYTHON_COMPILING_IN_PYPY - filename++; // avoid compiler warnings - lineno++; - return PyErr_Warn(PyExc_RuntimeWarning, - "division with oppositely signed operands, C and Python semantics differ"); -#else - return PyErr_WarnExplicit(PyExc_RuntimeWarning, - "division with oppositely signed operands, C and Python semantics differ", - filename, - lineno, - __Pyx_MODULE_NAME, - NULL); -#endif -} -""") - -# from intobject.c -division_overflow_test_code = UtilityCode( -proto=""" -#define UNARY_NEG_WOULD_OVERFLOW(x) \ - (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) -""") diff --git a/third_party/cython/src/Cython/Compiler/FlowControl.pxd b/third_party/cython/src/Cython/Compiler/FlowControl.pxd deleted file mode 100644 index fa47853db9ddc..0000000000000 --- a/third_party/cython/src/Cython/Compiler/FlowControl.pxd +++ /dev/null @@ -1,105 +0,0 @@ -cimport cython - -from Cython.Compiler.Visitor cimport CythonTransform, TreeVisitor - -cdef class ControlBlock: - cdef public set children - cdef public set parents - cdef public set positions - cdef public list stats - cdef public dict gen - cdef public set bounded - cdef public dict input - cdef public dict output - - # Big integer it bitsets - cdef public object i_input - cdef public object i_output - cdef public object i_gen - cdef public object i_kill - cdef public object i_state - - cpdef bint empty(self) - cpdef detach(self) - cpdef add_child(self, block) - -cdef class ExitBlock(ControlBlock): - cpdef bint empty(self) - -cdef class NameAssignment: - cdef public bint is_arg - cdef public bint is_deletion - cdef public object lhs - cdef public object rhs - cdef public object entry - cdef public object pos - cdef public set refs - cdef public object bit - cdef public object inferred_type - -cdef class AssignmentList: - cdef public object bit - cdef public object mask - cdef public list stats - -cdef class AssignmentCollector(TreeVisitor): - cdef list assignments - -@cython.final -cdef class ControlFlow: - cdef public set blocks - cdef public set entries - cdef public list loops - cdef public list exceptions - - cdef public ControlBlock entry_point - cdef public ExitBlock exit_point - cdef public ControlBlock block - - cdef public dict assmts - - cpdef newblock(self, ControlBlock parent=*) - cpdef nextblock(self, ControlBlock parent=*) - cpdef bint is_tracked(self, entry) - cpdef bint is_statically_assigned(self, entry) - cpdef mark_position(self, node) - cpdef mark_assignment(self, lhs, rhs, entry) - cpdef mark_argument(self, lhs, rhs, entry) - cpdef mark_deletion(self, node, entry) - cpdef mark_reference(self, node, entry) - - @cython.locals(block=ControlBlock, parent=ControlBlock, unreachable=set) - cpdef normalize(self) - - @cython.locals(bit=object, assmts=AssignmentList, - block=ControlBlock) - cpdef initialize(self) - - @cython.locals(assmts=AssignmentList, assmt=NameAssignment) - cpdef set map_one(self, istate, entry) - - @cython.locals(block=ControlBlock, parent=ControlBlock) - cdef reaching_definitions(self) - -cdef class Uninitialized: - pass - -cdef class Unknown: - pass - -@cython.locals(dirty=bint, block=ControlBlock, parent=ControlBlock, - assmt=NameAssignment) -cdef check_definitions(ControlFlow flow, dict compiler_directives) - -@cython.final -cdef class ControlFlowAnalysis(CythonTransform): - cdef object gv_ctx - cdef set reductions - cdef list env_stack - cdef list stack - cdef object env - cdef ControlFlow flow - cdef bint in_inplace_assignment - - cpdef mark_assignment(self, lhs, rhs=*) - cpdef mark_position(self, node) diff --git a/third_party/cython/src/Cython/Compiler/FlowControl.py b/third_party/cython/src/Cython/Compiler/FlowControl.py deleted file mode 100644 index a36ffa4676145..0000000000000 --- a/third_party/cython/src/Cython/Compiler/FlowControl.py +++ /dev/null @@ -1,1303 +0,0 @@ -import cython -cython.declare(PyrexTypes=object, ExprNodes=object, Nodes=object, - Builtin=object, InternalError=object, - error=object, warning=object, - py_object_type=object, unspecified_type=object, - object_expr=object, object_expr_not_none=object, - fake_rhs_expr=object, TypedExprNode=object) - -import Builtin -import ExprNodes -import Nodes -import Options -from PyrexTypes import py_object_type, unspecified_type -import PyrexTypes - -from Visitor import TreeVisitor, CythonTransform -from Errors import error, warning, InternalError - -class TypedExprNode(ExprNodes.ExprNode): - # Used for declaring assignments of a specified type without a known entry. - def __init__(self, type, may_be_none=None, pos=None): - super(TypedExprNode, self).__init__(pos) - self.type = type - self._may_be_none = may_be_none - - def may_be_none(self): - return self._may_be_none != False - -object_expr = TypedExprNode(py_object_type, may_be_none=True) -object_expr_not_none = TypedExprNode(py_object_type, may_be_none=False) -# Fake rhs to silence "unused variable" warning -fake_rhs_expr = TypedExprNode(unspecified_type) - - -class ControlBlock(object): - """Control flow graph node. Sequence of assignments and name references. - - children set of children nodes - parents set of parent nodes - positions set of position markers - - stats list of block statements - gen dict of assignments generated by this block - bounded set of entries that are definitely bounded in this block - - Example: - - a = 1 - b = a + c # 'c' is already bounded or exception here - - stats = [Assignment(a), NameReference(a), NameReference(c), - Assignment(b)] - gen = {Entry(a): Assignment(a), Entry(b): Assignment(b)} - bounded = set([Entry(a), Entry(c)]) - - """ - - def __init__(self): - self.children = set() - self.parents = set() - self.positions = set() - - self.stats = [] - self.gen = {} - self.bounded = set() - - self.i_input = 0 - self.i_output = 0 - self.i_gen = 0 - self.i_kill = 0 - self.i_state = 0 - - def empty(self): - return (not self.stats and not self.positions) - - def detach(self): - """Detach block from parents and children.""" - for child in self.children: - child.parents.remove(self) - for parent in self.parents: - parent.children.remove(self) - self.parents.clear() - self.children.clear() - - def add_child(self, block): - self.children.add(block) - block.parents.add(self) - - -class ExitBlock(ControlBlock): - """Non-empty exit point block.""" - - def empty(self): - return False - - -class AssignmentList(object): - def __init__(self): - self.stats = [] - - -class ControlFlow(object): - """Control-flow graph. - - entry_point ControlBlock entry point for this graph - exit_point ControlBlock normal exit point - block ControlBlock current block - blocks set children nodes - entries set tracked entries - loops list stack for loop descriptors - exceptions list stack for exception descriptors - """ - - def __init__(self): - self.blocks = set() - self.entries = set() - self.loops = [] - self.exceptions = [] - - self.entry_point = ControlBlock() - self.exit_point = ExitBlock() - self.blocks.add(self.exit_point) - self.block = self.entry_point - - def newblock(self, parent=None): - """Create floating block linked to `parent` if given. - - NOTE: Block is NOT added to self.blocks - """ - block = ControlBlock() - self.blocks.add(block) - if parent: - parent.add_child(block) - return block - - def nextblock(self, parent=None): - """Create block children block linked to current or `parent` if given. - - NOTE: Block is added to self.blocks - """ - block = ControlBlock() - self.blocks.add(block) - if parent: - parent.add_child(block) - elif self.block: - self.block.add_child(block) - self.block = block - return self.block - - def is_tracked(self, entry): - if entry.is_anonymous: - return False - return (entry.is_local or entry.is_pyclass_attr or entry.is_arg or - entry.from_closure or entry.in_closure or - entry.error_on_uninitialized) - - def is_statically_assigned(self, entry): - if (entry.is_local and entry.is_variable and - (entry.type.is_struct_or_union or - entry.type.is_complex or - entry.type.is_array or - entry.type.is_cpp_class)): - # stack allocated structured variable => never uninitialised - return True - return False - - def mark_position(self, node): - """Mark position, will be used to draw graph nodes.""" - if self.block: - self.block.positions.add(node.pos[:2]) - - def mark_assignment(self, lhs, rhs, entry): - if self.block and self.is_tracked(entry): - assignment = NameAssignment(lhs, rhs, entry) - self.block.stats.append(assignment) - self.block.gen[entry] = assignment - self.entries.add(entry) - - def mark_argument(self, lhs, rhs, entry): - if self.block and self.is_tracked(entry): - assignment = Argument(lhs, rhs, entry) - self.block.stats.append(assignment) - self.block.gen[entry] = assignment - self.entries.add(entry) - - def mark_deletion(self, node, entry): - if self.block and self.is_tracked(entry): - assignment = NameDeletion(node, entry) - self.block.stats.append(assignment) - self.block.gen[entry] = Uninitialized - self.entries.add(entry) - - def mark_reference(self, node, entry): - if self.block and self.is_tracked(entry): - self.block.stats.append(NameReference(node, entry)) - ## XXX: We don't track expression evaluation order so we can't use - ## XXX: successful reference as initialization sign. - ## # Local variable is definitely bound after this reference - ## if not node.allow_null: - ## self.block.bounded.add(entry) - self.entries.add(entry) - - def normalize(self): - """Delete unreachable and orphan blocks.""" - queue = set([self.entry_point]) - visited = set() - while queue: - root = queue.pop() - visited.add(root) - for child in root.children: - if child not in visited: - queue.add(child) - unreachable = self.blocks - visited - for block in unreachable: - block.detach() - visited.remove(self.entry_point) - for block in visited: - if block.empty(): - for parent in block.parents: # Re-parent - for child in block.children: - parent.add_child(child) - block.detach() - unreachable.add(block) - self.blocks -= unreachable - - def initialize(self): - """Set initial state, map assignments to bits.""" - self.assmts = {} - - bit = 1 - for entry in self.entries: - assmts = AssignmentList() - assmts.mask = assmts.bit = bit - self.assmts[entry] = assmts - bit <<= 1 - - for block in self.blocks: - for stat in block.stats: - if isinstance(stat, NameAssignment): - stat.bit = bit - assmts = self.assmts[stat.entry] - assmts.stats.append(stat) - assmts.mask |= bit - bit <<= 1 - - for block in self.blocks: - for entry, stat in block.gen.items(): - assmts = self.assmts[entry] - if stat is Uninitialized: - block.i_gen |= assmts.bit - else: - block.i_gen |= stat.bit - block.i_kill |= assmts.mask - block.i_output = block.i_gen - for entry in block.bounded: - block.i_kill |= self.assmts[entry].bit - - for assmts in self.assmts.itervalues(): - self.entry_point.i_gen |= assmts.bit - self.entry_point.i_output = self.entry_point.i_gen - - def map_one(self, istate, entry): - ret = set() - assmts = self.assmts[entry] - if istate & assmts.bit: - if self.is_statically_assigned(entry): - ret.add(StaticAssignment(entry)) - elif entry.from_closure: - ret.add(Unknown) - else: - ret.add(Uninitialized) - for assmt in assmts.stats: - if istate & assmt.bit: - ret.add(assmt) - return ret - - def reaching_definitions(self): - """Per-block reaching definitions analysis.""" - dirty = True - while dirty: - dirty = False - for block in self.blocks: - i_input = 0 - for parent in block.parents: - i_input |= parent.i_output - i_output = (i_input & ~block.i_kill) | block.i_gen - if i_output != block.i_output: - dirty = True - block.i_input = i_input - block.i_output = i_output - - -class LoopDescr(object): - def __init__(self, next_block, loop_block): - self.next_block = next_block - self.loop_block = loop_block - self.exceptions = [] - - -class ExceptionDescr(object): - """Exception handling helper. - - entry_point ControlBlock Exception handling entry point - finally_enter ControlBlock Normal finally clause entry point - finally_exit ControlBlock Normal finally clause exit point - """ - - def __init__(self, entry_point, finally_enter=None, finally_exit=None): - self.entry_point = entry_point - self.finally_enter = finally_enter - self.finally_exit = finally_exit - - -class NameAssignment(object): - def __init__(self, lhs, rhs, entry): - if lhs.cf_state is None: - lhs.cf_state = set() - self.lhs = lhs - self.rhs = rhs - self.entry = entry - self.pos = lhs.pos - self.refs = set() - self.is_arg = False - self.is_deletion = False - self.inferred_type = None - - def __repr__(self): - return '%s(entry=%r)' % (self.__class__.__name__, self.entry) - - def infer_type(self): - self.inferred_type = self.rhs.infer_type(self.entry.scope) - return self.inferred_type - - def type_dependencies(self): - return self.rhs.type_dependencies(self.entry.scope) - - @property - def type(self): - if not self.entry.type.is_unspecified: - return self.entry.type - return self.inferred_type - - -class StaticAssignment(NameAssignment): - """Initialised at declaration time, e.g. stack allocation.""" - def __init__(self, entry): - if not entry.type.is_pyobject: - may_be_none = False - else: - may_be_none = None # unknown - lhs = TypedExprNode( - entry.type, may_be_none=may_be_none, pos=entry.pos) - super(StaticAssignment, self).__init__(lhs, lhs, entry) - - def infer_type(self): - return self.entry.type - - def type_dependencies(self): - return () - - -class Argument(NameAssignment): - def __init__(self, lhs, rhs, entry): - NameAssignment.__init__(self, lhs, rhs, entry) - self.is_arg = True - - -class NameDeletion(NameAssignment): - def __init__(self, lhs, entry): - NameAssignment.__init__(self, lhs, lhs, entry) - self.is_deletion = True - - def infer_type(self): - inferred_type = self.rhs.infer_type(self.entry.scope) - if (not inferred_type.is_pyobject and - inferred_type.can_coerce_to_pyobject(self.entry.scope)): - return py_object_type - self.inferred_type = inferred_type - return inferred_type - - -class Uninitialized(object): - """Definitely not initialised yet.""" - - -class Unknown(object): - """Coming from outer closure, might be initialised or not.""" - - -class NameReference(object): - def __init__(self, node, entry): - if node.cf_state is None: - node.cf_state = set() - self.node = node - self.entry = entry - self.pos = node.pos - - def __repr__(self): - return '%s(entry=%r)' % (self.__class__.__name__, self.entry) - - -class ControlFlowState(list): - # Keeps track of Node's entry assignments - # - # cf_is_null [boolean] It is uninitialized - # cf_maybe_null [boolean] May be uninitialized - # is_single [boolean] Has only one assignment at this point - - cf_maybe_null = False - cf_is_null = False - is_single = False - - def __init__(self, state): - if Uninitialized in state: - state.discard(Uninitialized) - self.cf_maybe_null = True - if not state: - self.cf_is_null = True - elif Unknown in state: - state.discard(Unknown) - self.cf_maybe_null = True - else: - if len(state) == 1: - self.is_single = True - # XXX: Remove fake_rhs_expr - super(ControlFlowState, self).__init__( - [i for i in state if i.rhs is not fake_rhs_expr]) - - def one(self): - return self[0] - - -class GVContext(object): - """Graphviz subgraph object.""" - - def __init__(self): - self.blockids = {} - self.nextid = 0 - self.children = [] - self.sources = {} - - def add(self, child): - self.children.append(child) - - def nodeid(self, block): - if block not in self.blockids: - self.blockids[block] = 'block%d' % self.nextid - self.nextid += 1 - return self.blockids[block] - - def extract_sources(self, block): - if not block.positions: - return '' - start = min(block.positions) - stop = max(block.positions) - srcdescr = start[0] - if not srcdescr in self.sources: - self.sources[srcdescr] = list(srcdescr.get_lines()) - lines = self.sources[srcdescr] - return '\\n'.join([l.strip() for l in lines[start[1] - 1:stop[1]]]) - - def render(self, fp, name, annotate_defs=False): - """Render graphviz dot graph""" - fp.write('digraph %s {\n' % name) - fp.write(' node [shape=box];\n') - for child in self.children: - child.render(fp, self, annotate_defs) - fp.write('}\n') - - def escape(self, text): - return text.replace('"', '\\"').replace('\n', '\\n') - - -class GV(object): - """Graphviz DOT renderer.""" - - def __init__(self, name, flow): - self.name = name - self.flow = flow - - def render(self, fp, ctx, annotate_defs=False): - fp.write(' subgraph %s {\n' % self.name) - for block in self.flow.blocks: - label = ctx.extract_sources(block) - if annotate_defs: - for stat in block.stats: - if isinstance(stat, NameAssignment): - label += '\n %s [definition]' % stat.entry.name - elif isinstance(stat, NameReference): - if stat.entry: - label += '\n %s [reference]' % stat.entry.name - if not label: - label = 'empty' - pid = ctx.nodeid(block) - fp.write(' %s [label="%s"];\n' % (pid, ctx.escape(label))) - for block in self.flow.blocks: - pid = ctx.nodeid(block) - for child in block.children: - fp.write(' %s -> %s;\n' % (pid, ctx.nodeid(child))) - fp.write(' }\n') - - -class MessageCollection(object): - """Collect error/warnings messages first then sort""" - def __init__(self): - self.messages = [] - - def error(self, pos, message): - self.messages.append((pos, True, message)) - - def warning(self, pos, message): - self.messages.append((pos, False, message)) - - def report(self): - self.messages.sort() - for pos, is_error, message in self.messages: - if is_error: - error(pos, message) - else: - warning(pos, message, 2) - - -def check_definitions(flow, compiler_directives): - flow.initialize() - flow.reaching_definitions() - - # Track down state - assignments = set() - # Node to entry map - references = {} - assmt_nodes = set() - - for block in flow.blocks: - i_state = block.i_input - for stat in block.stats: - i_assmts = flow.assmts[stat.entry] - state = flow.map_one(i_state, stat.entry) - if isinstance(stat, NameAssignment): - stat.lhs.cf_state.update(state) - assmt_nodes.add(stat.lhs) - i_state = i_state & ~i_assmts.mask - if stat.is_deletion: - i_state |= i_assmts.bit - else: - i_state |= stat.bit - assignments.add(stat) - if stat.rhs is not fake_rhs_expr: - stat.entry.cf_assignments.append(stat) - elif isinstance(stat, NameReference): - references[stat.node] = stat.entry - stat.entry.cf_references.append(stat) - stat.node.cf_state.update(state) - ## if not stat.node.allow_null: - ## i_state &= ~i_assmts.bit - ## # after successful read, the state is known to be initialised - state.discard(Uninitialized) - state.discard(Unknown) - for assmt in state: - assmt.refs.add(stat) - - # Check variable usage - warn_maybe_uninitialized = compiler_directives['warn.maybe_uninitialized'] - warn_unused_result = compiler_directives['warn.unused_result'] - warn_unused = compiler_directives['warn.unused'] - warn_unused_arg = compiler_directives['warn.unused_arg'] - - messages = MessageCollection() - - # assignment hints - for node in assmt_nodes: - if Uninitialized in node.cf_state: - node.cf_maybe_null = True - if len(node.cf_state) == 1: - node.cf_is_null = True - else: - node.cf_is_null = False - elif Unknown in node.cf_state: - node.cf_maybe_null = True - else: - node.cf_is_null = False - node.cf_maybe_null = False - - # Find uninitialized references and cf-hints - for node, entry in references.iteritems(): - if Uninitialized in node.cf_state: - node.cf_maybe_null = True - if not entry.from_closure and len(node.cf_state) == 1: - node.cf_is_null = True - if (node.allow_null or entry.from_closure - or entry.is_pyclass_attr or entry.type.is_error): - pass # Can be uninitialized here - elif node.cf_is_null: - if entry.error_on_uninitialized or ( - Options.error_on_uninitialized and ( - entry.type.is_pyobject or entry.type.is_unspecified)): - messages.error( - node.pos, - "local variable '%s' referenced before assignment" - % entry.name) - else: - messages.warning( - node.pos, - "local variable '%s' referenced before assignment" - % entry.name) - elif warn_maybe_uninitialized: - messages.warning( - node.pos, - "local variable '%s' might be referenced before assignment" - % entry.name) - elif Unknown in node.cf_state: - # TODO: better cross-closure analysis to know when inner functions - # are being called before a variable is being set, and when - # a variable is known to be set before even defining the - # inner function, etc. - node.cf_maybe_null = True - else: - node.cf_is_null = False - node.cf_maybe_null = False - - # Unused result - for assmt in assignments: - if (not assmt.refs and not assmt.entry.is_pyclass_attr - and not assmt.entry.in_closure): - if assmt.entry.cf_references and warn_unused_result: - if assmt.is_arg: - messages.warning(assmt.pos, "Unused argument value '%s'" % - assmt.entry.name) - else: - messages.warning(assmt.pos, "Unused result in '%s'" % - assmt.entry.name) - assmt.lhs.cf_used = False - - # Unused entries - for entry in flow.entries: - if (not entry.cf_references - and not entry.is_pyclass_attr): - if entry.name != '_': - # '_' is often used for unused variables, e.g. in loops - if entry.is_arg: - if warn_unused_arg: - messages.warning(entry.pos, "Unused argument '%s'" % - entry.name) - else: - if warn_unused: - messages.warning(entry.pos, "Unused entry '%s'" % - entry.name) - entry.cf_used = False - - messages.report() - - for node in assmt_nodes: - node.cf_state = ControlFlowState(node.cf_state) - for node in references: - node.cf_state = ControlFlowState(node.cf_state) - - -class AssignmentCollector(TreeVisitor): - def __init__(self): - super(AssignmentCollector, self).__init__() - self.assignments = [] - - def visit_Node(self): - self._visitchildren(self, None) - - def visit_SingleAssignmentNode(self, node): - self.assignments.append((node.lhs, node.rhs)) - - def visit_CascadedAssignmentNode(self, node): - for lhs in node.lhs_list: - self.assignments.append((lhs, node.rhs)) - - -class ControlFlowAnalysis(CythonTransform): - - def visit_ModuleNode(self, node): - self.gv_ctx = GVContext() - - # Set of NameNode reductions - self.reductions = set() - - self.in_inplace_assignment = False - self.env_stack = [] - self.env = node.scope - self.stack = [] - self.flow = ControlFlow() - self.visitchildren(node) - - check_definitions(self.flow, self.current_directives) - - dot_output = self.current_directives['control_flow.dot_output'] - if dot_output: - annotate_defs = self.current_directives['control_flow.dot_annotate_defs'] - fp = open(dot_output, 'wt') - try: - self.gv_ctx.render(fp, 'module', annotate_defs=annotate_defs) - finally: - fp.close() - return node - - def visit_FuncDefNode(self, node): - for arg in node.args: - if arg.default: - self.visitchildren(arg) - self.visitchildren(node, ('decorators',)) - self.env_stack.append(self.env) - self.env = node.local_scope - self.stack.append(self.flow) - self.flow = ControlFlow() - - # Collect all entries - for entry in node.local_scope.entries.values(): - if self.flow.is_tracked(entry): - self.flow.entries.add(entry) - - self.mark_position(node) - # Function body block - self.flow.nextblock() - - for arg in node.args: - self._visit(arg) - if node.star_arg: - self.flow.mark_argument(node.star_arg, - TypedExprNode(Builtin.tuple_type, - may_be_none=False), - node.star_arg.entry) - if node.starstar_arg: - self.flow.mark_argument(node.starstar_arg, - TypedExprNode(Builtin.dict_type, - may_be_none=False), - node.starstar_arg.entry) - self._visit(node.body) - # Workaround for generators - if node.is_generator: - self._visit(node.gbody.body) - - # Exit point - if self.flow.block: - self.flow.block.add_child(self.flow.exit_point) - - # Cleanup graph - self.flow.normalize() - check_definitions(self.flow, self.current_directives) - self.flow.blocks.add(self.flow.entry_point) - - self.gv_ctx.add(GV(node.local_scope.name, self.flow)) - - self.flow = self.stack.pop() - self.env = self.env_stack.pop() - return node - - def visit_DefNode(self, node): - node.used = True - return self.visit_FuncDefNode(node) - - def visit_GeneratorBodyDefNode(self, node): - return node - - def visit_CTypeDefNode(self, node): - return node - - def mark_assignment(self, lhs, rhs=None): - if not self.flow.block: - return - if self.flow.exceptions: - exc_descr = self.flow.exceptions[-1] - self.flow.block.add_child(exc_descr.entry_point) - self.flow.nextblock() - - if not rhs: - rhs = object_expr - if lhs.is_name: - if lhs.entry is not None: - entry = lhs.entry - else: - entry = self.env.lookup(lhs.name) - if entry is None: # TODO: This shouldn't happen... - return - self.flow.mark_assignment(lhs, rhs, entry) - elif isinstance(lhs, ExprNodes.SequenceNode): - for arg in lhs.args: - self.mark_assignment(arg) - else: - self._visit(lhs) - - if self.flow.exceptions: - exc_descr = self.flow.exceptions[-1] - self.flow.block.add_child(exc_descr.entry_point) - self.flow.nextblock() - - def mark_position(self, node): - """Mark position if DOT output is enabled.""" - if self.current_directives['control_flow.dot_output']: - self.flow.mark_position(node) - - def visit_FromImportStatNode(self, node): - for name, target in node.items: - if name != "*": - self.mark_assignment(target) - self.visitchildren(node) - return node - - def visit_AssignmentNode(self, node): - raise InternalError("Unhandled assignment node") - - def visit_SingleAssignmentNode(self, node): - self._visit(node.rhs) - self.mark_assignment(node.lhs, node.rhs) - return node - - def visit_CascadedAssignmentNode(self, node): - self._visit(node.rhs) - for lhs in node.lhs_list: - self.mark_assignment(lhs, node.rhs) - return node - - def visit_ParallelAssignmentNode(self, node): - collector = AssignmentCollector() - collector.visitchildren(node) - for lhs, rhs in collector.assignments: - self._visit(rhs) - for lhs, rhs in collector.assignments: - self.mark_assignment(lhs, rhs) - return node - - def visit_InPlaceAssignmentNode(self, node): - self.in_inplace_assignment = True - self.visitchildren(node) - self.in_inplace_assignment = False - self.mark_assignment(node.lhs, node.create_binop_node()) - return node - - def visit_DelStatNode(self, node): - for arg in node.args: - if arg.is_name: - entry = arg.entry or self.env.lookup(arg.name) - if entry.in_closure or entry.from_closure: - error(arg.pos, - "can not delete variable '%s' " - "referenced in nested scope" % entry.name) - # Mark reference - self._visit(arg) - self.flow.mark_deletion(arg, entry) - else: - self._visit(arg) - return node - - def visit_CArgDeclNode(self, node): - entry = self.env.lookup(node.name) - if entry: - may_be_none = not node.not_none - self.flow.mark_argument( - node, TypedExprNode(entry.type, may_be_none), entry) - return node - - def visit_NameNode(self, node): - if self.flow.block: - entry = node.entry or self.env.lookup(node.name) - if entry: - self.flow.mark_reference(node, entry) - - if entry in self.reductions and not self.in_inplace_assignment: - error(node.pos, - "Cannot read reduction variable in loop body") - - return node - - def visit_StatListNode(self, node): - if self.flow.block: - for stat in node.stats: - self._visit(stat) - if not self.flow.block: - stat.is_terminator = True - break - return node - - def visit_Node(self, node): - self.visitchildren(node) - self.mark_position(node) - return node - - def visit_IfStatNode(self, node): - next_block = self.flow.newblock() - parent = self.flow.block - # If clauses - for clause in node.if_clauses: - parent = self.flow.nextblock(parent) - self._visit(clause.condition) - self.flow.nextblock() - self._visit(clause.body) - if self.flow.block: - self.flow.block.add_child(next_block) - # Else clause - if node.else_clause: - self.flow.nextblock(parent=parent) - self._visit(node.else_clause) - if self.flow.block: - self.flow.block.add_child(next_block) - else: - parent.add_child(next_block) - - if next_block.parents: - self.flow.block = next_block - else: - self.flow.block = None - return node - - def visit_WhileStatNode(self, node): - condition_block = self.flow.nextblock() - next_block = self.flow.newblock() - # Condition block - self.flow.loops.append(LoopDescr(next_block, condition_block)) - if node.condition: - self._visit(node.condition) - # Body block - self.flow.nextblock() - self._visit(node.body) - self.flow.loops.pop() - # Loop it - if self.flow.block: - self.flow.block.add_child(condition_block) - self.flow.block.add_child(next_block) - # Else clause - if node.else_clause: - self.flow.nextblock(parent=condition_block) - self._visit(node.else_clause) - if self.flow.block: - self.flow.block.add_child(next_block) - else: - condition_block.add_child(next_block) - - if next_block.parents: - self.flow.block = next_block - else: - self.flow.block = None - return node - - def mark_forloop_target(self, node): - # TODO: Remove redundancy with range optimization... - is_special = False - sequence = node.iterator.sequence - target = node.target - if isinstance(sequence, ExprNodes.SimpleCallNode): - function = sequence.function - if sequence.self is None and function.is_name: - entry = self.env.lookup(function.name) - if not entry or entry.is_builtin: - if function.name == 'reversed' and len(sequence.args) == 1: - sequence = sequence.args[0] - elif function.name == 'enumerate' and len(sequence.args) == 1: - if target.is_sequence_constructor and len(target.args) == 2: - iterator = sequence.args[0] - if iterator.is_name: - iterator_type = iterator.infer_type(self.env) - if iterator_type.is_builtin_type: - # assume that builtin types have a length within Py_ssize_t - self.mark_assignment( - target.args[0], - ExprNodes.IntNode(target.pos, value='PY_SSIZE_T_MAX', - type=PyrexTypes.c_py_ssize_t_type)) - target = target.args[1] - sequence = sequence.args[0] - if isinstance(sequence, ExprNodes.SimpleCallNode): - function = sequence.function - if sequence.self is None and function.is_name: - entry = self.env.lookup(function.name) - if not entry or entry.is_builtin: - if function.name in ('range', 'xrange'): - is_special = True - for arg in sequence.args[:2]: - self.mark_assignment(target, arg) - if len(sequence.args) > 2: - self.mark_assignment( - target, - ExprNodes.binop_node(node.pos, - '+', - sequence.args[0], - sequence.args[2])) - - if not is_special: - # A for-loop basically translates to subsequent calls to - # __getitem__(), so using an IndexNode here allows us to - # naturally infer the base type of pointers, C arrays, - # Python strings, etc., while correctly falling back to an - # object type when the base type cannot be handled. - - self.mark_assignment(target, node.item) - - def visit_ForInStatNode(self, node): - condition_block = self.flow.nextblock() - next_block = self.flow.newblock() - # Condition with iterator - self.flow.loops.append(LoopDescr(next_block, condition_block)) - self._visit(node.iterator) - # Target assignment - self.flow.nextblock() - - if isinstance(node, Nodes.ForInStatNode): - self.mark_forloop_target(node) - else: # Parallel - self.mark_assignment(node.target) - - # Body block - if isinstance(node, Nodes.ParallelRangeNode): - # In case of an invalid - self._delete_privates(node, exclude=node.target.entry) - - self.flow.nextblock() - self._visit(node.body) - self.flow.loops.pop() - - # Loop it - if self.flow.block: - self.flow.block.add_child(condition_block) - # Else clause - if node.else_clause: - self.flow.nextblock(parent=condition_block) - self._visit(node.else_clause) - if self.flow.block: - self.flow.block.add_child(next_block) - else: - condition_block.add_child(next_block) - - if next_block.parents: - self.flow.block = next_block - else: - self.flow.block = None - return node - - def _delete_privates(self, node, exclude=None): - for private_node in node.assigned_nodes: - if not exclude or private_node.entry is not exclude: - self.flow.mark_deletion(private_node, private_node.entry) - - def visit_ParallelRangeNode(self, node): - reductions = self.reductions - - # if node.target is None or not a NameNode, an error will have - # been previously issued - if hasattr(node.target, 'entry'): - self.reductions = set(reductions) - - for private_node in node.assigned_nodes: - private_node.entry.error_on_uninitialized = True - pos, reduction = node.assignments[private_node.entry] - if reduction: - self.reductions.add(private_node.entry) - - node = self.visit_ForInStatNode(node) - - self.reductions = reductions - return node - - def visit_ParallelWithBlockNode(self, node): - for private_node in node.assigned_nodes: - private_node.entry.error_on_uninitialized = True - - self._delete_privates(node) - self.visitchildren(node) - self._delete_privates(node) - - return node - - def visit_ForFromStatNode(self, node): - condition_block = self.flow.nextblock() - next_block = self.flow.newblock() - # Condition with iterator - self.flow.loops.append(LoopDescr(next_block, condition_block)) - self._visit(node.bound1) - self._visit(node.bound2) - if node.step is not None: - self._visit(node.step) - # Target assignment - self.flow.nextblock() - self.mark_assignment(node.target, node.bound1) - if node.step is not None: - self.mark_assignment(node.target, - ExprNodes.binop_node(node.pos, '+', - node.bound1, node.step)) - # Body block - self.flow.nextblock() - self._visit(node.body) - self.flow.loops.pop() - # Loop it - if self.flow.block: - self.flow.block.add_child(condition_block) - # Else clause - if node.else_clause: - self.flow.nextblock(parent=condition_block) - self._visit(node.else_clause) - if self.flow.block: - self.flow.block.add_child(next_block) - else: - condition_block.add_child(next_block) - - if next_block.parents: - self.flow.block = next_block - else: - self.flow.block = None - return node - - def visit_LoopNode(self, node): - raise InternalError("Generic loops are not supported") - - def visit_WithTargetAssignmentStatNode(self, node): - self.mark_assignment(node.lhs, node.rhs) - return node - - def visit_WithStatNode(self, node): - self._visit(node.manager) - self._visit(node.enter_call) - self._visit(node.body) - return node - - def visit_TryExceptStatNode(self, node): - # After exception handling - next_block = self.flow.newblock() - # Body block - self.flow.newblock() - # Exception entry point - entry_point = self.flow.newblock() - self.flow.exceptions.append(ExceptionDescr(entry_point)) - self.flow.nextblock() - ## XXX: links to exception handling point should be added by - ## XXX: children nodes - self.flow.block.add_child(entry_point) - self.flow.nextblock() - self._visit(node.body) - self.flow.exceptions.pop() - - # After exception - if self.flow.block: - if node.else_clause: - self.flow.nextblock() - self._visit(node.else_clause) - if self.flow.block: - self.flow.block.add_child(next_block) - - for clause in node.except_clauses: - self.flow.block = entry_point - if clause.pattern: - for pattern in clause.pattern: - self._visit(pattern) - else: - # TODO: handle * pattern - pass - entry_point = self.flow.newblock(parent=self.flow.block) - self.flow.nextblock() - if clause.target: - self.mark_assignment(clause.target) - self._visit(clause.body) - if self.flow.block: - self.flow.block.add_child(next_block) - - if self.flow.exceptions: - entry_point.add_child(self.flow.exceptions[-1].entry_point) - - if next_block.parents: - self.flow.block = next_block - else: - self.flow.block = None - return node - - def visit_TryFinallyStatNode(self, node): - body_block = self.flow.nextblock() - - # Exception entry point - entry_point = self.flow.newblock() - self.flow.block = entry_point - self._visit(node.finally_clause) - - if self.flow.block and self.flow.exceptions: - self.flow.block.add_child(self.flow.exceptions[-1].entry_point) - - # Normal execution - finally_enter = self.flow.newblock() - self.flow.block = finally_enter - self._visit(node.finally_clause) - finally_exit = self.flow.block - - descr = ExceptionDescr(entry_point, finally_enter, finally_exit) - self.flow.exceptions.append(descr) - if self.flow.loops: - self.flow.loops[-1].exceptions.append(descr) - self.flow.block = body_block - ## XXX: Is it still required - body_block.add_child(entry_point) - self.flow.nextblock() - self._visit(node.body) - self.flow.exceptions.pop() - if self.flow.loops: - self.flow.loops[-1].exceptions.pop() - - if self.flow.block: - self.flow.block.add_child(finally_enter) - if finally_exit: - self.flow.block = self.flow.nextblock(parent=finally_exit) - else: - self.flow.block = None - return node - - def visit_RaiseStatNode(self, node): - self.mark_position(node) - self.visitchildren(node) - if self.flow.exceptions: - self.flow.block.add_child(self.flow.exceptions[-1].entry_point) - self.flow.block = None - return node - - def visit_ReraiseStatNode(self, node): - self.mark_position(node) - if self.flow.exceptions: - self.flow.block.add_child(self.flow.exceptions[-1].entry_point) - self.flow.block = None - return node - - def visit_ReturnStatNode(self, node): - self.mark_position(node) - self.visitchildren(node) - - for exception in self.flow.exceptions[::-1]: - if exception.finally_enter: - self.flow.block.add_child(exception.finally_enter) - if exception.finally_exit: - exception.finally_exit.add_child(self.flow.exit_point) - break - else: - if self.flow.block: - self.flow.block.add_child(self.flow.exit_point) - self.flow.block = None - return node - - def visit_BreakStatNode(self, node): - if not self.flow.loops: - #error(node.pos, "break statement not inside loop") - return node - loop = self.flow.loops[-1] - self.mark_position(node) - for exception in loop.exceptions[::-1]: - if exception.finally_enter: - self.flow.block.add_child(exception.finally_enter) - if exception.finally_exit: - exception.finally_exit.add_child(loop.next_block) - break - else: - self.flow.block.add_child(loop.next_block) - self.flow.block = None - return node - - def visit_ContinueStatNode(self, node): - if not self.flow.loops: - #error(node.pos, "continue statement not inside loop") - return node - loop = self.flow.loops[-1] - self.mark_position(node) - for exception in loop.exceptions[::-1]: - if exception.finally_enter: - self.flow.block.add_child(exception.finally_enter) - if exception.finally_exit: - exception.finally_exit.add_child(loop.loop_block) - break - else: - self.flow.block.add_child(loop.loop_block) - self.flow.block = None - return node - - def visit_ComprehensionNode(self, node): - if node.expr_scope: - self.env_stack.append(self.env) - self.env = node.expr_scope - # Skip append node here - self._visit(node.loop) - if node.expr_scope: - self.env = self.env_stack.pop() - return node - - def visit_ScopedExprNode(self, node): - if node.expr_scope: - self.env_stack.append(self.env) - self.env = node.expr_scope - self.visitchildren(node) - if node.expr_scope: - self.env = self.env_stack.pop() - return node - - def visit_PyClassDefNode(self, node): - self.visitchildren(node, ('dict', 'metaclass', - 'mkw', 'bases', 'class_result')) - self.flow.mark_assignment(node.target, object_expr_not_none, - self.env.lookup(node.name)) - self.env_stack.append(self.env) - self.env = node.scope - self.flow.nextblock() - self.visitchildren(node, ('body',)) - self.flow.nextblock() - self.env = self.env_stack.pop() - return node - - def visit_AmpersandNode(self, node): - if node.operand.is_name: - # Fake assignment to silence warning - self.mark_assignment(node.operand, fake_rhs_expr) - self.visitchildren(node) - return node diff --git a/third_party/cython/src/Cython/Compiler/FusedNode.py b/third_party/cython/src/Cython/Compiler/FusedNode.py deleted file mode 100644 index 7a9d1ab48bc6f..0000000000000 --- a/third_party/cython/src/Cython/Compiler/FusedNode.py +++ /dev/null @@ -1,790 +0,0 @@ -import copy - -from Cython.Compiler import (ExprNodes, PyrexTypes, MemoryView, - ParseTreeTransforms, StringEncoding, - Errors) -from Cython.Compiler.ExprNodes import CloneNode, ProxyNode, TupleNode -from Cython.Compiler.Nodes import (FuncDefNode, CFuncDefNode, StatListNode, - DefNode) - -class FusedCFuncDefNode(StatListNode): - """ - This node replaces a function with fused arguments. It deep-copies the - function for every permutation of fused types, and allocates a new local - scope for it. It keeps track of the original function in self.node, and - the entry of the original function in the symbol table is given the - 'fused_cfunction' attribute which points back to us. - Then when a function lookup occurs (to e.g. call it), the call can be - dispatched to the right function. - - node FuncDefNode the original function - nodes [FuncDefNode] list of copies of node with different specific types - py_func DefNode the fused python function subscriptable from - Python space - __signatures__ A DictNode mapping signature specialization strings - to PyCFunction nodes - resulting_fused_function PyCFunction for the fused DefNode that delegates - to specializations - fused_func_assignment Assignment of the fused function to the function name - defaults_tuple TupleNode of defaults (letting PyCFunctionNode build - defaults would result in many different tuples) - specialized_pycfuncs List of synthesized pycfunction nodes for the - specializations - code_object CodeObjectNode shared by all specializations and the - fused function - - fused_compound_types All fused (compound) types (e.g. floating[:]) - """ - - __signatures__ = None - resulting_fused_function = None - fused_func_assignment = None - defaults_tuple = None - decorators = None - - child_attrs = StatListNode.child_attrs + [ - '__signatures__', 'resulting_fused_function', 'fused_func_assignment'] - - def __init__(self, node, env): - super(FusedCFuncDefNode, self).__init__(node.pos) - - self.nodes = [] - self.node = node - - is_def = isinstance(self.node, DefNode) - if is_def: - # self.node.decorators = [] - self.copy_def(env) - else: - self.copy_cdef(env) - - # Perform some sanity checks. If anything fails, it's a bug - for n in self.nodes: - assert not n.entry.type.is_fused - assert not n.local_scope.return_type.is_fused - if node.return_type.is_fused: - assert not n.return_type.is_fused - - if not is_def and n.cfunc_declarator.optional_arg_count: - assert n.type.op_arg_struct - - node.entry.fused_cfunction = self - # Copy the nodes as AnalyseDeclarationsTransform will prepend - # self.py_func to self.stats, as we only want specialized - # CFuncDefNodes in self.nodes - self.stats = self.nodes[:] - - def copy_def(self, env): - """ - Create a copy of the original def or lambda function for specialized - versions. - """ - fused_compound_types = PyrexTypes.unique( - [arg.type for arg in self.node.args if arg.type.is_fused]) - permutations = PyrexTypes.get_all_specialized_permutations(fused_compound_types) - - self.fused_compound_types = fused_compound_types - - if self.node.entry in env.pyfunc_entries: - env.pyfunc_entries.remove(self.node.entry) - - for cname, fused_to_specific in permutations: - copied_node = copy.deepcopy(self.node) - - self._specialize_function_args(copied_node.args, fused_to_specific) - copied_node.return_type = self.node.return_type.specialize( - fused_to_specific) - - copied_node.analyse_declarations(env) - # copied_node.is_staticmethod = self.node.is_staticmethod - # copied_node.is_classmethod = self.node.is_classmethod - self.create_new_local_scope(copied_node, env, fused_to_specific) - self.specialize_copied_def(copied_node, cname, self.node.entry, - fused_to_specific, fused_compound_types) - - PyrexTypes.specialize_entry(copied_node.entry, cname) - copied_node.entry.used = True - env.entries[copied_node.entry.name] = copied_node.entry - - if not self.replace_fused_typechecks(copied_node): - break - - self.orig_py_func = self.node - self.py_func = self.make_fused_cpdef(self.node, env, is_def=True) - - def copy_cdef(self, env): - """ - Create a copy of the original c(p)def function for all specialized - versions. - """ - permutations = self.node.type.get_all_specialized_permutations() - # print 'Node %s has %d specializations:' % (self.node.entry.name, - # len(permutations)) - # import pprint; pprint.pprint([d for cname, d in permutations]) - - if self.node.entry in env.cfunc_entries: - env.cfunc_entries.remove(self.node.entry) - - # Prevent copying of the python function - self.orig_py_func = orig_py_func = self.node.py_func - self.node.py_func = None - if orig_py_func: - env.pyfunc_entries.remove(orig_py_func.entry) - - fused_types = self.node.type.get_fused_types() - self.fused_compound_types = fused_types - - for cname, fused_to_specific in permutations: - copied_node = copy.deepcopy(self.node) - - # Make the types in our CFuncType specific - type = copied_node.type.specialize(fused_to_specific) - entry = copied_node.entry - - copied_node.type = type - entry.type, type.entry = type, entry - - entry.used = (entry.used or - self.node.entry.defined_in_pxd or - env.is_c_class_scope or - entry.is_cmethod) - - if self.node.cfunc_declarator.optional_arg_count: - self.node.cfunc_declarator.declare_optional_arg_struct( - type, env, fused_cname=cname) - - copied_node.return_type = type.return_type - self.create_new_local_scope(copied_node, env, fused_to_specific) - - # Make the argument types in the CFuncDeclarator specific - self._specialize_function_args(copied_node.cfunc_declarator.args, - fused_to_specific) - - type.specialize_entry(entry, cname) - env.cfunc_entries.append(entry) - - # If a cpdef, declare all specialized cpdefs (this - # also calls analyse_declarations) - copied_node.declare_cpdef_wrapper(env) - if copied_node.py_func: - env.pyfunc_entries.remove(copied_node.py_func.entry) - - self.specialize_copied_def( - copied_node.py_func, cname, self.node.entry.as_variable, - fused_to_specific, fused_types) - - if not self.replace_fused_typechecks(copied_node): - break - - if orig_py_func: - self.py_func = self.make_fused_cpdef(orig_py_func, env, - is_def=False) - else: - self.py_func = orig_py_func - - def _specialize_function_args(self, args, fused_to_specific): - for arg in args: - if arg.type.is_fused: - arg.type = arg.type.specialize(fused_to_specific) - if arg.type.is_memoryviewslice: - MemoryView.validate_memslice_dtype(arg.pos, arg.type.dtype) - - def create_new_local_scope(self, node, env, f2s): - """ - Create a new local scope for the copied node and append it to - self.nodes. A new local scope is needed because the arguments with the - fused types are aready in the local scope, and we need the specialized - entries created after analyse_declarations on each specialized version - of the (CFunc)DefNode. - f2s is a dict mapping each fused type to its specialized version - """ - node.create_local_scope(env) - node.local_scope.fused_to_specific = f2s - - # This is copied from the original function, set it to false to - # stop recursion - node.has_fused_arguments = False - self.nodes.append(node) - - def specialize_copied_def(self, node, cname, py_entry, f2s, fused_types): - """Specialize the copy of a DefNode given the copied node, - the specialization cname and the original DefNode entry""" - type_strings = [ - PyrexTypes.specialization_signature_string(fused_type, f2s) - for fused_type in fused_types - ] - - node.specialized_signature_string = '|'.join(type_strings) - - node.entry.pymethdef_cname = PyrexTypes.get_fused_cname( - cname, node.entry.pymethdef_cname) - node.entry.doc = py_entry.doc - node.entry.doc_cname = py_entry.doc_cname - - def replace_fused_typechecks(self, copied_node): - """ - Branch-prune fused type checks like - - if fused_t is int: - ... - - Returns whether an error was issued and whether we should stop in - in order to prevent a flood of errors. - """ - num_errors = Errors.num_errors - transform = ParseTreeTransforms.ReplaceFusedTypeChecks( - copied_node.local_scope) - transform(copied_node) - - if Errors.num_errors > num_errors: - return False - - return True - - def _fused_instance_checks(self, normal_types, pyx_code, env): - """ - Genereate Cython code for instance checks, matching an object to - specialized types. - """ - if_ = 'if' - for specialized_type in normal_types: - # all_numeric = all_numeric and specialized_type.is_numeric - py_type_name = specialized_type.py_type_name() - specialized_type_name = specialized_type.specialization_string - pyx_code.context.update(locals()) - pyx_code.put_chunk( - u""" - {{if_}} isinstance(arg, {{py_type_name}}): - dest_sig[{{dest_sig_idx}}] = '{{specialized_type_name}}' - """) - if_ = 'elif' - - if not normal_types: - # we need an 'if' to match the following 'else' - pyx_code.putln("if 0: pass") - - def _dtype_name(self, dtype): - if dtype.is_typedef: - return '___pyx_%s' % dtype - return str(dtype).replace(' ', '_') - - def _dtype_type(self, dtype): - if dtype.is_typedef: - return self._dtype_name(dtype) - return str(dtype) - - def _sizeof_dtype(self, dtype): - if dtype.is_pyobject: - return 'sizeof(void *)' - else: - return "sizeof(%s)" % self._dtype_type(dtype) - - def _buffer_check_numpy_dtype_setup_cases(self, pyx_code): - "Setup some common cases to match dtypes against specializations" - if pyx_code.indenter("if dtype.kind in ('i', 'u'):"): - pyx_code.putln("pass") - pyx_code.named_insertion_point("dtype_int") - pyx_code.dedent() - - if pyx_code.indenter("elif dtype.kind == 'f':"): - pyx_code.putln("pass") - pyx_code.named_insertion_point("dtype_float") - pyx_code.dedent() - - if pyx_code.indenter("elif dtype.kind == 'c':"): - pyx_code.putln("pass") - pyx_code.named_insertion_point("dtype_complex") - pyx_code.dedent() - - if pyx_code.indenter("elif dtype.kind == 'O':"): - pyx_code.putln("pass") - pyx_code.named_insertion_point("dtype_object") - pyx_code.dedent() - - match = "dest_sig[{{dest_sig_idx}}] = '{{specialized_type_name}}'" - no_match = "dest_sig[{{dest_sig_idx}}] = None" - def _buffer_check_numpy_dtype(self, pyx_code, specialized_buffer_types): - """ - Match a numpy dtype object to the individual specializations. - """ - self._buffer_check_numpy_dtype_setup_cases(pyx_code) - - for specialized_type in specialized_buffer_types: - dtype = specialized_type.dtype - pyx_code.context.update( - itemsize_match=self._sizeof_dtype(dtype) + " == itemsize", - signed_match="not (%s_is_signed ^ dtype_signed)" % self._dtype_name(dtype), - dtype=dtype, - specialized_type_name=specialized_type.specialization_string) - - dtypes = [ - (dtype.is_int, pyx_code.dtype_int), - (dtype.is_float, pyx_code.dtype_float), - (dtype.is_complex, pyx_code.dtype_complex) - ] - - for dtype_category, codewriter in dtypes: - if dtype_category: - cond = '{{itemsize_match}} and arg.ndim == %d' % ( - specialized_type.ndim,) - if dtype.is_int: - cond += ' and {{signed_match}}' - - if codewriter.indenter("if %s:" % cond): - # codewriter.putln("print 'buffer match found based on numpy dtype'") - codewriter.putln(self.match) - codewriter.putln("break") - codewriter.dedent() - - def _buffer_parse_format_string_check(self, pyx_code, decl_code, - specialized_type, env): - """ - For each specialized type, try to coerce the object to a memoryview - slice of that type. This means obtaining a buffer and parsing the - format string. - TODO: separate buffer acquisition from format parsing - """ - dtype = specialized_type.dtype - if specialized_type.is_buffer: - axes = [('direct', 'strided')] * specialized_type.ndim - else: - axes = specialized_type.axes - - memslice_type = PyrexTypes.MemoryViewSliceType(dtype, axes) - memslice_type.create_from_py_utility_code(env) - pyx_code.context.update( - coerce_from_py_func=memslice_type.from_py_function, - dtype=dtype) - decl_code.putln( - "{{memviewslice_cname}} {{coerce_from_py_func}}(object)") - - pyx_code.context.update( - specialized_type_name=specialized_type.specialization_string, - sizeof_dtype=self._sizeof_dtype(dtype)) - - pyx_code.put_chunk( - u""" - # try {{dtype}} - if itemsize == -1 or itemsize == {{sizeof_dtype}}: - memslice = {{coerce_from_py_func}}(arg) - if memslice.memview: - __PYX_XDEC_MEMVIEW(&memslice, 1) - # print 'found a match for the buffer through format parsing' - %s - break - else: - __pyx_PyErr_Clear() - """ % self.match) - - def _buffer_checks(self, buffer_types, pyx_code, decl_code, env): - """ - Generate Cython code to match objects to buffer specializations. - First try to get a numpy dtype object and match it against the individual - specializations. If that fails, try naively to coerce the object - to each specialization, which obtains the buffer each time and tries - to match the format string. - """ - from Cython.Compiler import ExprNodes - if buffer_types: - if pyx_code.indenter(u"else:"): - # The first thing to find a match in this loop breaks out of the loop - if pyx_code.indenter(u"while 1:"): - pyx_code.put_chunk( - u""" - if numpy is not None: - if isinstance(arg, numpy.ndarray): - dtype = arg.dtype - elif (__pyx_memoryview_check(arg) and - isinstance(arg.base, numpy.ndarray)): - dtype = arg.base.dtype - else: - dtype = None - - itemsize = -1 - if dtype is not None: - itemsize = dtype.itemsize - kind = ord(dtype.kind) - dtype_signed = kind == ord('i') - """) - pyx_code.indent(2) - pyx_code.named_insertion_point("numpy_dtype_checks") - self._buffer_check_numpy_dtype(pyx_code, buffer_types) - pyx_code.dedent(2) - - for specialized_type in buffer_types: - self._buffer_parse_format_string_check( - pyx_code, decl_code, specialized_type, env) - - pyx_code.putln(self.no_match) - pyx_code.putln("break") - pyx_code.dedent() - - pyx_code.dedent() - else: - pyx_code.putln("else: %s" % self.no_match) - - def _buffer_declarations(self, pyx_code, decl_code, all_buffer_types): - """ - If we have any buffer specializations, write out some variable - declarations and imports. - """ - decl_code.put_chunk( - u""" - ctypedef struct {{memviewslice_cname}}: - void *memview - - void __PYX_XDEC_MEMVIEW({{memviewslice_cname}} *, int have_gil) - bint __pyx_memoryview_check(object) - """) - - pyx_code.local_variable_declarations.put_chunk( - u""" - cdef {{memviewslice_cname}} memslice - cdef Py_ssize_t itemsize - cdef bint dtype_signed - cdef char kind - - itemsize = -1 - """) - - pyx_code.imports.put_chunk( - u""" - try: - import numpy - except ImportError: - numpy = None - """) - - seen_int_dtypes = set() - for buffer_type in all_buffer_types: - dtype = buffer_type.dtype - if dtype.is_typedef: - #decl_code.putln("ctypedef %s %s" % (dtype.resolve(), - # self._dtype_name(dtype))) - decl_code.putln('ctypedef %s %s "%s"' % (dtype.resolve(), - self._dtype_name(dtype), - dtype.declaration_code(""))) - - if buffer_type.dtype.is_int: - if str(dtype) not in seen_int_dtypes: - seen_int_dtypes.add(str(dtype)) - pyx_code.context.update(dtype_name=self._dtype_name(dtype), - dtype_type=self._dtype_type(dtype)) - pyx_code.local_variable_declarations.put_chunk( - u""" - cdef bint {{dtype_name}}_is_signed - {{dtype_name}}_is_signed = <{{dtype_type}}> -1 < 0 - """) - - def _split_fused_types(self, arg): - """ - Specialize fused types and split into normal types and buffer types. - """ - specialized_types = PyrexTypes.get_specialized_types(arg.type) - # Prefer long over int, etc - # specialized_types.sort() - seen_py_type_names = set() - normal_types, buffer_types = [], [] - for specialized_type in specialized_types: - py_type_name = specialized_type.py_type_name() - if py_type_name: - if py_type_name in seen_py_type_names: - continue - seen_py_type_names.add(py_type_name) - normal_types.append(specialized_type) - elif specialized_type.is_buffer or specialized_type.is_memoryviewslice: - buffer_types.append(specialized_type) - - return normal_types, buffer_types - - def _unpack_argument(self, pyx_code): - pyx_code.put_chunk( - u""" - # PROCESSING ARGUMENT {{arg_tuple_idx}} - if {{arg_tuple_idx}} < len(args): - arg = args[{{arg_tuple_idx}}] - elif '{{arg.name}}' in kwargs: - arg = kwargs['{{arg.name}}'] - else: - {{if arg.default:}} - arg = defaults[{{default_idx}}] - {{else}} - raise TypeError("Expected at least %d arguments" % len(args)) - {{endif}} - """) - - def make_fused_cpdef(self, orig_py_func, env, is_def): - """ - This creates the function that is indexable from Python and does - runtime dispatch based on the argument types. The function gets the - arg tuple and kwargs dict (or None) and the defaults tuple - as arguments from the Binding Fused Function's tp_call. - """ - from Cython.Compiler import TreeFragment, Code, MemoryView, UtilityCode - - # { (arg_pos, FusedType) : specialized_type } - seen_fused_types = set() - - context = { - 'memviewslice_cname': MemoryView.memviewslice_cname, - 'func_args': self.node.args, - 'n_fused': len([arg for arg in self.node.args]), - 'name': orig_py_func.entry.name, - } - - pyx_code = Code.PyxCodeWriter(context=context) - decl_code = Code.PyxCodeWriter(context=context) - decl_code.put_chunk( - u""" - cdef extern from *: - void __pyx_PyErr_Clear "PyErr_Clear" () - """) - decl_code.indent() - - pyx_code.put_chunk( - u""" - def __pyx_fused_cpdef(signatures, args, kwargs, defaults): - dest_sig = [{{for _ in range(n_fused)}}None,{{endfor}}] - - if kwargs is None: - kwargs = {} - - cdef Py_ssize_t i - - # instance check body - """) - pyx_code.indent() # indent following code to function body - pyx_code.named_insertion_point("imports") - pyx_code.named_insertion_point("local_variable_declarations") - - fused_index = 0 - default_idx = 0 - all_buffer_types = set() - for i, arg in enumerate(self.node.args): - if arg.type.is_fused and arg.type not in seen_fused_types: - seen_fused_types.add(arg.type) - - context.update( - arg_tuple_idx=i, - arg=arg, - dest_sig_idx=fused_index, - default_idx=default_idx, - ) - - normal_types, buffer_types = self._split_fused_types(arg) - self._unpack_argument(pyx_code) - self._fused_instance_checks(normal_types, pyx_code, env) - self._buffer_checks(buffer_types, pyx_code, decl_code, env) - fused_index += 1 - - all_buffer_types.update(buffer_types) - - if arg.default: - default_idx += 1 - - if all_buffer_types: - self._buffer_declarations(pyx_code, decl_code, all_buffer_types) - env.use_utility_code(Code.UtilityCode.load_cached("Import", "ImportExport.c")) - - pyx_code.put_chunk( - u""" - candidates = [] - for sig in signatures: - match_found = False - for src_type, dst_type in zip(sig.strip('()').split('|'), dest_sig): - if dst_type is not None: - if src_type == dst_type: - match_found = True - else: - match_found = False - break - - if match_found: - candidates.append(sig) - - if not candidates: - raise TypeError("No matching signature found") - elif len(candidates) > 1: - raise TypeError("Function call with ambiguous argument types") - else: - return signatures[candidates[0]] - """) - - fragment_code = pyx_code.getvalue() - # print decl_code.getvalue() - # print fragment_code - fragment = TreeFragment.TreeFragment(fragment_code, level='module') - ast = TreeFragment.SetPosTransform(self.node.pos)(fragment.root) - UtilityCode.declare_declarations_in_scope(decl_code.getvalue(), - env.global_scope()) - ast.scope = env - ast.analyse_declarations(env) - py_func = ast.stats[-1] # the DefNode - self.fragment_scope = ast.scope - - if isinstance(self.node, DefNode): - py_func.specialized_cpdefs = self.nodes[:] - else: - py_func.specialized_cpdefs = [n.py_func for n in self.nodes] - - return py_func - - def update_fused_defnode_entry(self, env): - copy_attributes = ( - 'name', 'pos', 'cname', 'func_cname', 'pyfunc_cname', - 'pymethdef_cname', 'doc', 'doc_cname', 'is_member', - 'scope' - ) - - entry = self.py_func.entry - - for attr in copy_attributes: - setattr(entry, attr, - getattr(self.orig_py_func.entry, attr)) - - self.py_func.name = self.orig_py_func.name - self.py_func.doc = self.orig_py_func.doc - - env.entries.pop('__pyx_fused_cpdef', None) - if isinstance(self.node, DefNode): - env.entries[entry.name] = entry - else: - env.entries[entry.name].as_variable = entry - - env.pyfunc_entries.append(entry) - - self.py_func.entry.fused_cfunction = self - for node in self.nodes: - if isinstance(self.node, DefNode): - node.fused_py_func = self.py_func - else: - node.py_func.fused_py_func = self.py_func - node.entry.as_variable = entry - - self.synthesize_defnodes() - self.stats.append(self.__signatures__) - - def analyse_expressions(self, env): - """ - Analyse the expressions. Take care to only evaluate default arguments - once and clone the result for all specializations - """ - for fused_compound_type in self.fused_compound_types: - for fused_type in fused_compound_type.get_fused_types(): - for specialization_type in fused_type.types: - if specialization_type.is_complex: - specialization_type.create_declaration_utility_code(env) - - if self.py_func: - self.__signatures__ = self.__signatures__.analyse_expressions(env) - self.py_func = self.py_func.analyse_expressions(env) - self.resulting_fused_function = self.resulting_fused_function.analyse_expressions(env) - self.fused_func_assignment = self.fused_func_assignment.analyse_expressions(env) - - self.defaults = defaults = [] - - for arg in self.node.args: - if arg.default: - arg.default = arg.default.analyse_expressions(env) - defaults.append(ProxyNode(arg.default)) - else: - defaults.append(None) - - for i, stat in enumerate(self.stats): - stat = self.stats[i] = stat.analyse_expressions(env) - if isinstance(stat, FuncDefNode): - for arg, default in zip(stat.args, defaults): - if default is not None: - arg.default = CloneNode(default).coerce_to(arg.type, env) - - if self.py_func: - args = [CloneNode(default) for default in defaults if default] - self.defaults_tuple = TupleNode(self.pos, args=args) - self.defaults_tuple = self.defaults_tuple.analyse_types(env, skip_children=True) - self.defaults_tuple = ProxyNode(self.defaults_tuple) - self.code_object = ProxyNode(self.specialized_pycfuncs[0].code_object) - - fused_func = self.resulting_fused_function.arg - fused_func.defaults_tuple = CloneNode(self.defaults_tuple) - fused_func.code_object = CloneNode(self.code_object) - - for i, pycfunc in enumerate(self.specialized_pycfuncs): - pycfunc.code_object = CloneNode(self.code_object) - pycfunc = self.specialized_pycfuncs[i] = pycfunc.analyse_types(env) - pycfunc.defaults_tuple = CloneNode(self.defaults_tuple) - return self - - def synthesize_defnodes(self): - """ - Create the __signatures__ dict of PyCFunctionNode specializations. - """ - if isinstance(self.nodes[0], CFuncDefNode): - nodes = [node.py_func for node in self.nodes] - else: - nodes = self.nodes - - signatures = [ - StringEncoding.EncodedString(node.specialized_signature_string) - for node in nodes] - keys = [ExprNodes.StringNode(node.pos, value=sig) - for node, sig in zip(nodes, signatures)] - values = [ExprNodes.PyCFunctionNode.from_defnode(node, True) - for node in nodes] - self.__signatures__ = ExprNodes.DictNode.from_pairs(self.pos, - zip(keys, values)) - - self.specialized_pycfuncs = values - for pycfuncnode in values: - pycfuncnode.is_specialization = True - - def generate_function_definitions(self, env, code): - if self.py_func: - self.py_func.pymethdef_required = True - self.fused_func_assignment.generate_function_definitions(env, code) - - for stat in self.stats: - if isinstance(stat, FuncDefNode) and stat.entry.used: - code.mark_pos(stat.pos) - stat.generate_function_definitions(env, code) - - def generate_execution_code(self, code): - # Note: all def function specialization are wrapped in PyCFunction - # nodes in the self.__signatures__ dictnode. - for default in self.defaults: - if default is not None: - default.generate_evaluation_code(code) - - if self.py_func: - self.defaults_tuple.generate_evaluation_code(code) - self.code_object.generate_evaluation_code(code) - - for stat in self.stats: - code.mark_pos(stat.pos) - if isinstance(stat, ExprNodes.ExprNode): - stat.generate_evaluation_code(code) - else: - stat.generate_execution_code(code) - - if self.__signatures__: - self.resulting_fused_function.generate_evaluation_code(code) - - code.putln( - "((__pyx_FusedFunctionObject *) %s)->__signatures__ = %s;" % - (self.resulting_fused_function.result(), - self.__signatures__.result())) - code.put_giveref(self.__signatures__.result()) - - self.fused_func_assignment.generate_execution_code(code) - - # Dispose of results - self.resulting_fused_function.generate_disposal_code(code) - self.defaults_tuple.generate_disposal_code(code) - self.code_object.generate_disposal_code(code) - - for default in self.defaults: - if default is not None: - default.generate_disposal_code(code) - - def annotate(self, code): - for stat in self.stats: - stat.annotate(code) diff --git a/third_party/cython/src/Cython/Compiler/Future.py b/third_party/cython/src/Cython/Compiler/Future.py deleted file mode 100644 index 671ccd1330091..0000000000000 --- a/third_party/cython/src/Cython/Compiler/Future.py +++ /dev/null @@ -1,14 +0,0 @@ -def _get_feature(name): - import __future__ - # fall back to a unique fake object for earlier Python versions or Python 3 - return getattr(__future__, name, object()) - -unicode_literals = _get_feature("unicode_literals") -with_statement = _get_feature("with_statement") -division = _get_feature("division") -print_function = _get_feature("print_function") -absolute_import = _get_feature("absolute_import") -nested_scopes = _get_feature("nested_scopes") # dummy -generators = _get_feature("generators") # dummy - -del _get_feature diff --git a/third_party/cython/src/Cython/Compiler/Interpreter.py b/third_party/cython/src/Cython/Compiler/Interpreter.py deleted file mode 100644 index da3d1a0a57714..0000000000000 --- a/third_party/cython/src/Cython/Compiler/Interpreter.py +++ /dev/null @@ -1,62 +0,0 @@ -""" -This module deals with interpreting the parse tree as Python -would have done, in the compiler. - -For now this only covers parse tree to value conversion of -compile-time values. -""" - -from Nodes import * -from ExprNodes import * -from Errors import CompileError - - -class EmptyScope(object): - def lookup(self, name): - return None - -empty_scope = EmptyScope() - -def interpret_compiletime_options(optlist, optdict, type_env=None, type_args=()): - """ - Tries to interpret a list of compile time option nodes. - The result will be a tuple (optlist, optdict) but where - all expression nodes have been interpreted. The result is - in the form of tuples (value, pos). - - optlist is a list of nodes, while optdict is a DictNode (the - result optdict is a dict) - - If type_env is set, all type nodes will be analysed and the resulting - type set. Otherwise only interpretateable ExprNodes - are allowed, other nodes raises errors. - - A CompileError will be raised if there are problems. - """ - - def interpret(node, ix): - if ix in type_args: - if type_env: - type = node.analyse_as_type(type_env) - if not type: - raise CompileError(node.pos, "Invalid type.") - return (type, node.pos) - else: - raise CompileError(node.pos, "Type not allowed here.") - else: - if (sys.version_info[0] >=3 and - isinstance(node, StringNode) and - node.unicode_value is not None): - return (node.unicode_value, node.pos) - return (node.compile_time_value(empty_scope), node.pos) - - if optlist: - optlist = [interpret(x, ix) for ix, x in enumerate(optlist)] - if optdict: - assert isinstance(optdict, DictNode) - new_optdict = {} - for item in optdict.key_value_pairs: - new_key, dummy = interpret(item.key, None) - new_optdict[new_key] = interpret(item.value, item.key.value) - optdict = new_optdict - return (optlist, new_optdict) diff --git a/third_party/cython/src/Cython/Compiler/Lexicon.py b/third_party/cython/src/Cython/Compiler/Lexicon.py deleted file mode 100644 index 51fd9ccf25292..0000000000000 --- a/third_party/cython/src/Cython/Compiler/Lexicon.py +++ /dev/null @@ -1,134 +0,0 @@ -# cython: language_level=3, py2_import=True -# -# Cython Scanner - Lexical Definitions -# - -raw_prefixes = "rR" -bytes_prefixes = "bB" -string_prefixes = "uU" + bytes_prefixes -char_prefixes = "cC" -any_string_prefix = raw_prefixes + string_prefixes + char_prefixes -IDENT = 'IDENT' - -def make_lexicon(): - from Cython.Plex import \ - Str, Any, AnyBut, AnyChar, Rep, Rep1, Opt, Bol, Eol, Eof, \ - TEXT, IGNORE, State, Lexicon - from Scanning import Method - - letter = Any("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_") - digit = Any("0123456789") - bindigit = Any("01") - octdigit = Any("01234567") - hexdigit = Any("0123456789ABCDEFabcdef") - indentation = Bol + Rep(Any(" \t")) - - decimal = Rep1(digit) - dot = Str(".") - exponent = Any("Ee") + Opt(Any("+-")) + decimal - decimal_fract = (decimal + dot + Opt(decimal)) | (dot + decimal) - - name = letter + Rep(letter | digit) - intconst = decimal | (Str("0") + ((Any("Xx") + Rep1(hexdigit)) | - (Any("Oo") + Rep1(octdigit)) | - (Any("Bb") + Rep1(bindigit)) )) - intsuffix = (Opt(Any("Uu")) + Opt(Any("Ll")) + Opt(Any("Ll"))) | (Opt(Any("Ll")) + Opt(Any("Ll")) + Opt(Any("Uu"))) - intliteral = intconst + intsuffix - fltconst = (decimal_fract + Opt(exponent)) | (decimal + exponent) - imagconst = (intconst | fltconst) + Any("jJ") - - beginstring = Opt(Any(string_prefixes) + Opt(Any(raw_prefixes)) | - Any(raw_prefixes) + Opt(Any(bytes_prefixes)) | - Any(char_prefixes) - ) + (Str("'") | Str('"') | Str("'''") | Str('"""')) - two_oct = octdigit + octdigit - three_oct = octdigit + octdigit + octdigit - two_hex = hexdigit + hexdigit - four_hex = two_hex + two_hex - escapeseq = Str("\\") + (two_oct | three_oct | - Str('N{') + Rep(AnyBut('}')) + Str('}') | - Str('u') + four_hex | Str('x') + two_hex | - Str('U') + four_hex + four_hex | AnyChar) - - deco = Str("@") - bra = Any("([{") - ket = Any(")]}") - punct = Any(":,;+-*/|&<>=.%`~^?!") - diphthong = Str("==", "<>", "!=", "<=", ">=", "<<", ">>", "**", "//", - "+=", "-=", "*=", "/=", "%=", "|=", "^=", "&=", - "<<=", ">>=", "**=", "//=", "->") - spaces = Rep1(Any(" \t\f")) - escaped_newline = Str("\\\n") - lineterm = Eol + Opt(Str("\n")) - - comment = Str("#") + Rep(AnyBut("\n")) - - return Lexicon([ - (name, IDENT), - (intliteral, 'INT'), - (fltconst, 'FLOAT'), - (imagconst, 'IMAG'), - (deco, 'DECORATOR'), - (punct | diphthong, TEXT), - - (bra, Method('open_bracket_action')), - (ket, Method('close_bracket_action')), - (lineterm, Method('newline_action')), - - (beginstring, Method('begin_string_action')), - - (comment, IGNORE), - (spaces, IGNORE), - (escaped_newline, IGNORE), - - State('INDENT', [ - (comment + lineterm, Method('commentline')), - (Opt(spaces) + Opt(comment) + lineterm, IGNORE), - (indentation, Method('indentation_action')), - (Eof, Method('eof_action')) - ]), - - State('SQ_STRING', [ - (escapeseq, 'ESCAPE'), - (Rep1(AnyBut("'\"\n\\")), 'CHARS'), - (Str('"'), 'CHARS'), - (Str("\n"), Method('unclosed_string_action')), - (Str("'"), Method('end_string_action')), - (Eof, 'EOF') - ]), - - State('DQ_STRING', [ - (escapeseq, 'ESCAPE'), - (Rep1(AnyBut('"\n\\')), 'CHARS'), - (Str("'"), 'CHARS'), - (Str("\n"), Method('unclosed_string_action')), - (Str('"'), Method('end_string_action')), - (Eof, 'EOF') - ]), - - State('TSQ_STRING', [ - (escapeseq, 'ESCAPE'), - (Rep1(AnyBut("'\"\n\\")), 'CHARS'), - (Any("'\""), 'CHARS'), - (Str("\n"), 'NEWLINE'), - (Str("'''"), Method('end_string_action')), - (Eof, 'EOF') - ]), - - State('TDQ_STRING', [ - (escapeseq, 'ESCAPE'), - (Rep1(AnyBut('"\'\n\\')), 'CHARS'), - (Any("'\""), 'CHARS'), - (Str("\n"), 'NEWLINE'), - (Str('"""'), Method('end_string_action')), - (Eof, 'EOF') - ]), - - (Eof, Method('eof_action')) - ], - - # FIXME: Plex 1.9 needs different args here from Plex 1.1.4 - #debug_flags = scanner_debug_flags, - #debug_file = scanner_dump_file - ) - diff --git a/third_party/cython/src/Cython/Compiler/Main.py b/third_party/cython/src/Cython/Compiler/Main.py deleted file mode 100644 index 727fe9bb521af..0000000000000 --- a/third_party/cython/src/Cython/Compiler/Main.py +++ /dev/null @@ -1,672 +0,0 @@ -# -# Cython Top Level -# - -import os, sys, re, codecs -if sys.version_info[:2] < (2, 4): - sys.stderr.write("Sorry, Cython requires Python 2.4 or later\n") - sys.exit(1) - -import Errors -# Do not import Parsing here, import it when needed, because Parsing imports -# Nodes, which globally needs debug command line options initialized to set a -# conditional metaclass. These options are processed by CmdLine called from -# main() in this file. -# import Parsing -import Version -from Scanning import PyrexScanner, FileSourceDescriptor -from Errors import PyrexError, CompileError, error, warning -from Symtab import ModuleScope -from Cython import Utils -import Options - -module_name_pattern = re.compile(r"[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*$") - -verbose = 0 - -class CompilationData(object): - # Bundles the information that is passed from transform to transform. - # (For now, this is only) - - # While Context contains every pxd ever loaded, path information etc., - # this only contains the data related to a single compilation pass - # - # pyx ModuleNode Main code tree of this compilation. - # pxds {string : ModuleNode} Trees for the pxds used in the pyx. - # codewriter CCodeWriter Where to output final code. - # options CompilationOptions - # result CompilationResult - pass - -class Context(object): - # This class encapsulates the context needed for compiling - # one or more Cython implementation files along with their - # associated and imported declaration files. It includes - # the root of the module import namespace and the list - # of directories to search for include files. - # - # modules {string : ModuleScope} - # include_directories [string] - # future_directives [object] - # language_level int currently 2 or 3 for Python 2/3 - - cython_scope = None - - def __init__(self, include_directories, compiler_directives, cpp=False, - language_level=2, options=None, create_testscope=True): - # cython_scope is a hack, set to False by subclasses, in order to break - # an infinite loop. - # Better code organization would fix it. - - import Builtin, CythonScope - self.modules = {"__builtin__" : Builtin.builtin_scope} - self.cython_scope = CythonScope.create_cython_scope(self) - self.modules["cython"] = self.cython_scope - self.include_directories = include_directories - self.future_directives = set() - self.compiler_directives = compiler_directives - self.cpp = cpp - self.options = options - - self.pxds = {} # full name -> node tree - - standard_include_path = os.path.abspath(os.path.normpath( - os.path.join(os.path.dirname(__file__), os.path.pardir, 'Includes'))) - self.include_directories = include_directories + [standard_include_path] - - self.set_language_level(language_level) - - self.gdb_debug_outputwriter = None - - def set_language_level(self, level): - self.language_level = level - if level >= 3: - from Future import print_function, unicode_literals, absolute_import - self.future_directives.update([print_function, unicode_literals, absolute_import]) - self.modules['builtins'] = self.modules['__builtin__'] - - # pipeline creation functions can now be found in Pipeline.py - - def process_pxd(self, source_desc, scope, module_name): - import Pipeline - if isinstance(source_desc, FileSourceDescriptor) and source_desc._file_type == 'pyx': - source = CompilationSource(source_desc, module_name, os.getcwd()) - result_sink = create_default_resultobj(source, self.options) - pipeline = Pipeline.create_pyx_as_pxd_pipeline(self, result_sink) - result = Pipeline.run_pipeline(pipeline, source) - else: - pipeline = Pipeline.create_pxd_pipeline(self, scope, module_name) - result = Pipeline.run_pipeline(pipeline, source_desc) - return result - - def nonfatal_error(self, exc): - return Errors.report_error(exc) - - def find_module(self, module_name, - relative_to = None, pos = None, need_pxd = 1, check_module_name = True): - # Finds and returns the module scope corresponding to - # the given relative or absolute module name. If this - # is the first time the module has been requested, finds - # the corresponding .pxd file and process it. - # If relative_to is not None, it must be a module scope, - # and the module will first be searched for relative to - # that module, provided its name is not a dotted name. - debug_find_module = 0 - if debug_find_module: - print("Context.find_module: module_name = %s, relative_to = %s, pos = %s, need_pxd = %s" % ( - module_name, relative_to, pos, need_pxd)) - - scope = None - pxd_pathname = None - if check_module_name and not module_name_pattern.match(module_name): - if pos is None: - pos = (module_name, 0, 0) - raise CompileError(pos, - "'%s' is not a valid module name" % module_name) - if "." not in module_name and relative_to: - if debug_find_module: - print("...trying relative import") - scope = relative_to.lookup_submodule(module_name) - if not scope: - qualified_name = relative_to.qualify_name(module_name) - pxd_pathname = self.find_pxd_file(qualified_name, pos) - if pxd_pathname: - scope = relative_to.find_submodule(module_name) - if not scope: - if debug_find_module: - print("...trying absolute import") - scope = self - for name in module_name.split("."): - scope = scope.find_submodule(name) - if debug_find_module: - print("...scope =", scope) - if not scope.pxd_file_loaded: - if debug_find_module: - print("...pxd not loaded") - scope.pxd_file_loaded = 1 - if not pxd_pathname: - if debug_find_module: - print("...looking for pxd file") - pxd_pathname = self.find_pxd_file(module_name, pos) - if debug_find_module: - print("......found ", pxd_pathname) - if not pxd_pathname and need_pxd: - package_pathname = self.search_include_directories(module_name, ".py", pos) - if package_pathname and package_pathname.endswith('__init__.py'): - pass - else: - error(pos, "'%s.pxd' not found" % module_name) - if pxd_pathname: - try: - if debug_find_module: - print("Context.find_module: Parsing %s" % pxd_pathname) - rel_path = module_name.replace('.', os.sep) + os.path.splitext(pxd_pathname)[1] - if not pxd_pathname.endswith(rel_path): - rel_path = pxd_pathname # safety measure to prevent printing incorrect paths - source_desc = FileSourceDescriptor(pxd_pathname, rel_path) - err, result = self.process_pxd(source_desc, scope, module_name) - if err: - raise err - (pxd_codenodes, pxd_scope) = result - self.pxds[module_name] = (pxd_codenodes, pxd_scope) - except CompileError: - pass - return scope - - def find_pxd_file(self, qualified_name, pos): - # Search include path for the .pxd file corresponding to the - # given fully-qualified module name. - # Will find either a dotted filename or a file in a - # package directory. If a source file position is given, - # the directory containing the source file is searched first - # for a dotted filename, and its containing package root - # directory is searched first for a non-dotted filename. - pxd = self.search_include_directories(qualified_name, ".pxd", pos, sys_path=True) - if pxd is None: # XXX Keep this until Includes/Deprecated is removed - if (qualified_name.startswith('python') or - qualified_name in ('stdlib', 'stdio', 'stl')): - standard_include_path = os.path.abspath(os.path.normpath( - os.path.join(os.path.dirname(__file__), os.path.pardir, 'Includes'))) - deprecated_include_path = os.path.join(standard_include_path, 'Deprecated') - self.include_directories.append(deprecated_include_path) - try: - pxd = self.search_include_directories(qualified_name, ".pxd", pos) - finally: - self.include_directories.pop() - if pxd: - name = qualified_name - if name.startswith('python'): - warning(pos, "'%s' is deprecated, use 'cpython'" % name, 1) - elif name in ('stdlib', 'stdio'): - warning(pos, "'%s' is deprecated, use 'libc.%s'" % (name, name), 1) - elif name in ('stl'): - warning(pos, "'%s' is deprecated, use 'libcpp.*.*'" % name, 1) - if pxd is None and Options.cimport_from_pyx: - return self.find_pyx_file(qualified_name, pos) - return pxd - - def find_pyx_file(self, qualified_name, pos): - # Search include path for the .pyx file corresponding to the - # given fully-qualified module name, as for find_pxd_file(). - return self.search_include_directories(qualified_name, ".pyx", pos) - - def find_include_file(self, filename, pos): - # Search list of include directories for filename. - # Reports an error and returns None if not found. - path = self.search_include_directories(filename, "", pos, - include=True) - if not path: - error(pos, "'%s' not found" % filename) - return path - - def search_include_directories(self, qualified_name, suffix, pos, - include=False, sys_path=False): - return Utils.search_include_directories( - tuple(self.include_directories), qualified_name, suffix, pos, include, sys_path) - - def find_root_package_dir(self, file_path): - return Utils.find_root_package_dir(file_path) - - def check_package_dir(self, dir, package_names): - return Utils.check_package_dir(dir, tuple(package_names)) - - def c_file_out_of_date(self, source_path): - c_path = Utils.replace_suffix(source_path, ".c") - if not os.path.exists(c_path): - return 1 - c_time = Utils.modification_time(c_path) - if Utils.file_newer_than(source_path, c_time): - return 1 - pos = [source_path] - pxd_path = Utils.replace_suffix(source_path, ".pxd") - if os.path.exists(pxd_path) and Utils.file_newer_than(pxd_path, c_time): - return 1 - for kind, name in self.read_dependency_file(source_path): - if kind == "cimport": - dep_path = self.find_pxd_file(name, pos) - elif kind == "include": - dep_path = self.search_include_directories(name, pos) - else: - continue - if dep_path and Utils.file_newer_than(dep_path, c_time): - return 1 - return 0 - - def find_cimported_module_names(self, source_path): - return [ name for kind, name in self.read_dependency_file(source_path) - if kind == "cimport" ] - - def is_package_dir(self, dir_path): - return Utils.is_package_dir(dir_path) - - def read_dependency_file(self, source_path): - dep_path = Utils.replace_suffix(source_path, ".dep") - if os.path.exists(dep_path): - f = open(dep_path, "rU") - chunks = [ line.strip().split(" ", 1) - for line in f.readlines() - if " " in line.strip() ] - f.close() - return chunks - else: - return () - - def lookup_submodule(self, name): - # Look up a top-level module. Returns None if not found. - return self.modules.get(name, None) - - def find_submodule(self, name): - # Find a top-level module, creating a new one if needed. - scope = self.lookup_submodule(name) - if not scope: - scope = ModuleScope(name, - parent_module = None, context = self) - self.modules[name] = scope - return scope - - def parse(self, source_desc, scope, pxd, full_module_name): - if not isinstance(source_desc, FileSourceDescriptor): - raise RuntimeError("Only file sources for code supported") - source_filename = source_desc.filename - scope.cpp = self.cpp - # Parse the given source file and return a parse tree. - num_errors = Errors.num_errors - try: - f = Utils.open_source_file(source_filename, "rU") - try: - import Parsing - s = PyrexScanner(f, source_desc, source_encoding = f.encoding, - scope = scope, context = self) - tree = Parsing.p_module(s, pxd, full_module_name) - finally: - f.close() - except UnicodeDecodeError, e: - #import traceback - #traceback.print_exc() - line = 1 - column = 0 - msg = e.args[-1] - position = e.args[2] - encoding = e.args[0] - - f = open(source_filename, "rb") - try: - byte_data = f.read() - finally: - f.close() - - # FIXME: make this at least a little less inefficient - for idx, c in enumerate(byte_data): - if c in (ord('\n'), '\n'): - line += 1 - column = 0 - if idx == position: - break - - column += 1 - - error((source_desc, line, column), - "Decoding error, missing or incorrect coding= " - "at top of source (cannot decode with encoding %r: %s)" % (encoding, msg)) - - if Errors.num_errors > num_errors: - raise CompileError() - return tree - - def extract_module_name(self, path, options): - # Find fully_qualified module name from the full pathname - # of a source file. - dir, filename = os.path.split(path) - module_name, _ = os.path.splitext(filename) - if "." in module_name: - return module_name - names = [module_name] - while self.is_package_dir(dir): - parent, package_name = os.path.split(dir) - if parent == dir: - break - names.append(package_name) - dir = parent - names.reverse() - return ".".join(names) - - def setup_errors(self, options, result): - Errors.reset() # clear any remaining error state - if options.use_listing_file: - result.listing_file = Utils.replace_suffix(source, ".lis") - path = result.listing_file - else: - path = None - Errors.open_listing_file(path=path, - echo_to_stderr=options.errors_to_stderr) - - def teardown_errors(self, err, options, result): - source_desc = result.compilation_source.source_desc - if not isinstance(source_desc, FileSourceDescriptor): - raise RuntimeError("Only file sources for code supported") - Errors.close_listing_file() - result.num_errors = Errors.num_errors - if result.num_errors > 0: - err = True - if err and result.c_file: - try: - Utils.castrate_file(result.c_file, os.stat(source_desc.filename)) - except EnvironmentError: - pass - result.c_file = None - -def create_default_resultobj(compilation_source, options): - result = CompilationResult() - result.main_source_file = compilation_source.source_desc.filename - result.compilation_source = compilation_source - source_desc = compilation_source.source_desc - if options.output_file: - result.c_file = os.path.join(compilation_source.cwd, options.output_file) - else: - if options.cplus: - c_suffix = ".cpp" - else: - c_suffix = ".c" - result.c_file = Utils.replace_suffix(source_desc.filename, c_suffix) - return result - -def run_pipeline(source, options, full_module_name=None, context=None): - import Pipeline - - source_ext = os.path.splitext(source)[1] - options.configure_language_defaults(source_ext[1:]) # py/pyx - if context is None: - context = options.create_context() - - # Set up source object - cwd = os.getcwd() - abs_path = os.path.abspath(source) - full_module_name = full_module_name or context.extract_module_name(source, options) - - if options.relative_path_in_code_position_comments: - rel_path = full_module_name.replace('.', os.sep) + source_ext - if not abs_path.endswith(rel_path): - rel_path = source # safety measure to prevent printing incorrect paths - else: - rel_path = abs_path - source_desc = FileSourceDescriptor(abs_path, rel_path) - source = CompilationSource(source_desc, full_module_name, cwd) - - # Set up result object - result = create_default_resultobj(source, options) - - if options.annotate is None: - # By default, decide based on whether an html file already exists. - html_filename = os.path.splitext(result.c_file)[0] + ".html" - if os.path.exists(html_filename): - line = codecs.open(html_filename, "r", encoding="UTF-8").readline() - if line.startswith(u' State %d\n" % (key, state['number'])) - for key in ('bol', 'eol', 'eof', 'else'): - state = special_to_state.get(key, None) - if state: - file.write(" %s --> State %d\n" % (key, state['number'])) - - def chars_to_ranges(self, char_list): - char_list.sort() - i = 0 - n = len(char_list) - result = [] - while i < n: - c1 = ord(char_list[i]) - c2 = c1 - i = i + 1 - while i < n and ord(char_list[i]) == c2 + 1: - i = i + 1 - c2 = c2 + 1 - result.append((chr(c1), chr(c2))) - return tuple(result) - - def ranges_to_string(self, range_list): - return ','.join(map(self.range_to_string, range_list)) - - def range_to_string(self, range_tuple): - (c1, c2) = range_tuple - if c1 == c2: - return repr(c1) - else: - return "%s..%s" % (repr(c1), repr(c2)) diff --git a/third_party/cython/src/Cython/Plex/Regexps.py b/third_party/cython/src/Cython/Plex/Regexps.py deleted file mode 100644 index 2b2844f162bdf..0000000000000 --- a/third_party/cython/src/Cython/Plex/Regexps.py +++ /dev/null @@ -1,555 +0,0 @@ -#======================================================================= -# -# Python Lexical Analyser -# -# Regular Expressions -# -#======================================================================= - -import types -from sys import maxint as maxint - -import Errors - -# -# Constants -# - -BOL = 'bol' -EOL = 'eol' -EOF = 'eof' - -nl_code = ord('\n') - -# -# Helper functions -# - -def chars_to_ranges(s): - """ - Return a list of character codes consisting of pairs - [code1a, code1b, code2a, code2b,...] which cover all - the characters in |s|. - """ - char_list = list(s) - char_list.sort() - i = 0 - n = len(char_list) - result = [] - while i < n: - code1 = ord(char_list[i]) - code2 = code1 + 1 - i = i + 1 - while i < n and code2 >= ord(char_list[i]): - code2 = code2 + 1 - i = i + 1 - result.append(code1) - result.append(code2) - return result - -def uppercase_range(code1, code2): - """ - If the range of characters from code1 to code2-1 includes any - lower case letters, return the corresponding upper case range. - """ - code3 = max(code1, ord('a')) - code4 = min(code2, ord('z') + 1) - if code3 < code4: - d = ord('A') - ord('a') - return (code3 + d, code4 + d) - else: - return None - -def lowercase_range(code1, code2): - """ - If the range of characters from code1 to code2-1 includes any - upper case letters, return the corresponding lower case range. - """ - code3 = max(code1, ord('A')) - code4 = min(code2, ord('Z') + 1) - if code3 < code4: - d = ord('a') - ord('A') - return (code3 + d, code4 + d) - else: - return None - -def CodeRanges(code_list): - """ - Given a list of codes as returned by chars_to_ranges, return - an RE which will match a character in any of the ranges. - """ - re_list = [] - for i in xrange(0, len(code_list), 2): - re_list.append(CodeRange(code_list[i], code_list[i + 1])) - return Alt(*re_list) - -def CodeRange(code1, code2): - """ - CodeRange(code1, code2) is an RE which matches any character - with a code |c| in the range |code1| <= |c| < |code2|. - """ - if code1 <= nl_code < code2: - return Alt(RawCodeRange(code1, nl_code), - RawNewline, - RawCodeRange(nl_code + 1, code2)) - else: - return RawCodeRange(code1, code2) - -# -# Abstract classes -# - -class RE(object): - """RE is the base class for regular expression constructors. - The following operators are defined on REs: - - re1 + re2 is an RE which matches |re1| followed by |re2| - re1 | re2 is an RE which matches either |re1| or |re2| - """ - - nullable = 1 # True if this RE can match 0 input symbols - match_nl = 1 # True if this RE can match a string ending with '\n' - str = None # Set to a string to override the class's __str__ result - - def build_machine(self, machine, initial_state, final_state, - match_bol, nocase): - """ - This method should add states to |machine| to implement this - RE, starting at |initial_state| and ending at |final_state|. - If |match_bol| is true, the RE must be able to match at the - beginning of a line. If nocase is true, upper and lower case - letters should be treated as equivalent. - """ - raise NotImplementedError("%s.build_machine not implemented" % - self.__class__.__name__) - - def build_opt(self, m, initial_state, c): - """ - Given a state |s| of machine |m|, return a new state - reachable from |s| on character |c| or epsilon. - """ - s = m.new_state() - initial_state.link_to(s) - initial_state.add_transition(c, s) - return s - - def __add__(self, other): - return Seq(self, other) - - def __or__(self, other): - return Alt(self, other) - - def __str__(self): - if self.str: - return self.str - else: - return self.calc_str() - - def check_re(self, num, value): - if not isinstance(value, RE): - self.wrong_type(num, value, "Plex.RE instance") - - def check_string(self, num, value): - if type(value) != type(''): - self.wrong_type(num, value, "string") - - def check_char(self, num, value): - self.check_string(num, value) - if len(value) != 1: - raise Errors.PlexValueError("Invalid value for argument %d of Plex.%s." - "Expected a string of length 1, got: %s" % ( - num, self.__class__.__name__, repr(value))) - - def wrong_type(self, num, value, expected): - if type(value) == types.InstanceType: - got = "%s.%s instance" % ( - value.__class__.__module__, value.__class__.__name__) - else: - got = type(value).__name__ - raise Errors.PlexTypeError("Invalid type for argument %d of Plex.%s " - "(expected %s, got %s" % ( - num, self.__class__.__name__, expected, got)) - -# -# Primitive RE constructors -# ------------------------- -# -# These are the basic REs from which all others are built. -# - -## class Char(RE): -## """ -## Char(c) is an RE which matches the character |c|. -## """ - -## nullable = 0 - -## def __init__(self, char): -## self.char = char -## self.match_nl = char == '\n' - -## def build_machine(self, m, initial_state, final_state, match_bol, nocase): -## c = self.char -## if match_bol and c != BOL: -## s1 = self.build_opt(m, initial_state, BOL) -## else: -## s1 = initial_state -## if c == '\n' or c == EOF: -## s1 = self.build_opt(m, s1, EOL) -## if len(c) == 1: -## code = ord(self.char) -## s1.add_transition((code, code+1), final_state) -## if nocase and is_letter_code(code): -## code2 = other_case_code(code) -## s1.add_transition((code2, code2+1), final_state) -## else: -## s1.add_transition(c, final_state) - -## def calc_str(self): -## return "Char(%s)" % repr(self.char) - -def Char(c): - """ - Char(c) is an RE which matches the character |c|. - """ - if len(c) == 1: - result = CodeRange(ord(c), ord(c) + 1) - else: - result = SpecialSymbol(c) - result.str = "Char(%s)" % repr(c) - return result - -class RawCodeRange(RE): - """ - RawCodeRange(code1, code2) is a low-level RE which matches any character - with a code |c| in the range |code1| <= |c| < |code2|, where the range - does not include newline. For internal use only. - """ - nullable = 0 - match_nl = 0 - range = None # (code, code) - uppercase_range = None # (code, code) or None - lowercase_range = None # (code, code) or None - - def __init__(self, code1, code2): - self.range = (code1, code2) - self.uppercase_range = uppercase_range(code1, code2) - self.lowercase_range = lowercase_range(code1, code2) - - def build_machine(self, m, initial_state, final_state, match_bol, nocase): - if match_bol: - initial_state = self.build_opt(m, initial_state, BOL) - initial_state.add_transition(self.range, final_state) - if nocase: - if self.uppercase_range: - initial_state.add_transition(self.uppercase_range, final_state) - if self.lowercase_range: - initial_state.add_transition(self.lowercase_range, final_state) - - def calc_str(self): - return "CodeRange(%d,%d)" % (self.code1, self.code2) - -class _RawNewline(RE): - """ - RawNewline is a low-level RE which matches a newline character. - For internal use only. - """ - nullable = 0 - match_nl = 1 - - def build_machine(self, m, initial_state, final_state, match_bol, nocase): - if match_bol: - initial_state = self.build_opt(m, initial_state, BOL) - s = self.build_opt(m, initial_state, EOL) - s.add_transition((nl_code, nl_code + 1), final_state) - -RawNewline = _RawNewline() - - -class SpecialSymbol(RE): - """ - SpecialSymbol(sym) is an RE which matches the special input - symbol |sym|, which is one of BOL, EOL or EOF. - """ - nullable = 0 - match_nl = 0 - sym = None - - def __init__(self, sym): - self.sym = sym - - def build_machine(self, m, initial_state, final_state, match_bol, nocase): - # Sequences 'bol bol' and 'bol eof' are impossible, so only need - # to allow for bol if sym is eol - if match_bol and self.sym == EOL: - initial_state = self.build_opt(m, initial_state, BOL) - initial_state.add_transition(self.sym, final_state) - - -class Seq(RE): - """Seq(re1, re2, re3...) is an RE which matches |re1| followed by - |re2| followed by |re3|...""" - - def __init__(self, *re_list): - nullable = 1 - for i in xrange(len(re_list)): - re = re_list[i] - self.check_re(i, re) - nullable = nullable and re.nullable - self.re_list = re_list - self.nullable = nullable - i = len(re_list) - match_nl = 0 - while i: - i = i - 1 - re = re_list[i] - if re.match_nl: - match_nl = 1 - break - if not re.nullable: - break - self.match_nl = match_nl - - def build_machine(self, m, initial_state, final_state, match_bol, nocase): - re_list = self.re_list - if len(re_list) == 0: - initial_state.link_to(final_state) - else: - s1 = initial_state - n = len(re_list) - for i in xrange(n): - if i < n - 1: - s2 = m.new_state() - else: - s2 = final_state - re = re_list[i] - re.build_machine(m, s1, s2, match_bol, nocase) - s1 = s2 - match_bol = re.match_nl or (match_bol and re.nullable) - - def calc_str(self): - return "Seq(%s)" % ','.join(map(str, self.re_list)) - - -class Alt(RE): - """Alt(re1, re2, re3...) is an RE which matches either |re1| or - |re2| or |re3|...""" - - def __init__(self, *re_list): - self.re_list = re_list - nullable = 0 - match_nl = 0 - nullable_res = [] - non_nullable_res = [] - i = 1 - for re in re_list: - self.check_re(i, re) - if re.nullable: - nullable_res.append(re) - nullable = 1 - else: - non_nullable_res.append(re) - if re.match_nl: - match_nl = 1 - i = i + 1 - self.nullable_res = nullable_res - self.non_nullable_res = non_nullable_res - self.nullable = nullable - self.match_nl = match_nl - - def build_machine(self, m, initial_state, final_state, match_bol, nocase): - for re in self.nullable_res: - re.build_machine(m, initial_state, final_state, match_bol, nocase) - if self.non_nullable_res: - if match_bol: - initial_state = self.build_opt(m, initial_state, BOL) - for re in self.non_nullable_res: - re.build_machine(m, initial_state, final_state, 0, nocase) - - def calc_str(self): - return "Alt(%s)" % ','.join(map(str, self.re_list)) - - -class Rep1(RE): - """Rep1(re) is an RE which matches one or more repetitions of |re|.""" - - def __init__(self, re): - self.check_re(1, re) - self.re = re - self.nullable = re.nullable - self.match_nl = re.match_nl - - def build_machine(self, m, initial_state, final_state, match_bol, nocase): - s1 = m.new_state() - s2 = m.new_state() - initial_state.link_to(s1) - self.re.build_machine(m, s1, s2, match_bol or self.re.match_nl, nocase) - s2.link_to(s1) - s2.link_to(final_state) - - def calc_str(self): - return "Rep1(%s)" % self.re - - -class SwitchCase(RE): - """ - SwitchCase(re, nocase) is an RE which matches the same strings as RE, - but treating upper and lower case letters according to |nocase|. If - |nocase| is true, case is ignored, otherwise it is not. - """ - re = None - nocase = None - - def __init__(self, re, nocase): - self.re = re - self.nocase = nocase - self.nullable = re.nullable - self.match_nl = re.match_nl - - def build_machine(self, m, initial_state, final_state, match_bol, nocase): - self.re.build_machine(m, initial_state, final_state, match_bol, - self.nocase) - - def calc_str(self): - if self.nocase: - name = "NoCase" - else: - name = "Case" - return "%s(%s)" % (name, self.re) - -# -# Composite RE constructors -# ------------------------- -# -# These REs are defined in terms of the primitive REs. -# - -Empty = Seq() -Empty.__doc__ = \ - """ - Empty is an RE which matches the empty string. - """ -Empty.str = "Empty" - -def Str1(s): - """ - Str1(s) is an RE which matches the literal string |s|. - """ - result = Seq(*tuple(map(Char, s))) - result.str = "Str(%s)" % repr(s) - return result - -def Str(*strs): - """ - Str(s) is an RE which matches the literal string |s|. - Str(s1, s2, s3, ...) is an RE which matches any of |s1| or |s2| or |s3|... - """ - if len(strs) == 1: - return Str1(strs[0]) - else: - result = Alt(*tuple(map(Str1, strs))) - result.str = "Str(%s)" % ','.join(map(repr, strs)) - return result - -def Any(s): - """ - Any(s) is an RE which matches any character in the string |s|. - """ - #result = apply(Alt, tuple(map(Char, s))) - result = CodeRanges(chars_to_ranges(s)) - result.str = "Any(%s)" % repr(s) - return result - -def AnyBut(s): - """ - AnyBut(s) is an RE which matches any character (including - newline) which is not in the string |s|. - """ - ranges = chars_to_ranges(s) - ranges.insert(0, -maxint) - ranges.append(maxint) - result = CodeRanges(ranges) - result.str = "AnyBut(%s)" % repr(s) - return result - -AnyChar = AnyBut("") -AnyChar.__doc__ = \ - """ - AnyChar is an RE which matches any single character (including a newline). - """ -AnyChar.str = "AnyChar" - -def Range(s1, s2 = None): - """ - Range(c1, c2) is an RE which matches any single character in the range - |c1| to |c2| inclusive. - Range(s) where |s| is a string of even length is an RE which matches - any single character in the ranges |s[0]| to |s[1]|, |s[2]| to |s[3]|,... - """ - if s2: - result = CodeRange(ord(s1), ord(s2) + 1) - result.str = "Range(%s,%s)" % (s1, s2) - else: - ranges = [] - for i in range(0, len(s1), 2): - ranges.append(CodeRange(ord(s1[i]), ord(s1[i+1]) + 1)) - result = Alt(*ranges) - result.str = "Range(%s)" % repr(s1) - return result - -def Opt(re): - """ - Opt(re) is an RE which matches either |re| or the empty string. - """ - result = Alt(re, Empty) - result.str = "Opt(%s)" % re - return result - -def Rep(re): - """ - Rep(re) is an RE which matches zero or more repetitions of |re|. - """ - result = Opt(Rep1(re)) - result.str = "Rep(%s)" % re - return result - -def NoCase(re): - """ - NoCase(re) is an RE which matches the same strings as RE, but treating - upper and lower case letters as equivalent. - """ - return SwitchCase(re, nocase = 1) - -def Case(re): - """ - Case(re) is an RE which matches the same strings as RE, but treating - upper and lower case letters as distinct, i.e. it cancels the effect - of any enclosing NoCase(). - """ - return SwitchCase(re, nocase = 0) - -# -# RE Constants -# - -Bol = Char(BOL) -Bol.__doc__ = \ - """ - Bol is an RE which matches the beginning of a line. - """ -Bol.str = "Bol" - -Eol = Char(EOL) -Eol.__doc__ = \ - """ - Eol is an RE which matches the end of a line. - """ -Eol.str = "Eol" - -Eof = Char(EOF) -Eof.__doc__ = \ - """ - Eof is an RE which matches the end of the file. - """ -Eof.str = "Eof" - diff --git a/third_party/cython/src/Cython/Plex/Scanners.pxd b/third_party/cython/src/Cython/Plex/Scanners.pxd deleted file mode 100644 index 1415220f0a2a6..0000000000000 --- a/third_party/cython/src/Cython/Plex/Scanners.pxd +++ /dev/null @@ -1,43 +0,0 @@ -import cython - -from Cython.Plex.Actions cimport Action - -cdef class Scanner: - - cdef public lexicon - cdef public stream - cdef public name - cdef public unicode buffer - cdef public Py_ssize_t buf_start_pos - cdef public Py_ssize_t next_pos - cdef public Py_ssize_t cur_pos - cdef public Py_ssize_t cur_line - cdef public Py_ssize_t cur_line_start - cdef public Py_ssize_t start_pos - cdef public Py_ssize_t start_line - cdef public Py_ssize_t start_col - cdef public text - cdef public initial_state # int? - cdef public state_name - cdef public list queue - cdef public bint trace - cdef public cur_char - cdef public int input_state - - cdef public level - - @cython.locals(input_state=long) - cdef next_char(self) - @cython.locals(action=Action) - cdef tuple read(self) - cdef tuple scan_a_token(self) - cdef tuple position(self) - - @cython.locals(cur_pos=long, cur_line=long, cur_line_start=long, - input_state=long, next_pos=long, state=dict, - buf_start_pos=long, buf_len=long, buf_index=long, - trace=bint, discard=long, data=unicode, buffer=unicode) - cdef run_machine_inlined(self) - - cdef begin(self, state) - cdef produce(self, value, text = *) diff --git a/third_party/cython/src/Cython/Plex/Scanners.py b/third_party/cython/src/Cython/Plex/Scanners.py deleted file mode 100644 index 315742f309de1..0000000000000 --- a/third_party/cython/src/Cython/Plex/Scanners.py +++ /dev/null @@ -1,332 +0,0 @@ -#======================================================================= -# -# Python Lexical Analyser -# -# -# Scanning an input stream -# -#======================================================================= - -import cython -cython.declare(BOL=object, EOL=object, EOF=object, NOT_FOUND=object) - -import Errors -from Regexps import BOL, EOL, EOF - -NOT_FOUND = object() - -class Scanner(object): - """ - A Scanner is used to read tokens from a stream of characters - using the token set specified by a Plex.Lexicon. - - Constructor: - - Scanner(lexicon, stream, name = '') - - See the docstring of the __init__ method for details. - - Methods: - - See the docstrings of the individual methods for more - information. - - read() --> (value, text) - Reads the next lexical token from the stream. - - position() --> (name, line, col) - Returns the position of the last token read using the - read() method. - - begin(state_name) - Causes scanner to change state. - - produce(value [, text]) - Causes return of a token value to the caller of the - Scanner. - - """ - -# lexicon = None # Lexicon -# stream = None # file-like object -# name = '' -# buffer = '' -# buf_start_pos = 0 # position in input of start of buffer -# next_pos = 0 # position in input of next char to read -# cur_pos = 0 # position in input of current char -# cur_line = 1 # line number of current char -# cur_line_start = 0 # position in input of start of current line -# start_pos = 0 # position in input of start of token -# start_line = 0 # line number of start of token -# start_col = 0 # position in line of start of token -# text = None # text of last token read -# initial_state = None # Node -# state_name = '' # Name of initial state -# queue = None # list of tokens to be returned -# trace = 0 - - def __init__(self, lexicon, stream, name = '', initial_pos = None): - """ - Scanner(lexicon, stream, name = '') - - |lexicon| is a Plex.Lexicon instance specifying the lexical tokens - to be recognised. - - |stream| can be a file object or anything which implements a - compatible read() method. - - |name| is optional, and may be the name of the file being - scanned or any other identifying string. - """ - self.trace = 0 - - self.buffer = u'' - self.buf_start_pos = 0 - self.next_pos = 0 - self.cur_pos = 0 - self.cur_line = 1 - self.start_pos = 0 - self.start_line = 0 - self.start_col = 0 - self.text = None - self.state_name = None - - self.lexicon = lexicon - self.stream = stream - self.name = name - self.queue = [] - self.initial_state = None - self.begin('') - self.next_pos = 0 - self.cur_pos = 0 - self.cur_line_start = 0 - self.cur_char = BOL - self.input_state = 1 - if initial_pos is not None: - self.cur_line, self.cur_line_start = initial_pos[1], -initial_pos[2] - - def read(self): - """ - Read the next lexical token from the stream and return a - tuple (value, text), where |value| is the value associated with - the token as specified by the Lexicon, and |text| is the actual - string read from the stream. Returns (None, '') on end of file. - """ - queue = self.queue - while not queue: - self.text, action = self.scan_a_token() - if action is None: - self.produce(None) - self.eof() - else: - value = action.perform(self, self.text) - if value is not None: - self.produce(value) - result = queue[0] - del queue[0] - return result - - def scan_a_token(self): - """ - Read the next input sequence recognised by the machine - and return (text, action). Returns ('', None) on end of - file. - """ - self.start_pos = self.cur_pos - self.start_line = self.cur_line - self.start_col = self.cur_pos - self.cur_line_start - action = self.run_machine_inlined() - if action is not None: - if self.trace: - print("Scanner: read: Performing %s %d:%d" % ( - action, self.start_pos, self.cur_pos)) - text = self.buffer[self.start_pos - self.buf_start_pos : - self.cur_pos - self.buf_start_pos] - return (text, action) - else: - if self.cur_pos == self.start_pos: - if self.cur_char is EOL: - self.next_char() - if self.cur_char is None or self.cur_char is EOF: - return (u'', None) - raise Errors.UnrecognizedInput(self, self.state_name) - - def run_machine_inlined(self): - """ - Inlined version of run_machine for speed. - """ - state = self.initial_state - cur_pos = self.cur_pos - cur_line = self.cur_line - cur_line_start = self.cur_line_start - cur_char = self.cur_char - input_state = self.input_state - next_pos = self.next_pos - buffer = self.buffer - buf_start_pos = self.buf_start_pos - buf_len = len(buffer) - b_action, b_cur_pos, b_cur_line, b_cur_line_start, b_cur_char, b_input_state, b_next_pos = \ - None, 0, 0, 0, u'', 0, 0 - trace = self.trace - while 1: - if trace: #TRACE# - print("State %d, %d/%d:%s -->" % ( #TRACE# - state['number'], input_state, cur_pos, repr(cur_char))) #TRACE# - # Begin inlined self.save_for_backup() - #action = state.action #@slow - action = state['action'] #@fast - if action is not None: - b_action, b_cur_pos, b_cur_line, b_cur_line_start, b_cur_char, b_input_state, b_next_pos = \ - action, cur_pos, cur_line, cur_line_start, cur_char, input_state, next_pos - # End inlined self.save_for_backup() - c = cur_char - #new_state = state.new_state(c) #@slow - new_state = state.get(c, NOT_FOUND) #@fast - if new_state is NOT_FOUND: #@fast - new_state = c and state.get('else') #@fast - if new_state: - if trace: #TRACE# - print("State %d" % new_state['number']) #TRACE# - state = new_state - # Begin inlined: self.next_char() - if input_state == 1: - cur_pos = next_pos - # Begin inlined: c = self.read_char() - buf_index = next_pos - buf_start_pos - if buf_index < buf_len: - c = buffer[buf_index] - next_pos = next_pos + 1 - else: - discard = self.start_pos - buf_start_pos - data = self.stream.read(0x1000) - buffer = self.buffer[discard:] + data - self.buffer = buffer - buf_start_pos = buf_start_pos + discard - self.buf_start_pos = buf_start_pos - buf_len = len(buffer) - buf_index = buf_index - discard - if data: - c = buffer[buf_index] - next_pos = next_pos + 1 - else: - c = u'' - # End inlined: c = self.read_char() - if c == u'\n': - cur_char = EOL - input_state = 2 - elif not c: - cur_char = EOL - input_state = 4 - else: - cur_char = c - elif input_state == 2: - cur_char = u'\n' - input_state = 3 - elif input_state == 3: - cur_line = cur_line + 1 - cur_line_start = cur_pos = next_pos - cur_char = BOL - input_state = 1 - elif input_state == 4: - cur_char = EOF - input_state = 5 - else: # input_state = 5 - cur_char = u'' - # End inlined self.next_char() - else: # not new_state - if trace: #TRACE# - print("blocked") #TRACE# - # Begin inlined: action = self.back_up() - if b_action is not None: - (action, cur_pos, cur_line, cur_line_start, - cur_char, input_state, next_pos) = \ - (b_action, b_cur_pos, b_cur_line, b_cur_line_start, - b_cur_char, b_input_state, b_next_pos) - else: - action = None - break # while 1 - # End inlined: action = self.back_up() - self.cur_pos = cur_pos - self.cur_line = cur_line - self.cur_line_start = cur_line_start - self.cur_char = cur_char - self.input_state = input_state - self.next_pos = next_pos - if trace: #TRACE# - if action is not None: #TRACE# - print("Doing %s" % action) #TRACE# - return action - - def next_char(self): - input_state = self.input_state - if self.trace: - print("Scanner: next: %s [%d] %d" % (" "*20, input_state, self.cur_pos)) - if input_state == 1: - self.cur_pos = self.next_pos - c = self.read_char() - if c == u'\n': - self.cur_char = EOL - self.input_state = 2 - elif not c: - self.cur_char = EOL - self.input_state = 4 - else: - self.cur_char = c - elif input_state == 2: - self.cur_char = u'\n' - self.input_state = 3 - elif input_state == 3: - self.cur_line = self.cur_line + 1 - self.cur_line_start = self.cur_pos = self.next_pos - self.cur_char = BOL - self.input_state = 1 - elif input_state == 4: - self.cur_char = EOF - self.input_state = 5 - else: # input_state = 5 - self.cur_char = u'' - if self.trace: - print("--> [%d] %d %s" % (input_state, self.cur_pos, repr(self.cur_char))) - - def position(self): - """ - Return a tuple (name, line, col) representing the location of - the last token read using the read() method. |name| is the - name that was provided to the Scanner constructor; |line| - is the line number in the stream (1-based); |col| is the - position within the line of the first character of the token - (0-based). - """ - return (self.name, self.start_line, self.start_col) - - def get_position(self): - """Python accessible wrapper around position(), only for error reporting. - """ - return self.position() - - def begin(self, state_name): - """Set the current state of the scanner to the named state.""" - self.initial_state = ( - self.lexicon.get_initial_state(state_name)) - self.state_name = state_name - - def produce(self, value, text = None): - """ - Called from an action procedure, causes |value| to be returned - as the token value from read(). If |text| is supplied, it is - returned in place of the scanned text. - - produce() can be called more than once during a single call to an action - procedure, in which case the tokens are queued up and returned one - at a time by subsequent calls to read(), until the queue is empty, - whereupon scanning resumes. - """ - if text is None: - text = self.text - self.queue.append((value, text)) - - def eof(self): - """ - Override this method if you want something to be done at - end of file. - """ diff --git a/third_party/cython/src/Cython/Plex/Timing.py b/third_party/cython/src/Cython/Plex/Timing.py deleted file mode 100644 index f47c5c89de7bf..0000000000000 --- a/third_party/cython/src/Cython/Plex/Timing.py +++ /dev/null @@ -1,22 +0,0 @@ -# -# Get time in platform-dependent way -# - -import os -from sys import platform, exit, stderr - -if platform == 'mac': - import MacOS - def time(): - return MacOS.GetTicks() / 60.0 - timekind = "real" -elif hasattr(os, 'times'): - def time(): - t = os.times() - return t[0] + t[1] - timekind = "cpu" -else: - stderr.write( - "Don't know how to get time on platform %s\n" % repr(platform)) - exit(1) - diff --git a/third_party/cython/src/Cython/Plex/Traditional.py b/third_party/cython/src/Cython/Plex/Traditional.py deleted file mode 100644 index 6d3e48fa4a2ed..0000000000000 --- a/third_party/cython/src/Cython/Plex/Traditional.py +++ /dev/null @@ -1,154 +0,0 @@ -#======================================================================= -# -# Python Lexical Analyser -# -# Traditional Regular Expression Syntax -# -#======================================================================= - -from Regexps import Alt, Seq, Rep, Rep1, Opt, Any, AnyBut, Bol, Eol, Char -from Errors import PlexError - -class RegexpSyntaxError(PlexError): - pass - -def re(s): - """ - Convert traditional string representation of regular expression |s| - into Plex representation. - """ - return REParser(s).parse_re() - -class REParser(object): - - def __init__(self, s): - self.s = s - self.i = -1 - self.end = 0 - self.next() - - def parse_re(self): - re = self.parse_alt() - if not self.end: - self.error("Unexpected %s" % repr(self.c)) - return re - - def parse_alt(self): - """Parse a set of alternative regexps.""" - re = self.parse_seq() - if self.c == '|': - re_list = [re] - while self.c == '|': - self.next() - re_list.append(self.parse_seq()) - re = Alt(*re_list) - return re - - def parse_seq(self): - """Parse a sequence of regexps.""" - re_list = [] - while not self.end and not self.c in "|)": - re_list.append(self.parse_mod()) - return Seq(*re_list) - - def parse_mod(self): - """Parse a primitive regexp followed by *, +, ? modifiers.""" - re = self.parse_prim() - while not self.end and self.c in "*+?": - if self.c == '*': - re = Rep(re) - elif self.c == '+': - re = Rep1(re) - else: # self.c == '?' - re = Opt(re) - self.next() - return re - - def parse_prim(self): - """Parse a primitive regexp.""" - c = self.get() - if c == '.': - re = AnyBut("\n") - elif c == '^': - re = Bol - elif c == '$': - re = Eol - elif c == '(': - re = self.parse_alt() - self.expect(')') - elif c == '[': - re = self.parse_charset() - self.expect(']') - else: - if c == '\\': - c = self.get() - re = Char(c) - return re - - def parse_charset(self): - """Parse a charset. Does not include the surrounding [].""" - char_list = [] - invert = 0 - if self.c == '^': - invert = 1 - self.next() - if self.c == ']': - char_list.append(']') - self.next() - while not self.end and self.c != ']': - c1 = self.get() - if self.c == '-' and self.lookahead(1) != ']': - self.next() - c2 = self.get() - for a in xrange(ord(c1), ord(c2) + 1): - char_list.append(chr(a)) - else: - char_list.append(c1) - chars = ''.join(char_list) - if invert: - return AnyBut(chars) - else: - return Any(chars) - - def next(self): - """Advance to the next char.""" - s = self.s - i = self.i = self.i + 1 - if i < len(s): - self.c = s[i] - else: - self.c = '' - self.end = 1 - - def get(self): - if self.end: - self.error("Premature end of string") - c = self.c - self.next() - return c - - def lookahead(self, n): - """Look ahead n chars.""" - j = self.i + n - if j < len(self.s): - return self.s[j] - else: - return '' - - def expect(self, c): - """ - Expect to find character |c| at current position. - Raises an exception otherwise. - """ - if self.c == c: - self.next() - else: - self.error("Missing %s" % repr(c)) - - def error(self, mess): - """Raise exception to signal syntax error in regexp.""" - raise RegexpSyntaxError("Syntax error in regexp %s at position %d: %s" % ( - repr(self.s), self.i, mess)) - - - diff --git a/third_party/cython/src/Cython/Plex/Transitions.py b/third_party/cython/src/Cython/Plex/Transitions.py deleted file mode 100644 index af15c9aa072d7..0000000000000 --- a/third_party/cython/src/Cython/Plex/Transitions.py +++ /dev/null @@ -1,247 +0,0 @@ -# -# Plex - Transition Maps -# -# This version represents state sets direcly as dicts -# for speed. -# - -from sys import maxint as maxint - -class TransitionMap(object): - """ - A TransitionMap maps an input event to a set of states. - An input event is one of: a range of character codes, - the empty string (representing an epsilon move), or one - of the special symbols BOL, EOL, EOF. - - For characters, this implementation compactly represents - the map by means of a list: - - [code_0, states_0, code_1, states_1, code_2, states_2, - ..., code_n-1, states_n-1, code_n] - - where |code_i| is a character code, and |states_i| is a - set of states corresponding to characters with codes |c| - in the range |code_i| <= |c| <= |code_i+1|. - - The following invariants hold: - n >= 1 - code_0 == -maxint - code_n == maxint - code_i < code_i+1 for i in 0..n-1 - states_0 == states_n-1 - - Mappings for the special events '', BOL, EOL, EOF are - kept separately in a dictionary. - """ - - map = None # The list of codes and states - special = None # Mapping for special events - - def __init__(self, map = None, special = None): - if not map: - map = [-maxint, {}, maxint] - if not special: - special = {} - self.map = map - self.special = special - #self.check() ### - - def add(self, event, new_state, - TupleType = tuple): - """ - Add transition to |new_state| on |event|. - """ - if type(event) is TupleType: - code0, code1 = event - i = self.split(code0) - j = self.split(code1) - map = self.map - while i < j: - map[i + 1][new_state] = 1 - i = i + 2 - else: - self.get_special(event)[new_state] = 1 - - def add_set(self, event, new_set, - TupleType = tuple): - """ - Add transitions to the states in |new_set| on |event|. - """ - if type(event) is TupleType: - code0, code1 = event - i = self.split(code0) - j = self.split(code1) - map = self.map - while i < j: - map[i + 1].update(new_set) - i = i + 2 - else: - self.get_special(event).update(new_set) - - def get_epsilon(self, - none = None): - """ - Return the mapping for epsilon, or None. - """ - return self.special.get('', none) - - def iteritems(self, - len = len): - """ - Return the mapping as an iterable of ((code1, code2), state_set) and - (special_event, state_set) pairs. - """ - result = [] - map = self.map - else_set = map[1] - i = 0 - n = len(map) - 1 - code0 = map[0] - while i < n: - set = map[i + 1] - code1 = map[i + 2] - if set or else_set: - result.append(((code0, code1), set)) - code0 = code1 - i = i + 2 - for event, set in self.special.iteritems(): - if set: - result.append((event, set)) - return iter(result) - items = iteritems - - # ------------------- Private methods -------------------- - - def split(self, code, - len = len, maxint = maxint): - """ - Search the list for the position of the split point for |code|, - inserting a new split point if necessary. Returns index |i| such - that |code| == |map[i]|. - """ - # We use a funky variation on binary search. - map = self.map - hi = len(map) - 1 - # Special case: code == map[-1] - if code == maxint: - return hi - # General case - lo = 0 - # loop invariant: map[lo] <= code < map[hi] and hi - lo >= 2 - while hi - lo >= 4: - # Find midpoint truncated to even index - mid = ((lo + hi) // 2) & ~1 - if code < map[mid]: - hi = mid - else: - lo = mid - # map[lo] <= code < map[hi] and hi - lo == 2 - if map[lo] == code: - return lo - else: - map[hi:hi] = [code, map[hi - 1].copy()] - #self.check() ### - return hi - - def get_special(self, event): - """ - Get state set for special event, adding a new entry if necessary. - """ - special = self.special - set = special.get(event, None) - if not set: - set = {} - special[event] = set - return set - - # --------------------- Conversion methods ----------------------- - - def __str__(self): - map_strs = [] - map = self.map - n = len(map) - i = 0 - while i < n: - code = map[i] - if code == -maxint: - code_str = "-inf" - elif code == maxint: - code_str = "inf" - else: - code_str = str(code) - map_strs.append(code_str) - i = i + 1 - if i < n: - map_strs.append(state_set_str(map[i])) - i = i + 1 - special_strs = {} - for event, set in self.special.iteritems(): - special_strs[event] = state_set_str(set) - return "[%s]+%s" % ( - ','.join(map_strs), - special_strs - ) - - # --------------------- Debugging methods ----------------------- - - def check(self): - """Check data structure integrity.""" - if not self.map[-3] < self.map[-1]: - print(self) - assert 0 - - def dump(self, file): - map = self.map - i = 0 - n = len(map) - 1 - while i < n: - self.dump_range(map[i], map[i + 2], map[i + 1], file) - i = i + 2 - for event, set in self.special.iteritems(): - if set: - if not event: - event = 'empty' - self.dump_trans(event, set, file) - - def dump_range(self, code0, code1, set, file): - if set: - if code0 == -maxint: - if code1 == maxint: - k = "any" - else: - k = "< %s" % self.dump_char(code1) - elif code1 == maxint: - k = "> %s" % self.dump_char(code0 - 1) - elif code0 == code1 - 1: - k = self.dump_char(code0) - else: - k = "%s..%s" % (self.dump_char(code0), - self.dump_char(code1 - 1)) - self.dump_trans(k, set, file) - - def dump_char(self, code): - if 0 <= code <= 255: - return repr(chr(code)) - else: - return "chr(%d)" % code - - def dump_trans(self, key, set, file): - file.write(" %s --> %s\n" % (key, self.dump_set(set))) - - def dump_set(self, set): - return state_set_str(set) - -# -# State set manipulation functions -# - -#def merge_state_sets(set1, set2): -# for state in set2.keys(): -# set1[state] = 1 - -def state_set_str(set): - return "[%s]" % ','.join(["S%d" % state.number for state in set]) - - - diff --git a/third_party/cython/src/Cython/Plex/__init__.py b/third_party/cython/src/Cython/Plex/__init__.py deleted file mode 100644 index 22b9bba3b8cf6..0000000000000 --- a/third_party/cython/src/Cython/Plex/__init__.py +++ /dev/null @@ -1,40 +0,0 @@ -#======================================================================= -# -# Python Lexical Analyser -# -#======================================================================= - -""" -The Plex module provides lexical analysers with similar capabilities -to GNU Flex. The following classes and functions are exported; -see the attached docstrings for more information. - - Scanner For scanning a character stream under the - direction of a Lexicon. - - Lexicon For constructing a lexical definition - to be used by a Scanner. - - Str, Any, AnyBut, AnyChar, Seq, Alt, Opt, Rep, Rep1, - Bol, Eol, Eof, Empty - - Regular expression constructors, for building pattern - definitions for a Lexicon. - - State For defining scanner states when creating a - Lexicon. - - TEXT, IGNORE, Begin - - Actions for associating with patterns when - creating a Lexicon. -""" - -from Actions import TEXT, IGNORE, Begin -from Lexicons import Lexicon, State -from Regexps import RE, Seq, Alt, Rep1, Empty, Str, Any, AnyBut, AnyChar, Range -from Regexps import Opt, Rep, Bol, Eol, Eof, Case, NoCase -from Scanners import Scanner - - - diff --git a/third_party/cython/src/Cython/Runtime/__init__.py b/third_party/cython/src/Cython/Runtime/__init__.py deleted file mode 100644 index fa81adaff68e0..0000000000000 --- a/third_party/cython/src/Cython/Runtime/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# empty file diff --git a/third_party/cython/src/Cython/Runtime/refnanny.pyx b/third_party/cython/src/Cython/Runtime/refnanny.pyx deleted file mode 100644 index 80ec3f4bafca5..0000000000000 --- a/third_party/cython/src/Cython/Runtime/refnanny.pyx +++ /dev/null @@ -1,194 +0,0 @@ -from cpython.ref cimport PyObject, Py_INCREF, Py_DECREF, Py_XDECREF, Py_XINCREF -from cpython.exc cimport PyErr_Fetch, PyErr_Restore -from cpython.pystate cimport PyThreadState_Get - -cimport cython - -loglevel = 0 -reflog = [] - -cdef log(level, action, obj, lineno): - if loglevel >= level: - reflog.append((lineno, action, id(obj))) - -LOG_NONE, LOG_ALL = range(2) - -@cython.final -cdef class Context(object): - cdef readonly object name, filename - cdef readonly dict refs - cdef readonly list errors - cdef readonly Py_ssize_t start - - def __cinit__(self, name, line=0, filename=None): - self.name = name - self.start = line - self.filename = filename - self.refs = {} # id -> (count, [lineno]) - self.errors = [] - - cdef regref(self, obj, lineno, bint is_null): - log(LOG_ALL, u'regref', u"" if is_null else obj, lineno) - if is_null: - self.errors.append(u"NULL argument on line %d" % lineno) - return - id_ = id(obj) - count, linenumbers = self.refs.get(id_, (0, [])) - self.refs[id_] = (count + 1, linenumbers) - linenumbers.append(lineno) - - cdef bint delref(self, obj, lineno, bint is_null) except -1: - # returns whether it is ok to do the decref operation - log(LOG_ALL, u'delref', u"" if is_null else obj, lineno) - if is_null: - self.errors.append(u"NULL argument on line %d" % lineno) - return False - id_ = id(obj) - count, linenumbers = self.refs.get(id_, (0, [])) - if count == 0: - self.errors.append(u"Too many decrefs on line %d, reference acquired on lines %r" % - (lineno, linenumbers)) - return False - elif count == 1: - del self.refs[id_] - return True - else: - self.refs[id_] = (count - 1, linenumbers) - return True - - cdef end(self): - if self.refs: - msg = u"References leaked:" - for count, linenos in self.refs.itervalues(): - msg += u"\n (%d) acquired on lines: %s" % (count, u", ".join([u"%d" % x for x in linenos])) - self.errors.append(msg) - if self.errors: - return u"\n".join([u'REFNANNY: '+error for error in self.errors]) - else: - return None - -cdef void report_unraisable(object e=None): - try: - if e is None: - import sys - e = sys.exc_info()[1] - print u"refnanny raised an exception: %s" % e - except: - pass # We absolutely cannot exit with an exception - -# All Python operations must happen after any existing -# exception has been fetched, in case we are called from -# exception-handling code. - -cdef PyObject* SetupContext(char* funcname, int lineno, char* filename) except NULL: - if Context is None: - # Context may be None during finalize phase. - # In that case, we don't want to be doing anything fancy - # like caching and resetting exceptions. - return NULL - cdef (PyObject*) type = NULL, value = NULL, tb = NULL, result = NULL - PyThreadState_Get() - PyErr_Fetch(&type, &value, &tb) - try: - ctx = Context(funcname, lineno, filename) - Py_INCREF(ctx) - result = ctx - except Exception, e: - report_unraisable(e) - PyErr_Restore(type, value, tb) - return result - -cdef void GOTREF(PyObject* ctx, PyObject* p_obj, int lineno): - if ctx == NULL: return - cdef (PyObject*) type = NULL, value = NULL, tb = NULL - PyErr_Fetch(&type, &value, &tb) - try: - try: - if p_obj is NULL: - (ctx).regref(None, lineno, True) - else: - (ctx).regref(p_obj, lineno, False) - except: - report_unraisable() - except: - # __Pyx_GetException may itself raise errors - pass - PyErr_Restore(type, value, tb) - -cdef int GIVEREF_and_report(PyObject* ctx, PyObject* p_obj, int lineno): - if ctx == NULL: return 1 - cdef (PyObject*) type = NULL, value = NULL, tb = NULL - cdef bint decref_ok = False - PyErr_Fetch(&type, &value, &tb) - try: - try: - if p_obj is NULL: - decref_ok = (ctx).delref(None, lineno, True) - else: - decref_ok = (ctx).delref(p_obj, lineno, False) - except: - report_unraisable() - except: - # __Pyx_GetException may itself raise errors - pass - PyErr_Restore(type, value, tb) - return decref_ok - -cdef void GIVEREF(PyObject* ctx, PyObject* p_obj, int lineno): - GIVEREF_and_report(ctx, p_obj, lineno) - -cdef void INCREF(PyObject* ctx, PyObject* obj, int lineno): - Py_XINCREF(obj) - PyThreadState_Get() - GOTREF(ctx, obj, lineno) - -cdef void DECREF(PyObject* ctx, PyObject* obj, int lineno): - if GIVEREF_and_report(ctx, obj, lineno): - Py_XDECREF(obj) - PyThreadState_Get() - -cdef void FinishContext(PyObject** ctx): - if ctx == NULL or ctx[0] == NULL: return - cdef (PyObject*) type = NULL, value = NULL, tb = NULL - cdef object errors = None - cdef Context context - PyThreadState_Get() - PyErr_Fetch(&type, &value, &tb) - try: - try: - context = ctx[0] - errors = context.end() - if errors: - print u"%s: %s()" % (context.filename.decode('latin1'), - context.name.decode('latin1')) - print errors - context = None - except: - report_unraisable() - except: - # __Pyx_GetException may itself raise errors - pass - Py_XDECREF(ctx[0]) - ctx[0] = NULL - PyErr_Restore(type, value, tb) - -ctypedef struct RefNannyAPIStruct: - void (*INCREF)(PyObject*, PyObject*, int) - void (*DECREF)(PyObject*, PyObject*, int) - void (*GOTREF)(PyObject*, PyObject*, int) - void (*GIVEREF)(PyObject*, PyObject*, int) - PyObject* (*SetupContext)(char*, int, char*) except NULL - void (*FinishContext)(PyObject**) - -cdef RefNannyAPIStruct api -api.INCREF = INCREF -api.DECREF = DECREF -api.GOTREF = GOTREF -api.GIVEREF = GIVEREF -api.SetupContext = SetupContext -api.FinishContext = FinishContext - -cdef extern from "Python.h": - object PyLong_FromVoidPtr(void*) - -RefNannyAPI = PyLong_FromVoidPtr(&api) diff --git a/third_party/cython/src/Cython/Shadow.py b/third_party/cython/src/Cython/Shadow.py deleted file mode 100644 index c0434c702d0aa..0000000000000 --- a/third_party/cython/src/Cython/Shadow.py +++ /dev/null @@ -1,419 +0,0 @@ -# cython.* namespace for pure mode. -__version__ = "0.20.2" - - -# BEGIN shameless copy from Cython/minivect/minitypes.py - -class _ArrayType(object): - - is_array = True - subtypes = ['dtype'] - - def __init__(self, dtype, ndim, is_c_contig=False, is_f_contig=False, - inner_contig=False, broadcasting=None): - self.dtype = dtype - self.ndim = ndim - self.is_c_contig = is_c_contig - self.is_f_contig = is_f_contig - self.inner_contig = inner_contig or is_c_contig or is_f_contig - self.broadcasting = broadcasting - - def __repr__(self): - axes = [":"] * self.ndim - if self.is_c_contig: - axes[-1] = "::1" - elif self.is_f_contig: - axes[0] = "::1" - - return "%s[%s]" % (self.dtype, ", ".join(axes)) - - -def index_type(base_type, item): - """ - Support array type creation by slicing, e.g. double[:, :] specifies - a 2D strided array of doubles. The syntax is the same as for - Cython memoryviews. - """ - assert isinstance(item, (tuple, slice)) - - class InvalidTypeSpecification(Exception): - pass - - def verify_slice(s): - if s.start or s.stop or s.step not in (None, 1): - raise InvalidTypeSpecification( - "Only a step of 1 may be provided to indicate C or " - "Fortran contiguity") - - if isinstance(item, tuple): - step_idx = None - for idx, s in enumerate(item): - verify_slice(s) - if s.step and (step_idx or idx not in (0, len(item) - 1)): - raise InvalidTypeSpecification( - "Step may only be provided once, and only in the " - "first or last dimension.") - - if s.step == 1: - step_idx = idx - - return _ArrayType(base_type, len(item), - is_c_contig=step_idx == len(item) - 1, - is_f_contig=step_idx == 0) - else: - verify_slice(item) - return _ArrayType(base_type, 1, is_c_contig=bool(item.step)) - -# END shameless copy - - -compiled = False - -_Unspecified = object() - -# Function decorators - -def _empty_decorator(x): - return x - -def locals(**arg_types): - return _empty_decorator - -def test_assert_path_exists(*paths): - return _empty_decorator - -def test_fail_if_path_exists(*paths): - return _empty_decorator - -class _EmptyDecoratorAndManager(object): - def __call__(self, x): - return x - def __enter__(self): - pass - def __exit__(self, exc_type, exc_value, traceback): - pass - -cclass = ccall = cfunc = _EmptyDecoratorAndManager() - -returns = lambda type_arg: _EmptyDecoratorAndManager() - -final = internal = type_version_tag = no_gc_clear = _empty_decorator - -def inline(f, *args, **kwds): - if isinstance(f, basestring): - from Cython.Build.Inline import cython_inline - return cython_inline(f, *args, **kwds) - else: - assert len(args) == len(kwds) == 0 - return f - -def compile(f): - from Cython.Build.Inline import RuntimeCompiledFunction - return RuntimeCompiledFunction(f) - -# Special functions - -def cdiv(a, b): - q = a / b - if q < 0: - q += 1 - -def cmod(a, b): - r = a % b - if (a*b) < 0: - r -= b - return r - - -# Emulated language constructs - -def cast(type, *args): - if hasattr(type, '__call__'): - return type(*args) - else: - return args[0] - -def sizeof(arg): - return 1 - -def typeof(arg): - return arg.__class__.__name__ - # return type(arg) - -def address(arg): - return pointer(type(arg))([arg]) - -def declare(type=None, value=_Unspecified, **kwds): - if type not in (None, object) and hasattr(type, '__call__'): - if value is not _Unspecified: - return type(value) - else: - return type() - else: - return value - -class _nogil(object): - """Support for 'with nogil' statement - """ - def __enter__(self): - pass - def __exit__(self, exc_class, exc, tb): - return exc_class is None - -nogil = _nogil() -gil = _nogil() -del _nogil - -# Emulated types - -class CythonMetaType(type): - - def __getitem__(type, ix): - return array(type, ix) - -CythonTypeObject = CythonMetaType('CythonTypeObject', (object,), {}) - -class CythonType(CythonTypeObject): - - def _pointer(self, n=1): - for i in range(n): - self = pointer(self) - return self - -class PointerType(CythonType): - - def __init__(self, value=None): - if isinstance(value, (ArrayType, PointerType)): - self._items = [cast(self._basetype, a) for a in value._items] - elif isinstance(value, list): - self._items = [cast(self._basetype, a) for a in value] - elif value is None or value == 0: - self._items = [] - else: - raise ValueError - - def __getitem__(self, ix): - if ix < 0: - raise IndexError("negative indexing not allowed in C") - return self._items[ix] - - def __setitem__(self, ix, value): - if ix < 0: - raise IndexError("negative indexing not allowed in C") - self._items[ix] = cast(self._basetype, value) - - def __eq__(self, value): - if value is None and not self._items: - return True - elif type(self) != type(value): - return False - else: - return not self._items and not value._items - - def __repr__(self): - return "%s *" % (self._basetype,) - -class ArrayType(PointerType): - - def __init__(self): - self._items = [None] * self._n - - -class StructType(CythonType): - - def __init__(self, cast_from=_Unspecified, **data): - if cast_from is not _Unspecified: - # do cast - if len(data) > 0: - raise ValueError('Cannot accept keyword arguments when casting.') - if type(cast_from) is not type(self): - raise ValueError('Cannot cast from %s'%cast_from) - for key, value in cast_from.__dict__.items(): - setattr(self, key, value) - else: - for key, value in data.iteritems(): - setattr(self, key, value) - - def __setattr__(self, key, value): - if key in self._members: - self.__dict__[key] = cast(self._members[key], value) - else: - raise AttributeError("Struct has no member '%s'" % key) - - -class UnionType(CythonType): - - def __init__(self, cast_from=_Unspecified, **data): - if cast_from is not _Unspecified: - # do type cast - if len(data) > 0: - raise ValueError('Cannot accept keyword arguments when casting.') - if isinstance(cast_from, dict): - datadict = cast_from - elif type(cast_from) is type(self): - datadict = cast_from.__dict__ - else: - raise ValueError('Cannot cast from %s'%cast_from) - else: - datadict = data - if len(datadict) > 1: - raise AttributeError("Union can only store one field at a time.") - for key, value in datadict.iteritems(): - setattr(self, key, value) - - def __setattr__(self, key, value): - if key in '__dict__': - CythonType.__setattr__(self, key, value) - elif key in self._members: - self.__dict__ = {key: cast(self._members[key], value)} - else: - raise AttributeError("Union has no member '%s'" % key) - -def pointer(basetype): - class PointerInstance(PointerType): - _basetype = basetype - return PointerInstance - -def array(basetype, n): - class ArrayInstance(ArrayType): - _basetype = basetype - _n = n - return ArrayInstance - -def struct(**members): - class StructInstance(StructType): - _members = members - for key in members: - setattr(StructInstance, key, None) - return StructInstance - -def union(**members): - class UnionInstance(UnionType): - _members = members - for key in members: - setattr(UnionInstance, key, None) - return UnionInstance - -class typedef(CythonType): - - def __init__(self, type, name=None): - self._basetype = type - self.name = name - - def __call__(self, *arg): - value = cast(self._basetype, *arg) - return value - - def __repr__(self): - return self.name or str(self._basetype) - - __getitem__ = index_type - -class _FusedType(CythonType): - pass - - -def fused_type(*args): - if not args: - raise TypeError("Expected at least one type as argument") - - # Find the numeric type with biggest rank if all types are numeric - rank = -1 - for type in args: - if type not in (py_int, py_long, py_float, py_complex): - break - - if type_ordering.index(type) > rank: - result_type = type - else: - return result_type - - # Not a simple numeric type, return a fused type instance. The result - # isn't really meant to be used, as we can't keep track of the context in - # pure-mode. Casting won't do anything in this case. - return _FusedType() - - -def _specialized_from_args(signatures, args, kwargs): - "Perhaps this should be implemented in a TreeFragment in Cython code" - raise Exception("yet to be implemented") - - -py_int = typedef(int, "int") -try: - py_long = typedef(long, "long") -except NameError: # Py3 - py_long = typedef(int, "long") -py_float = typedef(float, "float") -py_complex = typedef(complex, "double complex") - - -# Predefined types - -int_types = ['char', 'short', 'Py_UNICODE', 'int', 'long', 'longlong', 'Py_ssize_t', 'size_t'] -float_types = ['longdouble', 'double', 'float'] -complex_types = ['longdoublecomplex', 'doublecomplex', 'floatcomplex', 'complex'] -other_types = ['bint', 'void'] - -to_repr = { - 'longlong': 'long long', - 'longdouble': 'long double', - 'longdoublecomplex': 'long double complex', - 'doublecomplex': 'double complex', - 'floatcomplex': 'float complex', -}.get - -gs = globals() - -for name in int_types: - reprname = to_repr(name, name) - gs[name] = typedef(py_int, reprname) - if name != 'Py_UNICODE' and not name.endswith('size_t'): - gs['u'+name] = typedef(py_int, "unsigned " + reprname) - gs['s'+name] = typedef(py_int, "signed " + reprname) - -for name in float_types: - gs[name] = typedef(py_float, to_repr(name, name)) - -for name in complex_types: - gs[name] = typedef(py_complex, to_repr(name, name)) - -bint = typedef(bool, "bint") -void = typedef(int, "void") - -for t in int_types + float_types + complex_types + other_types: - for i in range(1, 4): - gs["%s_%s" % ('p'*i, t)] = globals()[t]._pointer(i) - -void = typedef(None, "void") -NULL = p_void(0) - -integral = floating = numeric = _FusedType() - -type_ordering = [py_int, py_long, py_float, py_complex] - -class CythonDotParallel(object): - """ - The cython.parallel module. - """ - - __all__ = ['parallel', 'prange', 'threadid'] - - def parallel(self, num_threads=None): - return nogil - - def prange(self, start=0, stop=None, step=1, schedule=None, nogil=False): - if stop is None: - stop = start - start = 0 - return range(start, stop, step) - - def threadid(self): - return 0 - - # def threadsavailable(self): - # return 1 - -import sys -sys.modules['cython.parallel'] = CythonDotParallel() -del sys diff --git a/third_party/cython/src/Cython/StringIOTree.py b/third_party/cython/src/Cython/StringIOTree.py deleted file mode 100644 index c41c3d6e8d008..0000000000000 --- a/third_party/cython/src/Cython/StringIOTree.py +++ /dev/null @@ -1,99 +0,0 @@ -from cStringIO import StringIO - -class StringIOTree(object): - """ - See module docs. - """ - - def __init__(self, stream=None): - self.prepended_children = [] - if stream is None: - stream = StringIO() - self.stream = stream - self.write = stream.write - self.markers = [] - - def getvalue(self): - content = [x.getvalue() for x in self.prepended_children] - content.append(self.stream.getvalue()) - return "".join(content) - - def copyto(self, target): - """Potentially cheaper than getvalue as no string concatenation - needs to happen.""" - for child in self.prepended_children: - child.copyto(target) - stream_content = self.stream.getvalue() - if stream_content: - target.write(stream_content) - - def commit(self): - # Save what we have written until now so that the buffer - # itself is empty -- this makes it ready for insertion - if self.stream.tell(): - self.prepended_children.append(StringIOTree(self.stream)) - self.prepended_children[-1].markers = self.markers - self.markers = [] - self.stream = StringIO() - self.write = self.stream.write - - def insert(self, iotree): - """ - Insert a StringIOTree (and all of its contents) at this location. - Further writing to self appears after what is inserted. - """ - self.commit() - self.prepended_children.append(iotree) - - def insertion_point(self): - """ - Returns a new StringIOTree, which is left behind at the current position - (it what is written to the result will appear right before whatever is - next written to self). - - Calling getvalue() or copyto() on the result will only return the - contents written to it. - """ - # Save what we have written until now - # This is so that getvalue on the result doesn't include it. - self.commit() - # Construct the new forked object to return - other = StringIOTree() - self.prepended_children.append(other) - return other - - def allmarkers(self): - children = self.prepended_children - return [m for c in children for m in c.allmarkers()] + self.markers - - -__doc__ = r""" -Implements a buffer with insertion points. When you know you need to -"get back" to a place and write more later, simply call insertion_point() -at that spot and get a new StringIOTree object that is "left behind". - -EXAMPLE: - ->>> a = StringIOTree() ->>> a.write('first\n') ->>> b = a.insertion_point() ->>> a.write('third\n') ->>> b.write('second\n') ->>> a.getvalue().split() -['first', 'second', 'third'] - ->>> c = b.insertion_point() ->>> d = c.insertion_point() ->>> d.write('alpha\n') ->>> b.write('gamma\n') ->>> c.write('beta\n') ->>> b.getvalue().split() -['second', 'alpha', 'beta', 'gamma'] ->>> i = StringIOTree() ->>> d.insert(i) ->>> i.write('inserted\n') ->>> out = StringIO() ->>> a.copyto(out) ->>> out.getvalue().split() -['first', 'second', 'alpha', 'inserted', 'beta', 'gamma', 'third'] -""" diff --git a/third_party/cython/src/Cython/Tempita/__init__.py b/third_party/cython/src/Cython/Tempita/__init__.py deleted file mode 100644 index 6bc731dca8fdd..0000000000000 --- a/third_party/cython/src/Cython/Tempita/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# The original Tempita implements all of its templating code here. -# Moved it to _tempita.py to make the compilation portable. - -from _tempita import * diff --git a/third_party/cython/src/Cython/Tempita/_looper.py b/third_party/cython/src/Cython/Tempita/_looper.py deleted file mode 100644 index 4010988300ffd..0000000000000 --- a/third_party/cython/src/Cython/Tempita/_looper.py +++ /dev/null @@ -1,163 +0,0 @@ -""" -Helper for looping over sequences, particular in templates. - -Often in a loop in a template it's handy to know what's next up, -previously up, if this is the first or last item in the sequence, etc. -These can be awkward to manage in a normal Python loop, but using the -looper you can get a better sense of the context. Use like:: - - >>> for loop, item in looper(['a', 'b', 'c']): - ... print loop.number, item - ... if not loop.last: - ... print '---' - 1 a - --- - 2 b - --- - 3 c - -""" - -import sys -from Cython.Tempita.compat3 import basestring_ - -__all__ = ['looper'] - - -class looper(object): - """ - Helper for looping (particularly in templates) - - Use this like:: - - for loop, item in looper(seq): - if loop.first: - ... - """ - - def __init__(self, seq): - self.seq = seq - - def __iter__(self): - return looper_iter(self.seq) - - def __repr__(self): - return '<%s for %r>' % ( - self.__class__.__name__, self.seq) - - -class looper_iter(object): - - def __init__(self, seq): - self.seq = list(seq) - self.pos = 0 - - def __iter__(self): - return self - - def __next__(self): - if self.pos >= len(self.seq): - raise StopIteration - result = loop_pos(self.seq, self.pos), self.seq[self.pos] - self.pos += 1 - return result - - if sys.version < "3": - next = __next__ - - -class loop_pos(object): - - def __init__(self, seq, pos): - self.seq = seq - self.pos = pos - - def __repr__(self): - return '' % ( - self.seq[self.pos], self.pos) - - def index(self): - return self.pos - index = property(index) - - def number(self): - return self.pos + 1 - number = property(number) - - def item(self): - return self.seq[self.pos] - item = property(item) - - def __next__(self): - try: - return self.seq[self.pos + 1] - except IndexError: - return None - __next__ = property(__next__) - - if sys.version < "3": - next = __next__ - - def previous(self): - if self.pos == 0: - return None - return self.seq[self.pos - 1] - previous = property(previous) - - def odd(self): - return not self.pos % 2 - odd = property(odd) - - def even(self): - return self.pos % 2 - even = property(even) - - def first(self): - return self.pos == 0 - first = property(first) - - def last(self): - return self.pos == len(self.seq) - 1 - last = property(last) - - def length(self): - return len(self.seq) - length = property(length) - - def first_group(self, getter=None): - """ - Returns true if this item is the start of a new group, - where groups mean that some attribute has changed. The getter - can be None (the item itself changes), an attribute name like - ``'.attr'``, a function, or a dict key or list index. - """ - if self.first: - return True - return self._compare_group(self.item, self.previous, getter) - - def last_group(self, getter=None): - """ - Returns true if this item is the end of a new group, - where groups mean that some attribute has changed. The getter - can be None (the item itself changes), an attribute name like - ``'.attr'``, a function, or a dict key or list index. - """ - if self.last: - return True - return self._compare_group(self.item, self.__next__, getter) - - def _compare_group(self, item, other, getter): - if getter is None: - return item != other - elif (isinstance(getter, basestring_) - and getter.startswith('.')): - getter = getter[1:] - if getter.endswith('()'): - getter = getter[:-2] - return getattr(item, getter)() != getattr(other, getter)() - else: - return getattr(item, getter) != getattr(other, getter) - elif hasattr(getter, '__call__'): - return getter(item) != getter(other) - else: - return item[getter] != other[getter] diff --git a/third_party/cython/src/Cython/Tempita/_tempita.py b/third_party/cython/src/Cython/Tempita/_tempita.py deleted file mode 100644 index 24c8943fde74a..0000000000000 --- a/third_party/cython/src/Cython/Tempita/_tempita.py +++ /dev/null @@ -1,1193 +0,0 @@ -""" -A small templating language - -This implements a small templating language. This language implements -if/elif/else, for/continue/break, expressions, and blocks of Python -code. The syntax is:: - - {{any expression (function calls etc)}} - {{any expression | filter}} - {{for x in y}}...{{endfor}} - {{if x}}x{{elif y}}y{{else}}z{{endif}} - {{py:x=1}} - {{py: - def foo(bar): - return 'baz' - }} - {{default var = default_value}} - {{# comment}} - -You use this with the ``Template`` class or the ``sub`` shortcut. -The ``Template`` class takes the template string and the name of -the template (for errors) and a default namespace. Then (like -``string.Template``) you can call the ``tmpl.substitute(**kw)`` -method to make a substitution (or ``tmpl.substitute(a_dict)``). - -``sub(content, **kw)`` substitutes the template immediately. You -can use ``__name='tmpl.html'`` to set the name of the template. - -If there are syntax errors ``TemplateError`` will be raised. -""" - -import re -import sys -import cgi -try: - from urllib import quote as url_quote -except ImportError: # Py3 - from urllib.parse import quote as url_quote -import os -import tokenize -try: - from io import StringIO -except ImportError: - from cStringIO import StringIO -from Cython.Tempita._looper import looper -from Cython.Tempita.compat3 import bytes, basestring_, next, is_unicode, coerce_text - -__all__ = ['TemplateError', 'Template', 'sub', 'HTMLTemplate', - 'sub_html', 'html', 'bunch'] - -in_re = re.compile(r'\s+in\s+') -var_re = re.compile(r'^[a-z_][a-z0-9_]*$', re.I) - - -class TemplateError(Exception): - """Exception raised while parsing a template - """ - - def __init__(self, message, position, name=None): - Exception.__init__(self, message) - self.position = position - self.name = name - - def __str__(self): - msg = ' '.join(self.args) - if self.position: - msg = '%s at line %s column %s' % ( - msg, self.position[0], self.position[1]) - if self.name: - msg += ' in %s' % self.name - return msg - - -class _TemplateContinue(Exception): - pass - - -class _TemplateBreak(Exception): - pass - - -def get_file_template(name, from_template): - path = os.path.join(os.path.dirname(from_template.name), name) - return from_template.__class__.from_filename( - path, namespace=from_template.namespace, - get_template=from_template.get_template) - - -class Template(object): - - default_namespace = { - 'start_braces': '{{', - 'end_braces': '}}', - 'looper': looper, - } - - default_encoding = 'utf8' - default_inherit = None - - def __init__(self, content, name=None, namespace=None, stacklevel=None, - get_template=None, default_inherit=None, line_offset=0, - delimeters=None): - self.content = content - - # set delimeters - if delimeters is None: - delimeters = (self.default_namespace['start_braces'], - self.default_namespace['end_braces']) - else: - #assert len(delimeters) == 2 and all([isinstance(delimeter, basestring) - # for delimeter in delimeters]) - self.default_namespace = self.__class__.default_namespace.copy() - self.default_namespace['start_braces'] = delimeters[0] - self.default_namespace['end_braces'] = delimeters[1] - self.delimeters = delimeters - - self._unicode = is_unicode(content) - if name is None and stacklevel is not None: - try: - caller = sys._getframe(stacklevel) - except ValueError: - pass - else: - globals = caller.f_globals - lineno = caller.f_lineno - if '__file__' in globals: - name = globals['__file__'] - if name.endswith('.pyc') or name.endswith('.pyo'): - name = name[:-1] - elif '__name__' in globals: - name = globals['__name__'] - else: - name = '' - if lineno: - name += ':%s' % lineno - self.name = name - self._parsed = parse(content, name=name, line_offset=line_offset, delimeters=self.delimeters) - if namespace is None: - namespace = {} - self.namespace = namespace - self.get_template = get_template - if default_inherit is not None: - self.default_inherit = default_inherit - - def from_filename(cls, filename, namespace=None, encoding=None, - default_inherit=None, get_template=get_file_template): - f = open(filename, 'rb') - c = f.read() - f.close() - if encoding: - c = c.decode(encoding) - return cls(content=c, name=filename, namespace=namespace, - default_inherit=default_inherit, get_template=get_template) - - from_filename = classmethod(from_filename) - - def __repr__(self): - return '<%s %s name=%r>' % ( - self.__class__.__name__, - hex(id(self))[2:], self.name) - - def substitute(self, *args, **kw): - if args: - if kw: - raise TypeError( - "You can only give positional *or* keyword arguments") - if len(args) > 1: - raise TypeError( - "You can only give one positional argument") - if not hasattr(args[0], 'items'): - raise TypeError( - "If you pass in a single argument, you must pass in a dictionary-like object (with a .items() method); you gave %r" - % (args[0],)) - kw = args[0] - ns = kw - ns['__template_name__'] = self.name - if self.namespace: - ns.update(self.namespace) - result, defs, inherit = self._interpret(ns) - if not inherit: - inherit = self.default_inherit - if inherit: - result = self._interpret_inherit(result, defs, inherit, ns) - return result - - def _interpret(self, ns): - __traceback_hide__ = True - parts = [] - defs = {} - self._interpret_codes(self._parsed, ns, out=parts, defs=defs) - if '__inherit__' in defs: - inherit = defs.pop('__inherit__') - else: - inherit = None - return ''.join(parts), defs, inherit - - def _interpret_inherit(self, body, defs, inherit_template, ns): - __traceback_hide__ = True - if not self.get_template: - raise TemplateError( - 'You cannot use inheritance without passing in get_template', - position=None, name=self.name) - templ = self.get_template(inherit_template, self) - self_ = TemplateObject(self.name) - for name, value in defs.iteritems(): - setattr(self_, name, value) - self_.body = body - ns = ns.copy() - ns['self'] = self_ - return templ.substitute(ns) - - def _interpret_codes(self, codes, ns, out, defs): - __traceback_hide__ = True - for item in codes: - if isinstance(item, basestring_): - out.append(item) - else: - self._interpret_code(item, ns, out, defs) - - def _interpret_code(self, code, ns, out, defs): - __traceback_hide__ = True - name, pos = code[0], code[1] - if name == 'py': - self._exec(code[2], ns, pos) - elif name == 'continue': - raise _TemplateContinue() - elif name == 'break': - raise _TemplateBreak() - elif name == 'for': - vars, expr, content = code[2], code[3], code[4] - expr = self._eval(expr, ns, pos) - self._interpret_for(vars, expr, content, ns, out, defs) - elif name == 'cond': - parts = code[2:] - self._interpret_if(parts, ns, out, defs) - elif name == 'expr': - parts = code[2].split('|') - base = self._eval(parts[0], ns, pos) - for part in parts[1:]: - func = self._eval(part, ns, pos) - base = func(base) - out.append(self._repr(base, pos)) - elif name == 'default': - var, expr = code[2], code[3] - if var not in ns: - result = self._eval(expr, ns, pos) - ns[var] = result - elif name == 'inherit': - expr = code[2] - value = self._eval(expr, ns, pos) - defs['__inherit__'] = value - elif name == 'def': - name = code[2] - signature = code[3] - parts = code[4] - ns[name] = defs[name] = TemplateDef(self, name, signature, body=parts, ns=ns, - pos=pos) - elif name == 'comment': - return - else: - assert 0, "Unknown code: %r" % name - - def _interpret_for(self, vars, expr, content, ns, out, defs): - __traceback_hide__ = True - for item in expr: - if len(vars) == 1: - ns[vars[0]] = item - else: - if len(vars) != len(item): - raise ValueError( - 'Need %i items to unpack (got %i items)' - % (len(vars), len(item))) - for name, value in zip(vars, item): - ns[name] = value - try: - self._interpret_codes(content, ns, out, defs) - except _TemplateContinue: - continue - except _TemplateBreak: - break - - def _interpret_if(self, parts, ns, out, defs): - __traceback_hide__ = True - # @@: if/else/else gets through - for part in parts: - assert not isinstance(part, basestring_) - name, pos = part[0], part[1] - if name == 'else': - result = True - else: - result = self._eval(part[2], ns, pos) - if result: - self._interpret_codes(part[3], ns, out, defs) - break - - def _eval(self, code, ns, pos): - __traceback_hide__ = True - try: - try: - value = eval(code, self.default_namespace, ns) - except SyntaxError, e: - raise SyntaxError( - 'invalid syntax in expression: %s' % code) - return value - except: - exc_info = sys.exc_info() - e = exc_info[1] - if getattr(e, 'args', None): - arg0 = e.args[0] - else: - arg0 = coerce_text(e) - e.args = (self._add_line_info(arg0, pos),) - raise exc_info[0], e, exc_info[2] - - def _exec(self, code, ns, pos): - __traceback_hide__ = True - try: - exec code in self.default_namespace, ns - except: - exc_info = sys.exc_info() - e = exc_info[1] - if e.args: - e.args = (self._add_line_info(e.args[0], pos),) - else: - e.args = (self._add_line_info(None, pos),) - raise exc_info[0], e, exc_info[2] - - def _repr(self, value, pos): - __traceback_hide__ = True - try: - if value is None: - return '' - if self._unicode: - try: - value = unicode(value) - except UnicodeDecodeError: - value = bytes(value) - else: - if not isinstance(value, basestring_): - value = coerce_text(value) - if (is_unicode(value) - and self.default_encoding): - value = value.encode(self.default_encoding) - except: - exc_info = sys.exc_info() - e = exc_info[1] - e.args = (self._add_line_info(e.args[0], pos),) - raise exc_info[0], e, exc_info[2] - else: - if self._unicode and isinstance(value, bytes): - if not self.default_encoding: - raise UnicodeDecodeError( - 'Cannot decode bytes value %r into unicode ' - '(no default_encoding provided)' % value) - try: - value = value.decode(self.default_encoding) - except UnicodeDecodeError, e: - raise UnicodeDecodeError( - e.encoding, - e.object, - e.start, - e.end, - e.reason + ' in string %r' % value) - elif not self._unicode and is_unicode(value): - if not self.default_encoding: - raise UnicodeEncodeError( - 'Cannot encode unicode value %r into bytes ' - '(no default_encoding provided)' % value) - value = value.encode(self.default_encoding) - return value - - def _add_line_info(self, msg, pos): - msg = "%s at line %s column %s" % ( - msg, pos[0], pos[1]) - if self.name: - msg += " in file %s" % self.name - return msg - - -def sub(content, delimeters=None, **kw): - name = kw.get('__name') - tmpl = Template(content, name=name, delimeters=delimeters) - return tmpl.substitute(kw) - - -def paste_script_template_renderer(content, vars, filename=None): - tmpl = Template(content, name=filename) - return tmpl.substitute(vars) - - -class bunch(dict): - - def __init__(self, **kw): - for name, value in kw.iteritems(): - setattr(self, name, value) - - def __setattr__(self, name, value): - self[name] = value - - def __getattr__(self, name): - try: - return self[name] - except KeyError: - raise AttributeError(name) - - def __getitem__(self, key): - if 'default' in self: - try: - return dict.__getitem__(self, key) - except KeyError: - return dict.__getitem__(self, 'default') - else: - return dict.__getitem__(self, key) - - def __repr__(self): - items = [ - (k, v) for k, v in self.iteritems()] - items.sort() - return '<%s %s>' % ( - self.__class__.__name__, - ' '.join(['%s=%r' % (k, v) for k, v in items])) - -############################################################ -## HTML Templating -############################################################ - - -class html(object): - - def __init__(self, value): - self.value = value - - def __str__(self): - return self.value - - def __html__(self): - return self.value - - def __repr__(self): - return '<%s %r>' % ( - self.__class__.__name__, self.value) - - -def html_quote(value, force=True): - if not force and hasattr(value, '__html__'): - return value.__html__() - if value is None: - return '' - if not isinstance(value, basestring_): - value = coerce_text(value) - if sys.version >= "3" and isinstance(value, bytes): - value = cgi.escape(value.decode('latin1'), 1) - value = value.encode('latin1') - else: - value = cgi.escape(value, 1) - if sys.version < "3": - if is_unicode(value): - value = value.encode('ascii', 'xmlcharrefreplace') - return value - - -def url(v): - v = coerce_text(v) - if is_unicode(v): - v = v.encode('utf8') - return url_quote(v) - - -def attr(**kw): - kw = list(kw.iteritems()) - kw.sort() - parts = [] - for name, value in kw: - if value is None: - continue - if name.endswith('_'): - name = name[:-1] - parts.append('%s="%s"' % (html_quote(name), html_quote(value))) - return html(' '.join(parts)) - - -class HTMLTemplate(Template): - - default_namespace = Template.default_namespace.copy() - default_namespace.update(dict( - html=html, - attr=attr, - url=url, - html_quote=html_quote, - )) - - def _repr(self, value, pos): - if hasattr(value, '__html__'): - value = value.__html__() - quote = False - else: - quote = True - plain = Template._repr(self, value, pos) - if quote: - return html_quote(plain) - else: - return plain - - -def sub_html(content, **kw): - name = kw.get('__name') - tmpl = HTMLTemplate(content, name=name) - return tmpl.substitute(kw) - - -class TemplateDef(object): - def __init__(self, template, func_name, func_signature, - body, ns, pos, bound_self=None): - self._template = template - self._func_name = func_name - self._func_signature = func_signature - self._body = body - self._ns = ns - self._pos = pos - self._bound_self = bound_self - - def __repr__(self): - return '' % ( - self._func_name, self._func_signature, - self._template.name, self._pos) - - def __str__(self): - return self() - - def __call__(self, *args, **kw): - values = self._parse_signature(args, kw) - ns = self._ns.copy() - ns.update(values) - if self._bound_self is not None: - ns['self'] = self._bound_self - out = [] - subdefs = {} - self._template._interpret_codes(self._body, ns, out, subdefs) - return ''.join(out) - - def __get__(self, obj, type=None): - if obj is None: - return self - return self.__class__( - self._template, self._func_name, self._func_signature, - self._body, self._ns, self._pos, bound_self=obj) - - def _parse_signature(self, args, kw): - values = {} - sig_args, var_args, var_kw, defaults = self._func_signature - extra_kw = {} - for name, value in kw.iteritems(): - if not var_kw and name not in sig_args: - raise TypeError( - 'Unexpected argument %s' % name) - if name in sig_args: - values[sig_args] = value - else: - extra_kw[name] = value - args = list(args) - sig_args = list(sig_args) - while args: - while sig_args and sig_args[0] in values: - sig_args.pop(0) - if sig_args: - name = sig_args.pop(0) - values[name] = args.pop(0) - elif var_args: - values[var_args] = tuple(args) - break - else: - raise TypeError( - 'Extra position arguments: %s' - % ', '.join([repr(v) for v in args])) - for name, value_expr in defaults.iteritems(): - if name not in values: - values[name] = self._template._eval( - value_expr, self._ns, self._pos) - for name in sig_args: - if name not in values: - raise TypeError( - 'Missing argument: %s' % name) - if var_kw: - values[var_kw] = extra_kw - return values - - -class TemplateObject(object): - - def __init__(self, name): - self.__name = name - self.get = TemplateObjectGetter(self) - - def __repr__(self): - return '<%s %s>' % (self.__class__.__name__, self.__name) - - -class TemplateObjectGetter(object): - - def __init__(self, template_obj): - self.__template_obj = template_obj - - def __getattr__(self, attr): - return getattr(self.__template_obj, attr, Empty) - - def __repr__(self): - return '<%s around %r>' % (self.__class__.__name__, self.__template_obj) - - -class _Empty(object): - def __call__(self, *args, **kw): - return self - - def __str__(self): - return '' - - def __repr__(self): - return 'Empty' - - def __unicode__(self): - return u'' - - def __iter__(self): - return iter(()) - - def __bool__(self): - return False - - if sys.version < "3": - __nonzero__ = __bool__ - -Empty = _Empty() -del _Empty - -############################################################ -## Lexing and Parsing -############################################################ - - -def lex(s, name=None, trim_whitespace=True, line_offset=0, delimeters=None): - """ - Lex a string into chunks: - - >>> lex('hey') - ['hey'] - >>> lex('hey {{you}}') - ['hey ', ('you', (1, 7))] - >>> lex('hey {{') - Traceback (most recent call last): - ... - TemplateError: No }} to finish last expression at line 1 column 7 - >>> lex('hey }}') - Traceback (most recent call last): - ... - TemplateError: }} outside expression at line 1 column 7 - >>> lex('hey {{ {{') - Traceback (most recent call last): - ... - TemplateError: {{ inside expression at line 1 column 10 - - """ - if delimeters is None: - delimeters = ( Template.default_namespace['start_braces'], - Template.default_namespace['end_braces'] ) - in_expr = False - chunks = [] - last = 0 - last_pos = (line_offset + 1, 1) - - token_re = re.compile(r'%s|%s' % (re.escape(delimeters[0]), - re.escape(delimeters[1]))) - for match in token_re.finditer(s): - expr = match.group(0) - pos = find_position(s, match.end(), last, last_pos) - if expr == delimeters[0] and in_expr: - raise TemplateError('%s inside expression' % delimeters[0], - position=pos, - name=name) - elif expr == delimeters[1] and not in_expr: - raise TemplateError('%s outside expression' % delimeters[1], - position=pos, - name=name) - if expr == delimeters[0]: - part = s[last:match.start()] - if part: - chunks.append(part) - in_expr = True - else: - chunks.append((s[last:match.start()], last_pos)) - in_expr = False - last = match.end() - last_pos = pos - if in_expr: - raise TemplateError('No %s to finish last expression' % delimeters[1], - name=name, position=last_pos) - part = s[last:] - if part: - chunks.append(part) - if trim_whitespace: - chunks = trim_lex(chunks) - return chunks - -statement_re = re.compile(r'^(?:if |elif |for |def |inherit |default |py:)') -single_statements = ['else', 'endif', 'endfor', 'enddef', 'continue', 'break'] -trail_whitespace_re = re.compile(r'\n\r?[\t ]*$') -lead_whitespace_re = re.compile(r'^[\t ]*\n') - - -def trim_lex(tokens): - r""" - Takes a lexed set of tokens, and removes whitespace when there is - a directive on a line by itself: - - >>> tokens = lex('{{if x}}\nx\n{{endif}}\ny', trim_whitespace=False) - >>> tokens - [('if x', (1, 3)), '\nx\n', ('endif', (3, 3)), '\ny'] - >>> trim_lex(tokens) - [('if x', (1, 3)), 'x\n', ('endif', (3, 3)), 'y'] - """ - last_trim = None - for i, current in enumerate(tokens): - if isinstance(current, basestring_): - # we don't trim this - continue - item = current[0] - if not statement_re.search(item) and item not in single_statements: - continue - if not i: - prev = '' - else: - prev = tokens[i - 1] - if i + 1 >= len(tokens): - next_chunk = '' - else: - next_chunk = tokens[i + 1] - if (not isinstance(next_chunk, basestring_) - or not isinstance(prev, basestring_)): - continue - prev_ok = not prev or trail_whitespace_re.search(prev) - if i == 1 and not prev.strip(): - prev_ok = True - if last_trim is not None and last_trim + 2 == i and not prev.strip(): - prev_ok = 'last' - if (prev_ok - and (not next_chunk or lead_whitespace_re.search(next_chunk) - or (i == len(tokens) - 2 and not next_chunk.strip()))): - if prev: - if ((i == 1 and not prev.strip()) - or prev_ok == 'last'): - tokens[i - 1] = '' - else: - m = trail_whitespace_re.search(prev) - # +1 to leave the leading \n on: - prev = prev[:m.start() + 1] - tokens[i - 1] = prev - if next_chunk: - last_trim = i - if i == len(tokens) - 2 and not next_chunk.strip(): - tokens[i + 1] = '' - else: - m = lead_whitespace_re.search(next_chunk) - next_chunk = next_chunk[m.end():] - tokens[i + 1] = next_chunk - return tokens - - -def find_position(string, index, last_index, last_pos): - """Given a string and index, return (line, column)""" - lines = string.count('\n', last_index, index) - if lines > 0: - column = index - string.rfind('\n', last_index, index) - else: - column = last_pos[1] + (index - last_index) - return (last_pos[0] + lines, column) - - -def parse(s, name=None, line_offset=0, delimeters=None): - r""" - Parses a string into a kind of AST - - >>> parse('{{x}}') - [('expr', (1, 3), 'x')] - >>> parse('foo') - ['foo'] - >>> parse('{{if x}}test{{endif}}') - [('cond', (1, 3), ('if', (1, 3), 'x', ['test']))] - >>> parse('series->{{for x in y}}x={{x}}{{endfor}}') - ['series->', ('for', (1, 11), ('x',), 'y', ['x=', ('expr', (1, 27), 'x')])] - >>> parse('{{for x, y in z:}}{{continue}}{{endfor}}') - [('for', (1, 3), ('x', 'y'), 'z', [('continue', (1, 21))])] - >>> parse('{{py:x=1}}') - [('py', (1, 3), 'x=1')] - >>> parse('{{if x}}a{{elif y}}b{{else}}c{{endif}}') - [('cond', (1, 3), ('if', (1, 3), 'x', ['a']), ('elif', (1, 12), 'y', ['b']), ('else', (1, 23), None, ['c']))] - - Some exceptions:: - - >>> parse('{{continue}}') - Traceback (most recent call last): - ... - TemplateError: continue outside of for loop at line 1 column 3 - >>> parse('{{if x}}foo') - Traceback (most recent call last): - ... - TemplateError: No {{endif}} at line 1 column 3 - >>> parse('{{else}}') - Traceback (most recent call last): - ... - TemplateError: else outside of an if block at line 1 column 3 - >>> parse('{{if x}}{{for x in y}}{{endif}}{{endfor}}') - Traceback (most recent call last): - ... - TemplateError: Unexpected endif at line 1 column 25 - >>> parse('{{if}}{{endif}}') - Traceback (most recent call last): - ... - TemplateError: if with no expression at line 1 column 3 - >>> parse('{{for x y}}{{endfor}}') - Traceback (most recent call last): - ... - TemplateError: Bad for (no "in") in 'x y' at line 1 column 3 - >>> parse('{{py:x=1\ny=2}}') - Traceback (most recent call last): - ... - TemplateError: Multi-line py blocks must start with a newline at line 1 column 3 - """ - if delimeters is None: - delimeters = ( Template.default_namespace['start_braces'], - Template.default_namespace['end_braces'] ) - tokens = lex(s, name=name, line_offset=line_offset, delimeters=delimeters) - result = [] - while tokens: - next_chunk, tokens = parse_expr(tokens, name) - result.append(next_chunk) - return result - - -def parse_expr(tokens, name, context=()): - if isinstance(tokens[0], basestring_): - return tokens[0], tokens[1:] - expr, pos = tokens[0] - expr = expr.strip() - if expr.startswith('py:'): - expr = expr[3:].lstrip(' \t') - if expr.startswith('\n') or expr.startswith('\r'): - expr = expr.lstrip('\r\n') - if '\r' in expr: - expr = expr.replace('\r\n', '\n') - expr = expr.replace('\r', '') - expr += '\n' - else: - if '\n' in expr: - raise TemplateError( - 'Multi-line py blocks must start with a newline', - position=pos, name=name) - return ('py', pos, expr), tokens[1:] - elif expr in ('continue', 'break'): - if 'for' not in context: - raise TemplateError( - 'continue outside of for loop', - position=pos, name=name) - return (expr, pos), tokens[1:] - elif expr.startswith('if '): - return parse_cond(tokens, name, context) - elif (expr.startswith('elif ') - or expr == 'else'): - raise TemplateError( - '%s outside of an if block' % expr.split()[0], - position=pos, name=name) - elif expr in ('if', 'elif', 'for'): - raise TemplateError( - '%s with no expression' % expr, - position=pos, name=name) - elif expr in ('endif', 'endfor', 'enddef'): - raise TemplateError( - 'Unexpected %s' % expr, - position=pos, name=name) - elif expr.startswith('for '): - return parse_for(tokens, name, context) - elif expr.startswith('default '): - return parse_default(tokens, name, context) - elif expr.startswith('inherit '): - return parse_inherit(tokens, name, context) - elif expr.startswith('def '): - return parse_def(tokens, name, context) - elif expr.startswith('#'): - return ('comment', pos, tokens[0][0]), tokens[1:] - return ('expr', pos, tokens[0][0]), tokens[1:] - - -def parse_cond(tokens, name, context): - start = tokens[0][1] - pieces = [] - context = context + ('if',) - while 1: - if not tokens: - raise TemplateError( - 'Missing {{endif}}', - position=start, name=name) - if (isinstance(tokens[0], tuple) - and tokens[0][0] == 'endif'): - return ('cond', start) + tuple(pieces), tokens[1:] - next_chunk, tokens = parse_one_cond(tokens, name, context) - pieces.append(next_chunk) - - -def parse_one_cond(tokens, name, context): - (first, pos), tokens = tokens[0], tokens[1:] - content = [] - if first.endswith(':'): - first = first[:-1] - if first.startswith('if '): - part = ('if', pos, first[3:].lstrip(), content) - elif first.startswith('elif '): - part = ('elif', pos, first[5:].lstrip(), content) - elif first == 'else': - part = ('else', pos, None, content) - else: - assert 0, "Unexpected token %r at %s" % (first, pos) - while 1: - if not tokens: - raise TemplateError( - 'No {{endif}}', - position=pos, name=name) - if (isinstance(tokens[0], tuple) - and (tokens[0][0] == 'endif' - or tokens[0][0].startswith('elif ') - or tokens[0][0] == 'else')): - return part, tokens - next_chunk, tokens = parse_expr(tokens, name, context) - content.append(next_chunk) - - -def parse_for(tokens, name, context): - first, pos = tokens[0] - tokens = tokens[1:] - context = ('for',) + context - content = [] - assert first.startswith('for ') - if first.endswith(':'): - first = first[:-1] - first = first[3:].strip() - match = in_re.search(first) - if not match: - raise TemplateError( - 'Bad for (no "in") in %r' % first, - position=pos, name=name) - vars = first[:match.start()] - if '(' in vars: - raise TemplateError( - 'You cannot have () in the variable section of a for loop (%r)' - % vars, position=pos, name=name) - vars = tuple([ - v.strip() for v in first[:match.start()].split(',') - if v.strip()]) - expr = first[match.end():] - while 1: - if not tokens: - raise TemplateError( - 'No {{endfor}}', - position=pos, name=name) - if (isinstance(tokens[0], tuple) - and tokens[0][0] == 'endfor'): - return ('for', pos, vars, expr, content), tokens[1:] - next_chunk, tokens = parse_expr(tokens, name, context) - content.append(next_chunk) - - -def parse_default(tokens, name, context): - first, pos = tokens[0] - assert first.startswith('default ') - first = first.split(None, 1)[1] - parts = first.split('=', 1) - if len(parts) == 1: - raise TemplateError( - "Expression must be {{default var=value}}; no = found in %r" % first, - position=pos, name=name) - var = parts[0].strip() - if ',' in var: - raise TemplateError( - "{{default x, y = ...}} is not supported", - position=pos, name=name) - if not var_re.search(var): - raise TemplateError( - "Not a valid variable name for {{default}}: %r" - % var, position=pos, name=name) - expr = parts[1].strip() - return ('default', pos, var, expr), tokens[1:] - - -def parse_inherit(tokens, name, context): - first, pos = tokens[0] - assert first.startswith('inherit ') - expr = first.split(None, 1)[1] - return ('inherit', pos, expr), tokens[1:] - - -def parse_def(tokens, name, context): - first, start = tokens[0] - tokens = tokens[1:] - assert first.startswith('def ') - first = first.split(None, 1)[1] - if first.endswith(':'): - first = first[:-1] - if '(' not in first: - func_name = first - sig = ((), None, None, {}) - elif not first.endswith(')'): - raise TemplateError("Function definition doesn't end with ): %s" % first, - position=start, name=name) - else: - first = first[:-1] - func_name, sig_text = first.split('(', 1) - sig = parse_signature(sig_text, name, start) - context = context + ('def',) - content = [] - while 1: - if not tokens: - raise TemplateError( - 'Missing {{enddef}}', - position=start, name=name) - if (isinstance(tokens[0], tuple) - and tokens[0][0] == 'enddef'): - return ('def', start, func_name, sig, content), tokens[1:] - next_chunk, tokens = parse_expr(tokens, name, context) - content.append(next_chunk) - - -def parse_signature(sig_text, name, pos): - tokens = tokenize.generate_tokens(StringIO(sig_text).readline) - sig_args = [] - var_arg = None - var_kw = None - defaults = {} - - def get_token(pos=False): - try: - tok_type, tok_string, (srow, scol), (erow, ecol), line = next(tokens) - except StopIteration: - return tokenize.ENDMARKER, '' - if pos: - return tok_type, tok_string, (srow, scol), (erow, ecol) - else: - return tok_type, tok_string - while 1: - var_arg_type = None - tok_type, tok_string = get_token() - if tok_type == tokenize.ENDMARKER: - break - if tok_type == tokenize.OP and (tok_string == '*' or tok_string == '**'): - var_arg_type = tok_string - tok_type, tok_string = get_token() - if tok_type != tokenize.NAME: - raise TemplateError('Invalid signature: (%s)' % sig_text, - position=pos, name=name) - var_name = tok_string - tok_type, tok_string = get_token() - if tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','): - if var_arg_type == '*': - var_arg = var_name - elif var_arg_type == '**': - var_kw = var_name - else: - sig_args.append(var_name) - if tok_type == tokenize.ENDMARKER: - break - continue - if var_arg_type is not None: - raise TemplateError('Invalid signature: (%s)' % sig_text, - position=pos, name=name) - if tok_type == tokenize.OP and tok_string == '=': - nest_type = None - unnest_type = None - nest_count = 0 - start_pos = end_pos = None - parts = [] - while 1: - tok_type, tok_string, s, e = get_token(True) - if start_pos is None: - start_pos = s - end_pos = e - if tok_type == tokenize.ENDMARKER and nest_count: - raise TemplateError('Invalid signature: (%s)' % sig_text, - position=pos, name=name) - if (not nest_count and - (tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','))): - default_expr = isolate_expression(sig_text, start_pos, end_pos) - defaults[var_name] = default_expr - sig_args.append(var_name) - break - parts.append((tok_type, tok_string)) - if nest_count and tok_type == tokenize.OP and tok_string == nest_type: - nest_count += 1 - elif nest_count and tok_type == tokenize.OP and tok_string == unnest_type: - nest_count -= 1 - if not nest_count: - nest_type = unnest_type = None - elif not nest_count and tok_type == tokenize.OP and tok_string in ('(', '[', '{'): - nest_type = tok_string - nest_count = 1 - unnest_type = {'(': ')', '[': ']', '{': '}'}[nest_type] - return sig_args, var_arg, var_kw, defaults - - -def isolate_expression(string, start_pos, end_pos): - srow, scol = start_pos - srow -= 1 - erow, ecol = end_pos - erow -= 1 - lines = string.splitlines(True) - if srow == erow: - return lines[srow][scol:ecol] - parts = [lines[srow][scol:]] - parts.extend(lines[srow+1:erow]) - if erow < len(lines): - # It'll sometimes give (end_row_past_finish, 0) - parts.append(lines[erow][:ecol]) - return ''.join(parts) - -_fill_command_usage = """\ -%prog [OPTIONS] TEMPLATE arg=value - -Use py:arg=value to set a Python value; otherwise all values are -strings. -""" - - -def fill_command(args=None): - import sys - import optparse - import pkg_resources - import os - if args is None: - args = sys.argv[1:] - dist = pkg_resources.get_distribution('Paste') - parser = optparse.OptionParser( - version=coerce_text(dist), - usage=_fill_command_usage) - parser.add_option( - '-o', '--output', - dest='output', - metavar="FILENAME", - help="File to write output to (default stdout)") - parser.add_option( - '--html', - dest='use_html', - action='store_true', - help="Use HTML style filling (including automatic HTML quoting)") - parser.add_option( - '--env', - dest='use_env', - action='store_true', - help="Put the environment in as top-level variables") - options, args = parser.parse_args(args) - if len(args) < 1: - print('You must give a template filename') - sys.exit(2) - template_name = args[0] - args = args[1:] - vars = {} - if options.use_env: - vars.update(os.environ) - for value in args: - if '=' not in value: - print('Bad argument: %r' % value) - sys.exit(2) - name, value = value.split('=', 1) - if name.startswith('py:'): - name = name[:3] - value = eval(value) - vars[name] = value - if template_name == '-': - template_content = sys.stdin.read() - template_name = '' - else: - f = open(template_name, 'rb') - template_content = f.read() - f.close() - if options.use_html: - TemplateClass = HTMLTemplate - else: - TemplateClass = Template - template = TemplateClass(template_content, name=template_name) - result = template.substitute(vars) - if options.output: - f = open(options.output, 'wb') - f.write(result) - f.close() - else: - sys.stdout.write(result) - -if __name__ == '__main__': - fill_command() diff --git a/third_party/cython/src/Cython/Tempita/compat3.py b/third_party/cython/src/Cython/Tempita/compat3.py deleted file mode 100644 index 5e18fa011de26..0000000000000 --- a/third_party/cython/src/Cython/Tempita/compat3.py +++ /dev/null @@ -1,45 +0,0 @@ -import sys - -__all__ = ['b', 'basestring_', 'bytes', 'next', 'is_unicode'] - -if sys.version < "3": - b = bytes = str - basestring_ = basestring -else: - - def b(s): - if isinstance(s, str): - return s.encode('latin1') - return bytes(s) - basestring_ = (bytes, str) - bytes = bytes -text = str - -if sys.version < "3": - - def next(obj): - return obj.next() -else: - next = next - -if sys.version < "3": - - def is_unicode(obj): - return isinstance(obj, unicode) -else: - - def is_unicode(obj): - return isinstance(obj, str) - - -def coerce_text(v): - if not isinstance(v, basestring_): - if sys.version < "3": - attr = '__unicode__' - else: - attr = '__str__' - if hasattr(v, attr): - return unicode(v) - else: - return bytes(v) - return v diff --git a/third_party/cython/src/Cython/TestUtils.py b/third_party/cython/src/Cython/TestUtils.py deleted file mode 100644 index bf5886aa72f71..0000000000000 --- a/third_party/cython/src/Cython/TestUtils.py +++ /dev/null @@ -1,204 +0,0 @@ -import Cython.Compiler.Errors as Errors -from Cython.CodeWriter import CodeWriter -from Cython.Compiler.TreeFragment import TreeFragment, strip_common_indent -from Cython.Compiler.Visitor import TreeVisitor, VisitorTransform -from Cython.Compiler import TreePath - -import unittest -import os, sys -import tempfile - - -class NodeTypeWriter(TreeVisitor): - def __init__(self): - super(NodeTypeWriter, self).__init__() - self._indents = 0 - self.result = [] - - def visit_Node(self, node): - if not self.access_path: - name = u"(root)" - else: - tip = self.access_path[-1] - if tip[2] is not None: - name = u"%s[%d]" % tip[1:3] - else: - name = tip[1] - - self.result.append(u" " * self._indents + - u"%s: %s" % (name, node.__class__.__name__)) - self._indents += 1 - self.visitchildren(node) - self._indents -= 1 - - -def treetypes(root): - """Returns a string representing the tree by class names. - There's a leading and trailing whitespace so that it can be - compared by simple string comparison while still making test - cases look ok.""" - w = NodeTypeWriter() - w.visit(root) - return u"\n".join([u""] + w.result + [u""]) - - -class CythonTest(unittest.TestCase): - - def setUp(self): - self.listing_file = Errors.listing_file - self.echo_file = Errors.echo_file - Errors.listing_file = Errors.echo_file = None - - def tearDown(self): - Errors.listing_file = self.listing_file - Errors.echo_file = self.echo_file - - def assertLines(self, expected, result): - "Checks that the given strings or lists of strings are equal line by line" - if not isinstance(expected, list): expected = expected.split(u"\n") - if not isinstance(result, list): result = result.split(u"\n") - for idx, (expected_line, result_line) in enumerate(zip(expected, result)): - self.assertEqual(expected_line, result_line, "Line %d:\nExp: %s\nGot: %s" % (idx, expected_line, result_line)) - self.assertEqual(len(expected), len(result), - "Unmatched lines. Got:\n%s\nExpected:\n%s" % ("\n".join(expected), u"\n".join(result))) - - def codeToLines(self, tree): - writer = CodeWriter() - writer.write(tree) - return writer.result.lines - - def codeToString(self, tree): - return "\n".join(self.codeToLines(tree)) - - def assertCode(self, expected, result_tree): - result_lines = self.codeToLines(result_tree) - - expected_lines = strip_common_indent(expected.split("\n")) - - for idx, (line, expected_line) in enumerate(zip(result_lines, expected_lines)): - self.assertEqual(expected_line, line, "Line %d:\nGot: %s\nExp: %s" % (idx, line, expected_line)) - self.assertEqual(len(result_lines), len(expected_lines), - "Unmatched lines. Got:\n%s\nExpected:\n%s" % ("\n".join(result_lines), expected)) - - def assertNodeExists(self, path, result_tree): - self.assertNotEqual(TreePath.find_first(result_tree, path), None, - "Path '%s' not found in result tree" % path) - - def fragment(self, code, pxds={}, pipeline=[]): - "Simply create a tree fragment using the name of the test-case in parse errors." - name = self.id() - if name.startswith("__main__."): name = name[len("__main__."):] - name = name.replace(".", "_") - return TreeFragment(code, name, pxds, pipeline=pipeline) - - def treetypes(self, root): - return treetypes(root) - - def should_fail(self, func, exc_type=Exception): - """Calls "func" and fails if it doesn't raise the right exception - (any exception by default). Also returns the exception in question. - """ - try: - func() - self.fail("Expected an exception of type %r" % exc_type) - except exc_type, e: - self.assert_(isinstance(e, exc_type)) - return e - - def should_not_fail(self, func): - """Calls func and succeeds if and only if no exception is raised - (i.e. converts exception raising into a failed testcase). Returns - the return value of func.""" - try: - return func() - except: - self.fail(str(sys.exc_info()[1])) - - -class TransformTest(CythonTest): - """ - Utility base class for transform unit tests. It is based around constructing - test trees (either explicitly or by parsing a Cython code string); running - the transform, serialize it using a customized Cython serializer (with - special markup for nodes that cannot be represented in Cython), - and do a string-comparison line-by-line of the result. - - To create a test case: - - Call run_pipeline. The pipeline should at least contain the transform you - are testing; pyx should be either a string (passed to the parser to - create a post-parse tree) or a node representing input to pipeline. - The result will be a transformed result. - - - Check that the tree is correct. If wanted, assertCode can be used, which - takes a code string as expected, and a ModuleNode in result_tree - (it serializes the ModuleNode to a string and compares line-by-line). - - All code strings are first stripped for whitespace lines and then common - indentation. - - Plans: One could have a pxd dictionary parameter to run_pipeline. - """ - - def run_pipeline(self, pipeline, pyx, pxds={}): - tree = self.fragment(pyx, pxds).root - # Run pipeline - for T in pipeline: - tree = T(tree) - return tree - - -class TreeAssertVisitor(VisitorTransform): - # actually, a TreeVisitor would be enough, but this needs to run - # as part of the compiler pipeline - - def visit_CompilerDirectivesNode(self, node): - directives = node.directives - if 'test_assert_path_exists' in directives: - for path in directives['test_assert_path_exists']: - if TreePath.find_first(node, path) is None: - Errors.error( - node.pos, - "Expected path '%s' not found in result tree" % path) - if 'test_fail_if_path_exists' in directives: - for path in directives['test_fail_if_path_exists']: - if TreePath.find_first(node, path) is not None: - Errors.error( - node.pos, - "Unexpected path '%s' found in result tree" % path) - self.visitchildren(node) - return node - - visit_Node = VisitorTransform.recurse_to_children - - -def unpack_source_tree(tree_file, dir=None): - if dir is None: - dir = tempfile.mkdtemp() - header = [] - cur_file = None - f = open(tree_file) - try: - lines = f.readlines() - finally: - f.close() - del f - try: - for line in lines: - if line[:5] == '#####': - filename = line.strip().strip('#').strip().replace('/', os.path.sep) - path = os.path.join(dir, filename) - if not os.path.exists(os.path.dirname(path)): - os.makedirs(os.path.dirname(path)) - if cur_file is not None: - f, cur_file = cur_file, None - f.close() - cur_file = open(path, 'w') - elif cur_file is not None: - cur_file.write(line) - elif line.strip() and not line.lstrip().startswith('#'): - if line.strip() not in ('"""', "'''"): - header.append(line) - finally: - if cur_file is not None: - cur_file.close() - return dir, ''.join(header) diff --git a/third_party/cython/src/Cython/Tests/TestCodeWriter.py b/third_party/cython/src/Cython/Tests/TestCodeWriter.py deleted file mode 100644 index 6f9b5478a9384..0000000000000 --- a/third_party/cython/src/Cython/Tests/TestCodeWriter.py +++ /dev/null @@ -1,82 +0,0 @@ -from Cython.TestUtils import CythonTest - -class TestCodeWriter(CythonTest): - # CythonTest uses the CodeWriter heavily, so do some checking by - # roundtripping Cython code through the test framework. - - # Note that this test is dependant upon the normal Cython parser - # to generate the input trees to the CodeWriter. This save *a lot* - # of time; better to spend that time writing other tests than perfecting - # this one... - - # Whitespace is very significant in this process: - # - always newline on new block (!) - # - indent 4 spaces - # - 1 space around every operator - - def t(self, codestr): - self.assertCode(codestr, self.fragment(codestr).root) - - def test_print(self): - self.t(u""" - print x, y - print x + y ** 2 - print x, y, z, - """) - - def test_if(self): - self.t(u"if x:\n pass") - - def test_ifelifelse(self): - self.t(u""" - if x: - pass - elif y: - pass - elif z + 34 ** 34 - 2: - pass - else: - pass - """) - - def test_def(self): - self.t(u""" - def f(x, y, z): - pass - def f(x = 34, y = 54, z): - pass - """) - - def test_longness_and_signedness(self): - self.t(u"def f(unsigned long long long long long int y):\n pass") - - def test_signed_short(self): - self.t(u"def f(signed short int y):\n pass") - - def test_typed_args(self): - self.t(u"def f(int x, unsigned long int y):\n pass") - - def test_cdef_var(self): - self.t(u""" - cdef int hello - cdef int hello = 4, x = 3, y, z - """) - - def test_for_loop(self): - self.t(u""" - for x, y, z in f(g(h(34) * 2) + 23): - print x, y, z - else: - print 43 - """) - - def test_inplace_assignment(self): - self.t(u"x += 43") - - def test_attribute(self): - self.t(u"a.x") - -if __name__ == "__main__": - import unittest - unittest.main() - diff --git a/third_party/cython/src/Cython/Tests/TestStringIOTree.py b/third_party/cython/src/Cython/Tests/TestStringIOTree.py deleted file mode 100644 index 09c04a514146a..0000000000000 --- a/third_party/cython/src/Cython/Tests/TestStringIOTree.py +++ /dev/null @@ -1,67 +0,0 @@ -import unittest - -from Cython import StringIOTree as stringtree - -code = """ -cdef int spam # line 1 - -cdef ham(): - a = 1 - b = 2 - c = 3 - d = 4 - -def eggs(): - pass - -cpdef bacon(): - print spam - print 'scotch' - print 'tea?' - print 'or coffee?' # line 16 -""" - -linemap = dict(enumerate(code.splitlines())) - -class TestStringIOTree(unittest.TestCase): - - def setUp(self): - self.tree = stringtree.StringIOTree() - - def test_markers(self): - assert not self.tree.allmarkers() - - def test_insertion(self): - self.write_lines((1, 2, 3)) - line_4_to_6_insertion_point = self.tree.insertion_point() - self.write_lines((7, 8)) - line_9_to_13_insertion_point = self.tree.insertion_point() - self.write_lines((14, 15, 16)) - - line_4_insertion_point = line_4_to_6_insertion_point.insertion_point() - self.write_lines((5, 6), tree=line_4_to_6_insertion_point) - - line_9_to_12_insertion_point = ( - line_9_to_13_insertion_point.insertion_point()) - self.write_line(13, tree=line_9_to_13_insertion_point) - - self.write_line(4, tree=line_4_insertion_point) - self.write_line(9, tree=line_9_to_12_insertion_point) - line_10_insertion_point = line_9_to_12_insertion_point.insertion_point() - self.write_line(11, tree=line_9_to_12_insertion_point) - self.write_line(10, tree=line_10_insertion_point) - self.write_line(12, tree=line_9_to_12_insertion_point) - - self.assertEqual(self.tree.allmarkers(), range(1, 17)) - self.assertEqual(code.strip(), self.tree.getvalue().strip()) - - - def write_lines(self, linenos, tree=None): - for lineno in linenos: - self.write_line(lineno, tree=tree) - - def write_line(self, lineno, tree=None): - if tree is None: - tree = self.tree - tree.markers.append(lineno) - tree.write(linemap[lineno] + '\n') diff --git a/third_party/cython/src/Cython/Tests/__init__.py b/third_party/cython/src/Cython/Tests/__init__.py deleted file mode 100644 index fa81adaff68e0..0000000000000 --- a/third_party/cython/src/Cython/Tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# empty file diff --git a/third_party/cython/src/Cython/Tests/xmlrunner.py b/third_party/cython/src/Cython/Tests/xmlrunner.py deleted file mode 100644 index b8bfc024f44c2..0000000000000 --- a/third_party/cython/src/Cython/Tests/xmlrunner.py +++ /dev/null @@ -1,376 +0,0 @@ -# -*- coding: utf-8 -*- - -"""unittest-xml-reporting is a PyUnit-based TestRunner that can export test -results to XML files that can be consumed by a wide range of tools, such as -build systems, IDEs and Continuous Integration servers. - -This module provides the XMLTestRunner class, which is heavily based on the -default TextTestRunner. This makes the XMLTestRunner very simple to use. - -The script below, adapted from the unittest documentation, shows how to use -XMLTestRunner in a very simple way. In fact, the only difference between this -script and the original one is the last line: - -import random -import unittest -import xmlrunner - -class TestSequenceFunctions(unittest.TestCase): - def setUp(self): - self.seq = range(10) - - def test_shuffle(self): - # make sure the shuffled sequence does not lose any elements - random.shuffle(self.seq) - self.seq.sort() - self.assertEqual(self.seq, range(10)) - - def test_choice(self): - element = random.choice(self.seq) - self.assert_(element in self.seq) - - def test_sample(self): - self.assertRaises(ValueError, random.sample, self.seq, 20) - for element in random.sample(self.seq, 5): - self.assert_(element in self.seq) - -if __name__ == '__main__': - unittest.main(testRunner=xmlrunner.XMLTestRunner(output='test-reports')) -""" - -import os -import sys -import time -from unittest import TestResult, _TextTestResult, TextTestRunner -from cStringIO import StringIO -import xml.dom.minidom - - -class XMLDocument(xml.dom.minidom.Document): - def createCDATAOrText(self, data): - if ']]>' in data: - return self.createTextNode(data) - return self.createCDATASection(data) - - -class _TestInfo(object): - """This class is used to keep useful information about the execution of a - test method. - """ - - # Possible test outcomes - (SUCCESS, FAILURE, ERROR) = range(3) - - def __init__(self, test_result, test_method, outcome=SUCCESS, err=None): - "Create a new instance of _TestInfo." - self.test_result = test_result - self.test_method = test_method - self.outcome = outcome - self.err = err - self.stdout = test_result.stdout and test_result.stdout.getvalue().strip() or '' - self.stderr = test_result.stdout and test_result.stderr.getvalue().strip() or '' - - def get_elapsed_time(self): - """Return the time that shows how long the test method took to - execute. - """ - return self.test_result.stop_time - self.test_result.start_time - - def get_description(self): - "Return a text representation of the test method." - return self.test_result.getDescription(self.test_method) - - def get_error_info(self): - """Return a text representation of an exception thrown by a test - method. - """ - if not self.err: - return '' - if sys.version_info < (2,4): - return self.test_result._exc_info_to_string(self.err) - else: - return self.test_result._exc_info_to_string( - self.err, self.test_method) - - -class _XMLTestResult(_TextTestResult): - """A test result class that can express test results in a XML report. - - Used by XMLTestRunner. - """ - def __init__(self, stream=sys.stderr, descriptions=1, verbosity=1, \ - elapsed_times=True): - "Create a new instance of _XMLTestResult." - _TextTestResult.__init__(self, stream, descriptions, verbosity) - self.successes = [] - self.callback = None - self.elapsed_times = elapsed_times - self.output_patched = False - - def _prepare_callback(self, test_info, target_list, verbose_str, - short_str): - """Append a _TestInfo to the given target list and sets a callback - method to be called by stopTest method. - """ - target_list.append(test_info) - def callback(): - """This callback prints the test method outcome to the stream, - as well as the elapsed time. - """ - - # Ignore the elapsed times for a more reliable unit testing - if not self.elapsed_times: - self.start_time = self.stop_time = 0 - - if self.showAll: - self.stream.writeln('(%.3fs) %s' % \ - (test_info.get_elapsed_time(), verbose_str)) - elif self.dots: - self.stream.write(short_str) - self.callback = callback - - def _patch_standard_output(self): - """Replace the stdout and stderr streams with string-based streams - in order to capture the tests' output. - """ - if not self.output_patched: - (self.old_stdout, self.old_stderr) = (sys.stdout, sys.stderr) - self.output_patched = True - (sys.stdout, sys.stderr) = (self.stdout, self.stderr) = \ - (StringIO(), StringIO()) - - def _restore_standard_output(self): - "Restore the stdout and stderr streams." - (sys.stdout, sys.stderr) = (self.old_stdout, self.old_stderr) - self.output_patched = False - - def startTest(self, test): - "Called before execute each test method." - self._patch_standard_output() - self.start_time = time.time() - TestResult.startTest(self, test) - - if self.showAll: - self.stream.write(' ' + self.getDescription(test)) - self.stream.write(" ... ") - - def stopTest(self, test): - "Called after execute each test method." - self._restore_standard_output() - _TextTestResult.stopTest(self, test) - self.stop_time = time.time() - - if self.callback and callable(self.callback): - self.callback() - self.callback = None - - def addSuccess(self, test): - "Called when a test executes successfully." - self._prepare_callback(_TestInfo(self, test), - self.successes, 'OK', '.') - - def addFailure(self, test, err): - "Called when a test method fails." - self._prepare_callback(_TestInfo(self, test, _TestInfo.FAILURE, err), - self.failures, 'FAIL', 'F') - - def addError(self, test, err): - "Called when a test method raises an error." - self._prepare_callback(_TestInfo(self, test, _TestInfo.ERROR, err), - self.errors, 'ERROR', 'E') - - def printErrorList(self, flavour, errors): - "Write some information about the FAIL or ERROR to the stream." - for test_info in errors: - if isinstance(test_info, tuple): - test_info, exc_info = test_info - self.stream.writeln(self.separator1) - self.stream.writeln('%s [%.3fs]: %s' % ( - flavour, test_info.get_elapsed_time(), - test_info.get_description())) - self.stream.writeln(self.separator2) - self.stream.writeln('%s' % test_info.get_error_info()) - - def _get_info_by_testcase(self): - """This method organizes test results by TestCase module. This - information is used during the report generation, where a XML report - will be generated for each TestCase. - """ - tests_by_testcase = {} - - for tests in (self.successes, self.failures, self.errors): - for test_info in tests: - testcase = type(test_info.test_method) - - # Ignore module name if it is '__main__' - module = testcase.__module__ + '.' - if module == '__main__.': - module = '' - testcase_name = module + testcase.__name__ - - if testcase_name not in tests_by_testcase: - tests_by_testcase[testcase_name] = [] - tests_by_testcase[testcase_name].append(test_info) - - return tests_by_testcase - - def _report_testsuite(suite_name, tests, xml_document): - "Appends the testsuite section to the XML document." - testsuite = xml_document.createElement('testsuite') - xml_document.appendChild(testsuite) - - testsuite.setAttribute('name', str(suite_name)) - testsuite.setAttribute('tests', str(len(tests))) - - testsuite.setAttribute('time', '%.3f' % - sum([e.get_elapsed_time() for e in tests])) - - failures = len([1 for e in tests if e.outcome == _TestInfo.FAILURE]) - testsuite.setAttribute('failures', str(failures)) - - errors = len([1 for e in tests if e.outcome == _TestInfo.ERROR]) - testsuite.setAttribute('errors', str(errors)) - - return testsuite - - _report_testsuite = staticmethod(_report_testsuite) - - def _report_testcase(suite_name, test_result, xml_testsuite, xml_document): - "Appends a testcase section to the XML document." - testcase = xml_document.createElement('testcase') - xml_testsuite.appendChild(testcase) - - testcase.setAttribute('classname', str(suite_name)) - testcase.setAttribute('name', test_result.test_method.shortDescription() - or getattr(test_result.test_method, '_testMethodName', - str(test_result.test_method))) - testcase.setAttribute('time', '%.3f' % test_result.get_elapsed_time()) - - if (test_result.outcome != _TestInfo.SUCCESS): - elem_name = ('failure', 'error')[test_result.outcome-1] - failure = xml_document.createElement(elem_name) - testcase.appendChild(failure) - - failure.setAttribute('type', str(test_result.err[0].__name__)) - failure.setAttribute('message', str(test_result.err[1])) - - error_info = test_result.get_error_info() - failureText = xml_document.createCDATAOrText(error_info) - failure.appendChild(failureText) - - _report_testcase = staticmethod(_report_testcase) - - def _report_output(test_runner, xml_testsuite, xml_document, stdout, stderr): - "Appends the system-out and system-err sections to the XML document." - systemout = xml_document.createElement('system-out') - xml_testsuite.appendChild(systemout) - - systemout_text = xml_document.createCDATAOrText(stdout) - systemout.appendChild(systemout_text) - - systemerr = xml_document.createElement('system-err') - xml_testsuite.appendChild(systemerr) - - systemerr_text = xml_document.createCDATAOrText(stderr) - systemerr.appendChild(systemerr_text) - - _report_output = staticmethod(_report_output) - - def generate_reports(self, test_runner): - "Generates the XML reports to a given XMLTestRunner object." - all_results = self._get_info_by_testcase() - - if type(test_runner.output) == str and not \ - os.path.exists(test_runner.output): - os.makedirs(test_runner.output) - - for suite, tests in all_results.items(): - doc = XMLDocument() - - # Build the XML file - testsuite = _XMLTestResult._report_testsuite(suite, tests, doc) - stdout, stderr = [], [] - for test in tests: - _XMLTestResult._report_testcase(suite, test, testsuite, doc) - if test.stdout: - stdout.extend(['*****************', test.get_description(), test.stdout]) - if test.stderr: - stderr.extend(['*****************', test.get_description(), test.stderr]) - _XMLTestResult._report_output(test_runner, testsuite, doc, - '\n'.join(stdout), '\n'.join(stderr)) - xml_content = doc.toprettyxml(indent='\t') - - if type(test_runner.output) is str: - report_file = open('%s%sTEST-%s.xml' % \ - (test_runner.output, os.sep, suite), 'w') - try: - report_file.write(xml_content) - finally: - report_file.close() - else: - # Assume that test_runner.output is a stream - test_runner.output.write(xml_content) - - -class XMLTestRunner(TextTestRunner): - """A test runner class that outputs the results in JUnit like XML files. - """ - def __init__(self, output='.', stream=sys.stderr, descriptions=True, \ - verbose=False, elapsed_times=True): - "Create a new instance of XMLTestRunner." - verbosity = (1, 2)[verbose] - TextTestRunner.__init__(self, stream, descriptions, verbosity) - self.output = output - self.elapsed_times = elapsed_times - - def _make_result(self): - """Create the TestResult object which will be used to store - information about the executed tests. - """ - return _XMLTestResult(self.stream, self.descriptions, \ - self.verbosity, self.elapsed_times) - - def run(self, test): - "Run the given test case or test suite." - # Prepare the test execution - result = self._make_result() - - # Print a nice header - self.stream.writeln() - self.stream.writeln('Running tests...') - self.stream.writeln(result.separator2) - - # Execute tests - start_time = time.time() - test(result) - stop_time = time.time() - time_taken = stop_time - start_time - - # Print results - result.printErrors() - self.stream.writeln(result.separator2) - run = result.testsRun - self.stream.writeln("Ran %d test%s in %.3fs" % - (run, run != 1 and "s" or "", time_taken)) - self.stream.writeln() - - # Error traces - if not result.wasSuccessful(): - self.stream.write("FAILED (") - failed, errored = (len(result.failures), len(result.errors)) - if failed: - self.stream.write("failures=%d" % failed) - if errored: - if failed: - self.stream.write(", ") - self.stream.write("errors=%d" % errored) - self.stream.writeln(")") - else: - self.stream.writeln("OK") - - # Generate reports - self.stream.writeln() - self.stream.writeln('Generating XML reports...') - result.generate_reports(self) - - return result diff --git a/third_party/cython/src/Cython/Utility/Buffer.c b/third_party/cython/src/Cython/Utility/Buffer.c deleted file mode 100644 index 9e43d5d7dd6a6..0000000000000 --- a/third_party/cython/src/Cython/Utility/Buffer.c +++ /dev/null @@ -1,947 +0,0 @@ -/////////////// BufferStructDeclare.proto /////////////// - -/* structs for buffer access */ - -typedef struct { - Py_ssize_t shape, strides, suboffsets; -} __Pyx_Buf_DimInfo; - -typedef struct { - size_t refcount; - Py_buffer pybuffer; -} __Pyx_Buffer; - -typedef struct { - __Pyx_Buffer *rcbuffer; - char *data; - __Pyx_Buf_DimInfo diminfo[{{max_dims}}]; -} __Pyx_LocalBuf_ND; - -/////////////// BufferIndexError.proto /////////////// -static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ - -/////////////// BufferIndexError /////////////// -static void __Pyx_RaiseBufferIndexError(int axis) { - PyErr_Format(PyExc_IndexError, - "Out of bounds on buffer access (axis %d)", axis); -} - -/////////////// BufferIndexErrorNogil.proto /////////////// -//@requires: BufferIndexError - -static void __Pyx_RaiseBufferIndexErrorNogil(int axis); /*proto*/ - -/////////////// BufferIndexErrorNogil /////////////// -static void __Pyx_RaiseBufferIndexErrorNogil(int axis) { - #ifdef WITH_THREAD - PyGILState_STATE gilstate = PyGILState_Ensure(); - #endif - __Pyx_RaiseBufferIndexError(axis); - #ifdef WITH_THREAD - PyGILState_Release(gilstate); - #endif -} - -/////////////// BufferFallbackError.proto /////////////// -static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ - -/////////////// BufferFallbackError /////////////// -static void __Pyx_RaiseBufferFallbackError(void) { - PyErr_SetString(PyExc_ValueError, - "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); -} - -/////////////// BufferFormatStructs.proto /////////////// - -#define IS_UNSIGNED(type) (((type) -1) > 0) - -/* Run-time type information about structs used with buffers */ -struct __Pyx_StructField_; - -#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) - -typedef struct { - const char* name; /* for error messages only */ - struct __Pyx_StructField_* fields; - size_t size; /* sizeof(type) */ - size_t arraysize[8]; /* length of array in each dimension */ - int ndim; - char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */ - char is_unsigned; - int flags; -} __Pyx_TypeInfo; - -typedef struct __Pyx_StructField_ { - __Pyx_TypeInfo* type; - const char* name; - size_t offset; -} __Pyx_StructField; - -typedef struct { - __Pyx_StructField* field; - size_t parent_offset; -} __Pyx_BufFmt_StackElem; - -typedef struct { - __Pyx_StructField root; - __Pyx_BufFmt_StackElem* head; - size_t fmt_offset; - size_t new_count, enc_count; - size_t struct_alignment; - int is_complex; - char enc_type; - char new_packmode; - char enc_packmode; - char is_valid_array; -} __Pyx_BufFmt_Context; - -/////////////// GetAndReleaseBuffer.proto /////////////// -#if PY_MAJOR_VERSION < 3 - static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); - static void __Pyx_ReleaseBuffer(Py_buffer *view); -#else - #define __Pyx_GetBuffer PyObject_GetBuffer - #define __Pyx_ReleaseBuffer PyBuffer_Release -#endif - -/////////////// GetAndReleaseBuffer /////////////// -#if PY_MAJOR_VERSION < 3 -static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { - #if PY_VERSION_HEX >= 0x02060000 - if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); - #endif - - {{for type_ptr, getbuffer, releasebuffer in types}} - {{if getbuffer}} - if (PyObject_TypeCheck(obj, {{type_ptr}})) return {{getbuffer}}(obj, view, flags); - {{endif}} - {{endfor}} - - #if PY_VERSION_HEX < 0x02060000 - if (obj->ob_type->tp_dict) { - PyObject *getbuffer_cobj = PyObject_GetItem( - obj->ob_type->tp_dict, PYIDENT("__pyx_getbuffer")); - if (getbuffer_cobj) { - getbufferproc func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj); - Py_DECREF(getbuffer_cobj); - if (!func) - goto fail; - - return func(obj, view, flags); - } else { - PyErr_Clear(); - } - } - #endif - - PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); - -#if PY_VERSION_HEX < 0x02060000 -fail: -#endif - - return -1; -} - -static void __Pyx_ReleaseBuffer(Py_buffer *view) { - PyObject *obj = view->obj; - if (!obj) return; - - #if PY_VERSION_HEX >= 0x02060000 - if (PyObject_CheckBuffer(obj)) { - PyBuffer_Release(view); - return; - } - #endif - - {{for type_ptr, getbuffer, releasebuffer in types}} - {{if releasebuffer}} - if (PyObject_TypeCheck(obj, {{type_ptr}})) { {{releasebuffer}}(obj, view); return; } - {{endif}} - {{endfor}} - - #if PY_VERSION_HEX < 0x02060000 - if (obj->ob_type->tp_dict) { - PyObject *releasebuffer_cobj = PyObject_GetItem( - obj->ob_type->tp_dict, PYIDENT("__pyx_releasebuffer")); - if (releasebuffer_cobj) { - releasebufferproc func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj); - Py_DECREF(releasebuffer_cobj); - if (!func) - goto fail; - func(obj, view); - return; - } else { - PyErr_Clear(); - } - } - #endif - - goto nofail; - -#if PY_VERSION_HEX < 0x02060000 -fail: -#endif - PyErr_WriteUnraisable(obj); - -nofail: - Py_DECREF(obj); - view->obj = NULL; -} - -#endif /* PY_MAJOR_VERSION < 3 */ - -/////////////// BufferFormatCheck.proto /////////////// -{{# - - Buffer format string checking - - Buffer type checking. Utility code for checking that acquired - buffers match our assumptions. We only need to check ndim and - the format string; the access mode/flags is checked by the - exporter. See: - - http://docs.python.org/3/library/struct.html - http://legacy.python.org/dev/peps/pep-3118/#additions-to-the-struct-string-syntax - - The alignment code is copied from _struct.c in Python. -}} - -static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, - __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); -static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); - -/////////////// BufferFormatCheck /////////////// -static CYTHON_INLINE int __Pyx_IsLittleEndian(void) { - unsigned int n = 1; - return *(unsigned char*)(&n) != 0; -} - - -static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, - __Pyx_BufFmt_StackElem* stack, - __Pyx_TypeInfo* type) { - stack[0].field = &ctx->root; - stack[0].parent_offset = 0; - ctx->root.type = type; - ctx->root.name = "buffer dtype"; - ctx->root.offset = 0; - ctx->head = stack; - ctx->head->field = &ctx->root; - ctx->fmt_offset = 0; - ctx->head->parent_offset = 0; - ctx->new_packmode = '@'; - ctx->enc_packmode = '@'; - ctx->new_count = 1; - ctx->enc_count = 0; - ctx->enc_type = 0; - ctx->is_complex = 0; - ctx->is_valid_array = 0; - ctx->struct_alignment = 0; - while (type->typegroup == 'S') { - ++ctx->head; - ctx->head->field = type->fields; - ctx->head->parent_offset = 0; - type = type->fields->type; - } -} - -static int __Pyx_BufFmt_ParseNumber(const char** ts) { - int count; - const char* t = *ts; - if (*t < '0' || *t > '9') { - return -1; - } else { - count = *t++ - '0'; - while (*t >= '0' && *t < '9') { - count *= 10; - count += *t++ - '0'; - } - } - *ts = t; - return count; -} - -static int __Pyx_BufFmt_ExpectNumber(const char **ts) { - int number = __Pyx_BufFmt_ParseNumber(ts); - if (number == -1) /* First char was not a digit */ - PyErr_Format(PyExc_ValueError,\ - "Does not understand character buffer dtype format string ('%c')", **ts); - return number; -} - - -static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { - PyErr_Format(PyExc_ValueError, - "Unexpected format string character: '%c'", ch); -} - -static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { - switch (ch) { - case 'c': return "'char'"; - case 'b': return "'signed char'"; - case 'B': return "'unsigned char'"; - case 'h': return "'short'"; - case 'H': return "'unsigned short'"; - case 'i': return "'int'"; - case 'I': return "'unsigned int'"; - case 'l': return "'long'"; - case 'L': return "'unsigned long'"; - case 'q': return "'long long'"; - case 'Q': return "'unsigned long long'"; - case 'f': return (is_complex ? "'complex float'" : "'float'"); - case 'd': return (is_complex ? "'complex double'" : "'double'"); - case 'g': return (is_complex ? "'complex long double'" : "'long double'"); - case 'T': return "a struct"; - case 'O': return "Python object"; - case 'P': return "a pointer"; - case 's': case 'p': return "a string"; - case 0: return "end"; - default: return "unparseable format string"; - } -} - -static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { - switch (ch) { - case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; - case 'h': case 'H': return 2; - case 'i': case 'I': case 'l': case 'L': return 4; - case 'q': case 'Q': return 8; - case 'f': return (is_complex ? 8 : 4); - case 'd': return (is_complex ? 16 : 8); - case 'g': { - PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); - return 0; - } - case 'O': case 'P': return sizeof(void*); - default: - __Pyx_BufFmt_RaiseUnexpectedChar(ch); - return 0; - } -} - -static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { - switch (ch) { - case 'c': case 'b': case 'B': case 's': case 'p': return 1; - case 'h': case 'H': return sizeof(short); - case 'i': case 'I': return sizeof(int); - case 'l': case 'L': return sizeof(long); - #ifdef HAVE_LONG_LONG - case 'q': case 'Q': return sizeof(PY_LONG_LONG); - #endif - case 'f': return sizeof(float) * (is_complex ? 2 : 1); - case 'd': return sizeof(double) * (is_complex ? 2 : 1); - case 'g': return sizeof(long double) * (is_complex ? 2 : 1); - case 'O': case 'P': return sizeof(void*); - default: { - __Pyx_BufFmt_RaiseUnexpectedChar(ch); - return 0; - } - } -} - -typedef struct { char c; short x; } __Pyx_st_short; -typedef struct { char c; int x; } __Pyx_st_int; -typedef struct { char c; long x; } __Pyx_st_long; -typedef struct { char c; float x; } __Pyx_st_float; -typedef struct { char c; double x; } __Pyx_st_double; -typedef struct { char c; long double x; } __Pyx_st_longdouble; -typedef struct { char c; void *x; } __Pyx_st_void_p; -#ifdef HAVE_LONG_LONG -typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; -#endif - -static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) { - switch (ch) { - case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; - case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); - case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); - case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); -#ifdef HAVE_LONG_LONG - case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); -#endif - case 'f': return sizeof(__Pyx_st_float) - sizeof(float); - case 'd': return sizeof(__Pyx_st_double) - sizeof(double); - case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); - case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); - default: - __Pyx_BufFmt_RaiseUnexpectedChar(ch); - return 0; - } -} - -/* These are for computing the padding at the end of the struct to align - on the first member of the struct. This will probably the same as above, - but we don't have any guarantees. - */ -typedef struct { short x; char c; } __Pyx_pad_short; -typedef struct { int x; char c; } __Pyx_pad_int; -typedef struct { long x; char c; } __Pyx_pad_long; -typedef struct { float x; char c; } __Pyx_pad_float; -typedef struct { double x; char c; } __Pyx_pad_double; -typedef struct { long double x; char c; } __Pyx_pad_longdouble; -typedef struct { void *x; char c; } __Pyx_pad_void_p; -#ifdef HAVE_LONG_LONG -typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; -#endif - -static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) { - switch (ch) { - case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; - case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); - case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); - case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); -#ifdef HAVE_LONG_LONG - case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); -#endif - case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); - case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); - case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); - case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); - default: - __Pyx_BufFmt_RaiseUnexpectedChar(ch); - return 0; - } -} - -static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { - switch (ch) { - case 'c': - return 'H'; - case 'b': case 'h': case 'i': - case 'l': case 'q': case 's': case 'p': - return 'I'; - case 'B': case 'H': case 'I': case 'L': case 'Q': - return 'U'; - case 'f': case 'd': case 'g': - return (is_complex ? 'C' : 'R'); - case 'O': - return 'O'; - case 'P': - return 'P'; - default: { - __Pyx_BufFmt_RaiseUnexpectedChar(ch); - return 0; - } - } -} - - -static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { - if (ctx->head == NULL || ctx->head->field == &ctx->root) { - const char* expected; - const char* quote; - if (ctx->head == NULL) { - expected = "end"; - quote = ""; - } else { - expected = ctx->head->field->type->name; - quote = "'"; - } - PyErr_Format(PyExc_ValueError, - "Buffer dtype mismatch, expected %s%s%s but got %s", - quote, expected, quote, - __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); - } else { - __Pyx_StructField* field = ctx->head->field; - __Pyx_StructField* parent = (ctx->head - 1)->field; - PyErr_Format(PyExc_ValueError, - "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", - field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), - parent->type->name, field->name); - } -} - -static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { - char group; - size_t size, offset, arraysize = 1; - - /* printf("processing... %s\n", ctx->head->field->type->name); */ - - if (ctx->enc_type == 0) return 0; - - /* Validate array size */ - if (ctx->head->field->type->arraysize[0]) { - int i, ndim = 0; - - /* handle strings ('s' and 'p') */ - if (ctx->enc_type == 's' || ctx->enc_type == 'p') { - ctx->is_valid_array = ctx->head->field->type->ndim == 1; - ndim = 1; - if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { - PyErr_Format(PyExc_ValueError, - "Expected a dimension of size %zu, got %zu", - ctx->head->field->type->arraysize[0], ctx->enc_count); - return -1; - } - } - - if (!ctx->is_valid_array) { - PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", - ctx->head->field->type->ndim, ndim); - return -1; - } - for (i = 0; i < ctx->head->field->type->ndim; i++) { - arraysize *= ctx->head->field->type->arraysize[i]; - } - ctx->is_valid_array = 0; - ctx->enc_count = 1; - } - - group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); - do { - __Pyx_StructField* field = ctx->head->field; - __Pyx_TypeInfo* type = field->type; - - if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { - size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); - } else { - size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); - } - - if (ctx->enc_packmode == '@') { - size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); - size_t align_mod_offset; - if (align_at == 0) return -1; - align_mod_offset = ctx->fmt_offset % align_at; - if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; - - if (ctx->struct_alignment == 0) - ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, - ctx->is_complex); - } - - if (type->size != size || type->typegroup != group) { - if (type->typegroup == 'C' && type->fields != NULL) { - /* special case -- treat as struct rather than complex number */ - size_t parent_offset = ctx->head->parent_offset + field->offset; - ++ctx->head; - ctx->head->field = type->fields; - ctx->head->parent_offset = parent_offset; - continue; - } - - if ((type->typegroup == 'H' || group == 'H') && type->size == size) { - /* special case -- chars don't care about sign */ - } else { - __Pyx_BufFmt_RaiseExpected(ctx); - return -1; - } - } - - offset = ctx->head->parent_offset + field->offset; - if (ctx->fmt_offset != offset) { - PyErr_Format(PyExc_ValueError, - "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", - (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); - return -1; - } - - ctx->fmt_offset += size; - if (arraysize) - ctx->fmt_offset += (arraysize - 1) * size; - - --ctx->enc_count; /* Consume from buffer string */ - - /* Done checking, move to next field, pushing or popping struct stack if needed */ - while (1) { - if (field == &ctx->root) { - ctx->head = NULL; - if (ctx->enc_count != 0) { - __Pyx_BufFmt_RaiseExpected(ctx); - return -1; - } - break; /* breaks both loops as ctx->enc_count == 0 */ - } - ctx->head->field = ++field; - if (field->type == NULL) { - --ctx->head; - field = ctx->head->field; - continue; - } else if (field->type->typegroup == 'S') { - size_t parent_offset = ctx->head->parent_offset + field->offset; - if (field->type->fields->type == NULL) continue; /* empty struct */ - field = field->type->fields; - ++ctx->head; - ctx->head->field = field; - ctx->head->parent_offset = parent_offset; - break; - } else { - break; - } - } - } while (ctx->enc_count); - ctx->enc_type = 0; - ctx->is_complex = 0; - return 0; -} - -/* Parse an array in the format string (e.g. (1,2,3)) */ -static CYTHON_INLINE PyObject * -__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) -{ - const char *ts = *tsp; - int i = 0, number; - int ndim = ctx->head->field->type->ndim; -; - ++ts; - if (ctx->new_count != 1) { - PyErr_SetString(PyExc_ValueError, - "Cannot handle repeated arrays in format string"); - return NULL; - } - - /* Process the previous element */ - if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; - - /* Parse all numbers in the format string */ - while (*ts && *ts != ')') { - // ignore space characters (not using isspace() due to C/C++ problem on MacOS-X) - switch (*ts) { - case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; - default: break; /* not a 'break' in the loop */ - } - - number = __Pyx_BufFmt_ExpectNumber(&ts); - if (number == -1) return NULL; - - if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) - return PyErr_Format(PyExc_ValueError, - "Expected a dimension of size %zu, got %d", - ctx->head->field->type->arraysize[i], number); - - if (*ts != ',' && *ts != ')') - return PyErr_Format(PyExc_ValueError, - "Expected a comma in format string, got '%c'", *ts); - - if (*ts == ',') ts++; - i++; - } - - if (i != ndim) - return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", - ctx->head->field->type->ndim, i); - - if (!*ts) { - PyErr_SetString(PyExc_ValueError, - "Unexpected end of format string, expected ')'"); - return NULL; - } - - ctx->is_valid_array = 1; - ctx->new_count = 1; - *tsp = ++ts; - return Py_None; -} - -static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { - int got_Z = 0; - - while (1) { - /* puts(ts); */ - switch(*ts) { - case 0: - if (ctx->enc_type != 0 && ctx->head == NULL) { - __Pyx_BufFmt_RaiseExpected(ctx); - return NULL; - } - if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; - if (ctx->head != NULL) { - __Pyx_BufFmt_RaiseExpected(ctx); - return NULL; - } - return ts; - case ' ': - case '\r': - case '\n': - ++ts; - break; - case '<': - if (!__Pyx_IsLittleEndian()) { - PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); - return NULL; - } - ctx->new_packmode = '='; - ++ts; - break; - case '>': - case '!': - if (__Pyx_IsLittleEndian()) { - PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); - return NULL; - } - ctx->new_packmode = '='; - ++ts; - break; - case '=': - case '@': - case '^': - ctx->new_packmode = *ts++; - break; - case 'T': /* substruct */ - { - const char* ts_after_sub; - size_t i, struct_count = ctx->new_count; - size_t struct_alignment = ctx->struct_alignment; - ctx->new_count = 1; - ++ts; - if (*ts != '{') { - PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); - return NULL; - } - if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; - ctx->enc_type = 0; /* Erase processed last struct element */ - ctx->enc_count = 0; - ctx->struct_alignment = 0; - ++ts; - ts_after_sub = ts; - for (i = 0; i != struct_count; ++i) { - ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); - if (!ts_after_sub) return NULL; - } - ts = ts_after_sub; - if (struct_alignment) ctx->struct_alignment = struct_alignment; - } - break; - case '}': /* end of substruct; either repeat or move on */ - { - size_t alignment = ctx->struct_alignment; - ++ts; - if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; - ctx->enc_type = 0; /* Erase processed last struct element */ - if (alignment && ctx->fmt_offset % alignment) { - /* Pad struct on size of the first member */ - ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); - } - } - return ts; - case 'x': - if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; - ctx->fmt_offset += ctx->new_count; - ctx->new_count = 1; - ctx->enc_count = 0; - ctx->enc_type = 0; - ctx->enc_packmode = ctx->new_packmode; - ++ts; - break; - case 'Z': - got_Z = 1; - ++ts; - if (*ts != 'f' && *ts != 'd' && *ts != 'g') { - __Pyx_BufFmt_RaiseUnexpectedChar('Z'); - return NULL; - } - /* fall through */ - case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': - case 'l': case 'L': case 'q': case 'Q': - case 'f': case 'd': case 'g': - case 'O': case 'p': - if (ctx->enc_type == *ts && got_Z == ctx->is_complex && - ctx->enc_packmode == ctx->new_packmode) { - /* Continue pooling same type */ - ctx->enc_count += ctx->new_count; - ctx->new_count = 1; - got_Z = 0; - ++ts; - break; - } - /* fall through */ - case 's': - /* 's' or new type (cannot be added to current pool) */ - if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; - ctx->enc_count = ctx->new_count; - ctx->enc_packmode = ctx->new_packmode; - ctx->enc_type = *ts; - ctx->is_complex = got_Z; - ++ts; - ctx->new_count = 1; - got_Z = 0; - break; - case ':': - ++ts; - while(*ts != ':') ++ts; - ++ts; - break; - case '(': - if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL; - break; - default: - { - int number = __Pyx_BufFmt_ExpectNumber(&ts); - if (number == -1) return NULL; - ctx->new_count = (size_t)number; - } - } - } -} - -static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) { - buf->buf = NULL; - buf->obj = NULL; - buf->strides = __Pyx_zeros; - buf->shape = __Pyx_zeros; - buf->suboffsets = __Pyx_minusones; -} - -static CYTHON_INLINE int __Pyx_GetBufferAndValidate( - Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, - int nd, int cast, __Pyx_BufFmt_StackElem* stack) -{ - if (obj == Py_None || obj == NULL) { - __Pyx_ZeroBuffer(buf); - return 0; - } - buf->buf = NULL; - if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail; - if (buf->ndim != nd) { - PyErr_Format(PyExc_ValueError, - "Buffer has wrong number of dimensions (expected %d, got %d)", - nd, buf->ndim); - goto fail; - } - if (!cast) { - __Pyx_BufFmt_Context ctx; - __Pyx_BufFmt_Init(&ctx, stack, dtype); - if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; - } - if ((unsigned)buf->itemsize != dtype->size) { - PyErr_Format(PyExc_ValueError, - "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)", - buf->itemsize, (buf->itemsize > 1) ? "s" : "", - dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : ""); - goto fail; - } - if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; - return 0; -fail:; - __Pyx_ZeroBuffer(buf); - return -1; -} - -static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { - if (info->buf == NULL) return; - if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; - __Pyx_ReleaseBuffer(info); -} - -/////////////// TypeInfoCompare.proto /////////////// -static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b); - -/////////////// TypeInfoCompare /////////////// -/* See if two dtypes are equal */ -static int -__pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b) -{ - int i; - - if (!a || !b) - return 0; - - if (a == b) - return 1; - - if (a->size != b->size || a->typegroup != b->typegroup || - a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) { - if (a->typegroup == 'H' || b->typegroup == 'H') { - /* Special case for chars */ - return a->size == b->size; - } else { - return 0; - } - } - - if (a->ndim) { - /* Verify multidimensional C arrays */ - for (i = 0; i < a->ndim; i++) - if (a->arraysize[i] != b->arraysize[i]) - return 0; - } - - if (a->typegroup == 'S') { - /* Check for packed struct */ - if (a->flags != b->flags) - return 0; - - /* compare all struct fields */ - if (a->fields || b->fields) { - /* Check if both have fields */ - if (!(a->fields && b->fields)) - return 0; - - /* compare */ - for (i = 0; a->fields[i].type && b->fields[i].type; i++) { - __Pyx_StructField *field_a = a->fields + i; - __Pyx_StructField *field_b = b->fields + i; - - if (field_a->offset != field_b->offset || - !__pyx_typeinfo_cmp(field_a->type, field_b->type)) - return 0; - } - - /* If all fields are processed, we have a match */ - return !a->fields[i].type && !b->fields[i].type; - } - } - - return 1; -} - - - -/////////////// TypeInfoToFormat.proto /////////////// -struct __pyx_typeinfo_string { - char string[3]; -}; -static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type); - -/////////////// TypeInfoToFormat /////////////// -{{# See also MemoryView.pyx:BufferFormatFromTypeInfo }} - -static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type) { - struct __pyx_typeinfo_string result = { {0} }; - char *buf = (char *) result.string; - size_t size = type->size; - - switch (type->typegroup) { - case 'H': - *buf = 'c'; - break; - case 'I': - case 'U': - if (size == 1) - *buf = 'b'; - else if (size == 2) - *buf = 'h'; - else if (size == 4) - *buf = 'i'; - else if (size == 8) - *buf = 'q'; - - if (type->is_unsigned) - *buf = toupper(*buf); - break; - case 'P': - *buf = 'P'; - break; - case 'C': - { - __Pyx_TypeInfo complex_type = *type; - complex_type.typegroup = 'R'; - complex_type.size /= 2; - - *buf++ = 'Z'; - *buf = __Pyx_TypeInfoToFormat(&complex_type).string[0]; - break; - } - case 'R': - if (size == 4) - *buf = 'f'; - else if (size == 8) - *buf = 'd'; - else - *buf = 'g'; - break; - } - - return result; -} diff --git a/third_party/cython/src/Cython/Utility/Builtins.c b/third_party/cython/src/Cython/Utility/Builtins.c deleted file mode 100644 index 537669d1a7de3..0000000000000 --- a/third_party/cython/src/Cython/Utility/Builtins.c +++ /dev/null @@ -1,446 +0,0 @@ -/* - * Special implementations of built-in functions and methods. - * - * Optional optimisations for builtins are in Optimize.c. - * - * General object operations and protocols are in ObjectHandling.c. - */ - -//////////////////// Globals.proto //////////////////// - -static PyObject* __Pyx_Globals(void); /*proto*/ - -//////////////////// Globals //////////////////// -//@substitute: naming -//@requires: ObjectHandling.c::GetAttr - -// This is a stub implementation until we have something more complete. -// Currently, we only handle the most common case of a read-only dict -// of Python names. Supporting cdef names in the module and write -// access requires a rewrite as a dedicated class. - -static PyObject* __Pyx_Globals(void) { - Py_ssize_t i; - //PyObject *d; - PyObject *names = NULL; - PyObject *globals = PyObject_GetAttr($module_cname, PYIDENT("__dict__")); - if (!globals) { - PyErr_SetString(PyExc_TypeError, - "current module must have __dict__ attribute"); - goto bad; - } - names = PyObject_Dir($module_cname); - if (!names) - goto bad; - for (i = PyList_GET_SIZE(names)-1; i >= 0; i--) { -#if CYTHON_COMPILING_IN_PYPY - PyObject* name = PySequence_GetItem(names, i); - if (!name) - goto bad; -#else - PyObject* name = PyList_GET_ITEM(names, i); -#endif - if (!PyDict_Contains(globals, name)) { - PyObject* value = __Pyx_GetAttr($module_cname, name); - if (!value) { -#if CYTHON_COMPILING_IN_PYPY - Py_DECREF(name); -#endif - goto bad; - } - if (PyDict_SetItem(globals, name, value) < 0) { -#if CYTHON_COMPILING_IN_PYPY - Py_DECREF(name); -#endif - Py_DECREF(value); - goto bad; - } - } -#if CYTHON_COMPILING_IN_PYPY - Py_DECREF(name); -#endif - } - Py_DECREF(names); - return globals; - // d = PyDictProxy_New(globals); - // Py_DECREF(globals); - // return d; -bad: - Py_XDECREF(names); - Py_XDECREF(globals); - return NULL; -} - -//////////////////// PyExecGlobals.proto //////////////////// - -static PyObject* __Pyx_PyExecGlobals(PyObject*); - -//////////////////// PyExecGlobals //////////////////// -//@requires: Globals -//@requires: PyExec - -static PyObject* __Pyx_PyExecGlobals(PyObject* code) { - PyObject* result; - PyObject* globals = __Pyx_Globals(); - if (unlikely(!globals)) - return NULL; - result = __Pyx_PyExec2(code, globals); - Py_DECREF(globals); - return result; -} - -//////////////////// PyExec.proto //////////////////// - -static PyObject* __Pyx_PyExec3(PyObject*, PyObject*, PyObject*); -static CYTHON_INLINE PyObject* __Pyx_PyExec2(PyObject*, PyObject*); - -//////////////////// PyExec //////////////////// -//@substitute: naming - -static CYTHON_INLINE PyObject* __Pyx_PyExec2(PyObject* o, PyObject* globals) { - return __Pyx_PyExec3(o, globals, NULL); -} - -static PyObject* __Pyx_PyExec3(PyObject* o, PyObject* globals, PyObject* locals) { - PyObject* result; - PyObject* s = 0; - char *code = 0; - - if (!globals || globals == Py_None) { - globals = PyModule_GetDict($module_cname); - if (!globals) - goto bad; - } else if (!PyDict_Check(globals)) { - PyErr_Format(PyExc_TypeError, "exec() arg 2 must be a dict, not %.200s", - Py_TYPE(globals)->tp_name); - goto bad; - } - if (!locals || locals == Py_None) { - locals = globals; - } - - if (PyDict_GetItem(globals, PYIDENT("__builtins__")) == NULL) { - if (PyDict_SetItem(globals, PYIDENT("__builtins__"), PyEval_GetBuiltins()) < 0) - goto bad; - } - - if (PyCode_Check(o)) { - if (PyCode_GetNumFree((PyCodeObject *)o) > 0) { - PyErr_SetString(PyExc_TypeError, - "code object passed to exec() may not contain free variables"); - goto bad; - } - #if PY_VERSION_HEX < 0x030200B1 - result = PyEval_EvalCode((PyCodeObject *)o, globals, locals); - #else - result = PyEval_EvalCode(o, globals, locals); - #endif - } else { - PyCompilerFlags cf; - cf.cf_flags = 0; - if (PyUnicode_Check(o)) { - cf.cf_flags = PyCF_SOURCE_IS_UTF8; - s = PyUnicode_AsUTF8String(o); - if (!s) goto bad; - o = s; - #if PY_MAJOR_VERSION >= 3 - } else if (!PyBytes_Check(o)) { - #else - } else if (!PyString_Check(o)) { - #endif - PyErr_Format(PyExc_TypeError, - "exec: arg 1 must be string, bytes or code object, got %.200s", - Py_TYPE(o)->tp_name); - goto bad; - } - #if PY_MAJOR_VERSION >= 3 - code = PyBytes_AS_STRING(o); - #else - code = PyString_AS_STRING(o); - #endif - if (PyEval_MergeCompilerFlags(&cf)) { - result = PyRun_StringFlags(code, Py_file_input, globals, locals, &cf); - } else { - result = PyRun_String(code, Py_file_input, globals, locals); - } - Py_XDECREF(s); - } - - return result; -bad: - Py_XDECREF(s); - return 0; -} - -//////////////////// GetAttr3.proto //////////////////// - -static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /*proto*/ - -//////////////////// GetAttr3 //////////////////// -//@requires: ObjectHandling.c::GetAttr - -static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { - PyObject *r = __Pyx_GetAttr(o, n); - if (unlikely(!r)) { - if (!PyErr_ExceptionMatches(PyExc_AttributeError)) - goto bad; - PyErr_Clear(); - r = d; - Py_INCREF(d); - } - return r; -bad: - return NULL; -} - -//////////////////// Intern.proto //////////////////// - -static PyObject* __Pyx_Intern(PyObject* s); /* proto */ - -//////////////////// Intern //////////////////// - -static PyObject* __Pyx_Intern(PyObject* s) { - if (!(likely(PyString_CheckExact(s)))) { - PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(s)->tp_name); - return 0; - } - Py_INCREF(s); - #if PY_MAJOR_VERSION >= 3 - PyUnicode_InternInPlace(&s); - #else - PyString_InternInPlace(&s); - #endif - return s; -} - -//////////////////// abs_int.proto //////////////////// - -static CYTHON_INLINE unsigned int __Pyx_abs_int(int x) { - if (unlikely(x == -INT_MAX-1)) - return ((unsigned int)INT_MAX) + 1U; - return (unsigned int) abs(x); -} - -//////////////////// abs_long.proto //////////////////// - -static CYTHON_INLINE unsigned long __Pyx_abs_long(long x) { - if (unlikely(x == -LONG_MAX-1)) - return ((unsigned long)LONG_MAX) + 1U; - return (unsigned long) labs(x); -} - -//////////////////// abs_longlong.proto //////////////////// - -static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_abs_longlong(PY_LONG_LONG x) { -#ifndef PY_LLONG_MAX -#ifdef LLONG_MAX - const PY_LONG_LONG PY_LLONG_MAX = LLONG_MAX; -#else - // copied from pyport.h in CPython 3.3, missing in 2.4 - const PY_LONG_LONG PY_LLONG_MAX = (1 + 2 * ((1LL << (CHAR_BIT * sizeof(PY_LONG_LONG) - 2)) - 1)); -#endif -#endif - if (unlikely(x == -PY_LLONG_MAX-1)) - return ((unsigned PY_LONG_LONG)PY_LLONG_MAX) + 1U; -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - return (unsigned PY_LONG_LONG) llabs(x); -#else - return (x<0) ? (unsigned PY_LONG_LONG)-x : (unsigned PY_LONG_LONG)x; -#endif -} - -//////////////////// pow2.proto //////////////////// - -#define __Pyx_PyNumber_Power2(a, b) PyNumber_Power(a, b, Py_None) - -//////////////////// py_dict_keys.proto //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d); /*proto*/ - -//////////////////// py_dict_keys //////////////////// -//@requires: ObjectHandling.c::PyObjectCallMethod - -static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) { - if (PY_MAJOR_VERSION >= 3) - return __Pyx_PyObject_CallMethod1((PyObject*)&PyDict_Type, PYIDENT("keys"), d); - else - return PyDict_Keys(d); -} - -//////////////////// py_dict_values.proto //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); /*proto*/ - -//////////////////// py_dict_values //////////////////// -//@requires: ObjectHandling.c::PyObjectCallMethod - -static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { - if (PY_MAJOR_VERSION >= 3) - return __Pyx_PyObject_CallMethod1((PyObject*)&PyDict_Type, PYIDENT("values"), d); - else - return PyDict_Values(d); -} - -//////////////////// py_dict_items.proto //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); /*proto*/ - -//////////////////// py_dict_items //////////////////// -//@requires: ObjectHandling.c::PyObjectCallMethod - -static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { - if (PY_MAJOR_VERSION >= 3) - return __Pyx_PyObject_CallMethod1((PyObject*)&PyDict_Type, PYIDENT("items"), d); - else - return PyDict_Items(d); -} - -//////////////////// py_dict_iterkeys.proto //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_IterKeys(PyObject* d); /*proto*/ - -//////////////////// py_dict_iterkeys //////////////////// -//@requires: ObjectHandling.c::PyObjectCallMethod - -static CYTHON_INLINE PyObject* __Pyx_PyDict_IterKeys(PyObject* d) { - return __Pyx_PyObject_CallMethod0(d, (PY_MAJOR_VERSION >= 3) ? PYIDENT("keys") : PYIDENT("iterkeys")); -} - -//////////////////// py_dict_itervalues.proto //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_IterValues(PyObject* d); /*proto*/ - -//////////////////// py_dict_itervalues //////////////////// -//@requires: ObjectHandling.c::PyObjectCallMethod - -static CYTHON_INLINE PyObject* __Pyx_PyDict_IterValues(PyObject* d) { - return __Pyx_PyObject_CallMethod0(d, (PY_MAJOR_VERSION >= 3) ? PYIDENT("values") : PYIDENT("itervalues")); -} - -//////////////////// py_dict_iteritems.proto //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_IterItems(PyObject* d); /*proto*/ - -//////////////////// py_dict_iteritems //////////////////// -//@requires: ObjectHandling.c::PyObjectCallMethod - -static CYTHON_INLINE PyObject* __Pyx_PyDict_IterItems(PyObject* d) { - return __Pyx_PyObject_CallMethod0(d, (PY_MAJOR_VERSION >= 3) ? PYIDENT("items") : PYIDENT("iteritems")); -} - -//////////////////// py_dict_viewkeys.proto //////////////////// - -#if PY_VERSION_HEX < 0x02070000 -#error This module uses dict views, which require Python 2.7 or later -#endif -static CYTHON_INLINE PyObject* __Pyx_PyDict_ViewKeys(PyObject* d); /*proto*/ - -//////////////////// py_dict_viewkeys //////////////////// -//@requires: ObjectHandling.c::PyObjectCallMethod - -static CYTHON_INLINE PyObject* __Pyx_PyDict_ViewKeys(PyObject* d) { - return __Pyx_PyObject_CallMethod0(d, (PY_MAJOR_VERSION >= 3) ? PYIDENT("keys") : PYIDENT("viewkeys")); -} - -//////////////////// py_dict_viewvalues.proto //////////////////// - -#if PY_VERSION_HEX < 0x02070000 -#error This module uses dict views, which require Python 2.7 or later -#endif -static CYTHON_INLINE PyObject* __Pyx_PyDict_ViewValues(PyObject* d); /*proto*/ - -//////////////////// py_dict_viewvalues //////////////////// -//@requires: ObjectHandling.c::PyObjectCallMethod - -static CYTHON_INLINE PyObject* __Pyx_PyDict_ViewValues(PyObject* d) { - return __Pyx_PyObject_CallMethod0(d, (PY_MAJOR_VERSION >= 3) ? PYIDENT("values") : PYIDENT("viewvalues")); -} - -//////////////////// py_dict_viewitems.proto //////////////////// - -#if PY_VERSION_HEX < 0x02070000 -#error This module uses dict views, which require Python 2.7 or later -#endif -static CYTHON_INLINE PyObject* __Pyx_PyDict_ViewItems(PyObject* d); /*proto*/ - -//////////////////// py_dict_viewitems //////////////////// -//@requires: ObjectHandling.c::PyObjectCallMethod - -static CYTHON_INLINE PyObject* __Pyx_PyDict_ViewItems(PyObject* d) { - return __Pyx_PyObject_CallMethod0(d, (PY_MAJOR_VERSION >= 3) ? PYIDENT("items") : PYIDENT("viewitems")); -} - -//////////////////// pyset_compat.proto //////////////////// - -#if PY_VERSION_HEX < 0x02050000 -#ifndef PyAnySet_CheckExact - -#define PyAnySet_CheckExact(ob) \ - ((ob)->ob_type == &PySet_Type || \ - (ob)->ob_type == &PyFrozenSet_Type) - -#define PySet_New(iterable) \ - PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL) - -#define PyFrozenSet_New(iterable) \ - PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL) - -#define PySet_Size(anyset) \ - PyObject_Size((anyset)) - -#define PySet_GET_SIZE(anyset) \ - PyObject_Size((anyset)) - -#define PySet_Contains(anyset, key) \ - PySequence_Contains((anyset), (key)) - -#define PySet_Pop(set) \ - PyObject_CallMethod((set), (char*)"pop", NULL) - -static CYTHON_INLINE int PySet_Clear(PyObject *set) { - PyObject *ret = PyObject_CallMethod(set, (char*)"clear", NULL); - if (!ret) return -1; - Py_DECREF(ret); return 0; -} - -static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) { - PyObject *ret = PyObject_CallMethod(set, (char*)"discard", (char*)"(O)", key); - if (!ret) return -1; - Py_DECREF(ret); return 0; -} - -static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) { - PyObject *ret = PyObject_CallMethod(set, (char*)"add", (char*)"(O)", key); - if (!ret) return -1; - Py_DECREF(ret); return 0; -} - -#endif /* PyAnySet_CheckExact (<= Py2.4) */ -#endif /* < Py2.5 */ - -//////////////////// pyfrozenset_new.proto //////////////////// -//@substitute: naming -//@requires: pyset_compat - -static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) { - if (it) { - PyObject* result; - if (PyFrozenSet_CheckExact(it)) { - Py_INCREF(it); - return it; - } - result = PyFrozenSet_New(it); - if (unlikely(!result)) - return NULL; - if (likely(PySet_GET_SIZE(result))) - return result; - // empty frozenset is a singleton - // seems wasteful, but CPython does the same - Py_DECREF(result); - } - #if CYTHON_COMPILING_IN_CPYTHON - return PyFrozenSet_Type.tp_new(&PyFrozenSet_Type, $empty_tuple, NULL); - #else - return PyObject_Call((PyObject*)&PyFrozenSet_Type, $empty_tuple, NULL); - #endif -} diff --git a/third_party/cython/src/Cython/Utility/Capsule.c b/third_party/cython/src/Cython/Utility/Capsule.c deleted file mode 100644 index b9d11ac242afb..0000000000000 --- a/third_party/cython/src/Cython/Utility/Capsule.c +++ /dev/null @@ -1,20 +0,0 @@ -//////////////// Capsule.proto //////////////// - -/* Todo: wrap the rest of the functionality in similar functions */ -static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig); - -//////////////// Capsule //////////////// - -static CYTHON_INLINE PyObject * -__pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig) -{ - PyObject *cobj; - -#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION == 0) - cobj = PyCapsule_New(p, sig, NULL); -#else - cobj = PyCObject_FromVoidPtr(p, NULL); -#endif - - return cobj; -} diff --git a/third_party/cython/src/Cython/Utility/CommonTypes.c b/third_party/cython/src/Cython/Utility/CommonTypes.c deleted file mode 100644 index c2403cbf98a3d..0000000000000 --- a/third_party/cython/src/Cython/Utility/CommonTypes.c +++ /dev/null @@ -1,48 +0,0 @@ -/////////////// FetchCommonType.proto /////////////// - -static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); - -/////////////// FetchCommonType /////////////// - -static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { - PyObject* fake_module; - PyTypeObject* cached_type = NULL; - - fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); - if (!fake_module) return NULL; - Py_INCREF(fake_module); - - cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); - if (cached_type) { - if (!PyType_Check((PyObject*)cached_type)) { - PyErr_Format(PyExc_TypeError, - "Shared Cython type %.200s is not a type object", - type->tp_name); - goto bad; - } - if (cached_type->tp_basicsize != type->tp_basicsize) { - PyErr_Format(PyExc_TypeError, - "Shared Cython type %.200s has the wrong size, try recompiling", - type->tp_name); - goto bad; - } - } else { - if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; - PyErr_Clear(); - if (PyType_Ready(type) < 0) goto bad; - if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) - goto bad; - Py_INCREF(type); - cached_type = type; - } - -done: - Py_DECREF(fake_module); - // NOTE: always returns owned reference, or NULL on error - return cached_type; - -bad: - Py_XDECREF(cached_type); - cached_type = NULL; - goto done; -} diff --git a/third_party/cython/src/Cython/Utility/CppConvert.pyx b/third_party/cython/src/Cython/Utility/CppConvert.pyx deleted file mode 100644 index d9530ecaa1b90..0000000000000 --- a/third_party/cython/src/Cython/Utility/CppConvert.pyx +++ /dev/null @@ -1,232 +0,0 @@ -# TODO: Figure out how many of the pass-by-value copies the compiler can eliminate. - - -#################### string.from_py #################### - -cdef extern from *: - cdef cppclass string "std::string": - string() - string(char* c_str, size_t size) - cdef char* __Pyx_PyObject_AsStringAndSize(object, Py_ssize_t*) except NULL - -@cname("{{cname}}") -cdef string {{cname}}(object o) except *: - cdef Py_ssize_t length - cdef char* data = __Pyx_PyObject_AsStringAndSize(o, &length) - return string(data, length) - - -#################### string.to_py #################### - -#cimport cython -#from libcpp.string cimport string -cdef extern from *: - cdef cppclass string "const std::string": - char* data() - size_t size() - cdef object __Pyx_PyObject_FromStringAndSize(char*, size_t) - -@cname("{{cname}}") -cdef object {{cname}}(string& s): - return __Pyx_PyObject_FromStringAndSize(s.data(), s.size()) - - -#################### vector.from_py #################### - -{{template_type_declarations}} - -cdef extern from *: - cdef cppclass vector "std::vector" [T]: - void push_back(T&) - -@cname("{{cname}}") -cdef vector[X] {{cname}}(object o) except *: - cdef vector[X] v - for item in o: - v.push_back(X_from_py(item)) - return v - - -#################### vector.to_py #################### - -{{template_type_declarations}} - -cdef extern from *: - cdef cppclass vector "const std::vector" [T]: - size_t size() - T& operator[](size_t) - -@cname("{{cname}}") -cdef object {{cname}}(vector[X]& v): - return [X_to_py(v[i]) for i in range(v.size())] - - -#################### list.from_py #################### - -{{template_type_declarations}} - -cdef extern from *: - cdef cppclass cpp_list "std::list" [T]: - void push_back(T&) - -@cname("{{cname}}") -cdef cpp_list[X] {{cname}}(object o) except *: - cdef cpp_list[X] l - for item in o: - l.push_back(X_from_py(item)) - return l - - -#################### list.to_py #################### - -cimport cython - -{{template_type_declarations}} - -cdef extern from *: - cdef cppclass cpp_list "std::list" [T]: - cppclass const_iterator: - T& operator*() - const_iterator operator++() - bint operator!=(const_iterator) - const_iterator begin() - const_iterator end() - cdef cppclass const_cpp_list "const std::list" [T] (cpp_list): - pass - -@cname("{{cname}}") -cdef object {{cname}}(const_cpp_list[X]& v): - o = [] - cdef cpp_list[X].const_iterator iter = v.begin() - while iter != v.end(): - o.append(X_to_py(cython.operator.dereference(iter))) - cython.operator.preincrement(iter) - return o - - -#################### set.from_py #################### - -{{template_type_declarations}} - -cdef extern from *: - cdef cppclass set "std::{{maybe_unordered}}set" [T]: - void insert(T&) - -@cname("{{cname}}") -cdef set[X] {{cname}}(object o) except *: - cdef set[X] s - for item in o: - s.insert(X_from_py(item)) - return s - - -#################### set.to_py #################### - -cimport cython - -{{template_type_declarations}} - -cdef extern from *: - cdef cppclass cpp_set "std::{{maybe_unordered}}set" [T]: - cppclass const_iterator: - T& operator*() - const_iterator operator++() - bint operator!=(const_iterator) - const_iterator begin() - const_iterator end() - cdef cppclass const_cpp_set "const std::{{maybe_unordered}}set" [T](cpp_set): - pass - -@cname("{{cname}}") -cdef object {{cname}}(const_cpp_set[X]& s): - o = set() - cdef cpp_set[X].const_iterator iter = s.begin() - while iter != s.end(): - o.add(X_to_py(cython.operator.dereference(iter))) - cython.operator.preincrement(iter) - return o - -#################### pair.from_py #################### - -{{template_type_declarations}} - -cdef extern from *: - cdef cppclass pair "std::pair" [T, U]: - pair() - pair(T&, U&) - -@cname("{{cname}}") -cdef pair[X,Y] {{cname}}(object o) except *: - x, y = o - return pair[X,Y](X_from_py(x), Y_from_py(y)) - - -#################### pair.to_py #################### - -{{template_type_declarations}} - -cdef extern from *: - cdef cppclass pair "const std::pair" [T, U]: - T first - U second - -@cname("{{cname}}") -cdef object {{cname}}(pair[X,Y]& p): - return X_to_py(p.first), Y_to_py(p.second) - - -#################### map.from_py #################### - -{{template_type_declarations}} - -cdef extern from *: - cdef cppclass pair "std::pair" [T, U]: - pair(T&, U&) - cdef cppclass map "std::{{maybe_unordered}}map" [T, U]: - void insert(pair[T, U]&) - - cdef cppclass pair "std::pair" [T, U]: - pass - cdef cppclass vector "std::vector" [T]: - pass - - -@cname("{{cname}}") -cdef map[X,Y] {{cname}}(object o) except *: - cdef dict d = o - cdef map[X,Y] m - for key, value in d.iteritems(): - m.insert(pair[X,Y](X_from_py(key), Y_from_py(value))) - return m - - -#################### map.to_py #################### -# TODO: Work out const so that this can take a const -# reference rather than pass by value. - -cimport cython - -{{template_type_declarations}} - -cdef extern from *: - cdef cppclass map "std::{{maybe_unordered}}map" [T, U]: - cppclass value_type: - T first - U second - cppclass iterator: - value_type& operator*() - iterator operator++() - bint operator!=(iterator) - iterator begin() - iterator end() - -@cname("{{cname}}") -cdef object {{cname}}(map[X,Y] s): - o = {} - cdef map[X,Y].value_type *key_value - cdef map[X,Y].iterator iter = s.begin() - while iter != s.end(): - key_value = &cython.operator.dereference(iter) - o[X_to_py(key_value.first)] = Y_to_py(key_value.second) - cython.operator.preincrement(iter) - return o diff --git a/third_party/cython/src/Cython/Utility/CppSupport.cpp b/third_party/cython/src/Cython/Utility/CppSupport.cpp deleted file mode 100644 index ab2f2b5b26d79..0000000000000 --- a/third_party/cython/src/Cython/Utility/CppSupport.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/////////////// CppExceptionConversion.proto /////////////// - -#ifndef __Pyx_CppExn2PyErr -#include -#include -#include -#include - -static void __Pyx_CppExn2PyErr() { - // Catch a handful of different errors here and turn them into the - // equivalent Python errors. - try { - if (PyErr_Occurred()) - ; // let the latest Python exn pass through and ignore the current one - else - throw; - } catch (const std::bad_alloc& exn) { - PyErr_SetString(PyExc_MemoryError, exn.what()); - } catch (const std::bad_cast& exn) { - PyErr_SetString(PyExc_TypeError, exn.what()); - } catch (const std::domain_error& exn) { - PyErr_SetString(PyExc_ValueError, exn.what()); - } catch (const std::invalid_argument& exn) { - PyErr_SetString(PyExc_ValueError, exn.what()); - } catch (const std::ios_base::failure& exn) { - // Unfortunately, in standard C++ we have no way of distinguishing EOF - // from other errors here; be careful with the exception mask - PyErr_SetString(PyExc_IOError, exn.what()); - } catch (const std::out_of_range& exn) { - // Change out_of_range to IndexError - PyErr_SetString(PyExc_IndexError, exn.what()); - } catch (const std::overflow_error& exn) { - PyErr_SetString(PyExc_OverflowError, exn.what()); - } catch (const std::range_error& exn) { - PyErr_SetString(PyExc_ArithmeticError, exn.what()); - } catch (const std::underflow_error& exn) { - PyErr_SetString(PyExc_ArithmeticError, exn.what()); - } catch (const std::exception& exn) { - PyErr_SetString(PyExc_RuntimeError, exn.what()); - } - catch (...) - { - PyErr_SetString(PyExc_RuntimeError, "Unknown exception"); - } -} -#endif diff --git a/third_party/cython/src/Cython/Utility/CythonFunction.c b/third_party/cython/src/Cython/Utility/CythonFunction.c deleted file mode 100644 index ed7ba29329726..0000000000000 --- a/third_party/cython/src/Cython/Utility/CythonFunction.c +++ /dev/null @@ -1,1177 +0,0 @@ - - -//////////////////// CythonFunction.proto //////////////////// -#define __Pyx_CyFunction_USED 1 -#include - -#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 -#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 -#define __Pyx_CYFUNCTION_CCLASS 0x04 - -#define __Pyx_CyFunction_GetClosure(f) \ - (((__pyx_CyFunctionObject *) (f))->func_closure) -#define __Pyx_CyFunction_GetClassObj(f) \ - (((__pyx_CyFunctionObject *) (f))->func_classobj) - -#define __Pyx_CyFunction_Defaults(type, f) \ - ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) -#define __Pyx_CyFunction_SetDefaultsGetter(f, g) \ - ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) - - -typedef struct { - PyCFunctionObject func; - PyObject *func_dict; - PyObject *func_weakreflist; - PyObject *func_name; - PyObject *func_qualname; - PyObject *func_doc; - PyObject *func_globals; - PyObject *func_code; - PyObject *func_closure; - PyObject *func_classobj; /* No-args super() class cell */ - - /* Dynamic default args and annotations */ - void *defaults; - int defaults_pyobjects; - int flags; - - /* Defaults info */ - PyObject *defaults_tuple; /* Const defaults tuple */ - PyObject *defaults_kwdict; /* Const kwonly defaults dict */ - PyObject *(*defaults_getter)(PyObject *); - PyObject *func_annotations; /* function annotations dict */ -} __pyx_CyFunctionObject; - -static PyTypeObject *__pyx_CyFunctionType = 0; - -#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code) \ - __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) - -static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, - int flags, PyObject* qualname, - PyObject *self, - PyObject *module, PyObject *globals, - PyObject* code); - -static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, - size_t size, - int pyobjects); -static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, - PyObject *tuple); -static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, - PyObject *dict); -static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, - PyObject *dict); - - -static int __Pyx_CyFunction_init(void); - -//////////////////// CythonFunction //////////////////// -//@substitute: naming -//@requires: CommonTypes.c::FetchCommonType -////@requires: ObjectHandling.c::PyObjectGetAttrStr - -static PyObject * -__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) -{ - if (unlikely(op->func_doc == NULL)) { - if (op->func.m_ml->ml_doc) { -#if PY_MAJOR_VERSION >= 3 - op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); -#else - op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); -#endif - if (unlikely(op->func_doc == NULL)) - return NULL; - } else { - Py_INCREF(Py_None); - return Py_None; - } - } - Py_INCREF(op->func_doc); - return op->func_doc; -} - -static int -__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) -{ - PyObject *tmp = op->func_doc; - if (value == NULL) - value = Py_None; /* Mark as deleted */ - Py_INCREF(value); - op->func_doc = value; - Py_XDECREF(tmp); - return 0; -} - -static PyObject * -__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) -{ - if (unlikely(op->func_name == NULL)) { -#if PY_MAJOR_VERSION >= 3 - op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); -#else - op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); -#endif - if (unlikely(op->func_name == NULL)) - return NULL; - } - Py_INCREF(op->func_name); - return op->func_name; -} - -static int -__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) -{ - PyObject *tmp; - -#if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) { -#else - if (unlikely(value == NULL || !PyString_Check(value))) { -#endif - PyErr_SetString(PyExc_TypeError, - "__name__ must be set to a string object"); - return -1; - } - tmp = op->func_name; - Py_INCREF(value); - op->func_name = value; - Py_XDECREF(tmp); - return 0; -} - -static PyObject * -__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) -{ - Py_INCREF(op->func_qualname); - return op->func_qualname; -} - -static int -__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) -{ - PyObject *tmp; - -#if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) { -#else - if (unlikely(value == NULL || !PyString_Check(value))) { -#endif - PyErr_SetString(PyExc_TypeError, - "__qualname__ must be set to a string object"); - return -1; - } - tmp = op->func_qualname; - Py_INCREF(value); - op->func_qualname = value; - Py_XDECREF(tmp); - return 0; -} - -static PyObject * -__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) -{ - PyObject *self; - - self = m->func_closure; - if (self == NULL) - self = Py_None; - Py_INCREF(self); - return self; -} - -static PyObject * -__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) -{ - if (unlikely(op->func_dict == NULL)) { - op->func_dict = PyDict_New(); - if (unlikely(op->func_dict == NULL)) - return NULL; - } - Py_INCREF(op->func_dict); - return op->func_dict; -} - -static int -__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) -{ - PyObject *tmp; - - if (unlikely(value == NULL)) { - PyErr_SetString(PyExc_TypeError, - "function's dictionary may not be deleted"); - return -1; - } - if (unlikely(!PyDict_Check(value))) { - PyErr_SetString(PyExc_TypeError, - "setting function's dictionary to a non-dict"); - return -1; - } - tmp = op->func_dict; - Py_INCREF(value); - op->func_dict = value; - Py_XDECREF(tmp); - return 0; -} - -static PyObject * -__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op) -{ - Py_INCREF(op->func_globals); - return op->func_globals; -} - -static PyObject * -__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) -{ - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) -{ - PyObject* result = (op->func_code) ? op->func_code : Py_None; - Py_INCREF(result); - return result; -} - -static int -__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { - PyObject *res = op->defaults_getter((PyObject *) op); - if (unlikely(!res)) - return -1; - - /* Cache result */ - op->defaults_tuple = PyTuple_GET_ITEM(res, 0); - Py_INCREF(op->defaults_tuple); - op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); - Py_INCREF(op->defaults_kwdict); - Py_DECREF(res); - return 0; -} - -static int -__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { - PyObject* tmp; - if (!value) { - // del => explicit None to prevent rebuilding - value = Py_None; - } else if (value != Py_None && !PyTuple_Check(value)) { - PyErr_SetString(PyExc_TypeError, - "__defaults__ must be set to a tuple object"); - return -1; - } - Py_INCREF(value); - tmp = op->defaults_tuple; - op->defaults_tuple = value; - Py_XDECREF(tmp); - return 0; -} - -static PyObject * -__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { - PyObject* result = op->defaults_tuple; - if (unlikely(!result)) { - if (op->defaults_getter) { - if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; - result = op->defaults_tuple; - } else { - result = Py_None; - } - } - Py_INCREF(result); - return result; -} - -static int -__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { - PyObject* tmp; - if (!value) { - // del => explicit None to prevent rebuilding - value = Py_None; - } else if (value != Py_None && !PyDict_Check(value)) { - PyErr_SetString(PyExc_TypeError, - "__kwdefaults__ must be set to a dict object"); - return -1; - } - Py_INCREF(value); - tmp = op->defaults_kwdict; - op->defaults_kwdict = value; - Py_XDECREF(tmp); - return 0; -} - -static PyObject * -__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { - PyObject* result = op->defaults_kwdict; - if (unlikely(!result)) { - if (op->defaults_getter) { - if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; - result = op->defaults_kwdict; - } else { - result = Py_None; - } - } - Py_INCREF(result); - return result; -} - -static int -__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { - PyObject* tmp; - if (!value || value == Py_None) { - value = NULL; - } else if (!PyDict_Check(value)) { - PyErr_SetString(PyExc_TypeError, - "__annotations__ must be set to a dict object"); - return -1; - } - Py_XINCREF(value); - tmp = op->func_annotations; - op->func_annotations = value; - Py_XDECREF(tmp); - return 0; -} - -static PyObject * -__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { - PyObject* result = op->func_annotations; - if (unlikely(!result)) { - result = PyDict_New(); - if (unlikely(!result)) return NULL; - op->func_annotations = result; - } - Py_INCREF(result); - return result; -} - -//#if PY_VERSION_HEX >= 0x030400C1 -//static PyObject * -//__Pyx_CyFunction_get_signature(__pyx_CyFunctionObject *op) { -// PyObject *inspect_module, *signature_class, *signature; -// // from inspect import Signature -// inspect_module = PyImport_ImportModuleLevelObject(PYIDENT("inspect"), NULL, NULL, NULL, 0); -// if (unlikely(!inspect_module)) -// goto bad; -// signature_class = __Pyx_PyObject_GetAttrStr(inspect_module, PYIDENT("Signature")); -// Py_DECREF(inspect_module); -// if (unlikely(!signature_class)) -// goto bad; -// // return Signature.from_function(op) -// signature = PyObject_CallMethodObjArgs(signature_class, PYIDENT("from_function"), op, NULL); -// Py_DECREF(signature_class); -// if (likely(signature)) -// return signature; -//bad: -// // make sure we raise an AttributeError from this property on any errors -// if (!PyErr_ExceptionMatches(PyExc_AttributeError)) -// PyErr_SetString(PyExc_AttributeError, "failed to calculate __signature__"); -// return NULL; -//} -//#endif - -static PyGetSetDef __pyx_CyFunction_getsets[] = { - {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, - {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, - {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, - {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, - {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, - {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, - {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, - {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, - {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, - {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, - {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, - {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, - {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, - {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, - {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, - {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, - {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, - {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, -//#if PY_VERSION_HEX >= 0x030400C1 -// {(char *) "__signature__", (getter)__Pyx_CyFunction_get_signature, 0, 0, 0}, -//#endif - {0, 0, 0, 0, 0} -}; - -#ifndef PY_WRITE_RESTRICTED /* < Py2.5 */ -#define PY_WRITE_RESTRICTED WRITE_RESTRICTED -#endif - -static PyMemberDef __pyx_CyFunction_members[] = { - {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0}, - {0, 0, 0, 0, 0} -}; - -static PyObject * -__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) -{ -#if PY_MAJOR_VERSION >= 3 - return PyUnicode_FromString(m->func.m_ml->ml_name); -#else - return PyString_FromString(m->func.m_ml->ml_name); -#endif -} - -static PyMethodDef __pyx_CyFunction_methods[] = { - {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, - {0, 0, 0, 0} -}; - - -static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, - PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { - __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); - if (op == NULL) - return NULL; - op->flags = flags; - op->func_weakreflist = NULL; - op->func.m_ml = ml; - op->func.m_self = (PyObject *) op; - Py_XINCREF(closure); - op->func_closure = closure; - Py_XINCREF(module); - op->func.m_module = module; - op->func_dict = NULL; - op->func_name = NULL; - Py_INCREF(qualname); - op->func_qualname = qualname; - op->func_doc = NULL; - op->func_classobj = NULL; - op->func_globals = globals; - Py_INCREF(op->func_globals); - Py_XINCREF(code); - op->func_code = code; - /* Dynamic Default args */ - op->defaults_pyobjects = 0; - op->defaults = NULL; - op->defaults_tuple = NULL; - op->defaults_kwdict = NULL; - op->defaults_getter = NULL; - op->func_annotations = NULL; - PyObject_GC_Track(op); - return (PyObject *) op; -} - -static int -__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) -{ - Py_CLEAR(m->func_closure); - Py_CLEAR(m->func.m_module); - Py_CLEAR(m->func_dict); - Py_CLEAR(m->func_name); - Py_CLEAR(m->func_qualname); - Py_CLEAR(m->func_doc); - Py_CLEAR(m->func_globals); - Py_CLEAR(m->func_code); - Py_CLEAR(m->func_classobj); - Py_CLEAR(m->defaults_tuple); - Py_CLEAR(m->defaults_kwdict); - Py_CLEAR(m->func_annotations); - - if (m->defaults) { - PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); - int i; - - for (i = 0; i < m->defaults_pyobjects; i++) - Py_XDECREF(pydefaults[i]); - - PyMem_Free(m->defaults); - m->defaults = NULL; - } - - return 0; -} - -static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) -{ - PyObject_GC_UnTrack(m); - if (m->func_weakreflist != NULL) - PyObject_ClearWeakRefs((PyObject *) m); - __Pyx_CyFunction_clear(m); - PyObject_GC_Del(m); -} - -static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) -{ - Py_VISIT(m->func_closure); - Py_VISIT(m->func.m_module); - Py_VISIT(m->func_dict); - Py_VISIT(m->func_name); - Py_VISIT(m->func_qualname); - Py_VISIT(m->func_doc); - Py_VISIT(m->func_globals); - Py_VISIT(m->func_code); - Py_VISIT(m->func_classobj); - Py_VISIT(m->defaults_tuple); - Py_VISIT(m->defaults_kwdict); - - if (m->defaults) { - PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); - int i; - - for (i = 0; i < m->defaults_pyobjects; i++) - Py_VISIT(pydefaults[i]); - } - - return 0; -} - -static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) -{ - __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; - - if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { - Py_INCREF(func); - return func; - } - - if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { - if (type == NULL) - type = (PyObject *)(Py_TYPE(obj)); - return PyMethod_New(func, - type, (PyObject *)(Py_TYPE(type))); - } - - if (obj == Py_None) - obj = NULL; - return PyMethod_New(func, obj, type); -} - -static PyObject* -__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) -{ -#if PY_MAJOR_VERSION >= 3 - return PyUnicode_FromFormat("", - op->func_qualname, (void *)op); -#else - return PyString_FromFormat("", - PyString_AsString(op->func_qualname), (void *)op); -#endif -} - -#if CYTHON_COMPILING_IN_PYPY -/* originally copied from PyCFunction_Call() in CPython's Objects/methodobject.c */ -/* PyPy does not have this function */ -static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyCFunctionObject* f = (PyCFunctionObject*)func; - PyCFunction meth = PyCFunction_GET_FUNCTION(func); - PyObject *self = PyCFunction_GET_SELF(func); - Py_ssize_t size; - - switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) { - case METH_VARARGS: - if (likely(kw == NULL) || PyDict_Size(kw) == 0) - return (*meth)(self, arg); - break; - case METH_VARARGS | METH_KEYWORDS: - return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); - case METH_NOARGS: - if (likely(kw == NULL) || PyDict_Size(kw) == 0) { - size = PyTuple_GET_SIZE(arg); - if (size == 0) - return (*meth)(self, NULL); - PyErr_Format(PyExc_TypeError, - "%.200s() takes no arguments (%zd given)", - f->m_ml->ml_name, size); - return NULL; - } - break; - case METH_O: - if (likely(kw == NULL) || PyDict_Size(kw) == 0) { - size = PyTuple_GET_SIZE(arg); - if (size == 1) - return (*meth)(self, PyTuple_GET_ITEM(arg, 0)); - PyErr_Format(PyExc_TypeError, - "%.200s() takes exactly one argument (%zd given)", - f->m_ml->ml_name, size); - return NULL; - } - break; - default: - PyErr_SetString(PyExc_SystemError, "Bad call flags in " - "__Pyx_CyFunction_Call. METH_OLDARGS is no " - "longer supported!"); - - return NULL; - } - PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", - f->m_ml->ml_name); - return NULL; -} -#else -static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { - return PyCFunction_Call(func, arg, kw); -} -#endif - -static PyTypeObject __pyx_CyFunctionType_type = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/ - sizeof(__pyx_CyFunctionObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ -#if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ -#else - 0, /*reserved*/ -#endif - (reprfunc) __Pyx_CyFunction_repr, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - __Pyx_CyFunction_Call, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/ - 0, /*tp_doc*/ - (traverseproc) __Pyx_CyFunction_traverse, /*tp_traverse*/ - (inquiry) __Pyx_CyFunction_clear, /*tp_clear*/ - 0, /*tp_richcompare*/ - offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_CyFunction_methods, /*tp_methods*/ - __pyx_CyFunction_members, /*tp_members*/ - __pyx_CyFunction_getsets, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - __Pyx_CyFunction_descr_get, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - 0, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ - 0, /*tp_del*/ -#if PY_VERSION_HEX >= 0x02060000 - 0, /*tp_version_tag*/ -#endif -#if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ -#endif -}; - - -static int __Pyx_CyFunction_init(void) { -#if !CYTHON_COMPILING_IN_PYPY - // avoid a useless level of call indirection - __pyx_CyFunctionType_type.tp_call = PyCFunction_Call; -#endif - __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); - if (__pyx_CyFunctionType == NULL) { - return -1; - } - return 0; -} - -static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { - __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; - - m->defaults = PyMem_Malloc(size); - if (!m->defaults) - return PyErr_NoMemory(); - memset(m->defaults, 0, size); - m->defaults_pyobjects = pyobjects; - return m->defaults; -} - -static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { - __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; - m->defaults_tuple = tuple; - Py_INCREF(tuple); -} - -static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { - __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; - m->defaults_kwdict = dict; - Py_INCREF(dict); -} - -static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { - __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; - m->func_annotations = dict; - Py_INCREF(dict); -} - -//////////////////// CyFunctionClassCell.proto //////////////////// -static CYTHON_INLINE void __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, - PyObject *classobj); - -//////////////////// CyFunctionClassCell //////////////////// -//@requires: CythonFunction - -static CYTHON_INLINE void __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj) { - int i; - - for (i = 0; i < PyList_GET_SIZE(cyfunctions); i++) { - __pyx_CyFunctionObject *m = - (__pyx_CyFunctionObject *) PyList_GET_ITEM(cyfunctions, i); - m->func_classobj = classobj; - Py_INCREF(classobj); - } -} - -//////////////////// FusedFunction.proto //////////////////// -typedef struct { - __pyx_CyFunctionObject func; - PyObject *__signatures__; - PyObject *type; - PyObject *self; -} __pyx_FusedFunctionObject; - -#define __pyx_FusedFunction_NewEx(ml, flags, qualname, self, module, globals, code) \ - __pyx_FusedFunction_New(__pyx_FusedFunctionType, ml, flags, qualname, self, module, globals, code) -static PyObject *__pyx_FusedFunction_New(PyTypeObject *type, - PyMethodDef *ml, int flags, - PyObject *qualname, PyObject *self, - PyObject *module, PyObject *globals, - PyObject *code); - -static int __pyx_FusedFunction_clear(__pyx_FusedFunctionObject *self); -static PyTypeObject *__pyx_FusedFunctionType = NULL; -static int __pyx_FusedFunction_init(void); - -#define __Pyx_FusedFunction_USED - -//////////////////// FusedFunction //////////////////// -//@requires: CythonFunction - -static PyObject * -__pyx_FusedFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, - PyObject *qualname, PyObject *self, - PyObject *module, PyObject *globals, - PyObject *code) -{ - __pyx_FusedFunctionObject *fusedfunc = - (__pyx_FusedFunctionObject *) __Pyx_CyFunction_New(type, ml, flags, qualname, - self, module, globals, code); - if (!fusedfunc) - return NULL; - - fusedfunc->__signatures__ = NULL; - fusedfunc->type = NULL; - fusedfunc->self = NULL; - return (PyObject *) fusedfunc; -} - -static void __pyx_FusedFunction_dealloc(__pyx_FusedFunctionObject *self) { - __pyx_FusedFunction_clear(self); - __pyx_FusedFunctionType->tp_free((PyObject *) self); -} - -static int -__pyx_FusedFunction_traverse(__pyx_FusedFunctionObject *self, - visitproc visit, - void *arg) -{ - Py_VISIT(self->self); - Py_VISIT(self->type); - Py_VISIT(self->__signatures__); - return __Pyx_CyFunction_traverse((__pyx_CyFunctionObject *) self, visit, arg); -} - -static int -__pyx_FusedFunction_clear(__pyx_FusedFunctionObject *self) -{ - Py_CLEAR(self->self); - Py_CLEAR(self->type); - Py_CLEAR(self->__signatures__); - return __Pyx_CyFunction_clear((__pyx_CyFunctionObject *) self); -} - - -static PyObject * -__pyx_FusedFunction_descr_get(PyObject *self, PyObject *obj, PyObject *type) -{ - __pyx_FusedFunctionObject *func, *meth; - - func = (__pyx_FusedFunctionObject *) self; - - if (func->self || func->func.flags & __Pyx_CYFUNCTION_STATICMETHOD) { - /* Do not allow rebinding and don't do anything for static methods */ - Py_INCREF(self); - return self; - } - - if (obj == Py_None) - obj = NULL; - - meth = (__pyx_FusedFunctionObject *) __pyx_FusedFunction_NewEx( - ((PyCFunctionObject *) func)->m_ml, - ((__pyx_CyFunctionObject *) func)->flags, - ((__pyx_CyFunctionObject *) func)->func_qualname, - ((__pyx_CyFunctionObject *) func)->func_closure, - ((PyCFunctionObject *) func)->m_module, - ((__pyx_CyFunctionObject *) func)->func_globals, - ((__pyx_CyFunctionObject *) func)->func_code); - if (!meth) - return NULL; - - Py_XINCREF(func->func.func_classobj); - meth->func.func_classobj = func->func.func_classobj; - - Py_XINCREF(func->__signatures__); - meth->__signatures__ = func->__signatures__; - - Py_XINCREF(type); - meth->type = type; - - Py_XINCREF(func->func.defaults_tuple); - meth->func.defaults_tuple = func->func.defaults_tuple; - - if (func->func.flags & __Pyx_CYFUNCTION_CLASSMETHOD) - obj = type; - - Py_XINCREF(obj); - meth->self = obj; - - return (PyObject *) meth; -} - -static PyObject * -_obj_to_str(PyObject *obj) -{ - if (PyType_Check(obj)) - return PyObject_GetAttr(obj, PYIDENT("__name__")); - else - return PyObject_Str(obj); -} - -static PyObject * -__pyx_FusedFunction_getitem(__pyx_FusedFunctionObject *self, PyObject *idx) -{ - PyObject *signature = NULL; - PyObject *unbound_result_func; - PyObject *result_func = NULL; - - if (self->__signatures__ == NULL) { - PyErr_SetString(PyExc_TypeError, "Function is not fused"); - return NULL; - } - - if (PyTuple_Check(idx)) { - PyObject *list = PyList_New(0); - Py_ssize_t n = PyTuple_GET_SIZE(idx); - PyObject *string = NULL; - PyObject *sep = NULL; - int i; - - if (!list) - return NULL; - - for (i = 0; i < n; i++) { - PyObject *item = PyTuple_GET_ITEM(idx, i); - - string = _obj_to_str(item); - if (!string || PyList_Append(list, string) < 0) - goto __pyx_err; - - Py_DECREF(string); - } - - sep = PyUnicode_FromString("|"); - if (sep) - signature = PyUnicode_Join(sep, list); -__pyx_err: -; - Py_DECREF(list); - Py_XDECREF(sep); - } else { - signature = _obj_to_str(idx); - } - - if (!signature) - return NULL; - - unbound_result_func = PyObject_GetItem(self->__signatures__, signature); - - if (unbound_result_func) { - if (self->self || self->type) { - __pyx_FusedFunctionObject *unbound = (__pyx_FusedFunctionObject *) unbound_result_func; - - /* Todo: move this to InitClassCell */ - Py_CLEAR(unbound->func.func_classobj); - Py_XINCREF(self->func.func_classobj); - unbound->func.func_classobj = self->func.func_classobj; - - result_func = __pyx_FusedFunction_descr_get(unbound_result_func, - self->self, self->type); - } else { - result_func = unbound_result_func; - Py_INCREF(result_func); - } - } - - Py_DECREF(signature); - Py_XDECREF(unbound_result_func); - - return result_func; -} - -static PyObject * -__pyx_FusedFunction_callfunction(PyObject *func, PyObject *args, PyObject *kw) -{ - __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; - PyObject *result; - int static_specialized = (cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD && - !((__pyx_FusedFunctionObject *) func)->__signatures__); - - if (cyfunc->flags & __Pyx_CYFUNCTION_CCLASS && !static_specialized) { - Py_ssize_t argc; - PyObject *new_args; - PyObject *self; - PyObject *m_self; - - argc = PyTuple_GET_SIZE(args); - new_args = PyTuple_GetSlice(args, 1, argc); - - if (!new_args) - return NULL; - - self = PyTuple_GetItem(args, 0); - - if (!self) - return NULL; - - m_self = cyfunc->func.m_self; - cyfunc->func.m_self = self; - result = __Pyx_CyFunction_Call(func, new_args, kw); - cyfunc->func.m_self = m_self; - - Py_DECREF(new_args); - } else { - result = __Pyx_CyFunction_Call(func, args, kw); - } - - return result; -} - -/* Note: the 'self' from method binding is passed in in the args tuple, - whereas PyCFunctionObject's m_self is passed in as the first - argument to the C function. For extension methods we need - to pass 'self' as 'm_self' and not as the first element of the - args tuple. -*/ -static PyObject * -__pyx_FusedFunction_call(PyObject *func, PyObject *args, PyObject *kw) -{ - __pyx_FusedFunctionObject *binding_func = (__pyx_FusedFunctionObject *) func; - Py_ssize_t argc = PyTuple_GET_SIZE(args); - PyObject *new_args = NULL; - __pyx_FusedFunctionObject *new_func = NULL; - PyObject *result = NULL; - PyObject *self = NULL; - int is_staticmethod = binding_func->func.flags & __Pyx_CYFUNCTION_STATICMETHOD; - int is_classmethod = binding_func->func.flags & __Pyx_CYFUNCTION_CLASSMETHOD; - - if (binding_func->self) { - /* Bound method call, put 'self' in the args tuple */ - Py_ssize_t i; - new_args = PyTuple_New(argc + 1); - if (!new_args) - return NULL; - - self = binding_func->self; - Py_INCREF(self); - PyTuple_SET_ITEM(new_args, 0, self); - - for (i = 0; i < argc; i++) { - PyObject *item = PyTuple_GET_ITEM(args, i); - Py_INCREF(item); - PyTuple_SET_ITEM(new_args, i + 1, item); - } - - args = new_args; - } else if (binding_func->type) { - /* Unbound method call */ - if (argc < 1) { - PyErr_SetString(PyExc_TypeError, "Need at least one argument, 0 given."); - return NULL; - } - self = PyTuple_GET_ITEM(args, 0); - } - - if (self && !is_classmethod && !is_staticmethod && - !PyObject_IsInstance(self, binding_func->type)) { - PyErr_Format(PyExc_TypeError, - "First argument should be of type %.200s, got %.200s.", - ((PyTypeObject *) binding_func->type)->tp_name, - self->ob_type->tp_name); - goto __pyx_err; - } - - if (binding_func->__signatures__) { - PyObject *tup = PyTuple_Pack(4, binding_func->__signatures__, args, - kw == NULL ? Py_None : kw, - binding_func->func.defaults_tuple); - if (!tup) - goto __pyx_err; - - new_func = (__pyx_FusedFunctionObject *) __pyx_FusedFunction_callfunction(func, tup, NULL); - Py_DECREF(tup); - - if (!new_func) - goto __pyx_err; - - Py_XINCREF(binding_func->func.func_classobj); - Py_CLEAR(new_func->func.func_classobj); - new_func->func.func_classobj = binding_func->func.func_classobj; - - func = (PyObject *) new_func; - } - - result = __pyx_FusedFunction_callfunction(func, args, kw); -__pyx_err: - Py_XDECREF(new_args); - Py_XDECREF((PyObject *) new_func); - return result; -} - -static PyMemberDef __pyx_FusedFunction_members[] = { - {(char *) "__signatures__", - T_OBJECT, - offsetof(__pyx_FusedFunctionObject, __signatures__), - READONLY, - __Pyx_DOCSTR(0)}, - {0, 0, 0, 0, 0}, -}; - -static PyMappingMethods __pyx_FusedFunction_mapping_methods = { - 0, - (binaryfunc) __pyx_FusedFunction_getitem, - 0, -}; - -static PyTypeObject __pyx_FusedFunctionType_type = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("fused_cython_function"), /*tp_name*/ - sizeof(__pyx_FusedFunctionObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - (destructor) __pyx_FusedFunction_dealloc, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ -#if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ -#else - 0, /*reserved*/ -#endif - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - &__pyx_FusedFunction_mapping_methods, /*tp_as_mapping*/ - 0, /*tp_hash*/ - (ternaryfunc) __pyx_FusedFunction_call, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, /* tp_flags*/ - 0, /*tp_doc*/ - (traverseproc) __pyx_FusedFunction_traverse, /*tp_traverse*/ - (inquiry) __pyx_FusedFunction_clear,/*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - 0, /*tp_methods*/ - __pyx_FusedFunction_members, /*tp_members*/ - /* __doc__ is None for the fused function type, but we need it to be */ - /* a descriptor for the instance's __doc__, so rebuild descriptors in our subclass */ - __pyx_CyFunction_getsets, /*tp_getset*/ - &__pyx_CyFunctionType_type, /*tp_base*/ - 0, /*tp_dict*/ - __pyx_FusedFunction_descr_get, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - 0, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ - 0, /*tp_del*/ -#if PY_VERSION_HEX >= 0x02060000 - 0, /*tp_version_tag*/ -#endif -#if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ -#endif -}; - -static int __pyx_FusedFunction_init(void) { - __pyx_FusedFunctionType = __Pyx_FetchCommonType(&__pyx_FusedFunctionType_type); - if (__pyx_FusedFunctionType == NULL) { - return -1; - } - return 0; -} - -//////////////////// ClassMethod.proto //////////////////// - -#include "descrobject.h" -static PyObject* __Pyx_Method_ClassMethod(PyObject *method); /*proto*/ - -//////////////////// ClassMethod //////////////////// - -static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { -#if CYTHON_COMPILING_IN_PYPY - if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { /* cdef classes */ - return PyClassMethod_New(method); - } -#else - /* It appears that PyMethodDescr_Type is not anywhere exposed in the Python/C API */ - static PyTypeObject *methoddescr_type = NULL; - if (methoddescr_type == NULL) { - PyObject *meth = __Pyx_GetAttrString((PyObject*)&PyList_Type, "append"); - if (!meth) return NULL; - methoddescr_type = Py_TYPE(meth); - Py_DECREF(meth); - } - if (PyObject_TypeCheck(method, methoddescr_type)) { /* cdef classes */ - PyMethodDescrObject *descr = (PyMethodDescrObject *)method; - #if PY_VERSION_HEX < 0x03020000 - PyTypeObject *d_type = descr->d_type; - #else - PyTypeObject *d_type = descr->d_common.d_type; - #endif - return PyDescr_NewClassMethod(d_type, descr->d_method); - } -#endif - else if (PyMethod_Check(method)) { /* python classes */ - return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); - } - else if (PyCFunction_Check(method)) { - return PyClassMethod_New(method); - } -#ifdef __Pyx_CyFunction_USED - else if (PyObject_TypeCheck(method, __pyx_CyFunctionType)) { - return PyClassMethod_New(method); - } -#endif - PyErr_SetString(PyExc_TypeError, - "Class-level classmethod() can only be called on " - "a method_descriptor or instance method."); - return NULL; -} diff --git a/third_party/cython/src/Cython/Utility/Embed.c b/third_party/cython/src/Cython/Utility/Embed.c deleted file mode 100644 index fac123383b808..0000000000000 --- a/third_party/cython/src/Cython/Utility/Embed.c +++ /dev/null @@ -1,192 +0,0 @@ -//////////////////// MainFunction //////////////////// - -#ifdef __FreeBSD__ -#include -#endif - -#if PY_MAJOR_VERSION < 3 -int %(main_method)s(int argc, char** argv) { -#elif defined(WIN32) || defined(MS_WINDOWS) -int %(wmain_method)s(int argc, wchar_t **argv) { -#else -static int __Pyx_main(int argc, wchar_t **argv) { -#endif - /* 754 requires that FP exceptions run in "no stop" mode by default, - * and until C vendors implement C99's ways to control FP exceptions, - * Python requires non-stop mode. Alas, some platforms enable FP - * exceptions by default. Here we disable them. - */ -#ifdef __FreeBSD__ - fp_except_t m; - - m = fpgetmask(); - fpsetmask(m & ~FP_X_OFL); -#endif - if (argc && argv) - Py_SetProgramName(argv[0]); - Py_Initialize(); - if (argc && argv) - PySys_SetArgv(argc, argv); - { /* init module '%(module_name)s' as '__main__' */ - PyObject* m = NULL; - %(module_is_main)s = 1; - #if PY_MAJOR_VERSION < 3 - init%(module_name)s(); - #else - m = PyInit_%(module_name)s(); - #endif - if (PyErr_Occurred()) { - PyErr_Print(); /* This exits with the right code if SystemExit. */ - #if PY_MAJOR_VERSION < 3 - if (Py_FlushLine()) PyErr_Clear(); - #endif - return 1; - } - Py_XDECREF(m); - } - Py_Finalize(); - return 0; -} - - -#if PY_MAJOR_VERSION >= 3 && !defined(WIN32) && !defined(MS_WINDOWS) -#include - -static wchar_t* -__Pyx_char2wchar(char* arg) -{ - wchar_t *res; -#ifdef HAVE_BROKEN_MBSTOWCS - /* Some platforms have a broken implementation of - * mbstowcs which does not count the characters that - * would result from conversion. Use an upper bound. - */ - size_t argsize = strlen(arg); -#else - size_t argsize = mbstowcs(NULL, arg, 0); -#endif - size_t count; - unsigned char *in; - wchar_t *out; -#ifdef HAVE_MBRTOWC - mbstate_t mbs; -#endif - if (argsize != (size_t)-1) { - res = (wchar_t *)malloc((argsize+1)*sizeof(wchar_t)); - if (!res) - goto oom; - count = mbstowcs(res, arg, argsize+1); - if (count != (size_t)-1) { - wchar_t *tmp; - /* Only use the result if it contains no - surrogate characters. */ - for (tmp = res; *tmp != 0 && - (*tmp < 0xd800 || *tmp > 0xdfff); tmp++) - ; - if (*tmp == 0) - return res; - } - free(res); - } - /* Conversion failed. Fall back to escaping with surrogateescape. */ -#ifdef HAVE_MBRTOWC - /* Try conversion with mbrtwoc (C99), and escape non-decodable bytes. */ - - /* Overallocate; as multi-byte characters are in the argument, the - actual output could use less memory. */ - argsize = strlen(arg) + 1; - res = malloc(argsize*sizeof(wchar_t)); - if (!res) goto oom; - in = (unsigned char*)arg; - out = res; - memset(&mbs, 0, sizeof mbs); - while (argsize) { - size_t converted = mbrtowc(out, (char*)in, argsize, &mbs); - if (converted == 0) - /* Reached end of string; null char stored. */ - break; - if (converted == (size_t)-2) { - /* Incomplete character. This should never happen, - since we provide everything that we have - - unless there is a bug in the C library, or I - misunderstood how mbrtowc works. */ - fprintf(stderr, "unexpected mbrtowc result -2\\n"); - return NULL; - } - if (converted == (size_t)-1) { - /* Conversion error. Escape as UTF-8b, and start over - in the initial shift state. */ - *out++ = 0xdc00 + *in++; - argsize--; - memset(&mbs, 0, sizeof mbs); - continue; - } - if (*out >= 0xd800 && *out <= 0xdfff) { - /* Surrogate character. Escape the original - byte sequence with surrogateescape. */ - argsize -= converted; - while (converted--) - *out++ = 0xdc00 + *in++; - continue; - } - /* successfully converted some bytes */ - in += converted; - argsize -= converted; - out++; - } -#else - /* Cannot use C locale for escaping; manually escape as if charset - is ASCII (i.e. escape all bytes > 128. This will still roundtrip - correctly in the locale's charset, which must be an ASCII superset. */ - res = malloc((strlen(arg)+1)*sizeof(wchar_t)); - if (!res) goto oom; - in = (unsigned char*)arg; - out = res; - while(*in) - if(*in < 128) - *out++ = *in++; - else - *out++ = 0xdc00 + *in++; - *out = 0; -#endif - return res; -oom: - fprintf(stderr, "out of memory\\n"); - return NULL; -} - -int -%(main_method)s(int argc, char **argv) -{ - if (!argc) { - return __Pyx_main(0, NULL); - } - else { - wchar_t **argv_copy = (wchar_t **)malloc(sizeof(wchar_t*)*argc); - /* We need a second copies, as Python might modify the first one. */ - wchar_t **argv_copy2 = (wchar_t **)malloc(sizeof(wchar_t*)*argc); - int i, res; - char *oldloc; - if (!argv_copy || !argv_copy2) { - fprintf(stderr, "out of memory\\n"); - return 1; - } - oldloc = strdup(setlocale(LC_ALL, NULL)); - setlocale(LC_ALL, ""); - for (i = 0; i < argc; i++) { - argv_copy2[i] = argv_copy[i] = __Pyx_char2wchar(argv[i]); - if (!argv_copy[i]) - return 1; - } - setlocale(LC_ALL, oldloc); - free(oldloc); - res = __Pyx_main(argc, argv_copy); - for (i = 0; i < argc; i++) { - free(argv_copy2[i]); - } - free(argv_copy); - free(argv_copy2); - return res; - } -} -#endif diff --git a/third_party/cython/src/Cython/Utility/Exceptions.c b/third_party/cython/src/Cython/Utility/Exceptions.c deleted file mode 100644 index 4bfd197776807..0000000000000 --- a/third_party/cython/src/Cython/Utility/Exceptions.c +++ /dev/null @@ -1,547 +0,0 @@ -// Exception raising code -// -// Exceptions are raised by __Pyx_Raise() and stored as plain -// type/value/tb in PyThreadState->curexc_*. When being caught by an -// 'except' statement, curexc_* is moved over to exc_* by -// __Pyx_GetException() - -/////////////// PyErrFetchRestore.proto /////////////// - -static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ - -/////////////// PyErrFetchRestore /////////////// - -static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { -#if CYTHON_COMPILING_IN_CPYTHON - PyObject *tmp_type, *tmp_value, *tmp_tb; - PyThreadState *tstate = PyThreadState_GET(); - - tmp_type = tstate->curexc_type; - tmp_value = tstate->curexc_value; - tmp_tb = tstate->curexc_traceback; - tstate->curexc_type = type; - tstate->curexc_value = value; - tstate->curexc_traceback = tb; - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); -#else - PyErr_Restore(type, value, tb); -#endif -} - -static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { -#if CYTHON_COMPILING_IN_CPYTHON - PyThreadState *tstate = PyThreadState_GET(); - *type = tstate->curexc_type; - *value = tstate->curexc_value; - *tb = tstate->curexc_traceback; - - tstate->curexc_type = 0; - tstate->curexc_value = 0; - tstate->curexc_traceback = 0; -#else - PyErr_Fetch(type, value, tb); -#endif -} - -/////////////// RaiseException.proto /////////////// - -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ - -/////////////// RaiseException /////////////// -//@requires: PyErrFetchRestore - -// The following function is based on do_raise() from ceval.c. There -// are separate versions for Python2 and Python3 as exception handling -// has changed quite a lot between the two versions. - -#if PY_MAJOR_VERSION < 3 -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, - CYTHON_UNUSED PyObject *cause) { - /* 'cause' is only used in Py3 */ - Py_XINCREF(type); - if (!value || value == Py_None) - value = NULL; - else - Py_INCREF(value); - - if (!tb || tb == Py_None) - tb = NULL; - else { - Py_INCREF(tb); - if (!PyTraceBack_Check(tb)) { - PyErr_SetString(PyExc_TypeError, - "raise: arg 3 must be a traceback or None"); - goto raise_error; - } - } - - #if PY_VERSION_HEX < 0x02050000 - if (PyClass_Check(type)) { - #else - if (PyType_Check(type)) { - #endif - /* instantiate the type now (we don't know when and how it will be caught) */ -#if CYTHON_COMPILING_IN_PYPY - /* PyPy can't handle value == NULL */ - if (!value) { - Py_INCREF(Py_None); - value = Py_None; - } -#endif - PyErr_NormalizeException(&type, &value, &tb); - - } else { - /* Raising an instance. The value should be a dummy. */ - if (value) { - PyErr_SetString(PyExc_TypeError, - "instance exception may not have a separate value"); - goto raise_error; - } - /* Normalize to raise , */ - value = type; - #if PY_VERSION_HEX < 0x02050000 - if (PyInstance_Check(type)) { - type = (PyObject*) ((PyInstanceObject*)type)->in_class; - Py_INCREF(type); - } else { - type = 0; - PyErr_SetString(PyExc_TypeError, - "raise: exception must be an old-style class or instance"); - goto raise_error; - } - #else - type = (PyObject*) Py_TYPE(type); - Py_INCREF(type); - if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { - PyErr_SetString(PyExc_TypeError, - "raise: exception class must be a subclass of BaseException"); - goto raise_error; - } - #endif - } - - __Pyx_ErrRestore(type, value, tb); - return; -raise_error: - Py_XDECREF(value); - Py_XDECREF(type); - Py_XDECREF(tb); - return; -} - -#else /* Python 3+ */ - -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { - PyObject* owned_instance = NULL; - if (tb == Py_None) { - tb = 0; - } else if (tb && !PyTraceBack_Check(tb)) { - PyErr_SetString(PyExc_TypeError, - "raise: arg 3 must be a traceback or None"); - goto bad; - } - if (value == Py_None) - value = 0; - - if (PyExceptionInstance_Check(type)) { - if (value) { - PyErr_SetString(PyExc_TypeError, - "instance exception may not have a separate value"); - goto bad; - } - value = type; - type = (PyObject*) Py_TYPE(value); - } else if (PyExceptionClass_Check(type)) { - // make sure value is an exception instance of type - PyObject *instance_class = NULL; - if (value && PyExceptionInstance_Check(value)) { - instance_class = (PyObject*) Py_TYPE(value); - if (instance_class != type) { - if (PyObject_IsSubclass(instance_class, type)) { - // believe the instance - type = instance_class; - } else { - instance_class = NULL; - } - } - } - if (!instance_class) { - // instantiate the type now (we don't know when and how it will be caught) - // assuming that 'value' is an argument to the type's constructor - // not using PyErr_NormalizeException() to avoid ref-counting problems - PyObject *args; - if (!value) - args = PyTuple_New(0); - else if (PyTuple_Check(value)) { - Py_INCREF(value); - args = value; - } else - args = PyTuple_Pack(1, value); - if (!args) - goto bad; - owned_instance = PyObject_Call(type, args, NULL); - Py_DECREF(args); - if (!owned_instance) - goto bad; - value = owned_instance; - if (!PyExceptionInstance_Check(value)) { - PyErr_Format(PyExc_TypeError, - "calling %R should have returned an instance of " - "BaseException, not %R", - type, Py_TYPE(value)); - goto bad; - } - } - } else { - PyErr_SetString(PyExc_TypeError, - "raise: exception class must be a subclass of BaseException"); - goto bad; - } - -#if PY_VERSION_HEX >= 0x03030000 - if (cause) { -#else - if (cause && cause != Py_None) { -#endif - PyObject *fixed_cause; - if (cause == Py_None) { - // raise ... from None - fixed_cause = NULL; - } else if (PyExceptionClass_Check(cause)) { - fixed_cause = PyObject_CallObject(cause, NULL); - if (fixed_cause == NULL) - goto bad; - } else if (PyExceptionInstance_Check(cause)) { - fixed_cause = cause; - Py_INCREF(fixed_cause); - } else { - PyErr_SetString(PyExc_TypeError, - "exception causes must derive from " - "BaseException"); - goto bad; - } - PyException_SetCause(value, fixed_cause); - } - - PyErr_SetObject(type, value); - - if (tb) { - PyThreadState *tstate = PyThreadState_GET(); - PyObject* tmp_tb = tstate->curexc_traceback; - if (tb != tmp_tb) { - Py_INCREF(tb); - tstate->curexc_traceback = tb; - Py_XDECREF(tmp_tb); - } - } - -bad: - Py_XDECREF(owned_instance); - return; -} -#endif - -/////////////// GetException.proto /////////////// - -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ - -/////////////// GetException /////////////// - -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { - PyObject *local_type, *local_value, *local_tb; -#if CYTHON_COMPILING_IN_CPYTHON - PyObject *tmp_type, *tmp_value, *tmp_tb; - PyThreadState *tstate = PyThreadState_GET(); - local_type = tstate->curexc_type; - local_value = tstate->curexc_value; - local_tb = tstate->curexc_traceback; - tstate->curexc_type = 0; - tstate->curexc_value = 0; - tstate->curexc_traceback = 0; -#else - PyErr_Fetch(&local_type, &local_value, &local_tb); -#endif - PyErr_NormalizeException(&local_type, &local_value, &local_tb); -#if CYTHON_COMPILING_IN_CPYTHON - if (unlikely(tstate->curexc_type)) -#else - if (unlikely(PyErr_Occurred())) -#endif - goto bad; - #if PY_MAJOR_VERSION >= 3 - if (local_tb) { - if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) - goto bad; - } - #endif - // traceback may be NULL for freshly raised exceptions - Py_XINCREF(local_tb); - // exception state may be temporarily empty in parallel loops (race condition) - Py_XINCREF(local_type); - Py_XINCREF(local_value); - *type = local_type; - *value = local_value; - *tb = local_tb; -#if CYTHON_COMPILING_IN_CPYTHON - tmp_type = tstate->exc_type; - tmp_value = tstate->exc_value; - tmp_tb = tstate->exc_traceback; - tstate->exc_type = local_type; - tstate->exc_value = local_value; - tstate->exc_traceback = local_tb; - // Make sure tstate is in a consistent state when we XDECREF - // these objects (DECREF may run arbitrary code). - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); -#else - PyErr_SetExcInfo(local_type, local_value, local_tb); -#endif - return 0; -bad: - *type = 0; - *value = 0; - *tb = 0; - Py_XDECREF(local_type); - Py_XDECREF(local_value); - Py_XDECREF(local_tb); - return -1; -} - -/////////////// ReRaiseException.proto /////////////// - -static CYTHON_INLINE void __Pyx_ReraiseException(void); /*proto*/ - -/////////////// ReRaiseException.proto /////////////// - -static CYTHON_INLINE void __Pyx_ReraiseException(void) { - PyObject *type = NULL, *value = NULL, *tb = NULL; -#if CYTHON_COMPILING_IN_CPYTHON - PyThreadState *tstate = PyThreadState_GET(); - type = tstate->exc_type; - value = tstate->exc_value; - tb = tstate->exc_traceback; -#else - PyErr_GetExcInfo(&type, &value, &tb); -#endif - if (!type || type == Py_None) { -#if !CYTHON_COMPILING_IN_CPYTHON - Py_XDECREF(type); - Py_XDECREF(value); - Py_XDECREF(tb); -#endif - // message copied from Py3 - PyErr_SetString(PyExc_RuntimeError, - "No active exception to reraise"); - } else { -#if CYTHON_COMPILING_IN_CPYTHON - Py_INCREF(type); - Py_XINCREF(value); - Py_XINCREF(tb); - -#endif - PyErr_Restore(type, value, tb); - } -} - -/////////////// SaveResetException.proto /////////////// - -static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ - -/////////////// SaveResetException /////////////// - -static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) { -#if CYTHON_COMPILING_IN_CPYTHON - PyThreadState *tstate = PyThreadState_GET(); - *type = tstate->exc_type; - *value = tstate->exc_value; - *tb = tstate->exc_traceback; - Py_XINCREF(*type); - Py_XINCREF(*value); - Py_XINCREF(*tb); -#else - PyErr_GetExcInfo(type, value, tb); -#endif -} - -static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) { -#if CYTHON_COMPILING_IN_CPYTHON - PyObject *tmp_type, *tmp_value, *tmp_tb; - PyThreadState *tstate = PyThreadState_GET(); - tmp_type = tstate->exc_type; - tmp_value = tstate->exc_value; - tmp_tb = tstate->exc_traceback; - tstate->exc_type = type; - tstate->exc_value = value; - tstate->exc_traceback = tb; - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); -#else - PyErr_SetExcInfo(type, value, tb); -#endif -} - -/////////////// SwapException.proto /////////////// - -static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ - -/////////////// SwapException /////////////// - -static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { - PyObject *tmp_type, *tmp_value, *tmp_tb; -#if CYTHON_COMPILING_IN_CPYTHON - PyThreadState *tstate = PyThreadState_GET(); - - tmp_type = tstate->exc_type; - tmp_value = tstate->exc_value; - tmp_tb = tstate->exc_traceback; - - tstate->exc_type = *type; - tstate->exc_value = *value; - tstate->exc_traceback = *tb; -#else - PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); - PyErr_SetExcInfo(*type, *value, *tb); -#endif - - *type = tmp_type; - *value = tmp_value; - *tb = tmp_tb; -} - -/////////////// WriteUnraisableException.proto /////////////// - -static void __Pyx_WriteUnraisable(const char *name, int clineno, - int lineno, const char *filename, - int full_traceback); /*proto*/ - -/////////////// WriteUnraisableException /////////////// -//@requires: PyErrFetchRestore - -static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, - CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, - int full_traceback) { - PyObject *old_exc, *old_val, *old_tb; - PyObject *ctx; - __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); - if (full_traceback) { - Py_XINCREF(old_exc); - Py_XINCREF(old_val); - Py_XINCREF(old_tb); - __Pyx_ErrRestore(old_exc, old_val, old_tb); - PyErr_PrintEx(1); - } - #if PY_MAJOR_VERSION < 3 - ctx = PyString_FromString(name); - #else - ctx = PyUnicode_FromString(name); - #endif - __Pyx_ErrRestore(old_exc, old_val, old_tb); - if (!ctx) { - PyErr_WriteUnraisable(Py_None); - } else { - PyErr_WriteUnraisable(ctx); - Py_DECREF(ctx); - } -} - -/////////////// AddTraceback.proto /////////////// - -static void __Pyx_AddTraceback(const char *funcname, int c_line, - int py_line, const char *filename); /*proto*/ - -/////////////// AddTraceback /////////////// -//@requires: ModuleSetupCode.c::CodeObjectCache -//@substitute: naming - -#include "compile.h" -#include "frameobject.h" -#include "traceback.h" - -static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { - PyCodeObject *py_code = 0; - PyObject *py_srcfile = 0; - PyObject *py_funcname = 0; - - #if PY_MAJOR_VERSION < 3 - py_srcfile = PyString_FromString(filename); - #else - py_srcfile = PyUnicode_FromString(filename); - #endif - if (!py_srcfile) goto bad; - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, $cfilenm_cname, c_line); - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, $cfilenm_cname, c_line); - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); - #else - py_funcname = PyUnicode_FromString(funcname); - #endif - } - if (!py_funcname) goto bad; - py_code = __Pyx_PyCode_New( - 0, /*int argcount,*/ - 0, /*int kwonlyargcount,*/ - 0, /*int nlocals,*/ - 0, /*int stacksize,*/ - 0, /*int flags,*/ - $empty_bytes, /*PyObject *code,*/ - $empty_tuple, /*PyObject *consts,*/ - $empty_tuple, /*PyObject *names,*/ - $empty_tuple, /*PyObject *varnames,*/ - $empty_tuple, /*PyObject *freevars,*/ - $empty_tuple, /*PyObject *cellvars,*/ - py_srcfile, /*PyObject *filename,*/ - py_funcname, /*PyObject *name,*/ - py_line, /*int firstlineno,*/ - $empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); - Py_DECREF(py_funcname); - return py_code; -bad: - Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); - return NULL; -} - -static void __Pyx_AddTraceback(const char *funcname, int c_line, - int py_line, const char *filename) { - PyCodeObject *py_code = 0; - PyObject *py_globals = 0; - PyFrameObject *py_frame = 0; - - py_code = $global_code_object_cache_find(c_line ? c_line : py_line); - if (!py_code) { - py_code = __Pyx_CreateCodeObjectForTraceback( - funcname, c_line, py_line, filename); - if (!py_code) goto bad; - $global_code_object_cache_insert(c_line ? c_line : py_line, py_code); - } - py_globals = PyModule_GetDict($module_cname); - if (!py_globals) goto bad; - py_frame = PyFrame_New( - PyThreadState_GET(), /*PyThreadState *tstate,*/ - py_code, /*PyCodeObject *code,*/ - py_globals, /*PyObject *globals,*/ - 0 /*PyObject *locals*/ - ); - if (!py_frame) goto bad; - py_frame->f_lineno = py_line; - PyTraceBack_Here(py_frame); -bad: - Py_XDECREF(py_code); - Py_XDECREF(py_frame); -} diff --git a/third_party/cython/src/Cython/Utility/ExtensionTypes.c b/third_party/cython/src/Cython/Utility/ExtensionTypes.c deleted file mode 100644 index 423ed96732591..0000000000000 --- a/third_party/cython/src/Cython/Utility/ExtensionTypes.c +++ /dev/null @@ -1,53 +0,0 @@ - -/////////////// CallNextTpDealloc.proto /////////////// - -static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc); - -/////////////// CallNextTpDealloc /////////////// - -static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) { - PyTypeObject* type = Py_TYPE(obj); - /* try to find the first parent type that has a different tp_dealloc() function */ - while (type && type->tp_dealloc != current_tp_dealloc) - type = type->tp_base; - while (type && type->tp_dealloc == current_tp_dealloc) - type = type->tp_base; - if (type) - type->tp_dealloc(obj); -} - -/////////////// CallNextTpTraverse.proto /////////////// - -static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); - -/////////////// CallNextTpTraverse /////////////// - -static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { - PyTypeObject* type = Py_TYPE(obj); - /* try to find the first parent type that has a different tp_traverse() function */ - while (type && type->tp_traverse != current_tp_traverse) - type = type->tp_base; - while (type && type->tp_traverse == current_tp_traverse) - type = type->tp_base; - if (type && type->tp_traverse) - return type->tp_traverse(obj, v, a); - // FIXME: really ignore? - return 0; -} - -/////////////// CallNextTpClear.proto /////////////// - -static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc); - -/////////////// CallNextTpClear /////////////// - -static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { - PyTypeObject* type = Py_TYPE(obj); - /* try to find the first parent type that has a different tp_clear() function */ - while (type && type->tp_clear != current_tp_clear) - type = type->tp_base; - while (type && type->tp_clear == current_tp_clear) - type = type->tp_base; - if (type && type->tp_clear) - type->tp_clear(obj); -} diff --git a/third_party/cython/src/Cython/Utility/FunctionArguments.c b/third_party/cython/src/Cython/Utility/FunctionArguments.c deleted file mode 100644 index d0ea7b86f95fb..0000000000000 --- a/third_party/cython/src/Cython/Utility/FunctionArguments.c +++ /dev/null @@ -1,292 +0,0 @@ -//////////////////// ArgTypeTest.proto //////////////////// - -static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, - const char *name, int exact); /*proto*/ - -//////////////////// ArgTypeTest //////////////////// - -static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { - PyErr_Format(PyExc_TypeError, - "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", - name, type->tp_name, Py_TYPE(obj)->tp_name); -} - -static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, - const char *name, int exact) -{ - if (unlikely(!type)) { - PyErr_SetString(PyExc_SystemError, "Missing type object"); - return 0; - } - if (none_allowed && obj == Py_None) return 1; - else if (exact) { - if (likely(Py_TYPE(obj) == type)) return 1; - #if PY_MAJOR_VERSION == 2 - else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; - #endif - } - else { - if (likely(PyObject_TypeCheck(obj, type))) return 1; - } - __Pyx_RaiseArgumentTypeInvalid(name, obj, type); - return 0; -} - -//////////////////// RaiseArgTupleInvalid.proto //////////////////// - -static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, - Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/ - -//////////////////// RaiseArgTupleInvalid //////////////////// - -// __Pyx_RaiseArgtupleInvalid raises the correct exception when too -// many or too few positional arguments were found. This handles -// Py_ssize_t formatting correctly. - -static void __Pyx_RaiseArgtupleInvalid( - const char* func_name, - int exact, - Py_ssize_t num_min, - Py_ssize_t num_max, - Py_ssize_t num_found) -{ - Py_ssize_t num_expected; - const char *more_or_less; - - if (num_found < num_min) { - num_expected = num_min; - more_or_less = "at least"; - } else { - num_expected = num_max; - more_or_less = "at most"; - } - if (exact) { - more_or_less = "exactly"; - } - PyErr_Format(PyExc_TypeError, - "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", - func_name, more_or_less, num_expected, - (num_expected == 1) ? "" : "s", num_found); -} - - -//////////////////// RaiseKeywordRequired.proto //////////////////// - -static CYTHON_INLINE void __Pyx_RaiseKeywordRequired(const char* func_name, PyObject* kw_name); /*proto*/ - -//////////////////// RaiseKeywordRequired //////////////////// - -static CYTHON_INLINE void __Pyx_RaiseKeywordRequired( - const char* func_name, - PyObject* kw_name) -{ - PyErr_Format(PyExc_TypeError, - #if PY_MAJOR_VERSION >= 3 - "%s() needs keyword-only argument %U", func_name, kw_name); - #else - "%s() needs keyword-only argument %s", func_name, - PyString_AS_STRING(kw_name)); - #endif -} - - -//////////////////// RaiseDoubleKeywords.proto //////////////////// - -static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ - -//////////////////// RaiseDoubleKeywords //////////////////// - -static void __Pyx_RaiseDoubleKeywordsError( - const char* func_name, - PyObject* kw_name) -{ - PyErr_Format(PyExc_TypeError, - #if PY_MAJOR_VERSION >= 3 - "%s() got multiple values for keyword argument '%U'", func_name, kw_name); - #else - "%s() got multiple values for keyword argument '%s'", func_name, - PyString_AsString(kw_name)); - #endif -} - - -//////////////////// KeywordStringCheck.proto //////////////////// - -static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/ - -//////////////////// KeywordStringCheck //////////////////// - -// __Pyx_CheckKeywordStrings raises an error if non-string keywords -// were passed to a function, or if any keywords were passed to a -// function that does not accept them. - -static CYTHON_INLINE int __Pyx_CheckKeywordStrings( - PyObject *kwdict, - const char* function_name, - int kw_allowed) -{ - PyObject* key = 0; - Py_ssize_t pos = 0; -#if CYTHON_COMPILING_IN_PYPY - /* PyPy appears to check keywords at call time, not at unpacking time => not much to do here */ - if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) - goto invalid_keyword; - return 1; -#else - while (PyDict_Next(kwdict, &pos, &key, 0)) { - #if PY_MAJOR_VERSION < 3 - if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) - #endif - if (unlikely(!PyUnicode_Check(key))) - goto invalid_keyword_type; - } - if ((!kw_allowed) && unlikely(key)) - goto invalid_keyword; - return 1; -invalid_keyword_type: - PyErr_Format(PyExc_TypeError, - "%.200s() keywords must be strings", function_name); - return 0; -#endif -invalid_keyword: - PyErr_Format(PyExc_TypeError, - #if PY_MAJOR_VERSION < 3 - "%.200s() got an unexpected keyword argument '%.200s'", - function_name, PyString_AsString(key)); - #else - "%s() got an unexpected keyword argument '%U'", - function_name, key); - #endif - return 0; -} - - -//////////////////// ParseKeywords.proto //////////////////// - -static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ - PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ - const char* function_name); /*proto*/ - -//////////////////// ParseKeywords //////////////////// -//@requires: RaiseDoubleKeywords - -// __Pyx_ParseOptionalKeywords copies the optional/unknown keyword -// arguments from the kwds dict into kwds2. If kwds2 is NULL, unknown -// keywords will raise an invalid keyword error. -// -// Three kinds of errors are checked: 1) non-string keywords, 2) -// unexpected keywords and 3) overlap with positional arguments. -// -// If num_posargs is greater 0, it denotes the number of positional -// arguments that were passed and that must therefore not appear -// amongst the keywords as well. -// -// This method does not check for required keyword arguments. - -static int __Pyx_ParseOptionalKeywords( - PyObject *kwds, - PyObject **argnames[], - PyObject *kwds2, - PyObject *values[], - Py_ssize_t num_pos_args, - const char* function_name) -{ - PyObject *key = 0, *value = 0; - Py_ssize_t pos = 0; - PyObject*** name; - PyObject*** first_kw_arg = argnames + num_pos_args; - - while (PyDict_Next(kwds, &pos, &key, &value)) { - name = first_kw_arg; - while (*name && (**name != key)) name++; - if (*name) { - values[name-argnames] = value; - continue; - } - - name = first_kw_arg; - #if PY_MAJOR_VERSION < 3 - if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { - while (*name) { - if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) - && _PyString_Eq(**name, key)) { - values[name-argnames] = value; - break; - } - name++; - } - if (*name) continue; - else { - // not found after positional args, check for duplicate - PyObject*** argname = argnames; - while (argname != first_kw_arg) { - if ((**argname == key) || ( - (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) - && _PyString_Eq(**argname, key))) { - goto arg_passed_twice; - } - argname++; - } - } - } else - #endif - if (likely(PyUnicode_Check(key))) { - while (*name) { - int cmp = (**name == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : - #endif - // need to convert argument name from bytes to unicode for comparison - PyUnicode_Compare(**name, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; - if (cmp == 0) { - values[name-argnames] = value; - break; - } - name++; - } - if (*name) continue; - else { - // not found after positional args, check for duplicate - PyObject*** argname = argnames; - while (argname != first_kw_arg) { - int cmp = (**argname == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : - #endif - // need to convert argument name from bytes to unicode for comparison - PyUnicode_Compare(**argname, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; - if (cmp == 0) goto arg_passed_twice; - argname++; - } - } - } else - goto invalid_keyword_type; - - if (kwds2) { - if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; - } else { - goto invalid_keyword; - } - } - return 0; -arg_passed_twice: - __Pyx_RaiseDoubleKeywordsError(function_name, key); - goto bad; -invalid_keyword_type: - PyErr_Format(PyExc_TypeError, - "%.200s() keywords must be strings", function_name); - goto bad; -invalid_keyword: - PyErr_Format(PyExc_TypeError, - #if PY_MAJOR_VERSION < 3 - "%.200s() got an unexpected keyword argument '%.200s'", - function_name, PyString_AsString(key)); - #else - "%s() got an unexpected keyword argument '%U'", - function_name, key); - #endif -bad: - return -1; -} diff --git a/third_party/cython/src/Cython/Utility/Generator.c b/third_party/cython/src/Cython/Utility/Generator.c deleted file mode 100644 index 82dbb637a1ddb..0000000000000 --- a/third_party/cython/src/Cython/Utility/Generator.c +++ /dev/null @@ -1,664 +0,0 @@ -//////////////////// YieldFrom.proto //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_Generator_Yield_From(__pyx_GeneratorObject *gen, PyObject *source); - -//////////////////// YieldFrom //////////////////// -//@requires: Generator - -static CYTHON_INLINE PyObject* __Pyx_Generator_Yield_From(__pyx_GeneratorObject *gen, PyObject *source) { - PyObject *source_gen, *retval; - source_gen = PyObject_GetIter(source); - if (unlikely(!source_gen)) - return NULL; - /* source_gen is now the iterator, make the first next() call */ - retval = Py_TYPE(source_gen)->tp_iternext(source_gen); - if (likely(retval)) { - gen->yieldfrom = source_gen; - return retval; - } - Py_DECREF(source_gen); - return NULL; -} - -//////////////////// Generator.proto //////////////////// -#define __Pyx_Generator_USED -#include -#include - -typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *); - -typedef struct { - PyObject_HEAD - __pyx_generator_body_t body; - PyObject *closure; - PyObject *exc_type; - PyObject *exc_value; - PyObject *exc_traceback; - PyObject *gi_weakreflist; - PyObject *classobj; - PyObject *yieldfrom; - int resume_label; - // using T_BOOL for property below requires char value - char is_running; -} __pyx_GeneratorObject; - -static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, - PyObject *closure); -static int __pyx_Generator_init(void); -static int __Pyx_Generator_clear(PyObject* self); - -#if 1 || PY_VERSION_HEX < 0x030300B0 -static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue); -#else -#define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue) -#endif - -//////////////////// Generator //////////////////// -//@requires: Exceptions.c::PyErrFetchRestore -//@requires: Exceptions.c::SwapException -//@requires: Exceptions.c::RaiseException -//@requires: ObjectHandling.c::PyObjectCallMethod -//@requires: CommonTypes.c::FetchCommonType - -static PyObject *__Pyx_Generator_Next(PyObject *self); -static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value); -static PyObject *__Pyx_Generator_Close(PyObject *self); -static PyObject *__Pyx_Generator_Throw(PyObject *gen, PyObject *args); - -static PyTypeObject *__pyx_GeneratorType = 0; - -#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType) -#define __Pyx_Generator_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) - -// If StopIteration exception is set, fetches its 'value' -// attribute if any, otherwise sets pvalue to None. -// -// Returns 0 if no exception or StopIteration is set. -// If any other exception is set, returns -1 and leaves -// pvalue unchanged. -#if 1 || PY_VERSION_HEX < 0x030300B0 -static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) { - PyObject *et, *ev, *tb; - PyObject *value = NULL; - - __Pyx_ErrFetch(&et, &ev, &tb); - - if (!et) { - Py_XDECREF(tb); - Py_XDECREF(ev); - Py_INCREF(Py_None); - *pvalue = Py_None; - return 0; - } - - if (unlikely(et != PyExc_StopIteration) && - unlikely(!PyErr_GivenExceptionMatches(et, PyExc_StopIteration))) { - __Pyx_ErrRestore(et, ev, tb); - return -1; - } - - // most common case: plain StopIteration without or with separate argument - if (likely(et == PyExc_StopIteration)) { - if (likely(!ev) || !PyObject_IsInstance(ev, PyExc_StopIteration)) { - // PyErr_SetObject() and friends put the value directly into ev - if (!ev) { - Py_INCREF(Py_None); - ev = Py_None; - } - Py_XDECREF(tb); - Py_DECREF(et); - *pvalue = ev; - return 0; - } - } - // otherwise: normalise and check what that gives us - PyErr_NormalizeException(&et, &ev, &tb); - if (unlikely(!PyObject_IsInstance(ev, PyExc_StopIteration))) { - // looks like normalisation failed - raise the new exception - __Pyx_ErrRestore(et, ev, tb); - return -1; - } - Py_XDECREF(tb); - Py_DECREF(et); -#if PY_VERSION_HEX >= 0x030300A0 - value = ((PyStopIterationObject *)ev)->value; - Py_INCREF(value); - Py_DECREF(ev); -#else - { - PyObject* args = PyObject_GetAttr(ev, PYIDENT("args")); - Py_DECREF(ev); - if (likely(args)) { - value = PyObject_GetItem(args, 0); - Py_DECREF(args); - } - if (unlikely(!value)) { - __Pyx_ErrRestore(NULL, NULL, NULL); - Py_INCREF(Py_None); - value = Py_None; - } - } -#endif - *pvalue = value; - return 0; -} -#endif - -static CYTHON_INLINE -void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *self) { - PyObject *exc_type = self->exc_type; - PyObject *exc_value = self->exc_value; - PyObject *exc_traceback = self->exc_traceback; - - self->exc_type = NULL; - self->exc_value = NULL; - self->exc_traceback = NULL; - - Py_XDECREF(exc_type); - Py_XDECREF(exc_value); - Py_XDECREF(exc_traceback); -} - -static CYTHON_INLINE -int __Pyx_Generator_CheckRunning(__pyx_GeneratorObject *gen) { - if (unlikely(gen->is_running)) { - PyErr_SetString(PyExc_ValueError, - "generator already executing"); - return 1; - } - return 0; -} - -static CYTHON_INLINE -PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) { - PyObject *retval; - - assert(!self->is_running); - - if (unlikely(self->resume_label == 0)) { - if (unlikely(value && value != Py_None)) { - PyErr_SetString(PyExc_TypeError, - "can't send non-None value to a " - "just-started generator"); - return NULL; - } - } - - if (unlikely(self->resume_label == -1)) { - PyErr_SetNone(PyExc_StopIteration); - return NULL; - } - - - if (value) { -#if CYTHON_COMPILING_IN_PYPY - // FIXME: what to do in PyPy? -#else - /* Generators always return to their most recent caller, not - * necessarily their creator. */ - if (self->exc_traceback) { - PyThreadState *tstate = PyThreadState_GET(); - PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; - PyFrameObject *f = tb->tb_frame; - - Py_XINCREF(tstate->frame); - assert(f->f_back == NULL); - f->f_back = tstate->frame; - } -#endif - __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, - &self->exc_traceback); - } else { - __Pyx_Generator_ExceptionClear(self); - } - - self->is_running = 1; - retval = self->body((PyObject *) self, value); - self->is_running = 0; - - if (retval) { - __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, - &self->exc_traceback); -#if CYTHON_COMPILING_IN_PYPY - // FIXME: what to do in PyPy? -#else - /* Don't keep the reference to f_back any longer than necessary. It - * may keep a chain of frames alive or it could create a reference - * cycle. */ - if (self->exc_traceback) { - PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; - PyFrameObject *f = tb->tb_frame; - Py_CLEAR(f->f_back); - } -#endif - } else { - __Pyx_Generator_ExceptionClear(self); - } - - return retval; -} - -static CYTHON_INLINE -PyObject *__Pyx_Generator_FinishDelegation(__pyx_GeneratorObject *gen) { - PyObject *ret; - PyObject *val = NULL; - __Pyx_Generator_Undelegate(gen); - __Pyx_PyGen_FetchStopIterationValue(&val); - // val == NULL on failure => pass on exception - ret = __Pyx_Generator_SendEx(gen, val); - Py_XDECREF(val); - return ret; -} - -static PyObject *__Pyx_Generator_Next(PyObject *self) { - __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self; - PyObject *yf = gen->yieldfrom; - if (unlikely(__Pyx_Generator_CheckRunning(gen))) - return NULL; - if (yf) { - PyObject *ret; - // FIXME: does this really need an INCREF() ? - //Py_INCREF(yf); - /* YieldFrom code ensures that yf is an iterator */ - gen->is_running = 1; - ret = Py_TYPE(yf)->tp_iternext(yf); - gen->is_running = 0; - //Py_DECREF(yf); - if (likely(ret)) { - return ret; - } - return __Pyx_Generator_FinishDelegation(gen); - } - return __Pyx_Generator_SendEx(gen, Py_None); -} - -static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) { - __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self; - PyObject *yf = gen->yieldfrom; - if (unlikely(__Pyx_Generator_CheckRunning(gen))) - return NULL; - if (yf) { - PyObject *ret; - // FIXME: does this really need an INCREF() ? - //Py_INCREF(yf); - gen->is_running = 1; - if (__Pyx_Generator_CheckExact(yf)) { - ret = __Pyx_Generator_Send(yf, value); - } else { - if (value == Py_None) - ret = PyIter_Next(yf); - else - ret = __Pyx_PyObject_CallMethod1(yf, PYIDENT("send"), value); - } - gen->is_running = 0; - //Py_DECREF(yf); - if (likely(ret)) { - return ret; - } - return __Pyx_Generator_FinishDelegation(gen); - } - return __Pyx_Generator_SendEx(gen, value); -} - -// This helper function is used by gen_close and gen_throw to -// close a subiterator being delegated to by yield-from. -static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) { - PyObject *retval = NULL; - int err = 0; - - if (__Pyx_Generator_CheckExact(yf)) { - retval = __Pyx_Generator_Close(yf); - if (!retval) - return -1; - } else { - PyObject *meth; - gen->is_running = 1; - meth = PyObject_GetAttr(yf, PYIDENT("close")); - if (unlikely(!meth)) { - if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { - PyErr_WriteUnraisable(yf); - } - PyErr_Clear(); - } else { - retval = PyObject_CallFunction(meth, NULL); - Py_DECREF(meth); - if (!retval) - err = -1; - } - gen->is_running = 0; - } - Py_XDECREF(retval); - return err; -} - -static PyObject *__Pyx_Generator_Close(PyObject *self) { - __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; - PyObject *retval, *raised_exception; - PyObject *yf = gen->yieldfrom; - int err = 0; - - if (unlikely(__Pyx_Generator_CheckRunning(gen))) - return NULL; - - if (yf) { - Py_INCREF(yf); - err = __Pyx_Generator_CloseIter(gen, yf); - __Pyx_Generator_Undelegate(gen); - Py_DECREF(yf); - } - if (err == 0) -#if PY_VERSION_HEX < 0x02050000 - PyErr_SetNone(PyExc_StopIteration); -#else - PyErr_SetNone(PyExc_GeneratorExit); -#endif - retval = __Pyx_Generator_SendEx(gen, NULL); - if (retval) { - Py_DECREF(retval); - PyErr_SetString(PyExc_RuntimeError, - "generator ignored GeneratorExit"); - return NULL; - } - raised_exception = PyErr_Occurred(); - if (!raised_exception - || raised_exception == PyExc_StopIteration -#if PY_VERSION_HEX >= 0x02050000 - || raised_exception == PyExc_GeneratorExit - || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit) -#endif - || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration)) - { - if (raised_exception) PyErr_Clear(); /* ignore these errors */ - Py_INCREF(Py_None); - return Py_None; - } - return NULL; -} - -static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) { - __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; - PyObject *typ; - PyObject *tb = NULL; - PyObject *val = NULL; - PyObject *yf = gen->yieldfrom; - - if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb)) - return NULL; - - if (unlikely(__Pyx_Generator_CheckRunning(gen))) - return NULL; - - if (yf) { - PyObject *ret; - Py_INCREF(yf); -#if PY_VERSION_HEX >= 0x02050000 - if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) { - int err = __Pyx_Generator_CloseIter(gen, yf); - Py_DECREF(yf); - __Pyx_Generator_Undelegate(gen); - if (err < 0) - return __Pyx_Generator_SendEx(gen, NULL); - goto throw_here; - } -#endif - gen->is_running = 1; - if (__Pyx_Generator_CheckExact(yf)) { - ret = __Pyx_Generator_Throw(yf, args); - } else { - PyObject *meth = PyObject_GetAttr(yf, PYIDENT("throw")); - if (unlikely(!meth)) { - Py_DECREF(yf); - if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { - gen->is_running = 0; - return NULL; - } - PyErr_Clear(); - __Pyx_Generator_Undelegate(gen); - gen->is_running = 0; - goto throw_here; - } - ret = PyObject_CallObject(meth, args); - Py_DECREF(meth); - } - gen->is_running = 0; - Py_DECREF(yf); - if (!ret) { - ret = __Pyx_Generator_FinishDelegation(gen); - } - return ret; - } -throw_here: - __Pyx_Raise(typ, val, tb, NULL); - return __Pyx_Generator_SendEx(gen, NULL); -} - -static int __Pyx_Generator_traverse(PyObject *self, visitproc visit, void *arg) { - __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; - - Py_VISIT(gen->closure); - Py_VISIT(gen->classobj); - Py_VISIT(gen->yieldfrom); - Py_VISIT(gen->exc_type); - Py_VISIT(gen->exc_value); - Py_VISIT(gen->exc_traceback); - return 0; -} - -static int __Pyx_Generator_clear(PyObject *self) { - __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; - - Py_CLEAR(gen->closure); - Py_CLEAR(gen->classobj); - Py_CLEAR(gen->yieldfrom); - Py_CLEAR(gen->exc_type); - Py_CLEAR(gen->exc_value); - Py_CLEAR(gen->exc_traceback); - return 0; -} - -static void __Pyx_Generator_dealloc(PyObject *self) { - __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; - - PyObject_GC_UnTrack(gen); - if (gen->gi_weakreflist != NULL) - PyObject_ClearWeakRefs(self); - - if (gen->resume_label > 0) { - /* Generator is paused, so we need to close */ - PyObject_GC_Track(self); -#if PY_VERSION_HEX >= 0x030400a1 - if (PyObject_CallFinalizerFromDealloc(self)) -#else - Py_TYPE(gen)->tp_del(self); - if (self->ob_refcnt > 0) -#endif - return; /* resurrected. :( */ - PyObject_GC_UnTrack(self); - } - - __Pyx_Generator_clear(self); - PyObject_GC_Del(gen); -} - -static void __Pyx_Generator_del(PyObject *self) { - PyObject *res; - PyObject *error_type, *error_value, *error_traceback; - __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; - - if (gen->resume_label <= 0) - return ; - -#if PY_VERSION_HEX < 0x030400a1 - /* Temporarily resurrect the object. */ - assert(self->ob_refcnt == 0); - self->ob_refcnt = 1; -#endif - - /* Save the current exception, if any. */ - __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); - - res = __Pyx_Generator_Close(self); - - if (res == NULL) - PyErr_WriteUnraisable(self); - else - Py_DECREF(res); - - /* Restore the saved exception. */ - __Pyx_ErrRestore(error_type, error_value, error_traceback); - -#if PY_VERSION_HEX < 0x030400a1 - /* Undo the temporary resurrection; can't use DECREF here, it would - * cause a recursive call. - */ - assert(self->ob_refcnt > 0); - if (--self->ob_refcnt == 0) - return; /* this is the normal path out */ - - /* close() resurrected it! Make it look like the original Py_DECREF - * never happened. - */ - { - Py_ssize_t refcnt = self->ob_refcnt; - _Py_NewReference(self); - self->ob_refcnt = refcnt; - } -#if CYTHON_COMPILING_IN_CPYTHON - assert(PyType_IS_GC(self->ob_type) && - _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); - - /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so - * we need to undo that. */ - _Py_DEC_REFTOTAL; -#endif - /* If Py_TRACE_REFS, _Py_NewReference re-added self to the object - * chain, so no more to do there. - * If COUNT_ALLOCS, the original decref bumped tp_frees, and - * _Py_NewReference bumped tp_allocs: both of those need to be - * undone. - */ -#ifdef COUNT_ALLOCS - --Py_TYPE(self)->tp_frees; - --Py_TYPE(self)->tp_allocs; -#endif -#endif -} - -static PyMemberDef __pyx_Generator_memberlist[] = { - {(char *) "gi_running", -#if PY_VERSION_HEX >= 0x02060000 - T_BOOL, -#else - T_BYTE, -#endif - offsetof(__pyx_GeneratorObject, is_running), - READONLY, - NULL}, - {0, 0, 0, 0, 0} -}; - -static PyMethodDef __pyx_Generator_methods[] = { - {__Pyx_NAMESTR("send"), (PyCFunction) __Pyx_Generator_Send, METH_O, 0}, - {__Pyx_NAMESTR("throw"), (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0}, - {__Pyx_NAMESTR("close"), (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0}, - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_GeneratorType_type = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("generator"), /*tp_name*/ - sizeof(__pyx_GeneratorObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - (destructor) __Pyx_Generator_dealloc,/*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ -#if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ -#else - 0, /*reserved*/ -#endif - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /* tp_flags*/ - 0, /*tp_doc*/ - (traverseproc) __Pyx_Generator_traverse, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - offsetof(__pyx_GeneratorObject, gi_weakreflist), /* tp_weaklistoffse */ - 0, /*tp_iter*/ - (iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/ - __pyx_Generator_methods, /*tp_methods*/ - __pyx_Generator_memberlist, /*tp_members*/ - 0, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - 0, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ -#if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_del*/ -#else - __Pyx_Generator_del, /*tp_del*/ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /*tp_version_tag*/ -#endif -#if PY_VERSION_HEX >= 0x030400a1 - __Pyx_Generator_del, /*tp_finalize*/ -#endif -}; - -static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, - PyObject *closure) { - __pyx_GeneratorObject *gen = - PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType_type); - - if (gen == NULL) - return NULL; - - gen->body = body; - gen->closure = closure; - Py_XINCREF(closure); - gen->is_running = 0; - gen->resume_label = 0; - gen->classobj = NULL; - gen->yieldfrom = NULL; - gen->exc_type = NULL; - gen->exc_value = NULL; - gen->exc_traceback = NULL; - gen->gi_weakreflist = NULL; - - PyObject_GC_Track(gen); - return gen; -} - -static int __pyx_Generator_init(void) { - /* on Windows, C-API functions can't be used in slots statically */ - __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr; - __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter; - - __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type); - if (__pyx_GeneratorType == NULL) { - return -1; - } - return 0; -} diff --git a/third_party/cython/src/Cython/Utility/ImportExport.c b/third_party/cython/src/Cython/Utility/ImportExport.c deleted file mode 100644 index 60d7bf60e7ed4..0000000000000 --- a/third_party/cython/src/Cython/Utility/ImportExport.c +++ /dev/null @@ -1,558 +0,0 @@ -/////////////// PyIdentifierFromString.proto /////////////// - -#if !defined(__Pyx_PyIdentifier_FromString) -#if PY_MAJOR_VERSION < 3 - #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) -#else - #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) -#endif -#endif - - -/////////////// Import.proto /////////////// - -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ - -/////////////// Import /////////////// -//@requires: ObjectHandling.c::PyObjectGetAttrStr -//@substitute: naming - -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { - PyObject *empty_list = 0; - PyObject *module = 0; - PyObject *global_dict = 0; - PyObject *empty_dict = 0; - PyObject *list; - #if PY_VERSION_HEX < 0x03030000 - PyObject *py_import; - py_import = __Pyx_PyObject_GetAttrStr($builtins_cname, PYIDENT("__import__")); - if (!py_import) - goto bad; - #endif - if (from_list) - list = from_list; - else { - empty_list = PyList_New(0); - if (!empty_list) - goto bad; - list = empty_list; - } - global_dict = PyModule_GetDict($module_cname); - if (!global_dict) - goto bad; - empty_dict = PyDict_New(); - if (!empty_dict) - goto bad; - #if PY_VERSION_HEX >= 0x02050000 - { - #if PY_MAJOR_VERSION >= 3 - if (level == -1) { - if (strchr(__Pyx_MODULE_NAME, '.')) { - /* try package relative import first */ - #if PY_VERSION_HEX < 0x03030000 - PyObject *py_level = PyInt_FromLong(1); - if (!py_level) - goto bad; - module = PyObject_CallFunctionObjArgs(py_import, - name, global_dict, empty_dict, list, py_level, NULL); - Py_DECREF(py_level); - #else - module = PyImport_ImportModuleLevelObject( - name, global_dict, empty_dict, list, 1); - #endif - if (!module) { - if (!PyErr_ExceptionMatches(PyExc_ImportError)) - goto bad; - PyErr_Clear(); - } - } - level = 0; /* try absolute import on failure */ - } - #endif - if (!module) { - #if PY_VERSION_HEX < 0x03030000 - PyObject *py_level = PyInt_FromLong(level); - if (!py_level) - goto bad; - module = PyObject_CallFunctionObjArgs(py_import, - name, global_dict, empty_dict, list, py_level, NULL); - Py_DECREF(py_level); - #else - module = PyImport_ImportModuleLevelObject( - name, global_dict, empty_dict, list, level); - #endif - } - } - #else - if (level>0) { - PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); - goto bad; - } - module = PyObject_CallFunctionObjArgs(py_import, - name, global_dict, empty_dict, list, NULL); - #endif -bad: - #if PY_VERSION_HEX < 0x03030000 - Py_XDECREF(py_import); - #endif - Py_XDECREF(empty_list); - Py_XDECREF(empty_dict); - return module; -} - - -/////////////// ImportFrom.proto /////////////// - -static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ - -/////////////// ImportFrom /////////////// -//@requires: ObjectHandling.c::PyObjectGetAttrStr - -static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { - PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); - if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { - PyErr_Format(PyExc_ImportError, - #if PY_MAJOR_VERSION < 3 - "cannot import name %.230s", PyString_AS_STRING(name)); - #else - "cannot import name %S", name); - #endif - } - return value; -} - - -/////////////// ModuleImport.proto /////////////// - -static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ - -/////////////// ModuleImport /////////////// -//@requires: PyIdentifierFromString - -#ifndef __PYX_HAVE_RT_ImportModule -#define __PYX_HAVE_RT_ImportModule -static PyObject *__Pyx_ImportModule(const char *name) { - PyObject *py_name = 0; - PyObject *py_module = 0; - - py_name = __Pyx_PyIdentifier_FromString(name); - if (!py_name) - goto bad; - py_module = PyImport_Import(py_name); - Py_DECREF(py_name); - return py_module; -bad: - Py_XDECREF(py_name); - return 0; -} -#endif - - -/////////////// SetPackagePathFromImportLib.proto /////////////// - -#if PY_VERSION_HEX >= 0x03030000 -static int __Pyx_SetPackagePathFromImportLib(const char* parent_package_name, PyObject *module_name); -#else -#define __Pyx_SetPackagePathFromImportLib(a, b) 0 -#endif - -/////////////// SetPackagePathFromImportLib /////////////// -//@requires: ObjectHandling.c::PyObjectGetAttrStr -//@substitute: naming - -#if PY_VERSION_HEX >= 0x03030000 -static int __Pyx_SetPackagePathFromImportLib(const char* parent_package_name, PyObject *module_name) { - PyObject *importlib, *loader, *osmod, *ossep, *parts, *package_path; - PyObject *path = NULL, *file_path = NULL; - int result; - if (parent_package_name) { - PyObject *package = PyImport_ImportModule(parent_package_name); - if (unlikely(!package)) - goto bad; - path = PyObject_GetAttrString(package, "__path__"); - Py_DECREF(package); - if (unlikely(!path) || unlikely(path == Py_None)) - goto bad; - } else { - path = Py_None; Py_INCREF(Py_None); - } - // package_path = [importlib.find_loader(module_name, path).path.rsplit(os.sep, 1)[0]] - importlib = PyImport_ImportModule("importlib"); - if (unlikely(!importlib)) - goto bad; - loader = PyObject_CallMethod(importlib, "find_loader", "(OO)", module_name, path); - Py_DECREF(importlib); - Py_DECREF(path); path = NULL; - if (unlikely(!loader)) - goto bad; - file_path = PyObject_GetAttrString(loader, "path"); - Py_DECREF(loader); - if (unlikely(!file_path)) - goto bad; - - if (unlikely(__Pyx_SetAttrString($module_cname, "__file__", file_path) < 0)) - goto bad; - - osmod = PyImport_ImportModule("os"); - if (unlikely(!osmod)) - goto bad; - ossep = PyObject_GetAttrString(osmod, "sep"); - Py_DECREF(osmod); - if (unlikely(!ossep)) - goto bad; - parts = PyObject_CallMethod(file_path, "rsplit", "(Oi)", ossep, 1); - Py_DECREF(file_path); file_path = NULL; - Py_DECREF(ossep); - if (unlikely(!parts)) - goto bad; - package_path = Py_BuildValue("[O]", PyList_GET_ITEM(parts, 0)); - Py_DECREF(parts); - if (unlikely(!package_path)) - goto bad; - goto set_path; - -bad: - PyErr_WriteUnraisable(module_name); - Py_XDECREF(path); - Py_XDECREF(file_path); - - // set an empty path list on failure - PyErr_Clear(); - package_path = PyList_New(0); - if (unlikely(!package_path)) - return -1; - -set_path: - result = __Pyx_SetAttrString($module_cname, "__path__", package_path); - Py_DECREF(package_path); - return result; -} -#endif - - -/////////////// TypeImport.proto /////////////// - -static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); /*proto*/ - -/////////////// TypeImport /////////////// -//@requires: PyIdentifierFromString -//@requires: ModuleImport - -#ifndef __PYX_HAVE_RT_ImportType -#define __PYX_HAVE_RT_ImportType -static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, - size_t size, int strict) -{ - PyObject *py_module = 0; - PyObject *result = 0; - PyObject *py_name = 0; - char warning[200]; - Py_ssize_t basicsize; -#ifdef Py_LIMITED_API - PyObject *py_basicsize; -#endif - - py_module = __Pyx_ImportModule(module_name); - if (!py_module) - goto bad; - py_name = __Pyx_PyIdentifier_FromString(class_name); - if (!py_name) - goto bad; - result = PyObject_GetAttr(py_module, py_name); - Py_DECREF(py_name); - py_name = 0; - Py_DECREF(py_module); - py_module = 0; - if (!result) - goto bad; - if (!PyType_Check(result)) { - PyErr_Format(PyExc_TypeError, - "%.200s.%.200s is not a type object", - module_name, class_name); - goto bad; - } -#ifndef Py_LIMITED_API - basicsize = ((PyTypeObject *)result)->tp_basicsize; -#else - py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); - if (!py_basicsize) - goto bad; - basicsize = PyLong_AsSsize_t(py_basicsize); - Py_DECREF(py_basicsize); - py_basicsize = 0; - if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) - goto bad; -#endif - if (!strict && (size_t)basicsize > size) { - PyOS_snprintf(warning, sizeof(warning), - "%s.%s size changed, may indicate binary incompatibility", - module_name, class_name); - #if PY_VERSION_HEX < 0x02050000 - if (PyErr_Warn(NULL, warning) < 0) goto bad; - #else - if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; - #endif - } - else if ((size_t)basicsize != size) { - PyErr_Format(PyExc_ValueError, - "%.200s.%.200s has the wrong size, try recompiling", - module_name, class_name); - goto bad; - } - return (PyTypeObject *)result; -bad: - Py_XDECREF(py_module); - Py_XDECREF(result); - return NULL; -} -#endif - -/////////////// FunctionImport.proto /////////////// - -static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/ - -/////////////// FunctionImport /////////////// -//@substitute: naming - -#ifndef __PYX_HAVE_RT_ImportFunction -#define __PYX_HAVE_RT_ImportFunction -static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { - PyObject *d = 0; - PyObject *cobj = 0; - union { - void (*fp)(void); - void *p; - } tmp; - - d = PyObject_GetAttrString(module, (char *)"$api_name"); - if (!d) - goto bad; - cobj = PyDict_GetItemString(d, funcname); - if (!cobj) { - PyErr_Format(PyExc_ImportError, - "%.200s does not export expected C function %.200s", - PyModule_GetName(module), funcname); - goto bad; - } -#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3 && PY_MINOR_VERSION==0) - if (!PyCapsule_IsValid(cobj, sig)) { - PyErr_Format(PyExc_TypeError, - "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", - PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); - goto bad; - } - tmp.p = PyCapsule_GetPointer(cobj, sig); -#else - {const char *desc, *s1, *s2; - desc = (const char *)PyCObject_GetDesc(cobj); - if (!desc) - goto bad; - s1 = desc; s2 = sig; - while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } - if (*s1 != *s2) { - PyErr_Format(PyExc_TypeError, - "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", - PyModule_GetName(module), funcname, sig, desc); - goto bad; - } - tmp.p = PyCObject_AsVoidPtr(cobj);} -#endif - *f = tmp.fp; - if (!(*f)) - goto bad; - Py_DECREF(d); - return 0; -bad: - Py_XDECREF(d); - return -1; -} -#endif - -/////////////// FunctionExport.proto /////////////// - -static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); /*proto*/ - -/////////////// FunctionExport /////////////// -//@substitute: naming - -static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { - PyObject *d = 0; - PyObject *cobj = 0; - union { - void (*fp)(void); - void *p; - } tmp; - - d = PyObject_GetAttrString($module_cname, (char *)"$api_name"); - if (!d) { - PyErr_Clear(); - d = PyDict_New(); - if (!d) - goto bad; - Py_INCREF(d); - if (PyModule_AddObject($module_cname, (char *)"$api_name", d) < 0) - goto bad; - } - tmp.fp = f; -#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) - cobj = PyCapsule_New(tmp.p, sig, 0); -#else - cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0); -#endif - if (!cobj) - goto bad; - if (PyDict_SetItemString(d, name, cobj) < 0) - goto bad; - Py_DECREF(cobj); - Py_DECREF(d); - return 0; -bad: - Py_XDECREF(cobj); - Py_XDECREF(d); - return -1; -} - -/////////////// VoidPtrImport.proto /////////////// - -static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig); /*proto*/ - -/////////////// VoidPtrImport /////////////// -//@substitute: naming - -#ifndef __PYX_HAVE_RT_ImportVoidPtr -#define __PYX_HAVE_RT_ImportVoidPtr -static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig) { - PyObject *d = 0; - PyObject *cobj = 0; - - d = PyObject_GetAttrString(module, (char *)"$api_name"); - if (!d) - goto bad; - cobj = PyDict_GetItemString(d, name); - if (!cobj) { - PyErr_Format(PyExc_ImportError, - "%.200s does not export expected C variable %.200s", - PyModule_GetName(module), name); - goto bad; - } -#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3 && PY_MINOR_VERSION==0) - if (!PyCapsule_IsValid(cobj, sig)) { - PyErr_Format(PyExc_TypeError, - "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", - PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj)); - goto bad; - } - *p = PyCapsule_GetPointer(cobj, sig); -#else - {const char *desc, *s1, *s2; - desc = (const char *)PyCObject_GetDesc(cobj); - if (!desc) - goto bad; - s1 = desc; s2 = sig; - while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } - if (*s1 != *s2) { - PyErr_Format(PyExc_TypeError, - "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", - PyModule_GetName(module), name, sig, desc); - goto bad; - } - *p = PyCObject_AsVoidPtr(cobj);} -#endif - if (!(*p)) - goto bad; - Py_DECREF(d); - return 0; -bad: - Py_XDECREF(d); - return -1; -} -#endif - -/////////////// VoidPtrExport.proto /////////////// - -static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig); /*proto*/ - -/////////////// VoidPtrExport /////////////// -//@substitute: naming -//@requires: ObjectHandling.c::PyObjectSetAttrStr - -static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig) { - PyObject *d; - PyObject *cobj = 0; - - d = PyDict_GetItem($moddict_cname, PYIDENT("$api_name")); - Py_XINCREF(d); - if (!d) { - d = PyDict_New(); - if (!d) - goto bad; - if (__Pyx_PyObject_SetAttrStr($module_cname, PYIDENT("$api_name"), d) < 0) - goto bad; - } -#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3 && PY_MINOR_VERSION==0) - cobj = PyCapsule_New(p, sig, 0); -#else - cobj = PyCObject_FromVoidPtrAndDesc(p, (void *)sig, 0); -#endif - if (!cobj) - goto bad; - if (PyDict_SetItem(d, name, cobj) < 0) - goto bad; - Py_DECREF(cobj); - Py_DECREF(d); - return 0; -bad: - Py_XDECREF(cobj); - Py_XDECREF(d); - return -1; -} - - -/////////////// SetVTable.proto /////////////// - -static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ - -/////////////// SetVTable /////////////// - -static int __Pyx_SetVtable(PyObject *dict, void *vtable) { -#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) - PyObject *ob = PyCapsule_New(vtable, 0, 0); -#else - PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); -#endif - if (!ob) - goto bad; - if (PyDict_SetItem(dict, PYIDENT("__pyx_vtable__"), ob) < 0) - goto bad; - Py_DECREF(ob); - return 0; -bad: - Py_XDECREF(ob); - return -1; -} - - -/////////////// GetVTable.proto /////////////// - -static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ - -/////////////// GetVTable /////////////// - -static void* __Pyx_GetVtable(PyObject *dict) { - void* ptr; - PyObject *ob = PyObject_GetItem(dict, PYIDENT("__pyx_vtable__")); - if (!ob) - goto bad; -#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) - ptr = PyCapsule_GetPointer(ob, 0); -#else - ptr = PyCObject_AsVoidPtr(ob); -#endif - if (!ptr && !PyErr_Occurred()) - PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); - Py_DECREF(ob); - return ptr; -bad: - Py_XDECREF(ob); - return NULL; -} diff --git a/third_party/cython/src/Cython/Utility/MemoryView.pyx b/third_party/cython/src/Cython/Utility/MemoryView.pyx deleted file mode 100644 index 66aab272406e2..0000000000000 --- a/third_party/cython/src/Cython/Utility/MemoryView.pyx +++ /dev/null @@ -1,1447 +0,0 @@ -#################### View.MemoryView #################### - -# This utility provides cython.array and cython.view.memoryview - -import cython - -# from cpython cimport ... -cdef extern from "Python.h": - int PyIndex_Check "__Pyx_PyIndex_Check" (object) - object PyLong_FromVoidPtr(void *) - -cdef extern from "pythread.h": - ctypedef void *PyThread_type_lock - - PyThread_type_lock PyThread_allocate_lock() - void PyThread_free_lock(PyThread_type_lock) - int PyThread_acquire_lock(PyThread_type_lock, int mode) nogil - void PyThread_release_lock(PyThread_type_lock) nogil - -cdef extern from "string.h": - void *memset(void *b, int c, size_t len) - -cdef extern from *: - int __Pyx_GetBuffer(object, Py_buffer *, int) except -1 - void __Pyx_ReleaseBuffer(Py_buffer *) - - ctypedef struct PyObject - ctypedef Py_ssize_t Py_intptr_t - void Py_INCREF(PyObject *) - void Py_DECREF(PyObject *) - - void* PyMem_Malloc(size_t n) - void PyMem_Free(void *p) - - cdef struct __pyx_memoryview "__pyx_memoryview_obj": - Py_buffer view - PyObject *obj - __Pyx_TypeInfo *typeinfo - - ctypedef struct {{memviewslice_name}}: - __pyx_memoryview *memview - char *data - Py_ssize_t shape[{{max_dims}}] - Py_ssize_t strides[{{max_dims}}] - Py_ssize_t suboffsets[{{max_dims}}] - - void __PYX_INC_MEMVIEW({{memviewslice_name}} *memslice, int have_gil) - void __PYX_XDEC_MEMVIEW({{memviewslice_name}} *memslice, int have_gil) - - ctypedef struct __pyx_buffer "Py_buffer": - PyObject *obj - - PyObject *Py_None - - cdef enum: - PyBUF_C_CONTIGUOUS, - PyBUF_F_CONTIGUOUS, - PyBUF_ANY_CONTIGUOUS - PyBUF_FORMAT - PyBUF_WRITABLE - PyBUF_STRIDES - PyBUF_INDIRECT - PyBUF_RECORDS - - ctypedef struct __Pyx_TypeInfo: - pass - - cdef object capsule "__pyx_capsule_create" (void *p, char *sig) - cdef int __pyx_array_getbuffer(PyObject *obj, Py_buffer view, int flags) - cdef int __pyx_memoryview_getbuffer(PyObject *obj, Py_buffer view, int flags) - -cdef extern from *: - ctypedef int __pyx_atomic_int - {{memviewslice_name}} slice_copy_contig "__pyx_memoryview_copy_new_contig"( - __Pyx_memviewslice *from_mvs, - char *mode, int ndim, - size_t sizeof_dtype, int contig_flag, - bint dtype_is_object) nogil except * - bint slice_is_contig "__pyx_memviewslice_is_contig" ( - {{memviewslice_name}} *mvs, char order, int ndim) nogil - bint slices_overlap "__pyx_slices_overlap" ({{memviewslice_name}} *slice1, - {{memviewslice_name}} *slice2, - int ndim, size_t itemsize) nogil - - -cdef extern from "stdlib.h": - void *malloc(size_t) nogil - void free(void *) nogil - void *memcpy(void *dest, void *src, size_t n) nogil - - - - -# -### cython.array class -# - -@cname("__pyx_array") -cdef class array: - - cdef: - char *data - Py_ssize_t len - char *format - int ndim - Py_ssize_t *_shape - Py_ssize_t *_strides - Py_ssize_t itemsize - unicode mode # FIXME: this should have been a simple 'char' - bytes _format - void (*callback_free_data)(void *data) - # cdef object _memview - cdef bint free_data - cdef bint dtype_is_object - - def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, - mode="c", bint allocate_buffer=True): - - cdef int idx - cdef Py_ssize_t i, dim - cdef PyObject **p - - self.ndim = len(shape) - self.itemsize = itemsize - - if not self.ndim: - raise ValueError("Empty shape tuple for cython.array") - - if itemsize <= 0: - raise ValueError("itemsize <= 0 for cython.array") - - if isinstance(format, unicode): - format = (format).encode('ASCII') - self._format = format # keep a reference to the byte string - self.format = self._format - - # use single malloc() for both shape and strides - self._shape = PyMem_Malloc(sizeof(Py_ssize_t)*self.ndim*2) - self._strides = self._shape + self.ndim - - if not self._shape: - raise MemoryError("unable to allocate shape and strides.") - - # cdef Py_ssize_t dim, stride - for idx, dim in enumerate(shape): - if dim <= 0: - raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) - self._shape[idx] = dim - - cdef char order - if mode == 'fortran': - order = b'F' - self.mode = u'fortran' - elif mode == 'c': - order = b'C' - self.mode = u'c' - else: - raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) - - self.len = fill_contig_strides_array(self._shape, self._strides, - itemsize, self.ndim, order) - - self.free_data = allocate_buffer - self.dtype_is_object = format == b'O' - if allocate_buffer: - # use malloc() for backwards compatibility - # in case external code wants to change the data pointer - self.data = malloc(self.len) - if not self.data: - raise MemoryError("unable to allocate array data.") - - if self.dtype_is_object: - p = self.data - for i in range(self.len / itemsize): - p[i] = Py_None - Py_INCREF(Py_None) - - @cname('getbuffer') - def __getbuffer__(self, Py_buffer *info, int flags): - cdef int bufmode = -1 - if self.mode == u"c": - bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS - elif self.mode == u"fortran": - bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS - if not (flags & bufmode): - raise ValueError("Can only create a buffer that is contiguous in memory.") - info.buf = self.data - info.len = self.len - info.ndim = self.ndim - info.shape = self._shape - info.strides = self._strides - info.suboffsets = NULL - info.itemsize = self.itemsize - info.readonly = 0 - - if flags & PyBUF_FORMAT: - info.format = self.format - else: - info.format = NULL - - info.obj = self - - __pyx_getbuffer = capsule( &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") - - def __dealloc__(array self): - if self.callback_free_data != NULL: - self.callback_free_data(self.data) - elif self.free_data: - if self.dtype_is_object: - refcount_objects_in_slice(self.data, self._shape, - self._strides, self.ndim, False) - free(self.data) - PyMem_Free(self._shape) - - property memview: - @cname('get_memview') - def __get__(self): - # Make this a property as 'self.data' may be set after instantiation - flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE - return memoryview(self, flags, self.dtype_is_object) - - - def __getattr__(self, attr): - return getattr(self.memview, attr) - - def __getitem__(self, item): - return self.memview[item] - - def __setitem__(self, item, value): - self.memview[item] = value - - -@cname("__pyx_array_new") -cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, - char *mode, char *buf): - cdef array result - - if buf == NULL: - result = array(shape, itemsize, format, mode.decode('ASCII')) - else: - result = array(shape, itemsize, format, mode.decode('ASCII'), - allocate_buffer=False) - result.data = buf - - return result - - -# -### Memoryview constants and cython.view.memoryview class -# - -# Disable generic_contiguous, as it makes trouble verifying contiguity: -# - 'contiguous' or '::1' means the dimension is contiguous with dtype -# - 'indirect_contiguous' means a contiguous list of pointers -# - dtype contiguous must be contiguous in the first or last dimension -# from the start, or from the dimension following the last indirect dimension -# -# e.g. -# int[::indirect_contiguous, ::contiguous, :] -# -# is valid (list of pointers to 2d fortran-contiguous array), but -# -# int[::generic_contiguous, ::contiguous, :] -# -# would mean you'd have assert dimension 0 to be indirect (and pointer contiguous) at runtime. -# So it doesn't bring any performance benefit, and it's only confusing. - -@cname('__pyx_MemviewEnum') -cdef class Enum(object): - cdef object name - def __init__(self, name): - self.name = name - def __repr__(self): - return self.name - -cdef generic = Enum("") -cdef strided = Enum("") # default -cdef indirect = Enum("") -# Disable generic_contiguous, as it is a troublemaker -#cdef generic_contiguous = Enum("") -cdef contiguous = Enum("") -cdef indirect_contiguous = Enum("") - -# 'follow' is implied when the first or last axis is ::1 - - -@cname('__pyx_align_pointer') -cdef void *align_pointer(void *memory, size_t alignment) nogil: - "Align pointer memory on a given boundary" - cdef Py_intptr_t aligned_p = memory - cdef size_t offset - - with cython.cdivision(True): - offset = aligned_p % alignment - - if offset > 0: - aligned_p += alignment - offset - - return aligned_p - -@cname('__pyx_memoryview') -cdef class memoryview(object): - - cdef object obj - cdef object _size - cdef object _array_interface - cdef PyThread_type_lock lock - # the following array will contain a single __pyx_atomic int with - # suitable alignment - cdef __pyx_atomic_int acquisition_count[2] - cdef __pyx_atomic_int *acquisition_count_aligned_p - cdef Py_buffer view - cdef int flags - cdef bint dtype_is_object - cdef __Pyx_TypeInfo *typeinfo - - def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): - self.obj = obj - self.flags = flags - if type(self) is memoryview or obj is not None: - __Pyx_GetBuffer(obj, &self.view, flags) - if self.view.obj == NULL: - (<__pyx_buffer *> &self.view).obj = Py_None - Py_INCREF(Py_None) - - self.lock = PyThread_allocate_lock() - if self.lock == NULL: - raise MemoryError - - if flags & PyBUF_FORMAT: - self.dtype_is_object = self.view.format == b'O' - else: - self.dtype_is_object = dtype_is_object - - self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( - &self.acquisition_count[0], sizeof(__pyx_atomic_int)) - self.typeinfo = NULL - - def __dealloc__(memoryview self): - if self.obj is not None: - __Pyx_ReleaseBuffer(&self.view) - - if self.lock != NULL: - PyThread_free_lock(self.lock) - - cdef char *get_item_pointer(memoryview self, object index) except NULL: - cdef Py_ssize_t dim - cdef char *itemp = self.view.buf - - for dim, idx in enumerate(index): - itemp = pybuffer_index(&self.view, itemp, idx, dim) - - return itemp - - #@cname('__pyx_memoryview_getitem') - def __getitem__(memoryview self, object index): - if index is Ellipsis: - return self - - have_slices, indices = _unellipsify(index, self.view.ndim) - - cdef char *itemp - if have_slices: - return memview_slice(self, indices) - else: - itemp = self.get_item_pointer(indices) - return self.convert_item_to_object(itemp) - - def __setitem__(memoryview self, object index, object value): - have_slices, index = _unellipsify(index, self.view.ndim) - - if have_slices: - obj = self.is_slice(value) - if obj: - self.setitem_slice_assignment(self[index], obj) - else: - self.setitem_slice_assign_scalar(self[index], value) - else: - self.setitem_indexed(index, value) - - cdef is_slice(self, obj): - if not isinstance(obj, memoryview): - try: - obj = memoryview(obj, self.flags|PyBUF_ANY_CONTIGUOUS, - self.dtype_is_object) - except TypeError: - return None - - return obj - - cdef setitem_slice_assignment(self, dst, src): - cdef {{memviewslice_name}} dst_slice - cdef {{memviewslice_name}} src_slice - - memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], - get_slice_from_memview(dst, &dst_slice)[0], - src.ndim, dst.ndim, self.dtype_is_object) - - cdef setitem_slice_assign_scalar(self, memoryview dst, value): - cdef int array[128] - cdef void *tmp = NULL - cdef void *item - - cdef {{memviewslice_name}} *dst_slice - cdef {{memviewslice_name}} tmp_slice - dst_slice = get_slice_from_memview(dst, &tmp_slice) - - if self.view.itemsize > sizeof(array): - tmp = PyMem_Malloc(self.view.itemsize) - if tmp == NULL: - raise MemoryError - item = tmp - else: - item = array - - try: - if self.dtype_is_object: - ( item)[0] = value - else: - self.assign_item_from_object( item, value) - - # It would be easy to support indirect dimensions, but it's easier - # to disallow :) - if self.view.suboffsets != NULL: - assert_direct_dimensions(self.view.suboffsets, self.view.ndim) - slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, - item, self.dtype_is_object) - finally: - PyMem_Free(tmp) - - cdef setitem_indexed(self, index, value): - cdef char *itemp = self.get_item_pointer(index) - self.assign_item_from_object(itemp, value) - - cdef convert_item_to_object(self, char *itemp): - """Only used if instantiated manually by the user, or if Cython doesn't - know how to convert the type""" - import struct - cdef bytes bytesitem - # Do a manual and complete check here instead of this easy hack - bytesitem = itemp[:self.view.itemsize] - try: - result = struct.unpack(self.view.format, bytesitem) - except struct.error: - raise ValueError("Unable to convert item to object") - else: - if len(self.view.format) == 1: - return result[0] - return result - - cdef assign_item_from_object(self, char *itemp, object value): - """Only used if instantiated manually by the user, or if Cython doesn't - know how to convert the type""" - import struct - cdef char c - cdef bytes bytesvalue - cdef Py_ssize_t i - - if isinstance(value, tuple): - bytesvalue = struct.pack(self.view.format, *value) - else: - bytesvalue = struct.pack(self.view.format, value) - - for i, c in enumerate(bytesvalue): - itemp[i] = c - - @cname('getbuffer') - def __getbuffer__(self, Py_buffer *info, int flags): - if flags & PyBUF_STRIDES: - info.shape = self.view.shape - else: - info.shape = NULL - - if flags & PyBUF_STRIDES: - info.strides = self.view.strides - else: - info.strides = NULL - - if flags & PyBUF_INDIRECT: - info.suboffsets = self.view.suboffsets - else: - info.suboffsets = NULL - - if flags & PyBUF_FORMAT: - info.format = self.view.format - else: - info.format = NULL - - info.buf = self.view.buf - info.ndim = self.view.ndim - info.itemsize = self.view.itemsize - info.len = self.view.len - info.readonly = 0 - info.obj = self - - __pyx_getbuffer = capsule( &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") - - # Some properties that have the same sematics as in NumPy - property T: - @cname('__pyx_memoryview_transpose') - def __get__(self): - cdef _memoryviewslice result = memoryview_copy(self) - transpose_memslice(&result.from_slice) - return result - - property base: - @cname('__pyx_memoryview__get__base') - def __get__(self): - return self.obj - - property shape: - @cname('__pyx_memoryview_get_shape') - def __get__(self): - return tuple([self.view.shape[i] for i in xrange(self.view.ndim)]) - - property strides: - @cname('__pyx_memoryview_get_strides') - def __get__(self): - if self.view.strides == NULL: - # Note: we always ask for strides, so if this is not set it's a bug - raise ValueError("Buffer view does not expose strides") - - return tuple([self.view.strides[i] for i in xrange(self.view.ndim)]) - - property suboffsets: - @cname('__pyx_memoryview_get_suboffsets') - def __get__(self): - if self.view.suboffsets == NULL: - return [-1] * self.view.ndim - - return tuple([self.view.suboffsets[i] for i in xrange(self.view.ndim)]) - - property ndim: - @cname('__pyx_memoryview_get_ndim') - def __get__(self): - return self.view.ndim - - property itemsize: - @cname('__pyx_memoryview_get_itemsize') - def __get__(self): - return self.view.itemsize - - property nbytes: - @cname('__pyx_memoryview_get_nbytes') - def __get__(self): - return self.size * self.view.itemsize - - property size: - @cname('__pyx_memoryview_get_size') - def __get__(self): - if self._size is None: - result = 1 - - for length in self.shape: - result *= length - - self._size = result - - return self._size - - def __len__(self): - if self.view.ndim >= 1: - return self.view.shape[0] - - return 0 - - def __repr__(self): - return "" % (self.base.__class__.__name__, - id(self)) - - def __str__(self): - return "" % (self.base.__class__.__name__,) - - # Support the same attributes as memoryview slices - def is_c_contig(self): - cdef {{memviewslice_name}} *mslice - cdef {{memviewslice_name}} tmp - mslice = get_slice_from_memview(self, &tmp) - return slice_is_contig(mslice, 'C', self.view.ndim) - - def is_f_contig(self): - cdef {{memviewslice_name}} *mslice - cdef {{memviewslice_name}} tmp - mslice = get_slice_from_memview(self, &tmp) - return slice_is_contig(mslice, 'F', self.view.ndim) - - def copy(self): - cdef {{memviewslice_name}} mslice - cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS - - slice_copy(self, &mslice) - mslice = slice_copy_contig(&mslice, "c", self.view.ndim, - self.view.itemsize, - flags|PyBUF_C_CONTIGUOUS, - self.dtype_is_object) - - return memoryview_copy_from_slice(self, &mslice) - - def copy_fortran(self): - cdef {{memviewslice_name}} src, dst - cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS - - slice_copy(self, &src) - dst = slice_copy_contig(&src, "fortran", self.view.ndim, - self.view.itemsize, - flags|PyBUF_F_CONTIGUOUS, - self.dtype_is_object) - - return memoryview_copy_from_slice(self, &dst) - - -@cname('__pyx_memoryview_new') -cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): - cdef memoryview result = memoryview(o, flags, dtype_is_object) - result.typeinfo = typeinfo - return result - -@cname('__pyx_memoryview_check') -cdef inline bint memoryview_check(object o): - return isinstance(o, memoryview) - -cdef tuple _unellipsify(object index, int ndim): - """ - Replace all ellipses with full slices and fill incomplete indices with - full slices. - """ - if not isinstance(index, tuple): - tup = (index,) - else: - tup = index - - result = [] - have_slices = False - seen_ellipsis = False - for idx, item in enumerate(tup): - if item is Ellipsis: - if not seen_ellipsis: - result.extend([slice(None)] * (ndim - len(tup) + 1)) - seen_ellipsis = True - else: - result.append(slice(None)) - have_slices = True - else: - if not isinstance(item, slice) and not PyIndex_Check(item): - raise TypeError("Cannot index with type '%s'" % type(item)) - - have_slices = have_slices or isinstance(item, slice) - result.append(item) - - nslices = ndim - len(result) - if nslices: - result.extend([slice(None)] * nslices) - - return have_slices or nslices, tuple(result) - -cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): - cdef int i - for i in range(ndim): - if suboffsets[i] >= 0: - raise ValueError("Indirect dimensions not supported") - -# -### Slicing a memoryview -# - -@cname('__pyx_memview_slice') -cdef memoryview memview_slice(memoryview memview, object indices): - cdef int new_ndim = 0, suboffset_dim = -1, dim - cdef bint negative_step - cdef {{memviewslice_name}} src, dst - cdef {{memviewslice_name}} *p_src - - # dst is copied by value in memoryview_fromslice -- initialize it - # src is never copied - memset(&dst, 0, sizeof(dst)) - - cdef _memoryviewslice memviewsliceobj - - assert memview.view.ndim > 0 - - if isinstance(memview, _memoryviewslice): - memviewsliceobj = memview - p_src = &memviewsliceobj.from_slice - else: - slice_copy(memview, &src) - p_src = &src - - # Note: don't use variable src at this point - # SubNote: we should be able to declare variables in blocks... - - # memoryview_fromslice() will inc our dst slice - dst.memview = p_src.memview - dst.data = p_src.data - - # Put everything in temps to avoid this bloody warning: - # "Argument evaluation order in C function call is undefined and - # may not be as expected" - cdef {{memviewslice_name}} *p_dst = &dst - cdef int *p_suboffset_dim = &suboffset_dim - cdef Py_ssize_t start, stop, step - cdef bint have_start, have_stop, have_step - - for dim, index in enumerate(indices): - if PyIndex_Check(index): - slice_memviewslice( - p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], - dim, new_ndim, p_suboffset_dim, - index, 0, 0, # start, stop, step - 0, 0, 0, # have_{start,stop,step} - False) - elif index is None: - p_dst.shape[new_ndim] = 1 - p_dst.strides[new_ndim] = 0 - p_dst.suboffsets[new_ndim] = -1 - new_ndim += 1 - else: - start = index.start or 0 - stop = index.stop or 0 - step = index.step or 0 - - have_start = index.start is not None - have_stop = index.stop is not None - have_step = index.step is not None - - slice_memviewslice( - p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], - dim, new_ndim, p_suboffset_dim, - start, stop, step, - have_start, have_stop, have_step, - True) - new_ndim += 1 - - if isinstance(memview, _memoryviewslice): - return memoryview_fromslice(dst, new_ndim, - memviewsliceobj.to_object_func, - memviewsliceobj.to_dtype_func, - memview.dtype_is_object) - else: - return memoryview_fromslice(dst, new_ndim, NULL, NULL, - memview.dtype_is_object) - - -# -### Slicing in a single dimension of a memoryviewslice -# - -cdef extern from "stdlib.h": - void abort() nogil - void printf(char *s, ...) nogil - -cdef extern from "stdio.h": - ctypedef struct FILE - FILE *stderr - int fputs(char *s, FILE *stream) - -cdef extern from "pystate.h": - void PyThreadState_Get() nogil - - # These are not actually nogil, but we check for the GIL before calling them - void PyErr_SetString(PyObject *type, char *msg) nogil - PyObject *PyErr_Format(PyObject *exc, char *msg, ...) nogil - -@cname('__pyx_memoryview_slice_memviewslice') -cdef int slice_memviewslice( - {{memviewslice_name}} *dst, - Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset, - int dim, int new_ndim, int *suboffset_dim, - Py_ssize_t start, Py_ssize_t stop, Py_ssize_t step, - int have_start, int have_stop, int have_step, - bint is_slice) nogil except -1: - """ - Create a new slice dst given slice src. - - dim - the current src dimension (indexing will make dimensions - disappear) - new_dim - the new dst dimension - suboffset_dim - pointer to a single int initialized to -1 to keep track of - where slicing offsets should be added - """ - - cdef Py_ssize_t new_shape - cdef bint negative_step - - if not is_slice: - # index is a normal integer-like index - if start < 0: - start += shape - if not 0 <= start < shape: - _err_dim(IndexError, "Index out of bounds (axis %d)", dim) - else: - # index is a slice - negative_step = have_step != 0 and step < 0 - - if have_step and step == 0: - _err_dim(ValueError, "Step may not be zero (axis %d)", dim) - - # check our bounds and set defaults - if have_start: - if start < 0: - start += shape - if start < 0: - start = 0 - elif start >= shape: - if negative_step: - start = shape - 1 - else: - start = shape - else: - if negative_step: - start = shape - 1 - else: - start = 0 - - if have_stop: - if stop < 0: - stop += shape - if stop < 0: - stop = 0 - elif stop > shape: - stop = shape - else: - if negative_step: - stop = -1 - else: - stop = shape - - if not have_step: - step = 1 - - # len = ceil( (stop - start) / step ) - with cython.cdivision(True): - new_shape = (stop - start) // step - - if (stop - start) - step * new_shape: - new_shape += 1 - - if new_shape < 0: - new_shape = 0 - - # shape/strides/suboffsets - dst.strides[new_ndim] = stride * step - dst.shape[new_ndim] = new_shape - dst.suboffsets[new_ndim] = suboffset - - # Add the slicing or idexing offsets to the right suboffset or base data * - if suboffset_dim[0] < 0: - dst.data += start * stride - else: - dst.suboffsets[suboffset_dim[0]] += start * stride - - if suboffset >= 0: - if not is_slice: - if new_ndim == 0: - dst.data = ( dst.data)[0] + suboffset - else: - _err_dim(IndexError, "All dimensions preceding dimension %d " - "must be indexed and not sliced", dim) - else: - suboffset_dim[0] = new_ndim - - return 0 - -# -### Index a memoryview -# -@cname('__pyx_pybuffer_index') -cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, - Py_ssize_t dim) except NULL: - cdef Py_ssize_t shape, stride, suboffset = -1 - cdef Py_ssize_t itemsize = view.itemsize - cdef char *resultp - - if view.ndim == 0: - shape = view.len / itemsize - stride = itemsize - else: - shape = view.shape[dim] - stride = view.strides[dim] - if view.suboffsets != NULL: - suboffset = view.suboffsets[dim] - - if index < 0: - index += view.shape[dim] - if index < 0: - raise IndexError("Out of bounds on buffer access (axis %d)" % dim) - - if index >= shape: - raise IndexError("Out of bounds on buffer access (axis %d)" % dim) - - resultp = bufp + index * stride - if suboffset >= 0: - resultp = ( resultp)[0] + suboffset - - return resultp - -# -### Transposing a memoryviewslice -# -@cname('__pyx_memslice_transpose') -cdef int transpose_memslice({{memviewslice_name}} *memslice) nogil except 0: - cdef int ndim = memslice.memview.view.ndim - - cdef Py_ssize_t *shape = memslice.shape - cdef Py_ssize_t *strides = memslice.strides - - # reverse strides and shape - cdef int i, j - for i in range(ndim / 2): - j = ndim - 1 - i - strides[i], strides[j] = strides[j], strides[i] - shape[i], shape[j] = shape[j], shape[i] - - if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: - _err(ValueError, "Cannot transpose memoryview with indirect dimensions") - - return 1 - -# -### Creating new memoryview objects from slices and memoryviews -# -@cname('__pyx_memoryviewslice') -cdef class _memoryviewslice(memoryview): - "Internal class for passing memoryview slices to Python" - - # We need this to keep our shape/strides/suboffset pointers valid - cdef {{memviewslice_name}} from_slice - # We need this only to print it's class' name - cdef object from_object - - cdef object (*to_object_func)(char *) - cdef int (*to_dtype_func)(char *, object) except 0 - - def __dealloc__(self): - __PYX_XDEC_MEMVIEW(&self.from_slice, 1) - - cdef convert_item_to_object(self, char *itemp): - if self.to_object_func != NULL: - return self.to_object_func(itemp) - else: - return memoryview.convert_item_to_object(self, itemp) - - cdef assign_item_from_object(self, char *itemp, object value): - if self.to_dtype_func != NULL: - self.to_dtype_func(itemp, value) - else: - memoryview.assign_item_from_object(self, itemp, value) - - property base: - @cname('__pyx_memoryviewslice__get__base') - def __get__(self): - return self.from_object - - __pyx_getbuffer = capsule( &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") - - -@cname('__pyx_memoryview_fromslice') -cdef memoryview_fromslice({{memviewslice_name}} memviewslice, - int ndim, - object (*to_object_func)(char *), - int (*to_dtype_func)(char *, object) except 0, - bint dtype_is_object): - - cdef _memoryviewslice result - cdef int i - - if memviewslice.memview == Py_None: - return None - - # assert 0 < ndim <= memviewslice.memview.view.ndim, ( - # ndim, memviewslice.memview.view.ndim) - - result = _memoryviewslice(None, 0, dtype_is_object) - - result.from_slice = memviewslice - __PYX_INC_MEMVIEW(&memviewslice, 1) - - result.from_object = ( memviewslice.memview).base - result.typeinfo = memviewslice.memview.typeinfo - - result.view = memviewslice.memview.view - result.view.buf = memviewslice.data - result.view.ndim = ndim - (<__pyx_buffer *> &result.view).obj = Py_None - Py_INCREF(Py_None) - - result.flags = PyBUF_RECORDS - - result.view.shape = result.from_slice.shape - result.view.strides = result.from_slice.strides - result.view.suboffsets = result.from_slice.suboffsets - - result.view.len = result.view.itemsize - for i in range(ndim): - result.view.len *= result.view.shape[i] - - result.to_object_func = to_object_func - result.to_dtype_func = to_dtype_func - - return result - -@cname('__pyx_memoryview_get_slice_from_memoryview') -cdef {{memviewslice_name}} *get_slice_from_memview(memoryview memview, - {{memviewslice_name}} *mslice): - cdef _memoryviewslice obj - if isinstance(memview, _memoryviewslice): - obj = memview - return &obj.from_slice - else: - slice_copy(memview, mslice) - return mslice - -@cname('__pyx_memoryview_slice_copy') -cdef void slice_copy(memoryview memview, {{memviewslice_name}} *dst): - cdef int dim - cdef (Py_ssize_t*) shape, strides, suboffsets - - shape = memview.view.shape - strides = memview.view.strides - suboffsets = memview.view.suboffsets - - dst.memview = <__pyx_memoryview *> memview - dst.data = memview.view.buf - - for dim in range(memview.view.ndim): - dst.shape[dim] = shape[dim] - dst.strides[dim] = strides[dim] - if suboffsets == NULL: - dst.suboffsets[dim] = -1 - else: - dst.suboffsets[dim] = suboffsets[dim] - -@cname('__pyx_memoryview_copy_object') -cdef memoryview_copy(memoryview memview): - "Create a new memoryview object" - cdef {{memviewslice_name}} memviewslice - slice_copy(memview, &memviewslice) - return memoryview_copy_from_slice(memview, &memviewslice) - -@cname('__pyx_memoryview_copy_object_from_slice') -cdef memoryview_copy_from_slice(memoryview memview, {{memviewslice_name}} *memviewslice): - """ - Create a new memoryview object from a given memoryview object and slice. - """ - cdef object (*to_object_func)(char *) - cdef int (*to_dtype_func)(char *, object) except 0 - - if isinstance(memview, _memoryviewslice): - to_object_func = (<_memoryviewslice> memview).to_object_func - to_dtype_func = (<_memoryviewslice> memview).to_dtype_func - else: - to_object_func = NULL - to_dtype_func = NULL - - return memoryview_fromslice(memviewslice[0], memview.view.ndim, - to_object_func, to_dtype_func, - memview.dtype_is_object) - - -# -### Copy the contents of a memoryview slices -# -cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: - if arg < 0: - return -arg - else: - return arg - -@cname('__pyx_get_best_slice_order') -cdef char get_best_order({{memviewslice_name}} *mslice, int ndim) nogil: - """ - Figure out the best memory access order for a given slice. - """ - cdef int i - cdef Py_ssize_t c_stride = 0 - cdef Py_ssize_t f_stride = 0 - - for i in range(ndim - 1, -1, -1): - if mslice.shape[i] > 1: - c_stride = mslice.strides[i] - break - - for i in range(ndim): - if mslice.shape[i] > 1: - f_stride = mslice.strides[i] - break - - if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): - return 'C' - else: - return 'F' - -@cython.cdivision(True) -cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, - char *dst_data, Py_ssize_t *dst_strides, - Py_ssize_t *src_shape, Py_ssize_t *dst_shape, - int ndim, size_t itemsize) nogil: - # Note: src_extent is 1 if we're broadcasting - # dst_extent always >= src_extent as we don't do reductions - cdef Py_ssize_t i - cdef Py_ssize_t src_extent = src_shape[0] - cdef Py_ssize_t dst_extent = dst_shape[0] - cdef Py_ssize_t src_stride = src_strides[0] - cdef Py_ssize_t dst_stride = dst_strides[0] - - if ndim == 1: - if (src_stride > 0 and dst_stride > 0 and - src_stride == itemsize == dst_stride): - memcpy(dst_data, src_data, itemsize * dst_extent) - else: - for i in range(dst_extent): - memcpy(dst_data, src_data, itemsize) - src_data += src_stride - dst_data += dst_stride - else: - for i in range(dst_extent): - _copy_strided_to_strided(src_data, src_strides + 1, - dst_data, dst_strides + 1, - src_shape + 1, dst_shape + 1, - ndim - 1, itemsize) - src_data += src_stride - dst_data += dst_stride - -cdef void copy_strided_to_strided({{memviewslice_name}} *src, - {{memviewslice_name}} *dst, - int ndim, size_t itemsize) nogil: - _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, - src.shape, dst.shape, ndim, itemsize) - -@cname('__pyx_memoryview_slice_get_size') -cdef Py_ssize_t slice_get_size({{memviewslice_name}} *src, int ndim) nogil: - "Return the size of the memory occupied by the slice in number of bytes" - cdef int i - cdef Py_ssize_t size = src.memview.view.itemsize - - for i in range(ndim): - size *= src.shape[i] - - return size - -@cname('__pyx_fill_contig_strides_array') -cdef Py_ssize_t fill_contig_strides_array( - Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride, - int ndim, char order) nogil: - """ - Fill the strides array for a slice with C or F contiguous strides. - This is like PyBuffer_FillContiguousStrides, but compatible with py < 2.6 - """ - cdef int idx - - if order == 'F': - for idx in range(ndim): - strides[idx] = stride - stride = stride * shape[idx] - else: - for idx in range(ndim - 1, -1, -1): - strides[idx] = stride - stride = stride * shape[idx] - - return stride - -@cname('__pyx_memoryview_copy_data_to_temp') -cdef void *copy_data_to_temp({{memviewslice_name}} *src, - {{memviewslice_name}} *tmpslice, - char order, - int ndim) nogil except NULL: - """ - Copy a direct slice to temporary contiguous memory. The caller should free - the result when done. - """ - cdef int i - cdef void *result - - cdef size_t itemsize = src.memview.view.itemsize - cdef size_t size = slice_get_size(src, ndim) - - result = malloc(size) - if not result: - _err(MemoryError, NULL) - - # tmpslice[0] = src - tmpslice.data = result - tmpslice.memview = src.memview - for i in range(ndim): - tmpslice.shape[i] = src.shape[i] - tmpslice.suboffsets[i] = -1 - - fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, - ndim, order) - - # We need to broadcast strides again - for i in range(ndim): - if tmpslice.shape[i] == 1: - tmpslice.strides[i] = 0 - - if slice_is_contig(src, order, ndim): - memcpy(result, src.data, size) - else: - copy_strided_to_strided(src, tmpslice, ndim, itemsize) - - return result - -# Use 'with gil' functions and avoid 'with gil' blocks, as the code within the blocks -# has temporaries that need the GIL to clean up -@cname('__pyx_memoryview_err_extents') -cdef int _err_extents(int i, Py_ssize_t extent1, - Py_ssize_t extent2) except -1 with gil: - raise ValueError("got differing extents in dimension %d (got %d and %d)" % - (i, extent1, extent2)) - -@cname('__pyx_memoryview_err_dim') -cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: - raise error(msg.decode('ascii') % dim) - -@cname('__pyx_memoryview_err') -cdef int _err(object error, char *msg) except -1 with gil: - if msg != NULL: - raise error(msg.decode('ascii')) - else: - raise error - -@cname('__pyx_memoryview_copy_contents') -cdef int memoryview_copy_contents({{memviewslice_name}} src, - {{memviewslice_name}} dst, - int src_ndim, int dst_ndim, - bint dtype_is_object) nogil except -1: - """ - Copy memory from slice src to slice dst. - Check for overlapping memory and verify the shapes. - """ - cdef void *tmpdata = NULL - cdef size_t itemsize = src.memview.view.itemsize - cdef int i - cdef char order = get_best_order(&src, src_ndim) - cdef bint broadcasting = False - cdef bint direct_copy = False - cdef {{memviewslice_name}} tmp - - if src_ndim < dst_ndim: - broadcast_leading(&src, src_ndim, dst_ndim) - elif dst_ndim < src_ndim: - broadcast_leading(&dst, dst_ndim, src_ndim) - - cdef int ndim = max(src_ndim, dst_ndim) - - for i in range(ndim): - if src.shape[i] != dst.shape[i]: - if src.shape[i] == 1: - broadcasting = True - src.strides[i] = 0 - else: - _err_extents(i, dst.shape[i], src.shape[i]) - - if src.suboffsets[i] >= 0: - _err_dim(ValueError, "Dimension %d is not direct", i) - - if slices_overlap(&src, &dst, ndim, itemsize): - # slices overlap, copy to temp, copy temp to dst - if not slice_is_contig(&src, order, ndim): - order = get_best_order(&dst, ndim) - - tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) - src = tmp - - if not broadcasting: - # See if both slices have equal contiguity, in that case perform a - # direct copy. This only works when we are not broadcasting. - if slice_is_contig(&src, 'C', ndim): - direct_copy = slice_is_contig(&dst, 'C', ndim) - elif slice_is_contig(&src, 'F', ndim): - direct_copy = slice_is_contig(&dst, 'F', ndim) - - if direct_copy: - # Contiguous slices with same order - refcount_copying(&dst, dtype_is_object, ndim, False) - memcpy(dst.data, src.data, slice_get_size(&src, ndim)) - refcount_copying(&dst, dtype_is_object, ndim, True) - free(tmpdata) - return 0 - - if order == 'F' == get_best_order(&dst, ndim): - # see if both slices have Fortran order, transpose them to match our - # C-style indexing order - transpose_memslice(&src) - transpose_memslice(&dst) - - refcount_copying(&dst, dtype_is_object, ndim, False) - copy_strided_to_strided(&src, &dst, ndim, itemsize) - refcount_copying(&dst, dtype_is_object, ndim, True) - - free(tmpdata) - return 0 - -@cname('__pyx_memoryview_broadcast_leading') -cdef void broadcast_leading({{memviewslice_name}} *slice, - int ndim, - int ndim_other) nogil: - cdef int i - cdef int offset = ndim_other - ndim - - for i in range(ndim - 1, -1, -1): - slice.shape[i + offset] = slice.shape[i] - slice.strides[i + offset] = slice.strides[i] - slice.suboffsets[i + offset] = slice.suboffsets[i] - - for i in range(offset): - slice.shape[i] = 1 - slice.strides[i] = slice.strides[0] - slice.suboffsets[i] = -1 - -# -### Take care of refcounting the objects in slices. Do this seperately from any copying, -### to minimize acquiring the GIL -# - -@cname('__pyx_memoryview_refcount_copying') -cdef void refcount_copying({{memviewslice_name}} *dst, bint dtype_is_object, - int ndim, bint inc) nogil: - # incref or decref the objects in the destination slice if the dtype is - # object - if dtype_is_object: - refcount_objects_in_slice_with_gil(dst.data, dst.shape, - dst.strides, ndim, inc) - -@cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') -cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, - Py_ssize_t *strides, int ndim, - bint inc) with gil: - refcount_objects_in_slice(data, shape, strides, ndim, inc) - -@cname('__pyx_memoryview_refcount_objects_in_slice') -cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, - Py_ssize_t *strides, int ndim, bint inc): - cdef Py_ssize_t i - - for i in range(shape[0]): - if ndim == 1: - if inc: - Py_INCREF(( data)[0]) - else: - Py_DECREF(( data)[0]) - else: - refcount_objects_in_slice(data, shape + 1, strides + 1, - ndim - 1, inc) - - data += strides[0] - -# -### Scalar to slice assignment -# -@cname('__pyx_memoryview_slice_assign_scalar') -cdef void slice_assign_scalar({{memviewslice_name}} *dst, int ndim, - size_t itemsize, void *item, - bint dtype_is_object) nogil: - refcount_copying(dst, dtype_is_object, ndim, False) - _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, - itemsize, item) - refcount_copying(dst, dtype_is_object, ndim, True) - - -@cname('__pyx_memoryview__slice_assign_scalar') -cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, - Py_ssize_t *strides, int ndim, - size_t itemsize, void *item) nogil: - cdef Py_ssize_t i - cdef Py_ssize_t stride = strides[0] - cdef Py_ssize_t extent = shape[0] - - if ndim == 1: - for i in range(extent): - memcpy(data, item, itemsize) - data += stride - else: - for i in range(extent): - _slice_assign_scalar(data, shape + 1, strides + 1, - ndim - 1, itemsize, item) - data += stride - - -############### BufferFormatFromTypeInfo ############### -cdef extern from *: - ctypedef struct __Pyx_StructField - - cdef enum: - __PYX_BUF_FLAGS_PACKED_STRUCT - __PYX_BUF_FLAGS_INTEGER_COMPLEX - - ctypedef struct __Pyx_TypeInfo: - char* name - __Pyx_StructField* fields - size_t size - size_t arraysize[8] - int ndim - char typegroup - char is_unsigned - int flags - - ctypedef struct __Pyx_StructField: - __Pyx_TypeInfo* type - char* name - size_t offset - - ctypedef struct __Pyx_BufFmt_StackElem: - __Pyx_StructField* field - size_t parent_offset - - #ctypedef struct __Pyx_BufFmt_Context: - # __Pyx_StructField root - __Pyx_BufFmt_StackElem* head - - struct __pyx_typeinfo_string: - char string[3] - - __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *) - - -@cname('__pyx_format_from_typeinfo') -cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): - cdef __Pyx_StructField *field - cdef __pyx_typeinfo_string fmt - cdef bytes part, result - - if type.typegroup == 'S': - assert type.fields != NULL and type.fields.type != NULL - - if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: - alignment = b'^' - else: - alignment = b'' - - parts = [b"T{"] - field = type.fields - - while field.type: - part = format_from_typeinfo(field.type) - parts.append(part + b':' + field.name + b':') - field += 1 - - result = alignment.join(parts) + b'}' - else: - fmt = __Pyx_TypeInfoToFormat(type) - if type.arraysize[0]: - extents = [unicode(type.arraysize[i]) for i in range(type.ndim)] - result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string - else: - result = fmt.string - - return result diff --git a/third_party/cython/src/Cython/Utility/MemoryView_C.c b/third_party/cython/src/Cython/Utility/MemoryView_C.c deleted file mode 100644 index ec86220fbac0a..0000000000000 --- a/third_party/cython/src/Cython/Utility/MemoryView_C.c +++ /dev/null @@ -1,938 +0,0 @@ -////////// MemviewSliceStruct.proto ////////// - -/* memoryview slice struct */ -struct {{memview_struct_name}}; - -typedef struct { - struct {{memview_struct_name}} *memview; - char *data; - Py_ssize_t shape[{{max_dims}}]; - Py_ssize_t strides[{{max_dims}}]; - Py_ssize_t suboffsets[{{max_dims}}]; -} {{memviewslice_name}}; - - -/////////// Atomics.proto ///////////// - -#include - -#ifndef CYTHON_ATOMICS - #define CYTHON_ATOMICS 1 -#endif - -#define __pyx_atomic_int_type int -// todo: Portland pgcc, maybe OS X's OSAtomicIncrement32, -// libatomic + autotools-like distutils support? Such a pain... -#if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 || \ - (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) && \ - !defined(__i386__) - /* gcc >= 4.1.2 */ - #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1) - #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1) - - #ifdef __PYX_DEBUG_ATOMICS - #warning "Using GNU atomics" - #endif -#elif CYTHON_ATOMICS && MSC_VER - /* msvc */ - #include - #define __pyx_atomic_int_type LONG - #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value) - #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value) - - #ifdef __PYX_DEBUG_ATOMICS - #warning "Using MSVC atomics" - #endif -#elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0 - #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value) - #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value) - - #ifdef __PYX_DEBUG_ATOMICS - #warning "Using Intel atomics" - #endif -#else - #undef CYTHON_ATOMICS - #define CYTHON_ATOMICS 0 - - #ifdef __PYX_DEBUG_ATOMICS - #warning "Not using atomics" - #endif -#endif - -typedef volatile __pyx_atomic_int_type __pyx_atomic_int; - -#if CYTHON_ATOMICS - #define __pyx_add_acquisition_count(memview) \ - __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock) - #define __pyx_sub_acquisition_count(memview) \ - __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock) -#else - #define __pyx_add_acquisition_count(memview) \ - __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) - #define __pyx_sub_acquisition_count(memview) \ - __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) -#endif - - -/////////////// ObjectToMemviewSlice.proto /////////////// - -static CYTHON_INLINE {{memviewslice_name}} {{funcname}}(PyObject *); - - -////////// MemviewSliceInit.proto ////////// - -#define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d - -#define __Pyx_MEMVIEW_DIRECT 1 -#define __Pyx_MEMVIEW_PTR 2 -#define __Pyx_MEMVIEW_FULL 4 -#define __Pyx_MEMVIEW_CONTIG 8 -#define __Pyx_MEMVIEW_STRIDED 16 -#define __Pyx_MEMVIEW_FOLLOW 32 - -#define __Pyx_IS_C_CONTIG 1 -#define __Pyx_IS_F_CONTIG 2 - -static int __Pyx_init_memviewslice( - struct __pyx_memoryview_obj *memview, - int ndim, - __Pyx_memviewslice *memviewslice, - int memview_is_new_reference); - -static CYTHON_INLINE int __pyx_add_acquisition_count_locked( - __pyx_atomic_int *acquisition_count, PyThread_type_lock lock); -static CYTHON_INLINE int __pyx_sub_acquisition_count_locked( - __pyx_atomic_int *acquisition_count, PyThread_type_lock lock); - -#define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p) -#define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview)) -#define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__) -#define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__) -static CYTHON_INLINE void __Pyx_INC_MEMVIEW({{memviewslice_name}} *, int, int); -static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW({{memviewslice_name}} *, int, int); - - -/////////////// MemviewSliceIndex.proto /////////////// - -static CYTHON_INLINE char *__pyx_memviewslice_index_full( - const char *bufp, Py_ssize_t idx, Py_ssize_t stride, Py_ssize_t suboffset); - - -/////////////// ObjectToMemviewSlice /////////////// -//@requires: MemviewSliceValidateAndInit - -static CYTHON_INLINE {{memviewslice_name}} {{funcname}}(PyObject *obj) { - {{memviewslice_name}} result = {{memslice_init}}; - __Pyx_BufFmt_StackElem stack[{{struct_nesting_depth}}]; - int axes_specs[] = { {{axes_specs}} }; - int retcode; - - if (obj == Py_None) { - /* We don't bother to refcount None */ - result.memview = (struct __pyx_memoryview_obj *) Py_None; - return result; - } - - retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, {{c_or_f_flag}}, - {{buf_flag}}, {{ndim}}, - &{{dtype_typeinfo}}, stack, - &result, obj); - - if (unlikely(retcode == -1)) - goto __pyx_fail; - - return result; -__pyx_fail: - result.memview = NULL; - result.data = NULL; - return result; -} - - -/////////////// MemviewSliceValidateAndInit.proto /////////////// - -static int __Pyx_ValidateAndInit_memviewslice( - int *axes_specs, - int c_or_f_flag, - int buf_flags, - int ndim, - __Pyx_TypeInfo *dtype, - __Pyx_BufFmt_StackElem stack[], - __Pyx_memviewslice *memviewslice, - PyObject *original_obj); - -/////////////// MemviewSliceValidateAndInit /////////////// -//@requires: Buffer.c::TypeInfoCompare - -static int -__pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec) -{ - if (buf->shape[dim] <= 1) - return 1; - - if (buf->strides) { - if (spec & __Pyx_MEMVIEW_CONTIG) { - if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) { - if (buf->strides[dim] != sizeof(void *)) { - PyErr_Format(PyExc_ValueError, - "Buffer is not indirectly contiguous " - "in dimension %d.", dim); - goto fail; - } - } else if (buf->strides[dim] != buf->itemsize) { - PyErr_SetString(PyExc_ValueError, - "Buffer and memoryview are not contiguous " - "in the same dimension."); - goto fail; - } - } - - if (spec & __Pyx_MEMVIEW_FOLLOW) { - Py_ssize_t stride = buf->strides[dim]; - if (stride < 0) - stride = -stride; - if (stride < buf->itemsize) { - PyErr_SetString(PyExc_ValueError, - "Buffer and memoryview are not contiguous " - "in the same dimension."); - goto fail; - } - } - } else { - if (spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1) { - PyErr_Format(PyExc_ValueError, - "C-contiguous buffer is not contiguous in " - "dimension %d", dim); - goto fail; - } else if (spec & (__Pyx_MEMVIEW_PTR)) { - PyErr_Format(PyExc_ValueError, - "C-contiguous buffer is not indirect in " - "dimension %d", dim); - goto fail; - } else if (buf->suboffsets) { - PyErr_SetString(PyExc_ValueError, - "Buffer exposes suboffsets but no strides"); - goto fail; - } - } - - return 1; -fail: - return 0; -} - -static int -__pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED int ndim, int spec) -{ - // Todo: without PyBUF_INDIRECT we may not have suboffset information, i.e., the - // ptr may not be set to NULL but may be uninitialized? - if (spec & __Pyx_MEMVIEW_DIRECT) { - if (buf->suboffsets && buf->suboffsets[dim] >= 0) { - PyErr_Format(PyExc_ValueError, - "Buffer not compatible with direct access " - "in dimension %d.", dim); - goto fail; - } - } - - if (spec & __Pyx_MEMVIEW_PTR) { - if (!buf->suboffsets || (buf->suboffsets && buf->suboffsets[dim] < 0)) { - PyErr_Format(PyExc_ValueError, - "Buffer is not indirectly accessible " - "in dimension %d.", dim); - goto fail; - } - } - - return 1; -fail: - return 0; -} - -static int -__pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag) -{ - int i; - - if (c_or_f_flag & __Pyx_IS_F_CONTIG) { - Py_ssize_t stride = 1; - for (i = 0; i < ndim; i++) { - if (stride * buf->itemsize != buf->strides[i] && - buf->shape[i] > 1) - { - PyErr_SetString(PyExc_ValueError, - "Buffer not fortran contiguous."); - goto fail; - } - stride = stride * buf->shape[i]; - } - } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) { - Py_ssize_t stride = 1; - for (i = ndim - 1; i >- 1; i--) { - if (stride * buf->itemsize != buf->strides[i] && - buf->shape[i] > 1) { - PyErr_SetString(PyExc_ValueError, - "Buffer not C contiguous."); - goto fail; - } - stride = stride * buf->shape[i]; - } - } - - return 1; -fail: - return 0; -} - -static int __Pyx_ValidateAndInit_memviewslice( - int *axes_specs, - int c_or_f_flag, - int buf_flags, - int ndim, - __Pyx_TypeInfo *dtype, - __Pyx_BufFmt_StackElem stack[], - __Pyx_memviewslice *memviewslice, - PyObject *original_obj) -{ - struct __pyx_memoryview_obj *memview, *new_memview; - __Pyx_RefNannyDeclarations - Py_buffer *buf; - int i, spec = 0, retval = -1; - __Pyx_BufFmt_Context ctx; - int from_memoryview = __pyx_memoryview_check(original_obj); - - __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0); - - if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *) - original_obj)->typeinfo)) { - /* We have a matching dtype, skip format parsing */ - memview = (struct __pyx_memoryview_obj *) original_obj; - new_memview = NULL; - } else { - memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( - original_obj, buf_flags, 0, dtype); - new_memview = memview; - if (unlikely(!memview)) - goto fail; - } - - buf = &memview->view; - if (buf->ndim != ndim) { - PyErr_Format(PyExc_ValueError, - "Buffer has wrong number of dimensions (expected %d, got %d)", - ndim, buf->ndim); - goto fail; - } - - if (new_memview) { - __Pyx_BufFmt_Init(&ctx, stack, dtype); - if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; - } - - if ((unsigned) buf->itemsize != dtype->size) { - PyErr_Format(PyExc_ValueError, - "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) " - "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)", - buf->itemsize, - (buf->itemsize > 1) ? "s" : "", - dtype->name, - dtype->size, - (dtype->size > 1) ? "s" : ""); - goto fail; - } - - /* Check axes */ - for (i = 0; i < ndim; i++) { - spec = axes_specs[i]; - if (!__pyx_check_strides(buf, i, ndim, spec)) - goto fail; - if (!__pyx_check_suboffsets(buf, i, ndim, spec)) - goto fail; - } - - /* Check contiguity */ - if (buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)) - goto fail; - - /* Initialize */ - if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice, - new_memview != NULL) == -1)) { - goto fail; - } - - retval = 0; - goto no_fail; - -fail: - Py_XDECREF(new_memview); - retval = -1; - -no_fail: - __Pyx_RefNannyFinishContext(); - return retval; -} - - -////////// MemviewSliceInit ////////// - -static int -__Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview, - int ndim, - {{memviewslice_name}} *memviewslice, - int memview_is_new_reference) -{ - __Pyx_RefNannyDeclarations - int i, retval=-1; - Py_buffer *buf = &memview->view; - __Pyx_RefNannySetupContext("init_memviewslice", 0); - - if (!buf) { - PyErr_SetString(PyExc_ValueError, - "buf is NULL."); - goto fail; - } else if (memviewslice->memview || memviewslice->data) { - PyErr_SetString(PyExc_ValueError, - "memviewslice is already initialized!"); - goto fail; - } - - if (buf->strides) { - for (i = 0; i < ndim; i++) { - memviewslice->strides[i] = buf->strides[i]; - } - } else { - Py_ssize_t stride = buf->itemsize; - for (i = ndim - 1; i >= 0; i--) { - memviewslice->strides[i] = stride; - stride *= buf->shape[i]; - } - } - - for (i = 0; i < ndim; i++) { - memviewslice->shape[i] = buf->shape[i]; - if (buf->suboffsets) { - memviewslice->suboffsets[i] = buf->suboffsets[i]; - } else { - memviewslice->suboffsets[i] = -1; - } - } - - memviewslice->memview = memview; - memviewslice->data = (char *)buf->buf; - if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) { - Py_INCREF(memview); - } - retval = 0; - goto no_fail; - -fail: - /* Don't decref, the memoryview may be borrowed. Let the caller do the cleanup */ - /* __Pyx_XDECREF(memviewslice->memview); */ - memviewslice->memview = 0; - memviewslice->data = 0; - retval = -1; -no_fail: - __Pyx_RefNannyFinishContext(); - return retval; -} - - -static CYTHON_INLINE void __pyx_fatalerror(const char *fmt, ...) { - va_list vargs; - char msg[200]; - - va_start(vargs, fmt); - -#ifdef HAVE_STDARG_PROTOTYPES - va_start(vargs, fmt); -#else - va_start(vargs); -#endif - - vsnprintf(msg, 200, fmt, vargs); - Py_FatalError(msg); - - va_end(vargs); -} - -static CYTHON_INLINE int -__pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count, - PyThread_type_lock lock) -{ - int result; - PyThread_acquire_lock(lock, 1); - result = (*acquisition_count)++; - PyThread_release_lock(lock); - return result; -} - -static CYTHON_INLINE int -__pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count, - PyThread_type_lock lock) -{ - int result; - PyThread_acquire_lock(lock, 1); - result = (*acquisition_count)--; - PyThread_release_lock(lock); - return result; -} - - -static CYTHON_INLINE void -__Pyx_INC_MEMVIEW({{memviewslice_name}} *memslice, int have_gil, int lineno) -{ - int first_time; - struct {{memview_struct_name}} *memview = memslice->memview; - if (!memview || (PyObject *) memview == Py_None) - return; /* allow uninitialized memoryview assignment */ - - if (__pyx_get_slice_count(memview) < 0) - __pyx_fatalerror("Acquisition count is %d (line %d)", - __pyx_get_slice_count(memview), lineno); - - first_time = __pyx_add_acquisition_count(memview) == 0; - - if (first_time) { - if (have_gil) { - Py_INCREF((PyObject *) memview); - } else { - PyGILState_STATE _gilstate = PyGILState_Ensure(); - Py_INCREF((PyObject *) memview); - PyGILState_Release(_gilstate); - } - } -} - -static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW({{memviewslice_name}} *memslice, - int have_gil, int lineno) { - int last_time; - struct {{memview_struct_name}} *memview = memslice->memview; - - if (!memview ) { - return; - } else if ((PyObject *) memview == Py_None) { - memslice->memview = NULL; - return; - } - - if (__pyx_get_slice_count(memview) <= 0) - __pyx_fatalerror("Acquisition count is %d (line %d)", - __pyx_get_slice_count(memview), lineno); - - last_time = __pyx_sub_acquisition_count(memview) == 1; - memslice->data = NULL; - if (last_time) { - if (have_gil) { - Py_CLEAR(memslice->memview); - } else { - PyGILState_STATE _gilstate = PyGILState_Ensure(); - Py_CLEAR(memslice->memview); - PyGILState_Release(_gilstate); - } - } else { - memslice->memview = NULL; - } -} - - -////////// MemviewSliceCopyTemplate.proto ////////// - -static {{memviewslice_name}} -__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, - const char *mode, int ndim, - size_t sizeof_dtype, int contig_flag, - int dtype_is_object); - - -////////// MemviewSliceCopyTemplate ////////// - -static {{memviewslice_name}} -__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, - const char *mode, int ndim, - size_t sizeof_dtype, int contig_flag, - int dtype_is_object) -{ - __Pyx_RefNannyDeclarations - int i; - __Pyx_memviewslice new_mvs = {{memslice_init}}; - struct __pyx_memoryview_obj *from_memview = from_mvs->memview; - Py_buffer *buf = &from_memview->view; - PyObject *shape_tuple = NULL; - PyObject *temp_int = NULL; - struct __pyx_array_obj *array_obj = NULL; - struct __pyx_memoryview_obj *memview_obj = NULL; - - __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0); - - for (i = 0; i < ndim; i++) { - if (from_mvs->suboffsets[i] >= 0) { - PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with " - "indirect dimensions (axis %d)", i); - goto fail; - } - } - - shape_tuple = PyTuple_New(ndim); - if (unlikely(!shape_tuple)) { - goto fail; - } - __Pyx_GOTREF(shape_tuple); - - - for(i = 0; i < ndim; i++) { - temp_int = PyInt_FromSsize_t(from_mvs->shape[i]); - if(unlikely(!temp_int)) { - goto fail; - } else { - PyTuple_SET_ITEM(shape_tuple, i, temp_int); - temp_int = NULL; - } - } - - array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL); - if (unlikely(!array_obj)) { - goto fail; - } - __Pyx_GOTREF(array_obj); - - memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( - (PyObject *) array_obj, contig_flag, - dtype_is_object, - from_mvs->memview->typeinfo); - if (unlikely(!memview_obj)) - goto fail; - - /* initialize new_mvs */ - if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0)) - goto fail; - - if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim, - dtype_is_object) < 0)) - goto fail; - - goto no_fail; - -fail: - __Pyx_XDECREF(new_mvs.memview); - new_mvs.memview = NULL; - new_mvs.data = NULL; -no_fail: - __Pyx_XDECREF(shape_tuple); - __Pyx_XDECREF(temp_int); - __Pyx_XDECREF(array_obj); - __Pyx_RefNannyFinishContext(); - return new_mvs; -} - - -////////// CopyContentsUtility.proto ///////// - -#define {{func_cname}}(slice) \ - __pyx_memoryview_copy_new_contig(&slice, "{{mode}}", {{ndim}}, \ - sizeof({{dtype_decl}}), {{contig_flag}}, \ - {{dtype_is_object}}) - - -////////// OverlappingSlices.proto ////////// - -static int __pyx_slices_overlap({{memviewslice_name}} *slice1, - {{memviewslice_name}} *slice2, - int ndim, size_t itemsize); - - -////////// OverlappingSlices ////////// - -/* Based on numpy's core/src/multiarray/array_assign.c */ - -/* Gets a half-open range [start, end) which contains the array data */ -static void -__pyx_get_array_memory_extents({{memviewslice_name}} *slice, - void **out_start, void **out_end, - int ndim, size_t itemsize) -{ - char *start, *end; - int i; - - start = end = slice->data; - - for (i = 0; i < ndim; i++) { - Py_ssize_t stride = slice->strides[i]; - Py_ssize_t extent = slice->shape[i]; - - if (extent == 0) { - *out_start = *out_end = start; - return; - } else { - if (stride > 0) - end += stride * (extent - 1); - else - start += stride * (extent - 1); - } - } - - /* Return a half-open range */ - *out_start = start; - *out_end = end + itemsize; -} - -/* Returns 1 if the arrays have overlapping data, 0 otherwise */ -static int -__pyx_slices_overlap({{memviewslice_name}} *slice1, - {{memviewslice_name}} *slice2, - int ndim, size_t itemsize) -{ - void *start1, *end1, *start2, *end2; - - __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize); - __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize); - - return (start1 < end2) && (start2 < end1); -} - - -////////// MemviewSliceIsCContig.proto ////////// - -#define __pyx_memviewslice_is_c_contig{{ndim}}(slice) \ - __pyx_memviewslice_is_contig(&slice, 'C', {{ndim}}) - - -////////// MemviewSliceIsFContig.proto ////////// - -#define __pyx_memviewslice_is_f_contig{{ndim}}(slice) \ - __pyx_memviewslice_is_contig(&slice, 'F', {{ndim}}) - - -////////// MemviewSliceIsContig.proto ////////// - -static int __pyx_memviewslice_is_contig(const {{memviewslice_name}} *mvs, - char order, int ndim); - - -////////// MemviewSliceIsContig ////////// - -static int -__pyx_memviewslice_is_contig(const {{memviewslice_name}} *mvs, - char order, int ndim) -{ - int i, index, step, start; - Py_ssize_t itemsize = mvs->memview->view.itemsize; - - if (order == 'F') { - step = 1; - start = 0; - } else { - step = -1; - start = ndim - 1; - } - - for (i = 0; i < ndim; i++) { - index = start + step * i; - if (mvs->suboffsets[index] >= 0 || mvs->strides[index] != itemsize) - return 0; - - itemsize *= mvs->shape[index]; - } - - return 1; -} - - -/////////////// MemviewSliceIndex /////////////// - -static CYTHON_INLINE char * -__pyx_memviewslice_index_full(const char *bufp, Py_ssize_t idx, - Py_ssize_t stride, Py_ssize_t suboffset) -{ - bufp = bufp + idx * stride; - if (suboffset >= 0) { - bufp = *((char **) bufp) + suboffset; - } - return (char *) bufp; -} - - -/////////////// MemviewDtypeToObject.proto /////////////// - -{{if to_py_function}} -static PyObject *{{get_function}}(const char *itemp); /* proto */ -{{endif}} - -{{if from_py_function}} -static int {{set_function}}(const char *itemp, PyObject *obj); /* proto */ -{{endif}} - -/////////////// MemviewDtypeToObject /////////////// - -{{#__pyx_memview__to_object}} - -/* Convert a dtype to or from a Python object */ - -{{if to_py_function}} -static PyObject *{{get_function}}(const char *itemp) { - return (PyObject *) {{to_py_function}}(*({{dtype}} *) itemp); -} -{{endif}} - -{{if from_py_function}} -static int {{set_function}}(const char *itemp, PyObject *obj) { - {{dtype}} value = {{from_py_function}}(obj); - if ({{error_condition}}) - return 0; - *({{dtype}} *) itemp = value; - return 1; -} -{{endif}} - - -/////////////// MemviewObjectToObject.proto /////////////// - -/* Function callbacks (for memoryview object) for dtype object */ -static PyObject *{{get_function}}(const char *itemp); /* proto */ -static int {{set_function}}(const char *itemp, PyObject *obj); /* proto */ - - -/////////////// MemviewObjectToObject /////////////// - -static PyObject *{{get_function}}(const char *itemp) { - PyObject *result = *(PyObject **) itemp; - Py_INCREF(result); - return result; -} - -static int {{set_function}}(const char *itemp, PyObject *obj) { - Py_INCREF(obj); - Py_DECREF(*(PyObject **) itemp); - *(PyObject **) itemp = obj; - return 1; -} - -/////////// ToughSlice ////////// - -/* Dimension is indexed with 'start:stop:step' */ - -if (unlikely(__pyx_memoryview_slice_memviewslice( - &{{dst}}, - {{src}}.shape[{{dim}}], {{src}}.strides[{{dim}}], {{src}}.suboffsets[{{dim}}], - {{dim}}, - {{new_ndim}}, - &{{suboffset_dim}}, - {{start}}, - {{stop}}, - {{step}}, - {{int(have_start)}}, - {{int(have_stop)}}, - {{int(have_step)}}, - 1) < 0)) -{ - {{error_goto}} -} - - -////////// SimpleSlice ////////// - -/* Dimension is indexed with ':' only */ - -{{dst}}.shape[{{new_ndim}}] = {{src}}.shape[{{dim}}]; -{{dst}}.strides[{{new_ndim}}] = {{src}}.strides[{{dim}}]; - -{{if access == 'direct'}} - {{dst}}.suboffsets[{{new_ndim}}] = -1; -{{else}} - {{dst}}.suboffsets[{{new_ndim}}] = {{src}}.suboffsets[{{dim}}]; - if ({{src}}.suboffsets[{{dim}}] >= 0) - {{suboffset_dim}} = {{new_ndim}}; -{{endif}} - - -////////// SliceIndex ////////// - -// Dimension is indexed with an integer, we could use the ToughSlice -// approach, but this is faster - -{ - Py_ssize_t __pyx_tmp_idx = {{idx}}; - Py_ssize_t __pyx_tmp_shape = {{src}}.shape[{{dim}}]; - Py_ssize_t __pyx_tmp_stride = {{src}}.strides[{{dim}}]; - if ({{wraparound}} && (__pyx_tmp_idx < 0)) - __pyx_tmp_idx += __pyx_tmp_shape; - - if ({{boundscheck}} && (__pyx_tmp_idx < 0 || __pyx_tmp_idx >= __pyx_tmp_shape)) { - {{if not have_gil}} - #ifdef WITH_THREAD - PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); - #endif - {{endif}} - - PyErr_SetString(PyExc_IndexError, "Index out of bounds (axis {{dim}})"); - - {{if not have_gil}} - #ifdef WITH_THREAD - PyGILState_Release(__pyx_gilstate_save); - #endif - {{endif}} - - {{error_goto}} - } - - {{if all_dimensions_direct}} - {{dst}}.data += __pyx_tmp_idx * __pyx_tmp_stride; - {{else}} - if ({{suboffset_dim}} < 0) { - {{dst}}.data += __pyx_tmp_idx * __pyx_tmp_stride; - - /* This dimension is the first dimension, or is preceded by */ - /* direct or indirect dimensions that are indexed away. */ - /* Hence suboffset_dim must be less than zero, and we can have */ - /* our data pointer refer to another block by dereferencing. */ - /* slice.data -> B -> C becomes slice.data -> C */ - - {{if indirect}} - { - Py_ssize_t __pyx_tmp_suboffset = {{src}}.suboffsets[{{dim}}]; - - {{if generic}} - if (__pyx_tmp_suboffset >= 0) - {{endif}} - - {{dst}}.data = *((char **) {{dst}}.data) + __pyx_tmp_suboffset; - } - {{endif}} - - } else { - {{dst}}.suboffsets[{{suboffset_dim}}] += __pyx_tmp_idx * __pyx_tmp_stride; - - /* Note: dimension can not be indirect, the compiler will have */ - /* issued an error */ - } - - {{endif}} -} - - -////////// FillStrided1DScalar.proto ////////// - -static void -__pyx_fill_slice_{{dtype_name}}({{type_decl}} *p, Py_ssize_t extent, Py_ssize_t stride, - size_t itemsize, void *itemp); - -////////// FillStrided1DScalar ////////// - -/* Fill a slice with a scalar value. The dimension is direct and strided or contiguous */ -/* This can be used as a callback for the memoryview object to efficienty assign a scalar */ -/* Currently unused */ -static void -__pyx_fill_slice_{{dtype_name}}({{type_decl}} *p, Py_ssize_t extent, Py_ssize_t stride, - size_t itemsize, void *itemp) -{ - Py_ssize_t i; - {{type_decl}} item = *(({{type_decl}} *) itemp); - {{type_decl}} *endp; - - stride /= sizeof({{type_decl}}); - endp = p + stride * extent; - - while (p < endp) { - *p = item; - p += stride; - } -} diff --git a/third_party/cython/src/Cython/Utility/ModuleSetupCode.c b/third_party/cython/src/Cython/Utility/ModuleSetupCode.c deleted file mode 100644 index b515b3d55d44c..0000000000000 --- a/third_party/cython/src/Cython/Utility/ModuleSetupCode.c +++ /dev/null @@ -1,693 +0,0 @@ -/////////////// CModulePreamble /////////////// - -#include /* For offsetof */ -#ifndef offsetof -#define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) -#endif - -#if !defined(WIN32) && !defined(MS_WINDOWS) - #ifndef __stdcall - #define __stdcall - #endif - #ifndef __cdecl - #define __cdecl - #endif - #ifndef __fastcall - #define __fastcall - #endif -#endif - -#ifndef DL_IMPORT - #define DL_IMPORT(t) t -#endif -#ifndef DL_EXPORT - #define DL_EXPORT(t) t -#endif - -#ifndef PY_LONG_LONG - #define PY_LONG_LONG LONG_LONG -#endif - -#ifndef Py_HUGE_VAL - #define Py_HUGE_VAL HUGE_VAL -#endif - -#ifdef PYPY_VERSION -#define CYTHON_COMPILING_IN_PYPY 1 -#define CYTHON_COMPILING_IN_CPYTHON 0 -#else -#define CYTHON_COMPILING_IN_PYPY 0 -#define CYTHON_COMPILING_IN_CPYTHON 1 -#endif - -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 -#define Py_OptimizeFlag 0 -#endif - -#if PY_VERSION_HEX < 0x02050000 - typedef int Py_ssize_t; - #define PY_SSIZE_T_MAX INT_MAX - #define PY_SSIZE_T_MIN INT_MIN - #define PY_FORMAT_SIZE_T "" - #define CYTHON_FORMAT_SSIZE_T "" - #define PyInt_FromSsize_t(z) PyInt_FromLong(z) - #define PyInt_AsSsize_t(o) __Pyx_PyInt_As_int(o) - #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ - (PyErr_Format(PyExc_TypeError, \ - "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ - (PyObject*)0)) - #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ - !PyComplex_Check(o)) - #define PyIndex_Check __Pyx_PyIndex_Check - #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) - #define __PYX_BUILD_PY_SSIZE_T "i" -#else - #define __PYX_BUILD_PY_SSIZE_T "n" - #define CYTHON_FORMAT_SSIZE_T "z" - #define __Pyx_PyIndex_Check PyIndex_Check -#endif - -#if PY_VERSION_HEX < 0x02060000 - #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) - #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) - #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) - #define PyVarObject_HEAD_INIT(type, size) \ - PyObject_HEAD_INIT(type) size, - #define PyType_Modified(t) - - typedef struct { - void *buf; - PyObject *obj; - Py_ssize_t len; - Py_ssize_t itemsize; - int readonly; - int ndim; - char *format; - Py_ssize_t *shape; - Py_ssize_t *strides; - Py_ssize_t *suboffsets; - void *internal; - } Py_buffer; - - #define PyBUF_SIMPLE 0 - #define PyBUF_WRITABLE 0x0001 - #define PyBUF_FORMAT 0x0004 - #define PyBUF_ND 0x0008 - #define PyBUF_STRIDES (0x0010 | PyBUF_ND) - #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) - #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) - #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) - #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) - #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE) - #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE) - - typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); - typedef void (*releasebufferproc)(PyObject *, Py_buffer *); -#endif - -#if PY_MAJOR_VERSION < 3 - #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \ - PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) - #define __Pyx_DefaultClassType PyClass_Type -#else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) - #define __Pyx_DefaultClassType PyType_Type -#endif - -#if PY_VERSION_HEX < 0x02060000 - #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") -#endif - -#if PY_MAJOR_VERSION >= 3 - #define Py_TPFLAGS_CHECKTYPES 0 - #define Py_TPFLAGS_HAVE_INDEX 0 -#endif - -#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) - #define Py_TPFLAGS_HAVE_NEWBUFFER 0 -#endif - -#if PY_VERSION_HEX < 0x02060000 - #define Py_TPFLAGS_HAVE_VERSION_TAG 0 -#endif -#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT) - #define Py_TPFLAGS_IS_ABSTRACT 0 -#endif -#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE) - #define Py_TPFLAGS_HAVE_FINALIZE 0 -#endif - -/* new Py3.3 unicode type (PEP 393) */ -#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ - 0 : _PyUnicode_Ready((PyObject *)(op))) - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) -#else - #define CYTHON_PEP393_ENABLED 0 - #define __Pyx_PyUnicode_READY(op) (0) - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) - #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) - #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) - /* (void)(k) => avoid unused variable warning due to macro: */ - #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) -#endif - -#if CYTHON_COMPILING_IN_PYPY - #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) - #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) -#else - #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) - #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \ - PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) -#endif - -#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) -#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) - -#if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) -#else - #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) -#endif - -#if PY_MAJOR_VERSION >= 3 - #define PyBaseString_Type PyUnicode_Type - #define PyStringObject PyUnicodeObject - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -#endif - -#if PY_VERSION_HEX < 0x02060000 - #define PyBytesObject PyStringObject - #define PyBytes_Type PyString_Type - #define PyBytes_Check PyString_Check - #define PyBytes_CheckExact PyString_CheckExact - #define PyBytes_FromString PyString_FromString - #define PyBytes_FromStringAndSize PyString_FromStringAndSize - #define PyBytes_FromFormat PyString_FromFormat - #define PyBytes_DecodeEscape PyString_DecodeEscape - #define PyBytes_AsString PyString_AsString - #define PyBytes_AsStringAndSize PyString_AsStringAndSize - #define PyBytes_Size PyString_Size - #define PyBytes_AS_STRING PyString_AS_STRING - #define PyBytes_GET_SIZE PyString_GET_SIZE - #define PyBytes_Repr PyString_Repr - #define PyBytes_Concat PyString_Concat - #define PyBytes_ConcatAndDel PyString_ConcatAndDel -#endif - -#if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -#else - #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ - PyString_Check(obj) || PyUnicode_Check(obj)) - #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) -#endif - -#if PY_VERSION_HEX < 0x02060000 - #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) - #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) -#endif -#ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) -#endif - -#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) - -#if PY_MAJOR_VERSION >= 3 - #define PyIntObject PyLongObject - #define PyInt_Type PyLong_Type - #define PyInt_Check(op) PyLong_Check(op) - #define PyInt_CheckExact(op) PyLong_CheckExact(op) - #define PyInt_FromString PyLong_FromString - #define PyInt_FromUnicode PyLong_FromUnicode - #define PyInt_FromLong PyLong_FromLong - #define PyInt_FromSize_t PyLong_FromSize_t - #define PyInt_FromSsize_t PyLong_FromSsize_t - #define PyInt_AsLong PyLong_AsLong - #define PyInt_AS_LONG PyLong_AS_LONG - #define PyInt_AsSsize_t PyLong_AsSsize_t - #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask - #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask - #define PyNumber_Int PyNumber_Long -#endif - -#if PY_MAJOR_VERSION >= 3 - #define PyBoolObject PyLongObject -#endif - -#if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong - #define __Pyx_PyInt_AsHash_t PyInt_AsLong -#else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t - #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -#endif - -#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300) - #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b) - #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value) - #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b) -#else - #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \ - (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \ - (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \ - (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0))) - #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \ - (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ - (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \ - (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1))) - #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \ - (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \ - (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \ - (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1))) -#endif - -#if PY_MAJOR_VERSION >= 3 - #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) -#endif - -#if PY_VERSION_HEX < 0x02050000 - #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n))) - #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) - #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n))) -#else - #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n)) - #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) - #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n)) -#endif - -#if PY_VERSION_HEX < 0x02050000 - #define __Pyx_NAMESTR(n) ((char *)(n)) - #define __Pyx_DOCSTR(n) ((char *)(n)) -#else - #define __Pyx_NAMESTR(n) (n) - #define __Pyx_DOCSTR(n) (n) -#endif - -/* inline attribute */ -#ifndef CYTHON_INLINE - #if defined(__GNUC__) - #define CYTHON_INLINE __inline__ - #elif defined(_MSC_VER) - #define CYTHON_INLINE __inline - #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - #define CYTHON_INLINE inline - #else - #define CYTHON_INLINE - #endif -#endif - -/* restrict */ -#ifndef CYTHON_RESTRICT - #if defined(__GNUC__) - #define CYTHON_RESTRICT __restrict__ - #elif defined(_MSC_VER) && _MSC_VER >= 1400 - #define CYTHON_RESTRICT __restrict - #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - #define CYTHON_RESTRICT restrict - #else - #define CYTHON_RESTRICT - #endif -#endif - -#ifdef NAN -#define __PYX_NAN() ((float) NAN) -#else -static CYTHON_INLINE float __PYX_NAN() { - /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and - a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is - a quiet NaN. */ - float value; - memset(&value, 0xFF, sizeof(value)); - return value; -} -#endif - -// Work around clang bug http://stackoverflow.com/questions/21847816/c-invoke-nested-template-class-destructor -#ifdef __cplusplus -template -void __Pyx_call_destructor(T* x) { - x->~T(); -} -#endif - -/////////////// UtilityFunctionPredeclarations.proto /////////////// - -/* unused attribute */ -#ifndef CYTHON_UNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define CYTHON_UNUSED __attribute__ ((__unused__)) -# else -# define CYTHON_UNUSED -# endif -# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) -# define CYTHON_UNUSED __attribute__ ((__unused__)) -# else -# define CYTHON_UNUSED -# endif -#endif - -typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; - const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ - -/////////////// ForceInitThreads.proto /////////////// - -#ifndef __PYX_FORCE_INIT_THREADS - #define __PYX_FORCE_INIT_THREADS 0 -#endif - -/////////////// InitThreads.init /////////////// - -#ifdef WITH_THREAD -PyEval_InitThreads(); -#endif - -/////////////// CodeObjectCache.proto /////////////// - -typedef struct { - int code_line; - PyCodeObject* code_object; -} __Pyx_CodeObjectCacheEntry; - -struct __Pyx_CodeObjectCache { - int count; - int max_count; - __Pyx_CodeObjectCacheEntry* entries; -}; - -static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; - -static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); -static PyCodeObject *__pyx_find_code_object(int code_line); -static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); - -/////////////// CodeObjectCache /////////////// -// Note that errors are simply ignored in the code below. -// This is just a cache, if a lookup or insertion fails - so what? - -static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { - int start = 0, mid = 0, end = count - 1; - if (end >= 0 && code_line > entries[end].code_line) { - return count; - } - while (start < end) { - mid = (start + end) / 2; - if (code_line < entries[mid].code_line) { - end = mid; - } else if (code_line > entries[mid].code_line) { - start = mid + 1; - } else { - return mid; - } - } - if (code_line <= entries[mid].code_line) { - return mid; - } else { - return mid + 1; - } -} - -static PyCodeObject *__pyx_find_code_object(int code_line) { - PyCodeObject* code_object; - int pos; - if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { - return NULL; - } - pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); - if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { - return NULL; - } - code_object = __pyx_code_cache.entries[pos].code_object; - Py_INCREF(code_object); - return code_object; -} - -static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - int pos, i; - __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; - if (unlikely(!code_line)) { - return; - } - if (unlikely(!entries)) { - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); - if (likely(entries)) { - __pyx_code_cache.entries = entries; - __pyx_code_cache.max_count = 64; - __pyx_code_cache.count = 1; - entries[0].code_line = code_line; - entries[0].code_object = code_object; - Py_INCREF(code_object); - } - return; - } - pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); - if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { - PyCodeObject* tmp = entries[pos].code_object; - entries[pos].code_object = code_object; - Py_DECREF(tmp); - return; - } - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( - __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } - __pyx_code_cache.entries = entries; - __pyx_code_cache.max_count = new_max; - } - for (i=__pyx_code_cache.count; i>pos; i--) { - entries[i] = entries[i-1]; - } - entries[pos].code_line = code_line; - entries[pos].code_object = code_object; - __pyx_code_cache.count++; - Py_INCREF(code_object); -} - -/////////////// CodeObjectCache.cleanup /////////////// - - if (__pyx_code_cache.entries) { - __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; - int i, count = __pyx_code_cache.count; - __pyx_code_cache.count = 0; - __pyx_code_cache.max_count = 0; - __pyx_code_cache.entries = NULL; - for (i=0; iSetupContext((name), __LINE__, __FILE__); \ - PyGILState_Release(__pyx_gilstate_save); \ - } else { \ - __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \ - } -#else - #define __Pyx_RefNannySetupContext(name, acquire_gil) \ - __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) -#endif - #define __Pyx_RefNannyFinishContext() \ - __Pyx_RefNanny->FinishContext(&__pyx_refnanny) - #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) - #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) - #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) - #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) - #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) - #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) - #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) - #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) -#else - #define __Pyx_RefNannyDeclarations - #define __Pyx_RefNannySetupContext(name, acquire_gil) - #define __Pyx_RefNannyFinishContext() - #define __Pyx_INCREF(r) Py_INCREF(r) - #define __Pyx_DECREF(r) Py_DECREF(r) - #define __Pyx_GOTREF(r) - #define __Pyx_GIVEREF(r) - #define __Pyx_XINCREF(r) Py_XINCREF(r) - #define __Pyx_XDECREF(r) Py_XDECREF(r) - #define __Pyx_XGOTREF(r) - #define __Pyx_XGIVEREF(r) -#endif /* CYTHON_REFNANNY */ - -#define __Pyx_XDECREF_SET(r, v) do { \ - PyObject *tmp = (PyObject *) r; \ - r = v; __Pyx_XDECREF(tmp); \ - } while (0) -#define __Pyx_DECREF_SET(r, v) do { \ - PyObject *tmp = (PyObject *) r; \ - r = v; __Pyx_DECREF(tmp); \ - } while (0) - -#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) -#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) - -/////////////// Refnanny /////////////// - -#if CYTHON_REFNANNY -static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { - PyObject *m = NULL, *p = NULL; - void *r = NULL; - m = PyImport_ImportModule((char *)modname); - if (!m) goto end; - p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); - if (!p) goto end; - r = PyLong_AsVoidPtr(p); -end: - Py_XDECREF(p); - Py_XDECREF(m); - return (__Pyx_RefNannyAPIStruct *)r; -} -#endif /* CYTHON_REFNANNY */ - -/////////////// RegisterModuleCleanup.proto /////////////// -//@substitute: naming - -static void ${cleanup_cname}(PyObject *self); /*proto*/ -static int __Pyx_RegisterCleanup(void); /*proto*/ - -/////////////// RegisterModuleCleanup /////////////// -//@substitute: naming -//@requires: ImportExport.c::ModuleImport - -#if PY_MAJOR_VERSION < 3 -static PyObject* ${cleanup_cname}_atexit(PyObject *module, CYTHON_UNUSED PyObject *unused) { - ${cleanup_cname}(module); - Py_INCREF(Py_None); return Py_None; -} - -static int __Pyx_RegisterCleanup(void) { - // Don't use Py_AtExit because that has a 32-call limit and is called - // after python finalization. - // Also, we try to prepend the cleanup function to "atexit._exithandlers" - // in Py2 because CPython runs them last-to-first. Being run last allows - // user exit code to run before us that may depend on the globals - // and cached objects that we are about to clean up. - - static PyMethodDef cleanup_def = { - __Pyx_NAMESTR("__cleanup"), (PyCFunction)${cleanup_cname}_atexit, METH_NOARGS, 0}; - - PyObject *cleanup_func = 0; - PyObject *atexit = 0; - PyObject *reg = 0; - PyObject *args = 0; - PyObject *res = 0; - int ret = -1; - - cleanup_func = PyCFunction_New(&cleanup_def, 0); - if (!cleanup_func) - goto bad; - - atexit = __Pyx_ImportModule("atexit"); - if (!atexit) - goto bad; - reg = __Pyx_GetAttrString(atexit, "_exithandlers"); - if (reg && PyList_Check(reg)) { - PyObject *a, *kw; - a = PyTuple_New(0); - kw = PyDict_New(); - if (!a || !kw) { - Py_XDECREF(a); - Py_XDECREF(kw); - goto bad; - } - args = PyTuple_Pack(3, cleanup_func, a, kw); - Py_DECREF(a); - Py_DECREF(kw); - if (!args) - goto bad; - ret = PyList_Insert(reg, 0, args); - } else { - if (!reg) - PyErr_Clear(); - Py_XDECREF(reg); - reg = __Pyx_GetAttrString(atexit, "register"); - if (!reg) - goto bad; - args = PyTuple_Pack(1, cleanup_func); - if (!args) - goto bad; - res = PyObject_CallObject(reg, args); - if (!res) - goto bad; - ret = 0; - } -bad: - Py_XDECREF(cleanup_func); - Py_XDECREF(atexit); - Py_XDECREF(reg); - Py_XDECREF(args); - Py_XDECREF(res); - return ret; -} -#else -// fake call purely to work around "unused function" warning for __Pyx_ImportModule() -static int __Pyx_RegisterCleanup(void) { - if (0) __Pyx_ImportModule(NULL); - return 0; -} -#endif diff --git a/third_party/cython/src/Cython/Utility/ObjectHandling.c b/third_party/cython/src/Cython/Utility/ObjectHandling.c deleted file mode 100644 index e20fc9ba5c56b..0000000000000 --- a/third_party/cython/src/Cython/Utility/ObjectHandling.c +++ /dev/null @@ -1,1162 +0,0 @@ -/* - * General object operations and protocol implementations, - * including their specialisations for certain builtins. - * - * Optional optimisations for builtins are in Optimize.c. - * - * Required replacements of builtins are in Builtins.c. - */ - -/////////////// RaiseNoneIterError.proto /////////////// - -static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); - -/////////////// RaiseNoneIterError /////////////// - -static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -} - -/////////////// RaiseTooManyValuesToUnpack.proto /////////////// - -static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); - -/////////////// RaiseTooManyValuesToUnpack /////////////// - -static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { - PyErr_Format(PyExc_ValueError, - "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); -} - -/////////////// RaiseNeedMoreValuesToUnpack.proto /////////////// - -static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); - -/////////////// RaiseNeedMoreValuesToUnpack /////////////// - -static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { - PyErr_Format(PyExc_ValueError, - "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", - index, (index == 1) ? "" : "s"); -} - -/////////////// UnpackTupleError.proto /////////////// - -static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/ - -/////////////// UnpackTupleError /////////////// -//@requires: RaiseNoneIterError -//@requires: RaiseNeedMoreValuesToUnpack -//@requires: RaiseTooManyValuesToUnpack - -static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { - if (t == Py_None) { - __Pyx_RaiseNoneNotIterableError(); - } else if (PyTuple_GET_SIZE(t) < index) { - __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); - } else { - __Pyx_RaiseTooManyValuesError(index); - } -} - -/////////////// UnpackItemEndCheck.proto /////////////// - -static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ - -/////////////// UnpackItemEndCheck /////////////// -//@requires: RaiseTooManyValuesToUnpack -//@requires: IterFinish - -static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { - if (unlikely(retval)) { - Py_DECREF(retval); - __Pyx_RaiseTooManyValuesError(expected); - return -1; - } else { - return __Pyx_IterFinish(); - } - return 0; -} - -/////////////// UnpackTuple2.proto /////////////// - -static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2, - int is_tuple, int has_known_size, int decref_tuple); - -/////////////// UnpackTuple2 /////////////// -//@requires: UnpackItemEndCheck -//@requires: UnpackTupleError -//@requires: RaiseNeedMoreValuesToUnpack - -static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, - int is_tuple, int has_known_size, int decref_tuple) { - Py_ssize_t index; - PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; - if (!is_tuple && unlikely(!PyTuple_Check(tuple))) { - iternextfunc iternext; - iter = PyObject_GetIter(tuple); - if (unlikely(!iter)) goto bad; - if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } - iternext = Py_TYPE(iter)->tp_iternext; - value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } - value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } - if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; - Py_DECREF(iter); - } else { - if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) { - __Pyx_UnpackTupleError(tuple, 2); - goto bad; - } -#if CYTHON_COMPILING_IN_PYPY - value1 = PySequence_ITEM(tuple, 0); - if (unlikely(!value1)) goto bad; - value2 = PySequence_ITEM(tuple, 1); - if (unlikely(!value2)) goto bad; -#else - value1 = PyTuple_GET_ITEM(tuple, 0); - value2 = PyTuple_GET_ITEM(tuple, 1); - Py_INCREF(value1); - Py_INCREF(value2); -#endif - if (decref_tuple) { Py_DECREF(tuple); } - } - *pvalue1 = value1; - *pvalue2 = value2; - return 0; -unpacking_failed: - if (!has_known_size && __Pyx_IterFinish() == 0) - __Pyx_RaiseNeedMoreValuesError(index); -bad: - Py_XDECREF(iter); - Py_XDECREF(value1); - Py_XDECREF(value2); - if (decref_tuple) { Py_XDECREF(tuple); } - return -1; -} - -/////////////// IterNext.proto /////////////// - -#define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL) -static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *); /*proto*/ - -/////////////// IterNext /////////////// - -// originally copied from Py3's builtin_next() -static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) { - PyObject* next; - iternextfunc iternext = Py_TYPE(iterator)->tp_iternext; -#if CYTHON_COMPILING_IN_CPYTHON - if (unlikely(!iternext)) { -#else - if (unlikely(!iternext) || unlikely(!PyIter_Check(iterator))) { -#endif - PyErr_Format(PyExc_TypeError, - "%.200s object is not an iterator", Py_TYPE(iterator)->tp_name); - return NULL; - } - next = iternext(iterator); - if (likely(next)) - return next; -#if CYTHON_COMPILING_IN_CPYTHON -#if PY_VERSION_HEX >= 0x03010000 || (PY_MAJOR_VERSION < 3 && PY_VERSION_HEX >= 0x02070000) - if (unlikely(iternext == &_PyObject_NextNotImplemented)) - return NULL; -#endif -#endif - if (defval) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (unlikely(exc_type != PyExc_StopIteration) && - !PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) - return NULL; - PyErr_Clear(); - } - Py_INCREF(defval); - return defval; - } - if (!PyErr_Occurred()) - PyErr_SetNone(PyExc_StopIteration); - return NULL; -} - -/////////////// IterFinish.proto /////////////// - -static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ - -/////////////// IterFinish /////////////// - -// When PyIter_Next(iter) has returned NULL in order to signal termination, -// this function does the right cleanup and returns 0 on success. If it -// detects an error that occurred in the iterator, it returns -1. - -static CYTHON_INLINE int __Pyx_IterFinish(void) { -#if CYTHON_COMPILING_IN_CPYTHON - PyThreadState *tstate = PyThreadState_GET(); - PyObject* exc_type = tstate->curexc_type; - if (unlikely(exc_type)) { - if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { - PyObject *exc_value, *exc_tb; - exc_value = tstate->curexc_value; - exc_tb = tstate->curexc_traceback; - tstate->curexc_type = 0; - tstate->curexc_value = 0; - tstate->curexc_traceback = 0; - Py_DECREF(exc_type); - Py_XDECREF(exc_value); - Py_XDECREF(exc_tb); - return 0; - } else { - return -1; - } - } - return 0; -#else - if (unlikely(PyErr_Occurred())) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { - PyErr_Clear(); - return 0; - } else { - return -1; - } - } - return 0; -#endif -} - -/////////////// DictGetItem.proto /////////////// - -#if PY_MAJOR_VERSION >= 3 -static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { - PyObject *value; - value = PyDict_GetItemWithError(d, key); - if (unlikely(!value)) { - if (!PyErr_Occurred()) { - PyObject* args = PyTuple_Pack(1, key); - if (likely(args)) - PyErr_SetObject(PyExc_KeyError, args); - Py_XDECREF(args); - } - return NULL; - } - Py_INCREF(value); - return value; -} -#else - #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) -#endif - -/////////////// GetItemInt.proto /////////////// - -#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ - __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \ - (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i)))) - -{{for type in ['List', 'Tuple']}} -#define __Pyx_GetItemInt_{{type}}(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ - __Pyx_GetItemInt_{{type}}_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ - (PyErr_SetString(PyExc_IndexError, "{{ type.lower() }} index out of range"), (PyObject*)NULL)) - -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_{{type}}_Fast(PyObject *o, Py_ssize_t i, - int wraparound, int boundscheck); -{{endfor}} - -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, - int is_list, int wraparound, int boundscheck); - -/////////////// GetItemInt /////////////// - -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { - PyObject *r; - if (!j) return NULL; - r = PyObject_GetItem(o, j); - Py_DECREF(j); - return r; -} - -{{for type in ['List', 'Tuple']}} -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_{{type}}_Fast(PyObject *o, Py_ssize_t i, - int wraparound, int boundscheck) { -#if CYTHON_COMPILING_IN_CPYTHON - if (wraparound & unlikely(i < 0)) i += Py{{type}}_GET_SIZE(o); - if ((!boundscheck) || likely((0 <= i) & (i < Py{{type}}_GET_SIZE(o)))) { - PyObject *r = Py{{type}}_GET_ITEM(o, i); - Py_INCREF(r); - return r; - } - return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -#else - return PySequence_GetItem(o, i); -#endif -} -{{endfor}} - -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, - int is_list, int wraparound, int boundscheck) { -#if CYTHON_COMPILING_IN_CPYTHON - if (is_list || PyList_CheckExact(o)) { - Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); - if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { - PyObject *r = PyList_GET_ITEM(o, n); - Py_INCREF(r); - return r; - } - } - else if (PyTuple_CheckExact(o)) { - Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); - if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, n); - Py_INCREF(r); - return r; - } - } else { - // inlined PySequence_GetItem() + special cased length overflow - PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; - if (likely(m && m->sq_item)) { - if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { - Py_ssize_t l = m->sq_length(o); - if (likely(l >= 0)) { - i += l; - } else { - // if length > max(Py_ssize_t), maybe the object can wrap around itself? - if (PyErr_ExceptionMatches(PyExc_OverflowError)) - PyErr_Clear(); - else - return NULL; - } - } - return m->sq_item(o, i); - } - } -#else - if (is_list || PySequence_Check(o)) { - return PySequence_GetItem(o, i); - } -#endif - return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -} - -/////////////// SetItemInt.proto /////////////// - -#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ - __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) : \ - (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \ - __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) - -static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); -static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, - int is_list, int wraparound, int boundscheck); - -/////////////// SetItemInt /////////////// - -static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { - int r; - if (!j) return -1; - r = PyObject_SetItem(o, j, v); - Py_DECREF(j); - return r; -} - -static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, - int is_list, int wraparound, int boundscheck) { -#if CYTHON_COMPILING_IN_CPYTHON - if (is_list || PyList_CheckExact(o)) { - Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); - if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { - PyObject* old = PyList_GET_ITEM(o, n); - Py_INCREF(v); - PyList_SET_ITEM(o, n, v); - Py_DECREF(old); - return 1; - } - } else { - // inlined PySequence_SetItem() + special cased length overflow - PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; - if (likely(m && m->sq_ass_item)) { - if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { - Py_ssize_t l = m->sq_length(o); - if (likely(l >= 0)) { - i += l; - } else { - // if length > max(Py_ssize_t), maybe the object can wrap around itself? - if (PyErr_ExceptionMatches(PyExc_OverflowError)) - PyErr_Clear(); - else - return -1; - } - } - return m->sq_ass_item(o, i, v); - } - } -#else -#if CYTHON_COMPILING_IN_PYPY - if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) { -#else - if (is_list || PySequence_Check(o)) { -#endif - return PySequence_SetItem(o, i, v); - } -#endif - return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); -} - - -/////////////// DelItemInt.proto /////////////// - -#define __Pyx_DelItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ - __Pyx_DelItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound) : \ - (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \ - __Pyx_DelItem_Generic(o, to_py_func(i)))) - -static CYTHON_INLINE int __Pyx_DelItem_Generic(PyObject *o, PyObject *j); -static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i, - CYTHON_UNUSED int is_list, int wraparound); - -/////////////// DelItemInt /////////////// - -static CYTHON_INLINE int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) { - int r; - if (!j) return -1; - r = PyObject_DelItem(o, j); - Py_DECREF(j); - return r; -} - -static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i, - CYTHON_UNUSED int is_list, int wraparound) { -#if CYTHON_COMPILING_IN_PYPY - if (is_list || PySequence_Check(o)) { - return PySequence_DelItem(o, i); - } -#else - // inlined PySequence_DelItem() + special cased length overflow - PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; - if (likely(m && m->sq_ass_item)) { - if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { - Py_ssize_t l = m->sq_length(o); - if (likely(l >= 0)) { - i += l; - } else { - // if length > max(Py_ssize_t), maybe the object can wrap around itself? - if (PyErr_ExceptionMatches(PyExc_OverflowError)) - PyErr_Clear(); - else - return -1; - } - } - return m->sq_ass_item(o, i, (PyObject *)NULL); - } -#endif - return __Pyx_DelItem_Generic(o, PyInt_FromSsize_t(i)); -} - - -/////////////// SliceObject.proto /////////////// - -// we pass pointer addresses to show the C compiler what is NULL and what isn't -{{if access == 'Get'}} -static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( - PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, - PyObject** py_start, PyObject** py_stop, PyObject** py_slice, - int has_cstart, int has_cstop, int wraparound); -{{else}} -#define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) \ - __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) - -// we pass pointer addresses to show the C compiler what is NULL and what isn't -static CYTHON_INLINE int __Pyx_PyObject_SetSlice( - PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, - PyObject** py_start, PyObject** py_stop, PyObject** py_slice, - int has_cstart, int has_cstop, int wraparound); -{{endif}} - -/////////////// SliceObject /////////////// - -{{if access == 'Get'}} -static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( - PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, -{{else}} -static CYTHON_INLINE int __Pyx_PyObject_SetSlice( - PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, -{{endif}} - PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, - int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { -#if CYTHON_COMPILING_IN_CPYTHON - PyMappingMethods* mp; -#if PY_MAJOR_VERSION < 3 - PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; - if (likely(ms && ms->sq_{{if access == 'Set'}}ass_{{endif}}slice)) { - if (!has_cstart) { - if (_py_start && (*_py_start != Py_None)) { - cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); - if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; - } else - cstart = 0; - } - if (!has_cstop) { - if (_py_stop && (*_py_stop != Py_None)) { - cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); - if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; - } else - cstop = PY_SSIZE_T_MAX; - } - if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { - Py_ssize_t l = ms->sq_length(obj); - if (likely(l >= 0)) { - if (cstop < 0) { - cstop += l; - if (cstop < 0) cstop = 0; - } - if (cstart < 0) { - cstart += l; - if (cstart < 0) cstart = 0; - } - } else { - // if length > max(Py_ssize_t), maybe the object can wrap around itself? - if (PyErr_ExceptionMatches(PyExc_OverflowError)) - PyErr_Clear(); - else - goto bad; - } - } -{{if access == 'Get'}} - return ms->sq_slice(obj, cstart, cstop); -{{else}} - return ms->sq_ass_slice(obj, cstart, cstop, value); -{{endif}} - } -#endif - - mp = Py_TYPE(obj)->tp_as_mapping; -{{if access == 'Get'}} - if (likely(mp && mp->mp_subscript)) -{{else}} - if (likely(mp && mp->mp_ass_subscript)) -{{endif}} -#endif - { - {{if access == 'Get'}}PyObject*{{else}}int{{endif}} result; - PyObject *py_slice, *py_start, *py_stop; - if (_py_slice) { - py_slice = *_py_slice; - } else { - PyObject* owned_start = NULL; - PyObject* owned_stop = NULL; - if (_py_start) { - py_start = *_py_start; - } else { - if (has_cstart) { - owned_start = py_start = PyInt_FromSsize_t(cstart); - if (unlikely(!py_start)) goto bad; - } else - py_start = Py_None; - } - if (_py_stop) { - py_stop = *_py_stop; - } else { - if (has_cstop) { - owned_stop = py_stop = PyInt_FromSsize_t(cstop); - if (unlikely(!py_stop)) { - Py_XDECREF(owned_start); - goto bad; - } - } else - py_stop = Py_None; - } - py_slice = PySlice_New(py_start, py_stop, Py_None); - Py_XDECREF(owned_start); - Py_XDECREF(owned_stop); - if (unlikely(!py_slice)) goto bad; - } -#if CYTHON_COMPILING_IN_CPYTHON -{{if access == 'Get'}} - result = mp->mp_subscript(obj, py_slice); -#else - result = PyObject_GetItem(obj, py_slice); -{{else}} - result = mp->mp_ass_subscript(obj, py_slice, value); -#else - result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice); -{{endif}} -#endif - if (!_py_slice) { - Py_DECREF(py_slice); - } - return result; - } - PyErr_Format(PyExc_TypeError, -{{if access == 'Get'}} - "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); -{{else}} - "'%.200s' object does not support slice %.10s", - Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion"); -{{endif}} - -bad: - return {{if access == 'Get'}}NULL{{else}}-1{{endif}}; -} - - -/////////////// SliceTupleAndList.proto /////////////// - -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); -static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); -#else -#define __Pyx_PyList_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) -#define __Pyx_PyTuple_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) -#endif - -/////////////// SliceTupleAndList /////////////// - -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) { - Py_ssize_t start = *_start, stop = *_stop, length = *_length; - if (start < 0) { - start += length; - if (start < 0) - start = 0; - } - - if (stop < 0) - stop += length; - else if (stop > length) - stop = length; - - *_length = stop - start; - *_start = start; - *_stop = stop; -} - -static CYTHON_INLINE void __Pyx_copy_object_array(PyObject** CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { - PyObject *v; - Py_ssize_t i; - for (i = 0; i < length; i++) { - v = dest[i] = src[i]; - Py_INCREF(v); - } -} - -{{for type in ['List', 'Tuple']}} -static CYTHON_INLINE PyObject* __Pyx_Py{{type}}_GetSlice( - PyObject* src, Py_ssize_t start, Py_ssize_t stop) { - PyObject* dest; - Py_ssize_t length = Py{{type}}_GET_SIZE(src); - __Pyx_crop_slice(&start, &stop, &length); - if (unlikely(length <= 0)) - return Py{{type}}_New(0); - - dest = Py{{type}}_New(length); - if (unlikely(!dest)) - return NULL; - __Pyx_copy_object_array( - ((Py{{type}}Object*)src)->ob_item + start, - ((Py{{type}}Object*)dest)->ob_item, - length); - return dest; -} -{{endfor}} -#endif - - -/////////////// CalculateMetaclass.proto /////////////// - -static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); - -/////////////// CalculateMetaclass /////////////// - -static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { - Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); - for (i=0; i < nbases; i++) { - PyTypeObject *tmptype; - PyObject *tmp = PyTuple_GET_ITEM(bases, i); - tmptype = Py_TYPE(tmp); -#if PY_MAJOR_VERSION < 3 - if (tmptype == &PyClass_Type) - continue; -#endif - if (!metaclass) { - metaclass = tmptype; - continue; - } - if (PyType_IsSubtype(metaclass, tmptype)) - continue; - if (PyType_IsSubtype(tmptype, metaclass)) { - metaclass = tmptype; - continue; - } - // else: - PyErr_SetString(PyExc_TypeError, - "metaclass conflict: " - "the metaclass of a derived class " - "must be a (non-strict) subclass " - "of the metaclasses of all its bases"); - return NULL; - } - if (!metaclass) { -#if PY_MAJOR_VERSION < 3 - metaclass = &PyClass_Type; -#else - metaclass = &PyType_Type; -#endif - } - // make owned reference - Py_INCREF((PyObject*) metaclass); - return (PyObject*) metaclass; -} - - -/////////////// FindInheritedMetaclass.proto /////////////// - -static PyObject *__Pyx_FindInheritedMetaclass(PyObject *bases); /*proto*/ - -/////////////// FindInheritedMetaclass /////////////// -//@requires: PyObjectGetAttrStr -//@requires: CalculateMetaclass - -static PyObject *__Pyx_FindInheritedMetaclass(PyObject *bases) { - PyObject *metaclass; - if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { - PyTypeObject *metatype; - PyObject *base = PyTuple_GET_ITEM(bases, 0); -#if PY_MAJOR_VERSION < 3 - PyObject* basetype = __Pyx_PyObject_GetAttrStr(base, PYIDENT("__class__")); - if (basetype) { - metatype = (PyType_Check(basetype)) ? ((PyTypeObject*) basetype) : NULL; - } else { - PyErr_Clear(); - metatype = Py_TYPE(base); - basetype = (PyObject*) metatype; - Py_INCREF(basetype); - } -#else - metatype = Py_TYPE(base); -#endif - metaclass = __Pyx_CalculateMetaclass(metatype, bases); -#if PY_MAJOR_VERSION < 3 - Py_DECREF(basetype); -#endif - } else { - // no bases => use default metaclass -#if PY_MAJOR_VERSION < 3 - metaclass = (PyObject *) &PyClass_Type; -#else - metaclass = (PyObject *) &PyType_Type; -#endif - Py_INCREF(metaclass); - } - return metaclass; -} - -/////////////// Py3MetaclassGet.proto /////////////// - -static PyObject *__Pyx_Py3MetaclassGet(PyObject *bases, PyObject *mkw); /*proto*/ - -/////////////// Py3MetaclassGet /////////////// -//@requires: FindInheritedMetaclass -//@requires: CalculateMetaclass - -static PyObject *__Pyx_Py3MetaclassGet(PyObject *bases, PyObject *mkw) { - PyObject *metaclass = PyDict_GetItem(mkw, PYIDENT("metaclass")); - if (metaclass) { - Py_INCREF(metaclass); - if (PyDict_DelItem(mkw, PYIDENT("metaclass")) < 0) { - Py_DECREF(metaclass); - return NULL; - } - if (PyType_Check(metaclass)) { - PyObject* orig = metaclass; - metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); - Py_DECREF(orig); - } - return metaclass; - } - return __Pyx_FindInheritedMetaclass(bases); -} - -/////////////// CreateClass.proto /////////////// - -static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, - PyObject *qualname, PyObject *modname); /*proto*/ - -/////////////// CreateClass /////////////// -//@requires: FindInheritedMetaclass -//@requires: CalculateMetaclass - -static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, - PyObject *qualname, PyObject *modname) { - PyObject *result; - PyObject *metaclass; - - if (PyDict_SetItem(dict, PYIDENT("__module__"), modname) < 0) - return NULL; - if (PyDict_SetItem(dict, PYIDENT("__qualname__"), qualname) < 0) - return NULL; - - /* Python2 __metaclass__ */ - metaclass = PyDict_GetItem(dict, PYIDENT("__metaclass__")); - if (metaclass) { - Py_INCREF(metaclass); - if (PyType_Check(metaclass)) { - PyObject* orig = metaclass; - metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); - Py_DECREF(orig); - } - } else { - metaclass = __Pyx_FindInheritedMetaclass(bases); - } - if (unlikely(!metaclass)) - return NULL; - result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL); - Py_DECREF(metaclass); - return result; -} - -/////////////// Py3ClassCreate.proto /////////////// - -static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, - PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/ -static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, - PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /*proto*/ - -/////////////// Py3ClassCreate /////////////// -//@requires: PyObjectGetAttrStr -//@requires: CalculateMetaclass - -static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, - PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { - PyObject *ns; - if (metaclass) { - PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, PYIDENT("__prepare__")); - if (prep) { - PyObject *pargs = PyTuple_Pack(2, name, bases); - if (unlikely(!pargs)) { - Py_DECREF(prep); - return NULL; - } - ns = PyObject_Call(prep, pargs, mkw); - Py_DECREF(prep); - Py_DECREF(pargs); - } else { - if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) - return NULL; - PyErr_Clear(); - ns = PyDict_New(); - } - } else { - ns = PyDict_New(); - } - - if (unlikely(!ns)) - return NULL; - - /* Required here to emulate assignment order */ - if (unlikely(PyObject_SetItem(ns, PYIDENT("__module__"), modname) < 0)) goto bad; - if (unlikely(PyObject_SetItem(ns, PYIDENT("__qualname__"), qualname) < 0)) goto bad; - if (unlikely(doc && PyObject_SetItem(ns, PYIDENT("__doc__"), doc) < 0)) goto bad; - return ns; -bad: - Py_DECREF(ns); - return NULL; -} - -static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, - PyObject *dict, PyObject *mkw, - int calculate_metaclass, int allow_py2_metaclass) { - PyObject *result, *margs; - PyObject *owned_metaclass = NULL; - if (allow_py2_metaclass) { - /* honour Python2 __metaclass__ for backward compatibility */ - owned_metaclass = PyObject_GetItem(dict, PYIDENT("__metaclass__")); - if (owned_metaclass) { - metaclass = owned_metaclass; - } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { - PyErr_Clear(); - } else { - return NULL; - } - } - if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { - metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); - Py_XDECREF(owned_metaclass); - if (unlikely(!metaclass)) - return NULL; - owned_metaclass = metaclass; - } - margs = PyTuple_Pack(3, name, bases, dict); - if (unlikely(!margs)) { - result = NULL; - } else { - result = PyObject_Call(metaclass, margs, mkw); - Py_DECREF(margs); - } - Py_XDECREF(owned_metaclass); - return result; -} - -/////////////// ExtTypeTest.proto /////////////// - -static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ - -/////////////// ExtTypeTest /////////////// - -static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { - if (unlikely(!type)) { - PyErr_SetString(PyExc_SystemError, "Missing type object"); - return 0; - } - if (likely(PyObject_TypeCheck(obj, type))) - return 1; - PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", - Py_TYPE(obj)->tp_name, type->tp_name); - return 0; -} - -/////////////// CallableCheck.proto /////////////// - -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#define __Pyx_PyCallable_Check(obj) ((obj)->ob_type->tp_call != NULL) -#else -#define __Pyx_PyCallable_Check(obj) PyCallable_Check(obj) -#endif - -/////////////// PyDictContains.proto /////////////// - -static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) { - int result = PyDict_Contains(dict, item); - return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); -} - -/////////////// PySequenceContains.proto /////////////// - -static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) { - int result = PySequence_Contains(seq, item); - return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); -} - -/////////////// PyBoolOrNullFromLong.proto /////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) { - return unlikely(b < 0) ? NULL : __Pyx_PyBool_FromLong(b); -} - -/////////////// GetBuiltinName.proto /////////////// - -static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ - -/////////////// GetBuiltinName /////////////// -//@requires: PyObjectGetAttrStr -//@substitute: naming - -static PyObject *__Pyx_GetBuiltinName(PyObject *name) { - PyObject* result = __Pyx_PyObject_GetAttrStr($builtins_cname, name); - if (unlikely(!result)) { - PyErr_Format(PyExc_NameError, -#if PY_MAJOR_VERSION >= 3 - "name '%U' is not defined", name); -#else - "name '%.200s' is not defined", PyString_AS_STRING(name)); -#endif - } - return result; -} - -/////////////// GetNameInClass.proto /////////////// - -static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name); /*proto*/ - -/////////////// GetNameInClass /////////////// -//@requires: PyObjectGetAttrStr -//@requires: GetModuleGlobalName - -static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name) { - PyObject *result; - result = __Pyx_PyObject_GetAttrStr(nmspace, name); - if (!result) - result = __Pyx_GetModuleGlobalName(name); - return result; -} - -/////////////// GetModuleGlobalName.proto /////////////// - -static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ - -/////////////// GetModuleGlobalName /////////////// -//@requires: GetBuiltinName -//@substitute: naming - -static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { - PyObject *result; -#if CYTHON_COMPILING_IN_CPYTHON - result = PyDict_GetItem($moddict_cname, name); - if (result) { - Py_INCREF(result); - } else { -#else - result = PyObject_GetItem($moddict_cname, name); - if (!result) { - PyErr_Clear(); -#endif - result = __Pyx_GetBuiltinName(name); - } - return result; -} - -//////////////////// GetAttr.proto //////////////////// - -static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /*proto*/ - -//////////////////// GetAttr //////////////////// -//@requires: PyObjectGetAttrStr - -static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { -#if CYTHON_COMPILING_IN_CPYTHON -#if PY_MAJOR_VERSION >= 3 - if (likely(PyUnicode_Check(n))) -#else - if (likely(PyString_Check(n))) -#endif - return __Pyx_PyObject_GetAttrStr(o, n); -#endif - return PyObject_GetAttr(o, n); -} - -/////////////// PyObjectLookupSpecial.proto /////////////// -//@requires: PyObjectGetAttrStr - -#if CYTHON_COMPILING_IN_CPYTHON && (PY_VERSION_HEX >= 0x03020000 || PY_MAJOR_VERSION < 3 && PY_VERSION_HEX >= 0x02070000) -// looks like calling _PyType_Lookup() isn't safe in Py<=2.6/3.1 -static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) { - PyObject *res; - PyTypeObject *tp = Py_TYPE(obj); -#if PY_MAJOR_VERSION < 3 - if (unlikely(PyInstance_Check(obj))) - return __Pyx_PyObject_GetAttrStr(obj, attr_name); -#endif - // adapted from CPython's special_lookup() in ceval.c - res = _PyType_Lookup(tp, attr_name); - if (likely(res)) { - descrgetfunc f = Py_TYPE(res)->tp_descr_get; - if (!f) { - Py_INCREF(res); - } else { - res = f(res, obj, (PyObject *)tp); - } - } else { - PyErr_SetObject(PyExc_AttributeError, attr_name); - } - return res; -} -#else -#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) -#endif - -/////////////// PyObjectGetAttrStr.proto /////////////// - -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { - PyTypeObject* tp = Py_TYPE(obj); - if (likely(tp->tp_getattro)) - return tp->tp_getattro(obj, attr_name); -#if PY_MAJOR_VERSION < 3 - if (likely(tp->tp_getattr)) - return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); -#endif - return PyObject_GetAttr(obj, attr_name); -} -#else -#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) -#endif - -/////////////// PyObjectSetAttrStr.proto /////////////// - -#if CYTHON_COMPILING_IN_CPYTHON -#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL) -static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { - PyTypeObject* tp = Py_TYPE(obj); - if (likely(tp->tp_setattro)) - return tp->tp_setattro(obj, attr_name, value); -#if PY_MAJOR_VERSION < 3 - if (likely(tp->tp_setattr)) - return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); -#endif - return PyObject_SetAttr(obj, attr_name, value); -} -#else -#define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) -#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) -#endif - -/////////////// PyObjectCallMethod.proto /////////////// -//@requires: PyObjectGetAttrStr -//@requires: PyObjectCall -//@substitute: naming - -static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) { - PyObject *method, *result = NULL; - if (unlikely(!args)) return NULL; - method = __Pyx_PyObject_GetAttrStr(obj, method_name); - if (unlikely(!method)) goto bad; - result = __Pyx_PyObject_Call(method, args, NULL); - Py_DECREF(method); -bad: - Py_DECREF(args); - return result; -} - -#define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \ - __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3)) -#define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \ - __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2)) -#define __Pyx_PyObject_CallMethod1(obj, name, arg1) \ - __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1)) -#define __Pyx_PyObject_CallMethod0(obj, name) \ - __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF($empty_tuple), $empty_tuple)) - - -/////////////// tp_new.proto /////////////// - -#define __Pyx_tp_new(type_obj, args) __Pyx_tp_new_kwargs(type_obj, args, NULL) -static CYTHON_INLINE PyObject* __Pyx_tp_new_kwargs(PyObject* type_obj, PyObject* args, PyObject* kwargs) { - return (PyObject*) (((PyTypeObject*)type_obj)->tp_new((PyTypeObject*)type_obj, args, kwargs)); -} - - -/////////////// PyObjectCall.proto /////////////// - -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/ -#else -#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) -#endif - -/////////////// PyObjectCall /////////////// - -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; - ternaryfunc call = func->ob_type->tp_call; - - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); -#if PY_VERSION_HEX >= 0x02060000 - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) - return NULL; -#endif - result = (*call)(func, arg, kw); -#if PY_VERSION_HEX >= 0x02060000 - Py_LeaveRecursiveCall(); -#endif - if (unlikely(!result) && unlikely(!PyErr_Occurred())) { - PyErr_SetString( - PyExc_SystemError, - "NULL result without error in PyObject_Call"); - } - return result; -} -#endif diff --git a/third_party/cython/src/Cython/Utility/Optimize.c b/third_party/cython/src/Cython/Utility/Optimize.c deleted file mode 100644 index a6a776e67b034..0000000000000 --- a/third_party/cython/src/Cython/Utility/Optimize.c +++ /dev/null @@ -1,423 +0,0 @@ -/* - * Optional optimisations of built-in functions and methods. - * - * Required replacements of builtins are in Builtins.c. - * - * General object operations and protocols are in ObjectHandling.c. - */ - -/////////////// append.proto /////////////// - -static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/ - -/////////////// append /////////////// -//@requires: ListAppend -//@requires: ObjectHandling.c::PyObjectCallMethod - -static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { - if (likely(PyList_CheckExact(L))) { - if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; - } else { - PyObject* retval = __Pyx_PyObject_CallMethod1(L, PYIDENT("append"), x); - if (unlikely(!retval)) - return -1; - Py_DECREF(retval); - } - return 0; -} - -/////////////// ListAppend.proto /////////////// - -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { - PyListObject* L = (PyListObject*) list; - Py_ssize_t len = Py_SIZE(list); - if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { - Py_INCREF(x); - PyList_SET_ITEM(list, len, x); - Py_SIZE(list) = len+1; - return 0; - } - return PyList_Append(list, x); -} -#else -#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) -#endif - -/////////////// ListCompAppend.proto /////////////// - -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { - PyListObject* L = (PyListObject*) list; - Py_ssize_t len = Py_SIZE(list); - if (likely(L->allocated > len)) { - Py_INCREF(x); - PyList_SET_ITEM(list, len, x); - Py_SIZE(list) = len+1; - return 0; - } - return PyList_Append(list, x); -} -#else -#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) -#endif - -//////////////////// ListExtend.proto //////////////////// - -static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) { -#if CYTHON_COMPILING_IN_CPYTHON - PyObject* none = _PyList_Extend((PyListObject*)L, v); - if (unlikely(!none)) - return -1; - Py_DECREF(none); - return 0; -#else - return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v); -#endif -} - -/////////////// pop.proto /////////////// - -#define __Pyx_PyObject_Pop(L) (PyList_CheckExact(L) ? \ - __Pyx_PyList_Pop(L) : __Pyx__PyObject_Pop(L)) - -static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L); /*proto*/ -static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L); /*proto*/ - -/////////////// pop /////////////// -//@requires: ObjectHandling.c::PyObjectCallMethod - -static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L) { -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02050000 - if (Py_TYPE(L) == &PySet_Type) { - return PySet_Pop(L); - } -#endif - return __Pyx_PyObject_CallMethod0(L, PYIDENT("pop")); -} - -static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L) { -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02040000 - /* Check that both the size is positive and no reallocation shrinking needs to be done. */ - if (likely(PyList_GET_SIZE(L) > (((PyListObject*)L)->allocated >> 1))) { - Py_SIZE(L) -= 1; - return PyList_GET_ITEM(L, PyList_GET_SIZE(L)); - } -#endif - return __Pyx_PyObject_CallMethod0(L, PYIDENT("pop")); -} - - -/////////////// pop_index.proto /////////////// - -#define __Pyx_PyObject_PopIndex(L, ix) (PyList_CheckExact(L) ? \ - __Pyx_PyList_PopIndex(L, ix) : __Pyx__PyObject_PopIndex(L, ix)) - -static PyObject* __Pyx_PyList_PopIndex(PyObject* L, Py_ssize_t ix); /*proto*/ -static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, Py_ssize_t ix); /*proto*/ - -/////////////// pop_index /////////////// -//@requires: ObjectHandling.c::PyObjectCallMethod - -static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, Py_ssize_t ix) { - PyObject *r, *py_ix; - py_ix = PyInt_FromSsize_t(ix); - if (!py_ix) return NULL; - r = __Pyx_PyObject_CallMethod1(L, PYIDENT("pop"), py_ix); - Py_DECREF(py_ix); - return r; -} - -static PyObject* __Pyx_PyList_PopIndex(PyObject* L, Py_ssize_t ix) { -#if CYTHON_COMPILING_IN_CPYTHON - Py_ssize_t size = PyList_GET_SIZE(L); - if (likely(size > (((PyListObject*)L)->allocated >> 1))) { - Py_ssize_t cix = ix; - if (cix < 0) { - cix += size; - } - if (likely(0 <= cix && cix < size)) { - PyObject* v = PyList_GET_ITEM(L, cix); - Py_SIZE(L) -= 1; - size -= 1; - memmove(&PyList_GET_ITEM(L, cix), &PyList_GET_ITEM(L, cix+1), (size_t)(size-cix)*sizeof(PyObject*)); - return v; - } - } -#endif - return __Pyx__PyObject_PopIndex(L, ix); -} - - -/////////////// dict_getitem_default.proto /////////////// - -static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); /*proto*/ - -/////////////// dict_getitem_default /////////////// - -static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { - PyObject* value; -#if PY_MAJOR_VERSION >= 3 - value = PyDict_GetItemWithError(d, key); - if (unlikely(!value)) { - if (unlikely(PyErr_Occurred())) - return NULL; - value = default_value; - } - Py_INCREF(value); -#else - if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) { - /* these presumably have safe hash functions */ - value = PyDict_GetItem(d, key); - if (unlikely(!value)) { - value = default_value; - } - Py_INCREF(value); - } else { - if (default_value == Py_None) - default_value = NULL; - value = PyObject_CallMethodObjArgs( - d, PYIDENT("get"), key, default_value, NULL); - } -#endif - return value; -} - - -/////////////// dict_setdefault.proto /////////////// - -static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type); /*proto*/ - -/////////////// dict_setdefault /////////////// -//@requires: ObjectHandling.c::PyObjectCallMethod - -static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, - CYTHON_UNUSED int is_safe_type) { - PyObject* value; -#if PY_VERSION_HEX >= 0x030400A0 - // we keep the method call at the end to avoid "unused" C compiler warnings - if (1) { - value = PyDict_SetDefault(d, key, default_value); - if (unlikely(!value)) return NULL; - Py_INCREF(value); -#else - if (is_safe_type == 1 || (is_safe_type == -1 && - /* the following builtins presumably have repeatably safe and fast hash functions */ -#if PY_MAJOR_VERSION >= 3 - (PyUnicode_CheckExact(key) || PyString_CheckExact(key) || PyLong_CheckExact(key)))) { - value = PyDict_GetItemWithError(d, key); - if (unlikely(!value)) { - if (unlikely(PyErr_Occurred())) - return NULL; - if (unlikely(PyDict_SetItem(d, key, default_value) == -1)) - return NULL; - value = default_value; - } - Py_INCREF(value); -#else - (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key) || PyLong_CheckExact(key)))) { - value = PyDict_GetItem(d, key); - if (unlikely(!value)) { - if (unlikely(PyDict_SetItem(d, key, default_value) == -1)) - return NULL; - value = default_value; - } - Py_INCREF(value); -#endif -#endif - } else { - value = __Pyx_PyObject_CallMethod2(d, PYIDENT("setdefault"), key, default_value); - } - return value; -} - - -/////////////// py_dict_clear.proto /////////////// - -#define __Pyx_PyDict_Clear(d) (PyDict_Clear(d), 0) - -/////////////// dict_iter.proto /////////////// - -static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, - Py_ssize_t* p_orig_length, int* p_is_dict); -static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, - PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); - -/////////////// dict_iter /////////////// -//@requires: ObjectHandling.c::UnpackTuple2 -//@requires: ObjectHandling.c::IterFinish -//@requires: ObjectHandling.c::PyObjectCallMethod - -static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, - Py_ssize_t* p_orig_length, int* p_source_is_dict) { - is_dict = is_dict || likely(PyDict_CheckExact(iterable)); - *p_source_is_dict = is_dict; -#if !CYTHON_COMPILING_IN_PYPY - if (is_dict) { - *p_orig_length = PyDict_Size(iterable); - Py_INCREF(iterable); - return iterable; - } -#endif - *p_orig_length = 0; - if (method_name) { - PyObject* iter; - iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); - if (!iterable) - return NULL; -#if !CYTHON_COMPILING_IN_PYPY - if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) - return iterable; -#endif - iter = PyObject_GetIter(iterable); - Py_DECREF(iterable); - return iter; - } - return PyObject_GetIter(iterable); -} - -static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* iter_obj, Py_ssize_t orig_length, Py_ssize_t* ppos, - PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { - PyObject* next_item; -#if !CYTHON_COMPILING_IN_PYPY - if (source_is_dict) { - PyObject *key, *value; - if (unlikely(orig_length != PyDict_Size(iter_obj))) { - PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); - return -1; - } - if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { - return 0; - } - if (pitem) { - PyObject* tuple = PyTuple_New(2); - if (unlikely(!tuple)) { - return -1; - } - Py_INCREF(key); - Py_INCREF(value); - PyTuple_SET_ITEM(tuple, 0, key); - PyTuple_SET_ITEM(tuple, 1, value); - *pitem = tuple; - } else { - if (pkey) { - Py_INCREF(key); - *pkey = key; - } - if (pvalue) { - Py_INCREF(value); - *pvalue = value; - } - } - return 1; - } else if (PyTuple_CheckExact(iter_obj)) { - Py_ssize_t pos = *ppos; - if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; - *ppos = pos + 1; - next_item = PyTuple_GET_ITEM(iter_obj, pos); - Py_INCREF(next_item); - } else if (PyList_CheckExact(iter_obj)) { - Py_ssize_t pos = *ppos; - if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; - *ppos = pos + 1; - next_item = PyList_GET_ITEM(iter_obj, pos); - Py_INCREF(next_item); - } else -#endif - { - next_item = PyIter_Next(iter_obj); - if (unlikely(!next_item)) { - return __Pyx_IterFinish(); - } - } - if (pitem) { - *pitem = next_item; - } else if (pkey && pvalue) { - if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) - return -1; - } else if (pkey) { - *pkey = next_item; - } else { - *pvalue = next_item; - } - return 1; -} - - -/////////////// unicode_iter.proto /////////////// - -static CYTHON_INLINE int __Pyx_init_unicode_iteration( - PyObject* ustring, Py_ssize_t *length, void** data, int *kind); /* proto */ - -/////////////// unicode_iter /////////////// - -static CYTHON_INLINE int __Pyx_init_unicode_iteration( - PyObject* ustring, Py_ssize_t *length, void** data, int *kind) { -#if CYTHON_PEP393_ENABLED - if (unlikely(__Pyx_PyUnicode_READY(ustring) < 0)) return -1; - *kind = PyUnicode_KIND(ustring); - *length = PyUnicode_GET_LENGTH(ustring); - *data = PyUnicode_DATA(ustring); -#else - *kind = 0; - *length = PyUnicode_GET_SIZE(ustring); - *data = (void*)PyUnicode_AS_UNICODE(ustring); -#endif - return 0; -} - -/////////////// pyobject_as_double.proto /////////////// - -static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */ - -#if CYTHON_COMPILING_IN_PYPY -#define __Pyx_PyObject_AsDouble(obj) \ -(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \ - likely(PyInt_CheckExact(obj)) ? \ - PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj)) -#else -#define __Pyx_PyObject_AsDouble(obj) \ -((likely(PyFloat_CheckExact(obj))) ? \ - PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj)) -#endif - -/////////////// pyobject_as_double /////////////// - -static double __Pyx__PyObject_AsDouble(PyObject* obj) { - PyObject* float_value; -#if CYTHON_COMPILING_IN_PYPY - float_value = PyNumber_Float(obj); -#else - PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number; - if (likely(nb) && likely(nb->nb_float)) { - float_value = nb->nb_float(obj); - if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) { - PyErr_Format(PyExc_TypeError, - "__float__ returned non-float (type %.200s)", - Py_TYPE(float_value)->tp_name); - Py_DECREF(float_value); - goto bad; - } - } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) { -#if PY_MAJOR_VERSION >= 3 - float_value = PyFloat_FromString(obj); -#else - float_value = PyFloat_FromString(obj, 0); -#endif - } else { - PyObject* args = PyTuple_New(1); - if (unlikely(!args)) goto bad; - PyTuple_SET_ITEM(args, 0, obj); - float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0); - PyTuple_SET_ITEM(args, 0, 0); - Py_DECREF(args); - } -#endif - if (likely(float_value)) { - double value = PyFloat_AS_DOUBLE(float_value); - Py_DECREF(float_value); - return value; - } -bad: - return (double)-1; -} diff --git a/third_party/cython/src/Cython/Utility/Overflow.c b/third_party/cython/src/Cython/Utility/Overflow.c deleted file mode 100644 index 1ac58df5b25fd..0000000000000 --- a/third_party/cython/src/Cython/Utility/Overflow.c +++ /dev/null @@ -1,284 +0,0 @@ -/* -These functions provide integer arithmetic with integer checking. They do not -actually raise an exception when an overflow is detected, but rather set a bit -in the overflow parameter. (This parameter may be re-used accross several -arithmetic operations, so should be or-ed rather than assigned to.) - -The implementation is divided into two parts, the signed and unsigned basecases, -which is where the magic happens, and a generic template matching a specific -type to an implementation based on its (c-compile-time) size and signedness. - -When possible, branching is avoided, and preference is given to speed over -accuracy (a low rate of falsely "detected" overflows are acceptable, -undetected overflows are not). - - -TODO: Hook up checking. -TODO: Conditionally support 128-bit with intmax_t? -*/ - -/////////////// Common.proto /////////////// - -static int __Pyx_check_twos_complement(void) { - if (-1 != ~0) { - PyErr_SetString(PyExc_RuntimeError, "Two's complement required for overflow checks."); - return 1; - } else if (sizeof(short) == sizeof(int)) { - PyErr_SetString(PyExc_RuntimeError, "sizeof(short) < sizeof(int) required for overflow checks."); - return 1; - } else { - return 0; - } -} - -#define __PYX_IS_UNSIGNED(type) (((type) -1) > 0) -#define __PYX_SIGN_BIT(type) (((unsigned type) 1) << (sizeof(type) * 8 - 1)) -#define __PYX_HALF_MAX(type) (((type) 1) << (sizeof(type) * 8 - 2)) -#define __PYX_MIN(type) (__PYX_IS_UNSIGNED(type) ? (type) 0 : 0 - __PYX_HALF_MAX(type) - __PYX_HALF_MAX(type)) -#define __PYX_MAX(type) (~__PYX_MIN(type)) - -#define __Pyx_add_no_overflow(a, b, overflow) ((a) + (b)) -#define __Pyx_add_const_no_overflow(a, b, overflow) ((a) + (b)) -#define __Pyx_sub_no_overflow(a, b, overflow) ((a) - (b)) -#define __Pyx_sub_const_no_overflow(a, b, overflow) ((a) - (b)) -#define __Pyx_mul_no_overflow(a, b, overflow) ((a) * (b)) -#define __Pyx_mul_const_no_overflow(a, b, overflow) ((a) * (b)) -#define __Pyx_div_no_overflow(a, b, overflow) ((a) / (b)) -#define __Pyx_div_const_no_overflow(a, b, overflow) ((a) / (b)) - -/////////////// Common.init /////////////// - -__Pyx_check_twos_complement(); - -/////////////// BaseCaseUnsigned.proto /////////////// - -static CYTHON_INLINE {{UINT}} __Pyx_add_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow); -static CYTHON_INLINE {{UINT}} __Pyx_sub_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow); -static CYTHON_INLINE {{UINT}} __Pyx_mul_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow); -static CYTHON_INLINE {{UINT}} __Pyx_div_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow); - -// Use these when b is known at compile time. -#define __Pyx_add_const_{{NAME}}_checking_overflow __Pyx_add_{{NAME}}_checking_overflow -#define __Pyx_sub_const_{{NAME}}_checking_overflow __Pyx_sub_{{NAME}}_checking_overflow -static CYTHON_INLINE {{UINT}} __Pyx_mul_const_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} constant, int *overflow); -#define __Pyx_div_const_{{NAME}}_checking_overflow __Pyx_div_{{NAME}}_checking_overflow - -/////////////// BaseCaseUnsigned /////////////// - -static CYTHON_INLINE {{UINT}} __Pyx_add_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow) { - {{UINT}} r = a + b; - *overflow |= r < a; - return r; -} - -static CYTHON_INLINE {{UINT}} __Pyx_sub_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow) { - {{UINT}} r = a - b; - *overflow |= r > a; - return r; -} - -static CYTHON_INLINE {{UINT}} __Pyx_mul_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow) { - if (sizeof({{UINT}}) < sizeof(unsigned long)) { - unsigned long big_r = ((unsigned long) a) * ((unsigned long) b); - {{UINT}} r = ({{UINT}}) big_r; - *overflow |= big_r != r; - return r; - } else if (sizeof({{UINT}}) < sizeof(unsigned long long)) { - unsigned long long big_r = ((unsigned long long) a) * ((unsigned long long) b); - {{UINT}} r = ({{UINT}}) big_r; - *overflow |= big_r != r; - return r; - } else { - {{UINT}} prod = a * b; - double dprod = ((double) a) * ((double) b); - // Overflow results in an error of at least 2^sizeof(UINT), - // whereas rounding represents an error on the order of 2^(sizeof(UINT)-53). - *overflow |= fabs(dprod - prod) > (__PYX_MAX({{UINT}}) / 2); - return prod; - } -} - -static CYTHON_INLINE {{UINT}} __Pyx_mul_const_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow) { - if (b > 1) { - *overflow |= a > __PYX_MAX({{UINT}}) / b; - } - return a * b; -} - - -static CYTHON_INLINE {{UINT}} __Pyx_div_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow) { - if (b == 0) { - *overflow |= 1; - return 0; - } - return a / b; -} - - -/////////////// BaseCaseSigned.proto /////////////// - -static CYTHON_INLINE {{INT}} __Pyx_add_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow); -static CYTHON_INLINE {{INT}} __Pyx_sub_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow); -static CYTHON_INLINE {{INT}} __Pyx_mul_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow); -static CYTHON_INLINE {{INT}} __Pyx_div_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow); - - -// Use when b is known at compile time. -static CYTHON_INLINE {{INT}} __Pyx_add_const_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow); -static CYTHON_INLINE {{INT}} __Pyx_sub_const_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow); -static CYTHON_INLINE {{INT}} __Pyx_mul_const_{{NAME}}_checking_overflow({{INT}} a, {{INT}} constant, int *overflow); -#define __Pyx_div_const_{{NAME}}_checking_overflow __Pyx_div_{{NAME}}_checking_overflow - -/////////////// BaseCaseSigned /////////////// - -static CYTHON_INLINE {{INT}} __Pyx_add_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { - if (sizeof({{INT}}) < sizeof(long)) { - long big_r = ((long) a) + ((long) b); - {{INT}} r = ({{INT}}) big_r; - *overflow |= big_r != r; - return r; - } else if (sizeof({{INT}}) < sizeof(long long)) { - long long big_r = ((long long) a) + ((long long) b); - {{INT}} r = ({{INT}}) big_r; - *overflow |= big_r != r; - return r; - } else { - // Signed overflow undefined, but unsigned overflow is well defined. - {{INT}} r = ({{INT}}) ((unsigned {{INT}}) a + (unsigned {{INT}}) b); - // Overflow happened if the operands have the same sign, but the result - // has opposite sign. - // sign(a) == sign(b) != sign(r) - {{INT}} sign_a = __PYX_SIGN_BIT({{INT}}) & a; - {{INT}} sign_b = __PYX_SIGN_BIT({{INT}}) & b; - {{INT}} sign_r = __PYX_SIGN_BIT({{INT}}) & r; - *overflow |= (sign_a == sign_b) & (sign_a != sign_r); - return r; - } -} - -static CYTHON_INLINE {{INT}} __Pyx_add_const_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { - if (b > 0) { - *overflow |= a > __PYX_MAX({{INT}}) - b; - } else if (b < 0) { - *overflow |= a < __PYX_MIN({{INT}}) - b; - } - return a + b; -} - -static CYTHON_INLINE {{INT}} __Pyx_sub_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { - *overflow |= b == __PYX_MIN({{INT}}); - return __Pyx_add_{{NAME}}_checking_overflow(a, -b, overflow); -} - -static CYTHON_INLINE {{INT}} __Pyx_sub_const_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { - *overflow |= b == __PYX_MIN({{INT}}); - return __Pyx_add_const_{{NAME}}_checking_overflow(a, -b, overflow); -} - -static CYTHON_INLINE {{INT}} __Pyx_mul_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { - if (sizeof({{INT}}) < sizeof(long)) { - long big_r = ((long) a) * ((long) b); - {{INT}} r = ({{INT}}) big_r; - *overflow |= big_r != r; - return ({{INT}}) r; - } else if (sizeof({{INT}}) < sizeof(long long)) { - long long big_r = ((long long) a) * ((long long) b); - {{INT}} r = ({{INT}}) big_r; - *overflow |= big_r != r; - return ({{INT}}) r; - } else { - {{INT}} prod = a * b; - double dprod = ((double) a) * ((double) b); - // Overflow results in an error of at least 2^sizeof(INT), - // whereas rounding represents an error on the order of 2^(sizeof(INT)-53). - *overflow |= fabs(dprod - prod) > (__PYX_MAX({{INT}}) / 2); - return prod; - } -} - -static CYTHON_INLINE {{INT}} __Pyx_mul_const_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { - if (b > 1) { - *overflow |= a > __PYX_MAX({{INT}}) / b; - *overflow |= a < __PYX_MIN({{INT}}) / b; - } else if (b == -1) { - *overflow |= a == __PYX_MIN({{INT}}); - } else if (b < -1) { - *overflow |= a > __PYX_MIN({{INT}}) / b; - *overflow |= a < __PYX_MAX({{INT}}) / b; - } - return a * b; -} - -static CYTHON_INLINE {{INT}} __Pyx_div_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { - if (b == 0) { - *overflow |= 1; - return 0; - } - *overflow |= (a == __PYX_MIN({{INT}})) & (b == -1); - return a / b; -} - - -/////////////// SizeCheck.init /////////////// - -__Pyx_check_sane_{{NAME}}(); - -/////////////// SizeCheck.proto /////////////// - -static int __Pyx_check_sane_{{NAME}}(void) { - if (sizeof({{TYPE}}) <= sizeof(int) || - sizeof({{TYPE}}) == sizeof(long) || - sizeof({{TYPE}}) == sizeof(long long)) { - return 0; - } else { - PyErr_Format(PyExc_RuntimeError, \ - "Bad size for int type %.{{max(60, len(TYPE))}}s: %d", "{{TYPE}}", (int) sizeof({{TYPE}})); - return 1; - } -} - - -/////////////// Binop.proto /////////////// - -static CYTHON_INLINE {{TYPE}} __Pyx_{{BINOP}}_{{NAME}}_checking_overflow({{TYPE}} a, {{TYPE}} b, int *overflow); - -/////////////// Binop /////////////// - -static CYTHON_INLINE {{TYPE}} __Pyx_{{BINOP}}_{{NAME}}_checking_overflow({{TYPE}} a, {{TYPE}} b, int *overflow) { - if (sizeof({{TYPE}}) < sizeof(int)) { - return __Pyx_{{BINOP}}_no_overflow(a, b, overflow); - } else if (__PYX_IS_UNSIGNED({{TYPE}})) { - if (sizeof({{TYPE}}) == sizeof(unsigned int)) { - return __Pyx_{{BINOP}}_unsigned_int_checking_overflow(a, b, overflow); - } else if (sizeof({{TYPE}}) == sizeof(unsigned long)) { - return __Pyx_{{BINOP}}_unsigned_long_checking_overflow(a, b, overflow); - } else if (sizeof({{TYPE}}) == sizeof(unsigned long long)) { - return __Pyx_{{BINOP}}_unsigned_long_long_checking_overflow(a, b, overflow); - } else { - abort(); return 0; // handled elsewhere - } - } else { - if (sizeof({{TYPE}}) == sizeof(int)) { - return __Pyx_{{BINOP}}_int_checking_overflow(a, b, overflow); - } else if (sizeof({{TYPE}}) == sizeof(long)) { - return __Pyx_{{BINOP}}_long_checking_overflow(a, b, overflow); - } else if (sizeof({{TYPE}}) == sizeof(long long)) { - return __Pyx_{{BINOP}}_long_long_checking_overflow(a, b, overflow); - } else { - abort(); return 0; // handled elsewhere - } - } -} - -/////////////// LeftShift.proto /////////////// - -static CYTHON_INLINE {{TYPE}} __Pyx_lshift_{{NAME}}_checking_overflow({{TYPE}} a, {{TYPE}} b, int *overflow) { - *overflow |= -#if {{SIGNED}} - (b < 0) | -#endif - (b > ({{TYPE}}) (8 * sizeof({{TYPE}}))) | (a > (__PYX_MAX({{TYPE}}) >> b)); - return a << b; -} -#define __Pyx_lshift_const_{{NAME}}_checking_overflow __Pyx_lshift_{{NAME}}_checking_overflow - diff --git a/third_party/cython/src/Cython/Utility/Printing.c b/third_party/cython/src/Cython/Utility/Printing.c deleted file mode 100644 index 71aa7eafe95d6..0000000000000 --- a/third_party/cython/src/Cython/Utility/Printing.c +++ /dev/null @@ -1,176 +0,0 @@ -////////////////////// Print.proto ////////////////////// -//@substitute: naming - -static int __Pyx_Print(PyObject*, PyObject *, int); /*proto*/ -#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 -static PyObject* $print_function = 0; -static PyObject* $print_function_kwargs = 0; -#endif - -////////////////////// Print.cleanup ////////////////////// -//@substitute: naming - -#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 -Py_CLEAR($print_function); -Py_CLEAR($print_function_kwargs); -#endif - -////////////////////// Print ////////////////////// -//@substitute: naming - -#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 -static PyObject *__Pyx_GetStdout(void) { - PyObject *f = PySys_GetObject((char *)"stdout"); - if (!f) { - PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); - } - return f; -} - -static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) { - int i; - - if (!f) { - if (!(f = __Pyx_GetStdout())) - return -1; - } - Py_INCREF(f); - for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) { - PyObject* v; - if (PyFile_SoftSpace(f, 1)) { - if (PyFile_WriteString(" ", f) < 0) - goto error; - } - v = PyTuple_GET_ITEM(arg_tuple, i); - if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) - goto error; - if (PyString_Check(v)) { - char *s = PyString_AsString(v); - Py_ssize_t len = PyString_Size(v); - if (len > 0) { - // append soft-space if necessary (not using isspace() due to C/C++ problem on MacOS-X) - switch (s[len-1]) { - case ' ': break; - case '\f': case '\r': case '\n': case '\t': case '\v': - PyFile_SoftSpace(f, 0); - break; - default: break; - } - } - } - } - if (newline) { - if (PyFile_WriteString("\n", f) < 0) - goto error; - PyFile_SoftSpace(f, 0); - } - Py_DECREF(f); - return 0; -error: - Py_DECREF(f); - return -1; -} - -#else /* Python 3 has a print function */ - -static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { - PyObject* kwargs = 0; - PyObject* result = 0; - PyObject* end_string; - if (unlikely(!$print_function)) { - $print_function = PyObject_GetAttr($builtins_cname, PYIDENT("print")); - if (!$print_function) - return -1; - } - if (stream) { - kwargs = PyDict_New(); - if (unlikely(!kwargs)) - return -1; - if (unlikely(PyDict_SetItem(kwargs, PYIDENT("file"), stream) < 0)) - goto bad; - if (!newline) { - end_string = PyUnicode_FromStringAndSize(" ", 1); - if (unlikely(!end_string)) - goto bad; - if (PyDict_SetItem(kwargs, PYIDENT("end"), end_string) < 0) { - Py_DECREF(end_string); - goto bad; - } - Py_DECREF(end_string); - } - } else if (!newline) { - if (unlikely(!$print_function_kwargs)) { - $print_function_kwargs = PyDict_New(); - if (unlikely(!$print_function_kwargs)) - return -1; - end_string = PyUnicode_FromStringAndSize(" ", 1); - if (unlikely(!end_string)) - return -1; - if (PyDict_SetItem($print_function_kwargs, PYIDENT("end"), end_string) < 0) { - Py_DECREF(end_string); - return -1; - } - Py_DECREF(end_string); - } - kwargs = $print_function_kwargs; - } - result = PyObject_Call($print_function, arg_tuple, kwargs); - if (unlikely(kwargs) && (kwargs != $print_function_kwargs)) - Py_DECREF(kwargs); - if (!result) - return -1; - Py_DECREF(result); - return 0; -bad: - if (kwargs != $print_function_kwargs) - Py_XDECREF(kwargs); - return -1; -} -#endif - -////////////////////// PrintOne.proto ////////////////////// -//@requires: Print - -static int __Pyx_PrintOne(PyObject* stream, PyObject *o); /*proto*/ - -////////////////////// PrintOne ////////////////////// - -#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 - -static int __Pyx_PrintOne(PyObject* f, PyObject *o) { - if (!f) { - if (!(f = __Pyx_GetStdout())) - return -1; - } - Py_INCREF(f); - if (PyFile_SoftSpace(f, 0)) { - if (PyFile_WriteString(" ", f) < 0) - goto error; - } - if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0) - goto error; - if (PyFile_WriteString("\n", f) < 0) - goto error; - Py_DECREF(f); - return 0; -error: - Py_DECREF(f); - return -1; - /* the line below is just to avoid C compiler - * warnings about unused functions */ - return __Pyx_Print(f, NULL, 0); -} - -#else /* Python 3 has a print function */ - -static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { - int res; - PyObject* arg_tuple = PyTuple_Pack(1, o); - if (unlikely(!arg_tuple)) - return -1; - res = __Pyx_Print(stream, arg_tuple, 1); - Py_DECREF(arg_tuple); - return res; -} - -#endif diff --git a/third_party/cython/src/Cython/Utility/Profile.c b/third_party/cython/src/Cython/Utility/Profile.c deleted file mode 100644 index cf219b3c2c860..0000000000000 --- a/third_party/cython/src/Cython/Utility/Profile.c +++ /dev/null @@ -1,194 +0,0 @@ -/////////////// Profile.proto /////////////// -//@substitute: naming - -// Note that cPython ignores PyTrace_EXCEPTION, -// but maybe some other profilers don't. - -#ifndef CYTHON_PROFILE - #define CYTHON_PROFILE 1 -#endif - -#ifndef CYTHON_TRACE - #define CYTHON_TRACE 0 -#endif - -#if CYTHON_TRACE - #undef CYTHON_PROFILE_REUSE_FRAME -#endif - -#ifndef CYTHON_PROFILE_REUSE_FRAME - #define CYTHON_PROFILE_REUSE_FRAME 0 -#endif - -#if CYTHON_PROFILE || CYTHON_TRACE - - #include "compile.h" - #include "frameobject.h" - #include "traceback.h" - - #if CYTHON_PROFILE_REUSE_FRAME - #define CYTHON_FRAME_MODIFIER static - #define CYTHON_FRAME_DEL - #else - #define CYTHON_FRAME_MODIFIER - #define CYTHON_FRAME_DEL Py_CLEAR($frame_cname) - #endif - - #define __Pyx_TraceDeclarations \ - static PyCodeObject *$frame_code_cname = NULL; \ - CYTHON_FRAME_MODIFIER PyFrameObject *$frame_cname = NULL; \ - int __Pyx_use_tracing = 0; - - #define __Pyx_TraceCall(funcname, srcfile, firstlineno) \ - if (unlikely(PyThreadState_GET()->use_tracing && \ - (PyThreadState_GET()->c_profilefunc || (CYTHON_TRACE && PyThreadState_GET()->c_tracefunc)))) { \ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&$frame_code_cname, &$frame_cname, funcname, srcfile, firstlineno); \ - } - - #define __Pyx_TraceException() \ - if (unlikely(__Pyx_use_tracing) && PyThreadState_GET()->use_tracing && \ - (PyThreadState_GET()->c_profilefunc || (CYTHON_TRACE && PyThreadState_GET()->c_tracefunc))) { \ - PyThreadState* tstate = PyThreadState_GET(); \ - tstate->use_tracing = 0; \ - PyObject *exc_info = __Pyx_GetExceptionTuple(); \ - if (exc_info) { \ - if (CYTHON_TRACE && tstate->c_tracefunc) \ - tstate->c_tracefunc( \ - tstate->c_traceobj, $frame_cname, PyTrace_EXCEPTION, exc_info); \ - tstate->c_profilefunc( \ - tstate->c_profileobj, $frame_cname, PyTrace_EXCEPTION, exc_info); \ - Py_DECREF(exc_info); \ - } \ - tstate->use_tracing = 1; \ - } - - #define __Pyx_TraceReturn(result) \ - if (unlikely(__Pyx_use_tracing) && PyThreadState_GET()->use_tracing) { \ - PyThreadState* tstate = PyThreadState_GET(); \ - tstate->use_tracing = 0; \ - if (CYTHON_TRACE && tstate->c_tracefunc) \ - tstate->c_tracefunc( \ - tstate->c_traceobj, $frame_cname, PyTrace_RETURN, (PyObject*)result); \ - if (tstate->c_profilefunc) \ - tstate->c_profilefunc( \ - tstate->c_profileobj, $frame_cname, PyTrace_RETURN, (PyObject*)result); \ - CYTHON_FRAME_DEL; \ - tstate->use_tracing = 1; \ - } - - static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); /*proto*/ - static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, const char *funcname, const char *srcfile, int firstlineno); /*proto*/ - -#else - - #define __Pyx_TraceDeclarations - #define __Pyx_TraceCall(funcname, srcfile, firstlineno) - #define __Pyx_TraceException() - #define __Pyx_TraceReturn(result) - -#endif /* CYTHON_PROFILE */ - -#if CYTHON_TRACE - #define __Pyx_TraceLine(lineno) \ - if (unlikely(__Pyx_use_tracing) && unlikely(PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_tracefunc)) { \ - PyThreadState* tstate = PyThreadState_GET(); \ - $frame_cname->f_lineno = lineno; \ - tstate->use_tracing = 0; \ - tstate->c_tracefunc(tstate->c_traceobj, $frame_cname, PyTrace_LINE, NULL); \ - tstate->use_tracing = 1; \ - } -#else - #define __Pyx_TraceLine(lineno) -#endif - -/////////////// Profile /////////////// -//@substitute: naming - -#if CYTHON_PROFILE - -static int __Pyx_TraceSetupAndCall(PyCodeObject** code, - PyFrameObject** frame, - const char *funcname, - const char *srcfile, - int firstlineno) { - int retval; - PyThreadState* tstate = PyThreadState_GET(); - if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) { - if (*code == NULL) { - *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno); - if (*code == NULL) return 0; - } - *frame = PyFrame_New( - tstate, /*PyThreadState *tstate*/ - *code, /*PyCodeObject *code*/ - $moddict_cname, /*PyObject *globals*/ - 0 /*PyObject *locals*/ - ); - if (*frame == NULL) return 0; - if (CYTHON_TRACE && (*frame)->f_trace == NULL) { - // this enables "f_lineno" lookup, at least in CPython ... - Py_INCREF(Py_None); - (*frame)->f_trace = Py_None; - } -#if PY_VERSION_HEX < 0x030400B1 - } else { - (*frame)->f_tstate = tstate; -#endif - } - (*frame)->f_lineno = firstlineno; - tstate->use_tracing = 0; - #if CYTHON_TRACE - if (tstate->c_tracefunc) - tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL); - if (!tstate->c_profilefunc) - retval = 1; - else - #endif - retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0; - tstate->use_tracing = (tstate->c_profilefunc || - (CYTHON_TRACE && tstate->c_tracefunc)); - return tstate->use_tracing && retval; -} - -static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) { - PyObject *py_srcfile = 0; - PyObject *py_funcname = 0; - PyCodeObject *py_code = 0; - - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); - py_srcfile = PyString_FromString(srcfile); - #else - py_funcname = PyUnicode_FromString(funcname); - py_srcfile = PyUnicode_FromString(srcfile); - #endif - if (!py_funcname | !py_srcfile) goto bad; - - py_code = PyCode_New( - 0, /*int argcount,*/ - #if PY_MAJOR_VERSION >= 3 - 0, /*int kwonlyargcount,*/ - #endif - 0, /*int nlocals,*/ - 0, /*int stacksize,*/ - 0, /*int flags,*/ - $empty_bytes, /*PyObject *code,*/ - $empty_tuple, /*PyObject *consts,*/ - $empty_tuple, /*PyObject *names,*/ - $empty_tuple, /*PyObject *varnames,*/ - $empty_tuple, /*PyObject *freevars,*/ - $empty_tuple, /*PyObject *cellvars,*/ - py_srcfile, /*PyObject *filename,*/ - py_funcname, /*PyObject *name,*/ - firstlineno, /*int firstlineno,*/ - $empty_bytes /*PyObject *lnotab*/ - ); - -bad: - Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); - - return py_code; -} - -#endif /* CYTHON_PROFILE */ diff --git a/third_party/cython/src/Cython/Utility/StringTools.c b/third_party/cython/src/Cython/Utility/StringTools.c deleted file mode 100644 index 4ae6cefedf409..0000000000000 --- a/third_party/cython/src/Cython/Utility/StringTools.c +++ /dev/null @@ -1,786 +0,0 @@ - -//////////////////// IncludeStringH.proto //////////////////// - -#include - -//////////////////// IncludeCppStringH.proto //////////////////// - -#include - -//////////////////// InitStrings.proto //////////////////// - -static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ - -//////////////////// InitStrings //////////////////// - -static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { - while (t->p) { - #if PY_MAJOR_VERSION < 3 - if (t->is_unicode) { - *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); - } else if (t->intern) { - *t->p = PyString_InternFromString(t->s); - } else { - *t->p = PyString_FromStringAndSize(t->s, t->n - 1); - } - #else /* Python 3+ has unicode identifiers */ - if (t->is_unicode | t->is_str) { - if (t->intern) { - *t->p = PyUnicode_InternFromString(t->s); - } else if (t->encoding) { - *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); - } else { - *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); - } - } else { - *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); - } - #endif - if (!*t->p) - return -1; - ++t; - } - return 0; -} - -//////////////////// BytesContains.proto //////////////////// - -static CYTHON_INLINE int __Pyx_BytesContains(PyObject* bytes, char character); /*proto*/ - -//////////////////// BytesContains //////////////////// - -static CYTHON_INLINE int __Pyx_BytesContains(PyObject* bytes, char character) { - const Py_ssize_t length = PyBytes_GET_SIZE(bytes); - char* char_start = PyBytes_AS_STRING(bytes); - char* pos; - for (pos=char_start; pos < char_start+length; pos++) { - if (character == pos[0]) return 1; - } - return 0; -} - - -//////////////////// PyUCS4InUnicode.proto //////////////////// - -static CYTHON_INLINE int __Pyx_UnicodeContainsUCS4(PyObject* unicode, Py_UCS4 character); /*proto*/ -static CYTHON_INLINE int __Pyx_PyUnicodeBufferContainsUCS4(Py_UNICODE* buffer, Py_ssize_t length, Py_UCS4 character); /*proto*/ - -//////////////////// PyUCS4InUnicode //////////////////// - -static CYTHON_INLINE int __Pyx_UnicodeContainsUCS4(PyObject* unicode, Py_UCS4 character) { -#if CYTHON_PEP393_ENABLED - const int kind = PyUnicode_KIND(unicode); - if (likely(kind != PyUnicode_WCHAR_KIND)) { - Py_ssize_t i; - const void* udata = PyUnicode_DATA(unicode); - const Py_ssize_t length = PyUnicode_GET_LENGTH(unicode); - for (i=0; i < length; i++) { - if (unlikely(character == PyUnicode_READ(kind, udata, i))) return 1; - } - return 0; - } -#endif - return __Pyx_PyUnicodeBufferContainsUCS4( - PyUnicode_AS_UNICODE(unicode), - PyUnicode_GET_SIZE(unicode), - character); -} - -static CYTHON_INLINE int __Pyx_PyUnicodeBufferContainsUCS4(Py_UNICODE* buffer, Py_ssize_t length, Py_UCS4 character) { - Py_UNICODE uchar; - Py_UNICODE* pos; - #if Py_UNICODE_SIZE == 2 - if (character > 65535) { - /* handle surrogate pairs for Py_UNICODE buffers in 16bit Unicode builds */ - Py_UNICODE high_val, low_val; - high_val = (Py_UNICODE) (0xD800 | (((character - 0x10000) >> 10) & ((1<<10)-1))); - low_val = (Py_UNICODE) (0xDC00 | ( (character - 0x10000) & ((1<<10)-1))); - for (pos=buffer; pos < buffer+length-1; pos++) { - if (unlikely(high_val == pos[0]) & unlikely(low_val == pos[1])) return 1; - } - return 0; - } - #endif - uchar = (Py_UNICODE) character; - for (pos=buffer; pos < buffer+length; pos++) { - if (unlikely(uchar == pos[0])) return 1; - } - return 0; -} - - -//////////////////// PyUnicodeContains.proto //////////////////// - -static CYTHON_INLINE int __Pyx_PyUnicode_Contains(PyObject* substring, PyObject* text, int eq) { - int result = PyUnicode_Contains(text, substring); - return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); -} - - -//////////////////// StrEquals.proto //////////////////// -//@requires: BytesEquals -//@requires: UnicodeEquals - -#if PY_MAJOR_VERSION >= 3 -#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals -#else -#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals -#endif - - -//////////////////// UnicodeEquals.proto //////////////////// - -static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ - -//////////////////// UnicodeEquals //////////////////// -//@requires: BytesEquals - -static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { -#if CYTHON_COMPILING_IN_PYPY - return PyObject_RichCompareBool(s1, s2, equals); -#else -#if PY_MAJOR_VERSION < 3 - PyObject* owned_ref = NULL; -#endif - int s1_is_unicode, s2_is_unicode; - if (s1 == s2) { - /* as done by PyObject_RichCompareBool(); also catches the (interned) empty string */ - goto return_eq; - } - s1_is_unicode = PyUnicode_CheckExact(s1); - s2_is_unicode = PyUnicode_CheckExact(s2); -#if PY_MAJOR_VERSION < 3 - if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { - owned_ref = PyUnicode_FromObject(s2); - if (unlikely(!owned_ref)) - return -1; - s2 = owned_ref; - s2_is_unicode = 1; - } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { - owned_ref = PyUnicode_FromObject(s1); - if (unlikely(!owned_ref)) - return -1; - s1 = owned_ref; - s1_is_unicode = 1; - } else if (((!s2_is_unicode) & (!s1_is_unicode))) { - return __Pyx_PyBytes_Equals(s1, s2, equals); - } -#endif - if (s1_is_unicode & s2_is_unicode) { - Py_ssize_t length; - int kind; - void *data1, *data2; - #if CYTHON_PEP393_ENABLED - if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0)) - return -1; - #endif - length = __Pyx_PyUnicode_GET_LENGTH(s1); - if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { - goto return_ne; - } - // len(s1) == len(s2) >= 1 (empty string is interned, and "s1 is not s2") - kind = __Pyx_PyUnicode_KIND(s1); - if (kind != __Pyx_PyUnicode_KIND(s2)) { - goto return_ne; - } - data1 = __Pyx_PyUnicode_DATA(s1); - data2 = __Pyx_PyUnicode_DATA(s2); - if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { - goto return_ne; - } else if (length == 1) { - goto return_eq; - } else { - int result = memcmp(data1, data2, (size_t)(length * kind)); - #if PY_MAJOR_VERSION < 3 - Py_XDECREF(owned_ref); - #endif - return (equals == Py_EQ) ? (result == 0) : (result != 0); - } - } else if ((s1 == Py_None) & s2_is_unicode) { - goto return_ne; - } else if ((s2 == Py_None) & s1_is_unicode) { - goto return_ne; - } else { - int result; - PyObject* py_result = PyObject_RichCompare(s1, s2, equals); - if (!py_result) - return -1; - result = __Pyx_PyObject_IsTrue(py_result); - Py_DECREF(py_result); - return result; - } -return_eq: - #if PY_MAJOR_VERSION < 3 - Py_XDECREF(owned_ref); - #endif - return (equals == Py_EQ); -return_ne: - #if PY_MAJOR_VERSION < 3 - Py_XDECREF(owned_ref); - #endif - return (equals == Py_NE); -#endif -} - - -//////////////////// BytesEquals.proto //////////////////// - -static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ - -//////////////////// BytesEquals //////////////////// -//@requires: IncludeStringH - -static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { -#if CYTHON_COMPILING_IN_PYPY - return PyObject_RichCompareBool(s1, s2, equals); -#else - if (s1 == s2) { - /* as done by PyObject_RichCompareBool(); also catches the (interned) empty string */ - return (equals == Py_EQ); - } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { - const char *ps1, *ps2; - Py_ssize_t length = PyBytes_GET_SIZE(s1); - if (length != PyBytes_GET_SIZE(s2)) - return (equals == Py_NE); - // len(s1) == len(s2) >= 1 (empty string is interned, and "s1 is not s2") - ps1 = PyBytes_AS_STRING(s1); - ps2 = PyBytes_AS_STRING(s2); - if (ps1[0] != ps2[0]) { - return (equals == Py_NE); - } else if (length == 1) { - return (equals == Py_EQ); - } else { - int result = memcmp(ps1, ps2, (size_t)length); - return (equals == Py_EQ) ? (result == 0) : (result != 0); - } - } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { - return (equals == Py_NE); - } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { - return (equals == Py_NE); - } else { - int result; - PyObject* py_result = PyObject_RichCompare(s1, s2, equals); - if (!py_result) - return -1; - result = __Pyx_PyObject_IsTrue(py_result); - Py_DECREF(py_result); - return result; - } -#endif -} - -//////////////////// GetItemIntByteArray.proto //////////////////// - -#define __Pyx_GetItemInt_ByteArray(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ - __Pyx_GetItemInt_ByteArray_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ - (PyErr_SetString(PyExc_IndexError, "bytearray index out of range"), -1)) - -static CYTHON_INLINE int __Pyx_GetItemInt_ByteArray_Fast(PyObject* string, Py_ssize_t i, - int wraparound, int boundscheck); - -//////////////////// GetItemIntByteArray //////////////////// - -static CYTHON_INLINE int __Pyx_GetItemInt_ByteArray_Fast(PyObject* string, Py_ssize_t i, - int wraparound, int boundscheck) { - Py_ssize_t length; - if (wraparound | boundscheck) { - length = PyByteArray_GET_SIZE(string); - if (wraparound & unlikely(i < 0)) i += length; - if ((!boundscheck) || likely((0 <= i) & (i < length))) { - return (unsigned char) (PyByteArray_AS_STRING(string)[i]); - } else { - PyErr_SetString(PyExc_IndexError, "bytearray index out of range"); - return -1; - } - } else { - return (unsigned char) (PyByteArray_AS_STRING(string)[i]); - } -} - - -//////////////////// SetItemIntByteArray.proto //////////////////// - -#define __Pyx_SetItemInt_ByteArray(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ - __Pyx_SetItemInt_ByteArray_Fast(o, (Py_ssize_t)i, v, wraparound, boundscheck) : \ - (PyErr_SetString(PyExc_IndexError, "bytearray index out of range"), -1)) - -static CYTHON_INLINE int __Pyx_SetItemInt_ByteArray_Fast(PyObject* string, Py_ssize_t i, unsigned char v, - int wraparound, int boundscheck); - -//////////////////// SetItemIntByteArray //////////////////// - -static CYTHON_INLINE int __Pyx_SetItemInt_ByteArray_Fast(PyObject* string, Py_ssize_t i, unsigned char v, - int wraparound, int boundscheck) { - Py_ssize_t length; - if (wraparound | boundscheck) { - length = PyByteArray_GET_SIZE(string); - if (wraparound & unlikely(i < 0)) i += length; - if ((!boundscheck) || likely((0 <= i) & (i < length))) { - PyByteArray_AS_STRING(string)[i] = (char) v; - return 0; - } else { - PyErr_SetString(PyExc_IndexError, "bytearray index out of range"); - return -1; - } - } else { - PyByteArray_AS_STRING(string)[i] = (char) v; - return 0; - } -} - - -//////////////////// GetItemIntUnicode.proto //////////////////// - -#define __Pyx_GetItemInt_Unicode(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ - __Pyx_GetItemInt_Unicode_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ - (PyErr_SetString(PyExc_IndexError, "string index out of range"), (Py_UCS4)-1)) - -static CYTHON_INLINE Py_UCS4 __Pyx_GetItemInt_Unicode_Fast(PyObject* ustring, Py_ssize_t i, - int wraparound, int boundscheck); - -//////////////////// GetItemIntUnicode //////////////////// - -static CYTHON_INLINE Py_UCS4 __Pyx_GetItemInt_Unicode_Fast(PyObject* ustring, Py_ssize_t i, - int wraparound, int boundscheck) { - Py_ssize_t length; -#if CYTHON_PEP393_ENABLED - if (unlikely(__Pyx_PyUnicode_READY(ustring) < 0)) return (Py_UCS4)-1; -#endif - if (wraparound | boundscheck) { - length = __Pyx_PyUnicode_GET_LENGTH(ustring); - if (wraparound & unlikely(i < 0)) i += length; - if ((!boundscheck) || likely((0 <= i) & (i < length))) { - return __Pyx_PyUnicode_READ_CHAR(ustring, i); - } else { - PyErr_SetString(PyExc_IndexError, "string index out of range"); - return (Py_UCS4)-1; - } - } else { - return __Pyx_PyUnicode_READ_CHAR(ustring, i); - } -} - - -/////////////// decode_cpp_string.proto /////////////// -//@requires: IncludeCppStringH -//@requires: decode_c_bytes - -static CYTHON_INLINE PyObject* __Pyx_decode_cpp_string( - std::string cppstring, Py_ssize_t start, Py_ssize_t stop, - const char* encoding, const char* errors, - PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { - return __Pyx_decode_c_bytes( - cppstring.data(), cppstring.size(), start, stop, encoding, errors, decode_func); -} - -/////////////// decode_c_string.proto /////////////// - -static CYTHON_INLINE PyObject* __Pyx_decode_c_string( - const char* cstring, Py_ssize_t start, Py_ssize_t stop, - const char* encoding, const char* errors, - PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); - -/////////////// decode_c_string /////////////// -//@requires: IncludeStringH - -/* duplicate code to avoid calling strlen() if start >= 0 and stop >= 0 */ - -static CYTHON_INLINE PyObject* __Pyx_decode_c_string( - const char* cstring, Py_ssize_t start, Py_ssize_t stop, - const char* encoding, const char* errors, - PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { - Py_ssize_t length; - if (unlikely((start < 0) | (stop < 0))) { - length = strlen(cstring); - if (start < 0) { - start += length; - if (start < 0) - start = 0; - } - if (stop < 0) - stop += length; - } - length = stop - start; - if (unlikely(length <= 0)) - return PyUnicode_FromUnicode(NULL, 0); - cstring += start; - if (decode_func) { - return decode_func(cstring, length, errors); - } else { - return PyUnicode_Decode(cstring, length, encoding, errors); - } -} - -/////////////// decode_c_bytes.proto /////////////// - -static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( - const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, - const char* encoding, const char* errors, - PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); - -/////////////// decode_c_bytes /////////////// - -static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( - const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, - const char* encoding, const char* errors, - PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { - if (unlikely((start < 0) | (stop < 0))) { - if (start < 0) { - start += length; - if (start < 0) - start = 0; - } - if (stop < 0) - stop += length; - } - if (stop > length) - stop = length; - length = stop - start; - if (unlikely(length <= 0)) - return PyUnicode_FromUnicode(NULL, 0); - cstring += start; - if (decode_func) { - return decode_func(cstring, length, errors); - } else { - return PyUnicode_Decode(cstring, length, encoding, errors); - } -} - -/////////////// decode_bytes.proto /////////////// -//@requires: decode_c_bytes - -static CYTHON_INLINE PyObject* __Pyx_decode_bytes( - PyObject* string, Py_ssize_t start, Py_ssize_t stop, - const char* encoding, const char* errors, - PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { - return __Pyx_decode_c_bytes( - PyBytes_AS_STRING(string), PyBytes_GET_SIZE(string), - start, stop, encoding, errors, decode_func); -} - -/////////////// decode_bytearray.proto /////////////// -//@requires: decode_c_bytes - -static CYTHON_INLINE PyObject* __Pyx_decode_bytearray( - PyObject* string, Py_ssize_t start, Py_ssize_t stop, - const char* encoding, const char* errors, - PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { - return __Pyx_decode_c_bytes( - PyByteArray_AS_STRING(string), PyByteArray_GET_SIZE(string), - start, stop, encoding, errors, decode_func); -} - -/////////////// PyUnicode_Substring.proto /////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring( - PyObject* text, Py_ssize_t start, Py_ssize_t stop); - -/////////////// PyUnicode_Substring /////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring( - PyObject* text, Py_ssize_t start, Py_ssize_t stop) { - Py_ssize_t length; -#if CYTHON_PEP393_ENABLED - if (unlikely(PyUnicode_READY(text) == -1)) return NULL; - length = PyUnicode_GET_LENGTH(text); -#else - length = PyUnicode_GET_SIZE(text); -#endif - if (start < 0) { - start += length; - if (start < 0) - start = 0; - } - if (stop < 0) - stop += length; - else if (stop > length) - stop = length; - length = stop - start; - if (length <= 0) - return PyUnicode_FromUnicode(NULL, 0); -#if CYTHON_PEP393_ENABLED - return PyUnicode_FromKindAndData(PyUnicode_KIND(text), - PyUnicode_1BYTE_DATA(text) + start*PyUnicode_KIND(text), stop-start); -#else - return PyUnicode_FromUnicode(PyUnicode_AS_UNICODE(text)+start, stop-start); -#endif -} - - -/////////////// py_unicode_istitle.proto /////////////// - -// Py_UNICODE_ISTITLE() doesn't match unicode.istitle() as the latter -// additionally allows character that comply with Py_UNICODE_ISUPPER() - -#if PY_VERSION_HEX < 0x030200A2 -static CYTHON_INLINE int __Pyx_Py_UNICODE_ISTITLE(Py_UNICODE uchar) -#else -static CYTHON_INLINE int __Pyx_Py_UNICODE_ISTITLE(Py_UCS4 uchar) -#endif -{ - return Py_UNICODE_ISTITLE(uchar) || Py_UNICODE_ISUPPER(uchar); -} - - -/////////////// unicode_tailmatch.proto /////////////// - -// Python's unicode.startswith() and unicode.endswith() support a -// tuple of prefixes/suffixes, whereas it's much more common to -// test for a single unicode string. - -static int __Pyx_PyUnicode_Tailmatch(PyObject* s, PyObject* substr, - Py_ssize_t start, Py_ssize_t end, int direction) { - if (unlikely(PyTuple_Check(substr))) { - Py_ssize_t i, count = PyTuple_GET_SIZE(substr); - for (i = 0; i < count; i++) { - int result; -#if CYTHON_COMPILING_IN_CPYTHON - result = PyUnicode_Tailmatch(s, PyTuple_GET_ITEM(substr, i), - start, end, direction); -#else - PyObject* sub = PySequence_GetItem(substr, i); - if (unlikely(!sub)) return -1; - result = PyUnicode_Tailmatch(s, sub, start, end, direction); - Py_DECREF(sub); -#endif - if (result) { - return result; - } - } - return 0; - } - return PyUnicode_Tailmatch(s, substr, start, end, direction); -} - - -/////////////// bytes_tailmatch.proto /////////////// - -static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg, Py_ssize_t start, - Py_ssize_t end, int direction) -{ - const char* self_ptr = PyBytes_AS_STRING(self); - Py_ssize_t self_len = PyBytes_GET_SIZE(self); - const char* sub_ptr; - Py_ssize_t sub_len; - int retval; - -#if PY_VERSION_HEX >= 0x02060000 - Py_buffer view; - view.obj = NULL; -#endif - - if ( PyBytes_Check(arg) ) { - sub_ptr = PyBytes_AS_STRING(arg); - sub_len = PyBytes_GET_SIZE(arg); - } -#if PY_MAJOR_VERSION < 3 - // Python 2.x allows mixing unicode and str - else if ( PyUnicode_Check(arg) ) { - return PyUnicode_Tailmatch(self, arg, start, end, direction); - } -#endif - else { -#if PY_VERSION_HEX < 0x02060000 - if (unlikely(PyObject_AsCharBuffer(arg, &sub_ptr, &sub_len))) - return -1; -#else - if (unlikely(PyObject_GetBuffer(self, &view, PyBUF_SIMPLE) == -1)) - return -1; - sub_ptr = (const char*) view.buf; - sub_len = view.len; -#endif - } - - if (end > self_len) - end = self_len; - else if (end < 0) - end += self_len; - if (end < 0) - end = 0; - if (start < 0) - start += self_len; - if (start < 0) - start = 0; - - if (direction > 0) { - /* endswith */ - if (end-sub_len > start) - start = end - sub_len; - } - - if (start + sub_len <= end) - retval = !memcmp(self_ptr+start, sub_ptr, (size_t)sub_len); - else - retval = 0; - -#if PY_VERSION_HEX >= 0x02060000 - if (view.obj) - PyBuffer_Release(&view); -#endif - - return retval; -} - -static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr, Py_ssize_t start, - Py_ssize_t end, int direction) -{ - if (unlikely(PyTuple_Check(substr))) { - Py_ssize_t i, count = PyTuple_GET_SIZE(substr); - for (i = 0; i < count; i++) { - int result; -#if CYTHON_COMPILING_IN_CPYTHON - result = __Pyx_PyBytes_SingleTailmatch(self, PyTuple_GET_ITEM(substr, i), - start, end, direction); -#else - PyObject* sub = PySequence_GetItem(substr, i); - if (unlikely(!sub)) return -1; - result = __Pyx_PyBytes_SingleTailmatch(self, sub, start, end, direction); - Py_DECREF(sub); -#endif - if (result) { - return result; - } - } - return 0; - } - - return __Pyx_PyBytes_SingleTailmatch(self, substr, start, end, direction); -} - - -/////////////// str_tailmatch.proto /////////////// - -static CYTHON_INLINE int __Pyx_PyStr_Tailmatch(PyObject* self, PyObject* arg, Py_ssize_t start, - Py_ssize_t end, int direction); - -/////////////// str_tailmatch /////////////// -//@requires: bytes_tailmatch -//@requires: unicode_tailmatch - -static CYTHON_INLINE int __Pyx_PyStr_Tailmatch(PyObject* self, PyObject* arg, Py_ssize_t start, - Py_ssize_t end, int direction) -{ - // We do not use a C compiler macro here to avoid "unused function" - // warnings for the *_Tailmatch() function that is not being used in - // the specific CPython version. The C compiler will generate the same - // code anyway, and will usually just remove the unused function. - if (PY_MAJOR_VERSION < 3) - return __Pyx_PyBytes_Tailmatch(self, arg, start, end, direction); - else - return __Pyx_PyUnicode_Tailmatch(self, arg, start, end, direction); -} - - -/////////////// bytes_index.proto /////////////// - -static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds) { - if (check_bounds) { - Py_ssize_t size = PyBytes_GET_SIZE(bytes); - if (unlikely(index >= size) | ((index < 0) & unlikely(index < -size))) { - PyErr_SetString(PyExc_IndexError, "string index out of range"); - return -1; - } - } - if (index < 0) - index += PyBytes_GET_SIZE(bytes); - return PyBytes_AS_STRING(bytes)[index]; -} - - -//////////////////// StringJoin.proto //////////////////// - -#if PY_MAJOR_VERSION < 3 -#define __Pyx_PyString_Join __Pyx_PyBytes_Join -#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v)) -#else -#define __Pyx_PyString_Join PyUnicode_Join -#define __Pyx_PyBaseString_Join PyUnicode_Join -#endif - -#if CYTHON_COMPILING_IN_CPYTHON - #if PY_MAJOR_VERSION < 3 - #define __Pyx_PyBytes_Join _PyString_Join - #else - #define __Pyx_PyBytes_Join _PyBytes_Join - #endif -#else -static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); /*proto*/ -#endif - - -//////////////////// StringJoin //////////////////// - -#if !CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) { - return PyObject_CallMethodObjArgs(sep, PYIDENT("join"), values, NULL); -} -#endif - - -//////////////////// ByteArrayAppendObject.proto //////////////////// - -static CYTHON_INLINE int __Pyx_PyByteArray_AppendObject(PyObject* bytearray, PyObject* value); - -//////////////////// ByteArrayAppendObject //////////////////// -//@requires: ByteArrayAppend - -static CYTHON_INLINE int __Pyx_PyByteArray_AppendObject(PyObject* bytearray, PyObject* value) { - Py_ssize_t ival; -#if PY_MAJOR_VERSION < 3 - if (unlikely(PyString_Check(value))) { - if (unlikely(PyString_GET_SIZE(value) != 1)) { - PyErr_SetString(PyExc_ValueError, "string must be of size 1"); - return -1; - } - ival = (unsigned char) (PyString_AS_STRING(value)[0]); - } else -#endif - { - // CPython calls PyNumber_Index() internally - ival = __Pyx_PyIndex_AsSsize_t(value); - if (unlikely((ival < 0) | (ival > 255))) { - if (ival == -1 && PyErr_Occurred()) - return -1; - PyErr_SetString(PyExc_ValueError, "byte must be in range(0, 256)"); - return -1; - } - } - return __Pyx_PyByteArray_Append(bytearray, ival); -} - -//////////////////// ByteArrayAppend.proto //////////////////// - -static CYTHON_INLINE int __Pyx_PyByteArray_Append(PyObject* bytearray, int value); - -//////////////////// ByteArrayAppend //////////////////// -//@requires: ObjectHandling.c::PyObjectCallMethod - -static CYTHON_INLINE int __Pyx_PyByteArray_Append(PyObject* bytearray, int value) { - PyObject *pyval, *retval; -#if CYTHON_COMPILING_IN_CPYTHON - if (likely((value >= 0) & (value <= 255))) { - Py_ssize_t n = Py_SIZE(bytearray); - if (likely(n != PY_SSIZE_T_MAX)) { - if (unlikely(PyByteArray_Resize(bytearray, n + 1) < 0)) - return -1; - PyByteArray_AS_STRING(bytearray)[n] = value; - return 0; - } - } else { - PyErr_SetString(PyExc_ValueError, "byte must be in range(0, 256)"); - return -1; - } -#endif - pyval = PyInt_FromLong(value); - if (unlikely(!pyval)) - return -1; - retval = __Pyx_PyObject_CallMethod1(bytearray, PYIDENT("append"), pyval); - Py_DECREF(pyval); - if (unlikely(!retval)) - return -1; - Py_DECREF(retval); - return 0; -} diff --git a/third_party/cython/src/Cython/Utility/TestCyUtilityLoader.pyx b/third_party/cython/src/Cython/Utility/TestCyUtilityLoader.pyx deleted file mode 100644 index 00e7a7681b853..0000000000000 --- a/third_party/cython/src/Cython/Utility/TestCyUtilityLoader.pyx +++ /dev/null @@ -1,8 +0,0 @@ -########## TestCyUtilityLoader ########## -#@requires: OtherUtility - -test {{cy_loader}} impl - - -########## OtherUtility ########## -req {{cy_loader}} impl diff --git a/third_party/cython/src/Cython/Utility/TestCythonScope.pyx b/third_party/cython/src/Cython/Utility/TestCythonScope.pyx deleted file mode 100644 index f585be2983250..0000000000000 --- a/third_party/cython/src/Cython/Utility/TestCythonScope.pyx +++ /dev/null @@ -1,64 +0,0 @@ -########## TestClass ########## -# These utilities are for testing purposes - -cdef extern from *: - cdef object __pyx_test_dep(object) - -@cname('__pyx_TestClass') -cdef class TestClass(object): - cdef public int value - - def __init__(self, int value): - self.value = value - - def __str__(self): - return 'TestClass(%d)' % self.value - - cdef cdef_method(self, int value): - print 'Hello from cdef_method', value - - cpdef cpdef_method(self, int value): - print 'Hello from cpdef_method', value - - def def_method(self, int value): - print 'Hello from def_method', value - - @cname('cdef_cname') - cdef cdef_cname_method(self, int value): - print "Hello from cdef_cname_method", value - - @cname('cpdef_cname') - cpdef cpdef_cname_method(self, int value): - print "Hello from cpdef_cname_method", value - - @cname('def_cname') - def def_cname_method(self, int value): - print "Hello from def_cname_method", value - -@cname('__pyx_test_call_other_cy_util') -cdef test_call(obj): - print 'test_call' - __pyx_test_dep(obj) - -@cname('__pyx_TestClass_New') -cdef _testclass_new(int value): - return TestClass(value) - -########### TestDep ########## - -@cname('__pyx_test_dep') -cdef test_dep(obj): - print 'test_dep', obj - -########## TestScope ########## - -@cname('__pyx_testscope') -cdef object _testscope(int value): - return "hello from cython scope, value=%d" % value - -########## View.TestScope ########## - -@cname('__pyx_view_testscope') -cdef object _testscope(int value): - return "hello from cython.view scope, value=%d" % value - diff --git a/third_party/cython/src/Cython/Utility/TestUtilityLoader.c b/third_party/cython/src/Cython/Utility/TestUtilityLoader.c deleted file mode 100644 index 595305f211bd1..0000000000000 --- a/third_party/cython/src/Cython/Utility/TestUtilityLoader.c +++ /dev/null @@ -1,12 +0,0 @@ -////////// TestUtilityLoader.proto ////////// -test {{loader}} prototype - -////////// TestUtilityLoader ////////// -//@requires: OtherUtility -test {{loader}} impl - -////////// OtherUtility.proto ////////// -req {{loader}} proto - -////////// OtherUtility ////////// -req {{loader}} impl diff --git a/third_party/cython/src/Cython/Utility/TypeConversion.c b/third_party/cython/src/Cython/Utility/TypeConversion.c deleted file mode 100644 index cc2c51de3683f..0000000000000 --- a/third_party/cython/src/Cython/Utility/TypeConversion.c +++ /dev/null @@ -1,629 +0,0 @@ -/////////////// TypeConversions.proto /////////////// - -/* Type Conversion Predeclarations */ - -#define __Pyx_fits_Py_ssize_t(v, type, is_signed) ( \ - (sizeof(type) < sizeof(Py_ssize_t)) || \ - (sizeof(type) > sizeof(Py_ssize_t) && \ - likely(v < (type)PY_SSIZE_T_MAX || \ - v == (type)PY_SSIZE_T_MAX) && \ - (!is_signed || likely(v > (type)PY_SSIZE_T_MIN || \ - v == (type)PY_SSIZE_T_MIN))) || \ - (sizeof(type) == sizeof(Py_ssize_t) && \ - (is_signed || likely(v < (type)PY_SSIZE_T_MAX || \ - v == (type)PY_SSIZE_T_MAX))) ) - -static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); -static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); - -#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) -#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) -#define __Pyx_PyBytes_FromString PyBytes_FromString -#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); - -#if PY_MAJOR_VERSION < 3 - #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString - #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize -#else - #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString - #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize -#endif - -#define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((const char*)s) -#define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((const char*)s) -#define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((const char*)s) -#define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((const char*)s) -#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((const char*)s) - -#if PY_MAJOR_VERSION < 3 -static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) -{ - const Py_UNICODE *u_end = u; - while (*u_end++) ; - return (size_t)(u_end - u - 1); -} -#else -#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen -#endif - -#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) -#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode -#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode - -#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) -#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) -static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); -static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); - -static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); -static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); - -#if CYTHON_COMPILING_IN_CPYTHON -#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) -#else -#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) -#endif -#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) - -#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII -static int __Pyx_sys_getdefaultencoding_not_ascii; -static int __Pyx_init_sys_getdefaultencoding_params(void) { - PyObject* sys; - PyObject* default_encoding = NULL; - PyObject* ascii_chars_u = NULL; - PyObject* ascii_chars_b = NULL; - const char* default_encoding_c; - sys = PyImport_ImportModule("sys"); - if (!sys) goto bad; - default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); - Py_DECREF(sys); - if (!default_encoding) goto bad; - default_encoding_c = PyBytes_AsString(default_encoding); - if (!default_encoding_c) goto bad; - if (strcmp(default_encoding_c, "ascii") == 0) { - __Pyx_sys_getdefaultencoding_not_ascii = 0; - } else { - char ascii_chars[128]; - int c; - for (c = 0; c < 128; c++) { - ascii_chars[c] = c; - } - __Pyx_sys_getdefaultencoding_not_ascii = 1; - ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); - if (!ascii_chars_u) goto bad; - ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); - if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { - PyErr_Format( - PyExc_ValueError, - "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", - default_encoding_c); - goto bad; - } - Py_DECREF(ascii_chars_u); - Py_DECREF(ascii_chars_b); - } - Py_DECREF(default_encoding); - return 0; -bad: - Py_XDECREF(default_encoding); - Py_XDECREF(ascii_chars_u); - Py_XDECREF(ascii_chars_b); - return -1; -} -#endif - -#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 -#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) -#else -#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) - -// __PYX_DEFAULT_STRING_ENCODING is either a user provided string constant -// or we need to look it up here -#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT -static char* __PYX_DEFAULT_STRING_ENCODING; - -static int __Pyx_init_sys_getdefaultencoding_params(void) { - PyObject* sys; - PyObject* default_encoding = NULL; - char* default_encoding_c; - - sys = PyImport_ImportModule("sys"); - if (!sys) goto bad; - default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); - Py_DECREF(sys); - if (!default_encoding) goto bad; - default_encoding_c = PyBytes_AsString(default_encoding); - if (!default_encoding_c) goto bad; - __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); - if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; - strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); - Py_DECREF(default_encoding); - return 0; -bad: - Py_XDECREF(default_encoding); - return -1; -} -#endif -#endif - -/////////////// TypeConversions /////////////// - -/* Type Conversion Functions */ - -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { - return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); -} - -static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { - Py_ssize_t ignore; - return __Pyx_PyObject_AsStringAndSize(o, &ignore); -} - -static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { -#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT - if ( -#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII - __Pyx_sys_getdefaultencoding_not_ascii && -#endif - PyUnicode_Check(o)) { -#if PY_VERSION_HEX < 0x03030000 - char* defenc_c; - // borrowed, cached reference - PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); - if (!defenc) return NULL; - defenc_c = PyBytes_AS_STRING(defenc); -#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII - { - char* end = defenc_c + PyBytes_GET_SIZE(defenc); - char* c; - for (c = defenc_c; c < end; c++) { - if ((unsigned char) (*c) >= 128) { - // raise the error - PyUnicode_AsASCIIString(o); - return NULL; - } - } - } -#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ - *length = PyBytes_GET_SIZE(defenc); - return defenc_c; -#else /* PY_VERSION_HEX < 0x03030000 */ - if (PyUnicode_READY(o) == -1) return NULL; -#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII - if (PyUnicode_IS_ASCII(o)) { - // cached for the lifetime of the object - *length = PyUnicode_GET_LENGTH(o); - return PyUnicode_AsUTF8(o); - } else { - // raise the error - PyUnicode_AsASCIIString(o); - return NULL; - } -#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ - return PyUnicode_AsUTF8AndSize(o, length); -#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ -#endif /* PY_VERSION_HEX < 0x03030000 */ - } else -#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ - -#if !CYTHON_COMPILING_IN_PYPY -#if PY_VERSION_HEX >= 0x02060000 - if (PyByteArray_Check(o)) { - *length = PyByteArray_GET_SIZE(o); - return PyByteArray_AS_STRING(o); - } else -#endif -#endif - { - char* result; - int r = PyBytes_AsStringAndSize(o, &result, length); - if (unlikely(r < 0)) { - return NULL; - } else { - return result; - } - } -} - -/* Note: __Pyx_PyObject_IsTrue is written to minimize branching. */ -static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { - int is_true = x == Py_True; - if (is_true | (x == Py_False) | (x == Py_None)) return is_true; - else return PyObject_IsTrue(x); -} - -static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { - PyNumberMethods *m; - const char *name = NULL; - PyObject *res = NULL; -#if PY_MAJOR_VERSION < 3 - if (PyInt_Check(x) || PyLong_Check(x)) -#else - if (PyLong_Check(x)) -#endif - return Py_INCREF(x), x; - m = Py_TYPE(x)->tp_as_number; -#if PY_MAJOR_VERSION < 3 - if (m && m->nb_int) { - name = "int"; - res = PyNumber_Int(x); - } - else if (m && m->nb_long) { - name = "long"; - res = PyNumber_Long(x); - } -#else - if (m && m->nb_int) { - name = "int"; - res = PyNumber_Long(x); - } -#endif - if (res) { -#if PY_MAJOR_VERSION < 3 - if (!PyInt_Check(res) && !PyLong_Check(res)) { -#else - if (!PyLong_Check(res)) { -#endif - PyErr_Format(PyExc_TypeError, - "__%.4s__ returned non-%.4s (type %.200s)", - name, name, Py_TYPE(res)->tp_name); - Py_DECREF(res); - return NULL; - } - } - else if (!PyErr_Occurred()) { - PyErr_SetString(PyExc_TypeError, - "an integer is required"); - } - return res; -} - -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - #include "longintrepr.h" - #endif -#endif -static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_ssize_t ival; - PyObject *x; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_CheckExact(b))) - return PyInt_AS_LONG(b); -#endif - if (likely(PyLong_CheckExact(b))) { - #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - switch (Py_SIZE(b)) { - case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0]; - case 0: return 0; - case 1: return ((PyLongObject*)b)->ob_digit[0]; - } - #endif - #endif - #if PY_VERSION_HEX < 0x02060000 - return PyInt_AsSsize_t(b); - #else - return PyLong_AsSsize_t(b); - #endif - } - x = PyNumber_Index(b); - if (!x) return -1; - ival = PyInt_AsSsize_t(x); - Py_DECREF(x); - return ival; -} - -static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { -#if PY_VERSION_HEX < 0x02050000 - if (ival <= LONG_MAX) - return PyInt_FromLong((long)ival); - else { - unsigned char *bytes = (unsigned char *) &ival; - int one = 1; int little = (int)*(unsigned char*)&one; - return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0); - } -#else - return PyInt_FromSize_t(ival); -#endif -} - - -/////////////// FromPyStructUtility.proto /////////////// -{{struct_type_decl}}; -static {{struct_type_decl}} {{funcname}}(PyObject *); - -/////////////// FromPyStructUtility /////////////// -static {{struct_type_decl}} {{funcname}}(PyObject * o) { - {{struct_type_decl}} result; - PyObject *value = NULL; - - if (!PyMapping_Check(o)) { - PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "a mapping", Py_TYPE(o)->tp_name); - goto bad; - } - - {{for member in var_entries:}} - {{py:attr = "result." + member.cname}} - - value = PyObject_GetItem(o, PYIDENT("{{member.name}}")); - if (!value) { - PyErr_Format(PyExc_ValueError, \ - "No value specified for struct attribute '%.{{max(200, len(member.name))}}s'", "{{member.name}}"); - goto bad; - } - {{attr}} = {{member.type.from_py_function}}(value); - if ({{member.type.error_condition(attr)}}) - goto bad; - - Py_DECREF(value); - {{endfor}} - - return result; -bad: - Py_XDECREF(value); - return result; -} - -/////////////// ObjectAsUCS4.proto /////////////// - -static CYTHON_INLINE Py_UCS4 __Pyx_PyObject_AsPy_UCS4(PyObject*); - -/////////////// ObjectAsUCS4 /////////////// - -static CYTHON_INLINE Py_UCS4 __Pyx_PyObject_AsPy_UCS4(PyObject* x) { - long ival; - if (PyUnicode_Check(x)) { - Py_ssize_t length; - #if CYTHON_PEP393_ENABLED - length = PyUnicode_GET_LENGTH(x); - if (likely(length == 1)) { - return PyUnicode_READ_CHAR(x, 0); - } - #else - length = PyUnicode_GET_SIZE(x); - if (likely(length == 1)) { - return PyUnicode_AS_UNICODE(x)[0]; - } - #if Py_UNICODE_SIZE == 2 - else if (PyUnicode_GET_SIZE(x) == 2) { - Py_UCS4 high_val = PyUnicode_AS_UNICODE(x)[0]; - if (high_val >= 0xD800 && high_val <= 0xDBFF) { - Py_UCS4 low_val = PyUnicode_AS_UNICODE(x)[1]; - if (low_val >= 0xDC00 && low_val <= 0xDFFF) { - return 0x10000 + (((high_val & ((1<<10)-1)) << 10) | (low_val & ((1<<10)-1))); - } - } - } - #endif - #endif - PyErr_Format(PyExc_ValueError, - "only single character unicode strings can be converted to Py_UCS4, " - "got length %" CYTHON_FORMAT_SSIZE_T "d", length); - return (Py_UCS4)-1; - } - ival = __Pyx_PyInt_As_long(x); - if (unlikely(ival < 0)) { - if (!PyErr_Occurred()) - PyErr_SetString(PyExc_OverflowError, - "cannot convert negative value to Py_UCS4"); - return (Py_UCS4)-1; - } else if (unlikely(ival > 1114111)) { - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to Py_UCS4"); - return (Py_UCS4)-1; - } - return (Py_UCS4)ival; -} - -/////////////// ObjectAsPyUnicode.proto /////////////// - -static CYTHON_INLINE Py_UNICODE __Pyx_PyObject_AsPy_UNICODE(PyObject*); - -/////////////// ObjectAsPyUnicode /////////////// - -static CYTHON_INLINE Py_UNICODE __Pyx_PyObject_AsPy_UNICODE(PyObject* x) { - long ival; - #if CYTHON_PEP393_ENABLED - #if Py_UNICODE_SIZE > 2 - const long maxval = 1114111; - #else - const long maxval = 65535; - #endif - #else - static long maxval = 0; - #endif - if (PyUnicode_Check(x)) { - if (unlikely(__Pyx_PyUnicode_GET_LENGTH(x) != 1)) { - PyErr_Format(PyExc_ValueError, - "only single character unicode strings can be converted to Py_UNICODE, " - "got length %" CYTHON_FORMAT_SSIZE_T "d", __Pyx_PyUnicode_GET_LENGTH(x)); - return (Py_UNICODE)-1; - } - #if CYTHON_PEP393_ENABLED - ival = PyUnicode_READ_CHAR(x, 0); - #else - return PyUnicode_AS_UNICODE(x)[0]; - #endif - } else { - #if !CYTHON_PEP393_ENABLED - if (unlikely(!maxval)) - maxval = (long)PyUnicode_GetMax(); - #endif - ival = __Pyx_PyInt_As_long(x); - } - if (unlikely(ival < 0)) { - if (!PyErr_Occurred()) - PyErr_SetString(PyExc_OverflowError, - "cannot convert negative value to Py_UNICODE"); - return (Py_UNICODE)-1; - } else if (unlikely(ival > maxval)) { - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to Py_UNICODE"); - return (Py_UNICODE)-1; - } - return (Py_UNICODE)ival; -} - - -/////////////// CIntToPy.proto /////////////// - -static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value); - -/////////////// CIntToPy /////////////// - -static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value) { - const {{TYPE}} neg_one = ({{TYPE}}) -1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof({{TYPE}}) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof({{TYPE}}) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - } else if (sizeof({{TYPE}}) <= sizeof(unsigned long long)) { - return PyLong_FromUnsignedLongLong((unsigned long long) value); - } - } else { - if (sizeof({{TYPE}}) <= sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof({{TYPE}}) <= sizeof(long long)) { - return PyLong_FromLongLong((long long) value); - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof({{TYPE}}), - little, !is_unsigned); - } -} - - -/////////////// CIntFromPyVerify /////////////// - -#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func) \ - { \ - func_type value = func(x); \ - if (sizeof(target_type) < sizeof(func_type)) { \ - if (unlikely(value != (func_type) (target_type) value)) { \ - func_type zero = 0; \ - PyErr_SetString(PyExc_OverflowError, \ - (is_unsigned && unlikely(value < zero)) ? \ - "can't convert negative value to " #target_type : \ - "value too large to convert to " #target_type); \ - return (target_type) -1; \ - } \ - } \ - return (target_type) value; \ - } - - -/////////////// CIntFromPy.proto /////////////// - -static CYTHON_INLINE {{TYPE}} {{FROM_PY_FUNCTION}}(PyObject *); - -/////////////// CIntFromPy /////////////// -//@requires: CIntFromPyVerify - -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - #include "longintrepr.h" - #endif -#endif -static CYTHON_INLINE {{TYPE}} {{FROM_PY_FUNCTION}}(PyObject *x) { - const {{TYPE}} neg_one = ({{TYPE}}) -1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { - if (sizeof({{TYPE}}) < sizeof(long)) { - __PYX_VERIFY_RETURN_INT({{TYPE}}, long, PyInt_AS_LONG) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to {{TYPE}}"); - return ({{TYPE}}) -1; - } - return ({{TYPE}}) val; - } - } else -#endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof({{TYPE}})) { - switch (Py_SIZE(x)) { - case 0: return 0; - case 1: return ({{TYPE}}) ((PyLongObject*)x)->ob_digit[0]; - } - } - #endif -#endif - if (unlikely(Py_SIZE(x) < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to {{TYPE}}"); - return ({{TYPE}}) -1; - } - if (sizeof({{TYPE}}) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT({{TYPE}}, unsigned long, PyLong_AsUnsignedLong) - } else if (sizeof({{TYPE}}) <= sizeof(unsigned long long)) { - __PYX_VERIFY_RETURN_INT({{TYPE}}, unsigned long long, PyLong_AsUnsignedLongLong) - } - } else { -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof({{TYPE}})) { - switch (Py_SIZE(x)) { - case 0: return 0; - case 1: return +({{TYPE}}) ((PyLongObject*)x)->ob_digit[0]; - case -1: return -({{TYPE}}) ((PyLongObject*)x)->ob_digit[0]; - } - } - #endif -#endif - if (sizeof({{TYPE}}) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT({{TYPE}}, long, PyLong_AsLong) - } else if (sizeof({{TYPE}}) <= sizeof(long long)) { - __PYX_VERIFY_RETURN_INT({{TYPE}}, long long, PyLong_AsLongLong) - } - } - { -#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); -#else - {{TYPE}} val; - PyObject *v = __Pyx_PyNumber_Int(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { - PyObject *tmp = v; - v = PyNumber_Long(tmp); - Py_DECREF(tmp); - } - #endif - if (likely(v)) { - int one = 1; int is_little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&val; - int ret = _PyLong_AsByteArray((PyLongObject *)v, - bytes, sizeof(val), - is_little, !is_unsigned); - Py_DECREF(v); - if (likely(!ret)) - return val; - } -#endif - return ({{TYPE}}) -1; - } - } else { - {{TYPE}} val; - PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return ({{TYPE}}) -1; - val = {{FROM_PY_FUNCTION}}(tmp); - Py_DECREF(tmp); - return val; - } -} - diff --git a/third_party/cython/src/Cython/Utility/__init__.py b/third_party/cython/src/Cython/Utility/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/third_party/cython/src/Cython/Utility/arrayarray.h b/third_party/cython/src/Cython/Utility/arrayarray.h deleted file mode 100644 index e79a06ab6197c..0000000000000 --- a/third_party/cython/src/Cython/Utility/arrayarray.h +++ /dev/null @@ -1,144 +0,0 @@ -/////////////// ArrayAPI.proto /////////////// - -// arrayarray.h -// -// Artificial C-API for Python's type, -// used by array.pxd -// -// last changes: 2009-05-15 rk -// 2012-05-02 andreasvc -// (see revision control) -// - -#ifndef _ARRAYARRAY_H -#define _ARRAYARRAY_H - -// These two forward declarations are explicitly handled in the type -// declaration code, as including them here is too late for cython-defined -// types to use them. -// struct arrayobject; -// typedef struct arrayobject arrayobject; - -// All possible arraydescr values are defined in the vector "descriptors" -// below. That's defined later because the appropriate get and set -// functions aren't visible yet. -typedef struct arraydescr { - int typecode; - int itemsize; - PyObject * (*getitem)(struct arrayobject *, Py_ssize_t); - int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *); -#if PY_VERSION_HEX >= 0x03000000 - char *formats; -#endif -} arraydescr; - - -struct arrayobject { - PyObject_HEAD - Py_ssize_t ob_size; - union { - char *ob_item; - float *as_floats; - double *as_doubles; - int *as_ints; - unsigned int *as_uints; - unsigned char *as_uchars; - signed char *as_schars; - char *as_chars; - unsigned long *as_ulongs; - long *as_longs; - short *as_shorts; - unsigned short *as_ushorts; - Py_UNICODE *as_pyunicodes; - void *as_voidptr; - } data; - Py_ssize_t allocated; - struct arraydescr *ob_descr; - PyObject *weakreflist; /* List of weak references */ -#if PY_VERSION_HEX >= 0x03000000 - int ob_exports; /* Number of exported buffers */ -#endif -}; - -#ifndef NO_NEWARRAY_INLINE -// fast creation of a new array -static CYTHON_INLINE PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size, - struct arraydescr *descr) { - arrayobject *op; - size_t nbytes; - - if (size < 0) { - PyErr_BadInternalCall(); - return NULL; - } - - nbytes = size * descr->itemsize; - // Check for overflow - if (nbytes / descr->itemsize != (size_t)size) { - return PyErr_NoMemory(); - } - op = (arrayobject *) type->tp_alloc(type, 0); - if (op == NULL) { - return NULL; - } - op->ob_descr = descr; - op->allocated = size; - op->weakreflist = NULL; - op->ob_size = size; - if (size <= 0) { - op->data.ob_item = NULL; - } - else { - op->data.ob_item = PyMem_NEW(char, nbytes); - if (op->data.ob_item == NULL) { - Py_DECREF(op); - return PyErr_NoMemory(); - } - } - return (PyObject *) op; -} -#else -PyObject* newarrayobject(PyTypeObject *type, Py_ssize_t size, - struct arraydescr *descr); -#endif /* ifndef NO_NEWARRAY_INLINE */ - -// fast resize (reallocation to the point) -// not designed for filing small increments (but for fast opaque array apps) -static CYTHON_INLINE int resize(arrayobject *self, Py_ssize_t n) { - void *items = (void*) self->data.ob_item; - PyMem_Resize(items, char, (size_t)(n * self->ob_descr->itemsize)); - if (items == NULL) { - PyErr_NoMemory(); - return -1; - } - self->data.ob_item = (char*) items; - self->ob_size = n; - self->allocated = n; - return 0; -} - -// suitable for small increments; over allocation 50% ; -// Remains non-smart in Python 2.3- ; but exists for compatibility -static CYTHON_INLINE int resize_smart(arrayobject *self, Py_ssize_t n) { - void *items = (void*) self->data.ob_item; - Py_ssize_t newsize; - if (n < self->allocated) { - if (n*4 > self->allocated) { - self->ob_size = n; - return 0; - } - } - newsize = n * 3 / 2 + 1; - PyMem_Resize(items, char, (size_t)(newsize * self->ob_descr->itemsize)); - if (items == NULL) { - PyErr_NoMemory(); - return -1; - } - self->data.ob_item = (char*) items; - self->ob_size = n; - self->allocated = newsize; - return 0; -} - -#endif -/* _ARRAYARRAY_H */ diff --git a/third_party/cython/src/Cython/Utils.py b/third_party/cython/src/Cython/Utils.py deleted file mode 100644 index 8594118f3294c..0000000000000 --- a/third_party/cython/src/Cython/Utils.py +++ /dev/null @@ -1,415 +0,0 @@ -# -# Cython -- Things that don't belong -# anywhere else in particular -# - -import os, sys, re, codecs - -modification_time = os.path.getmtime - -def cached_function(f): - cache = {} - uncomputed = object() - def wrapper(*args): - res = cache.get(args, uncomputed) - if res is uncomputed: - res = cache[args] = f(*args) - return res - return wrapper - -def cached_method(f): - cache_name = '__%s_cache' % f.__name__ - def wrapper(self, *args): - cache = getattr(self, cache_name, None) - if cache is None: - cache = {} - setattr(self, cache_name, cache) - if args in cache: - return cache[args] - res = cache[args] = f(self, *args) - return res - return wrapper - -def replace_suffix(path, newsuf): - base, _ = os.path.splitext(path) - return base + newsuf - -def open_new_file(path): - if os.path.exists(path): - # Make sure to create a new file here so we can - # safely hard link the output files. - os.unlink(path) - - # we use the ISO-8859-1 encoding here because we only write pure - # ASCII strings or (e.g. for file names) byte encoded strings as - # Unicode, so we need a direct mapping from the first 256 Unicode - # characters to a byte sequence, which ISO-8859-1 provides - return codecs.open(path, "w", encoding="ISO-8859-1") - -def castrate_file(path, st): - # Remove junk contents from an output file after a - # failed compilation. - # Also sets access and modification times back to - # those specified by st (a stat struct). - try: - f = open_new_file(path) - except EnvironmentError: - pass - else: - f.write( - "#error Do not use this file, it is the result of a failed Cython compilation.\n") - f.close() - if st: - os.utime(path, (st.st_atime, st.st_mtime-1)) - -def file_newer_than(path, time): - ftime = modification_time(path) - return ftime > time - -@cached_function -def search_include_directories(dirs, qualified_name, suffix, pos, - include=False, sys_path=False): - # Search the list of include directories for the given - # file name. If a source file position is given, first - # searches the directory containing that file. Returns - # None if not found, but does not report an error. - # The 'include' option will disable package dereferencing. - # If 'sys_path' is True, also search sys.path. - if sys_path: - dirs = dirs + tuple(sys.path) - if pos: - file_desc = pos[0] - from Cython.Compiler.Scanning import FileSourceDescriptor - if not isinstance(file_desc, FileSourceDescriptor): - raise RuntimeError("Only file sources for code supported") - if include: - dirs = (os.path.dirname(file_desc.filename),) + dirs - else: - dirs = (find_root_package_dir(file_desc.filename),) + dirs - - dotted_filename = qualified_name - if suffix: - dotted_filename += suffix - if not include: - names = qualified_name.split('.') - package_names = tuple(names[:-1]) - module_name = names[-1] - module_filename = module_name + suffix - package_filename = "__init__" + suffix - - for dir in dirs: - path = os.path.join(dir, dotted_filename) - if path_exists(path): - return path - if not include: - package_dir = check_package_dir(dir, package_names) - if package_dir is not None: - path = os.path.join(package_dir, module_filename) - if path_exists(path): - return path - path = os.path.join(dir, package_dir, module_name, - package_filename) - if path_exists(path): - return path - return None - - -@cached_function -def find_root_package_dir(file_path): - dir = os.path.dirname(file_path) - if file_path == dir: - return dir - elif is_package_dir(dir): - return find_root_package_dir(dir) - else: - return dir - -@cached_function -def check_package_dir(dir, package_names): - for dirname in package_names: - dir = os.path.join(dir, dirname) - if not is_package_dir(dir): - return None - return dir - -@cached_function -def is_package_dir(dir_path): - for filename in ("__init__.py", - "__init__.pyx", - "__init__.pxd"): - path = os.path.join(dir_path, filename) - if path_exists(path): - return 1 - -@cached_function -def path_exists(path): - # try on the filesystem first - if os.path.exists(path): - return True - # figure out if a PEP 302 loader is around - try: - loader = __loader__ - # XXX the code below assumes a 'zipimport.zipimporter' instance - # XXX should be easy to generalize, but too lazy right now to write it - archive_path = getattr(loader, 'archive', None) - if archive_path: - normpath = os.path.normpath(path) - if normpath.startswith(archive_path): - arcname = normpath[len(archive_path)+1:] - try: - loader.get_data(arcname) - return True - except IOError: - return False - except NameError: - pass - return False - -# file name encodings - -def decode_filename(filename): - if isinstance(filename, unicode): - return filename - try: - filename_encoding = sys.getfilesystemencoding() - if filename_encoding is None: - filename_encoding = sys.getdefaultencoding() - filename = filename.decode(filename_encoding) - except UnicodeDecodeError: - pass - return filename - -# support for source file encoding detection - -_match_file_encoding = re.compile(u"coding[:=]\s*([-\w.]+)").search - -def detect_file_encoding(source_filename): - f = open_source_file(source_filename, encoding="UTF-8", error_handling='ignore') - try: - return detect_opened_file_encoding(f) - finally: - f.close() - -def detect_opened_file_encoding(f): - # PEPs 263 and 3120 - # Most of the time the first two lines fall in the first 250 chars, - # and this bulk read/split is much faster. - lines = f.read(250).split("\n") - if len(lines) > 2: - m = _match_file_encoding(lines[0]) or _match_file_encoding(lines[1]) - if m: - return m.group(1) - else: - return "UTF-8" - else: - # Fallback to one-char-at-a-time detection. - f.seek(0) - chars = [] - for i in range(2): - c = f.read(1) - while c and c != u'\n': - chars.append(c) - c = f.read(1) - encoding = _match_file_encoding(u''.join(chars)) - if encoding: - return encoding.group(1) - return "UTF-8" - - -def skip_bom(f): - """ - Read past a BOM at the beginning of a source file. - This could be added to the scanner, but it's *substantially* easier - to keep it at this level. - """ - if f.read(1) != u'\uFEFF': - f.seek(0) - - -normalise_newlines = re.compile(u'\r\n?|\n').sub - - -class NormalisedNewlineStream(object): - """The codecs module doesn't provide universal newline support. - This class is used as a stream wrapper that provides this - functionality. The new 'io' in Py2.6+/3.x supports this out of the - box. - """ - - def __init__(self, stream): - # let's assume .read() doesn't change - self.stream = stream - self._read = stream.read - self.close = stream.close - self.encoding = getattr(stream, 'encoding', 'UTF-8') - - def read(self, count=-1): - data = self._read(count) - if u'\r' not in data: - return data - if data.endswith(u'\r'): - # may be missing a '\n' - data += self._read(1) - return normalise_newlines(u'\n', data) - - def readlines(self): - content = [] - data = self.read(0x1000) - while data: - content.append(data) - data = self.read(0x1000) - - return u''.join(content).splitlines(True) - - def seek(self, pos): - if pos == 0: - self.stream.seek(0) - else: - raise NotImplementedError - - -io = None -if sys.version_info >= (2,6): - try: - import io - except ImportError: - pass - - -def open_source_file(source_filename, mode="r", - encoding=None, error_handling=None, - require_normalised_newlines=True): - if encoding is None: - # Most of the time the coding is unspecified, so be optimistic that - # it's UTF-8. - f = open_source_file(source_filename, encoding="UTF-8", mode=mode, error_handling='ignore') - encoding = detect_opened_file_encoding(f) - if (encoding == "UTF-8" - and error_handling == 'ignore' - and require_normalised_newlines): - f.seek(0) - skip_bom(f) - return f - else: - f.close() - # - if not os.path.exists(source_filename): - try: - loader = __loader__ - if source_filename.startswith(loader.archive): - return open_source_from_loader( - loader, source_filename, - encoding, error_handling, - require_normalised_newlines) - except (NameError, AttributeError): - pass - # - if io is not None: - stream = io.open(source_filename, mode=mode, - encoding=encoding, errors=error_handling) - else: - # codecs module doesn't have universal newline support - stream = codecs.open(source_filename, mode=mode, - encoding=encoding, errors=error_handling) - if require_normalised_newlines: - stream = NormalisedNewlineStream(stream) - skip_bom(stream) - return stream - - -def open_source_from_loader(loader, - source_filename, - encoding=None, error_handling=None, - require_normalised_newlines=True): - nrmpath = os.path.normpath(source_filename) - arcname = nrmpath[len(loader.archive)+1:] - data = loader.get_data(arcname) - if io is not None: - return io.TextIOWrapper(io.BytesIO(data), - encoding=encoding, - errors=error_handling) - else: - try: - import cStringIO as StringIO - except ImportError: - import StringIO - reader = codecs.getreader(encoding) - stream = reader(StringIO.StringIO(data)) - if require_normalised_newlines: - stream = NormalisedNewlineStream(stream) - return stream - -def str_to_number(value): - # note: this expects a string as input that was accepted by the - # parser already - if len(value) < 2: - value = int(value, 0) - elif value[0] == '0': - if value[1] in 'xX': - # hex notation ('0x1AF') - value = int(value[2:], 16) - elif value[1] in 'oO': - # Py3 octal notation ('0o136') - value = int(value[2:], 8) - elif value[1] in 'bB': - # Py3 binary notation ('0b101') - value = int(value[2:], 2) - else: - # Py2 octal notation ('0136') - value = int(value, 8) - else: - value = int(value, 0) - return value - -def long_literal(value): - if isinstance(value, basestring): - value = str_to_number(value) - return not -2**31 <= value < 2**31 - -# all() and any() are new in 2.5 -try: - # Make sure to bind them on the module, as they will be accessed as - # attributes - all = all - any = any -except NameError: - def all(items): - for item in items: - if not item: - return False - return True - - def any(items): - for item in items: - if item: - return True - return False - -@cached_function -def get_cython_cache_dir(): - """get the cython cache dir - - Priority: - - 1. CYTHON_CACHE_DIR - 2. (OS X): ~/Library/Caches/Cython - (posix not OS X): XDG_CACHE_HOME/cython if XDG_CACHE_HOME defined - 3. ~/.cython - - """ - if 'CYTHON_CACHE_DIR' in os.environ: - return os.environ['CYTHON_CACHE_DIR'] - - parent = None - if os.name == 'posix': - if sys.platform == 'darwin': - parent = os.path.expanduser('~/Library/Caches') - else: - # this could fallback on ~/.cache - parent = os.environ.get('XDG_CACHE_HOME') - - if parent and os.path.isdir(parent): - return os.path.join(parent, 'cython') - - # last fallback: ~/.cython - return os.path.expanduser(os.path.join('~', '.cython')) diff --git a/third_party/cython/src/Cython/__init__.py b/third_party/cython/src/Cython/__init__.py deleted file mode 100644 index a2b3a9b436630..0000000000000 --- a/third_party/cython/src/Cython/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from Cython.Shadow import __version__ - -# Void cython.* directives (for case insensitive operating systems). -from Cython.Shadow import * diff --git a/third_party/cython/src/INSTALL.txt b/third_party/cython/src/INSTALL.txt deleted file mode 100644 index a54a2eee3ed4c..0000000000000 --- a/third_party/cython/src/INSTALL.txt +++ /dev/null @@ -1,22 +0,0 @@ -Cython - Installation Instructions -================================== - -You have two installation options: - -(1) Run the setup.py script in this directory - as follows: - - python setup.py install - - This will install the Cython package - into your Python system. - -OR - -(2) If you prefer not to modify your Python - installation, arrange for the directory - containing this file (INSTALL.txt) to be in - your PYTHONPATH. On unix, also put the bin - directory on your PATH. - -See README.txt for pointers to other documentation. diff --git a/third_party/cython/src/LICENSE.txt b/third_party/cython/src/LICENSE.txt deleted file mode 100644 index d9a10c0d8e868..0000000000000 --- a/third_party/cython/src/LICENSE.txt +++ /dev/null @@ -1,176 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/third_party/cython/src/MANIFEST.in b/third_party/cython/src/MANIFEST.in deleted file mode 100644 index 0404b43c12116..0000000000000 --- a/third_party/cython/src/MANIFEST.in +++ /dev/null @@ -1,33 +0,0 @@ -include MANIFEST.in README.txt INSTALL.txt ToDo.txt USAGE.txt CHANGES.rst -include COPYING.txt LICENSE.txt Makefile -include .gitrev -include pylintrc -include setup.py -include setupegg.py -include bin/* -include cython.py -include cygdb.py -recursive-include Cython *.pyx *.pxd -include Doc/* - -include Demos/*.pyx -include Demos/*.py -include Demos/callback/* -include Demos/benchmarks/* -include Demos/embed/* -include Demos/freeze/* -include Demos/libraries/* -include Demos/Makefile* -recursive-include Cython/Debugger/Tests *.pyx *.pxd *.c *.h -recursive-include Cython/Utility *.pyx *.pxd *.c *.h *.cpp -recursive-include Tools * -recursive-include tests *.pyx *.pxd *.pxi *.py *.h *.BROKEN bugs.txt -recursive-include tests *_lib.cpp *.srctree -recursive-include docs * -include runtests.py - -include Cython/Debugger/Tests/cfuncs.c -include Cython/Debugger/Tests/codefile - -recursive-include pyximport *.py -include pyximport/PKG-INFO pyximport/README diff --git a/third_party/cython/src/Makefile b/third_party/cython/src/Makefile deleted file mode 100644 index 5b28eae8b0806..0000000000000 --- a/third_party/cython/src/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -PYTHON?=python -REPO = git://github.com/cython/cython.git - -all: local - -local: - ${PYTHON} setup.py build_ext --inplace - -TMPDIR = .repo_tmp -.git: .gitrev - rm -rf $(TMPDIR) - git clone -n $(REPO) $(TMPDIR) - cd $(TMPDIR) && git reset -q "$(shell cat .gitrev)" - mv $(TMPDIR)/.git . - rm -rf $(TMPDIR) - git ls-files -d | xargs git checkout -- - -repo: .git - - -clean: - @echo Cleaning Source - @rm -fr build - @rm -f *.py[co] */*.py[co] */*/*.py[co] */*/*/*.py[co] - @rm -f *.so */*.so */*/*.so - @rm -f *.pyd */*.pyd */*/*.pyd - @rm -f *~ */*~ */*/*~ - @rm -f core */core - @rm -f Cython/Compiler/*.c - @rm -f Cython/Plex/*.c - @rm -f Cython/Runtime/refnanny.c - @(cd Demos; $(MAKE) clean) - -testclean: - rm -fr BUILD - -test: testclean - ${PYTHON} runtests.py -vv - -s5: - $(MAKE) -C Doc/s5 slides diff --git a/third_party/cython/src/PKG-INFO b/third_party/cython/src/PKG-INFO deleted file mode 100644 index 0588df9bb6503..0000000000000 --- a/third_party/cython/src/PKG-INFO +++ /dev/null @@ -1,37 +0,0 @@ -Metadata-Version: 1.1 -Name: Cython -Version: 0.20.2 -Summary: The Cython compiler for writing C extensions for the Python language. -Home-page: http://www.cython.org -Author: Robert Bradshaw, Stefan Behnel, Dag Seljebotn, Greg Ewing, et al. -Author-email: cython-devel@python.org -License: UNKNOWN -Description: The Cython language makes writing C extensions for the Python language as - easy as Python itself. Cython is a source code translator based on the - well-known Pyrex_, but supports more cutting edge functionality and - optimizations. - - The Cython language is very close to the Python language (and most Python - code is also valid Cython code), but Cython additionally supports calling C - functions and declaring C types on variables and class attributes. This - allows the compiler to generate very efficient C code from Cython code. - - This makes Cython the ideal language for writing glue code for external C - libraries, and for fast C modules that speed up the execution of Python - code. - - .. _Pyrex: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/ - -Platform: UNKNOWN -Classifier: Development Status :: 5 - Production/Stable -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: Apache Software License -Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: C -Classifier: Programming Language :: Cython -Classifier: Topic :: Software Development :: Code Generators -Classifier: Topic :: Software Development :: Compilers -Classifier: Topic :: Software Development :: Libraries :: Python Modules diff --git a/third_party/cython/src/README.txt b/third_party/cython/src/README.txt deleted file mode 100644 index 8c0275803c597..0000000000000 --- a/third_party/cython/src/README.txt +++ /dev/null @@ -1,68 +0,0 @@ -Welcome to Cython! -================= - -Cython (http://cython.org) is a language that makes writing C extensions for -the Python language as easy as Python itself. Cython is based on the -well-known Pyrex, but supports more cutting edge functionality and -optimizations. - -The Cython language is very close to the Python language, but Cython -additionally supports calling C functions and declaring C types on variables -and class attributes. This allows the compiler to generate very efficient C -code from Cython code. - -This makes Cython the ideal language for wrapping external C libraries, and -for fast C modules that speed up the execution of Python code. - -LICENSE: - -The original Pyrex program was licensed "free of restrictions" (see -below). Cython itself is licensed under the permissive - - Apache License - -See LICENSE.txt. - - --------------------------- - -Note that Cython used to ship the full version control repository in its source -distribution, but no longer does so due to space constraints. To get the -full source history, make sure you have git installed, then step into the -base directory of the Cython source distribution and type - - make repo - -Alternatively, check out the latest developer repository from - - https://github.com/cython/cython - - - -The following is from Pyrex: ------------------------------------------------------- -This is a development version of Pyrex, a language -for writing Python extension modules. - -For more info, see: - - Doc/About.html for a description of the language - INSTALL.txt for installation instructions - USAGE.txt for usage instructions - Demos for usage examples - -Comments, suggestions, bug reports, etc. are -welcome! - -Copyright stuff: Pyrex is free of restrictions. You -may use, redistribute, modify and distribute modified -versions. - -The latest version of Pyrex can be found here: - -http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/ - -Greg Ewing, Computer Science Dept, +--------------------------------------+ -University of Canterbury, | A citizen of NewZealandCorp, a | -Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | -greg@cosc.canterbury.ac.nz +--------------------------------------+ diff --git a/third_party/cython/src/ToDo.txt b/third_party/cython/src/ToDo.txt deleted file mode 100644 index cf8cabcf45972..0000000000000 --- a/third_party/cython/src/ToDo.txt +++ /dev/null @@ -1,289 +0,0 @@ -See http://trac.cython.org/cython_trac and http://wiki.cython.org/enhancements - - --- The Original Pyrex Todo List -- - -DONE - Pointer-to-function types. - -DONE - Nested declarators. - -DONE - Varargs C func defs and calls. - -DONE - * and ** args in Python func defs. - -DONE - Default argument values. - -DONE - Tracebacks. - -DONE - Disallow creating char * from Python temporary anywhere - (not just on assignment). - -DONE - Module and function and class doc strings. - -DONE - Predeclare C functions. - -DONE - Constant expressions. - -DONE - Forward C struct declarations. - -DONE - Prefix & operator. - -DONE - Get rid of auto string->char coercion and - add a c'X' syntax for char literals. - -DONE - Cascaded assignments (a = b = c). - -DONE - 'include' statement for including other Pyrex files. - -DONE - Add command line option for specifying name of generated C file. - -DONE - Add 'else' clause to try-except. - -DONE - Allow extension types to be declared "public" so they - can be accessed from another Pyrex module or a C file. - -DONE - Don't try to generate objstruct definition for external - extension type declared without suite (treat as though - declared with empty suite). - -DONE - Implement two-argument form of 'assert' statement. - -Const types. - -Tuple/list construction: Evaluate & store items one at a time? - -Varargs argument traversal. - -Use PyDict_SetItemString to build keyword arg dicts? -(Or wait until names are interned.) - -Intern names. - -print >>file - -abs() and anything similar. - -Semicolon-separated statement lists. - -Optional semicolons after C declarations. - -Multiple C declarations on one line? - -Optimise return without value outside of try-finally. - -exec statement. - -from ... import statement. - -Use iterator protocol for unpacking. - -Save & restore exception being handled on function entry/exit. - -In-place operators (+=, etc). - -Constant declarations. Syntax? - -DONE - Some way for C functions to signal Python errors? - -Check for lack of return with value in non-void C functions? - -Allow 'pass' in struct/union/enum definition. - -Make C structs callable as constructors. - -DONE - Provide way of specifying C names. - -DONE - Public cdefs. - -When calling user __dealloc__ func, save & restore exception. - -DONE - Forward declaration of extension types. - -Complex number parsetuple format? - -DONE - long long type - -DONE - long double type? - -Windows __fooblarg function declaration things. - -Generate type, var and func declarations in the same order that -they appear in the source file. - -Provide a way of declaring a C function as returning a -borrowed Python reference. - -Provide a way of specifying whether a Python object obtained -by casting a pointer should be treated as a new reference -or not. - -Optimize integer for-loops. - -Make sizeof() take types as well as variables. - -Allow "unsigned" to be used alone as a type name. - -Allow duplicate declarations, at least in extern-from. - -Do something about installing proper version of pyrexc -script according to platform in setup.py. - -DONE - Add "-o filename" command line option to unix/dos versions. - -Recognise #line directives? - -Catch floating point exceptions? - -Check that forward-declared non-external extension types -are defined. - -Generate type test when casting from one Python type -to another. - -Generate a Pyrex include file for public declarations -as well as a C one. - -Syntax for defining indefinite-sized int & float types. - -Allow ranges of exception values. - -Support "complex double" and "complex float"? - -Allow module-level Python variables to be declared extern. - -Consider: ->cdef extern from "foo.h": -> int dosomething() except -1 raise MyException - -Properties for Python types. - -DONE - Properties for extension types. - -Find a way to make classmethod and staticmethod work better. - -DONE - Document workarounds for classmethod and staticmethod. - -Statically initialised C arrays & structs. - -Reduce generation of unused vars and unreachable code? - -Support for acquiring and releasing GIL. - -Make docstrings of extension type special methods work. - -Treat result of getting C attribute of extension type as non-ephemeral. - -Make None a reserved identifier. - -Teach it about builtin functions that correspond to -Python/C API calls. - -Teach it about common builtin types. - -Option for generating a main() function? - -DONE - Allow an extension type to inherit from another type. - -Do something about external C functions declared as returning -const * types? - -Use PyString_FromStringAndSize for string literals? - -DONE - C functions as methods of extension types. - -What to do about __name__ etc. attributes of a module (they are -currently assumed to be built-in names). - -Use PyDict_GetItem etc. on module & builtins dicts for speed. - -Intern all string literals used as Python strings? -[Koshy ] - -Make extension types weak-referenceable. -[Matthias Baas ] - -Make 'pass' work in the body of an extern-from struct -or union. - -Disallow a filename which results in an illegal identifier when -used as a module name. - -Use ctypedef names. - -Provide an easy way of exposing a set of enum values as Python names. -[John J Lee ] - -Prevent user from returning a value from special methods that -return an error indicator only. - -Use PyObject_TypeCheck instead of PyObject_IsInstance? - -Allow * in cimport? [John J Lee ] - -FAQ: Q. Pyrex says my extension type object has no attribute 'rhubarb', but - I know it does. - - A. Have you declared the type at the point where you're using it? - -Eliminate lvalue casts! (Illegal in C++, also disallowed by some C compilers) -[Matthias Baas ] - -Make Python class construction work more like it does in Python. - -Give the right module name to Python classes. - -Command line switch for full pathnames in backtraces? - -Use PyString_FromStringAndSize on string literals containing -nulls. - -Peephole optimisation? [Vladislav Bulatov ] - -Avoid PyArg_ParseTuple call when a function takes no positional args. - -Omit incref/decref of arguments that are not assigned to? - -Can a faster way of instantiating extension types be found? - -Disallow declaring a special method of an extension type with -'cdef' instead of 'def'. - -Use PySequence_GetItem instead of PyObject_GetItem when index -is an integer. - -If a __getitem__ method is declared with an int index, use the -sq_item slot instead of the mp_subscript slot. - -Provide some way of controlling the argument list passed to -an extension type's base __new__ method? -[Alain Pointdexter ] - -Rename __new__ in extension types to __alloc__. - -Implement a true __new__ for extension types. - -Way to provide constructors for extension types that are not -available to Python and can accept C types directly? - -Support generators by turning them into extension types? - -List comprehensions. - -Variable declarations inside inner code blocks? - -Initial values when declaring variables? - -Do something about __stdcall. - -Support class methods in extension types using METH_CLASS flag. - -Disallow defaulting types to 'object' in C declarations? - -C globals with static initialisers. - -Find a way of providing C-only initialisers for extension types. - -Metaclasses for extension types? - -Make extension types use Py_TPFLAGS_HEAPTYPE so their __module__ -will get set dynamically? diff --git a/third_party/cython/src/Tools/cystdlib.py b/third_party/cython/src/Tools/cystdlib.py deleted file mode 100644 index 8e16eae78bce1..0000000000000 --- a/third_party/cython/src/Tools/cystdlib.py +++ /dev/null @@ -1,187 +0,0 @@ -""" -Highly experimental script that compiles the CPython standard library using Cython. - -Execute the script either in the CPython 'Lib' directory or pass the -option '--current-python' to compile the standard library of the running -Python interpreter. - -Pass '-j N' to get a parallel build with N processes. - -Usage example:: - - $ python cystdlib.py --current-python build_ext -i -""" - -import os -import sys -from distutils.core import setup -from Cython.Build import cythonize -from Cython.Compiler import Options - -# improve Python compatibility by allowing some broken code -Options.error_on_unknown_names = False -Options.error_on_uninitialized = False - -exclude_patterns = ['**/test/**/*.py', '**/tests/**/*.py', '**/__init__.py'] -broken = [ - 'idlelib/MultiCall.py', - 'email/utils.py', - 'multiprocessing/reduction.py', - 'multiprocessing/util.py', - 'threading.py', # interrupt handling - 'lib2to3/fixes/fix_sys_exc.py', - 'traceback.py', - 'types.py', - 'enum.py', - 'importlib/_bootstrap', -] - -default_directives = dict( - auto_cpdef=False, # enable when it's safe, see long list of failures below - binding=True, - set_initial_path='SOURCEFILE') -default_directives['optimize.inline_defnode_calls'] = True - -special_directives = [ - (['pkgutil.py', - 'decimal.py', - 'datetime.py', - 'optparse.py', - 'sndhdr.py', - 'opcode.py', - 'ntpath.py', - 'urllib/request.py', - 'plat-*/TYPES.py', - 'plat-*/IN.py', - 'tkinter/_fix.py', - 'lib2to3/refactor.py', - 'webbrowser.py', - 'shutil.py', - 'multiprocessing/forking.py', - 'xml/sax/expatreader.py', - 'xmlrpc/client.py', - 'pydoc.py', - 'xml/etree/ElementTree.py', - 'posixpath.py', - 'inspect.py', - 'ctypes/util.py', - 'urllib/parse.py', - 'warnings.py', - 'tempfile.py', - 'trace.py', - 'heapq.py', - 'pickletools.py', - 'multiprocessing/connection.py', - 'hashlib.py', - 'getopt.py', - 'os.py', - 'types.py', - ], dict(auto_cpdef=False)), -] -del special_directives[:] # currently unused - -def build_extensions(includes='**/*.py', - excludes=None, - special_directives=special_directives, - language_level=sys.version_info[0], - parallel=None): - if isinstance(includes, str): - includes = [includes] - excludes = list(excludes or exclude_patterns) + broken - - all_groups = (special_directives or []) + [(includes, {})] - extensions = [] - for modules, directives in all_groups: - exclude_now = excludes[:] - for other_modules, _ in special_directives: - if other_modules != modules: - exclude_now.extend(other_modules) - - d = dict(default_directives) - d.update(directives) - - extensions.extend( - cythonize( - modules, - exclude=exclude_now, - exclude_failures=True, - language_level=language_level, - compiler_directives=d, - nthreads=parallel, - )) - return extensions - - -def build(extensions): - try: - setup(ext_modules=extensions) - result = True - except: - import traceback - print('error building extensions %s' % ( - [ext.name for ext in extensions],)) - traceback.print_exc() - result = False - return extensions, result - - -def _build(args): - sys_args, ext = args - sys.argv[1:] = sys_args - return build([ext]) - - -def parse_args(): - from optparse import OptionParser - parser = OptionParser('%prog [options] [LIB_DIR (default: ./Lib)]') - parser.add_option( - '--current-python', dest='current_python', action='store_true', - help='compile the stdlib of the running Python') - parser.add_option( - '-j', '--jobs', dest='parallel_jobs', metavar='N', - type=int, default=1, - help='run builds in N parallel jobs (default: 1)') - parser.add_option( - '-x', '--exclude', dest='excludes', metavar='PATTERN', - action="append", help='exclude modules/packages matching PATTERN') - options, args = parser.parse_args() - if not args: - args = ['./Lib'] - elif len(args) > 1: - parser.error('only one argument expected, got %d' % len(args)) - return options, args - - -if __name__ == '__main__': - options, args = parse_args() - if options.current_python: - # assume that the stdlib is where the "os" module lives - os.chdir(os.path.dirname(os.__file__)) - else: - os.chdir(args[0]) - - pool = None - parallel_jobs = options.parallel_jobs - if options.parallel_jobs: - try: - import multiprocessing - pool = multiprocessing.Pool(parallel_jobs) - print("Building in %d parallel processes" % parallel_jobs) - except (ImportError, OSError): - print("Not building in parallel") - parallel_jobs = 0 - - extensions = build_extensions( - parallel=parallel_jobs, - excludes=options.excludes) - sys_args = ['build_ext', '-i'] - if pool is not None: - results = pool.map(_build, [(sys_args, ext) for ext in extensions]) - pool.close() - pool.join() - for ext, result in results: - if not result: - print("building extension %s failed" % (ext[0].name,)) - else: - sys.argv[1:] = sys_args - build(extensions) diff --git a/third_party/cython/src/Tools/cython-epydoc.py b/third_party/cython/src/Tools/cython-epydoc.py deleted file mode 100755 index 66e74019e19a3..0000000000000 --- a/third_party/cython/src/Tools/cython-epydoc.py +++ /dev/null @@ -1,45 +0,0 @@ -#! /usr/bin/env python - -# -------------------------------------------------------------------- - -import re -from epydoc import docstringparser as dsp - -CYTHON_SIGNATURE_RE = re.compile( - # Class name (for builtin methods) - r'^\s*((?P\w+)\.)?' + - # The function name - r'(?P\w+)' + - # The parameters - r'\(((?P(?:self|cls|mcs)),?)?(?P.*)\)' + - # The return value (optional) - r'(\s*(->)\s*(?P\w+(?:\s*\w+)))?' + - # The end marker - r'\s*(?:\n|$)') - -parse_signature = dsp.parse_function_signature - -def parse_function_signature(func_doc, doc_source, - docformat, parse_errors): - PYTHON_SIGNATURE_RE = dsp._SIGNATURE_RE - assert PYTHON_SIGNATURE_RE is not CYTHON_SIGNATURE_RE - try: - dsp._SIGNATURE_RE = CYTHON_SIGNATURE_RE - found = parse_signature(func_doc, doc_source, - docformat, parse_errors) - dsp._SIGNATURE_RE = PYTHON_SIGNATURE_RE - if not found: - found = parse_signature(func_doc, doc_source, - docformat, parse_errors) - return found - finally: - dsp._SIGNATURE_RE = PYTHON_SIGNATURE_RE - -dsp.parse_function_signature = parse_function_signature - -# -------------------------------------------------------------------- - -from epydoc.cli import cli -cli() - -# -------------------------------------------------------------------- diff --git a/third_party/cython/src/Tools/cython-mode.el b/third_party/cython/src/Tools/cython-mode.el deleted file mode 100644 index 5ff6d4a8236f4..0000000000000 --- a/third_party/cython/src/Tools/cython-mode.el +++ /dev/null @@ -1,268 +0,0 @@ -;;; cython-mode.el --- Major mode for editing Cython files - -;;; Commentary: - -;; This should work with python-mode.el as well as either the new -;; python.el or the old. - -;;; Code: - -;; Load python-mode if available, otherwise use builtin emacs python package -(when (not (require 'python-mode nil t)) - (require 'python)) -(eval-when-compile (require 'rx)) - -;;;###autoload -(add-to-list 'auto-mode-alist '("\\.pyx\\'" . cython-mode)) -;;;###autoload -(add-to-list 'auto-mode-alist '("\\.pxd\\'" . cython-mode)) -;;;###autoload -(add-to-list 'auto-mode-alist '("\\.pxi\\'" . cython-mode)) - - -(defvar cython-buffer nil - "Variable pointing to the cython buffer which was compiled.") - -(defun cython-compile () - "Compile the file via Cython." - (interactive) - (let ((cy-buffer (current-buffer))) - (with-current-buffer - (compile compile-command) - (set (make-local-variable 'cython-buffer) cy-buffer) - (add-to-list (make-local-variable 'compilation-finish-functions) - 'cython-compilation-finish)))) - -(defun cython-compilation-finish (buffer how) - "Called when Cython compilation finishes." - ;; XXX could annotate source here - ) - -(defvar cython-mode-map - (let ((map (make-sparse-keymap))) - ;; Will inherit from `python-mode-map' thanks to define-derived-mode. - (define-key map "\C-c\C-c" 'cython-compile) - map) - "Keymap used in `cython-mode'.") - -(defvar cython-font-lock-keywords - `(;; new keywords in Cython language - (,(regexp-opt '("by" "cdef" "cimport" "cpdef" "ctypedef" "enum" "except?" - "extern" "gil" "include" "nogil" "property" "public" - "readonly" "struct" "union" "DEF" "IF" "ELIF" "ELSE") 'words) - 1 font-lock-keyword-face) - ;; C and Python types (highlight as builtins) - (,(regexp-opt '("NULL" "bint" "char" "dict" "double" "float" "int" "list" - "long" "object" "Py_ssize_t" "short" "size_t" "void") 'words) - 1 font-lock-builtin-face) - ;; cdef is used for more than functions, so simply highlighting the next - ;; word is problematic. struct, enum and property work though. - ("\\<\\(?:struct\\|enum\\)[ \t]+\\([a-zA-Z_]+[a-zA-Z0-9_]*\\)" - 1 py-class-name-face) - ("\\ (current-indentation) block-indentation) - (or (cython-end-of-statement) t)) - ;; comment or empty line - (looking-at (rx (0+ space) (or eol "#")))))) - (forward-comment -1)) - ;; Count trailing space in defun (but not trailing comments). - (skip-syntax-forward " >") - (unless (eobp) ; e.g. missing final newline - (beginning-of-line))) - ;; Catch pathological cases like this, where the beginning-of-defun - ;; skips to a definition we're not in: - ;; if ...: - ;; ... - ;; else: - ;; ... # point here - ;; ... - ;; def ... - (if (< (point) orig) - (goto-char (point-max))))) - -(defun cython-current-defun () - "`add-log-current-defun-function' for Cython." - (save-excursion - ;; Move up the tree of nested `class' and `def' blocks until we - ;; get to zero indentation, accumulating the defined names. - (let ((start t) - accum) - (while (or start (> (current-indentation) 0)) - (setq start nil) - (cython-beginning-of-block) - (end-of-line) - (beginning-of-defun) - (if (looking-at (rx (0+ space) (or "def" "cdef" "cpdef" "class") (1+ space) - (group (1+ (or word (syntax symbol)))))) - (push (match-string 1) accum))) - (if accum (mapconcat 'identity accum "."))))) - -;;;###autoload -(define-derived-mode cython-mode python-mode "Cython" - "Major mode for Cython development, derived from Python mode. - -\\{cython-mode-map}" - (setcar font-lock-defaults - (append python-font-lock-keywords cython-font-lock-keywords)) - (set (make-local-variable 'outline-regexp) - (rx (* space) (or "class" "def" "cdef" "cpdef" "elif" "else" "except" "finally" - "for" "if" "try" "while" "with") - symbol-end)) - (set (make-local-variable 'beginning-of-defun-function) - #'cython-beginning-of-defun) - (set (make-local-variable 'end-of-defun-function) - #'cython-end-of-defun) - (set (make-local-variable 'compile-command) - (format cython-default-compile-format (shell-quote-argument buffer-file-name))) - (set (make-local-variable 'add-log-current-defun-function) - #'cython-current-defun) - (add-hook 'which-func-functions #'cython-current-defun nil t) - (add-to-list (make-local-variable 'compilation-finish-functions) - 'cython-compilation-finish)) - -(provide 'cython-mode) - -;;; cython-mode.el ends here diff --git a/third_party/cython/src/Tools/cython-numpy-mode-kate.xml b/third_party/cython/src/Tools/cython-numpy-mode-kate.xml deleted file mode 100644 index 99983ff1b3191..0000000000000 --- a/third_party/cython/src/Tools/cython-numpy-mode-kate.xml +++ /dev/null @@ -1,1133 +0,0 @@ - - - - - - - - - - - - - - - as - - - cimport - import - from - as - - - DEF - IF - ELIF - ELSE - include - - - class - cpdef - def - - - cdef - ctypedef - - - extern - api - del - global - property - nogil - gil - inline - - - readonly - public - - - and - assert - in - is - by - not - or - sizeof - - - - print - - - break - continue - elif - else - except - finally - for - if - pass - raise - return - try - while - with - - - - __import__ - abs - all - any - apply - basestring - buffer - callable - chr - classmethod - cmp - coerce - compile - delattr - dir - divmod - enumerate - eval - execfile - filter - getattr - - hasattr - hash - hex - id - input - intern - isinstance - issubclass - iter - len - - map - max - min - oct - open - ord - pow - - range - raw_input - reduce - reload - repr - reversed - round - setattr - sorted - staticmethod - sum - super - type - unichr - unicode - - xrange - zip - - - - unsigned - void - enum - double - long - short - char - Py_ssize_t - Py_intptr_t - Py_buffer - bint - struct - union - enum - - - - int - float - object - list - tuple - str - dict - set - frozenset - slice - bool - complex - file - - - - np - numpy - - - numpy - - - cython - - - dtype - flatiter - broadcast - ndarray - int8_t - int16_t - int32_t - int64_t - uint8_t - uint16_t - uint32_t - uint64_t - float32_t - float64_t - complex64_t - complex128_t - int_t - long_t - uint_t - ulong_t - float_t - double_t - longdouble_t - cfloat_t - cdouble_t - clongdouble_t - complex_t - npy_int8 - npy_int16 - npy_int32 - npy_int64 - npy_int96 - npy_int128 - npy_uint8 - npy_uint16 - npy_uint32 - npy_uint64 - npy_uint96 - npy_uint128 - npy_float32 - npy_float64 - npy_float80 - npy_float96 - npy_float128 - npy_complex64 - npy_complex128 - npy_complex120 - npy_complex192 - npy_complex256 - npy_cfloat - npy_cdouble - npy_clongdouble - npy_bool - npy_byte - npy_short - npy_int - npy_long - npy_longlong - npy_ubyte - npy_ushort - npy_uint - npy_ulong - npy_ulonglong - npy_float - npy_double - npy_longdouble - npy_intp - - - DataSource - MachAr - PackageLoader - RankWarning - Tester - abs - absolute - add - add_docstring - add_newdoc - alen - all - allclose - alltrue - alterdot - amax - amin - angle - any - append - apply_along_axis - apply_over_axes - arange - arccos - arccosh - arcsin - arcsinh - arctan - arctan2 - arctanh - argmax - argmin - argsort - argwhere - around - array - array2string - array_equal - array_equiv - array_repr - array_split - array_str - asanyarray - asarray - asarray_chkfinite - ascontiguousarray - asfarray - asfortranarray - asmatrix - asscalar - atleast_1d - atleast_2d - atleast_3d - average - bartlett - base_repr - bench - binary_repr - bincount - bitwise_and - bitwise_not - bitwise_or - bitwise_xor - blackman - bmat - bool - bool8 - bool_ - broadcast - broadcast_arrays - byte - byte_bounds - can_cast - cdouble - ceil - cfloat - character - chararray - choose - clip - clongdouble - clongfloat - column_stack - common_type - compare_chararrays - complex - complex128 - complex192 - complex64 - complex_ - complexfloating - compress - concatenate - conj - conjugate - convolve - copy - corrcoef - correlate - cos - cosh - cov - cross - csingle - cumprod - cumproduct - cumsum - deg2rad - degrees - delete - deprecate - deprecate_with_doc - diag - diagflat - diagonal - diff - digitize - disp - divide - dot - double - dsplit - dstack - dtype - ediff1d - empty - empty_like - equal - errstate - exp - exp2 - expand_dims - expm1 - extract - eye - fabs - fastCopyAndTranspose - find_common_type - finfo - fix - flatiter - flatnonzero - flexible - fliplr - flipud - float - float32 - float64 - float96 - float_ - floating - floor - floor_divide - fmax - fmin - fmod - frexp - frombuffer - fromfile - fromfunction - fromiter - frompyfunc - fromregex - fromstring - fv - generic - genfromtxt - get_array_wrap - get_include - get_numarray_include - get_numpy_include - get_printoptions - getbuffer - getbufsize - geterr - geterrcall - geterrobj - gradient - greater - greater_equal - hamming - hanning - histogram - histogram2d - histogramdd - hsplit - hstack - hypot - i0 - identity - imag - indices - inexact - info - inner - insert - int - int0 - int16 - int32 - int64 - int8 - int_ - int_asbuffer - intc - integer - interp - intersect1d - intersect1d_nu - intp - invert - ipmt - irr - iscomplex - iscomplexobj - isfinite - isfortran - isinf - isnan - isneginf - isposinf - isreal - isrealobj - isscalar - issctype - issubclass_ - issubdtype - issubsctype - iterable - ix_ - kaiser - kron - ldexp - left_shift - less - less_equal - lexsort - linspace - load - loads - loadtxt - log - log10 - log1p - log2 - logaddexp - logaddexp2 - logical_and - logical_not - logical_or - logical_xor - logspace - long - longcomplex - longdouble - longfloat - longlong - lookfor - mafromtxt - mat - matrix - max - maximum - maximum_sctype - may_share_memory - mean - median - memmap - meshgrid - min - minimum - mintypecode - mirr - mod - modf - msort - multiply - nan_to_num - nanargmax - nanargmin - nanmax - nanmin - nansum - ndarray - ndenumerate - ndfromtxt - ndim - ndindex - negative - newbuffer - nonzero - not_equal - nper - npv - number - obj2sctype - object - object0 - object_ - ones - ones_like - outer - packbits - piecewise - pkgload - place - pmt - poly - poly1d - polyadd - polyder - polydiv - polyfit - polyint - polymul - polysub - polyval - power - ppmt - prod - product - ptp - put - putmask - pv - rad2deg - radians - rank - rate - ravel - real - real_if_close - recarray - recfromcsv - recfromtxt - reciprocal - record - remainder - repeat - require - reshape - resize - restoredot - right_shift - rint - roll - rollaxis - roots - rot90 - round - round_ - row_stack - safe_eval - save - savetxt - savez - sctype2char - searchsorted - select - set_numeric_ops - set_printoptions - set_string_function - setbufsize - setdiff1d - seterr - seterrcall - seterrobj - setmember1d - setxor1d - shape - short - show_config - sign - signbit - signedinteger - sin - sinc - single - singlecomplex - sinh - size - sometrue - sort - sort_complex - source - split - sqrt - square - squeeze - std - str - str_ - string0 - string_ - subtract - sum - swapaxes - take - tan - tanh - tensordot - test - tile - trace - transpose - trapz - tri - tril - trim_zeros - triu - true_divide - trunc - typename - ubyte - ufunc - uint - uint0 - uint16 - uint32 - uint64 - uint8 - uintc - uintp - ulonglong - unicode - unicode0 - unicode_ - union1d - unique - unique1d - unpackbits - unravel_index - unsignedinteger - unwrap - ushort - vander - var - vdot - vectorize - void - void0 - vsplit - vstack - where - who - zeros - zeros_like - - - __future__ - __import__ - __name__ - __cythonbufferdefaults__ - __weakref__ - None - self - True - False - NotImplemented - Ellipsis - NULL - - - __new__ - __init__ - __cinit__ - __dealloc__ - __cmp__ - __richcmp__ - __str__ - __repr__ - __hash__ - __call__ - __iter__ - __getattr__ - __setattr__ - __delattr__ - __add__ - __sub__ - __mul__ - __div__ - __floordiv__ - __truediv__ - __mod__ - __divmod__ - __pow__ - __neg__ - __pos__ - __abs__ - __nonzero__ - __invert__ - __lshift__ - __rshift__ - __and__ - __or__ - __xor__ - __int__ - __long__ - __float__ - __oct__ - __hex__ - __index__ - __iadd__ - __isub__ - __imul__ - __idiv__ - __ifloordiv__ - __itruediv__ - __imod__ - __ipow__ - __ilshift__ - __irshift__ - __iand__ - __ior__ - __ixor__ - __len__ - __getitem__ - __setitem__ - __delitem__ - __getslice__ - __setslice__ - __delslice__ - __contains__ - __next__ - __getreadbuffer__ - __getwritebuffer__ - __getsegcount__ - __getcharbuffer__ - __get__ - __set__ - __delete__ - __getbuffer__ - __releasebuffer__ - - - ArithmeticError - AssertionError - AttributeError - BaseException - DeprecationWarning - EnvironmentError - EOFError - Exception - FloatingPointError - FutureWarning - GeneratorExit - IOError - ImportError - ImportWarning - IndexError - KeyError - KeyboardInterrupt - LookupError - MemoryError - NameError - NotImplementedError - OSError - OverflowError - PendingDeprecationWarning - ReferenceError - RuntimeError - RuntimeWarning - StandardError - StopIteration - SyntaxError - SyntaxWarning - SystemError - SystemExit - TypeError - UnboundLocalError - UserWarning - UnicodeError - UnicodeWarning - UnicodeEncodeError - UnicodeDecodeError - UnicodeTranslateError - ValueError - Warning - WindowsError - ZeroDivisionError - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/third_party/cython/src/Tools/cython.st b/third_party/cython/src/Tools/cython.st deleted file mode 100644 index ad79f5619a691..0000000000000 --- a/third_party/cython/src/Tools/cython.st +++ /dev/null @@ -1 +0,0 @@ -/** diff --git a/third_party/cython/src/Tools/kate.diff b/third_party/cython/src/Tools/kate.diff deleted file mode 100644 index e68f65dd15873..0000000000000 --- a/third_party/cython/src/Tools/kate.diff +++ /dev/null @@ -1,1144 +0,0 @@ -# HG changeset patch -# User Sturla Molden -# Date 1256723843 25200 -# Node ID 0a6ce52272f641d58c874fa007187778d4c2c81c -# Parent db4133d43a7ee34d4f172aced054785acba65a57 -Syntax highlighting for Cython and NumPy for KATE and KDevelop. - -diff -r db4133d43a7e -r 0a6ce52272f6 Tools/cython-numpy-mode-kate.xml ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/Tools/cython-numpy-mode-kate.xml Wed Oct 28 02:57:23 2009 -0700 -@@ -0,0 +1,1133 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ as -+ -+ -+ cimport -+ import -+ from -+ as -+ -+ -+ DEF -+ IF -+ ELIF -+ ELSE -+ include -+ -+ -+ class -+ cpdef -+ def -+ -+ -+ cdef -+ ctypedef -+ -+ -+ extern -+ api -+ del -+ global -+ property -+ nogil -+ gil -+ inline -+ -+ -+ readonly -+ public -+ -+ -+ and -+ assert -+ in -+ is -+ by -+ not -+ or -+ sizeof -+ -+ -+ -+ print -+ -+ -+ break -+ continue -+ elif -+ else -+ except -+ finally -+ for -+ if -+ pass -+ raise -+ return -+ try -+ while -+ with -+ -+ -+ -+ __import__ -+ abs -+ all -+ any -+ apply -+ basestring -+ buffer -+ callable -+ chr -+ classmethod -+ cmp -+ coerce -+ compile -+ delattr -+ dir -+ divmod -+ enumerate -+ eval -+ execfile -+ filter -+ getattr -+ -+ hasattr -+ hash -+ hex -+ id -+ input -+ intern -+ isinstance -+ issubclass -+ iter -+ len -+ -+ map -+ max -+ min -+ oct -+ open -+ ord -+ pow -+ -+ range -+ raw_input -+ reduce -+ reload -+ repr -+ reversed -+ round -+ setattr -+ sorted -+ staticmethod -+ sum -+ super -+ type -+ unichr -+ unicode -+ -+ xrange -+ zip -+ -+ -+ -+ unsigned -+ void -+ enum -+ double -+ long -+ short -+ char -+ Py_ssize_t -+ Py_intptr_t -+ Py_buffer -+ bint -+ struct -+ union -+ enum -+ -+ -+ -+ int -+ float -+ object -+ list -+ tuple -+ str -+ dict -+ set -+ frozenset -+ slice -+ bool -+ complex -+ file -+ -+ -+ -+ np -+ numpy -+ -+ -+ numpy -+ -+ -+ cython -+ -+ -+ dtype -+ flatiter -+ broadcast -+ ndarray -+ int8_t -+ int16_t -+ int32_t -+ int64_t -+ uint8_t -+ uint16_t -+ uint32_t -+ uint64_t -+ float32_t -+ float64_t -+ complex64_t -+ complex128_t -+ int_t -+ long_t -+ uint_t -+ ulong_t -+ float_t -+ double_t -+ longdouble_t -+ cfloat_t -+ cdouble_t -+ clongdouble_t -+ complex_t -+ npy_int8 -+ npy_int16 -+ npy_int32 -+ npy_int64 -+ npy_int96 -+ npy_int128 -+ npy_uint8 -+ npy_uint16 -+ npy_uint32 -+ npy_uint64 -+ npy_uint96 -+ npy_uint128 -+ npy_float32 -+ npy_float64 -+ npy_float80 -+ npy_float96 -+ npy_float128 -+ npy_complex64 -+ npy_complex128 -+ npy_complex120 -+ npy_complex192 -+ npy_complex256 -+ npy_cfloat -+ npy_cdouble -+ npy_clongdouble -+ npy_bool -+ npy_byte -+ npy_short -+ npy_int -+ npy_long -+ npy_longlong -+ npy_ubyte -+ npy_ushort -+ npy_uint -+ npy_ulong -+ npy_ulonglong -+ npy_float -+ npy_double -+ npy_longdouble -+ npy_intp -+ -+ -+ DataSource -+ MachAr -+ PackageLoader -+ RankWarning -+ Tester -+ abs -+ absolute -+ add -+ add_docstring -+ add_newdoc -+ alen -+ all -+ allclose -+ alltrue -+ alterdot -+ amax -+ amin -+ angle -+ any -+ append -+ apply_along_axis -+ apply_over_axes -+ arange -+ arccos -+ arccosh -+ arcsin -+ arcsinh -+ arctan -+ arctan2 -+ arctanh -+ argmax -+ argmin -+ argsort -+ argwhere -+ around -+ array -+ array2string -+ array_equal -+ array_equiv -+ array_repr -+ array_split -+ array_str -+ asanyarray -+ asarray -+ asarray_chkfinite -+ ascontiguousarray -+ asfarray -+ asfortranarray -+ asmatrix -+ asscalar -+ atleast_1d -+ atleast_2d -+ atleast_3d -+ average -+ bartlett -+ base_repr -+ bench -+ binary_repr -+ bincount -+ bitwise_and -+ bitwise_not -+ bitwise_or -+ bitwise_xor -+ blackman -+ bmat -+ bool -+ bool8 -+ bool_ -+ broadcast -+ broadcast_arrays -+ byte -+ byte_bounds -+ can_cast -+ cdouble -+ ceil -+ cfloat -+ character -+ chararray -+ choose -+ clip -+ clongdouble -+ clongfloat -+ column_stack -+ common_type -+ compare_chararrays -+ complex -+ complex128 -+ complex192 -+ complex64 -+ complex_ -+ complexfloating -+ compress -+ concatenate -+ conj -+ conjugate -+ convolve -+ copy -+ corrcoef -+ correlate -+ cos -+ cosh -+ cov -+ cross -+ csingle -+ cumprod -+ cumproduct -+ cumsum -+ deg2rad -+ degrees -+ delete -+ deprecate -+ deprecate_with_doc -+ diag -+ diagflat -+ diagonal -+ diff -+ digitize -+ disp -+ divide -+ dot -+ double -+ dsplit -+ dstack -+ dtype -+ ediff1d -+ empty -+ empty_like -+ equal -+ errstate -+ exp -+ exp2 -+ expand_dims -+ expm1 -+ extract -+ eye -+ fabs -+ fastCopyAndTranspose -+ find_common_type -+ finfo -+ fix -+ flatiter -+ flatnonzero -+ flexible -+ fliplr -+ flipud -+ float -+ float32 -+ float64 -+ float96 -+ float_ -+ floating -+ floor -+ floor_divide -+ fmax -+ fmin -+ fmod -+ frexp -+ frombuffer -+ fromfile -+ fromfunction -+ fromiter -+ frompyfunc -+ fromregex -+ fromstring -+ fv -+ generic -+ genfromtxt -+ get_array_wrap -+ get_include -+ get_numarray_include -+ get_numpy_include -+ get_printoptions -+ getbuffer -+ getbufsize -+ geterr -+ geterrcall -+ geterrobj -+ gradient -+ greater -+ greater_equal -+ hamming -+ hanning -+ histogram -+ histogram2d -+ histogramdd -+ hsplit -+ hstack -+ hypot -+ i0 -+ identity -+ imag -+ indices -+ inexact -+ info -+ inner -+ insert -+ int -+ int0 -+ int16 -+ int32 -+ int64 -+ int8 -+ int_ -+ int_asbuffer -+ intc -+ integer -+ interp -+ intersect1d -+ intersect1d_nu -+ intp -+ invert -+ ipmt -+ irr -+ iscomplex -+ iscomplexobj -+ isfinite -+ isfortran -+ isinf -+ isnan -+ isneginf -+ isposinf -+ isreal -+ isrealobj -+ isscalar -+ issctype -+ issubclass_ -+ issubdtype -+ issubsctype -+ iterable -+ ix_ -+ kaiser -+ kron -+ ldexp -+ left_shift -+ less -+ less_equal -+ lexsort -+ linspace -+ load -+ loads -+ loadtxt -+ log -+ log10 -+ log1p -+ log2 -+ logaddexp -+ logaddexp2 -+ logical_and -+ logical_not -+ logical_or -+ logical_xor -+ logspace -+ long -+ longcomplex -+ longdouble -+ longfloat -+ longlong -+ lookfor -+ mafromtxt -+ mat -+ matrix -+ max -+ maximum -+ maximum_sctype -+ may_share_memory -+ mean -+ median -+ memmap -+ meshgrid -+ min -+ minimum -+ mintypecode -+ mirr -+ mod -+ modf -+ msort -+ multiply -+ nan_to_num -+ nanargmax -+ nanargmin -+ nanmax -+ nanmin -+ nansum -+ ndarray -+ ndenumerate -+ ndfromtxt -+ ndim -+ ndindex -+ negative -+ newbuffer -+ nonzero -+ not_equal -+ nper -+ npv -+ number -+ obj2sctype -+ object -+ object0 -+ object_ -+ ones -+ ones_like -+ outer -+ packbits -+ piecewise -+ pkgload -+ place -+ pmt -+ poly -+ poly1d -+ polyadd -+ polyder -+ polydiv -+ polyfit -+ polyint -+ polymul -+ polysub -+ polyval -+ power -+ ppmt -+ prod -+ product -+ ptp -+ put -+ putmask -+ pv -+ rad2deg -+ radians -+ rank -+ rate -+ ravel -+ real -+ real_if_close -+ recarray -+ recfromcsv -+ recfromtxt -+ reciprocal -+ record -+ remainder -+ repeat -+ require -+ reshape -+ resize -+ restoredot -+ right_shift -+ rint -+ roll -+ rollaxis -+ roots -+ rot90 -+ round -+ round_ -+ row_stack -+ safe_eval -+ save -+ savetxt -+ savez -+ sctype2char -+ searchsorted -+ select -+ set_numeric_ops -+ set_printoptions -+ set_string_function -+ setbufsize -+ setdiff1d -+ seterr -+ seterrcall -+ seterrobj -+ setmember1d -+ setxor1d -+ shape -+ short -+ show_config -+ sign -+ signbit -+ signedinteger -+ sin -+ sinc -+ single -+ singlecomplex -+ sinh -+ size -+ sometrue -+ sort -+ sort_complex -+ source -+ split -+ sqrt -+ square -+ squeeze -+ std -+ str -+ str_ -+ string0 -+ string_ -+ subtract -+ sum -+ swapaxes -+ take -+ tan -+ tanh -+ tensordot -+ test -+ tile -+ trace -+ transpose -+ trapz -+ tri -+ tril -+ trim_zeros -+ triu -+ true_divide -+ trunc -+ typename -+ ubyte -+ ufunc -+ uint -+ uint0 -+ uint16 -+ uint32 -+ uint64 -+ uint8 -+ uintc -+ uintp -+ ulonglong -+ unicode -+ unicode0 -+ unicode_ -+ union1d -+ unique -+ unique1d -+ unpackbits -+ unravel_index -+ unsignedinteger -+ unwrap -+ ushort -+ vander -+ var -+ vdot -+ vectorize -+ void -+ void0 -+ vsplit -+ vstack -+ where -+ who -+ zeros -+ zeros_like -+ -+ -+ __future__ -+ __import__ -+ __name__ -+ __cythonbufferdefaults__ -+ __weakref__ -+ None -+ self -+ True -+ False -+ NotImplemented -+ Ellipsis -+ NULL -+ -+ -+ __new__ -+ __init__ -+ __cinit__ -+ __dealloc__ -+ __cmp__ -+ __richcmp__ -+ __str__ -+ __repr__ -+ __hash__ -+ __call__ -+ __iter__ -+ __getattr__ -+ __setattr__ -+ __delattr__ -+ __add__ -+ __sub__ -+ __mul__ -+ __div__ -+ __floordiv__ -+ __truediv__ -+ __mod__ -+ __divmod__ -+ __pow__ -+ __neg__ -+ __pos__ -+ __abs__ -+ __nonzero__ -+ __invert__ -+ __lshift__ -+ __rshift__ -+ __and__ -+ __or__ -+ __xor__ -+ __int__ -+ __long__ -+ __float__ -+ __oct__ -+ __hex__ -+ __index__ -+ __iadd__ -+ __isub__ -+ __imul__ -+ __idiv__ -+ __ifloordiv__ -+ __itruediv__ -+ __imod__ -+ __ipow__ -+ __ilshift__ -+ __irshift__ -+ __iand__ -+ __ior__ -+ __ixor__ -+ __len__ -+ __getitem__ -+ __setitem__ -+ __delitem__ -+ __getslice__ -+ __setslice__ -+ __delslice__ -+ __contains__ -+ __next__ -+ __getreadbuffer__ -+ __getwritebuffer__ -+ __getsegcount__ -+ __getcharbuffer__ -+ __get__ -+ __set__ -+ __delete__ -+ __getbuffer__ -+ __releasebuffer__ -+ -+ -+ ArithmeticError -+ AssertionError -+ AttributeError -+ BaseException -+ DeprecationWarning -+ EnvironmentError -+ EOFError -+ Exception -+ FloatingPointError -+ FutureWarning -+ GeneratorExit -+ IOError -+ ImportError -+ ImportWarning -+ IndexError -+ KeyError -+ KeyboardInterrupt -+ LookupError -+ MemoryError -+ NameError -+ NotImplementedError -+ OSError -+ OverflowError -+ PendingDeprecationWarning -+ ReferenceError -+ RuntimeError -+ RuntimeWarning -+ StandardError -+ StopIteration -+ SyntaxError -+ SyntaxWarning -+ SystemError -+ SystemExit -+ TypeError -+ UnboundLocalError -+ UserWarning -+ UnicodeError -+ UnicodeWarning -+ UnicodeEncodeError -+ UnicodeDecodeError -+ UnicodeTranslateError -+ ValueError -+ Warning -+ WindowsError -+ ZeroDivisionError -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ diff --git a/third_party/cython/src/Tools/site_scons/site_tools/cython.py b/third_party/cython/src/Tools/site_scons/site_tools/cython.py deleted file mode 100644 index 40af7bb8db736..0000000000000 --- a/third_party/cython/src/Tools/site_scons/site_tools/cython.py +++ /dev/null @@ -1,66 +0,0 @@ -""" -Tool to run Cython files (.pyx) into .c and .cpp. - -TODO: - - Add support for dynamically selecting in-process Cython - through CYTHONINPROCESS variable. - - Have a CYTHONCPP option which turns on C++ in flags and - changes output extension at the same time - -VARIABLES: - - CYTHON - The path to the "cython" command line tool. - - CYTHONFLAGS - Flags to pass to the "cython" command line tool. - -AUTHORS: - - David Cournapeau - - Dag Sverre Seljebotn - -""" -import SCons -from SCons.Builder import Builder -from SCons.Action import Action - -#def cython_action(target, source, env): -# print target, source, env -# from Cython.Compiler.Main import compile as cython_compile -# res = cython_compile(str(source[0])) - -cythonAction = Action("$CYTHONCOM") - -def create_builder(env): - try: - cython = env['BUILDERS']['Cython'] - except KeyError: - cython = SCons.Builder.Builder( - action = cythonAction, - emitter = {}, - suffix = cython_suffix_emitter, - single_source = 1) - env['BUILDERS']['Cython'] = cython - - return cython - -def cython_suffix_emitter(env, source): - return "$CYTHONCFILESUFFIX" - -def generate(env): - env["CYTHON"] = "cython" - env["CYTHONCOM"] = "$CYTHON $CYTHONFLAGS -o $TARGET $SOURCE" - env["CYTHONCFILESUFFIX"] = ".c" - - c_file, cxx_file = SCons.Tool.createCFileBuilders(env) - - c_file.suffix['.pyx'] = cython_suffix_emitter - c_file.add_action('.pyx', cythonAction) - - c_file.suffix['.py'] = cython_suffix_emitter - c_file.add_action('.py', cythonAction) - - create_builder(env) - -def exists(env): - try: -# import Cython - return True - except ImportError: - return False diff --git a/third_party/cython/src/Tools/site_scons/site_tools/pyext.py b/third_party/cython/src/Tools/site_scons/site_tools/pyext.py deleted file mode 100644 index edcf6afae9e5f..0000000000000 --- a/third_party/cython/src/Tools/site_scons/site_tools/pyext.py +++ /dev/null @@ -1,236 +0,0 @@ -"""SCons.Tool.pyext - -Tool-specific initialization for python extensions builder. - -AUTHORS: - - David Cournapeau - - Dag Sverre Seljebotn - -""" - -# -# __COPYRIGHT__ -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# - -__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - -import sys - -import SCons -from SCons.Tool import SourceFileScanner, ProgramScanner - -# Create common python builders - -def createPythonObjectBuilder(env): - """This is a utility function that creates the PythonObject Builder in an - Environment if it is not there already. - - If it is already there, we return the existing one. - """ - - try: - pyobj = env['BUILDERS']['PythonObject'] - except KeyError: - pyobj = SCons.Builder.Builder(action = {}, - emitter = {}, - prefix = '$PYEXTOBJPREFIX', - suffix = '$PYEXTOBJSUFFIX', - src_builder = ['CFile', 'CXXFile'], - source_scanner = SourceFileScanner, - single_source = 1) - env['BUILDERS']['PythonObject'] = pyobj - - return pyobj - -def createPythonExtensionBuilder(env): - """This is a utility function that creates the PythonExtension Builder in - an Environment if it is not there already. - - If it is already there, we return the existing one. - """ - - try: - pyext = env['BUILDERS']['PythonExtension'] - except KeyError: - import SCons.Action - import SCons.Defaults - action = SCons.Action.Action("$PYEXTLINKCOM", "$PYEXTLINKCOMSTR") - action_list = [ SCons.Defaults.SharedCheck, - action] - pyext = SCons.Builder.Builder(action = action_list, - emitter = "$SHLIBEMITTER", - prefix = '$PYEXTPREFIX', - suffix = '$PYEXTSUFFIX', - target_scanner = ProgramScanner, - src_suffix = '$PYEXTOBJSUFFIX', - src_builder = 'PythonObject') - env['BUILDERS']['PythonExtension'] = pyext - - return pyext - -def pyext_coms(platform): - """Return PYEXTCCCOM, PYEXTCXXCOM and PYEXTLINKCOM for the given - platform.""" - if platform == 'win32': - pyext_cccom = "$PYEXTCC /Fo$TARGET /c $PYEXTCCSHARED "\ - "$PYEXTCFLAGS $PYEXTCCFLAGS $_CCCOMCOM "\ - "$_PYEXTCPPINCFLAGS $SOURCES" - pyext_cxxcom = "$PYEXTCXX /Fo$TARGET /c $PYEXTCSHARED "\ - "$PYEXTCXXFLAGS $PYEXTCCFLAGS $_CCCOMCOM "\ - "$_PYEXTCPPINCFLAGS $SOURCES" - pyext_linkcom = '${TEMPFILE("$PYEXTLINK $PYEXTLINKFLAGS '\ - '/OUT:$TARGET.windows $( $_LIBDIRFLAGS $) '\ - '$_LIBFLAGS $_PYEXTRUNTIME $SOURCES.windows")}' - else: - pyext_cccom = "$PYEXTCC -o $TARGET -c $PYEXTCCSHARED "\ - "$PYEXTCFLAGS $PYEXTCCFLAGS $_CCCOMCOM "\ - "$_PYEXTCPPINCFLAGS $SOURCES" - pyext_cxxcom = "$PYEXTCXX -o $TARGET -c $PYEXTCSHARED "\ - "$PYEXTCXXFLAGS $PYEXTCCFLAGS $_CCCOMCOM "\ - "$_PYEXTCPPINCFLAGS $SOURCES" - pyext_linkcom = "$PYEXTLINK -o $TARGET $PYEXTLINKFLAGS "\ - "$SOURCES $_LIBDIRFLAGS $_LIBFLAGS $_PYEXTRUNTIME" - - if platform == 'darwin': - pyext_linkcom += ' $_FRAMEWORKPATH $_FRAMEWORKS $FRAMEWORKSFLAGS' - - return pyext_cccom, pyext_cxxcom, pyext_linkcom - -def set_basic_vars(env): - # Set construction variables which are independant on whether we are using - # distutils or not. - env['PYEXTCPPPATH'] = SCons.Util.CLVar('$PYEXTINCPATH') - - env['_PYEXTCPPINCFLAGS'] = '$( ${_concat(INCPREFIX, PYEXTCPPPATH, '\ - 'INCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)' - env['PYEXTOBJSUFFIX'] = '$SHOBJSUFFIX' - env['PYEXTOBJPREFIX'] = '$SHOBJPREFIX' - - env['PYEXTRUNTIME'] = SCons.Util.CLVar("") - # XXX: this should be handled with different flags - env['_PYEXTRUNTIME'] = '$( ${_concat(LIBLINKPREFIX, PYEXTRUNTIME, '\ - 'LIBLINKSUFFIX, __env__)} $)' - # XXX: This won't work in all cases (using mingw, for example). To make - # this work, we need to know whether PYEXTCC accepts /c and /Fo or -c -o. - # This is difficult with the current way tools work in scons. - pycc, pycxx, pylink = pyext_coms(sys.platform) - - env['PYEXTLINKFLAGSEND'] = SCons.Util.CLVar('$LINKFLAGSEND') - - env['PYEXTCCCOM'] = pycc - env['PYEXTCXXCOM'] = pycxx - env['PYEXTLINKCOM'] = pylink - -def _set_configuration_nodistutils(env): - # Set env variables to sensible values when not using distutils - def_cfg = {'PYEXTCC' : '$SHCC', - 'PYEXTCFLAGS' : '$SHCFLAGS', - 'PYEXTCCFLAGS' : '$SHCCFLAGS', - 'PYEXTCXX' : '$SHCXX', - 'PYEXTCXXFLAGS' : '$SHCXXFLAGS', - 'PYEXTLINK' : '$LDMODULE', - 'PYEXTSUFFIX' : '$LDMODULESUFFIX', - 'PYEXTPREFIX' : ''} - - if sys.platform == 'darwin': - def_cfg['PYEXTSUFFIX'] = '.so' - - for k, v in def_cfg.items(): - ifnotset(env, k, v) - - ifnotset(env, 'PYEXT_ALLOW_UNDEFINED', - SCons.Util.CLVar('$ALLOW_UNDEFINED')) - ifnotset(env, 'PYEXTLINKFLAGS', SCons.Util.CLVar('$LDMODULEFLAGS')) - - env.AppendUnique(PYEXTLINKFLAGS = env['PYEXT_ALLOW_UNDEFINED']) - -def ifnotset(env, name, value): - if not env.has_key(name): - env[name] = value - -def set_configuration(env, use_distutils): - """Set construction variables which are platform dependants. - - If use_distutils == True, use distutils configuration. Otherwise, use - 'sensible' default. - - Any variable already defined is untouched.""" - - # We define commands as strings so that we can either execute them using - # eval (same python for scons and distutils) or by executing them through - # the shell. - dist_cfg = {'PYEXTCC': ("sysconfig.get_config_var('CC')", False), - 'PYEXTCFLAGS': ("sysconfig.get_config_var('CFLAGS')", True), - 'PYEXTCCSHARED': ("sysconfig.get_config_var('CCSHARED')", False), - 'PYEXTLINKFLAGS': ("sysconfig.get_config_var('LDFLAGS')", True), - 'PYEXTLINK': ("sysconfig.get_config_var('LDSHARED')", False), - 'PYEXTINCPATH': ("sysconfig.get_python_inc()", False), - 'PYEXTSUFFIX': ("sysconfig.get_config_var('SO')", False)} - - from distutils import sysconfig - - # We set the python path even when not using distutils, because we rarely - # want to change this, even if not using distutils - ifnotset(env, 'PYEXTINCPATH', sysconfig.get_python_inc()) - - if use_distutils: - for k, (v, should_split) in dist_cfg.items(): - val = eval(v) - if should_split: - val = val.split() - ifnotset(env, k, val) - else: - _set_configuration_nodistutils(env) - -def generate(env): - """Add Builders and construction variables for python extensions to an - Environment.""" - - if not env.has_key('PYEXT_USE_DISTUTILS'): - env['PYEXT_USE_DISTUTILS'] = False - - # This sets all constructions variables used for pyext builders. - set_basic_vars(env) - - set_configuration(env, env['PYEXT_USE_DISTUTILS']) - - # Create the PythonObject builder - pyobj = createPythonObjectBuilder(env) - action = SCons.Action.Action("$PYEXTCCCOM", "$PYEXTCCCOMSTR") - pyobj.add_emitter('.c', SCons.Defaults.SharedObjectEmitter) - pyobj.add_action('.c', action) - - action = SCons.Action.Action("$PYEXTCXXCOM", "$PYEXTCXXCOMSTR") - pyobj.add_emitter('$CXXFILESUFFIX', SCons.Defaults.SharedObjectEmitter) - pyobj.add_action('$CXXFILESUFFIX', action) - - # Create the PythonExtension builder - createPythonExtensionBuilder(env) - -def exists(env): - try: - # This is not quite right: if someone defines all variables by himself, - # it would work without distutils - from distutils import sysconfig - return True - except ImportError: - return False diff --git a/third_party/cython/src/USAGE.txt b/third_party/cython/src/USAGE.txt deleted file mode 100644 index 13d07ad7e1c60..0000000000000 --- a/third_party/cython/src/USAGE.txt +++ /dev/null @@ -1,75 +0,0 @@ -Cython - Usage Instructions -========================== - -Building Cython extensions using distutils ------------------------------------------ - -Cython comes with an experimental distutils extension for compiling -Cython modules, contributed by Graham Fawcett of the University of -Windsor (fawcett@uwindsor.ca). - -The Demos directory contains a setup.py file demonstrating its use. To -compile the demos: - -(1) cd Demos - -(2) python setup.py build_ext --inplace - - or - - python setup.py build --build-lib=. - -(You may get a screed of warnings from the C compiler, but you can -ignore these -- as long as there are no actual errors, things are -probably okay.) - -Try out the extensions with: - - python run_primes.py - python run_spam.py - python run_numeric_demo.py - - -Building Cython extensions by hand ---------------------------------- - -You can also invoke the Cython compiler on its own to translate a .pyx -file to a .c file. On Unix, - - cython filename.pyx - -On other platforms, - - python cython.py filename.pyx - -It's then up to you to compile and link the .c file using whatever -procedure is appropriate for your platform. The file -Makefile.nodistutils in the Demos directory shows how to do this for -one particular Unix system. - - -Command line options --------------------- - -The cython command supports the following options: - - Short Long Argument Description - ----------------------------------------------------------------------------- - -v --version Display version number of cython compiler - -l --create-listing Write error messages to a .lis file - -I --include-dir Search for include files in named - directory (may be repeated) - -o --output-file Specify name of generated C file (only - one source file allowed if this is used) - -p, --embed-positions If specified, the positions in Cython files of each - function definition is embedded in its docstring. - -z, --pre-import If specified, assume undeclared names in this - module. Emulates the behavior of putting - "from import *" at the top of the file. - - -Anything else is taken as the name of a Cython source file and compiled -to a C source file. Multiple Cython source files can be specified -(unless -o is used), in which case each source file is treated as the -source of a distinct extension module and compiled separately to -produce its own C file. diff --git a/third_party/cython/src/bin/cygdb b/third_party/cython/src/bin/cygdb deleted file mode 100755 index 7f2d57f5d606a..0000000000000 --- a/third_party/cython/src/bin/cygdb +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python - -import sys - -from Cython.Debugger import Cygdb as cygdb - -if __name__ == '__main__': - cygdb.main() diff --git a/third_party/cython/src/bin/cython b/third_party/cython/src/bin/cython deleted file mode 100755 index 2acad0d0e74b7..0000000000000 --- a/third_party/cython/src/bin/cython +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python - -# -# Cython -- Main Program, Unix -# - -from Cython.Compiler.Main import main -main(command_line = 1) diff --git a/third_party/cython/src/bin/cython.bat b/third_party/cython/src/bin/cython.bat deleted file mode 100755 index 13690f08a39d2..0000000000000 --- a/third_party/cython/src/bin/cython.bat +++ /dev/null @@ -1,6 +0,0 @@ -@REM Start cython from windows commandline as "cython", not "cython.py". -@REM This is especially useful for windows power shell, as no extra window -@REM is used. - -@echo OFF -python -c "from Cython.Compiler.Main import main; main(command_line = 1)" %* diff --git a/third_party/cython/src/bin/cython_freeze b/third_party/cython/src/bin/cython_freeze deleted file mode 100755 index 74f365689ab11..0000000000000 --- a/third_party/cython/src/bin/cython_freeze +++ /dev/null @@ -1,257 +0,0 @@ -#!/usr/bin/env python -""" -Create a C file for embedding one or more Cython source files. -Requires Cython 0.11.2 (or perhaps newer). - -See Demos/freeze/README.txt for more details. -""" - -import optparse -from os.path import splitext, basename - -usage= '%prog [-o outfile] [-p] module [module ...]' -description = 'Create a C file for embedding Cython modules.' -p = optparse.OptionParser(usage=usage, description=description) -p.add_option('-o', '--output', metavar='FILE', - help='write output to FILE instead of standard output') -p.add_option('-p', '--pymain', action='store_true', default=False, - help='do not automatically run the first module as __main__') - -options, args = p.parse_args() - -if len(args) < 1: - p.print_help() - p.exit(1) - -if options.output: - import sys - old_stdout = sys.stdout - sys.stdout = open(options.output, 'w') - -modules = [basename(splitext(x)[0]).replace('.', '_') for x in args] - -print """\ -#include -#include -#include -#include - -#ifdef __FreeBSD__ -#include -#endif - -#if PY_MAJOR_VERSION < 3 -# define MODINIT(name) init ## name -#else -# define MODINIT(name) PyInit_ ## name -#endif -""" - -for name in modules: - print "PyMODINIT_FUNC MODINIT(%s) (void);" % name - -print """ -static struct _inittab inittab[] = {""" - -for name in modules: - print ' {"%(name)s", MODINIT(%(name)s)},' % {'name' : name} - -print """ {NULL, NULL} -}; -""", - -if not options.pymain: - print "\nextern int __pyx_module_is_main_%s;" % modules[0] - -print """ -#if PY_MAJOR_VERSION < 3 -int main(int argc, char** argv) { -#elif defined(WIN32) || defined(MS_WINDOWS) -int wmain(int argc, wchar_t **argv) { -#else -static int python_main(int argc, wchar_t **argv) { -#endif -""", -if not options.pymain: - print """\ - PyObject *m = NULL; - int r = 0; -""", -print """\ - /* 754 requires that FP exceptions run in "no stop" mode by default, - * and until C vendors implement C99's ways to control FP exceptions, - * Python requires non-stop mode. Alas, some platforms enable FP - * exceptions by default. Here we disable them. - */ -#ifdef __FreeBSD__ - fp_except_t m; - - m = fpgetmask(); - fpsetmask(m & ~FP_X_OFL); -#endif - if (PyImport_ExtendInittab(inittab)) { - fprintf(stderr, "No memory\\n"); - exit(1); - } -""", -if options.pymain: - print """\ - return Py_Main(argc, argv); -} -""" -else: - print """\ - Py_SetProgramName(argv[0]); - Py_Initialize(); - PySys_SetArgv(argc, argv); - __pyx_module_is_main_%(main)s = 1; - m = PyImport_ImportModule(inittab[0].name); - if (!m) { - r = 1; - PyErr_Print(); /* This exits with the right code if SystemExit. */ -#if PY_MAJOR_VERSION < 3 - if (Py_FlushLine()) - PyErr_Clear(); -#endif - } - Py_XDECREF(m); - Py_Finalize(); - return r; -} -""" % {'main' : modules[0]}, - -print r""" -#if PY_MAJOR_VERSION >= 3 && !defined(WIN32) && !defined(MS_WINDOWS) -static wchar_t* -char2wchar(char* arg) -{ - wchar_t *res; -#ifdef HAVE_BROKEN_MBSTOWCS - /* Some platforms have a broken implementation of - * mbstowcs which does not count the characters that - * would result from conversion. Use an upper bound. - */ - size_t argsize = strlen(arg); -#else - size_t argsize = mbstowcs(NULL, arg, 0); -#endif - size_t count; - unsigned char *in; - wchar_t *out; -#ifdef HAVE_MBRTOWC - mbstate_t mbs; -#endif - if (argsize != (size_t)-1) { - res = (wchar_t *)malloc((argsize+1)*sizeof(wchar_t)); - if (!res) - goto oom; - count = mbstowcs(res, arg, argsize+1); - if (count != (size_t)-1) { - wchar_t *tmp; - /* Only use the result if it contains no - surrogate characters. */ - for (tmp = res; *tmp != 0 && - (*tmp < 0xd800 || *tmp > 0xdfff); tmp++) - ; - if (*tmp == 0) - return res; - } - free(res); - } - /* Conversion failed. Fall back to escaping with surrogateescape. */ -#ifdef HAVE_MBRTOWC - /* Try conversion with mbrtwoc (C99), and escape non-decodable bytes. */ - - /* Overallocate; as multi-byte characters are in the argument, the - actual output could use less memory. */ - argsize = strlen(arg) + 1; - res = malloc(argsize*sizeof(wchar_t)); - if (!res) goto oom; - in = (unsigned char*)arg; - out = res; - memset(&mbs, 0, sizeof mbs); - while (argsize) { - size_t converted = mbrtowc(out, (char*)in, argsize, &mbs); - if (converted == 0) - /* Reached end of string; null char stored. */ - break; - if (converted == (size_t)-2) { - /* Incomplete character. This should never happen, - since we provide everything that we have - - unless there is a bug in the C library, or I - misunderstood how mbrtowc works. */ - fprintf(stderr, "unexpected mbrtowc result -2\n"); - return NULL; - } - if (converted == (size_t)-1) { - /* Conversion error. Escape as UTF-8b, and start over - in the initial shift state. */ - *out++ = 0xdc00 + *in++; - argsize--; - memset(&mbs, 0, sizeof mbs); - continue; - } - if (*out >= 0xd800 && *out <= 0xdfff) { - /* Surrogate character. Escape the original - byte sequence with surrogateescape. */ - argsize -= converted; - while (converted--) - *out++ = 0xdc00 + *in++; - continue; - } - /* successfully converted some bytes */ - in += converted; - argsize -= converted; - out++; - } -#else - /* Cannot use C locale for escaping; manually escape as if charset - is ASCII (i.e. escape all bytes > 128. This will still roundtrip - correctly in the locale's charset, which must be an ASCII superset. */ - res = malloc((strlen(arg)+1)*sizeof(wchar_t)); - if (!res) goto oom; - in = (unsigned char*)arg; - out = res; - while(*in) - if(*in < 128) - *out++ = *in++; - else - *out++ = 0xdc00 + *in++; - *out = 0; -#endif - return res; -oom: - fprintf(stderr, "out of memory\n"); - return NULL; -} - -int -main(int argc, char **argv) -{ - wchar_t **argv_copy = (wchar_t **)malloc(sizeof(wchar_t*)*argc); - /* We need a second copies, as Python might modify the first one. */ - wchar_t **argv_copy2 = (wchar_t **)malloc(sizeof(wchar_t*)*argc); - int i, res; - char *oldloc; - if (!argv_copy || !argv_copy2) { - fprintf(stderr, "out of memory\n"); - return 1; - } - oldloc = strdup(setlocale(LC_ALL, NULL)); - setlocale(LC_ALL, ""); - for (i = 0; i < argc; i++) { - argv_copy2[i] = argv_copy[i] = char2wchar(argv[i]); - if (!argv_copy[i]) - return 1; - } - setlocale(LC_ALL, oldloc); - free(oldloc); - res = python_main(argc, argv_copy); - for (i = 0; i < argc; i++) { - free(argv_copy2[i]); - } - free(argv_copy); - free(argv_copy2); - return res; -} -#endif""" diff --git a/third_party/cython/src/bin/cythonize b/third_party/cython/src/bin/cythonize deleted file mode 100755 index 465f6ff543d05..0000000000000 --- a/third_party/cython/src/bin/cythonize +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python - -# -# command line frontend for cythonize() -# - -from Cython.Build.Cythonize import main -main() diff --git a/third_party/cython/src/bin/cythonrun b/third_party/cython/src/bin/cythonrun deleted file mode 100755 index 1c619549221a9..0000000000000 --- a/third_party/cython/src/bin/cythonrun +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env python - -""" -Compile a Python script into an executable that embeds CPython and run it. -Requires CPython to be built as a shared library ('libpythonX.Y'). - -Basic usage: - - python cythonrun somefile.py [ARGS] -""" - -from Cython.Build.BuildExecutable import build, build_and_run - -if __name__ == '__main__': - import sys - build_and_run(sys.argv[1:]) diff --git a/third_party/cython/src/cygdb.py b/third_party/cython/src/cygdb.py deleted file mode 100755 index 7f2d57f5d606a..0000000000000 --- a/third_party/cython/src/cygdb.py +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python - -import sys - -from Cython.Debugger import Cygdb as cygdb - -if __name__ == '__main__': - cygdb.main() diff --git a/third_party/cython/src/cython.py b/third_party/cython/src/cython.py deleted file mode 100755 index bcc2d8667ad37..0000000000000 --- a/third_party/cython/src/cython.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python - -# -# Cython -- Main Program, generic -# - -if __name__ == '__main__': - - import os - import sys - - # Make sure we import the right Cython - cythonpath, _ = os.path.split(os.path.realpath(__file__)) - sys.path.insert(0, cythonpath) - - from Cython.Compiler.Main import main - main(command_line = 1) - -else: - # Void cython.* directives. - from Cython.Shadow import * - ## and bring in the __version__ - from Cython import __version__ diff --git a/third_party/cython/src/pylintrc b/third_party/cython/src/pylintrc deleted file mode 100644 index 42a5a4e0ba180..0000000000000 --- a/third_party/cython/src/pylintrc +++ /dev/null @@ -1,259 +0,0 @@ -[MASTER] - -# Specify a configuration file. -#rcfile= - -# Python code to execute, usually for sys.path manipulation such as -# pygtk.require(). -#init-hook= - -# Profiled execution. -profile=no - -# Add files or directories to the blacklist. They should be base names, not -# paths. -ignore=CVS - -# Pickle collected data for later comparisons. -persistent=yes - -# List of plugins (as comma separated values of python modules names) to load, -# usually to register additional checkers. -load-plugins= - - -[MESSAGES CONTROL] - -# Enable the message, report, category or checker with the given id(s). You can -# either give multiple identifier separated by comma (,) or put this option -# multiple time. -#enable= - -# Disable the message, report, category or checker with the given id(s). You -# can either give multiple identifier separated by comma (,) or put this option -# multiple time (only on the command line, not in the configuration file where -# it should appear only once). -disable=E1101,C0111 - - -[REPORTS] - -# Set the output format. Available formats are text, parseable, colorized, msvs -# (visual studio) and html. You can also give a reporter class, eg -# mypackage.mymodule.MyReporterClass. -output-format=parseable - -# Include message's id in output -include-ids=yes - -# Include symbolic ids of messages in output -symbols=no - -# Put messages in a separate file for each module / package specified on the -# command line instead of printing them on stdout. Reports (if any) will be -# written in a file name "pylint_global.[txt|html]". -files-output=no - -# Tells whether to display a full report or only the messages -reports=no - -# Python expression which should return a note less than 10 (10 is the highest -# note). You have access to the variables errors warning, statement which -# respectively contain the number of errors / warnings messages and the total -# number of statements analyzed. This is used by the global evaluation report -# (RP0004). -evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) - -# Add a comment according to your evaluation note. This is used by the global -# evaluation report (RP0004). -comment=no - - -[MISCELLANEOUS] - -# List of note tags to take in consideration, separated by a comma. -notes=FIXME,XXX,TODO - - -[BASIC] - -# Required attributes for module, separated by a comma -required-attributes= - -# List of builtins function names that should not be used, separated by a comma -bad-functions=map,filter,apply,input - -# Regular expression which should only match correct module names -module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ - -# Regular expression which should only match correct module level names -const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ - -# Regular expression which should only match correct class names -class-rgx=[A-Z_][a-zA-Z0-9]+$ - -# Regular expression which should only match correct function names -function-rgx=[a-z_][a-z0-9_]{2,30}$ - -# Regular expression which should only match correct method names -method-rgx=[a-z_][a-z0-9_]{2,30}|visit_[A-Za-z]+$ - -# Regular expression which should only match correct instance attribute names -attr-rgx=[a-z_][a-z0-9_]{2,30}$ - -# Regular expression which should only match correct argument names -argument-rgx=[a-z_][a-z0-9_]{2,30}$ - -# Regular expression which should only match correct variable names -variable-rgx=[a-z_][a-z0-9_]{2,30}$ - -# Regular expression which should only match correct list comprehension / -# generator expression variable names -inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ - -# Good variable names which should always be accepted, separated by a comma -good-names=i,j,k,ex,Run,_ - -# Bad variable names which should always be refused, separated by a comma -bad-names=foo,bar,baz,toto,tutu,tata - -# Regular expression which should only match functions or classes name which do -# not require a docstring -no-docstring-rgx=__.*__ - - -[FORMAT] - -# Maximum number of characters on a single line. -max-line-length=120 - -# Maximum number of lines in a module -max-module-lines=15000 - -# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 -# tab). -indent-string=' ' - - -[SIMILARITIES] - -# Minimum lines number of a similarity. -min-similarity-lines=4 - -# Ignore comments when computing similarities. -ignore-comments=yes - -# Ignore docstrings when computing similarities. -ignore-docstrings=yes - -# Ignore imports when computing similarities. -ignore-imports=no - - -[TYPECHECK] - -# Tells whether missing members accessed in mixin class should be ignored. A -# mixin class is detected if its name ends with "mixin" (case insensitive). -ignore-mixin-members=yes - -# List of classes names for which member attributes should not be checked -# (useful for classes with attributes dynamically set). -ignored-classes=SQLObject - -# When zope mode is activated, add a predefined set of Zope acquired attributes -# to generated-members. -zope=no - -# List of members which are set dynamically and missed by pylint inference -# system, and so shouldn't trigger E0201 when accessed. Python regular -# expressions are accepted. -generated-members=REQUEST,acl_users,aq_parent - - -[VARIABLES] - -# Tells whether we should check for unused import in __init__ files. -init-import=no - -# A regular expression matching the beginning of the name of dummy variables -# (i.e. not used). -dummy-variables-rgx=_|dummy - -# List of additional names supposed to be defined in builtins. Remember that -# you should avoid to define new builtins when possible. -additional-builtins= - - -[IMPORTS] - -# Deprecated modules which should not be used, separated by a comma -deprecated-modules=regsub,string,TERMIOS,Bastion,rexec - -# Create a graph of every (i.e. internal and external) dependencies in the -# given file (report RP0402 must not be disabled) -import-graph= - -# Create a graph of external dependencies in the given file (report RP0402 must -# not be disabled) -ext-import-graph= - -# Create a graph of internal dependencies in the given file (report RP0402 must -# not be disabled) -int-import-graph= - - -[DESIGN] - -# Maximum number of arguments for function / method -max-args=5 - -# Argument names that match this expression will be ignored. Default to name -# with leading underscore -ignored-argument-names=_.* - -# Maximum number of locals for function / method body -max-locals=15 - -# Maximum number of return / yield for function / method body -max-returns=6 - -# Maximum number of branch for function / method body -max-branchs=12 - -# Maximum number of statements in function / method body -max-statements=50 - -# Maximum number of parents for a class (see R0901). -max-parents=7 - -# Maximum number of attributes for a class (see R0902). -max-attributes=7 - -# Minimum number of public methods for a class (see R0903). -min-public-methods=2 - -# Maximum number of public methods for a class (see R0904). -max-public-methods=20 - - -[CLASSES] - -# List of interface methods to ignore, separated by a comma. This is used for -# instance to not check methods defines in Zope's Interface base class. -ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by - -# List of method names used to declare (i.e. assign) instance attributes. -defining-attr-methods=__init__,__new__,setUp - -# List of valid names for the first argument in a class method. -valid-classmethod-first-arg=cls - -# List of valid names for the first argument in a metaclass class method. -valid-metaclass-classmethod-first-arg=mcs - - -[EXCEPTIONS] - -# Exceptions that will emit a warning when being caught. Defaults to -# "Exception" -overgeneral-exceptions=Exception diff --git a/third_party/cython/src/pyximport/PKG-INFO b/third_party/cython/src/pyximport/PKG-INFO deleted file mode 100644 index 6d1b811a6228e..0000000000000 --- a/third_party/cython/src/pyximport/PKG-INFO +++ /dev/null @@ -1,11 +0,0 @@ -Metadata-Version: 1.0 -Name: pyximport -Version: 1.0 -Summary: Hooks to build and run Pyrex files as if they were simple Python files -Home-page: http://www.prescod.net/pyximport -Author: Paul Prescod -Author-email: paul@prescod.net -License: Python -Description: UNKNOWN -Keywords: pyrex import hook -Platform: UNKNOWN diff --git a/third_party/cython/src/pyximport/README b/third_party/cython/src/pyximport/README deleted file mode 100644 index 4940ec16d1d8a..0000000000000 --- a/third_party/cython/src/pyximport/README +++ /dev/null @@ -1,73 +0,0 @@ - == Pyximport == - -Download: pyx-import-1.0.tar.gz - - -Pyrex is a compiler. Therefore it is natural that people tend to go -through an edit/compile/test cycle with Pyrex modules. But my personal -opinion is that one of the deep insights in Python's implementation is -that a language can be compiled (Python modules are compiled to .pyc) -files and hide that compilation process from the end-user so that they -do not have to worry about it. Pyximport does this for Pyrex modules. -For instance if you write a Pyrex module called "foo.pyx", with -Pyximport you can import it in a regular Python module like this: - - -import pyximport; pyximport.install() -import foo - -Doing so will result in the compilation of foo.pyx (with appropriate -exceptions if it has an error in it). - -If you would always like to import pyrex files without building them -specially, you can also the first line above to your sitecustomize.py. -That will install the hook every time you run Python. Then you can use -Pyrex modules just with simple import statements. I like to test my -Pyrex modules like this: - - -python -c "import foo" - -See help(pyximport.install) to learn its options for controlling the -default behavior of "import" and "reload". - - == Dependency Handling == - -In Pyximport 1.1 it is possible to declare that your module depends on -multiple files, (likely ".h" and ".pxd" files). If your Pyrex module is -named "foo" and thus has the filename "foo.pyx" then you should make -another file in the same directory called "foo.pyxdep". The -"modname.pyxdep" file can be a list of filenames or "globs" (like -"*.pxd" or "include/*.h"). Each filename or glob must be on a separate -line. Pyximport will check the file date for each of those files before -deciding whether to rebuild the module. In order to keep track of the -fact that the dependency has been handled, Pyximport updates the -modification time of your ".pyx" source file. Future versions may do -something more sophisticated like informing distutils of the -dependencies directly. - - == Limitations == - -Pyximport does not give you any control over how your Pyrex file is -compiled. Usually the defaults are fine. You might run into problems if -you wanted to write your program in half-C, half-Pyrex and build them -into a single library. Pyximport 1.2 will probably do this. - -Pyximport does not hide the Distutils/GCC warnings and errors generated -by the import process. Arguably this will give you better feedback if -something went wrong and why. And if nothing went wrong it will give you -the warm fuzzy that pyximport really did rebuild your module as it was -supposed to. - - == For further thought and discussion == - -"setup.py install" does not modify sitecustomize.py for you. Should it? -Modifying Python's "standard interpreter" behaviour may be more than -most people expect of a package they install.. - -Pyximport puts your ".c" file beside your ".pyx" file (analogous to -".pyc" beside ".py"). But it puts the platform-specific binary in a -build directory as per normal for Distutils. If I could wave a magic -wand and get Pyrex or distutils or whoever to put the build directory I -might do it but not necessarily: having it at the top level is VERY -HELPFUL for debugging Pyrex problems. diff --git a/third_party/cython/src/pyximport/__init__.py b/third_party/cython/src/pyximport/__init__.py deleted file mode 100644 index 3eb12d0d30008..0000000000000 --- a/third_party/cython/src/pyximport/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from pyximport import * - -# replicate docstring -from pyximport import __doc__ diff --git a/third_party/cython/src/pyximport/pyxbuild.py b/third_party/cython/src/pyximport/pyxbuild.py deleted file mode 100644 index 82401cdbc921d..0000000000000 --- a/third_party/cython/src/pyximport/pyxbuild.py +++ /dev/null @@ -1,161 +0,0 @@ -"""Build a Pyrex file from .pyx source to .so loadable module using -the installed distutils infrastructure. Call: - -out_fname = pyx_to_dll("foo.pyx") -""" -import os -import sys - -from distutils.dist import Distribution -from distutils.errors import DistutilsArgError, DistutilsError, CCompilerError -from distutils.extension import Extension -from distutils.util import grok_environment_error -try: - from Cython.Distutils import build_ext - HAS_CYTHON = True -except ImportError: - HAS_CYTHON = False - -DEBUG = 0 - -_reloads={} - -def pyx_to_dll(filename, ext = None, force_rebuild = 0, - build_in_temp=False, pyxbuild_dir=None, setup_args={}, - reload_support=False, inplace=False): - """Compile a PYX file to a DLL and return the name of the generated .so - or .dll .""" - assert os.path.exists(filename), "Could not find %s" % os.path.abspath(filename) - - path, name = os.path.split(os.path.abspath(filename)) - - if not ext: - modname, extension = os.path.splitext(name) - assert extension in (".pyx", ".py"), extension - if not HAS_CYTHON: - filename = filename[:-len(extension)] + '.c' - ext = Extension(name=modname, sources=[filename]) - - if not pyxbuild_dir: - pyxbuild_dir = os.path.join(path, "_pyxbld") - - package_base_dir = path - for package_name in ext.name.split('.')[-2::-1]: - package_base_dir, pname = os.path.split(package_base_dir) - if pname != package_name: - # something is wrong - package path doesn't match file path - package_base_dir = None - break - - script_args=setup_args.get("script_args",[]) - if DEBUG or "--verbose" in script_args: - quiet = "--verbose" - else: - quiet = "--quiet" - args = [quiet, "build_ext"] - if force_rebuild: - args.append("--force") - if inplace and package_base_dir: - args.extend(['--build-lib', package_base_dir]) - if ext.name == '__init__' or ext.name.endswith('.__init__'): - # package => provide __path__ early - if not hasattr(ext, 'cython_directives'): - ext.cython_directives = {'set_initial_path' : 'SOURCEFILE'} - elif 'set_initial_path' not in ext.cython_directives: - ext.cython_directives['set_initial_path'] = 'SOURCEFILE' - - if HAS_CYTHON and build_in_temp: - args.append("--pyrex-c-in-temp") - sargs = setup_args.copy() - sargs.update( - {"script_name": None, - "script_args": args + script_args} ) - dist = Distribution(sargs) - if not dist.ext_modules: - dist.ext_modules = [] - dist.ext_modules.append(ext) - if HAS_CYTHON: - dist.cmdclass = {'build_ext': build_ext} - build = dist.get_command_obj('build') - build.build_base = pyxbuild_dir - - config_files = dist.find_config_files() - try: config_files.remove('setup.cfg') - except ValueError: pass - dist.parse_config_files(config_files) - - cfgfiles = dist.find_config_files() - try: cfgfiles.remove('setup.cfg') - except ValueError: pass - dist.parse_config_files(cfgfiles) - try: - ok = dist.parse_command_line() - except DistutilsArgError: - raise - - if DEBUG: - print("options (after parsing command line):") - dist.dump_option_dicts() - assert ok - - - try: - obj_build_ext = dist.get_command_obj("build_ext") - dist.run_commands() - so_path = obj_build_ext.get_outputs()[0] - if obj_build_ext.inplace: - # Python distutils get_outputs()[ returns a wrong so_path - # when --inplace ; see http://bugs.python.org/issue5977 - # workaround: - so_path = os.path.join(os.path.dirname(filename), - os.path.basename(so_path)) - if reload_support: - org_path = so_path - timestamp = os.path.getmtime(org_path) - global _reloads - last_timestamp, last_path, count = _reloads.get(org_path, (None,None,0) ) - if last_timestamp == timestamp: - so_path = last_path - else: - basename = os.path.basename(org_path) - while count < 100: - count += 1 - r_path = os.path.join(obj_build_ext.build_lib, - basename + '.reload%s'%count) - try: - import shutil # late import / reload_support is: debugging - try: - # Try to unlink first --- if the .so file - # is mmapped by another process, - # overwriting its contents corrupts the - # loaded image (on Linux) and crashes the - # other process. On Windows, unlinking an - # open file just fails. - if os.path.isfile(r_path): - os.unlink(r_path) - except OSError: - continue - shutil.copy2(org_path, r_path) - so_path = r_path - except IOError: - continue - break - else: - # used up all 100 slots - raise ImportError("reload count for %s reached maximum"%org_path) - _reloads[org_path]=(timestamp, so_path, count) - return so_path - except KeyboardInterrupt: - sys.exit(1) - except (IOError, os.error): - exc = sys.exc_info()[1] - error = grok_environment_error(exc) - - if DEBUG: - sys.stderr.write(error + "\n") - raise - -if __name__=="__main__": - pyx_to_dll("dummy.pyx") - import test - diff --git a/third_party/cython/src/pyximport/pyximport.py b/third_party/cython/src/pyximport/pyximport.py deleted file mode 100644 index 4fd7fe90e70b0..0000000000000 --- a/third_party/cython/src/pyximport/pyximport.py +++ /dev/null @@ -1,559 +0,0 @@ -""" -Import hooks; when installed with the install() function, these hooks -allow importing .pyx files as if they were Python modules. - -If you want the hook installed every time you run Python -you can add it to your Python version by adding these lines to -sitecustomize.py (which you can create from scratch in site-packages -if it doesn't exist there or somewhere else on your python path):: - - import pyximport - pyximport.install() - -For instance on the Mac with a non-system Python 2.3, you could create -sitecustomize.py with only those two lines at -/usr/local/lib/python2.3/site-packages/sitecustomize.py . - -A custom distutils.core.Extension instance and setup() args -(Distribution) for for the build can be defined by a .pyxbld -file like: - -# examplemod.pyxbld -def make_ext(modname, pyxfilename): - from distutils.extension import Extension - return Extension(name = modname, - sources=[pyxfilename, 'hello.c'], - include_dirs=['/myinclude'] ) -def make_setup_args(): - return dict(script_args=["--compiler=mingw32"]) - -Extra dependencies can be defined by a .pyxdep . -See README. - -Since Cython 0.11, the :mod:`pyximport` module also has experimental -compilation support for normal Python modules. This allows you to -automatically run Cython on every .pyx and .py module that Python -imports, including parts of the standard library and installed -packages. Cython will still fail to compile a lot of Python modules, -in which case the import mechanism will fall back to loading the -Python source modules instead. The .py import mechanism is installed -like this:: - - pyximport.install(pyimport = True) - -Running this module as a top-level script will run a test and then print -the documentation. - -This code is based on the Py2.3+ import protocol as described in PEP 302. -""" - -import sys -import os -import glob -import imp - -mod_name = "pyximport" - -assert sys.hexversion >= 0x2030000, "need Python 2.3 or later" - -PYX_EXT = ".pyx" -PYXDEP_EXT = ".pyxdep" -PYXBLD_EXT = ".pyxbld" - -DEBUG_IMPORT = False - -def _print(message, args): - if args: - message = message % args - print(message) - -def _debug(message, *args): - if DEBUG_IMPORT: - _print(message, args) - -def _info(message, *args): - _print(message, args) - -# Performance problem: for every PYX file that is imported, we will -# invoke the whole distutils infrastructure even if the module is -# already built. It might be more efficient to only do it when the -# mod time of the .pyx is newer than the mod time of the .so but -# the question is how to get distutils to tell me the name of the .so -# before it builds it. Maybe it is easy...but maybe the peformance -# issue isn't real. -def _load_pyrex(name, filename): - "Load a pyrex file given a name and filename." - -def get_distutils_extension(modname, pyxfilename, language_level=None): -# try: -# import hashlib -# except ImportError: -# import md5 as hashlib -# extra = "_" + hashlib.md5(open(pyxfilename).read()).hexdigest() -# modname = modname + extra - extension_mod,setup_args = handle_special_build(modname, pyxfilename) - if not extension_mod: - if not isinstance(pyxfilename, str): - # distutils is stupid in Py2 and requires exactly 'str' - # => encode accidentally coerced unicode strings back to str - pyxfilename = pyxfilename.encode(sys.getfilesystemencoding()) - from distutils.extension import Extension - extension_mod = Extension(name = modname, sources=[pyxfilename]) - if language_level is not None: - extension_mod.cython_directives = {'language_level': language_level} - return extension_mod,setup_args - -def handle_special_build(modname, pyxfilename): - special_build = os.path.splitext(pyxfilename)[0] + PYXBLD_EXT - ext = None - setup_args={} - if os.path.exists(special_build): - # globls = {} - # locs = {} - # execfile(special_build, globls, locs) - # ext = locs["make_ext"](modname, pyxfilename) - mod = imp.load_source("XXXX", special_build, open(special_build)) - make_ext = getattr(mod,'make_ext',None) - if make_ext: - ext = make_ext(modname, pyxfilename) - assert ext and ext.sources, ("make_ext in %s did not return Extension" - % special_build) - make_setup_args = getattr(mod,'make_setup_args',None) - if make_setup_args: - setup_args = make_setup_args() - assert isinstance(setup_args,dict), ("make_setup_args in %s did not return a dict" - % special_build) - assert set or setup_args, ("neither make_ext nor make_setup_args %s" - % special_build) - ext.sources = [os.path.join(os.path.dirname(special_build), source) - for source in ext.sources] - return ext, setup_args - -def handle_dependencies(pyxfilename): - testing = '_test_files' in globals() - dependfile = os.path.splitext(pyxfilename)[0] + PYXDEP_EXT - - # by default let distutils decide whether to rebuild on its own - # (it has a better idea of what the output file will be) - - # but we know more about dependencies so force a rebuild if - # some of the dependencies are newer than the pyxfile. - if os.path.exists(dependfile): - depends = open(dependfile).readlines() - depends = [depend.strip() for depend in depends] - - # gather dependencies in the "files" variable - # the dependency file is itself a dependency - files = [dependfile] - for depend in depends: - fullpath = os.path.join(os.path.dirname(dependfile), - depend) - files.extend(glob.glob(fullpath)) - - # only for unit testing to see we did the right thing - if testing: - _test_files[:] = [] #$pycheck_no - - # if any file that the pyxfile depends upon is newer than - # the pyx file, 'touch' the pyx file so that distutils will - # be tricked into rebuilding it. - for file in files: - from distutils.dep_util import newer - if newer(file, pyxfilename): - _debug("Rebuilding %s because of %s", pyxfilename, file) - filetime = os.path.getmtime(file) - os.utime(pyxfilename, (filetime, filetime)) - if testing: - _test_files.append(file) - -def build_module(name, pyxfilename, pyxbuild_dir=None, inplace=False, language_level=None): - assert os.path.exists(pyxfilename), ( - "Path does not exist: %s" % pyxfilename) - handle_dependencies(pyxfilename) - - extension_mod,setup_args = get_distutils_extension(name, pyxfilename, language_level) - build_in_temp=pyxargs.build_in_temp - sargs=pyxargs.setup_args.copy() - sargs.update(setup_args) - build_in_temp=sargs.pop('build_in_temp',build_in_temp) - - import pyxbuild - so_path = pyxbuild.pyx_to_dll(pyxfilename, extension_mod, - build_in_temp=build_in_temp, - pyxbuild_dir=pyxbuild_dir, - setup_args=sargs, - inplace=inplace, - reload_support=pyxargs.reload_support) - assert os.path.exists(so_path), "Cannot find: %s" % so_path - - junkpath = os.path.join(os.path.dirname(so_path), name+"_*") #very dangerous with --inplace ? yes, indeed, trying to eat my files ;) - junkstuff = glob.glob(junkpath) - for path in junkstuff: - if path!=so_path: - try: - os.remove(path) - except IOError: - _info("Couldn't remove %s", path) - - return so_path - -def load_module(name, pyxfilename, pyxbuild_dir=None, is_package=False, - build_inplace=False, language_level=None, so_path=None): - try: - if so_path is None: - if is_package: - module_name = name + '.__init__' - else: - module_name = name - so_path = build_module(module_name, pyxfilename, pyxbuild_dir, - inplace=build_inplace, language_level=language_level) - mod = imp.load_dynamic(name, so_path) - if is_package and not hasattr(mod, '__path__'): - mod.__path__ = [os.path.dirname(so_path)] - assert mod.__file__ == so_path, (mod.__file__, so_path) - except Exception: - if pyxargs.load_py_module_on_import_failure and pyxfilename.endswith('.py'): - # try to fall back to normal import - mod = imp.load_source(name, pyxfilename) - assert mod.__file__ in (pyxfilename, pyxfilename+'c', pyxfilename+'o'), (mod.__file__, pyxfilename) - else: - import traceback - raise ImportError("Building module %s failed: %s" % - (name, - traceback.format_exception_only(*sys.exc_info()[:2]))), None, sys.exc_info()[2] - return mod - - -# import hooks - -class PyxImporter(object): - """A meta-path importer for .pyx files. - """ - def __init__(self, extension=PYX_EXT, pyxbuild_dir=None, inplace=False, - language_level=None): - self.extension = extension - self.pyxbuild_dir = pyxbuild_dir - self.inplace = inplace - self.language_level = language_level - - def find_module(self, fullname, package_path=None): - if fullname in sys.modules and not pyxargs.reload_support: - return None # only here when reload() - try: - fp, pathname, (ext,mode,ty) = imp.find_module(fullname,package_path) - if fp: fp.close() # Python should offer a Default-Loader to avoid this double find/open! - if pathname and ty == imp.PKG_DIRECTORY: - pkg_file = os.path.join(pathname, '__init__'+self.extension) - if os.path.isfile(pkg_file): - return PyxLoader(fullname, pathname, - init_path=pkg_file, - pyxbuild_dir=self.pyxbuild_dir, - inplace=self.inplace, - language_level=self.language_level) - if pathname and pathname.endswith(self.extension): - return PyxLoader(fullname, pathname, - pyxbuild_dir=self.pyxbuild_dir, - inplace=self.inplace, - language_level=self.language_level) - if ty != imp.C_EXTENSION: # only when an extension, check if we have a .pyx next! - return None - - # find .pyx fast, when .so/.pyd exist --inplace - pyxpath = os.path.splitext(pathname)[0]+self.extension - if os.path.isfile(pyxpath): - return PyxLoader(fullname, pyxpath, - pyxbuild_dir=self.pyxbuild_dir, - inplace=self.inplace, - language_level=self.language_level) - - # .so/.pyd's on PATH should not be remote from .pyx's - # think no need to implement PyxArgs.importer_search_remote here? - - except ImportError: - pass - - # searching sys.path ... - - #if DEBUG_IMPORT: print "SEARCHING", fullname, package_path - if '.' in fullname: # only when package_path anyway? - mod_parts = fullname.split('.') - module_name = mod_parts[-1] - else: - module_name = fullname - pyx_module_name = module_name + self.extension - # this may work, but it returns the file content, not its path - #import pkgutil - #pyx_source = pkgutil.get_data(package, pyx_module_name) - - if package_path: - paths = package_path - else: - paths = sys.path - join_path = os.path.join - is_file = os.path.isfile - is_abs = os.path.isabs - abspath = os.path.abspath - #is_dir = os.path.isdir - sep = os.path.sep - for path in paths: - if not path: - path = os.getcwd() - elif not is_abs(path): - path = abspath(path) - if is_file(path+sep+pyx_module_name): - return PyxLoader(fullname, join_path(path, pyx_module_name), - pyxbuild_dir=self.pyxbuild_dir, - inplace=self.inplace, - language_level=self.language_level) - - # not found, normal package, not a .pyx file, none of our business - _debug("%s not found" % fullname) - return None - -class PyImporter(PyxImporter): - """A meta-path importer for normal .py files. - """ - def __init__(self, pyxbuild_dir=None, inplace=False, language_level=None): - if language_level is None: - language_level = sys.version_info[0] - self.super = super(PyImporter, self) - self.super.__init__(extension='.py', pyxbuild_dir=pyxbuild_dir, inplace=inplace, - language_level=language_level) - self.uncompilable_modules = {} - self.blocked_modules = ['Cython', 'pyxbuild', 'pyximport.pyxbuild', - 'distutils.extension', 'distutils.sysconfig'] - - def find_module(self, fullname, package_path=None): - if fullname in sys.modules: - return None - if fullname.startswith('Cython.'): - return None - if fullname in self.blocked_modules: - # prevent infinite recursion - return None - if _lib_loader.knows(fullname): - return _lib_loader - _debug("trying import of module '%s'", fullname) - if fullname in self.uncompilable_modules: - path, last_modified = self.uncompilable_modules[fullname] - try: - new_last_modified = os.stat(path).st_mtime - if new_last_modified > last_modified: - # import would fail again - return None - except OSError: - # module is no longer where we found it, retry the import - pass - - self.blocked_modules.append(fullname) - try: - importer = self.super.find_module(fullname, package_path) - if importer is not None: - if importer.init_path: - path = importer.init_path - real_name = fullname + '.__init__' - else: - path = importer.path - real_name = fullname - _debug("importer found path %s for module %s", path, real_name) - try: - so_path = build_module( - real_name, path, - pyxbuild_dir=self.pyxbuild_dir, - language_level=self.language_level, - inplace=self.inplace) - _lib_loader.add_lib(fullname, path, so_path, - is_package=bool(importer.init_path)) - return _lib_loader - except Exception: - if DEBUG_IMPORT: - import traceback - traceback.print_exc() - # build failed, not a compilable Python module - try: - last_modified = os.stat(path).st_mtime - except OSError: - last_modified = 0 - self.uncompilable_modules[fullname] = (path, last_modified) - importer = None - finally: - self.blocked_modules.pop() - return importer - -class LibLoader(object): - def __init__(self): - self._libs = {} - - def load_module(self, fullname): - try: - source_path, so_path, is_package = self._libs[fullname] - except KeyError: - raise ValueError("invalid module %s" % fullname) - _debug("Loading shared library module '%s' from %s", fullname, so_path) - return load_module(fullname, source_path, so_path=so_path, is_package=is_package) - - def add_lib(self, fullname, path, so_path, is_package): - self._libs[fullname] = (path, so_path, is_package) - - def knows(self, fullname): - return fullname in self._libs - -_lib_loader = LibLoader() - -class PyxLoader(object): - def __init__(self, fullname, path, init_path=None, pyxbuild_dir=None, - inplace=False, language_level=None): - _debug("PyxLoader created for loading %s from %s (init path: %s)", - fullname, path, init_path) - self.fullname = fullname - self.path, self.init_path = path, init_path - self.pyxbuild_dir = pyxbuild_dir - self.inplace = inplace - self.language_level = language_level - - def load_module(self, fullname): - assert self.fullname == fullname, ( - "invalid module, expected %s, got %s" % ( - self.fullname, fullname)) - if self.init_path: - # package - #print "PACKAGE", fullname - module = load_module(fullname, self.init_path, - self.pyxbuild_dir, is_package=True, - build_inplace=self.inplace, - language_level=self.language_level) - module.__path__ = [self.path] - else: - #print "MODULE", fullname - module = load_module(fullname, self.path, - self.pyxbuild_dir, - build_inplace=self.inplace, - language_level=self.language_level) - return module - - -#install args -class PyxArgs(object): - build_dir=True - build_in_temp=True - setup_args={} #None - -##pyxargs=None - -def _have_importers(): - has_py_importer = False - has_pyx_importer = False - for importer in sys.meta_path: - if isinstance(importer, PyxImporter): - if isinstance(importer, PyImporter): - has_py_importer = True - else: - has_pyx_importer = True - - return has_py_importer, has_pyx_importer - -def install(pyximport=True, pyimport=False, build_dir=None, build_in_temp=True, - setup_args={}, reload_support=False, - load_py_module_on_import_failure=False, inplace=False, - language_level=None): - """Main entry point. Call this to install the .pyx import hook in - your meta-path for a single Python process. If you want it to be - installed whenever you use Python, add it to your sitecustomize - (as described above). - - You can pass ``pyimport=True`` to also install the .py import hook - in your meta-path. Note, however, that it is highly experimental, - will not work for most .py files, and will therefore only slow - down your imports. Use at your own risk. - - By default, compiled modules will end up in a ``.pyxbld`` - directory in the user's home directory. Passing a different path - as ``build_dir`` will override this. - - ``build_in_temp=False`` will produce the C files locally. Working - with complex dependencies and debugging becomes more easy. This - can principally interfere with existing files of the same name. - build_in_temp can be overriden by .pyxbld/make_setup_args() - by a dict item of 'build_in_temp' - - ``setup_args``: dict of arguments for Distribution - see - distutils.core.setup() . They are extended/overriden by those of - .pyxbld/make_setup_args() - - ``reload_support``: Enables support for dynamic - reload(), e.g. after a change in the Cython code. - Additional files .reloadNN may arise on that account, when - the previously loaded module file cannot be overwritten. - - ``load_py_module_on_import_failure``: If the compilation of a .py - file succeeds, but the subsequent import fails for some reason, - retry the import with the normal .py module instead of the - compiled module. Note that this may lead to unpredictable results - for modules that change the system state during their import, as - the second import will rerun these modifications in whatever state - the system was left after the import of the compiled module - failed. - - ``inplace``: Install the compiled module next to the source file. - - ``language_level``: The source language level to use: 2 or 3. - The default is to use the language level of the current Python - runtime for .py files and Py2 for .pyx files. - """ - if not build_dir: - build_dir = os.path.join(os.path.expanduser('~'), '.pyxbld') - - global pyxargs - pyxargs = PyxArgs() #$pycheck_no - pyxargs.build_dir = build_dir - pyxargs.build_in_temp = build_in_temp - pyxargs.setup_args = (setup_args or {}).copy() - pyxargs.reload_support = reload_support - pyxargs.load_py_module_on_import_failure = load_py_module_on_import_failure - - has_py_importer, has_pyx_importer = _have_importers() - py_importer, pyx_importer = None, None - - if pyimport and not has_py_importer: - py_importer = PyImporter(pyxbuild_dir=build_dir, inplace=inplace, - language_level=language_level) - # make sure we import Cython before we install the import hook - import Cython.Compiler.Main, Cython.Compiler.Pipeline, Cython.Compiler.Optimize - sys.meta_path.insert(0, py_importer) - - if pyximport and not has_pyx_importer: - pyx_importer = PyxImporter(pyxbuild_dir=build_dir, inplace=inplace, - language_level=language_level) - sys.meta_path.append(pyx_importer) - - return py_importer, pyx_importer - -def uninstall(py_importer, pyx_importer): - """ - Uninstall an import hook. - """ - try: - sys.meta_path.remove(py_importer) - except ValueError: - pass - - try: - sys.meta_path.remove(pyx_importer) - except ValueError: - pass - -# MAIN - -def show_docs(): - import __main__ - __main__.__name__ = mod_name - for name in dir(__main__): - item = getattr(__main__, name) - try: - setattr(item, "__module__", mod_name) - except (AttributeError, TypeError): - pass - help(__main__) - -if __name__ == '__main__': - show_docs() diff --git a/third_party/cython/src/pyximport/test/test_pyximport.py b/third_party/cython/src/pyximport/test/test_pyximport.py deleted file mode 100644 index e45d5ff7f434c..0000000000000 --- a/third_party/cython/src/pyximport/test/test_pyximport.py +++ /dev/null @@ -1,65 +0,0 @@ -import pyximport; pyximport.install(reload_support=True) -import os, sys -import time, shutil -import tempfile - -def make_tempdir(): - tempdir = os.path.join(tempfile.gettempdir(), "pyrex_temp") - if os.path.exists(tempdir): - remove_tempdir(tempdir) - - os.mkdir(tempdir) - return tempdir - -def remove_tempdir(tempdir): - shutil.rmtree(tempdir, 0, on_remove_file_error) - -def on_remove_file_error(func, path, excinfo): - print "Sorry! Could not remove a temp file:", path - print "Extra information." - print func, excinfo - print "You may want to delete this yourself when you get a chance." - -def test(): - pyximport._test_files = [] - tempdir = make_tempdir() - sys.path.append(tempdir) - filename = os.path.join(tempdir, "dummy.pyx") - open(filename, "w").write("print 'Hello world from the Pyrex install hook'") - import dummy - reload(dummy) - - depend_filename = os.path.join(tempdir, "dummy.pyxdep") - depend_file = open(depend_filename, "w") - depend_file.write("*.txt\nfoo.bar") - depend_file.close() - - build_filename = os.path.join(tempdir, "dummy.pyxbld") - build_file = open(build_filename, "w") - build_file.write(""" -from distutils.extension import Extension -def make_ext(name, filename): - return Extension(name=name, sources=[filename]) -""") - build_file.close() - - open(os.path.join(tempdir, "foo.bar"), "w").write(" ") - open(os.path.join(tempdir, "1.txt"), "w").write(" ") - open(os.path.join(tempdir, "abc.txt"), "w").write(" ") - reload(dummy) - assert len(pyximport._test_files)==1, pyximport._test_files - reload(dummy) - - time.sleep(1) # sleep a second to get safer mtimes - open(os.path.join(tempdir, "abc.txt"), "w").write(" ") - print "Here goes the reolad" - reload(dummy) - assert len(pyximport._test_files) == 1, pyximport._test_files - - reload(dummy) - assert len(pyximport._test_files) ==0, pyximport._test_files - remove_tempdir(tempdir) - -if __name__=="__main__": - test() - diff --git a/third_party/cython/src/pyximport/test/test_reload.py b/third_party/cython/src/pyximport/test/test_reload.py deleted file mode 100644 index 8013f8dbb822e..0000000000000 --- a/third_party/cython/src/pyximport/test/test_reload.py +++ /dev/null @@ -1,33 +0,0 @@ -# reload seems to work for Python 2.3 but not 2.2. -import time, os, sys -import test_pyximport - -# debugging the 2.2 problem -if 1: - from distutils import sysconfig - try: - sysconfig.set_python_build() - except AttributeError: - pass - import pyxbuild - print pyxbuild.distutils.sysconfig == sysconfig - -def test(): - tempdir = test_pyximport.make_tempdir() - sys.path.append(tempdir) - hello_file = os.path.join(tempdir, "hello.pyx") - open(hello_file, "w").write("x = 1; print x; before = 'before'\n") - import hello - assert hello.x == 1 - - time.sleep(1) # sleep to make sure that new "hello.pyx" has later - # timestamp than object file. - - open(hello_file, "w").write("x = 2; print x; after = 'after'\n") - reload(hello) - assert hello.x == 2, "Reload should work on Python 2.3 but not 2.2" - test_pyximport.remove_tempdir(tempdir) - -if __name__=="__main__": - test() - diff --git a/third_party/cython/src/runtests.py b/third_party/cython/src/runtests.py deleted file mode 100755 index aad79a5a34520..0000000000000 --- a/third_party/cython/src/runtests.py +++ /dev/null @@ -1,1930 +0,0 @@ -#!/usr/bin/env python - -import os -import sys -import re -import gc -import locale -import shutil -import time -import unittest -import doctest -import operator -import subprocess -import tempfile -import traceback -import warnings - -try: - import platform - IS_PYPY = platform.python_implementation() == 'PyPy' - IS_CPYTHON = platform.python_implementation() == 'CPython' -except (ImportError, AttributeError): - IS_CPYTHON = True - IS_PYPY = False - -try: - from StringIO import StringIO -except ImportError: - from io import StringIO - -try: - import cPickle as pickle -except ImportError: - import pickle - -try: - from io import open as io_open -except ImportError: - from codecs import open as io_open - -try: - import threading -except ImportError: # No threads, no problems - threading = None - -try: - from collections import defaultdict -except ImportError: - class defaultdict(object): - def __init__(self, default_factory=lambda : None): - self._dict = {} - self.default_factory = default_factory - def __getitem__(self, key): - if key not in self._dict: - self._dict[key] = self.default_factory() - return self._dict[key] - def __setitem__(self, key, value): - self._dict[key] = value - def __contains__(self, key): - return key in self._dict - def __repr__(self): - return repr(self._dict) - def __nonzero__(self): - return bool(self._dict) - -try: - basestring -except NameError: - basestring = str - -WITH_CYTHON = True -CY3_DIR = None - -from distutils.dist import Distribution -from distutils.core import Extension -from distutils.command.build_ext import build_ext as _build_ext -from distutils import sysconfig -distutils_distro = Distribution() - - -if sys.platform == 'win32': - # TODO: Figure out why this hackery (see http://thread.gmane.org/gmane.comp.python.cython.devel/8280/). - config_files = distutils_distro.find_config_files() - try: config_files.remove('setup.cfg') - except ValueError: pass - distutils_distro.parse_config_files(config_files) - - cfgfiles = distutils_distro.find_config_files() - try: cfgfiles.remove('setup.cfg') - except ValueError: pass - distutils_distro.parse_config_files(cfgfiles) - -EXT_DEP_MODULES = { - 'tag:numpy' : 'numpy', - 'tag:pstats': 'pstats', - 'tag:posix' : 'posix', - 'tag:array' : 'array', -} - -def patch_inspect_isfunction(): - import inspect - orig_isfunction = inspect.isfunction - def isfunction(obj): - return orig_isfunction(obj) or type(obj).__name__ == 'cython_function_or_method' - isfunction._orig_isfunction = orig_isfunction - inspect.isfunction = isfunction - -def unpatch_inspect_isfunction(): - import inspect - try: - orig_isfunction = inspect.isfunction._orig_isfunction - except AttributeError: - pass - else: - inspect.isfunction = orig_isfunction - -def update_linetrace_extension(ext): - ext.define_macros.append(('CYTHON_TRACE', 1)) - return ext - -def update_numpy_extension(ext): - import numpy - from numpy.distutils.misc_util import get_info - - ext.include_dirs.append(numpy.get_include()) - - # We need the npymath library for numpy.math. - # This is typically a static-only library. - for attr, value in get_info('npymath').items(): - getattr(ext, attr).extend(value) - -def update_openmp_extension(ext): - ext.openmp = True - language = ext.language - - if language == 'cpp': - flags = OPENMP_CPP_COMPILER_FLAGS - else: - flags = OPENMP_C_COMPILER_FLAGS - - if flags: - compile_flags, link_flags = flags - - ext.extra_compile_args.extend(compile_flags.split()) - ext.extra_link_args.extend(link_flags.split()) - return ext - elif sys.platform == 'win32': - return ext - - return EXCLUDE_EXT - -def get_openmp_compiler_flags(language): - """ - As of gcc 4.2, it supports OpenMP 2.5. Gcc 4.4 implements 3.0. We don't - (currently) check for other compilers. - - returns a two-tuple of (CFLAGS, LDFLAGS) to build the OpenMP extension - """ - if language == 'cpp': - cc = sysconfig.get_config_var('CXX') - else: - cc = sysconfig.get_config_var('CC') - - if not cc: - if sys.platform == 'win32': - return '/openmp', '' - return None - - # For some reason, cc can be e.g. 'gcc -pthread' - cc = cc.split()[0] - - # Force english output - env = os.environ.copy() - env['LC_MESSAGES'] = 'C' - - matcher = re.compile(r"gcc version (\d+\.\d+)").search - try: - p = subprocess.Popen([cc, "-v"], stderr=subprocess.PIPE, env=env) - except EnvironmentError: - # Be compatible with Python 3 - warnings.warn("Unable to find the %s compiler: %s: %s" % - (language, os.strerror(sys.exc_info()[1].errno), cc)) - return None - _, output = p.communicate() - - output = output.decode(locale.getpreferredencoding() or 'ASCII', 'replace') - - gcc_version = matcher(output) - if not gcc_version: - return None # not gcc - FIXME: do something about other compilers - - compiler_version = gcc_version.group(1) - if compiler_version and compiler_version.split('.') >= ['4', '2']: - return '-fopenmp', '-fopenmp' - -try: - locale.setlocale(locale.LC_ALL, '') -except locale.Error: - pass - -OPENMP_C_COMPILER_FLAGS = get_openmp_compiler_flags('c') -OPENMP_CPP_COMPILER_FLAGS = get_openmp_compiler_flags('cpp') - -# Return this from the EXT_EXTRAS matcher callback to exclude the extension -EXCLUDE_EXT = object() - -EXT_EXTRAS = { - 'tag:numpy' : update_numpy_extension, - 'tag:openmp': update_openmp_extension, - 'tag:trace' : update_linetrace_extension, -} - - -def _is_py3_before_32(excluded, version): - return version[0] >= 3 and version < (3,2) - - -# TODO: use tags -VER_DEP_MODULES = { - # tests are excluded if 'CurrentPythonVersion OP VersionTuple', i.e. - # (2,4) : (operator.lt, ...) excludes ... when PyVer < 2.4.x - (2,4) : (operator.lt, lambda x: x in ['run.extern_builtins_T258', - 'run.builtin_sorted', - 'run.reversed_iteration', - ]), - (2,5) : (operator.lt, lambda x: x in ['run.any', - 'run.all', - 'run.yield_from_pep380', # GeneratorExit - 'run.generator_frame_cycle', # yield in try-finally - 'run.generator_expressions_in_class', - 'run.absolute_import', - 'run.relativeimport_T542', - 'run.relativeimport_star_T542', - 'run.initial_file_path', # relative import - 'run.pynumber_subtype_conversion', # bug in Py2.4 - 'build.cythonize_script', # python2.4 -m a.b.c - 'build.cythonize_script_excludes', # python2.4 -m a.b.c - 'build.cythonize_script_package', # python2.4 -m a.b.c - ]), - (2,6) : (operator.lt, lambda x: x in ['run.print_function', - 'run.language_level', # print function - 'run.cython3', - 'run.property_decorator_T593', # prop.setter etc. - 'run.generators_py', # generators, with statement - 'run.pure_py', # decorators, with statement - 'run.purecdef', - 'run.struct_conversion', - 'run.bytearray_coercion', - 'run.bytearraymethods', - 'run.bytearray_ascii_auto_encoding', - 'run.bytearray_default_auto_encoding', - # memory views require buffer protocol - 'memoryview.relaxed_strides', - 'memoryview.cythonarray', - 'memoryview.memslice', - 'memoryview.numpy_memoryview', - 'memoryview.memoryviewattrs', - 'memoryview.memoryview', - 'run.withstat_py', - ]), - (2,7) : (operator.lt, lambda x: x in ['run.withstat_py27', # multi context with statement - 'run.yield_inside_lambda', - 'run.test_dictviews', - 'run.pyclass_special_methods', - ]), - # The next line should start (3,); but this is a dictionary, so - # we can only have one (3,) key. Since 2.7 is supposed to be the - # last 2.x release, things would have to change drastically for this - # to be unsafe... - (2,999): (operator.lt, lambda x: x in ['run.special_methods_T561_py3', - 'run.test_raisefrom', - ]), - (3,): (operator.ge, lambda x: x in ['run.non_future_division', - 'compile.extsetslice', - 'compile.extdelslice', - 'run.special_methods_T561_py2' - ]), - (3,1): (_is_py3_before_32, lambda x: x in ['run.pyclass_special_methods', - ]), - (3,3) : (operator.lt, lambda x: x in ['build.package_compilation', - ]), - (3,4,0,'beta',3) : (operator.le, lambda x: x in ['run.py34_signature', - ]), -} - -# files that should not be converted to Python 3 code with 2to3 -KEEP_2X_FILES = [ - os.path.join('Cython', 'Debugger', 'Tests', 'test_libcython_in_gdb.py'), - os.path.join('Cython', 'Debugger', 'Tests', 'test_libpython_in_gdb.py'), - os.path.join('Cython', 'Debugger', 'libcython.py'), - os.path.join('Cython', 'Debugger', 'libpython.py'), -] - -COMPILER = None -INCLUDE_DIRS = [ d for d in os.getenv('INCLUDE', '').split(os.pathsep) if d ] -CFLAGS = os.getenv('CFLAGS', '').split() -CCACHE = os.getenv('CYTHON_RUNTESTS_CCACHE', '').split() -TEST_SUPPORT_DIR = 'testsupport' - -BACKENDS = ['c', 'cpp'] - -UTF8_BOM_BYTES = r'\xef\xbb\xbf'.encode('ISO-8859-1').decode('unicode_escape') - - -def memoize(f): - uncomputed = object() - f._cache = {} - def func(*args): - res = f._cache.get(args, uncomputed) - if res is uncomputed: - res = f._cache[args] = f(*args) - return res - return func - - -@memoize -def parse_tags(filepath): - tags = defaultdict(list) - parse_tag = re.compile(r'#\s*(\w+)\s*:(.*)$').match - f = io_open(filepath, encoding='ISO-8859-1', errors='ignore') - try: - for line in f: - # ignore BOM-like bytes and whitespace - line = line.lstrip(UTF8_BOM_BYTES).strip() - if not line: - if tags: - break # assume all tags are in one block - else: - continue - if line[0] != '#': - break - parsed = parse_tag(line) - if parsed: - tag, values = parsed.groups() - if tag in ('coding', 'encoding'): - continue - if tag == 'tags': - tag = 'tag' - print("WARNING: test tags use the 'tag' directive, not 'tags' (%s)" % filepath) - if tag not in ('mode', 'tag', 'ticket', 'cython', 'distutils'): - print("WARNING: unknown test directive '%s' found (%s)" % (tag, filepath)) - values = values.split(',') - tags[tag].extend(filter(None, [value.strip() for value in values])) - elif tags: - break # assume all tags are in one block - finally: - f.close() - return tags - - -list_unchanging_dir = memoize(lambda x: os.listdir(x)) - - -@memoize -def _list_pyregr_data_files(test_directory): - is_data_file = re.compile('(?:[.](txt|pem|db|html)|^bad.*[.]py)$').search - return ['__init__.py'] + [ - filename for filename in list_unchanging_dir(test_directory) - if is_data_file(filename)] - - -def import_ext(module_name, file_path=None): - if file_path: - import imp - return imp.load_dynamic(module_name, file_path) - else: - try: - from importlib import invalidate_caches - except ImportError: - pass - else: - invalidate_caches() - return __import__(module_name, globals(), locals(), ['*']) - - -class build_ext(_build_ext): - def build_extension(self, ext): - try: - try: # Py2.7+ & Py3.2+ - compiler_obj = self.compiler_obj - except AttributeError: - compiler_obj = self.compiler - if ext.language == 'c++': - compiler_obj.compiler_so.remove('-Wstrict-prototypes') - if CCACHE: - compiler_obj.compiler_so = CCACHE + compiler_obj.compiler_so - if getattr(ext, 'openmp', None) and compiler_obj.compiler_type == 'msvc': - ext.extra_compile_args.append('/openmp') - except Exception: - pass - _build_ext.build_extension(self, ext) - -class ErrorWriter(object): - match_error = re.compile('(warning:)?(?:.*:)?\s*([-0-9]+)\s*:\s*([-0-9]+)\s*:\s*(.*)').match - def __init__(self): - self.output = [] - self.write = self.output.append - - def _collect(self, collect_errors, collect_warnings): - s = ''.join(self.output) - result = [] - for line in s.split('\n'): - match = self.match_error(line) - if match: - is_warning, line, column, message = match.groups() - if (is_warning and collect_warnings) or \ - (not is_warning and collect_errors): - result.append( (int(line), int(column), message.strip()) ) - result.sort() - return [ "%d:%d: %s" % values for values in result ] - - def geterrors(self): - return self._collect(True, False) - - def getwarnings(self): - return self._collect(False, True) - - def getall(self): - return self._collect(True, True) - -class TestBuilder(object): - def __init__(self, rootdir, workdir, selectors, exclude_selectors, annotate, - cleanup_workdir, cleanup_sharedlibs, cleanup_failures, - with_pyregr, cython_only, languages, test_bugs, fork, language_level): - self.rootdir = rootdir - self.workdir = workdir - self.selectors = selectors - self.exclude_selectors = exclude_selectors - self.annotate = annotate - self.cleanup_workdir = cleanup_workdir - self.cleanup_sharedlibs = cleanup_sharedlibs - self.cleanup_failures = cleanup_failures - self.with_pyregr = with_pyregr - self.cython_only = cython_only - self.languages = languages - self.test_bugs = test_bugs - self.fork = fork - self.language_level = language_level - - def build_suite(self): - suite = unittest.TestSuite() - filenames = os.listdir(self.rootdir) - filenames.sort() - for filename in filenames: - path = os.path.join(self.rootdir, filename) - if os.path.isdir(path) and filename != TEST_SUPPORT_DIR: - if filename == 'pyregr' and not self.with_pyregr: - continue - if filename == 'broken' and not self.test_bugs: - continue - suite.addTest( - self.handle_directory(path, filename)) - if sys.platform not in ['win32']: - # Non-Windows makefile. - if [1 for selector in self.selectors if selector("embedded")] \ - and not [1 for selector in self.exclude_selectors if selector("embedded")]: - suite.addTest(unittest.makeSuite(EmbedTest)) - return suite - - def handle_directory(self, path, context): - workdir = os.path.join(self.workdir, context) - if not os.path.exists(workdir): - os.makedirs(workdir) - - suite = unittest.TestSuite() - filenames = list_unchanging_dir(path) - filenames.sort() - for filename in filenames: - filepath = os.path.join(path, filename) - module, ext = os.path.splitext(filename) - if ext not in ('.py', '.pyx', '.srctree'): - continue - if filename.startswith('.'): - continue # certain emacs backup files - if context == 'pyregr': - tags = defaultdict(list) - else: - tags = parse_tags(filepath) - fqmodule = "%s.%s" % (context, module) - if not [ 1 for match in self.selectors - if match(fqmodule, tags) ]: - continue - if self.exclude_selectors: - if [1 for match in self.exclude_selectors - if match(fqmodule, tags)]: - continue - - mode = 'run' # default - if tags['mode']: - mode = tags['mode'][0] - elif context == 'pyregr': - mode = 'pyregr' - - if ext == '.srctree': - if 'cpp' not in tags['tag'] or 'cpp' in self.languages: - suite.addTest(EndToEndTest(filepath, workdir, self.cleanup_workdir)) - continue - - # Choose the test suite. - if mode == 'pyregr': - if not filename.startswith('test_'): - continue - test_class = CythonPyregrTestCase - elif mode == 'run': - if module.startswith("test_"): - test_class = CythonUnitTestCase - else: - test_class = CythonRunTestCase - else: - test_class = CythonCompileTestCase - - for test in self.build_tests(test_class, path, workdir, - module, mode == 'error', tags): - suite.addTest(test) - if mode == 'run' and ext == '.py' and not self.cython_only: - # additionally test file in real Python - suite.addTest(PureDoctestTestCase(module, os.path.join(path, filename))) - - return suite - - def build_tests(self, test_class, path, workdir, module, expect_errors, tags): - if 'werror' in tags['tag']: - warning_errors = True - else: - warning_errors = False - - if expect_errors: - if 'cpp' in tags['tag'] and 'cpp' in self.languages: - languages = ['cpp'] - else: - languages = self.languages[:1] - else: - languages = self.languages - - if 'cpp' in tags['tag'] and 'c' in languages: - languages = list(languages) - languages.remove('c') - elif 'no-cpp' in tags['tag'] and 'cpp' in self.languages: - languages = list(languages) - languages.remove('cpp') - tests = [ self.build_test(test_class, path, workdir, module, tags, - language, expect_errors, warning_errors) - for language in languages ] - return tests - - def build_test(self, test_class, path, workdir, module, tags, - language, expect_errors, warning_errors): - language_workdir = os.path.join(workdir, language) - if not os.path.exists(language_workdir): - os.makedirs(language_workdir) - workdir = os.path.join(language_workdir, module) - return test_class(path, workdir, module, tags, - language=language, - expect_errors=expect_errors, - annotate=self.annotate, - cleanup_workdir=self.cleanup_workdir, - cleanup_sharedlibs=self.cleanup_sharedlibs, - cleanup_failures=self.cleanup_failures, - cython_only=self.cython_only, - fork=self.fork, - language_level=self.language_level, - warning_errors=warning_errors) - -class CythonCompileTestCase(unittest.TestCase): - def __init__(self, test_directory, workdir, module, tags, language='c', - expect_errors=False, annotate=False, cleanup_workdir=True, - cleanup_sharedlibs=True, cleanup_failures=True, cython_only=False, - fork=True, language_level=2, warning_errors=False): - self.test_directory = test_directory - self.tags = tags - self.workdir = workdir - self.module = module - self.language = language - self.expect_errors = expect_errors - self.annotate = annotate - self.cleanup_workdir = cleanup_workdir - self.cleanup_sharedlibs = cleanup_sharedlibs - self.cleanup_failures = cleanup_failures - self.cython_only = cython_only - self.fork = fork - self.language_level = language_level - self.warning_errors = warning_errors - unittest.TestCase.__init__(self) - - def shortDescription(self): - return "compiling (%s) %s" % (self.language, self.module) - - def setUp(self): - from Cython.Compiler import Options - self._saved_options = [ (name, getattr(Options, name)) - for name in ('warning_errors', - 'clear_to_none', - 'error_on_unknown_names', - 'error_on_uninitialized') ] - self._saved_default_directives = Options.directive_defaults.items() - Options.warning_errors = self.warning_errors - if sys.version_info >= (3, 4): - Options.directive_defaults['autotestdict'] = False - - if not os.path.exists(self.workdir): - os.makedirs(self.workdir) - if self.workdir not in sys.path: - sys.path.insert(0, self.workdir) - - def tearDown(self): - from Cython.Compiler import Options - for name, value in self._saved_options: - setattr(Options, name, value) - Options.directive_defaults = dict(self._saved_default_directives) - unpatch_inspect_isfunction() - - try: - sys.path.remove(self.workdir) - except ValueError: - pass - try: - del sys.modules[self.module] - except KeyError: - pass - cleanup = self.cleanup_failures or self.success - cleanup_c_files = WITH_CYTHON and self.cleanup_workdir and cleanup - cleanup_lib_files = self.cleanup_sharedlibs and cleanup - if os.path.exists(self.workdir): - if cleanup_c_files and cleanup_lib_files: - shutil.rmtree(self.workdir, ignore_errors=True) - else: - for rmfile in os.listdir(self.workdir): - if not cleanup_c_files: - if (rmfile[-2:] in (".c", ".h") or - rmfile[-4:] == ".cpp" or - rmfile.endswith(".html") and rmfile.startswith(self.module)): - continue - if not cleanup_lib_files and (rmfile.endswith(".so") or rmfile.endswith(".dll")): - continue - try: - rmfile = os.path.join(self.workdir, rmfile) - if os.path.isdir(rmfile): - shutil.rmtree(rmfile, ignore_errors=True) - else: - os.remove(rmfile) - except IOError: - pass - - def runTest(self): - self.success = False - self.runCompileTest() - self.success = True - - def runCompileTest(self): - return self.compile( - self.test_directory, self.module, self.workdir, - self.test_directory, self.expect_errors, self.annotate) - - def find_module_source_file(self, source_file): - if not os.path.exists(source_file): - source_file = source_file[:-1] - return source_file - - def build_target_filename(self, module_name): - target = '%s.%s' % (module_name, self.language) - return target - - def related_files(self, test_directory, module_name): - is_related = re.compile('%s_.*[.].*' % module_name).match - return [filename for filename in list_unchanging_dir(test_directory) - if is_related(filename)] - - def copy_files(self, test_directory, target_directory, file_list): - # use symlink on Unix, copy on Windows - try: - copy = os.symlink - except AttributeError: - copy = shutil.copy - - join = os.path.join - for filename in file_list: - file_path = join(test_directory, filename) - if os.path.exists(file_path): - copy(file_path, join(target_directory, filename)) - - def source_files(self, workdir, module_name, file_list): - return ([self.build_target_filename(module_name)] + - [filename for filename in file_list - if not os.path.isfile(os.path.join(workdir, filename))]) - - def split_source_and_output(self, test_directory, module, workdir): - source_file = self.find_module_source_file(os.path.join(test_directory, module) + '.pyx') - source_and_output = io_open(source_file, 'rU', encoding='ISO-8859-1') - try: - out = io_open(os.path.join(workdir, module + os.path.splitext(source_file)[1]), - 'w', encoding='ISO-8859-1') - for line in source_and_output: - if line.startswith("_ERRORS"): - out.close() - out = ErrorWriter() - else: - out.write(line) - finally: - source_and_output.close() - try: - geterrors = out.geterrors - except AttributeError: - out.close() - return [] - else: - return geterrors() - - def run_cython(self, test_directory, module, targetdir, incdir, annotate, - extra_compile_options=None): - include_dirs = INCLUDE_DIRS + [os.path.join(test_directory, '..', TEST_SUPPORT_DIR)] - if incdir: - include_dirs.append(incdir) - source = self.find_module_source_file( - os.path.join(test_directory, module + '.pyx')) - target = os.path.join(targetdir, self.build_target_filename(module)) - - if extra_compile_options is None: - extra_compile_options = {} - - try: - CompilationOptions - except NameError: - from Cython.Compiler.Main import CompilationOptions - from Cython.Compiler.Main import compile as cython_compile - from Cython.Compiler.Main import default_options - - options = CompilationOptions( - default_options, - include_path = include_dirs, - output_file = target, - annotate = annotate, - use_listing_file = False, - cplus = self.language == 'cpp', - language_level = self.language_level, - generate_pxi = False, - evaluate_tree_assertions = True, - **extra_compile_options - ) - cython_compile(source, options=options, - full_module_name=module) - - def run_distutils(self, test_directory, module, workdir, incdir, - extra_extension_args=None): - cwd = os.getcwd() - os.chdir(workdir) - try: - build_extension = build_ext(distutils_distro) - build_extension.include_dirs = INCLUDE_DIRS[:] - if incdir: - build_extension.include_dirs.append(incdir) - build_extension.finalize_options() - if COMPILER: - build_extension.compiler = COMPILER - - ext_compile_flags = CFLAGS[:] - compiler = COMPILER or sysconfig.get_config_var('CC') - - if self.language == 'c' and compiler == 'gcc': - ext_compile_flags.extend(['-std=c89', '-pedantic']) - if build_extension.compiler == 'mingw32': - ext_compile_flags.append('-Wno-format') - if extra_extension_args is None: - extra_extension_args = {} - - related_files = self.related_files(test_directory, module) - self.copy_files(test_directory, workdir, related_files) - extension = Extension( - module, - sources = self.source_files(workdir, module, related_files), - extra_compile_args = ext_compile_flags, - **extra_extension_args - ) - - if self.language == 'cpp': - # Set the language now as the fixer might need it - extension.language = 'c++' - - if 'distutils' in self.tags: - from Cython.Build.Dependencies import DistutilsInfo - pyx_path = os.path.join(self.test_directory, self.module + ".pyx") - DistutilsInfo(open(pyx_path)).apply(extension) - - for matcher, fixer in list(EXT_EXTRAS.items()): - if isinstance(matcher, str): - # lazy init - del EXT_EXTRAS[matcher] - matcher = string_selector(matcher) - EXT_EXTRAS[matcher] = fixer - if matcher(module, self.tags): - newext = fixer(extension) - if newext is EXCLUDE_EXT: - return - extension = newext or extension - if self.language == 'cpp': - extension.language = 'c++' - build_extension.extensions = [extension] - build_extension.build_temp = workdir - build_extension.build_lib = workdir - build_extension.run() - finally: - os.chdir(cwd) - - try: - get_ext_fullpath = build_extension.get_ext_fullpath - except AttributeError: - def get_ext_fullpath(ext_name, self=build_extension): - # copied from distutils.command.build_ext (missing in Py2.[45]) - fullname = self.get_ext_fullname(ext_name) - modpath = fullname.split('.') - filename = self.get_ext_filename(modpath[-1]) - if not self.inplace: - filename = os.path.join(*modpath[:-1]+[filename]) - return os.path.join(self.build_lib, filename) - package = '.'.join(modpath[0:-1]) - build_py = self.get_finalized_command('build_py') - package_dir = os.path.abspath(build_py.get_package_dir(package)) - return os.path.join(package_dir, filename) - - return get_ext_fullpath(module) - - def compile(self, test_directory, module, workdir, incdir, - expect_errors, annotate): - expected_errors = errors = () - if expect_errors: - expected_errors = self.split_source_and_output( - test_directory, module, workdir) - test_directory = workdir - - if WITH_CYTHON: - old_stderr = sys.stderr - try: - sys.stderr = ErrorWriter() - self.run_cython(test_directory, module, workdir, incdir, annotate) - errors = sys.stderr.geterrors() - finally: - sys.stderr = old_stderr - - if errors or expected_errors: - try: - for expected, error in zip(expected_errors, errors): - self.assertEquals(expected, error) - if len(errors) < len(expected_errors): - expected_error = expected_errors[len(errors)] - self.assertEquals(expected_error, None) - elif len(errors) > len(expected_errors): - unexpected_error = errors[len(expected_errors)] - self.assertEquals(None, unexpected_error) - except AssertionError: - print("\n=== Expected errors: ===") - print('\n'.join(expected_errors)) - print("\n\n=== Got errors: ===") - print('\n'.join(errors)) - print('\n') - raise - return None - - if self.cython_only: - so_path = None - else: - so_path = self.run_distutils(test_directory, module, workdir, incdir) - return so_path - -class CythonRunTestCase(CythonCompileTestCase): - def setUp(self): - CythonCompileTestCase.setUp(self) - from Cython.Compiler import Options - Options.clear_to_none = False - - def shortDescription(self): - if self.cython_only: - return CythonCompileTestCase.shortDescription(self) - else: - return "compiling (%s) and running %s" % (self.language, self.module) - - def run(self, result=None): - if result is None: - result = self.defaultTestResult() - result.startTest(self) - try: - self.setUp() - try: - self.success = False - ext_so_path = self.runCompileTest() - failures, errors = len(result.failures), len(result.errors) - if not self.cython_only: - self.run_tests(result, ext_so_path) - if failures == len(result.failures) and errors == len(result.errors): - # No new errors... - self.success = True - finally: - check_thread_termination() - except Exception: - result.addError(self, sys.exc_info()) - result.stopTest(self) - try: - self.tearDown() - except Exception: - pass - - def run_tests(self, result, ext_so_path): - self.run_doctests(self.module, result, ext_so_path) - - def run_doctests(self, module_or_name, result, ext_so_path): - def run_test(result): - if isinstance(module_or_name, basestring): - module = import_ext(module_or_name, ext_so_path) - else: - module = module_or_name - tests = doctest.DocTestSuite(module) - tests.run(result) - run_forked_test(result, run_test, self.shortDescription(), self.fork) - -def run_forked_test(result, run_func, test_name, fork=True): - if not fork or sys.version_info[0] >= 3 or not hasattr(os, 'fork'): - run_func(result) - sys.stdout.flush() - sys.stderr.flush() - gc.collect() - return - - # fork to make sure we do not keep the tested module loaded - result_handle, result_file = tempfile.mkstemp() - os.close(result_handle) - child_id = os.fork() - if not child_id: - result_code = 0 - output = None - try: - try: - tests = partial_result = None - try: - partial_result = PartialTestResult(result) - run_func(partial_result) - sys.stdout.flush() - sys.stderr.flush() - gc.collect() - except Exception: - result_code = 1 - if partial_result is not None: - if tests is None: - # importing failed, try to fake a test class - tests = _FakeClass( - failureException=sys.exc_info()[1], - _shortDescription=test_name, - module_name=None) - partial_result.addError(tests, sys.exc_info()) - output = open(result_file, 'wb') - pickle.dump(partial_result.data(), output) - except: - traceback.print_exc() - finally: - try: sys.stderr.flush() - except: pass - try: sys.stdout.flush() - except: pass - try: - if output is not None: - output.close() - except: - pass - os._exit(result_code) - - try: - cid, result_code = os.waitpid(child_id, 0) - module_name = test_name.split()[-1] - # os.waitpid returns the child's result code in the - # upper byte of result_code, and the signal it was - # killed by in the lower byte - if result_code & 255: - raise Exception("Tests in module '%s' were unexpectedly killed by signal %d"% - (module_name, result_code & 255)) - result_code >>= 8 - if result_code in (0,1): - input = open(result_file, 'rb') - try: - PartialTestResult.join_results(result, pickle.load(input)) - finally: - input.close() - if result_code: - raise Exception("Tests in module '%s' exited with status %d" % - (module_name, result_code)) - finally: - try: os.unlink(result_file) - except: pass - -class PureDoctestTestCase(unittest.TestCase): - def __init__(self, module_name, module_path): - self.module_name = module_name - self.module_path = module_path - unittest.TestCase.__init__(self, 'run') - - def shortDescription(self): - return "running pure doctests in %s" % self.module_name - - def run(self, result=None): - if result is None: - result = self.defaultTestResult() - loaded_module_name = 'pure_doctest__' + self.module_name - result.startTest(self) - try: - self.setUp() - - import imp - m = imp.load_source(loaded_module_name, self.module_path) - try: - doctest.DocTestSuite(m).run(result) - finally: - del m - if loaded_module_name in sys.modules: - del sys.modules[loaded_module_name] - check_thread_termination() - except Exception: - result.addError(self, sys.exc_info()) - result.stopTest(self) - try: - self.tearDown() - except Exception: - pass - -is_private_field = re.compile('^_[^_]').match - -class _FakeClass(object): - def __init__(self, **kwargs): - self._shortDescription = kwargs.get('module_name') - self.__dict__.update(kwargs) - def shortDescription(self): - return self._shortDescription - -try: # Py2.7+ and Py3.2+ - from unittest.runner import _TextTestResult -except ImportError: - from unittest import _TextTestResult - -class PartialTestResult(_TextTestResult): - def __init__(self, base_result): - _TextTestResult.__init__( - self, self._StringIO(), True, - base_result.dots + base_result.showAll*2) - - def strip_error_results(self, results): - for test_case, error in results: - for attr_name in filter(is_private_field, dir(test_case)): - if attr_name == '_dt_test': - test_case._dt_test = _FakeClass( - name=test_case._dt_test.name) - elif attr_name != '_shortDescription': - setattr(test_case, attr_name, None) - - def data(self): - self.strip_error_results(self.failures) - self.strip_error_results(self.errors) - return (self.failures, self.errors, self.testsRun, - self.stream.getvalue()) - - def join_results(result, data): - """Static method for merging the result back into the main - result object. - """ - failures, errors, tests_run, output = data - if output: - result.stream.write(output) - result.errors.extend(errors) - result.failures.extend(failures) - result.testsRun += tests_run - - join_results = staticmethod(join_results) - - class _StringIO(StringIO): - def writeln(self, line): - self.write("%s\n" % line) - - -class CythonUnitTestCase(CythonRunTestCase): - def shortDescription(self): - return "compiling (%s) tests in %s" % (self.language, self.module) - - def run_tests(self, result, ext_so_path): - module = import_ext(self.module, ext_so_path) - unittest.defaultTestLoader.loadTestsFromModule(module).run(result) - - -class CythonPyregrTestCase(CythonRunTestCase): - def setUp(self): - CythonRunTestCase.setUp(self) - from Cython.Compiler import Options - Options.error_on_unknown_names = False - Options.error_on_uninitialized = False - Options.directive_defaults.update(dict( - binding=True, always_allow_keywords=True, - set_initial_path="SOURCEFILE")) - patch_inspect_isfunction() - - def related_files(self, test_directory, module_name): - return _list_pyregr_data_files(test_directory) - - def _run_unittest(self, result, *classes): - """Run tests from unittest.TestCase-derived classes.""" - valid_types = (unittest.TestSuite, unittest.TestCase) - suite = unittest.TestSuite() - for cls in classes: - if isinstance(cls, str): - if cls in sys.modules: - suite.addTest(unittest.findTestCases(sys.modules[cls])) - else: - raise ValueError("str arguments must be keys in sys.modules") - elif isinstance(cls, valid_types): - suite.addTest(cls) - else: - suite.addTest(unittest.makeSuite(cls)) - suite.run(result) - - def _run_doctest(self, result, module): - self.run_doctests(module, result, None) - - def run_tests(self, result, ext_so_path): - try: - from test import support - except ImportError: # Python2.x - from test import test_support as support - - def run_test(result): - def run_unittest(*classes): - return self._run_unittest(result, *classes) - def run_doctest(module, verbosity=None): - return self._run_doctest(result, module) - - backup = (support.run_unittest, support.run_doctest) - support.run_unittest = run_unittest - support.run_doctest = run_doctest - - try: - try: - sys.stdout.flush() # helps in case of crashes - module = import_ext(self.module, ext_so_path) - sys.stdout.flush() # helps in case of crashes - if hasattr(module, 'test_main'): - module.test_main() - sys.stdout.flush() # helps in case of crashes - except (unittest.SkipTest, support.ResourceDenied): - result.addSkip(self, 'ok') - finally: - support.run_unittest, support.run_doctest = backup - - run_forked_test(result, run_test, self.shortDescription(), self.fork) - -include_debugger = IS_CPYTHON and sys.version_info[:2] > (2, 5) - -def collect_unittests(path, module_prefix, suite, selectors, exclude_selectors): - def file_matches(filename): - return filename.startswith("Test") and filename.endswith(".py") - - def package_matches(dirname): - return dirname == "Tests" - - loader = unittest.TestLoader() - - if include_debugger: - skipped_dirs = [] - else: - skipped_dirs = ['Cython' + os.path.sep + 'Debugger' + os.path.sep] - - for dirpath, dirnames, filenames in os.walk(path): - if dirpath != path and "__init__.py" not in filenames: - skipped_dirs.append(dirpath + os.path.sep) - continue - skip = False - for dir in skipped_dirs: - if dirpath.startswith(dir): - skip = True - if skip: - continue - parentname = os.path.split(dirpath)[-1] - if package_matches(parentname): - for f in filenames: - if file_matches(f): - filepath = os.path.join(dirpath, f)[:-len(".py")] - modulename = module_prefix + filepath[len(path)+1:].replace(os.path.sep, '.') - if not [ 1 for match in selectors if match(modulename) ]: - continue - if [ 1 for match in exclude_selectors if match(modulename) ]: - continue - module = __import__(modulename) - for x in modulename.split('.')[1:]: - module = getattr(module, x) - suite.addTests([loader.loadTestsFromModule(module)]) - - - -def collect_doctests(path, module_prefix, suite, selectors, exclude_selectors): - def package_matches(dirname): - if dirname == 'Debugger' and not include_debugger: - return False - return dirname not in ("Mac", "Distutils", "Plex") - def file_matches(filename): - filename, ext = os.path.splitext(filename) - blacklist = ['libcython', 'libpython', 'test_libcython_in_gdb', - 'TestLibCython'] - return (ext == '.py' and not - '~' in filename and not - '#' in filename and not - filename.startswith('.') and not - filename in blacklist) - import doctest - for dirpath, dirnames, filenames in os.walk(path): - for dir in list(dirnames): - if not package_matches(dir): - dirnames.remove(dir) - for f in filenames: - if file_matches(f): - if not f.endswith('.py'): continue - filepath = os.path.join(dirpath, f) - if os.path.getsize(filepath) == 0: continue - filepath = filepath[:-len(".py")] - modulename = module_prefix + filepath[len(path)+1:].replace(os.path.sep, '.') - if not [ 1 for match in selectors if match(modulename) ]: - continue - if [ 1 for match in exclude_selectors if match(modulename) ]: - continue - if 'in_gdb' in modulename: - # These should only be imported from gdb. - continue - module = __import__(modulename) - for x in modulename.split('.')[1:]: - module = getattr(module, x) - if hasattr(module, "__doc__") or hasattr(module, "__test__"): - try: - suite.addTest(doctest.DocTestSuite(module)) - except ValueError: # no tests - pass - - -class EndToEndTest(unittest.TestCase): - """ - This is a test of build/*.srctree files, where srctree defines a full - directory structure and its header gives a list of commands to run. - """ - cython_root = os.path.dirname(os.path.abspath(__file__)) - - def __init__(self, treefile, workdir, cleanup_workdir=True): - self.name = os.path.splitext(os.path.basename(treefile))[0] - self.treefile = treefile - self.workdir = os.path.join(workdir, self.name) - self.cleanup_workdir = cleanup_workdir - cython_syspath = [self.cython_root] - for path in sys.path: - if path.startswith(self.cython_root) and path not in cython_syspath: - # Py3 installation and refnanny build prepend their - # fixed paths to sys.path => prefer that over the - # generic one (cython_root itself goes last) - cython_syspath.append(path) - self.cython_syspath = os.pathsep.join(cython_syspath[::-1]) - unittest.TestCase.__init__(self) - - def shortDescription(self): - return "End-to-end %s" % self.name - - def setUp(self): - from Cython.TestUtils import unpack_source_tree - _, self.commands = unpack_source_tree(self.treefile, self.workdir) - self.old_dir = os.getcwd() - os.chdir(self.workdir) - if self.workdir not in sys.path: - sys.path.insert(0, self.workdir) - - def tearDown(self): - if self.cleanup_workdir: - for trial in range(5): - try: - shutil.rmtree(self.workdir) - except OSError: - time.sleep(0.1) - else: - break - os.chdir(self.old_dir) - - def _try_decode(self, content): - try: - return content.decode() - except UnicodeDecodeError: - return content.decode('iso-8859-1') - - def runTest(self): - self.success = False - commands = (self.commands - .replace("CYTHON", "PYTHON %s" % os.path.join(self.cython_root, 'cython.py')) - .replace("PYTHON", sys.executable)) - old_path = os.environ.get('PYTHONPATH') - os.environ['PYTHONPATH'] = self.cython_syspath + os.pathsep + (old_path or '') - try: - for command in filter(None, commands.splitlines()): - p = subprocess.Popen(command, - stderr=subprocess.PIPE, - stdout=subprocess.PIPE, - shell=True) - out, err = p.communicate() - res = p.returncode - if res != 0: - print(command) - print(self._try_decode(out)) - print(self._try_decode(err)) - self.assertEqual(0, res, "non-zero exit status") - finally: - if old_path: - os.environ['PYTHONPATH'] = old_path - else: - del os.environ['PYTHONPATH'] - self.success = True - - -# TODO: Support cython_freeze needed here as well. -# TODO: Windows support. - -class EmbedTest(unittest.TestCase): - - working_dir = "Demos/embed" - - def setUp(self): - self.old_dir = os.getcwd() - os.chdir(self.working_dir) - os.system( - "make PYTHON='%s' clean > /dev/null" % sys.executable) - - def tearDown(self): - try: - os.system( - "make PYTHON='%s' clean > /dev/null" % sys.executable) - except: - pass - os.chdir(self.old_dir) - - def test_embed(self): - from distutils import sysconfig - libname = sysconfig.get_config_var('LIBRARY') - libdir = sysconfig.get_config_var('LIBDIR') - if not os.path.isdir(libdir) or libname not in os.listdir(libdir): - libdir = os.path.join(os.path.dirname(sys.executable), '..', 'lib') - if not os.path.isdir(libdir) or libname not in os.listdir(libdir): - libdir = os.path.join(libdir, 'python%d.%d' % sys.version_info[:2], 'config') - if not os.path.isdir(libdir) or libname not in os.listdir(libdir): - # report the error for the original directory - libdir = sysconfig.get_config_var('LIBDIR') - cython = 'cython.py' - if sys.version_info[0] >=3 and CY3_DIR: - cython = os.path.join(CY3_DIR, cython) - cython = os.path.abspath(os.path.join('..', '..', cython)) - self.assert_(os.system( - "make PYTHON='%s' CYTHON='%s' LIBDIR1='%s' test > make.output" % (sys.executable, cython, libdir)) == 0) - try: - os.remove('make.output') - except OSError: - pass - -class MissingDependencyExcluder: - def __init__(self, deps): - # deps: { matcher func : module name } - self.exclude_matchers = [] - for matcher, mod in deps.items(): - try: - __import__(mod) - except ImportError: - self.exclude_matchers.append(string_selector(matcher)) - self.tests_missing_deps = [] - def __call__(self, testname, tags=None): - for matcher in self.exclude_matchers: - if matcher(testname, tags): - self.tests_missing_deps.append(testname) - return True - return False - -class VersionDependencyExcluder: - def __init__(self, deps): - # deps: { version : matcher func } - from sys import version_info - self.exclude_matchers = [] - for ver, (compare, matcher) in deps.items(): - if compare(version_info, ver): - self.exclude_matchers.append(matcher) - self.tests_missing_deps = [] - def __call__(self, testname, tags=None): - for matcher in self.exclude_matchers: - if matcher(testname): - self.tests_missing_deps.append(testname) - return True - return False - -class FileListExcluder: - - def __init__(self, list_file): - self.excludes = {} - f = open(list_file) - try: - for line in f.readlines(): - line = line.strip() - if line and line[0] != '#': - self.excludes[line.split()[0]] = True - finally: - f.close() - - def __call__(self, testname, tags=None): - return testname in self.excludes or testname.split('.')[-1] in self.excludes - -class TagsSelector: - - def __init__(self, tag, value): - self.tag = tag - self.value = value - - def __call__(self, testname, tags=None): - if tags is None: - return False - else: - return self.value in tags[self.tag] - -class RegExSelector: - - def __init__(self, pattern_string): - try: - self.pattern = re.compile(pattern_string, re.I|re.U) - except re.error: - print('Invalid pattern: %r' % pattern_string) - raise - - def __call__(self, testname, tags=None): - return self.pattern.search(testname) - -def string_selector(s): - ix = s.find(':') - if ix == -1: - return RegExSelector(s) - else: - return TagsSelector(s[:ix], s[ix+1:]) - -class ShardExcludeSelector: - # This is an exclude selector so it can override the (include) selectors. - # It may not provide uniform distribution (in time or count), but is a - # determanistic partition of the tests which is important. - def __init__(self, shard_num, shard_count): - self.shard_num = shard_num - self.shard_count = shard_count - - def __call__(self, testname, tags=None): - return abs(hash(testname)) % self.shard_count != self.shard_num - - -def refactor_for_py3(distdir, cy3_dir): - # need to convert Cython sources first - import lib2to3.refactor - from distutils.util import copydir_run_2to3 - fixers = [ fix for fix in lib2to3.refactor.get_fixers_from_package("lib2to3.fixes") - if fix.split('fix_')[-1] not in ('next',) - ] - if not os.path.exists(cy3_dir): - os.makedirs(cy3_dir) - import distutils.log as dlog - dlog.set_threshold(dlog.INFO) - copydir_run_2to3(distdir, cy3_dir, fixer_names=fixers, - template = ''' - global-exclude * - graft Cython - recursive-exclude Cython * - recursive-include Cython *.py *.pyx *.pxd - recursive-include Cython/Debugger/Tests * - recursive-include Cython/Utility * - recursive-exclude pyximport test - include pyximport/*.py - include runtests.py - include cython.py - ''') - sys.path.insert(0, cy3_dir) - - for keep_2x_file in KEEP_2X_FILES: - destfile = os.path.join(cy3_dir, keep_2x_file) - shutil.copy(keep_2x_file, destfile) - -class PendingThreadsError(RuntimeError): - pass - -threads_seen = [] - -def check_thread_termination(ignore_seen=True): - if threading is None: # no threading enabled in CPython - return - current = threading.currentThread() - blocking_threads = [] - for t in threading.enumerate(): - if not t.isAlive() or t == current: - continue - t.join(timeout=2) - if t.isAlive(): - if not ignore_seen: - blocking_threads.append(t) - continue - for seen in threads_seen: - if t is seen: - break - else: - threads_seen.append(t) - blocking_threads.append(t) - if not blocking_threads: - return - sys.stderr.write("warning: left-over threads found after running test:\n") - for t in blocking_threads: - sys.stderr.write('...%s\n' % repr(t)) - raise PendingThreadsError("left-over threads found after running test") - -def subprocess_output(cmd): - try: - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - return p.communicate()[0].decode('UTF-8') - except OSError: - return '' - -def get_version(): - from Cython.Compiler.Version import version as cython_version - full_version = cython_version - top = os.path.dirname(os.path.abspath(__file__)) - if os.path.exists(os.path.join(top, '.git')): - old_dir = os.getcwd() - try: - os.chdir(top) - head_commit = subprocess_output(['git', 'rev-parse', 'HEAD']).strip() - version_commit = subprocess_output(['git', 'rev-parse', cython_version]).strip() - diff = subprocess_output(['git', 'diff', '--stat']).strip() - if head_commit != version_commit: - full_version += " " + head_commit - if diff: - full_version += ' + uncommitted changes' - finally: - os.chdir(old_dir) - return full_version - -_orig_stdout, _orig_stderr = sys.stdout, sys.stderr -def flush_and_terminate(status): - try: - _orig_stdout.flush() - _orig_stderr.flush() - finally: - os._exit(status) - -def main(): - - global DISTDIR, WITH_CYTHON - DISTDIR = os.path.join(os.getcwd(), os.path.dirname(sys.argv[0])) - - from optparse import OptionParser - parser = OptionParser() - parser.add_option("--no-cleanup", dest="cleanup_workdir", - action="store_false", default=True, - help="do not delete the generated C files (allows passing --no-cython on next run)") - parser.add_option("--no-cleanup-sharedlibs", dest="cleanup_sharedlibs", - action="store_false", default=True, - help="do not delete the generated shared libary files (allows manual module experimentation)") - parser.add_option("--no-cleanup-failures", dest="cleanup_failures", - action="store_false", default=True, - help="enable --no-cleanup and --no-cleanup-sharedlibs for failed tests only") - parser.add_option("--no-cython", dest="with_cython", - action="store_false", default=True, - help="do not run the Cython compiler, only the C compiler") - parser.add_option("--compiler", dest="compiler", default=None, - help="C compiler type") - backend_list = ','.join(BACKENDS) - parser.add_option("--backends", dest="backends", default=backend_list, - help="select backends to test (default: %s)" % backend_list) - parser.add_option("--no-c", dest="use_c", - action="store_false", default=True, - help="do not test C compilation backend") - parser.add_option("--no-cpp", dest="use_cpp", - action="store_false", default=True, - help="do not test C++ compilation backend") - parser.add_option("--no-unit", dest="unittests", - action="store_false", default=True, - help="do not run the unit tests") - parser.add_option("--no-doctest", dest="doctests", - action="store_false", default=True, - help="do not run the doctests") - parser.add_option("--no-file", dest="filetests", - action="store_false", default=True, - help="do not run the file based tests") - parser.add_option("--no-pyregr", dest="pyregr", - action="store_false", default=True, - help="do not run the regression tests of CPython in tests/pyregr/") - parser.add_option("--cython-only", dest="cython_only", - action="store_true", default=False, - help="only compile pyx to c, do not run C compiler or run the tests") - parser.add_option("--no-refnanny", dest="with_refnanny", - action="store_false", default=True, - help="do not regression test reference counting") - parser.add_option("--no-fork", dest="fork", - action="store_false", default=True, - help="do not fork to run tests") - parser.add_option("--sys-pyregr", dest="system_pyregr", - action="store_true", default=False, - help="run the regression tests of the CPython installation") - parser.add_option("-x", "--exclude", dest="exclude", - action="append", metavar="PATTERN", - help="exclude tests matching the PATTERN") - parser.add_option("--shard_count", dest="shard_count", metavar="N", - type=int, default=1, - help="shard this run into several parallel runs") - parser.add_option("--shard_num", dest="shard_num", metavar="K", - type=int, default=-1, - help="test only this single shard") - parser.add_option("-C", "--coverage", dest="coverage", - action="store_true", default=False, - help="collect source coverage data for the Compiler") - parser.add_option("--coverage-xml", dest="coverage_xml", - action="store_true", default=False, - help="collect source coverage data for the Compiler in XML format") - parser.add_option("--coverage-html", dest="coverage_html", - action="store_true", default=False, - help="collect source coverage data for the Compiler in HTML format") - parser.add_option("-A", "--annotate", dest="annotate_source", - action="store_true", default=True, - help="generate annotated HTML versions of the test source files") - parser.add_option("--no-annotate", dest="annotate_source", - action="store_false", - help="do not generate annotated HTML versions of the test source files") - parser.add_option("-v", "--verbose", dest="verbosity", - action="count", default=0, - help="display test progress, pass twice to print test names") - parser.add_option("-T", "--ticket", dest="tickets", - action="append", - help="a bug ticket number to run the respective test in 'tests/*'") - parser.add_option("-3", dest="language_level", - action="store_const", const=3, default=2, - help="set language level to Python 3 (useful for running the CPython regression tests)'") - parser.add_option("--xml-output", dest="xml_output_dir", metavar="DIR", - help="write test results in XML to directory DIR") - parser.add_option("--exit-ok", dest="exit_ok", default=False, - action="store_true", - help="exit without error code even on test failures") - parser.add_option("--root-dir", dest="root_dir", default=os.path.join(DISTDIR, 'tests'), - help="working directory") - parser.add_option("--work-dir", dest="work_dir", default=os.path.join(os.getcwd(), 'BUILD'), - help="working directory") - parser.add_option("--cython-dir", dest="cython_dir", default=os.getcwd(), - help="Cython installation directory (default: use local source version)") - parser.add_option("--debug", dest="for_debugging", default=False, action="store_true", - help="configure for easier use with a debugger (e.g. gdb)") - parser.add_option("--pyximport-py", dest="pyximport_py", default=False, action="store_true", - help="use pyximport to automatically compile imported .pyx and .py files") - parser.add_option("--watermark", dest="watermark", default=None, - help="deterministic generated by string") - - options, cmd_args = parser.parse_args() - - WORKDIR = os.path.abspath(options.work_dir) - - if sys.version_info[0] >= 3: - options.doctests = False - if options.with_cython: - sys.path.insert(0, options.cython_dir) - try: - # try if Cython is installed in a Py3 version - import Cython.Compiler.Main - except Exception: - # back out anything the import process loaded, then - # 2to3 the Cython sources to make them re-importable - cy_modules = [ name for name in sys.modules - if name == 'Cython' or name.startswith('Cython.') ] - for name in cy_modules: - del sys.modules[name] - # hasn't been refactored yet - do it now - global CY3_DIR - CY3_DIR = cy3_dir = os.path.join(WORKDIR, 'Cy3') - if sys.version_info >= (3,1): - refactor_for_py3(DISTDIR, cy3_dir) - elif os.path.isdir(cy3_dir): - sys.path.insert(0, cy3_dir) - else: - options.with_cython = False - - if options.watermark: - import Cython.Compiler.Version - Cython.Compiler.Version.watermark = options.watermark - - WITH_CYTHON = options.with_cython - - coverage = None - if options.coverage or options.coverage_xml or options.coverage_html: - if options.shard_count <= 1 and options.shard_num < 0: - if not WITH_CYTHON: - options.coverage = options.coverage_xml = options.coverage_html = False - else: - print("Enabling coverage analysis") - from coverage import coverage as _coverage - coverage = _coverage(branch=True, omit=['Test*']) - coverage.erase() - coverage.start() - - if WITH_CYTHON: - global CompilationOptions, pyrex_default_options, cython_compile - from Cython.Compiler.Main import \ - CompilationOptions, \ - default_options as pyrex_default_options, \ - compile as cython_compile - from Cython.Compiler import Errors - Errors.LEVEL = 0 # show all warnings - from Cython.Compiler import Options - Options.generate_cleanup_code = 3 # complete cleanup code - from Cython.Compiler import DebugFlags - DebugFlags.debug_temp_code_comments = 1 - - if options.shard_count > 1 and options.shard_num == -1: - import multiprocessing - pool = multiprocessing.Pool(options.shard_count) - tasks = [(options, cmd_args, shard_num) for shard_num in range(options.shard_count)] - errors = [] - for shard_num, return_code in pool.imap_unordered(runtests_callback, tasks): - if return_code != 0: - errors.append(shard_num) - print("FAILED (%s/%s)" % (shard_num, options.shard_count)) - print("ALL DONE (%s/%s)" % (shard_num, options.shard_count)) - pool.close() - pool.join() - if errors: - print("Errors for shards %s" % ", ".join([str(e) for e in errors])) - return_code = 1 - else: - return_code = 0 - else: - _, return_code = runtests(options, cmd_args, coverage) - print("ALL DONE") - - try: - check_thread_termination(ignore_seen=False) - except PendingThreadsError: - # normal program exit won't kill the threads, do it the hard way here - flush_and_terminate(return_code) - else: - sys.exit(return_code) - - -def runtests_callback(args): - options, cmd_args, shard_num = args - options.shard_num = shard_num - return runtests(options, cmd_args) - -def runtests(options, cmd_args, coverage=None): - - WITH_CYTHON = options.with_cython - ROOTDIR = os.path.abspath(options.root_dir) - WORKDIR = os.path.abspath(options.work_dir) - - if options.shard_num > -1: - WORKDIR = os.path.join(WORKDIR, str(options.shard_num)) - - # RUN ALL TESTS! - UNITTEST_MODULE = "Cython" - UNITTEST_ROOT = os.path.join(os.path.dirname(__file__), UNITTEST_MODULE) - if WITH_CYTHON: - if os.path.exists(WORKDIR): - for path in os.listdir(WORKDIR): - if path in ("support", "Cy3"): continue - shutil.rmtree(os.path.join(WORKDIR, path), ignore_errors=True) - if not os.path.exists(WORKDIR): - os.makedirs(WORKDIR) - - if options.shard_num <= 0: - sys.stderr.write("Python %s\n" % sys.version) - sys.stderr.write("\n") - if WITH_CYTHON: - sys.stderr.write("Running tests against Cython %s\n" % get_version()) - else: - sys.stderr.write("Running tests without Cython.\n") - - if options.for_debugging: - options.cleanup_workdir = False - options.cleanup_sharedlibs = False - options.fork = False - if WITH_CYTHON and include_debugger: - from Cython.Compiler.Main import default_options as compiler_default_options - compiler_default_options['gdb_debug'] = True - compiler_default_options['output_dir'] = os.getcwd() - - if options.with_refnanny: - from pyximport.pyxbuild import pyx_to_dll - libpath = pyx_to_dll(os.path.join("Cython", "Runtime", "refnanny.pyx"), - build_in_temp=True, - pyxbuild_dir=os.path.join(WORKDIR, "support")) - sys.path.insert(0, os.path.split(libpath)[0]) - CFLAGS.append("-DCYTHON_REFNANNY=1") - - if options.xml_output_dir and options.fork: - # doesn't currently work together - sys.stderr.write("Disabling forked testing to support XML test output\n") - options.fork = False - - if WITH_CYTHON and options.language_level == 3: - sys.stderr.write("Using Cython language level 3.\n") - - test_bugs = False - if options.tickets: - for ticket_number in options.tickets: - test_bugs = True - cmd_args.append('ticket:%s' % ticket_number) - if not test_bugs: - for selector in cmd_args: - if selector.startswith('bugs'): - test_bugs = True - - selectors = [ string_selector(r) for r in cmd_args ] - if not selectors: - selectors = [ lambda x, tags=None: True ] - - # Chech which external modules are not present and exclude tests - # which depends on them (by prefix) - - missing_dep_excluder = MissingDependencyExcluder(EXT_DEP_MODULES) - version_dep_excluder = VersionDependencyExcluder(VER_DEP_MODULES) - exclude_selectors = [missing_dep_excluder, version_dep_excluder] # want to print msg at exit - - if options.exclude: - exclude_selectors += [ string_selector(r) for r in options.exclude ] - - if options.shard_num > -1: - exclude_selectors.append(ShardExcludeSelector(options.shard_num, options.shard_count)) - - if not test_bugs: - exclude_selectors += [ FileListExcluder(os.path.join(ROOTDIR, "bugs.txt")) ] - - if sys.platform in ['win32', 'cygwin'] and sys.version_info < (2,6): - exclude_selectors += [ lambda x: x == "run.specialfloat" ] - - global COMPILER - if options.compiler: - COMPILER = options.compiler - - selected_backends = [ name.strip() for name in options.backends.split(',') if name.strip() ] - backends = [] - for backend in selected_backends: - if backend == 'c' and not options.use_c: - continue - elif backend == 'cpp' and not options.use_cpp: - continue - elif backend not in BACKENDS: - sys.stderr.write("Unknown backend requested: '%s' not one of [%s]\n" % ( - backend, ','.join(BACKENDS))) - sys.exit(1) - backends.append(backend) - if options.shard_num <= 0: - sys.stderr.write("Backends: %s\n" % ','.join(backends)) - languages = backends - - sys.stderr.write("\n") - - test_suite = unittest.TestSuite() - - if options.unittests: - collect_unittests(UNITTEST_ROOT, UNITTEST_MODULE + ".", test_suite, selectors, exclude_selectors) - - if options.doctests: - collect_doctests(UNITTEST_ROOT, UNITTEST_MODULE + ".", test_suite, selectors, exclude_selectors) - - if options.filetests and languages: - filetests = TestBuilder(ROOTDIR, WORKDIR, selectors, exclude_selectors, - options.annotate_source, options.cleanup_workdir, - options.cleanup_sharedlibs, options.cleanup_failures, - options.pyregr, - options.cython_only, languages, test_bugs, - options.fork, options.language_level) - test_suite.addTest(filetests.build_suite()) - - if options.system_pyregr and languages: - sys_pyregr_dir = os.path.join(sys.prefix, 'lib', 'python'+sys.version[:3], 'test') - if os.path.isdir(sys_pyregr_dir): - filetests = TestBuilder(ROOTDIR, WORKDIR, selectors, exclude_selectors, - options.annotate_source, options.cleanup_workdir, - options.cleanup_sharedlibs, options.cleanup_failures, - True, - options.cython_only, languages, test_bugs, - options.fork, sys.version_info[0]) - sys.stderr.write("Including CPython regression tests in %s\n" % sys_pyregr_dir) - test_suite.addTest(filetests.handle_directory(sys_pyregr_dir, 'pyregr')) - - if options.xml_output_dir: - from Cython.Tests.xmlrunner import XMLTestRunner - test_runner = XMLTestRunner(output=options.xml_output_dir, - verbose=options.verbosity > 0) - else: - test_runner = unittest.TextTestRunner(verbosity=options.verbosity) - - if options.pyximport_py: - from pyximport import pyximport - pyximport.install(pyimport=True, build_dir=os.path.join(WORKDIR, '_pyximport'), - load_py_module_on_import_failure=True, inplace=True) - - result = test_runner.run(test_suite) - - if coverage is not None: - coverage.stop() - ignored_modules = ('Options', 'Version', 'DebugFlags', 'CmdLine') - modules = [ module for name, module in sys.modules.items() - if module is not None and - name.startswith('Cython.Compiler.') and - name[len('Cython.Compiler.'):] not in ignored_modules ] - if options.coverage: - coverage.report(modules, show_missing=0) - if options.coverage_xml: - coverage.xml_report(modules, outfile="coverage-report.xml") - if options.coverage_html: - coverage.html_report(modules, directory="coverage-report-html") - - if missing_dep_excluder.tests_missing_deps: - sys.stderr.write("Following tests excluded because of missing dependencies on your system:\n") - for test in missing_dep_excluder.tests_missing_deps: - sys.stderr.write(" %s\n" % test) - - if options.with_refnanny: - import refnanny - sys.stderr.write("\n".join([repr(x) for x in refnanny.reflog])) - - if options.exit_ok: - return options.shard_num, 0 - else: - return options.shard_num, not result.wasSuccessful() - - -if __name__ == '__main__': - try: - main() - except SystemExit: # <= Py2.4 ... - raise - except Exception: - traceback.print_exc() - try: - check_thread_termination(ignore_seen=False) - except PendingThreadsError: - # normal program exit won't kill the threads, do it the hard way here - flush_and_terminate(1) diff --git a/third_party/cython/src/setup.py b/third_party/cython/src/setup.py deleted file mode 100755 index bcd00b5747c91..0000000000000 --- a/third_party/cython/src/setup.py +++ /dev/null @@ -1,337 +0,0 @@ -#!/usr/bin/env python -try: - from setuptools import setup, Extension -except ImportError: - from distutils.core import setup, Extension -import os -import sys - -try: - import platform - is_cpython = not hasattr(platform, 'python_implementation') or platform.python_implementation() == 'CPython' -except (ImportError, NameError): - is_cpython = True # CPython < 2.6 - -if sys.platform == "darwin": - # Don't create resource files on OS X tar. - os.environ['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true' - os.environ['COPYFILE_DISABLE'] = 'true' - -setup_args = {} - -def add_command_class(name, cls): - cmdclasses = setup_args.get('cmdclass', {}) - cmdclasses[name] = cls - setup_args['cmdclass'] = cmdclasses - -from distutils.command.sdist import sdist as sdist_orig -class sdist(sdist_orig): - def run(self): - self.force_manifest = 1 - if (sys.platform != "win32" and - os.path.isdir('.git')): - assert os.system("git rev-parse --verify HEAD > .gitrev") == 0 - sdist_orig.run(self) -add_command_class('sdist', sdist) - -if sys.version_info[0] >= 3: - import lib2to3.refactor - from distutils.command.build_py \ - import build_py_2to3 as build_py - # need to convert sources to Py3 on installation - fixers = [ fix for fix in lib2to3.refactor.get_fixers_from_package("lib2to3.fixes") - if fix.split('fix_')[-1] not in ('next',) - ] - build_py.fixer_names = fixers - add_command_class("build_py", build_py) - -pxd_include_dirs = [ - directory for directory, dirs, files in os.walk('Cython/Includes') - if '__init__.pyx' in files or '__init__.pxd' in files - or directory == 'Cython/Includes' or directory == 'Cython/Includes/Deprecated'] - -pxd_include_patterns = [ - p+'/*.pxd' for p in pxd_include_dirs ] + [ - p+'/*.pyx' for p in pxd_include_dirs ] - -setup_args['package_data'] = { - 'Cython.Plex' : ['*.pxd'], - 'Cython.Compiler' : ['*.pxd'], - 'Cython.Runtime' : ['*.pyx', '*.pxd'], - 'Cython.Utility' : ['*.pyx', '*.pxd', '*.c', '*.h', '*.cpp'], - 'Cython' : [ p[7:] for p in pxd_include_patterns ], - } - -# This dict is used for passing extra arguments that are setuptools -# specific to setup -setuptools_extra_args = {} - -# tells whether to include cygdb (the script and the Cython.Debugger package -include_debugger = sys.version_info[:2] > (2, 5) - -if 'setuptools' in sys.modules: - setuptools_extra_args['zip_safe'] = False - setuptools_extra_args['entry_points'] = { - 'console_scripts': [ - 'cython = Cython.Compiler.Main:setuptools_main', - ] - } - scripts = [] -else: - if os.name == "posix": - scripts = ["bin/cython"] - else: - scripts = ["cython.py"] - -if include_debugger: - if 'setuptools' in sys.modules: - setuptools_extra_args['entry_points']['console_scripts'].append( - 'cygdb = Cython.Debugger.Cygdb:main') - else: - if os.name == "posix": - scripts.append('bin/cygdb') - else: - scripts.append('cygdb.py') - - -def compile_cython_modules(profile=False, compile_more=False, cython_with_refnanny=False): - source_root = os.path.abspath(os.path.dirname(__file__)) - compiled_modules = ["Cython.Plex.Scanners", - "Cython.Plex.Actions", - "Cython.Compiler.Lexicon", - "Cython.Compiler.Scanning", - "Cython.Compiler.Parsing", - "Cython.Compiler.Visitor", - "Cython.Compiler.FlowControl", - "Cython.Compiler.Code", - "Cython.Runtime.refnanny", - # "Cython.Compiler.FusedNode", - "Cython.Tempita._tempita", - ] - if compile_more: - compiled_modules.extend([ - "Cython.Build.Dependencies", - "Cython.Compiler.ParseTreeTransforms", - "Cython.Compiler.Nodes", - "Cython.Compiler.ExprNodes", - "Cython.Compiler.ModuleNode", - "Cython.Compiler.Optimize", - ]) - - defines = [] - if cython_with_refnanny: - defines.append(('CYTHON_REFNANNY', '1')) - - extensions = [] - if sys.version_info[0] >= 3: - from Cython.Distutils import build_ext as build_ext_orig - for module in compiled_modules: - source_file = os.path.join(source_root, *module.split('.')) - if os.path.exists(source_file + ".py"): - pyx_source_file = source_file + ".py" - else: - pyx_source_file = source_file + ".pyx" - dep_files = [] - if os.path.exists(source_file + '.pxd'): - dep_files.append(source_file + '.pxd') - if '.refnanny' in module: - defines_for_module = [] - else: - defines_for_module = defines - extensions.append( - Extension(module, sources = [pyx_source_file], - define_macros = defines_for_module, - depends = dep_files) - ) - - class build_ext(build_ext_orig): - # we must keep the original modules alive to make sure - # their code keeps working when we remove them from - # sys.modules - dead_modules = [] - - def build_extensions(self): - # add path where 2to3 installed the transformed sources - # and make sure Python (re-)imports them from there - already_imported = [ module for module in sys.modules - if module == 'Cython' or module.startswith('Cython.') ] - keep_alive = self.dead_modules.append - for module in already_imported: - keep_alive(sys.modules[module]) - del sys.modules[module] - sys.path.insert(0, os.path.join(source_root, self.build_lib)) - - if profile: - from Cython.Compiler.Options import directive_defaults - directive_defaults['profile'] = True - print("Enabled profiling for the Cython binary modules") - build_ext_orig.build_extensions(self) - - setup_args['ext_modules'] = extensions - add_command_class("build_ext", build_ext) - - else: # Python 2.x - from distutils.command.build_ext import build_ext as build_ext_orig - try: - class build_ext(build_ext_orig): - def build_extension(self, ext, *args, **kargs): - try: - build_ext_orig.build_extension(self, ext, *args, **kargs) - except StandardError: - print("Compilation of '%s' failed" % ext.sources[0]) - from Cython.Compiler.Main import compile - from Cython import Utils - if profile: - from Cython.Compiler.Options import directive_defaults - directive_defaults['profile'] = True - print("Enabled profiling for the Cython binary modules") - source_root = os.path.dirname(__file__) - for module in compiled_modules: - source_file = os.path.join(source_root, *module.split('.')) - if os.path.exists(source_file + ".py"): - pyx_source_file = source_file + ".py" - else: - pyx_source_file = source_file + ".pyx" - c_source_file = source_file + ".c" - source_is_newer = False - if not os.path.exists(c_source_file): - source_is_newer = True - else: - c_last_modified = Utils.modification_time(c_source_file) - if Utils.file_newer_than(pyx_source_file, c_last_modified): - source_is_newer = True - else: - pxd_source_file = source_file + ".pxd" - if os.path.exists(pxd_source_file) and Utils.file_newer_than(pxd_source_file, c_last_modified): - source_is_newer = True - if source_is_newer: - print("Compiling module %s ..." % module) - result = compile(pyx_source_file) - c_source_file = result.c_file - if c_source_file: - # Py2 distutils can't handle unicode file paths - if isinstance(c_source_file, unicode): - filename_encoding = sys.getfilesystemencoding() - if filename_encoding is None: - filename_encoding = sys.getdefaultencoding() - c_source_file = c_source_file.encode(filename_encoding) - if '.refnanny' in module: - defines_for_module = [] - else: - defines_for_module = defines - extensions.append( - Extension(module, sources = [c_source_file], - define_macros = defines_for_module) - ) - else: - print("Compilation failed") - if extensions: - setup_args['ext_modules'] = extensions - add_command_class("build_ext", build_ext) - except Exception: - print(''' -ERROR: %s - -Extension module compilation failed, looks like Cython cannot run -properly on this system. To work around this, pass the option -"--no-cython-compile". This will install a pure Python version of -Cython without compiling its own sources. -''' % sys.exc_info()[1]) - raise - -cython_profile = '--cython-profile' in sys.argv -if cython_profile: - sys.argv.remove('--cython-profile') - -try: - sys.argv.remove("--cython-compile-all") - cython_compile_more = True -except ValueError: - cython_compile_more = False - -try: - sys.argv.remove("--cython-with-refnanny") - cython_with_refnanny = True -except ValueError: - cython_with_refnanny = False - -try: - sys.argv.remove("--no-cython-compile") - compile_cython_itself = False -except ValueError: - compile_cython_itself = True - -if compile_cython_itself and (is_cpython or cython_compile_more): - compile_cython_modules(cython_profile, cython_compile_more, cython_with_refnanny) - -setup_args.update(setuptools_extra_args) - -from Cython import __version__ as version - -packages = [ - 'Cython', - 'Cython.Build', - 'Cython.Compiler', - 'Cython.Runtime', - 'Cython.Distutils', - 'Cython.Plex', - 'Cython.Tests', - 'Cython.Build.Tests', - 'Cython.Compiler.Tests', - 'Cython.Utility', - 'Cython.Tempita', - 'pyximport', -] - -if include_debugger: - packages.append('Cython.Debugger') - packages.append('Cython.Debugger.Tests') - # it's enough to do this for Py2.5+: - setup_args['package_data']['Cython.Debugger.Tests'] = ['codefile', 'cfuncs.c'] - -setup( - name = 'Cython', - version = version, - url = 'http://www.cython.org', - author = 'Robert Bradshaw, Stefan Behnel, Dag Seljebotn, Greg Ewing, et al.', - author_email = 'cython-devel@python.org', - description = "The Cython compiler for writing C extensions for the Python language.", - long_description = """\ - The Cython language makes writing C extensions for the Python language as - easy as Python itself. Cython is a source code translator based on the - well-known Pyrex_, but supports more cutting edge functionality and - optimizations. - - The Cython language is very close to the Python language (and most Python - code is also valid Cython code), but Cython additionally supports calling C - functions and declaring C types on variables and class attributes. This - allows the compiler to generate very efficient C code from Cython code. - - This makes Cython the ideal language for writing glue code for external C - libraries, and for fast C modules that speed up the execution of Python - code. - - .. _Pyrex: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/ - """, - classifiers = [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: Apache Software License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 3", - "Programming Language :: C", - "Programming Language :: Cython", - "Topic :: Software Development :: Code Generators", - "Topic :: Software Development :: Compilers", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - - scripts = scripts, - packages=packages, - - py_modules = ["cython"], - - **setup_args - ) diff --git a/third_party/cython/src/setupegg.py b/third_party/cython/src/setupegg.py deleted file mode 100755 index cf97861b3f9d8..0000000000000 --- a/third_party/cython/src/setupegg.py +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env python -"""Wrapper to run setup.py using setuptools.""" -import setuptools -execfile('setup.py') diff --git a/third_party/smhasher/BUILD.gn b/third_party/smhasher/BUILD.gn deleted file mode 100644 index fd9088c2712e3..0000000000000 --- a/third_party/smhasher/BUILD.gn +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -source_set("murmurhash3") { - sources = [ - "src/MurmurHash3.cpp", - "src/MurmurHash3.h", - ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] -} - -source_set("pmurhash") { - sources = [ - "src/PMurHash.c", - "src/PMurHash.h", - ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] -} - -source_set("cityhash") { - sources = [ - "src/City.cpp", - "src/City.h", - ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] -} diff --git a/third_party/smhasher/LICENSE b/third_party/smhasher/LICENSE deleted file mode 100644 index 3f18a844ad0be..0000000000000 --- a/third_party/smhasher/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -All MurmurHash source files are placed in the public domain. - -The license below applies to all other code in SMHasher: - -Copyright (c) 2011 Google, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/third_party/smhasher/README.chromium b/third_party/smhasher/README.chromium deleted file mode 100644 index b84ea3249bf5c..0000000000000 --- a/third_party/smhasher/README.chromium +++ /dev/null @@ -1,14 +0,0 @@ -Name: SMHasher -URL: http://code.google.com/p/smhasher/ -Version: 0 -Revision: 147 -License: MIT, Public Domain -License File: LICENSE -Security Critical: yes - -Description: -This is a library containing the MurmurHash3 function, and a hashing function -test suite. - -Licenses are MIT (SMHasher) and Public Domain (MurmurHash). - diff --git a/third_party/smhasher/smhasher.gyp b/third_party/smhasher/smhasher.gyp deleted file mode 100644 index cad864e38b908..0000000000000 --- a/third_party/smhasher/smhasher.gyp +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'murmurhash3', - 'type': 'static_library', - 'sources': [ - 'src/MurmurHash3.h', - 'src/MurmurHash3.cpp', - ], - }, - { - 'target_name': 'pmurhash', - 'type': 'static_library', - 'sources': [ - 'src/PMurHash.h', - 'src/PMurHash.c', - ], - }, - { - 'target_name': 'cityhash', - 'type': 'static_library', - 'sources': [ - 'src/City.cpp', - 'src/City.h', - ], - # TODO(jschuh): http://code.google.com/p/smhasher/issues/detail?id=19 - 'msvs_disabled_warnings': [ - 4267, - ], - }, - ], -}